import { GetOrderRequest as GetOrderRequest$1, GetOrderResponse as GetOrderResponse$1, ListOrdersRequest as ListOrdersRequest$1, ListOrdersResponse as ListOrdersResponse$1, AcceptOrderRequest as AcceptOrderRequest$1, AcceptOrderResponse as AcceptOrderResponse$1, CancelOrderRequest as CancelOrderRequest$1, CancelOrderResponse as CancelOrderResponse$1, FulfillOrderRequest as FulfillOrderRequest$1, FulfillOrderResponse as FulfillOrderResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Order { /** * Order ID. * @readonly */ id?: string; /** * ID of the restaurant’s location. * @format GUID * @readonly */ locationId?: string | null; /** * Order creation date and time in `yyyy-mm-ddThh:mm:sssZ` format. * @readonly */ createdDate?: Date | null; /** * Date and time of order's latest update in `yyyy-mm-ddThh:mm:sssZ` format. * @readonly */ updatedDate?: Date | null; /** * Additional note to the order added by the customer. * @maxLength 1000 */ comment?: string | null; /** * Currency of the order. * @format CURRENCY */ currency?: string | null; /** Current order status. */ status?: StatusWithLiterals; /** * Dishes and options included in the order. * @minSize 1 * @maxSize 300 */ lineItems?: LineItem[]; /** * Discounts associated with the order. * @maxSize 100 */ discounts?: Discount[]; /** Coupon applied to the order. */ coupon?: Coupon; /** * Order payment information. * @minSize 1 * @maxSize 100 */ payments?: Payment[]; /** Order fulfillment information. */ fulfillment?: Fulfillment; /** Customer information. */ customer?: Customer; /** Order totals. */ totals?: Totals; /** * Log of order updates. * @readonly */ activities?: Activity[]; /** Information about the sales channel that submitted the order. */ channelInfo?: ChannelInfo; /** * Information about the order’s loyalty points. * Learn more about the [Wix Loyalty Program](https://dev.wix.com/api/rest/wix-loyalty-program/introduction). */ loyaltyInfo?: LoyaltyInfo; } /** This might be extended in the future with pending orders statuses */ declare enum Status { /** Unspecified order status. */ UNSPECIFIED_ORDER_STATUS = "UNSPECIFIED_ORDER_STATUS", /** Order is pending response from the payment provider. */ PENDING = "PENDING", /** Order is new. */ NEW = "NEW", /** Order was accepted. */ ACCEPTED = "ACCEPTED", /** Order was canceled. */ CANCELED = "CANCELED", /** Order was fulfilled. */ FULFILLED = "FULFILLED" } /** @enumType */ type StatusWithLiterals = Status | 'UNSPECIFIED_ORDER_STATUS' | 'PENDING' | 'NEW' | 'ACCEPTED' | 'CANCELED' | 'FULFILLED'; interface LineItem { /** * Line item quantity. * @min 1 * @max 100000 */ quantity?: number; /** * Line item price. * @decimalValue options { maxScale:2 } */ price?: string; /** * Comment about the line item added by the customer. * @maxLength 1000 */ comment?: string | null; /** * List of all dish options available for the line item. * @maxSize 300 */ dishOptions?: LineItemOption[]; /** References to the line item’s origin catalog. */ catalogReference?: CatalogReference; } interface LineItemOption { /** * Line item option name. * @maxLength 1000 */ name?: string | null; /** * List of all dish options selected by the customer. * @maxSize 300 */ selectedChoices?: LineItem[]; /** * Minimum number of dish options the customer is required to choose. * @max 2147483647 */ minChoices?: number | null; /** * Maximum number of dish options the customer is allowed to choose. * @min 1 * @max 2147483647 */ maxChoices?: number | null; /** Dish option type. */ type?: DisplayTypeWithLiterals; /** * List of all available choices for the dish option. * @minSize 1 * @maxSize 300 */ availableChoices?: LineItemOptionItem[]; /** * List of dish option IDs selected by default. * @maxSize 300 */ defaultChoices?: string[] | null; } declare enum DisplayType { /** Unspecified display type. */ UNSPECIFIED_DISPLAY_TYPE = "UNSPECIFIED_DISPLAY_TYPE", /** Single choice selection. */ SELECTION = "SELECTION", /** Multiple choice selection. */ EXTRAS = "EXTRAS", /** Allow choice removal. */ DESELECTION = "DESELECTION" } /** @enumType */ type DisplayTypeWithLiterals = DisplayType | 'UNSPECIFIED_DISPLAY_TYPE' | 'SELECTION' | 'EXTRAS' | 'DESELECTION'; interface LineItemOptionItem { /** Line item ID as defined in the catalog. */ itemId?: string | null; /** * Line item price. * @decimalValue options { maxScale:2 } */ price?: string | null; /** * Line item name. * @maxLength 1000 */ name?: string | null; } interface CatalogReference { /** Line item ID as defined in the catalog. */ catalogItemId?: string; /** * Line item name as defined in the catalog. * @maxLength 1000 * @readonly */ catalogItemName?: string | null; /** * Item description as defined in the catalog. * @maxLength 1000 * @readonly */ catalogItemDescription?: string | null; /** * Item media url as defined in the catalog. * @format WEB_URL * @readonly */ catalogItemMedia?: string | null; } interface Discount { /** Discount ID as defined in the catalog. */ catalogDiscountId?: string; /** * Amount saved. * @decimalValue options { maxScale:2 } */ appliedAmount?: string; /** Discount type. */ catalogDiscountType?: DiscountTypeWithLiterals; /** * Discount name as defined in the catalog. * @minLength 1 * @maxLength 256 */ catalogDiscountName?: string; /** * Discount description as defined in the catalog. * * Max: 1,000 characters * @minLength 1 * @maxLength 1000 * @readonly */ catalogDiscountDescription?: string; } declare enum DiscountType { UNSPECIFIED_TYPE = "UNSPECIFIED_TYPE", OFF_ITEM = "OFF_ITEM", OFF_ORDER = "OFF_ORDER", OFF_ORDER_MANAGER_DISCOUNT = "OFF_ORDER_MANAGER_DISCOUNT" } /** @enumType */ type DiscountTypeWithLiterals = DiscountType | 'UNSPECIFIED_TYPE' | 'OFF_ITEM' | 'OFF_ORDER' | 'OFF_ORDER_MANAGER_DISCOUNT'; interface Coupon { /** Coupon code. */ code?: string; /** * Coupon ID. * @format GUID */ id?: string; } interface Payment { /** Payment type. */ type?: PaymentTypeWithLiterals; /** * Amount paid using this payment type. Only differs from total amount paid in case of split payments. * @decimalValue options { maxScale:2 } */ amount?: string | null; /** Payment method. */ method?: string | null; /** * Transaction ID. * See [Cashier API](https://dev.wix.com/api/rest/wix-cashier/payments/transaction) for more details. */ providerTransactionId?: string | null; } declare enum PaymentType { /** Unspecified payment type. */ UNSPECIFIED_PAYMENT_TYPE = "UNSPECIFIED_PAYMENT_TYPE", /** Cash */ CASH = "CASH", /** credit */ CREDIT = "CREDIT", /** Delivery club */ DELIVERY_CLUB = "DELIVERY_CLUB", /** Delivery com */ DELIVERY_COM = "DELIVERY_COM", /** Bitpay */ BITPAY = "BITPAY", /** Cellarix */ CELLARIX = "CELLARIX", /** Bits of gold */ BITSOFGOLD = "BITSOFGOLD", /** Multi pass */ MULTIPASS = "MULTIPASS", /** Tenbis */ TENBIS = "TENBIS", /** Paypal */ PAYPAL = "PAYPAL", /** MySodexo */ MYSODEXO = "MYSODEXO", /** Wix Payments */ WIX_PAYMENTS = "WIX_PAYMENTS" } /** @enumType */ type PaymentTypeWithLiterals = PaymentType | 'UNSPECIFIED_PAYMENT_TYPE' | 'CASH' | 'CREDIT' | 'DELIVERY_CLUB' | 'DELIVERY_COM' | 'BITPAY' | 'CELLARIX' | 'BITSOFGOLD' | 'MULTIPASS' | 'TENBIS' | 'PAYPAL' | 'MYSODEXO' | 'WIX_PAYMENTS'; interface Fulfillment extends FulfillmentDetailsOneOf { /** Delivery details. */ deliveryDetails?: DeliveryDetails; /** Pickup details. */ pickupDetails?: PickupDetails; /** Dine-in details */ dineInDetails?: DineInDetails; /** Fulfillment type. */ type?: FulfillmentTypeWithLiterals; /** Latest delivery time promised by the restaurant. */ promisedTime?: Date | null; /** Whether the order should be fulfilled as soon as possible. Defaults to `true`. */ asap?: boolean | null; } /** @oneof */ interface FulfillmentDetailsOneOf { /** Delivery details. */ deliveryDetails?: DeliveryDetails; /** Pickup details. */ pickupDetails?: PickupDetails; /** Dine-in details */ dineInDetails?: DineInDetails; } declare enum FulfillmentType { /** Unspecified fulfillment type. */ UNSPECIFIED_FULFILLMENT_TYPE = "UNSPECIFIED_FULFILLMENT_TYPE", /** Pickup */ PICKUP = "PICKUP", /** Delivery */ DELIVERY = "DELIVERY", /** Dine-in */ DINE_IN = "DINE_IN" } /** @enumType */ type FulfillmentTypeWithLiterals = FulfillmentType | 'UNSPECIFIED_FULFILLMENT_TYPE' | 'PICKUP' | 'DELIVERY' | 'DINE_IN'; interface DeliveryDetails extends DeliveryDetailsProviderOneOf { /** Delivery through the restaurant. */ restaurant?: Restaurant; /** Delivery through an external provider. */ externalProvider?: ExternalProvider; /** Delivery address. */ address?: DeliveryAddress; /** Information about the delivery pickup. */ pickupInfo?: PickupInfo; } /** @oneof */ interface DeliveryDetailsProviderOneOf { /** Delivery through the restaurant. */ restaurant?: Restaurant; /** Delivery through an external provider. */ externalProvider?: ExternalProvider; } interface DeliveryAddress { /** * Formatted delivery address. * @maxLength 250 */ formatted?: string | null; /** * Country. * @maxLength 100 */ country?: string | null; /** * City name. * @maxLength 100 */ city?: string | null; /** * Street name. * @maxLength 100 */ street?: string | null; /** * Street number. * @maxLength 100 */ streetNumber?: string | null; /** * Apartment number. * @maxLength 100 */ apt?: string | null; /** * Floor. * @maxLength 100 */ floor?: string | null; /** * Entrance. * @maxLength 100 */ entrance?: string | null; /** * ZIP/postal code. * @maxLength 100 */ zipCode?: string | null; /** * Country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * @format COUNTRY */ countryCode?: string | null; /** Special delivery instructions upon arrival to the address. */ onArrival?: OnArrivalWithLiterals; /** Whether an approximate address is used. Defaults to `false`. In case of `false` a house number is required. */ approximate?: boolean | null; /** * Delivery Instructions added by the customer. * @maxLength 500 */ comment?: string | null; /** Geo coordinates of the address. */ location?: DeliveryAddressLocation; /** Address Line 2. */ addressLine2?: string | null; /** 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; } declare enum OnArrival { /** Unspecified arrival type. */ UNSPECIFIED_ON_ARRIVAL_TYPE = "UNSPECIFIED_ON_ARRIVAL_TYPE", /** Ring the doorbell. */ BUZZ_DOOR = "BUZZ_DOOR", /** Call the customer. */ CALL_ME = "CALL_ME" } /** @enumType */ type OnArrivalWithLiterals = OnArrival | 'UNSPECIFIED_ON_ARRIVAL_TYPE' | 'BUZZ_DOOR' | 'CALL_ME'; interface DeliveryAddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface Restaurant { /** * Delivery fee. * @decimalValue options { maxScale:2 } */ fee?: string | null; } interface ExternalProvider { /** * ID of the external delivery provider. * @format GUID */ id?: string; /** * Name of the external delivery provider. * @readonly */ name?: string; /** * Delivery fee charged to the customer. * @decimalValue options { maxScale:2 } */ customerFee?: string | null; /** * Fee paid by the restaurant to the external delivery provider. * @readonly * @decimalValue options { maxScale:2 } */ commission?: string | null; /** Order pickup time. */ pickupTime?: Date | null; /** Order drop off time. */ dropOffTime?: Date | null; } interface PickupInfo { /** When a delivery is ready to be picked up. This is the start time of the pickup window. */ windowStartTime?: Date | null; /** When a delivery must be picked up by. This is the end time of the pickup window. */ windowEndTime?: Date | null; } interface DropOffInfo { /** Whether the order is delivered contactless. */ contactless?: boolean; } interface PickupDetails { /** * Pickup fee charged to the customer. * @decimalValue options { maxScale:2 } */ fee?: string | null; /** Curbside pickup method */ curbside?: Curbside; } interface Curbside { /** * Additional information for curbside pickup. * @maxLength 50 */ info?: string; } interface DineInDetails { /** Label of dine-in information added by the restaurant, e.g. `table` or `booth`. */ label?: string; /** Value of dine-in information added by the restaurant, e.g. `#6`. */ value?: string; } /** Customer information. */ interface Customer extends CustomerIdOneOf { /** * Member ID. * @format GUID */ memberId?: string | null; /** * Visitor ID. * @format GUID */ visitorId?: string | null; /** First name. */ firstName?: string; /** Last name. */ lastName?: string; /** Phone number. */ phone?: string | null; /** Email address. */ email?: string; /** * Customer's contact ID. * See [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4) for more details. * @format GUID */ contactId?: string | null; } /** @oneof */ interface CustomerIdOneOf { /** * Member ID. * @format GUID */ memberId?: string | null; /** * Visitor ID. * @format GUID */ visitorId?: string | null; } interface Totals { /** * Order subtotal. Calculated by substracting delivery fee, tax and discount from order total. * @decimalValue options { maxScale:2 } */ subtotal?: string; /** * Total order price. * @decimalValue options { maxScale:2 } */ total?: string; /** * Total delivery fees charged to the customer. * @decimalValue options { maxScale:2 } */ delivery?: string | null; /** * Total tax. * @decimalValue options { maxScale:2 } */ tax?: string | null; /** * Total discount amount. * @decimalValue options { maxScale:2 } */ discount?: string | null; /** * Total amount saved through the Wix Loyalty program. * @decimalValue options { maxScale:2 } */ loyaltySavings?: string | null; /** * Total number of line items. * @readonly */ quantity?: number; /** * Total tip. * @decimalValue options { maxScale:2 } */ tip?: string | null; } interface ServiceFee { /** * The service fee's unique id. * @format GUID */ ruleId?: string; /** * The service fee's name. * @readonly */ name?: string; /** The service fee's fee as Money. */ fee?: Money; /** The service fee's tax as Money. */ tax?: Money; } /** * 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 Activity { /** * Activity timestamp. * @readonly */ timestamp?: Date | null; /** * Optional message added during order activity. * @maxLength 1000 * @readonly */ message?: string | null; } interface ChannelInfo { type?: TypeWithLiterals; } declare enum Type { /** Unspecified channel type. */ UNSPECIFIED_CHANNEL_TYPE = "UNSPECIFIED_CHANNEL_TYPE", /** Web */ WEB = "WEB", /** Mobile web */ MOBILE_WEB = "MOBILE_WEB", /** Mobile */ MOBILE = "MOBILE", /** Call Center */ CALL_CENTER = "CALL_CENTER", /** Facebook */ FACEBOOK = "FACEBOOK", /** Third-party */ TPA = "TPA" } /** @enumType */ type TypeWithLiterals = Type | 'UNSPECIFIED_CHANNEL_TYPE' | 'WEB' | 'MOBILE_WEB' | 'MOBILE' | 'CALL_CENTER' | 'FACEBOOK' | 'TPA'; interface LoyaltyInfo { /** * Associated Wix Loyalty reward ID. * @format GUID */ rewardId?: string | null; /** * Amount saved redeeming Wix Loyalty reward. * @decimalValue options { maxScale:2 } */ appliedAmount?: string | null; /** * Wix Loyalty points redeemed. * @readonly */ redeemedPoints?: number | null; /** * Associated Wix Loyalty transaction ID. * @format GUID * @readonly */ transactionId?: string | null; /** * Wix Loyalty estimated account point balance. * Equal to the sum of earned and adjusted points minus redeemed points. * The estimated point balance is the value before the order is completed. Following the purchase, the point balance is updated. * @readonly */ estimatedAccountBalance?: number | null; /** * Wix Loyalty estimated total earned points. * The estimated total earned points is the value before the order is completed. Following the purchase, the total is updated. * @readonly */ estimatedPointsEarned?: number | null; /** * Associated Wix Loyalty reward revision number, which increments by 1 each time the loyalty account is updated. * * To prevent conflicting changes, the current revision must be passed when updating the loyalty account. * Ignored when creating an account. * @readonly */ rewardRevision?: string | null; } interface PosInfo { externalProvider?: PosInfoExternalProvider; } interface Error { /** Error code */ code?: string; /** Error message */ message?: string; /** Error params */ params?: Record; } interface PosInfoExternalProvider { /** * ID of the external provider. * @format GUID */ id?: string; /** ID of the order in the external provider. */ orderId?: string; /** Order creation success */ success?: boolean; /** Order creation errors */ errors?: Error[]; } interface GetTotalActiveOrdersRequest { /** * filter response to a specific location, otherwise return totals for all locations. * @format GUID */ locationId?: string | null; organizationId?: string | null; /** Order delivery date and time for filtering new orders count, Must include a `gte:` or `lte:` prefix, for example: `gte:2021-10-26T12:48:15Z`. */ promisedTimeNew?: string | null; /** Order delivery date and time for filtering new orders count, Must include a `gte:` or `lte:` prefix, for example: `gte:2021-10-26T12:48:15Z`. */ promisedTimeInProgress?: string | null; } interface GetTotalActiveOrdersResponse { /** list of locationId's mapped to the total number of orders. */ totals?: LocationToAmount[]; } interface LocationToAmount { /** @format GUID */ locationId?: string; /** @maxLength 150 */ locationName?: string | null; totalNew?: number; totalInProgress?: number; } interface NotifyOrderEventRequest { /** Order ID. */ id?: string; /** Metasite id */ msid?: string; /** Notification event type */ eventType?: EventTypeWithLiterals; } declare enum EventType { /** Order event can't be classified, due to an error/unhandled event */ UNKNOWN = "UNKNOWN", /** Order Created. */ CREATED = "CREATED", /** Order accepted */ ACCEPTED = "ACCEPTED", /** Order Canceled */ CANCELED = "CANCELED", /** Order Fulfilled */ FULFILLED = "FULFILLED" } /** @enumType */ type EventTypeWithLiterals = EventType | 'UNKNOWN' | 'CREATED' | 'ACCEPTED' | 'CANCELED' | 'FULFILLED'; interface Empty { } interface GetOrderByMsidRequest { /** Order ID. */ id?: string; /** * Metasite id * @format GUID */ msid?: string; /** Controls what data is returned in the response */ fieldMask?: string[]; } interface GetOrderByMsidResponse { /** Order data. */ order?: Order; } interface ListOrdersByMsidRequest { /** Controls what data is returned in the response. */ fieldMask?: string[]; /** Order status to filter by. Currently Status Fulfilled is not supported */ status?: StatusWithLiterals; /** Created date of the order epoch time. */ createdDate?: string | null; delivered?: boolean | null; /** Sorting of Orders in response. Default "CREATED_DATE:ASC" */ sort?: Sort; /** * limit of records - min: 1 max: 2000 * @min 1 * @max 2000 */ limit?: number | null; /** * Metasite id * @format GUID */ msid?: string; } interface Sort { /** Field to sort by. */ fieldName?: FieldNameWithLiterals; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum FieldName { CREATED_DATE = "CREATED_DATE", UPDATED_DATE = "UPDATED_DATE", PROMISED_TIME = "PROMISED_TIME" } /** @enumType */ type FieldNameWithLiterals = FieldName | 'CREATED_DATE' | 'UPDATED_DATE' | 'PROMISED_TIME'; declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface ListOrdersByMsidResponse { /** Order data. */ orders?: Order[]; } interface NotifyOrderEventResponse { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface NewOrder { /** New order. */ order?: Order; } interface GetOrderRequest { /** ID of the order to retrieve. */ id: string; /** * Set of fields to retrieve. * Fields that aren't included in `fieldmaks.paths` are ignored. * See [the article about field masks](https://dev.wix.com/api/rest/restaurants/orders/supported-field-masks) * for more details. */ fieldMask?: string[]; } interface GetOrderResponse { /** Retrieved order. */ order?: Order; } interface ListOrdersRequest { /** * Set of fields to retrieve. * Fields that aren't included in `fieldmaks.paths` are ignored. * See [the article about field masks](https://dev.wix.com/api/rest/restaurants/orders/supported-field-masks) * for more details. */ fieldMask?: string[]; /** Order status. Currently, it is not possible to filter by status `FULFILLED`. */ status?: StatusWithLiterals; /** Order creation date and time. Must include a `gte:` or `lte:` prefix, for example: `gte:2021-10-26T12:48:15Z`. */ createdDate?: string | null; /** Whether the order has been delivered. */ delivered?: boolean | null; /** * Location filter. Pass an array of location IDs to return orders with any of the provided locations. * @format GUID */ locationIds?: string[]; /** Sorting options. */ sort?: Sort; /** * Number of orders to return. The minimum limit is 1, the maximum 1000. * @min 1 * @max 1000 */ limit?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface ListOrdersResponse { /** List of retrieved orders. */ orders?: Order[]; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface AcceptOrderRequest extends AcceptOrderRequestDeliveryTimeOneOf { /** ID of the order to mark as `ACCEPTED`. */ id: string; /** * Message when accepting the order. * @maxLength 1000 */ message?: string | null; } /** @oneof */ interface AcceptOrderRequestDeliveryTimeOneOf { } interface AcceptOrderResponse { /** Accepted order. */ order?: Order; } interface OrderAccepted { /** Accepted order. */ order?: Order; } interface CancelOrderRequest { /** ID of the order to mark as `CANCELED`. */ id: string; /** * Message when canceling the order. * @maxLength 1000 */ message?: string | null; } interface CancelOrderResponse { /** Canceled order. */ order?: Order; } interface OrderCanceled { /** Canceled order. */ order?: Order; } interface FulfillOrderRequest { /** ID of the order to mark as `FULFILLED`. */ id: string; } interface FulfillOrderResponse { /** Fulfilled order. */ order?: Order; } interface OrderFulfilled { /** Fulfilled order. */ order?: Order; } interface CountOrdersRequest { /** * Count orders only for a specific restaurant location * @format GUID */ restaurantLocationId?: string | null; /** Limit the count only for orders that match the query */ query?: CountOrdersQuery; /** * Count orders only for a specific OS location ID * @format GUID */ locationId?: string | null; } interface CountOrdersQuery { /** Required - filter orders count by status. Supported values: NEW, ACCEPTED */ status?: StatusWithLiterals; /** * Required - filter orders count by fulfillment promised time. (Latest delivery time promised by the restaurant) * Maximum supported range is up to 30 days. * NOTE: Count is a slow operation, for better performance request smaller time ranges. */ promisedTime?: DateRangeFilter; } interface DateRangeFilter { /** Filter by date range, starting from given timestamp */ startTime?: Date | null; /** Filter by date range, ending by a given timestamp */ endTime?: Date | null; } interface CountOrdersResponse { /** Number of orders count that match the query */ count?: number; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getOrder(): __PublicMethodMetaInfo<'GET', { id: string; }, GetOrderRequest$1, GetOrderRequest, GetOrderResponse$1, GetOrderResponse>; declare function listOrders(): __PublicMethodMetaInfo<'GET', {}, ListOrdersRequest$1, ListOrdersRequest, ListOrdersResponse$1, ListOrdersResponse>; declare function acceptOrder(): __PublicMethodMetaInfo<'POST', { id: string; }, AcceptOrderRequest$1, AcceptOrderRequest, AcceptOrderResponse$1, AcceptOrderResponse>; declare function cancelOrder(): __PublicMethodMetaInfo<'POST', { id: string; }, CancelOrderRequest$1, CancelOrderRequest, CancelOrderResponse$1, CancelOrderResponse>; declare function fulfillOrder(): __PublicMethodMetaInfo<'POST', { id: string; }, FulfillOrderRequest$1, FulfillOrderRequest, FulfillOrderResponse$1, FulfillOrderResponse>; export { type AcceptOrderRequestDeliveryTimeOneOf as AcceptOrderRequestDeliveryTimeOneOfOriginal, type AcceptOrderRequest as AcceptOrderRequestOriginal, type AcceptOrderResponse as AcceptOrderResponseOriginal, type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type Activity as ActivityOriginal, type CancelOrderRequest as CancelOrderRequestOriginal, type CancelOrderResponse as CancelOrderResponseOriginal, type CatalogReference as CatalogReferenceOriginal, type ChannelInfo as ChannelInfoOriginal, type CountOrdersQuery as CountOrdersQueryOriginal, type CountOrdersRequest as CountOrdersRequestOriginal, type CountOrdersResponse as CountOrdersResponseOriginal, type Coupon as CouponOriginal, type Curbside as CurbsideOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomerIdOneOf as CustomerIdOneOfOriginal, type Customer as CustomerOriginal, type DateRangeFilter as DateRangeFilterOriginal, type DeliveryAddressLocation as DeliveryAddressLocationOriginal, type DeliveryAddress as DeliveryAddressOriginal, type DeliveryDetails as DeliveryDetailsOriginal, type DeliveryDetailsProviderOneOf as DeliveryDetailsProviderOneOfOriginal, type DineInDetails as DineInDetailsOriginal, type Discount as DiscountOriginal, DiscountType as DiscountTypeOriginal, type DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal, DisplayType as DisplayTypeOriginal, type DisplayTypeWithLiterals as DisplayTypeWithLiteralsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type DropOffInfo as DropOffInfoOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type Error as ErrorOriginal, EventType as EventTypeOriginal, type EventTypeWithLiterals as EventTypeWithLiteralsOriginal, type ExternalProvider as ExternalProviderOriginal, FieldName as FieldNameOriginal, type FieldNameWithLiterals as FieldNameWithLiteralsOriginal, type FulfillOrderRequest as FulfillOrderRequestOriginal, type FulfillOrderResponse as FulfillOrderResponseOriginal, type FulfillmentDetailsOneOf as FulfillmentDetailsOneOfOriginal, type Fulfillment as FulfillmentOriginal, FulfillmentType as FulfillmentTypeOriginal, type FulfillmentTypeWithLiterals as FulfillmentTypeWithLiteralsOriginal, type GetOrderByMsidRequest as GetOrderByMsidRequestOriginal, type GetOrderByMsidResponse as GetOrderByMsidResponseOriginal, type GetOrderRequest as GetOrderRequestOriginal, type GetOrderResponse as GetOrderResponseOriginal, type GetTotalActiveOrdersRequest as GetTotalActiveOrdersRequestOriginal, type GetTotalActiveOrdersResponse as GetTotalActiveOrdersResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type LineItemOptionItem as LineItemOptionItemOriginal, type LineItemOption as LineItemOptionOriginal, type LineItem as LineItemOriginal, type ListOrdersByMsidRequest as ListOrdersByMsidRequestOriginal, type ListOrdersByMsidResponse as ListOrdersByMsidResponseOriginal, type ListOrdersRequest as ListOrdersRequestOriginal, type ListOrdersResponse as ListOrdersResponseOriginal, type LocationToAmount as LocationToAmountOriginal, type LoyaltyInfo as LoyaltyInfoOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Money as MoneyOriginal, type NewOrder as NewOrderOriginal, type NotifyOrderEventRequest as NotifyOrderEventRequestOriginal, type NotifyOrderEventResponse as NotifyOrderEventResponseOriginal, OnArrival as OnArrivalOriginal, type OnArrivalWithLiterals as OnArrivalWithLiteralsOriginal, type OrderAccepted as OrderAcceptedOriginal, type OrderCanceled as OrderCanceledOriginal, type OrderFulfilled as OrderFulfilledOriginal, type Order as OrderOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Payment as PaymentOriginal, PaymentType as PaymentTypeOriginal, type PaymentTypeWithLiterals as PaymentTypeWithLiteralsOriginal, type PickupDetails as PickupDetailsOriginal, type PickupInfo as PickupInfoOriginal, type PosInfoExternalProvider as PosInfoExternalProviderOriginal, type PosInfo as PosInfoOriginal, type Restaurant as RestaurantOriginal, type RestoreInfo as RestoreInfoOriginal, type ServiceFee as ServiceFeeOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sort as SortOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type Totals as TotalsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, acceptOrder, cancelOrder, fulfillOrder, getOrder, listOrders };