export interface Order { /** * Order ID. * @readonly */ _id?: string; /** * ID of the restaurant’s location. * @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. */ comment?: string | null; /** Currency of the order. */ currency?: string | null; /** Current order status. */ status?: Status; /** * TEST This is a line item for the order of the property * */ lineItems?: LineItem[]; /** Discounts associated with the order. */ discounts?: Discount[]; /** Coupon applied to the order. */ coupon?: Coupon; /** Order payment information. */ 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 */ export declare enum Status { /** Order status can't be classified, due to an error */ UNSPECIFIED_ORDER_STATUS = "UNSPECIFIED_ORDER_STATUS", /** Order is pending response from the payment provider - IF THIS WILL REMAIN PAYMENT PROVIDER SPECIFIC, THIS SHOULD BE CLEAR FROM THE NAME - E.G. PENDING_PAYMENT_PROVIDER. */ PENDING = "PENDING", /** The order is marked as new - wait for state machine */ NEW = "NEW", /** Order was accepted */ ACCEPTED = "ACCEPTED", /** Order is canceled */ CANCELED = "CANCELED", /** Order is fulfilled */ FULFILLED = "FULFILLED" } /** TEST This is a line item for the order. */ export interface LineItem { /** Line item quantity. */ quantity?: number; /** Line item price. */ price?: string; /** Comment about the line item added by the customer. */ comment?: string | null; /** List of all dish options available for the line item. */ dishOptions?: LineItemOption[]; /** References to the line item’s origin catalog. */ catalogReference?: CatalogReference; } export interface LineItemOption { /** Line item option name. */ name?: string | null; /** List of all dish options selected by the customer. */ selectedChoices?: LineItem[]; /** Minimum number of dish options the customer is required to choose. */ minChoices?: number | null; /** Maximum number of dish options the customer is allowed to choose. */ maxChoices?: number | null; /** Dish option type. */ type?: DisplayType; /** List of all available choices for the dish option. */ availableChoices?: LineItemOptionItem[]; /** List of dish option IDs selected by default. */ defaultChoices?: string[] | null; } export declare enum DisplayType { /** DisplayType, due to an error */ UNSPECIFIED_DISPLAY_TYPE = "UNSPECIFIED_DISPLAY_TYPE", /** Single choice selection */ SELECTION = "SELECTION", /** Multiple choices selection */ EXTRAS = "EXTRAS", /** Allow choices removal */ DESELECTION = "DESELECTION" } export interface LineItemOptionItem { /** Line item ID as defined in the catalog. */ itemId?: string | null; /** Line item price. */ price?: string | null; /** Line item name. */ name?: string | null; } export interface CatalogReference { /** Line item ID as defined in the catalog. */ catalogItemId?: string; /** * Line item name as defined in the catalog. * @readonly */ catalogItemName?: string | null; /** * Item description as defined in the catalog. * @readonly */ catalogItemDescription?: string | null; /** * Item media url as defined in the catalog. * @readonly */ catalogItemMedia?: string | null; } export interface Discount { /** Discount ID as defined in the catalog. */ catalogDiscountId?: string; /** Amount saved. */ appliedAmount?: string; /** Discount type. */ catalogDiscountType?: DiscountType; /** Discount name as defined in the catalog. */ catalogDiscountName?: string; /** * Discount description as defined in the catalog. * * Max: 1,000 characters * @readonly */ catalogDiscountDescription?: string; } export declare enum DiscountType { UNSPECIFIED_TYPE = "UNSPECIFIED_TYPE", OFF_ITEM = "OFF_ITEM", OFF_ORDER = "OFF_ORDER", OFF_ORDER_MANAGER_DISCOUNT = "OFF_ORDER_MANAGER_DISCOUNT" } export interface Coupon { /** Coupon code. */ code?: string; /** Coupon ID. */ _id?: string; } export interface Payment { /** Payment type. */ type?: PaymentType; /** Amount paid using this payment type. Only differs from total amount paid in case of split payments. */ 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; } export declare enum PaymentType { /** PaymentType, due to an error */ 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" } export interface Fulfillment extends FulfillmentDetailsOneOf { /** Delivery details. */ deliveryDetails?: DeliveryDetails; /** Pickup details. */ pickupDetails?: PickupDetails; /** Dine-in details */ dineInDetails?: DineInDetails; /** Fulfillment type. */ type?: FulfillmentType; /** 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 */ export interface FulfillmentDetailsOneOf { /** Delivery details. */ deliveryDetails?: DeliveryDetails; /** Pickup details. */ pickupDetails?: PickupDetails; /** Dine-in details */ dineInDetails?: DineInDetails; } export declare enum FulfillmentType { /** Missing type due to an error */ UNSPECIFIED_FULFILLMENT_TYPE = "UNSPECIFIED_FULFILLMENT_TYPE", /** Pickup */ PICKUP = "PICKUP", /** Delivery */ DELIVERY = "DELIVERY", /** Dine-in */ DINE_IN = "DINE_IN" } export 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 */ export interface DeliveryDetailsProviderOneOf { /** Delivery through the restaurant. */ restaurant?: Restaurant; /** Delivery through an external provider. */ externalProvider?: ExternalProvider; } export interface DeliveryAddress { /** Formatted delivery address. */ formatted?: string | null; /** Country. */ country?: string | null; /** City name. */ city?: string | null; /** Street name. */ street?: string | null; /** Street number. */ streetNumber?: string | null; /** Apartment number. */ apt?: string | null; /** Floor. */ floor?: string | null; /** Entrance. */ entrance?: string | null; /** ZIP/postal code. */ zipCode?: string | null; /** Country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ countryCode?: string | null; /** Special delivery instructions upon arrival to the address. */ onArrival?: OnArrival; /** 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. */ 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; } export declare enum OnArrival { /** Missing type due to an error */ UNSPECIFIED_ON_ARRIVAL_TYPE = "UNSPECIFIED_ON_ARRIVAL_TYPE", /** Buzz the door */ BUZZ_DOOR = "BUZZ_DOOR", /** Phone me */ CALL_ME = "CALL_ME" } export interface DeliveryAddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } export interface Restaurant { /** Delivery fee. */ fee?: string | null; } export interface ExternalProvider { /** ID of the external delivery provider. */ _id?: string; /** * Name of the external delivery provider. * @readonly */ name?: string; /** Delivery fee charged to the customer. */ customerFee?: string | null; /** * Fee paid by the restaurant to the external delivery provider. * @readonly */ commission?: string | null; /** Order pickup time. */ pickupTime?: Date | null; /** Order drop off time. */ dropOffTime?: Date | null; } export 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; } export interface DropOffInfo { /** Whether the order is delivered contactless. */ contactless?: boolean; } export interface PickupDetails { /** Pickup fee charged to the customer. */ fee?: string | null; /** Curbside pickup method */ curbside?: Curbside; } export interface Curbside { /** Additional information for curbside pickup. */ info?: string; } export 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. */ export interface Customer extends CustomerIdOneOf { /** Member ID. */ memberId?: string | null; /** Visitor ID. */ 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. */ contactId?: string | null; } /** @oneof */ export interface CustomerIdOneOf { /** Member ID. */ memberId?: string | null; /** Visitor ID. */ visitorId?: string | null; } export interface Totals { /** Order subtotal. Calculated by substracting delivery fee, tax and discount from order total. */ subtotal?: string; /** Total order price. */ total?: string; /** Total delivery fees charged to the customer. */ delivery?: string | null; /** Total tax. */ tax?: string | null; /** Total discount amount. */ discount?: string | null; /** Total amount saved through the Wix Loyalty program. */ loyaltySavings?: string | null; /** * Total number of line items. * @readonly */ quantity?: number; /** Total tip. */ tip?: string | null; } export interface ServiceFee { /** The service fee's unique id. */ 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. */ export 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. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ 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; } export interface Activity { /** * Activity timestamp. * @readonly */ timestamp?: Date | null; /** * Optional message added during order activity. * @readonly */ message?: string | null; } export interface ChannelInfo { type?: Type; } export declare enum Type { UNSPECIFIED_CHANNEL_TYPE = "UNSPECIFIED_CHANNEL_TYPE", /** Web */ WEB = "WEB", /** mobileWeb */ MOBILE_WEB = "MOBILE_WEB", /** mobile */ MOBILE = "MOBILE", /** callCenter */ CALL_CENTER = "CALL_CENTER", /** facebook */ FACEBOOK = "FACEBOOK", /** TPA */ TPA = "TPA" } export interface LoyaltyInfo { /** Associated Wix Loyalty reward ID. */ rewardId?: string | null; /** Amount saved redeeming Wix Loyalty reward. */ appliedAmount?: string | null; /** * Wix Loyalty points redeemed. * @readonly */ redeemedPoints?: number | null; /** * Associated Wix Loyalty transaction ID. * @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; } export interface PosInfo { externalProvider?: PosInfoExternalProvider; } export interface Error { /** Error code */ code?: string; /** Error message */ message?: string; /** Error params */ params?: Record; } export interface PosInfoExternalProvider { /** ID of the external provider. */ _id?: string; /** ID of the order in the external provider. */ orderId?: string; /** Order creation success */ success?: boolean; /** Order creation errors */ errors?: Error[]; } export interface GetTotalActiveOrdersRequest { /** filter response to a specific location, otherwise return totals for all locations. */ 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; } export interface GetTotalActiveOrdersResponse { /** list of locationId's mapped to the total number of orders. */ totals?: LocationToAmount[]; } export interface LocationToAmount { locationId?: string; locationName?: string | null; totalNew?: number; totalInProgress?: number; } export interface NewOrder { /** New order. */ order?: Order; } export 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[]; } export interface GetOrderResponse { /** Retrieved order. */ order?: Order; } export 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?: Status; /** 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. */ locationIds?: string[]; /** Sorting options. */ sort?: Sort; /** Number of orders to return. The minimum limit is 1, the maximum 1000. */ limit?: number | null; } export interface Sort { /** Field to sort by. */ fieldName?: FieldName; /** Sort order. */ order?: SortOrder; } export declare enum FieldName { CREATED_DATE = "CREATED_DATE", UPDATED_DATE = "UPDATED_DATE", PROMISED_TIME = "PROMISED_TIME" } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface ListOrdersResponse { /** List of retrieved orders. */ orders?: Order[]; } export 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; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface AcceptOrderRequest extends AcceptOrderRequestDeliveryTimeOneOf { /** ID of the order to mark as `ACCEPTED`. */ _id: string; /** Message when accepting the order. */ message?: string | null; } /** @oneof */ export interface AcceptOrderRequestDeliveryTimeOneOf { } export interface AcceptOrderResponse { /** Accepted order. */ order?: Order; } export interface OrderAccepted { /** Accepted order. */ order?: Order; } export interface CancelOrderRequest { /** ID of the order to mark as `CANCELED`. */ _id: string; /** Message when canceling the order. */ message?: string | null; } export interface CancelOrderResponse { /** Canceled order. */ order?: Order; } export interface OrderCanceled { /** Canceled order. */ order?: Order; } export interface FulfillOrderRequest { /** ID of the order to mark as `FULFILLED`. */ _id: string; } export interface FulfillOrderResponse { /** Fulfilled order. */ order?: Order; } export interface OrderFulfilled { /** Fulfilled order. */ order?: Order; } export interface CountOrdersRequest { /** Count orders only for a specific restaurant location */ restaurantLocationId?: string | null; /** Limit the count only for orders that match the query */ query?: CountOrdersQuery; /** Count orders only for a specific OS location ID */ locationId?: string | null; } export interface CountOrdersQuery { /** Required - filter orders count by status. Supported values: NEW, ACCEPTED */ status?: Status; /** * 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; } export 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; } export interface CountOrdersResponse { /** Number of orders count that match the query */ count?: number; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp. */ 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export 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. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } export interface NotifyOrderEventRequest { /** Order ID. */ _id?: string; /** Metasite id */ msid?: string; /** Notification event type */ eventType?: EventType; } export 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" } export interface Empty { } export interface GetOrderByMsidRequest { /** Order ID. */ _id?: string; /** Metasite id */ msid?: string; /** Controls what data is returned in the response */ fieldMask?: string[]; } export interface GetOrderByMsidResponse { /** Order data. */ order?: Order; } export interface ListOrdersByMsidRequest { /** Controls what data is returned in the response. */ fieldMask?: string[]; /** Order status to filter by. Currently Status Fulfilled is not supported */ status?: Status; /** 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 */ limit?: number | null; /** Metasite id */ msid?: string; } export interface ListOrdersByMsidResponse { /** Order data. */ orders?: Order[]; } export interface NotifyOrderEventResponse { } interface LineItemOptionNonNullableFields { selectedChoices: LineItemNonNullableFields[]; type: DisplayType; } interface CatalogReferenceNonNullableFields { catalogItemId: string; } interface LineItemNonNullableFields { quantity: number; price: string; dishOptions: LineItemOptionNonNullableFields[]; catalogReference?: CatalogReferenceNonNullableFields; } interface DiscountNonNullableFields { catalogDiscountId: string; appliedAmount: string; catalogDiscountType: DiscountType; catalogDiscountName: string; catalogDiscountDescription: string; } interface CouponNonNullableFields { code: string; _id: string; } interface PaymentNonNullableFields { type: PaymentType; } interface ExternalProviderNonNullableFields { _id: string; name: string; } interface DeliveryAddressNonNullableFields { onArrival: OnArrival; } interface DropOffInfoNonNullableFields { contactless: boolean; } interface DeliveryDetailsNonNullableFields { externalProvider?: ExternalProviderNonNullableFields; address?: DeliveryAddressNonNullableFields; dropOffInfo?: DropOffInfoNonNullableFields; } interface CurbsideNonNullableFields { info: string; } interface PickupDetailsNonNullableFields { curbside?: CurbsideNonNullableFields; } interface DineInDetailsNonNullableFields { label: string; value: string; } interface FulfillmentNonNullableFields { deliveryDetails?: DeliveryDetailsNonNullableFields; pickupDetails?: PickupDetailsNonNullableFields; dineInDetails?: DineInDetailsNonNullableFields; type: FulfillmentType; } interface CustomerNonNullableFields { firstName: string; lastName: string; email: string; } interface MoneyNonNullableFields { value: string; currency: string; } interface ServiceFeeNonNullableFields { ruleId: string; name: string; fee?: MoneyNonNullableFields; tax?: MoneyNonNullableFields; } interface TotalsNonNullableFields { subtotal: string; total: string; quantity: number; serviceFees: ServiceFeeNonNullableFields[]; } interface ChannelInfoNonNullableFields { type: Type; } interface ErrorNonNullableFields { code: string; message: string; } interface PosInfoExternalProviderNonNullableFields { _id: string; orderId: string; success: boolean; errors: ErrorNonNullableFields[]; } interface PosInfoNonNullableFields { externalProvider?: PosInfoExternalProviderNonNullableFields; } export interface OrderNonNullableFields { _id: string; restaurantId: string; status: Status; lineItems: LineItemNonNullableFields[]; discounts: DiscountNonNullableFields[]; coupon?: CouponNonNullableFields; payments: PaymentNonNullableFields[]; fulfillment?: FulfillmentNonNullableFields; customer?: CustomerNonNullableFields; totals?: TotalsNonNullableFields; channelInfo?: ChannelInfoNonNullableFields; posInfo?: PosInfoNonNullableFields; } export interface GetOrderResponseNonNullableFields { order?: OrderNonNullableFields; } export interface ListOrdersResponseNonNullableFields { orders: OrderNonNullableFields[]; } export interface AcceptOrderResponseNonNullableFields { order?: OrderNonNullableFields; } export interface CancelOrderResponseNonNullableFields { order?: OrderNonNullableFields; } export interface FulfillOrderResponseNonNullableFields { order?: OrderNonNullableFields; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp. */ 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface OrderCreatedEnvelope { entity: Order; metadata: EventMetadata; } /** * > **Deprecation Notice** * > * > **The Order Created webhook has been replaced with** * > **the [New Order webhook](https://dev.wix.com/api/rest/wix-restaurants/orders/new-order-webhook)** * > **and will be removed on September 30, 2022. If your** * > **app uses this webhook, we recommend updating your** * > **code as soon as possible. * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId WIX_RESTAURANTS.READ_ORDERS * @webhook * @eventType wix.restaurants.v3.order_created * @documentationMaturity preview */ export declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise): void; export interface OrderNewOrderEnvelope { data: NewOrder; metadata: EventMetadata; } /** * Triggered on successful creation of a new order. This means * the order has been validated and the payment has cleared, * and now the site owner can accept or cancel the order. * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId WIX_RESTAURANTS.READ_ORDERS * @webhook * @eventType wix.restaurants.v3.order_new_order * @documentationMaturity preview */ export declare function onOrderNewOrder(handler: (event: OrderNewOrderEnvelope) => void | Promise): void; export interface OrderAcceptedEnvelope { data: OrderAccepted; metadata: EventMetadata; } /** * Triggered when an order is accepted. * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId WIX_RESTAURANTS.READ_ORDERS * @webhook * @eventType wix.restaurants.v3.order_accepted * @documentationMaturity preview */ export declare function onOrderAccepted(handler: (event: OrderAcceptedEnvelope) => void | Promise): void; export interface OrderCanceledEnvelope { data: OrderCanceled; metadata: EventMetadata; } /** * Triggered when an order is canceled. * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId WIX_RESTAURANTS.READ_ORDERS * @webhook * @eventType wix.restaurants.v3.order_canceled * @documentationMaturity preview */ export declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise): void; export interface OrderFulfilledEnvelope { data: OrderFulfilled; metadata: EventMetadata; } /** * Triggered when an order is fulfilled. * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId WIX_RESTAURANTS.READ_ORDERS * @webhook * @eventType wix.restaurants.v3.order_fulfilled * @documentationMaturity preview */ export declare function onOrderFulfilled(handler: (event: OrderFulfilledEnvelope) => void | Promise): void; /** * TEST The `getOrder()` function returns a Promise that is returned when an order is retrieved. * * 1. First do this. * 1. The do that * + This is a bullet * + So is this. * * > **Note**: This indentation is not how our notes generally look but I will waiit to see the branch preview. I am just trying out some markdown here. * * @param _id - ID of the order to retrieve. * @public * @documentationMaturity preview * @requiredField _id * @permissionId WIX_RESTAURANTS.READ_ORDERS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @returns TEST Curious where this shows up. * @fqn com.wixpress.restaurants.orders.v3.OrdersApi.GetOrder */ export declare function getOrder(_id: string, options?: GetOrderOptions): Promise; /** TEST The options for the order. */ export interface GetOrderOptions { /** * 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[]; } /** * Retrieves a list of up to 1000 orders, given the provided filters. * @public * @documentationMaturity preview * @permissionId WIX_RESTAURANTS.READ_ORDERS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.READ-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @fqn com.wixpress.restaurants.orders.v3.OrdersApi.ListOrders */ export declare function listOrders(options?: ListOrdersOptions): Promise; export interface ListOrdersOptions { /** * 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?: Status; /** 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. */ locationIds?: string[]; /** Sorting options. */ sort?: Sort; /** Number of orders to return. The minimum limit is 1, the maximum 1000. */ limit?: number | null; } /** * Changes the order status to `ACCEPTED`. * * > **Note:** It is not possible to change the order status from `FULFILLED` to `ACCEPTED`. * @param _id - ID of the order to mark as `ACCEPTED`. * @public * @documentationMaturity preview * @requiredField _id * @permissionId WIX_RESTAURANTS.MANAGE_ORDERS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @fqn com.wixpress.restaurants.orders.v3.OrdersApi.AcceptOrder */ export declare function acceptOrder(_id: string, options?: AcceptOrderOptions): Promise; export interface AcceptOrderOptions extends AcceptOrderRequestDeliveryTimeOneOf { /** Message when accepting the order. */ message?: string | null; } /** * Changes the order status to `CANCELED`. * @param _id - ID of the order to mark as `CANCELED`. * @public * @documentationMaturity preview * @requiredField _id * @permissionId WIX_RESTAURANTS.MANAGE_ORDERS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @fqn com.wixpress.restaurants.orders.v3.OrdersApi.CancelOrder */ export declare function cancelOrder(_id: string, options?: CancelOrderOptions): Promise; export interface CancelOrderOptions { /** Message when canceling the order. */ message?: string | null; } /** * Changes the order status to `FULFILLED`. * @param _id - ID of the order to mark as `FULFILLED`. * @public * @documentationMaturity preview * @requiredField _id * @permissionId WIX_RESTAURANTS.MANAGE_ORDERS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-RESTAURANTS.MANAGE-ORDERS * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @fqn com.wixpress.restaurants.orders.v3.OrdersApi.FulfillOrder */ export declare function fulfillOrder(_id: string): Promise; export {};