import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface Menu { /** * Menu ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the menu is updated. To prevent conflicting changes, the current revision must be passed when updating the menu. Ignored when creating a menu. * @readonly */ revision?: string | null; /** * Date and time the menu was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the menu was updated. * @readonly */ _updatedDate?: Date | null; /** * Menu name. * @minLength 1 * @maxLength 500 */ name?: string; /** * Menu description. * @maxLength 1500 */ description?: string | null; /** Whether the menu visible to site visitors. */ visible?: boolean | null; /** * Menu section IDs. * @format GUID * @maxSize 100 */ sectionIds?: string[]; /** Extended fields. */ extendedFields?: ExtendedFields; /** * Part of the site URL, that redirects to the menu. For example, in the URL `www.mywebsite.com/our-menus/dinner-menu`, `dinner-menu` is the field value. * @maxLength 500 */ urlQueryParam?: string | null; /** Custom SEO data for the menu. */ seoData?: SeoSchema; /** * ID of the business location ([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)) where this menu is available. * @format GUID * @immutable * @readonly */ businessLocationId?: string | null; } 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>; } /** * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines. * The search engines use this information for ranking purposes, or to display snippets in the search results. * This data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself. */ interface SeoSchema { /** SEO tag information. */ tags?: Tag[]; /** SEO general settings. */ settings?: Settings; } interface Keyword { /** Keyword value. */ term?: string; /** Whether the keyword is the main focus keyword. */ isMain?: boolean; /** * The source that added the keyword terms to the SEO settings. * @maxLength 1000 */ origin?: string | null; } interface Tag { /** * SEO tag type. * * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; /** * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. * For example: `{"name": "description", "content": "the description itself"}`. */ props?: Record | null; /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */ meta?: Record | null; /** SEO tag inner content. For example, ` inner content `. */ children?: string; /** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */ custom?: boolean; /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */ disabled?: boolean; } interface Settings { /** * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. * * * Default: `false` (automatical redirect is enabled). */ preventAutoRedirect?: boolean; /** * User-selected keyword terms for a specific page. * @maxSize 5 */ keywords?: Keyword[]; } interface BusinessLocationDetails { /** * Location name. * @maxLength 150 * @readonly */ name?: string | null; /** * Whether the location is archived. * * Archived locations are hidden and ignored on restaurants site pages, and marked as archived in the dashboard. * @readonly */ archived?: boolean | null; /** * Whether this location is the default location for the business. * @readonly */ default?: boolean | null; } interface ExternalReferenceInfo { /** * ID of the external integrator app\system associated with this object. * @format GUID */ externalAppId?: string | null; /** * Reference to an external resource ID. Used to link this object to a specific entity in an external system. * @maxLength 100 */ externalEntityId?: string | null; /** Last time this menu was synced with the external app. */ lastSyncDate?: Date | null; /** Whether the connection to the external system is currently active. */ connected?: boolean | 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 DeleteOrphanSections { /** Menu id */ menuId?: string; } interface MenusDataCloningCompleted { } interface CreateMenuRequest { /** Menu details. */ menu: Menu; } interface CreateMenuResponse { /** Menu. */ menu?: Menu; } interface BulkCreateMenusRequest { /** * Menu details. * @maxSize 100 */ menus: Menu[]; /** Whether to receive the created menus in the response. */ returnEntity?: boolean; } interface BulkCreateMenusResponse { /** Information about the created menus. */ results?: BulkCreateMenuResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkCreateMenuResult { /** Whether to receive the created menus in the response. */ menuMetadata?: ItemMetadata; /** Created menu. */ menu?: Menu; } 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 GetMenuRequest { /** * Menu ID. * @format GUID */ menuId: string; } interface GetMenuResponse { /** Menu. */ menu?: Menu; } interface ListMenusRequest { /** * Menu IDs. * @format GUID * @maxSize 500 */ menuIds?: string[]; /** The metadata of the paginated results. */ paging?: CursorPaging; /** Whether to return only menus that are visible to site visitors. */ onlyVisible?: boolean | null; } interface CursorPaging { /** * Number of items to load. * @max 500 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface ListMenusResponse { /** Retrieved menus. */ menus?: Menu[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } interface QueryMenusRequest { /** Query options. */ 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"}]` */ 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 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface QueryMenusResponse { /** Retrieved menus. */ menus?: Menu[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface UpdateMenuRequest { /** Menu to update. */ menu: Menu; } interface UpdateMenuResponse { /** Updated menu. */ menu?: Menu; } interface BulkUpdateMenuRequest { /** * Menus to update. * @minSize 1 * @maxSize 100 */ menus: MaskedMenu[]; /** Whether to receive the entity in the response. */ returnEntity?: boolean; } interface MaskedMenu { /** Menu to updated. */ menu?: Menu; /** Explicit list of fields to update. */ mask?: string[]; } interface BulkUpdateMenuResponse { /** * Results of bulk menu update. * @minSize 1 * @maxSize 100 */ results?: BulkMenuResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkMenuResult { /** Metadata for menu update. */ menuMetadata?: ItemMetadata; /** Updated menu. Only returned if `returnEntity` is set to `true`. */ menu?: Menu; } interface UpdateExtendedFieldsRequest { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Namespace of the app. */ namespace?: string; /** Updated extended fields data. */ namespaceData?: Record | null; } interface DeleteMenuRequest { /** * Menu ID. * @format GUID */ menuId: string; } interface DeleteMenuResponse { } interface RunMenusMultiLocationMigrationRequest { /** * business location id * @format GUID */ businessLocationId?: string; } interface RunMenusMultiLocationMigrationResponse { /** Whether menus multi-location migration finished successfully */ success?: boolean; } interface UpdateBusinessLocationIdRequest { /** @format GUID */ menuId?: string; /** @format GUID */ businessLocationId?: string | null; } interface UpdateBusinessLocationIdResponse { } interface CloneMenusRequest { /** * The MetaSiteId to clone from. * @format GUID */ metaSiteId?: string; } interface CloneMenusResponse { } 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 Empty { } interface SyncContentToMultilingualRequest { /** * MetaSite ID * @format GUID */ metaSiteId?: string; } interface SyncContentToMultilingualResponse { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface DuplicateMenuRequest { /** * Menu id to be duplicated. * @format GUID */ _id: string; /** * Business location ids to duplicate the menu to. * @format GUID * @maxSize 100 */ businessLocationIds?: string[] | null; /** Indicates whether sub-entities (such as items) should be duplicated as well. */ duplicateSubEntities?: boolean | null; /** * The new name of the duplicated menu. * @maxLength 500 */ menuName?: string | null; } interface DuplicateMenuResponse { /** @format GUID */ menuIds?: string[]; } interface GetMenuSiteUrlRequest { /** * Menu ID. * @format GUID * @readonly */ _id: string | null; } interface GetMenuSiteUrlResponse { /** Retrieved menuInfo with path url. */ menuSiteUrl?: MenuSiteUrl; } interface MenuSiteUrl { /** * Path URL. * @minLength 1 * @maxLength 1000 */ path?: string; } interface QueryMenusSiteUrlRequest { /** Query options */ query?: CursorQuery; } interface QueryMenusSiteUrlResponse { /** Retrieved menuInfos with path urls. */ menuSiteUrls?: MenuSiteUrl[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } 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 MenuCreatedEnvelope { entity: Menu; metadata: EventMetadata; } /** @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.MENU_READ * @webhook * @eventType wix.restaurants.menus.v1.menu_created * @serviceIdentifier com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu * @slug created * @documentationMaturity preview */ declare function onMenuCreated(handler: (event: MenuCreatedEnvelope) => void | Promise): void; interface MenuDeletedEnvelope { metadata: EventMetadata; } /** * Triggered when a menu is deleted. * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.MENU_READ * @webhook * @eventType wix.restaurants.menus.v1.menu_deleted * @serviceIdentifier com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu * @slug deleted * @documentationMaturity preview */ declare function onMenuDeleted(handler: (event: MenuDeletedEnvelope) => void | Promise): void; interface MenuUpdatedEnvelope { entity: Menu; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.MENU_READ * @webhook * @eventType wix.restaurants.menus.v1.menu_updated * @slug updated * @documentationMaturity preview */ declare function onMenuUpdated(handler: (event: MenuUpdatedEnvelope) => void | Promise): void; /** * > **Note:** The Menus API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Creates a menu. * * To create multiple menus at once, use [Bulk Create Menus](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/menu/bulk-create-menus). * @param menu - Menu details. * @public * @documentationMaturity preview * @requiredField menu * @permissionId RESTAURANTS.MENU_CREATE * @applicableIdentity APP * @returns Menu. * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.CreateMenu */ declare function createMenu(menu: Menu): Promise>; /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Creates multiple menus at once. * @param menus - Menu details. * @public * @documentationMaturity preview * @requiredField menus * @permissionId RESTAURANTS.MENU_CREATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.BulkCreateMenus */ declare function bulkCreateMenus(menus: Menu[], options?: BulkCreateMenusOptions): Promise>; interface BulkCreateMenusOptions { /** Whether to receive the created menus in the response. */ returnEntity?: boolean; } /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Retrieves a menu by ID. * @param menuId - Menu ID. * @public * @documentationMaturity preview * @requiredField menuId * @permissionId RESTAURANTS.MENU_READ * @applicableIdentity APP * @returns Menu. * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.GetMenu */ declare function getMenu(menuId: string): Promise>; /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Retrieves a list of up to 500 menus. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.MENU_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.ListMenus */ declare function listMenus(options?: ListMenusOptions): Promise>; interface ListMenusOptions { /** * Menu IDs. * @format GUID * @maxSize 500 */ menuIds?: string[]; /** The metadata of the paginated results. */ paging?: CursorPaging; /** Whether to return only menus that are visible to site visitors. */ onlyVisible?: boolean | null; } /** * Creates a query to retrieve a list of menus. * * The `queryMenus()` function builds a query to retrieve a list of menus and returns a `MenusQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the [`find()`](/menus/menus-query-builder/find) function. * * You can refine the query by chaining `MenusQueryBuilder` functions onto the query. `MenusQueryBuilder` functions enable you to filter, sort, and control the results that `queryMenus()` returns. * * `queryMenus()` runs with the following `MenusQueryBuilder` defaults, which you can override: * * * [`limit(100)`](/menus/menus-query-builder/limit) * * The following `MenusQueryBuilder` functions are supported for `queryMenus()`. For a full description of the menu object, see the object returned for the [`items`](/menus/menus-query-result/items) property in `MenusQueryResult`. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.MENU_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.QueryMenus */ declare function queryMenus(): MenusQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface MenusQueryResult extends QueryCursorResult { items: Menu[]; query: MenusQueryBuilder; next: () => Promise; prev: () => Promise; } interface MenusQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'urlQueryParam', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'urlQueryParam', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'name' | 'description' | 'urlQueryParam', value: string) => MenusQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: string, value: any[]) => MenusQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'name' | 'description' | 'urlQueryParam', value: any) => MenusQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'name' | 'description' | 'urlQueryParam'>) => MenusQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'name' | 'description' | 'urlQueryParam'>) => MenusQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => MenusQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => MenusQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.QueryMenus * @requiredField query */ declare function typedQueryMenus(query: MenuQuery): Promise>; interface MenuQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['_id']; operators: ['$eq', '$in', '$ne', '$nin']; sort: 'NONE'; }, { fields: ['sectionIds']; operators: ['$hasSome']; sort: 'NONE'; }, { fields: ['description', 'name', 'urlQueryParam']; operators: ['$eq', '$in', '$ne', '$nin', '$startsWith']; sort: 'BOTH'; }, { fields: ['_createdDate', '_updatedDate']; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'BOTH'; }, { fields: ['visible']; operators: ['$eq', '$ne']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type MenuQuery = { /** 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?: { /** Number of items to load. @max: 500 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. */ 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"}]` */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ 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; }; }; /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Updates a menu. * * To update multiple menus at once, use [Bulk Update Menu](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/menu/bulk-update-menu). * * Each time a menu is updated, its revision increments by 1. The existing revision must be included when updating a menu. This ensures you're working with the latest menu information, and it prevents unintended overwrites. * @param _id - Menu ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField menu * @requiredField menu.revision * @permissionId RESTAURANTS.MENU_UPDATE * @applicableIdentity APP * @returns Updated menu. * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.UpdateMenu */ declare function updateMenu(_id: string, menu: NonNullablePaths): Promise>; interface UpdateMenu { /** * Menu ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the menu is updated. To prevent conflicting changes, the current revision must be passed when updating the menu. Ignored when creating a menu. * @readonly */ revision?: string | null; /** * Date and time the menu was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the menu was updated. * @readonly */ _updatedDate?: Date | null; /** * Menu name. * @minLength 1 * @maxLength 500 */ name?: string; /** * Menu description. * @maxLength 1500 */ description?: string | null; /** Whether the menu visible to site visitors. */ visible?: boolean | null; /** * Menu section IDs. * @format GUID * @maxSize 100 */ sectionIds?: string[]; /** Extended fields. */ extendedFields?: ExtendedFields; /** * Part of the site URL, that redirects to the menu. For example, in the URL `www.mywebsite.com/our-menus/dinner-menu`, `dinner-menu` is the field value. * @maxLength 500 */ urlQueryParam?: string | null; /** Custom SEO data for the menu. */ seoData?: SeoSchema; /** * ID of the business location ([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)) where this menu is available. * @format GUID * @immutable * @readonly */ businessLocationId?: string | null; } /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Updates multiple menus at once. * * Each time a menu is updated, its revision increments by 1. The existing revision must be included when updating the menu. This ensures you're working with the latest menu information, and it prevents unintended overwrites. * @param menus - Menus to update. * @public * @documentationMaturity preview * @requiredField menus * @requiredField menus.menu._id * @requiredField menus.menu.revision * @permissionId RESTAURANTS.MENU_UPDATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.BulkUpdateMenu */ declare function bulkUpdateMenu(menus: NonNullablePaths[], options?: BulkUpdateMenuOptions): Promise>; interface BulkUpdateMenuOptions { /** Whether to receive the entity in the response. */ returnEntity?: boolean; } /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Updates only the `extendedFields` field. * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.UpdateExtendedFields */ declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths): Promise>; interface UpdateExtendedFieldsOptions { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } /** * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Deletes a menu. * @param menuId - Menu ID. * @public * @documentationMaturity preview * @requiredField menuId * @permissionId RESTAURANTS.MENU_DELETE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.DeleteMenu */ declare function deleteMenu(menuId: string): Promise; /** @param _id - Menu id to be duplicated. * @public * @documentationMaturity preview * @requiredField _id * @permissionId RESTAURANTS.MENU_CREATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu */ declare function duplicateMenu(_id: string, options?: DuplicateMenuOptions): Promise>; interface DuplicateMenuOptions { /** * Business location ids to duplicate the menu to. * @format GUID * @maxSize 100 */ businessLocationIds?: string[] | null; /** Indicates whether sub-entities (such as items) should be duplicated as well. */ duplicateSubEntities?: boolean | null; /** * The new name of the duplicated menu. * @maxLength 500 */ menuName?: string | null; } /** * Get menu details and path URL by menu ID. * @param _id - Menu ID. * @public * @documentationMaturity preview * @requiredField _id * @permissionId RESTAURANTS.MENU_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.GetMenuSiteUrl */ declare function getMenuSiteUrl(_id: string): Promise>; /** * Query menu details and path URL * @public * @documentationMaturity preview * @permissionId RESTAURANTS.MENU_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.QueryMenusSiteUrl */ declare function queryMenusSiteUrl(options?: QueryMenusSiteUrlOptions): Promise>; interface QueryMenusSiteUrlOptions { /** Query options */ query?: CursorQuery; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateMenuResult, type BulkCreateMenusOptions, type BulkCreateMenusRequest, type BulkCreateMenusResponse, type BulkMenuResult, type BulkUpdateMenuOptions, type BulkUpdateMenuRequest, type BulkUpdateMenuResponse, type BusinessLocationDetails, type CloneMenusRequest, type CloneMenusResponse, type CommonQueryWithEntityContext, type CreateMenuRequest, type CreateMenuResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type DeleteMenuRequest, type DeleteMenuResponse, type DeleteOrphanSections, type DomainEvent, type DomainEventBodyOneOf, type DuplicateMenuOptions, type DuplicateMenuRequest, type DuplicateMenuResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReferenceInfo, type File, type GetMenuRequest, type GetMenuResponse, type GetMenuSiteUrlRequest, type GetMenuSiteUrlResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type Keyword, type ListMenusOptions, type ListMenusRequest, type ListMenusResponse, type MaskedMenu, type Menu, type MenuCreatedEnvelope, type MenuDeletedEnvelope, type MenuQuery, type MenuQuerySpec, type MenuSiteUrl, type MenuUpdatedEnvelope, type MenusDataCloningCompleted, type MenusQueryBuilder, type MenusQueryResult, type MessageEnvelope, type Page, type Pages, type QueryMenusRequest, type QueryMenusResponse, type QueryMenusSiteUrlOptions, type QueryMenusSiteUrlRequest, type QueryMenusSiteUrlResponse, type RestoreInfo, type RunMenusMultiLocationMigrationRequest, type RunMenusMultiLocationMigrationResponse, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncContentToMultilingualRequest, type SyncContentToMultilingualResponse, type Tag, type URI, type URIs, type UpdateBusinessLocationIdRequest, type UpdateBusinessLocationIdResponse, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateMenu, type UpdateMenuRequest, type UpdateMenuResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateMenus, bulkUpdateMenu, createMenu, deleteMenu, duplicateMenu, getMenu, getMenuSiteUrl, listMenus, onMenuCreated, onMenuDeleted, onMenuUpdated, queryMenus, queryMenusSiteUrl, typedQueryMenus, updateExtendedFields, updateMenu, utils };