import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface Section { /** * Section ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section. * @readonly */ revision?: string | null; /** * Date and time the section was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the section was updated. * @readonly */ _updatedDate?: Date | null; /** * Section name. * @minLength 1 * @maxLength 500 */ name?: string; /** * Section description. * @maxLength 1500 */ description?: string | null; /** Main section image. */ image?: string; /** * Additional section images. * @maxSize 100 */ additionalImages?: string[]; /** * Item IDs. * @format GUID * @maxSize 300 */ itemIds?: string[]; /** Extended fields. */ extendedFields?: ExtendedFields; /** Whether the section is visible in the menu for site visitors. */ visible?: boolean | null; /** * 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 section is available. * @format GUID * @readonly */ businessLocationId?: string | null; /** @internal */ orderSettings?: OrderSettings; /** * @internal * @readonly * @maxLength 150 */ oloMigrationSectionId?: string | null; /** * References to an external app and resource associated with this object. Used for integration and tracking across different platforms. * @internal */ externalReferenceInfo?: ExternalReferenceInfo; } 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>; } interface OrderSettings { availability?: Availability; } interface Availability extends AvailabilityAvailabilityTypeOptionsOneOf { /** Settings for availability on a weekly schedule. */ weeklyScheduleOptions?: WeeklyScheduleOptions; /** Settings for availability within a time range. */ timestampRangesOptions?: TimestampRangesOptions; /** Availability type. */ type?: AvailabilityTypeWithLiterals; } /** @oneof */ interface AvailabilityAvailabilityTypeOptionsOneOf { /** Settings for availability on a weekly schedule. */ weeklyScheduleOptions?: WeeklyScheduleOptions; /** Settings for availability within a time range. */ timestampRangesOptions?: TimestampRangesOptions; } declare enum AvailabilityType { /** Missing type due to an error. */ UNSPECIFIED_AVAILABILITY_OPTION = "UNSPECIFIED_AVAILABILITY_OPTION", /** Available all the time. */ ALWAYS_AVAILABLE = "ALWAYS_AVAILABLE", /** Available on specific days and times throughout the week. */ WEEKLY_SCHEDULE = "WEEKLY_SCHEDULE", /** Available during a specific time range. */ TIMESTAMP_RANGES = "TIMESTAMP_RANGES" } /** @enumType */ type AvailabilityTypeWithLiterals = AvailabilityType | 'UNSPECIFIED_AVAILABILITY_OPTION' | 'ALWAYS_AVAILABLE' | 'WEEKLY_SCHEDULE' | 'TIMESTAMP_RANGES'; interface WeeklyScheduleOptions { /** * List of available time ranges for specific days of the week. * @maxSize 7 */ availableTimes?: DayOfWeekAvailability[]; } interface DayOfWeekAvailability { /** The day of week this availability relates to. */ dayOfWeek?: DayOfWeekWithLiterals; /** A list of time ranges during which the fulfillment should be available. */ timeRanges?: TimeOfDayRange[]; } declare enum DayOfWeek { /** Monday. */ MON = "MON", /** Tuesday. */ TUE = "TUE", /** Wednesday. */ WED = "WED", /** Thursday. */ THU = "THU", /** Friday. */ FRI = "FRI", /** Saturday. */ SAT = "SAT", /** Sunday. */ SUN = "SUN" } /** @enumType */ type DayOfWeekWithLiterals = DayOfWeek | '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 TimestampRangesOptions { /** * List of available time ranges. * @maxSize 50 */ ranges?: AvailableRange[]; } interface AvailableRange { /** The start time of the availability in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */ startTime?: Date | null; /** The end time of the availability in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */ endTime?: Date | 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 section was synced with the external app. */ lastSyncDate?: Date | null; /** Whether the connection to the external system is currently active. */ connected?: boolean | null; } interface DuplicateSectionRequest { /** * ID of the section to be duplicated. * @format GUID */ _id: string; /** * Business location IDs to assign to the duplicated section or sections. * * If you specify one or more IDs, a duplicate is created for each ID, with that ID in its `businessLocationId` field. * If you don't specify an ID, one duplicate is created with the same `businessLocationId` as the original section. * @format GUID * @maxSize 100 */ businessLocationIds?: string[] | null; /** * Whether to duplicate the section's sub-entities, such as its items. * * Default: `false` */ duplicateSubEntities?: boolean | null; } interface DuplicateSectionResponse { /** * IDs of the newly created sections. * @format GUID */ sectionId?: string[]; } 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 DeleteLocationIdFromItems { /** @format GUID */ businessLocationId?: string; /** * @format GUID * @maxSize 1000 */ itemIds?: string[]; } interface CreateSectionRequest { /** Section details. */ section: Section; } interface CreateSectionResponse { /** Section. */ section?: Section; } interface BulkCreateSectionsRequest { /** * Sections details. * @maxSize 100 */ sections: Section[]; /** Whether to receive the created sections in the response. */ returnEntity?: boolean; } interface BulkCreateSectionsResponse { /** Information about the created sections. */ results?: BulkCreateSectionResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkCreateSectionResult { /** Metadata for created sections. */ itemMetadata?: ItemMetadata; /** Created section. Only returned if `returnEntity` is set to `true`. */ item?: Section; } 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 GetSectionRequest { /** * Section ID. * @format GUID */ sectionId: string; } interface GetSectionResponse { /** Section. */ section?: Section; } interface ListSectionsRequest { /** * Section IDs. * @format GUID * @maxSize 500 */ sectionIds?: string[]; /** The metadata of the paginated results. */ paging?: CursorPaging; /** Whether to return only sections 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 ListSectionsResponse { /** Retrieved sections. */ sections?: Section[]; /** 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 QuerySectionsRequest { /** 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; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal * @maxSize 10 */ selectItemsBy?: Record[] | null; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface QuerySectionsResponse { /** Retrieved sections. */ sections?: Section[]; /** The metadata of the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface UpdateSectionRequest { /** Section update. */ section: Section; /** * Explicit list of fields to update. * @internal */ mask?: string[]; } interface UpdateSectionResponse { /** Updated section. */ section?: Section; } interface BulkUpdateSectionRequest { /** * Sections to update. * @minSize 1 * @maxSize 100 */ sections: MaskedSection[]; /** Whether to receive the updated sections in the response. */ returnEntity?: boolean; } interface MaskedSection { /** Section update. */ section?: Section; /** Explicit list of fields to update. */ mask?: string[]; } interface BulkUpdateSectionResponse { /** * Information about the updated sections. * @minSize 1 * @maxSize 100 */ results?: BulkSectionResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkSectionResult { /** Whether to receive the updated sections in the response. */ sectionMetadata?: ItemMetadata; /** Updated section. Only returned if `returnEntity` is set to `true`. */ section?: Section; } interface DeleteSectionRequest { /** * Section ID. * @format GUID */ sectionId: string; } interface DeleteSectionResponse { } interface BulkDeleteSectionsRequest { /** * Section IDs. * @format GUID */ ids: string[]; } interface BulkDeleteSectionsResponse { /** Information about the deleted sections. */ results?: BulkDeleteSectionResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkDeleteSectionResult { /** Metadata for deleted sections. */ itemMetadata?: ItemMetadata; } interface CloneSectionsRequest { /** * The MetaSiteId to clone from. * @format GUID */ metaSiteId?: string; } interface CloneSectionsResponse { } 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 BulkUpdateBusinessLocationIdRequest { /** * section ids * @format GUID * @minSize 1 * @maxSize 100 */ sectionIds?: string[]; /** * Business Location Id. * @format GUID */ businessLocationId?: string | null; } interface BulkUpdateBusinessLocationIdResponse { /** * Information about the updated sections. * @minSize 1 * @maxSize 100 */ results?: BulkItemResult[]; } interface BulkItemResult { /** Metadata for item update. */ itemMetadata?: ItemMetadata; } 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 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 SectionCreatedEnvelope { entity: Section; metadata: EventMetadata; } /** @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.SECTION_READ * @webhook * @eventType wix.restaurants.menus.v1.section_created * @serviceIdentifier com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection * @slug created */ declare function onSectionCreated(handler: (event: SectionCreatedEnvelope) => void | Promise): void; interface SectionDeletedEnvelope { metadata: EventMetadata; } /** @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.SECTION_READ * @webhook * @eventType wix.restaurants.menus.v1.section_deleted * @serviceIdentifier com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection * @slug deleted */ declare function onSectionDeleted(handler: (event: SectionDeletedEnvelope) => void | Promise): void; interface SectionUpdatedEnvelope { entity: Section; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a section is updated. * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId RESTAURANTS.SECTION_READ * @webhook * @eventType wix.restaurants.menus.v1.section_updated * @serviceIdentifier com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection * @slug updated */ declare function onSectionUpdated(handler: (event: SectionUpdatedEnvelope) => void | Promise): void; /** * Duplicates a section. * * You can duplicate a section to the same business location, or to 1 or more different business locations. * You can specify whether to also duplicate the section's sub-entities, such as its items. * @param _id - ID of the section to be duplicated. * @public * @requiredField _id * @permissionId RESTAURANTS.SECTION_CREATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.restaurants_duplicate_section.RestaurantsDuplicateSection.DuplicateSection */ declare function duplicateSection(_id: string, options?: DuplicateSectionOptions): Promise>; interface DuplicateSectionOptions { /** * Business location IDs to assign to the duplicated section or sections. * * If you specify one or more IDs, a duplicate is created for each ID, with that ID in its `businessLocationId` field. * If you don't specify an ID, one duplicate is created with the same `businessLocationId` as the original section. * @format GUID * @maxSize 100 */ businessLocationIds?: string[] | null; /** * Whether to duplicate the section's sub-entities, such as its items. * * Default: `false` */ duplicateSubEntities?: boolean | null; } /** * > **Note:** The Sections API only works with the Wix Restaurants Menus 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 section. * * To create multiple sections at once, use [Bulk Create Sections](/sections/bulk-create-sections). * @param section - Section details. * @public * @requiredField section * @permissionId RESTAURANTS.SECTION_CREATE * @applicableIdentity APP * @returns Section. * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.CreateSection */ declare function createSection(section: Section): Promise>; /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 sections at once. * @param sections - Sections details. * @public * @requiredField sections * @permissionId RESTAURANTS.SECTION_CREATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.BulkCreateSections */ declare function bulkCreateSections(sections: Section[], options?: BulkCreateSectionsOptions): Promise>; interface BulkCreateSectionsOptions { /** Whether to receive the created sections in the response. */ returnEntity?: boolean; } /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 section by ID. * @param sectionId - Section ID. * @public * @requiredField sectionId * @permissionId RESTAURANTS.SECTION_READ * @applicableIdentity APP * @returns Section. * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.GetSection */ declare function getSection(sectionId: string): Promise>; /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 sections. * @public * @permissionId RESTAURANTS.SECTION_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.ListSections */ declare function listSections(options?: ListSectionsOptions): Promise>; interface ListSectionsOptions { /** * Section IDs. * @format GUID * @maxSize 500 */ sectionIds?: string[]; /** The metadata of the paginated results. */ paging?: CursorPaging; /** Whether to return only sections that are visible to site visitors. */ onlyVisible?: boolean | null; } /** * Creates a query to retrieve a list of sections. * * The `querySections()` function builds a query to retrieve a list of sections and returns a `SectionsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the [`find()`](/sections/sections-query-builder/find) function. * * You can refine the query by chaining `SectionsQueryBuilder` functions onto the query. `SectionsQueryBuilder` functions enable you to filter, sort, and control the results that `querySections()` returns. * * `querySections()` runs with the following `SectionsQueryBuilder` defaults, which you can override: * * * [`limit(100)`](/sections/sections-query-builder/limit) * * The following `SectionsQueryBuilder` functions are supported for `querySections()`. For a full description of the section object, see the object returned for the [`items`](/sections/sections-query-result/items) property in `SectionsQueryResult`. * @public * @permissionId RESTAURANTS.SECTION_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.QuerySections */ declare function querySections(): SectionsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface SectionsQueryResult extends QueryCursorResult { items: Section[]; query: SectionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface SectionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: 'name' | 'description', value: string) => SectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: string, value: any[]) => SectionsQueryBuilder; in: (propertyName: '_id' | 'name' | 'description', value: any) => SectionsQueryBuilder; exists: (propertyName: 'image' | 'itemIds', value: boolean) => SectionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => SectionsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => SectionsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.QuerySections * @requiredField query */ declare function typedQuerySections(query: SectionQuery): Promise>; interface SectionQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['image']; operators: ['$exists']; sort: 'NONE'; }, { fields: ['_id']; operators: ['$eq', '$in', '$ne', '$nin']; sort: 'NONE'; }, { fields: ['description', 'name']; operators: ['$eq', '$in', '$ne', '$nin', '$startsWith']; sort: 'NONE'; }, { fields: ['itemIds']; operators: ['$exists', '$hasSome']; sort: 'NONE'; }, { fields: ['_createdDate', '_updatedDate']; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type SectionQuery = { /** 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']; /** When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. If multiple filters are provided, they are combined with AND operator. Example: Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } @internal: undefined, @maxSize: 10 */ selectItemsBy?: NonNullable[number]['selectItemsBy'] | null; /** Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: NonNullable[number]['origin']; }[]; }; declare const utils: { query: _wix_sdk_types.QueryHelpers; }; /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 section. * * Each time a section is updated, its revision increments by 1. The existing revision must be included when updating a section. This ensures you're working with the latest section information, and it prevents unintended overwrites. * @param _id - Section ID. * @public * @requiredField _id * @requiredField section * @requiredField section.revision * @permissionId RESTAURANTS.SECTION_UPDATE * @applicableIdentity APP * @returns Updated section. * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.UpdateSection */ declare function updateSection(_id: string, section: NonNullablePaths): Promise>; interface UpdateSection { /** * Section ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current revision must be passed when updating the section. Ignored when creating a section. * @readonly */ revision?: string | null; /** * Date and time the section was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the section was updated. * @readonly */ _updatedDate?: Date | null; /** * Section name. * @minLength 1 * @maxLength 500 */ name?: string; /** * Section description. * @maxLength 1500 */ description?: string | null; /** Main section image. */ image?: string; /** * Additional section images. * @maxSize 100 */ additionalImages?: string[]; /** * Item IDs. * @format GUID * @maxSize 300 */ itemIds?: string[]; /** Extended fields. */ extendedFields?: ExtendedFields; /** Whether the section is visible in the menu for site visitors. */ visible?: boolean | null; /** * 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 section is available. * @format GUID * @readonly */ businessLocationId?: string | null; /** @internal */ orderSettings?: OrderSettings; /** * @internal * @readonly * @maxLength 150 */ oloMigrationSectionId?: string | null; /** * References to an external app and resource associated with this object. Used for integration and tracking across different platforms. * @internal */ externalReferenceInfo?: ExternalReferenceInfo; } /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 sections at once. * * Each time a section is updated, its revision increments by 1. The existing revision must be included when updating a section. This ensures you're working with the latest section information, and it prevents unintended overwrites. * @param sections - Sections to update. * @public * @requiredField sections * @requiredField sections.section._id * @requiredField sections.section.revision * @permissionId RESTAURANTS.SECTION_UPDATE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.BulkUpdateSection */ declare function bulkUpdateSection(sections: NonNullablePaths[], options?: BulkUpdateSectionOptions): Promise>; interface BulkUpdateSectionOptions { /** Whether to receive the updated sections in the response. */ returnEntity?: boolean; } /** * > **Note:** The Section API only works with the Wix Restaurants Menus 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 section. * @param sectionId - Section ID. * @public * @requiredField sectionId * @permissionId RESTAURANTS.SECTION_DELETE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.DeleteSection */ declare function deleteSection(sectionId: string): Promise; /** * > **Note:** The Section API only works with the Wix Restaurants Menus app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new). * * Deletes multiple sections at once. * @param ids - Section IDs. * @public * @requiredField ids * @permissionId RESTAURANTS.SECTION_DELETE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_section.v1.RestaurantsMenusSection.BulkDeleteSections */ declare function bulkDeleteSections(ids: string[]): Promise>; export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type App, type ApplicationError, type Availability, type AvailabilityAvailabilityTypeOptionsOneOf, AvailabilityType, type AvailabilityTypeWithLiterals, type AvailableRange, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateSectionResult, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, type BulkDeleteSectionResult, type BulkDeleteSectionsRequest, type BulkDeleteSectionsResponse, type BulkItemResult, type BulkSectionResult, type BulkUpdateBusinessLocationIdRequest, type BulkUpdateBusinessLocationIdResponse, type BulkUpdateSectionOptions, type BulkUpdateSectionRequest, type BulkUpdateSectionResponse, type CloneSectionsRequest, type CloneSectionsResponse, type CommonQueryWithEntityContext, type CreateSectionRequest, type CreateSectionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, DayOfWeek, type DayOfWeekAvailability, type DayOfWeekWithLiterals, type DeleteLocationIdFromItems, type DeleteSectionRequest, type DeleteSectionResponse, type DomainEvent, type DomainEventBodyOneOf, type DuplicateSectionOptions, type DuplicateSectionRequest, type DuplicateSectionResponse, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReferenceInfo, type File, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MaskedSection, type MessageEnvelope, type OrderSettings, type Page, type Pages, type QuerySectionsRequest, type QuerySectionsResponse, type RestoreInfo, type Section, type SectionCreatedEnvelope, type SectionDeletedEnvelope, type SectionQuery, type SectionQuerySpec, type SectionUpdatedEnvelope, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncContentToMultilingualRequest, type SyncContentToMultilingualResponse, type TimeOfDay, type TimeOfDayRange, type TimestampRangesOptions, type URI, type URIs, type UpdateSection, type UpdateSectionRequest, type UpdateSectionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeeklyScheduleOptions, bulkCreateSections, bulkDeleteSections, bulkUpdateSection, createSection, deleteSection, duplicateSection, getSection, listSections, onSectionCreated, onSectionDeleted, onSectionUpdated, querySections, typedQuerySections, updateSection, utils };