import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** A Fulfillment Method represents a way in which a restaurant can provide orders to its customers. */ interface FulfillmentMethod extends FulfillmentMethodMethodOptionsOneOf { /** Data specific for pickup fulfillment method. */ pickupOptions?: PickupInfo; /** Data specific for delivery fulfillment method. */ deliveryOptions?: DeliveryInfo; /** * Fulfillment method ID. * @format GUID * @readonly */ _id?: string | null; /** * The current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision. * @readonly */ revision?: string | null; /** * Date and time the fulfillment method was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the fulfillment method was last updated. * @readonly */ _updatedDate?: Date | null; /** Type of fulfillment method. */ type?: FulfillmentMethodTypeWithLiterals; /** * Fulfillment method name. * @minLength 1 * @maxLength 30 */ name?: string | null; /** Whether the fulfillment method is enabled. */ enabled?: boolean | null; /** * Fee for using this fulfillment method. * @decimalValue options { maxScale:3 } */ fee?: string | null; /** Availability of this fulfillment method. */ availability?: Availability; /** * Minimum order price to qualify for using this fulfillment method. * @decimalValue options { maxScale:3 } */ minOrderPrice?: string | null; /** * Business location ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of the operation this fulfillment method belongs to. * @format GUID * @readonly */ businessLocationId?: string | null; /** Extended fields. */ extendedFields?: ExtendedFields; /** Tags used to classify and sort different types of fulfillment methods. */ tags?: Tags; } /** @oneof */ interface FulfillmentMethodMethodOptionsOneOf { /** Data specific for pickup fulfillment method. */ pickupOptions?: PickupInfo; /** Data specific for delivery fulfillment method. */ deliveryOptions?: DeliveryInfo; } declare enum FulfillmentMethodType { /** Unknown fulfillment type. */ UNKNOWN_FULFILLMENT_TYPE = "UNKNOWN_FULFILLMENT_TYPE", /** The customer must pick up the order from the restaurant. */ PICKUP = "PICKUP", /** The restaurant, or someone on behalf of the restaurant, must deliver the order to the customer. */ DELIVERY = "DELIVERY" } /** @enumType */ type FulfillmentMethodTypeWithLiterals = FulfillmentMethodType | 'UNKNOWN_FULFILLMENT_TYPE' | 'PICKUP' | 'DELIVERY'; interface PickupInfo { /** * Instructions for the pickup. * @maxLength 250 */ instructions?: string | null; /** * Pickup address. * * This is set to the address of the restaurant. * @readonly */ address?: CommonAddress; } /** Physical address */ interface CommonAddress extends CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine1?: string | null; /** * Country code. * @format COUNTRY */ country?: 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; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; /** A string containing the full address of this location. */ formatted?: string | null; /** Free text to help find the address. */ hint?: string | null; /** Coordinates of the physical address. */ location?: AddressLocation; /** Country full name. */ countryFullname?: string | null; /** Subdivision full name. */ subdivisionFullname?: string | null; /** * Multi-level subdivisions from top to bottom. * @maxSize 6 */ subdivisions?: Subdivision[]; } /** @oneof */ interface CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; /** Apartment number. */ apt?: string; /** Optional address line 1 */ formattedAddressLine?: string | null; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface Subdivision { /** Short subdivision code. */ code?: string; /** Subdivision full name. */ name?: string; } declare enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** @enumType */ type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY'; interface DeliveryInfo { /** Estimated delivery time in minutes. */ deliveryTimeInMinutes?: number | null; /** * Threshold for offering free delivery. * If the order price exceeds this threshold, the delivery fee is waived. * @decimalValue options { maxScale:3 } */ freeDeliveryThreshold?: string | null; /** Delivery area supported by this delivery fulfillment method. */ deliveryArea?: DeliveryArea; /** * Delivery provider app id. * @format GUID * @readonly */ deliveryProviderAppId?: string | null; /** * Pickup instructions for couriers. * @maxLength 250 */ courierPickupInstructions?: string | null; } interface DeliveryArea extends DeliveryAreaAreaOptionsOneOf { /** Settings for a radius delivery area. */ radiusOptions?: Radius; /** Settings for a postal code delivery area. */ postalCodeOptions?: PostalCode; /** Settings for a custom delivery area. */ customOptions?: CustomArea; /** Type of delivery area. */ type?: TypeWithLiterals; } /** @oneof */ interface DeliveryAreaAreaOptionsOneOf { /** Settings for a radius delivery area. */ radiusOptions?: Radius; /** Settings for a postal code delivery area. */ postalCodeOptions?: PostalCode; /** Settings for a custom delivery area. */ customOptions?: CustomArea; } declare enum Type { /** Unknown delivery area type. */ UNKNOWN_DELIVERY_AREA = "UNKNOWN_DELIVERY_AREA", /** Delivery area defined by a radius around the restaurant's address. */ RADIUS = "RADIUS", /** Delivery area defined by a list of postal codes. */ POSTAL_CODE = "POSTAL_CODE", /** Delivery area defined by a custom polygon. */ CUSTOM = "CUSTOM", /** Delivery area that is determined by the provider. Setting this option, you must also provide `delivery_provider_app_id`. */ PROVIDER_DEFINED = "PROVIDER_DEFINED" } /** @enumType */ type TypeWithLiterals = Type | 'UNKNOWN_DELIVERY_AREA' | 'RADIUS' | 'POSTAL_CODE' | 'CUSTOM' | 'PROVIDER_DEFINED'; interface Radius { /** * Minimum distance value. * The unit of the radius is specified in the `unit` field. * @decimalValue options { gte:0, lte:10000, maxScale:3 } */ minDistance?: string | null; /** * Maximum distance value. * The unit of the radius is specified in the `unit` field. * @decimalValue options { gte:0, lte:10000, maxScale:3 } */ maxDistance?: string | null; /** * Address at the center of the circle. * @readonly */ centerPointAddress?: CommonAddress; /** Unit of measurement of the radius. */ unit?: UnitWithLiterals; } declare enum Unit { /** Unknown unit. */ UNKNOWN_UNIT = "UNKNOWN_UNIT", /** Miles. */ MILES = "MILES", /** Kilometers. */ KILOMETERS = "KILOMETERS" } /** @enumType */ type UnitWithLiterals = Unit | 'UNKNOWN_UNIT' | 'MILES' | 'KILOMETERS'; interface PostalCode { /** * Country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * @format COUNTRY * @readonly */ countryCode?: string | null; /** * List of postal codes and postal code regexes. For example, `10001`, `10002` or `1000*`. * A postal code regex will enable you to define a range of postal codes using an asterisk (*). * For example, to include the postal codes in the range of `10001`-`10009`, use `1000*`. * @maxLength 20 * @minLength 1 * @maxSize 100 */ postalCodes?: string[] | null; } interface CustomArea { /** Geocodes of the polygon defining the delivery area. */ geocodes?: AddressLocation[]; } interface Availability { /** A list of availability times for the days of the week. */ availableTimes?: DayOfWeekAvailability[]; /** * The timezone in which the availability times are given. * @readonly */ timeZone?: string | null; } interface DayOfWeekAvailability { /** The day of week this availability relates to. */ dayOfWeek?: EntitiesDayOfWeekWithLiterals; /** A list of time ranges during which the fulfillment should be available. */ timeRanges?: TimeOfDayRange[]; } declare enum EntitiesDayOfWeek { /** Monday. */ MON = "MON", /** Tuesday. */ TUE = "TUE", /** Wednesday. */ WED = "WED", /** Thursday. */ THU = "THU", /** Friday. */ FRI = "FRI", /** Saturday. */ SAT = "SAT", /** Sunday. */ SUN = "SUN" } /** @enumType */ type EntitiesDayOfWeekWithLiterals = EntitiesDayOfWeek | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN'; interface TimeOfDayRange { /** The start time in time of day representation. */ startTime?: TimeOfDay; /** The end time in time of day representation. */ endTime?: TimeOfDay; } interface TimeOfDay { /** * Hours.
* Min: `0`.
* Max: `23`. */ hours?: number; /** * Minutes.
* Min: `0`.
* Max: `23`. */ minutes?: number; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } 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 { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } 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 DineInInfo extends DineInInfoAdditionalInfoLabelOptionsOneOf { /** Options for AdditionalInfoLabel. Required when `type` is `CUSTOM`. */ customOptions?: CustomConfig; /** * Instructions for dine-in orders. * @maxLength 250 */ customerInstructions?: string | null; /** * Label for an additional information field shown to customers when placing a dine-in order. * Use this when you want to collect optional details (e.g., "Table number", "Room number"). * If no additional information is needed, leave this field empty. * Defines how customers provide information about their seating place when placing a dine-in order. * This determines whether customers need to specify their seating place and how they input it. */ additionalInfoLabel?: AdditionalInfoLabelWithLiterals; /** * Dine-in address. This is the restaurant's address. * @readonly */ address?: CommonAddress; } /** @oneof */ interface DineInInfoAdditionalInfoLabelOptionsOneOf { /** Options for AdditionalInfoLabel. Required when `type` is `CUSTOM`. */ customOptions?: CustomConfig; } declare enum AdditionalInfoLabel { /** No identification required. Customers don't need to specify their seating place. */ NO_ADDITIONAL_INFO_LABEL = "NO_ADDITIONAL_INFO_LABEL", /** Customers select their table number from a predefined list of tables available in the restaurant. */ TABLE_NUMBER = "TABLE_NUMBER", /** Customers select their table number from a predefined list of tables available in the restaurant. */ ROOM_NUMBER = "ROOM_NUMBER", /** Customers can enter any custom text or number to identify their seating place (e.g. booth, area, room, etc.). */ CUSTOM = "CUSTOM" } /** @enumType */ type AdditionalInfoLabelWithLiterals = AdditionalInfoLabel | 'NO_ADDITIONAL_INFO_LABEL' | 'TABLE_NUMBER' | 'ROOM_NUMBER' | 'CUSTOM'; interface CustomConfig { /** @maxLength 40 */ customInfo?: string | null; } interface InvalidateCache extends InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; /** * tell us why you're invalidating the cache. You don't need to add your app name * @maxLength 256 */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; /** * Optional caller-provided ID for tracking this invalidation through the system. * When set, the corresponding CDN purge completion event will include this ID, * allowing you to confirm when the invalidation has fully propagated. * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event. * @maxLength 256 */ correlationId?: string | null; } /** @oneof */ interface InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; } interface App { /** * The AppDefId * @minLength 1 */ appDefId?: string; /** * The instance Id * @format GUID */ instanceId?: string; } interface Page { /** * the msid the page is on * @format GUID */ metaSiteId?: string; /** * Invalidate by Page ID * @minLength 1 */ pageId?: string; } interface URI { /** * the msid the URI is on * @format GUID */ metaSiteId?: string; /** * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes * @minLength 1 */ uriPath?: string; } interface File { /** * the msid the file is related to * @format GUID */ metaSiteId?: string; /** * Invalidate by filename (for media files such as PDFs) * @minLength 1 * @maxLength 256 */ fileName?: string; } interface CustomTag { /** * the msid the tag is related to * @format GUID */ metaSiteId?: string; /** * Tag to invalidate by * @minLength 1 * @maxLength 256 */ tag?: string; } interface Pages { /** * the msid the pages are on * @format GUID */ metaSiteId?: string; /** * Invalidate by multiple Page IDs in a single message * @maxSize 100 * @minLength 1 */ pageIds?: string[]; } interface URIs { /** * the msid the URIs are on * @format GUID */ metaSiteId?: string; /** * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes * @maxSize 100 * @minLength 1 */ uriPaths?: string[]; } interface CreateFulfillmentMethodRequest { /** Fulfillment method to create. */ fulfillmentMethod: FulfillmentMethod; } interface CreateFulfillmentMethodResponse { /** The created fulfillment method. */ fulfillmentMethod?: FulfillmentMethod; } interface BulkCreateFulfillmentMethodsRequest { /** * Fulfillment methods to create. * @maxSize 100 */ fulfillmentMethods?: FulfillmentMethod[]; /** If true, the created entities will be returned. */ returnEntity?: boolean; } interface BulkCreateFulfillmentMethodsResponse { /** Information about the created fulfillment method. */ results?: BulkCreateFulfillmentMethodResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkCreateFulfillmentMethodResult { /** Metadata for fulfillment method creation. */ itemMetadata?: ItemMetadata; /** Created fulfillment method. */ fulfillmentMethod?: FulfillmentMethod; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GetFulfillmentMethodRequest { /** * The ID of the fulfillment method to retrieve. * @format GUID */ fulfillmentMethodId: string; } interface GetFulfillmentMethodResponse { /** The retrieved fulfillment method. */ fulfillmentMethod?: FulfillmentMethod; } interface UpdateFulfillmentMethodRequest { /** * Fulfillment method to update. * The fulfillment method update may be partial with the use of `field_mask`. */ fulfillmentMethod: FulfillmentMethod; } interface UpdateFulfillmentMethodResponse { /** The updated fulfillment method. */ fulfillmentMethod?: FulfillmentMethod; } interface DeleteFulfillmentMethodRequest { /** * The ID of the fulfillment method to delete. * @format GUID */ fulfillmentMethodId: string; } interface DeleteFulfillmentMethodResponse { } interface QueryFulfillmentMethodsRequest { /** The query by which to select fulfillment methods. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 4 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 64 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; 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 QueryFulfillmentMethodsResponse { /** The retrieved fulfillment methods. */ fulfillmentMethods?: FulfillmentMethod[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } 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 ListFulfillmentMethodsRequest { /** Cursor paging */ cursorPaging?: CursorPaging; } interface ListFulfillmentMethodsResponse { /** The retrieved fulfillment methods. */ fulfillmentMethods?: FulfillmentMethod[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface ListAvailableFulfillmentMethodsForAddressRequest { /** The address by which to filter delivery fulfillment methods. */ address?: CommonAddress; /** Cursor paging */ cursorPaging?: CursorPaging; /** * If provided, only fulfillment methods with the given IDs will be returned. * @format GUID * @maxSize 500 */ fulfillmentMethodIds?: string[]; } interface ListAvailableFulfillmentMethodsForAddressResponse { /** The retrieved fulfillment methods. */ fulfillmentMethods?: FulfillmentMethod[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface ListActiveFulfillmentMethodsRequest { /** * Only fulfillment methods with the given IDs will be returned. * @format GUID * @maxSize 500 */ fulfillmentMethodIds?: string[]; /** Cursor paging */ cursorPaging?: CursorPaging; } interface ListActiveFulfillmentMethodsResponse { /** The enabled fulfillment methods. */ fulfillmentMethods?: FulfillmentMethod[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface GetAccumulatedFulfillmentMethodsAvailabilityRequest { /** * fulfillment method ids to check availability for. * @format GUID * @maxSize 500 */ fulfillmentMethodIds?: string[]; } interface GetAccumulatedFulfillmentMethodsAvailabilityResponse { /** The accumulated availability of all fulfillment methods. */ availability?: Availability; /** Fulfillment methods types that accumulate availability. */ types?: FulfillmentMethodTypeWithLiterals[]; } interface GetCombinedMethodAvailabilityRequest { /** * IDs of fulfillment methods used to determine the combined availability. * @format GUID * @maxSize 500 */ fulfillmentMethodIds: string[]; } interface GetCombinedMethodAvailabilityResponse { /** The combined availability of the given fulfillment methods. */ combinedAvailability?: Availability; /** * Types of fulfillment methods available during at least some the combined availability's `availableTimes`. * @maxSize 100 */ fulfillmentTypes?: FulfillmentMethodTypeWithLiterals[]; } interface GetAggregatedMethodAvailabilityRequest { /** * IDs of fulfillment methods used to determine the aggregated availability. * @format GUID * @maxSize 500 */ fulfillmentMethodIds: string[]; } interface GetAggregatedMethodAvailabilityResponse { /** The aggregated availability of the given fulfillment methods. */ aggregatedAvailability?: Availability; /** * Types of fulfillment methods available during at least some the aggregated availability's `availableTimes`. * @maxSize 100 */ fulfillmentTypes?: FulfillmentMethodTypeWithLiterals[]; } interface BulkUpdateFulfillmentMethodTagsRequest { /** * IDs of the fulfillment methods to update tags for. * @minSize 1 * @maxSize 100 * @format GUID */ fulfillmentMethodIds: string[]; /** Tags to assign to the fulfillment methods. */ assignTags?: Tags; /** Tags to unassign from the fulfillment methods. */ unassignTags?: Tags; } interface BulkUpdateFulfillmentMethodTagsResponse { /** * Results of the bulk update. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateFulfillmentMethodTagsResult[]; /** Metadata for the bulk update. */ bulkActionMetadata?: CommonBulkActionMetadata; } interface CommonItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface BulkUpdateFulfillmentMethodTagsResult { /** Metadata for the updated fulfillment method. */ itemMetadata?: CommonItemMetadata; } interface CommonBulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateFulfillmentMethodTagsByFilterRequest { /** Filter that determines which fulfillment methods to update tags for. */ filter: Record | null; /** Tags to assign to the fulfillment methods. */ assignTags?: Tags; /** Tags to unassign from the fulfillment methods. */ unassignTags?: Tags; } interface BulkUpdateFulfillmentMethodTagsByFilterResponse { /** * Job ID. Pass this ID to Get Async Job ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/get-async-job) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job)) to track the job's status. * @format GUID */ jobId?: string; } /** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */ interface SitePropertiesNotification { /** The site ID for which this update notification applies. */ metasiteId?: string; /** The actual update event. */ event?: SitePropertiesEvent; /** * A convenience set of mappings from the MetaSite ID to its constituent services. * @maxSize 500 */ translations?: Translation[]; /** Context of the notification */ changeContext?: ChangeContext; } /** The actual update event for a particular notification. */ interface SitePropertiesEvent { /** Version of the site's properties represented by this update. */ version?: number; /** Set of properties that were updated - corresponds to the fields in "properties". */ fields?: string[]; /** Updated properties. */ properties?: Properties; } interface Properties { /** Site categories. */ categories?: Categories; /** Site locale. */ locale?: Locale; /** * Site language. * * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string | null; /** * Site currency format used to bill customers. * * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ paymentCurrency?: string | null; /** Timezone in `America/New_York` format. */ timeZone?: string | null; /** Email address. */ email?: string | null; /** Phone number. */ phone?: string | null; /** Fax number. */ fax?: string | null; /** Address. */ address?: Address; /** Site display name. */ siteDisplayName?: string | null; /** Business name. */ businessName?: string | null; /** Path to the site's logo in Wix Media (without Wix Media base URL). */ logo?: string | null; /** Site description. */ description?: string | null; /** * Business schedule. Regular and exceptional time periods when the business is open or the service is available. * * __Note:__ Not supported by Wix Bookings. */ businessSchedule?: BusinessSchedule; /** Supported languages of a site and the primary language. */ multilingual?: Multilingual; /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */ consentPolicy?: ConsentPolicy; /** * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`. * * Site business type. */ businessConfig?: string | null; /** External site URL that uses Wix as its headless business solution. */ externalSiteUrl?: string | null; /** Track clicks analytics. */ trackClicksAnalytics?: boolean; /** * Company ID issued to the business by local authorities. Appears on invoices and price quotes. * @maxLength 50 */ companyId?: string | null; } interface Categories { /** Primary site category. */ primary?: string; /** * Secondary site category. * @maxSize 50 */ secondary?: string[]; /** Business Term Id */ businessTermId?: string | null; } interface Locale { /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ languageCode?: string; /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */ country?: string; } interface Address { /** Street name. */ street?: string; /** City name. */ city?: string; /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** State. */ state?: string; /** * Zip or postal code. * @maxLength 20 */ zip?: string; /** Extra information to be displayed in the address. */ hint?: AddressHint; /** Whether this address represents a physical location. */ isPhysical?: boolean; /** Google-formatted version of this address. */ googleFormattedAddress?: string; /** Street number. */ streetNumber?: string; /** Apartment number. */ apartmentNumber?: string; /** Geographic coordinates of location. */ coordinates?: GeoCoordinates; } /** * Extra information on displayed addresses. * This is used for display purposes. Used to add additional data about the address, such as "In the passage". * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string. */ interface AddressHint { /** Extra text displayed next to, or instead of, the actual address. */ text?: string; /** Where the extra text should be displayed. */ placement?: PlacementTypeWithLiterals; } /** Where the extra text should be displayed: before, after or instead of the actual address. */ declare enum PlacementType { BEFORE = "BEFORE", AFTER = "AFTER", REPLACE = "REPLACE" } /** @enumType */ type PlacementTypeWithLiterals = PlacementType | 'BEFORE' | 'AFTER' | 'REPLACE'; /** Geocoordinates for a particular address. */ interface GeoCoordinates { /** Latitude of the location. Must be between -90 and 90. */ latitude?: number; /** Longitude of the location. Must be between -180 and 180. */ longitude?: number; } /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */ interface BusinessSchedule { /** * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. * @maxSize 100 */ periods?: TimePeriod[]; /** * Exceptions to the business's regular hours. The business can be open or closed during the exception. * @maxSize 100 */ specialHourPeriod?: SpecialHourPeriod[]; } /** Weekly recurring time periods when the business is regularly open or the service is available. */ interface TimePeriod { /** Day of the week the period starts on. */ openDay?: DayOfWeekWithLiterals; /** * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents * midnight at the end of the specified day. */ openTime?: string; /** Day of the week the period ends on. */ closeDay?: DayOfWeekWithLiterals; /** * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents * midnight at the end of the specified day. * * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`. */ closeTime?: string; } /** Enumerates the days of the week. */ declare enum DayOfWeek { MONDAY = "MONDAY", TUESDAY = "TUESDAY", WEDNESDAY = "WEDNESDAY", THURSDAY = "THURSDAY", FRIDAY = "FRIDAY", SATURDAY = "SATURDAY", SUNDAY = "SUNDAY" } /** @enumType */ type DayOfWeekWithLiterals = DayOfWeek | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY'; /** Exception to the business's regular hours. The business can be open or closed during the exception. */ interface SpecialHourPeriod { /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */ startDate?: string; /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */ endDate?: string; /** * Whether the business is closed (or the service is not available) during the exception. * * Default: `true`. */ isClosed?: boolean; /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */ comment?: string; } interface Multilingual { /** * Supported languages list. * @maxSize 200 */ supportedLanguages?: SupportedLanguage[]; /** Whether to redirect to user language. */ autoRedirect?: boolean; } interface SupportedLanguage { /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ languageCode?: string; /** Locale. */ locale?: Locale; /** Whether the supported language is the primary language for the site. */ isPrimary?: boolean; /** Language icon. */ countryCode?: string; /** How the language will be resolved. For internal use. */ resolutionMethod?: ResolutionMethodWithLiterals; /** Whether the supported language is the primary language for site visitors. */ isVisitorPrimary?: boolean | null; } declare enum ResolutionMethod { QUERY_PARAM = "QUERY_PARAM", SUBDOMAIN = "SUBDOMAIN", SUBDIRECTORY = "SUBDIRECTORY" } /** @enumType */ type ResolutionMethodWithLiterals = ResolutionMethod | 'QUERY_PARAM' | 'SUBDOMAIN' | 'SUBDIRECTORY'; interface ConsentPolicy { /** Whether the site uses cookies that are essential to site operation. Always `true`. */ essential?: boolean | null; /** Whether the site uses cookies that affect site performance and other functional measurements. */ functional?: boolean | null; /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */ analytics?: boolean | null; /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */ advertising?: boolean | null; /** CCPA compliance flag. */ dataToThirdParty?: boolean | null; } /** A single mapping from the MetaSite ID to a particular service. */ interface Translation { /** The service type. */ serviceType?: string; /** The application definition ID; this only applies to services of type ThirdPartyApps. */ appDefId?: string; /** The instance ID of the service. */ instanceId?: string; } interface ChangeContext extends ChangeContextPayloadOneOf { /** Properties were updated. */ propertiesChange?: PropertiesChange; /** Default properties were created on site creation. */ siteCreated?: SiteCreated; /** Properties were cloned on site cloning. */ siteCloned?: SiteCloned; } /** @oneof */ interface ChangeContextPayloadOneOf { /** Properties were updated. */ propertiesChange?: PropertiesChange; /** Default properties were created on site creation. */ siteCreated?: SiteCreated; /** Properties were cloned on site cloning. */ siteCloned?: SiteCloned; } interface PropertiesChange { } interface SiteCreated { /** Origin template site id. */ originTemplateId?: string | null; } interface SiteCloned { /** Origin site id. */ originMetaSiteId?: string; } interface Empty { } 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; } /** @docsIgnore */ type BulkUpdateFulfillmentMethodTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateFulfillmentMethodTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** 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; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface FulfillmentMethodCreatedEnvelope { entity: FulfillmentMethod; metadata: EventMetadata; } /** @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @webhook * @eventType wix.restaurants.v1.fulfillment_method_created * @slug created * @documentationMaturity preview */ declare function onFulfillmentMethodCreated(handler: (event: FulfillmentMethodCreatedEnvelope) => void | Promise): void; interface FulfillmentMethodDeletedEnvelope { metadata: EventMetadata; } /** * Triggered when a fulfillment method is deleted. * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @webhook * @eventType wix.restaurants.v1.fulfillment_method_deleted * @serviceIdentifier wix.restaurants.fulfillment.v1.FulfillmentMethodsService * @slug deleted * @documentationMaturity preview */ declare function onFulfillmentMethodDeleted(handler: (event: FulfillmentMethodDeletedEnvelope) => void | Promise): void; interface FulfillmentMethodUpdatedEnvelope { entity: FulfillmentMethod; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a fulfillment method is updated. * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @webhook * @eventType wix.restaurants.v1.fulfillment_method_updated * @serviceIdentifier wix.restaurants.fulfillment.v1.FulfillmentMethodsService * @slug updated * @documentationMaturity preview */ declare function onFulfillmentMethodUpdated(handler: (event: FulfillmentMethodUpdatedEnvelope) => void | Promise): void; /** * Creates a new fulfillment method. * * >**Note:** `fulfillmentMethod.availability.time_zone` uses the time zone specified in the [`language and regions`](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/language-and-region) settings in the dashboard, regardless of the value provided. * @param fulfillmentMethod - Fulfillment method to create. * @public * @documentationMaturity preview * @requiredField fulfillmentMethod * @requiredField fulfillmentMethod.methodOptions * @requiredField fulfillmentMethod.methodOptions.deliveryOptions.deliveryArea * @requiredField fulfillmentMethod.methodOptions.deliveryOptions.deliveryArea.radiusOptions.maxDistance * @permissionId RESTAURANTS.FULFILLMENT_METHOD_CREATE * @applicableIdentity APP * @returns The created fulfillment method. * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.CreateFulfillmentMethod */ declare function createFulfillmentMethod(fulfillmentMethod: NonNullablePaths): Promise>; /** * Create multiple fulfillment methods at once. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.FULFILLMENT_METHOD_CREATE * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.BulkCreateFulfillmentMethods */ declare function bulkCreateFulfillmentMethods(options?: BulkCreateFulfillmentMethodsOptions): Promise>; interface BulkCreateFulfillmentMethodsOptions { /** * Fulfillment methods to create. * @maxSize 100 */ fulfillmentMethods?: FulfillmentMethod[]; /** If true, the created entities will be returned. */ returnEntity?: boolean; } /** * Retrieves a fulfillment method. * @param fulfillmentMethodId - The ID of the fulfillment method to retrieve. * @public * @documentationMaturity preview * @requiredField fulfillmentMethodId * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @returns The retrieved fulfillment method. * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetFulfillmentMethod */ declare function getFulfillmentMethod(fulfillmentMethodId: string): Promise>; /** * Updates a fulfillment method. * * Each time the fulfillment method is updated, its revision increments by 1. The existing revision must be included when updating the fulfillment method. This ensures you're working with the latest fulfillment method information, and it prevents unintended overwrites. * @param _id - Fulfillment method ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField fulfillmentMethod * @requiredField fulfillmentMethod.revision * @param fulfillmentMethod - Fulfillment method information to update. * @permissionId RESTAURANTS.FULFILLMENT_METHOD_UPDATE * @applicableIdentity APP * @returns The updated fulfillment method. * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.UpdateFulfillmentMethod */ declare function updateFulfillmentMethod(_id: string, fulfillmentMethod: NonNullablePaths): Promise>; interface UpdateFulfillmentMethod { /** Data specific for pickup fulfillment method. */ pickupOptions?: PickupInfo; /** Data specific for delivery fulfillment method. */ deliveryOptions?: DeliveryInfo; /** * Fulfillment method ID. * @format GUID * @readonly */ _id?: string | null; /** * The current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision. * @readonly */ revision?: string | null; /** * Date and time the fulfillment method was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the fulfillment method was last updated. * @readonly */ _updatedDate?: Date | null; /** Type of fulfillment method. */ type?: FulfillmentMethodTypeWithLiterals; /** * Fulfillment method name. * @minLength 1 * @maxLength 30 */ name?: string | null; /** Whether the fulfillment method is enabled. */ enabled?: boolean | null; /** * Fee for using this fulfillment method. * @decimalValue options { maxScale:3 } */ fee?: string | null; /** Availability of this fulfillment method. */ availability?: Availability; /** * Minimum order price to qualify for using this fulfillment method. * @decimalValue options { maxScale:3 } */ minOrderPrice?: string | null; /** * Business location ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of the operation this fulfillment method belongs to. * @format GUID * @readonly */ businessLocationId?: string | null; /** Extended fields. */ extendedFields?: ExtendedFields; /** Tags used to classify and sort different types of fulfillment methods. */ tags?: Tags; } /** * Deletes a fulfillment method. * @param fulfillmentMethodId - The ID of the fulfillment method to delete. * @public * @documentationMaturity preview * @requiredField fulfillmentMethodId * @permissionId RESTAURANTS.FULFILLMENT_METHOD_DELETE * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.DeleteFulfillmentMethod */ declare function deleteFulfillmentMethod(fulfillmentMethodId: string): Promise; /** * Creates a query to retrieve a list of fulfillment methods. * * The `queryFulfillmentMethods()` function builds a query to retrieve a list of fulfillment methods and returns a `FulfillmentMethodsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the [`find()`](/fulfillment-methods/fulfillment-methods-query-builder/find) function. * * You can refine the query by chaining `FulfillmentMethodsQueryBuilder` functions onto the query. `FulfillmentMethodsQueryBuilder` functions enable you to filter, sort, and control the results that `queryFulfillmentMethods()` returns. * * `queryFulfillmentMethods()` runs with the following `FulfillmentMethodsQueryBuilder` defaults, which you can override: * * * [`limit(50)`](/fulfillment-methods/fulfillment-methods-query-builder/limit) * * [`ascending('entityId')`](/fulfillment-methods/fulfillment-methods-query-builder/ascending) * * The following `FulfillmentMethodsQueryBuilder` functions are supported for `queryFulfillmentMethods()`. For a full description of the fulfillment method object, see the object returned for the [`items`](/fulfillment-methods/fulfillment-methods-query-result/items) property in `FulfillmentMethodsQueryResult`. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.QueryFulfillmentMethods */ declare function queryFulfillmentMethods(options?: QueryFulfillmentMethodsOptions): FulfillmentMethodsQueryBuilder; interface QueryFulfillmentMethodsOptions { } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface FulfillmentMethodsQueryResult extends QueryCursorResult { items: FulfillmentMethod[]; query: FulfillmentMethodsQueryBuilder; next: () => Promise; prev: () => Promise; } interface FulfillmentMethodsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'name' | 'fee' | 'minOrderPrice', value: string) => FulfillmentMethodsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice', value: any[]) => FulfillmentMethodsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice', value: any) => FulfillmentMethodsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice', value: boolean) => FulfillmentMethodsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice'>) => FulfillmentMethodsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'type' | 'name' | 'enabled' | 'fee' | 'minOrderPrice'>) => FulfillmentMethodsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => FulfillmentMethodsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => FulfillmentMethodsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.QueryFulfillmentMethods * @requiredField query */ declare function typedQueryFulfillmentMethods(query: FulfillmentMethodQuery, options?: QueryFulfillmentMethodsOptions): Promise>; interface FulfillmentMethodQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ '_createdDate', '_id', '_updatedDate', 'enabled', 'fee', 'minOrderPrice', 'name', 'type' ]; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type FulfillmentMethodQuery = { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | 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?: NonNullable['cursor'] | null; }; /** Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 4 */ sort?: { /** Name of the field to sort by. @maxLength: 64 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Retrieves a list of up to 100 fulfillment methods. * @public * @documentationMaturity preview * @param options - Options for listing the fulfillment methods. * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.ListFulfillmentMethods */ declare function listFulfillmentMethods(options?: ListFulfillmentMethodsOptions): Promise>; interface ListFulfillmentMethodsOptions { /** Cursor paging */ cursorPaging?: CursorPaging; } /** * Retrieves a list of up to 100 fulfillment methods available for a given address. * * The response will only include: * - Non-delivery fulfillment methods. * - Delivery fulfillment methods that are available to the given address according to their delivery areas. * @public * @documentationMaturity preview * @param options - Options for listing the available fulfillment methods. * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.ListAvailableFulfillmentMethodsForAddress */ declare function listAvailableFulfillmentMethodsForAddress(options?: ListAvailableFulfillmentMethodsForAddressOptions): Promise>; interface ListAvailableFulfillmentMethodsForAddressOptions { /** The address by which to filter delivery fulfillment methods. */ address?: CommonAddress; /** Cursor paging */ cursorPaging?: CursorPaging; /** * If provided, only fulfillment methods with the given IDs will be returned. * @format GUID * @maxSize 500 */ fulfillmentMethodIds?: string[]; } /** * Retrieves the accumulated availability of all fulfillment methods. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetAccumulatedFulfillmentMethodsAvailability * @deprecated * @replacedBy wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetAggregatedMethodAvailability * @targetRemovalDate 2024-09-29 */ declare function getAccumulatedFulfillmentMethodsAvailability(options?: GetAccumulatedFulfillmentMethodsAvailabilityOptions): Promise>; interface GetAccumulatedFulfillmentMethodsAvailabilityOptions { /** * fulfillment method ids to check availability for. * @format GUID * @maxSize 500 */ fulfillmentMethodIds?: string[]; } /** * Retrieves the combined availability of a list of fulfillment methods. * * The combined availability is a list of times during which one or more of the given fulfillment methods is available, and the types of those fulfillment methods. * @param fulfillmentMethodIds - IDs of fulfillment methods used to determine the combined availability. * @public * @documentationMaturity preview * @requiredField fulfillmentMethodIds * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetCombinedMethodAvailability * @deprecated * @replacedBy wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetAggregatedMethodAvailability * @targetRemovalDate 2025-02-10 */ declare function getCombinedMethodAvailability(fulfillmentMethodIds: string[]): Promise>; /** * Retrieves the aggregated availability of a list of fulfillment methods. * * The aggregated availability is a list of times during which one or more of the given fulfillment methods is available, and the types of those fulfillment methods. * @param fulfillmentMethodIds - IDs of fulfillment methods used to determine the aggregated availability. * @public * @documentationMaturity preview * @requiredField fulfillmentMethodIds * @permissionId RESTAURANTS.FULFILLMENT_METHOD_READ * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.GetAggregatedMethodAvailability */ declare function getAggregatedMethodAvailability(fulfillmentMethodIds: string[]): Promise>; /** * Synchronously update tags on multiple fulfillment methods. * If you specify a tag in both `assignTags` and `unassignTags`, it is assigned. * @param fulfillmentMethodIds - IDs of the fulfillment methods to update tags for. * @public * @documentationMaturity preview * @requiredField fulfillmentMethodIds * @permissionId RESTAURANTS.FULFILLMENT_METHOD_UPDATE_TAGS * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.BulkUpdateFulfillmentMethodTags */ declare function bulkUpdateFulfillmentMethodTags(fulfillmentMethodIds: string[], options?: BulkUpdateFulfillmentMethodTagsOptions): Promise & { __applicationErrorsType?: BulkUpdateFulfillmentMethodTagsApplicationErrors; }>; interface BulkUpdateFulfillmentMethodTagsOptions { /** Tags to assign to the fulfillment methods. */ assignTags?: Tags; /** Tags to unassign from the fulfillment methods. */ unassignTags?: Tags; } /** * Asynchronously update tags on multiple fulfillment methods according to the specified filter. * If a filter isn't specified, this method updates all fulfillment methods. * If you specify a tag in both `assignTags` and `unassignTags`, it is assigned. * @param filter - Filter that determines which fulfillment methods to update tags for. * @public * @documentationMaturity preview * @requiredField filter * @permissionId RESTAURANTS.FULFILLMENT_METHOD_UPDATE_TAGS * @applicableIdentity APP * @fqn wix.restaurants.fulfillment.v1.FulfillmentMethodsService.BulkUpdateFulfillmentMethodTagsByFilter */ declare function bulkUpdateFulfillmentMethodTagsByFilter(filter: Record, options?: BulkUpdateFulfillmentMethodTagsByFilterOptions): Promise & { __applicationErrorsType?: BulkUpdateFulfillmentMethodTagsByFilterApplicationErrors; }>; interface BulkUpdateFulfillmentMethodTagsByFilterOptions { /** Tags to assign to the fulfillment methods. */ assignTags?: Tags; /** Tags to unassign from the fulfillment methods. */ unassignTags?: Tags; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, AdditionalInfoLabel, type AdditionalInfoLabelWithLiterals, type Address, type AddressHint, type AddressLocation, type App, type ApplicationError, type Availability, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateFulfillmentMethodResult, type BulkCreateFulfillmentMethodsOptions, type BulkCreateFulfillmentMethodsRequest, type BulkCreateFulfillmentMethodsResponse, type BulkUpdateFulfillmentMethodTagsApplicationErrors, type BulkUpdateFulfillmentMethodTagsByFilterApplicationErrors, type BulkUpdateFulfillmentMethodTagsByFilterOptions, type BulkUpdateFulfillmentMethodTagsByFilterRequest, type BulkUpdateFulfillmentMethodTagsByFilterResponse, type BulkUpdateFulfillmentMethodTagsOptions, type BulkUpdateFulfillmentMethodTagsRequest, type BulkUpdateFulfillmentMethodTagsResponse, type BulkUpdateFulfillmentMethodTagsResult, type BusinessSchedule, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, type CommonAddress, type CommonAddressStreetOneOf, type CommonBulkActionMetadata, type CommonItemMetadata, type CommonQueryWithEntityContext, type ConsentPolicy, type CreateFulfillmentMethodRequest, type CreateFulfillmentMethodResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomArea, type CustomConfig, type CustomTag, DayOfWeek, type DayOfWeekAvailability, type DayOfWeekWithLiterals, type DeleteFulfillmentMethodRequest, type DeleteFulfillmentMethodResponse, type DeliveryArea, type DeliveryAreaAreaOptionsOneOf, type DeliveryInfo, type DineInInfo, type DineInInfoAdditionalInfoLabelOptionsOneOf, type DomainEvent, type DomainEventBodyOneOf, type Empty, EntitiesDayOfWeek, type EntitiesDayOfWeekWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type File, type FulfillmentMethod, type FulfillmentMethodCreatedEnvelope, type FulfillmentMethodDeletedEnvelope, type FulfillmentMethodMethodOptionsOneOf, type FulfillmentMethodQuery, type FulfillmentMethodQuerySpec, FulfillmentMethodType, type FulfillmentMethodTypeWithLiterals, type FulfillmentMethodUpdatedEnvelope, type FulfillmentMethodsQueryBuilder, type FulfillmentMethodsQueryResult, type GeoCoordinates, type GetAccumulatedFulfillmentMethodsAvailabilityOptions, type GetAccumulatedFulfillmentMethodsAvailabilityRequest, type GetAccumulatedFulfillmentMethodsAvailabilityResponse, type GetAggregatedMethodAvailabilityRequest, type GetAggregatedMethodAvailabilityResponse, type GetCombinedMethodAvailabilityRequest, type GetCombinedMethodAvailabilityResponse, type GetFulfillmentMethodRequest, type GetFulfillmentMethodResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type ListActiveFulfillmentMethodsRequest, type ListActiveFulfillmentMethodsResponse, type ListAvailableFulfillmentMethodsForAddressOptions, type ListAvailableFulfillmentMethodsForAddressRequest, type ListAvailableFulfillmentMethodsForAddressResponse, type ListFulfillmentMethodsOptions, type ListFulfillmentMethodsRequest, type ListFulfillmentMethodsResponse, type Locale, type MessageEnvelope, type Multilingual, type Page, type Pages, type PickupInfo, PlacementType, type PlacementTypeWithLiterals, type PostalCode, type Properties, type PropertiesChange, type QueryFulfillmentMethodsOptions, type QueryFulfillmentMethodsRequest, type QueryFulfillmentMethodsResponse, type Radius, ResolutionMethod, type ResolutionMethodWithLiterals, type RestoreInfo, type SiteCloned, type SiteCreated, type SitePropertiesEvent, type SitePropertiesNotification, SortOrder, type SortOrderWithLiterals, type Sorting, type SpecialHourPeriod, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type SupportedLanguage, type TagList, type Tags, type TimeOfDay, type TimeOfDayRange, type TimePeriod, type Translation, Type, type TypeWithLiterals, type URI, type URIs, Unit, type UnitWithLiterals, type UpdateFulfillmentMethod, type UpdateFulfillmentMethodRequest, type UpdateFulfillmentMethodResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateFulfillmentMethods, bulkUpdateFulfillmentMethodTags, bulkUpdateFulfillmentMethodTagsByFilter, createFulfillmentMethod, deleteFulfillmentMethod, getAccumulatedFulfillmentMethodsAvailability, getAggregatedMethodAvailability, getCombinedMethodAvailability, getFulfillmentMethod, listAvailableFulfillmentMethodsForAddress, listFulfillmentMethods, onFulfillmentMethodCreated, onFulfillmentMethodDeleted, onFulfillmentMethodUpdated, queryFulfillmentMethods, typedQueryFulfillmentMethods, updateFulfillmentMethod, utils };