import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface Label { /** * Item label ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the item label is updated. To prevent conflicting changes, the current revision must be passed when updating the item label. Ignored when creating a item label. * @readonly */ revision?: string | null; /** * Date and time the item label was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the item label was updated. * @readonly */ _updatedDate?: Date | null; /** * Item label name. * @minLength 1 * @maxLength 50 */ name?: string; /** Item label icon. */ icon?: string; /** Extended fields. */ extendedFields?: ExtendedFields; } 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 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 item label 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 CreateLabelRequest { /** Item label details. */ label: Label; } interface CreateLabelResponse { /** Item label. */ label?: Label; } interface GetLabelRequest { /** * Item label ID. * @format GUID */ labelId: string; } interface GetLabelResponse { /** Item label. */ label?: Label; } interface ListLabelsRequest { } interface ListLabelsResponse { /** Retrieved item labels. */ labels?: Label[]; } interface QueryLabelsRequest { /** 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 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 QueryLabelsResponse { /** Retrieved item labels. */ labels?: Label[]; /** 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 CountLabelsRequest { /** Filter for counting labels. */ filter?: Record | null; } interface CountLabelsResponse { /** Counted labels. */ count?: number; } interface UpdateLabelRequest { /** Item label to update. */ label: Label; } interface UpdateLabelResponse { /** Updated item label. */ label?: Label; } interface DeleteLabelRequest { /** * ID of the item label. * @format GUID */ labelId: string; } interface DeleteLabelResponse { } interface BulkDeleteLabelsRequest { /** * Item Label IDs. * @format GUID * @maxSize 200 */ ids: string[]; } interface BulkDeleteLabelsResponse { /** Information about the deleted labels. */ results?: BulkDeleteLabelsResult[]; /** Metadata for the API call. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkDeleteLabelsResult { /** Metadata for labels deletion. */ itemMetadata?: ItemMetadata; } interface ItemMetadata { /** * 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 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 CloneLabelsRequest { /** * The MetaSiteId to clone from. * @format GUID */ metaSiteId?: string; } interface CloneLabelsResponse { } interface SyncContentToMultilingualRequest { /** * MetaSite ID * @format GUID */ metaSiteId?: string; } interface SyncContentToMultilingualResponse { } 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 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; } /** @docsIgnore */ type CountLabelsApplicationErrors = { code?: 'TOO_MANY_TO_COUNT'; 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 ItemLabelCreatedEnvelope { entity: Label; metadata: EventMetadata; } /** * Triggered when an item label is created. * @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.LABEL_READ * @webhook * @eventType wix.restaurants.menus.v1.item_label_created * @serviceIdentifier com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels * @slug created * @documentationMaturity preview */ declare function onItemLabelCreated(handler: (event: ItemLabelCreatedEnvelope) => void | Promise): void; interface ItemLabelDeletedEnvelope { 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.LABEL_READ * @webhook * @eventType wix.restaurants.menus.v1.item_label_deleted * @slug deleted * @documentationMaturity preview */ declare function onItemLabelDeleted(handler: (event: ItemLabelDeletedEnvelope) => void | Promise): void; interface ItemLabelUpdatedEnvelope { entity: Label; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when an item label is updated. * @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.LABEL_READ * @webhook * @eventType wix.restaurants.menus.v1.item_label_updated * @serviceIdentifier com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels * @slug updated * @documentationMaturity preview */ declare function onItemLabelUpdated(handler: (event: ItemLabelUpdatedEnvelope) => void | Promise): void; /** * > **Note:** The Label 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 an item label. * @param label - Item label details. * @public * @documentationMaturity preview * @requiredField label * @permissionId RESTAURANTS.LABEL_CREATE * @applicableIdentity APP * @returns Item label. * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.CreateLabel */ declare function createLabel(label: Label): Promise>; /** * > **Note:** The Labels 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 an item label by ID. * @param labelId - Item label ID. * @public * @documentationMaturity preview * @requiredField labelId * @permissionId RESTAURANTS.LABEL_READ * @applicableIdentity APP * @returns Item label. * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.GetLabel */ declare function getLabel(labelId: string): Promise>; /** * > **Note:** The Label 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 item labels. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.LABEL_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.ListLabels */ declare function listLabels(): Promise>; /** * Creates a query to retrieve a list of item labels. * * The `queryLabels()` function builds a query to retrieve a list of item labels and returns a `LabelsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the [`find()`](/item-labels/labels-query-builder/find) function. * * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns. * * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override: * * * [`limit(100)`](/item-labels/labels-query-builder/limit) * * The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the item label object, see the object returned for the [`items`](/item-labels/labels-query-result/items) property in `LabelsQueryResult`. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.LABEL_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.QueryLabels */ declare function queryLabels(): LabelsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface LabelsQueryResult extends QueryCursorResult { items: Label[]; query: LabelsQueryBuilder; next: () => Promise; prev: () => Promise; } interface LabelsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'name', value: string) => LabelsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'name', value: any) => LabelsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'icon', value: boolean) => LabelsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => LabelsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => LabelsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.QueryLabels * @requiredField query */ declare function typedQueryLabels(query: LabelQuery): Promise>; interface LabelQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['_id']; operators: ['$eq', '$in', '$ne', '$nin']; sort: 'NONE'; }, { fields: ['icon']; operators: ['$exists']; sort: 'NONE'; }, { fields: ['name']; operators: ['$eq', '$in', '$ne', '$nin', '$startsWith']; sort: 'NONE'; }, { fields: ['_createdDate', '_updatedDate']; operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type LabelQuery = { /** 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 Label 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 the number of labels that match a specified filter. * * If a filter isn't passed in the request, the endpoint returns the count of all labels. * @public * @documentationMaturity preview * @permissionId RESTAURANTS.LABEL_READ * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.CountLabels */ declare function countLabels(options?: CountLabelsOptions): Promise & { __applicationErrorsType?: CountLabelsApplicationErrors; }>; interface CountLabelsOptions { /** Filter for counting labels. */ filter?: Record | null; } /** * > **Note:** The Label 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 an item Label. * * Each time an item label is updated, its revision increments by 1. The existing revision must be included when updating the item labels. This ensures you're working with the latest item labels information, and it prevents unintended overwrites. * @param _id - Item label ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField label * @requiredField label.revision * @permissionId RESTAURANTS.LABEL_UPDATE * @applicableIdentity APP * @returns Updated item label. * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.UpdateLabel */ declare function updateLabel(_id: string, label: NonNullablePaths): Promise>; interface UpdateLabel { /** * Item label ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the item label is updated. To prevent conflicting changes, the current revision must be passed when updating the item label. Ignored when creating a item label. * @readonly */ revision?: string | null; /** * Date and time the item label was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the item label was updated. * @readonly */ _updatedDate?: Date | null; /** * Item label name. * @minLength 1 * @maxLength 50 */ name?: string; /** Item label icon. */ icon?: string; /** Extended fields. */ extendedFields?: ExtendedFields; } /** * > **Note:** The Label 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 an item label. * @param labelId - ID of the item label. * @public * @documentationMaturity preview * @requiredField labelId * @permissionId RESTAURANTS.LABEL_DELETE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.DeleteLabel */ declare function deleteLabel(labelId: string): Promise; /** * > **Note:** The Label 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 multiple item labels at once. * @param ids - Item Label IDs. * @public * @documentationMaturity preview * @requiredField ids * @permissionId RESTAURANTS.LABEL_DELETE * @applicableIdentity APP * @fqn com.wixpress.restaurants.menus_item_labels.v1.RestaurantsMenusItemLabels.BulkDeleteLabels */ declare function bulkDeleteLabels(ids: string[]): Promise>; export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkDeleteLabelsRequest, type BulkDeleteLabelsResponse, type BulkDeleteLabelsResult, type CloneLabelsRequest, type CloneLabelsResponse, type CommonQueryWithEntityContext, type CountLabelsApplicationErrors, type CountLabelsOptions, type CountLabelsRequest, type CountLabelsResponse, type CreateLabelRequest, type CreateLabelResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type DeleteLabelRequest, type DeleteLabelResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReferenceInfo, type File, type GetLabelRequest, type GetLabelResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemLabelCreatedEnvelope, type ItemLabelDeletedEnvelope, type ItemLabelUpdatedEnvelope, type ItemMetadata, type Label, type LabelQuery, type LabelQuerySpec, type LabelsQueryBuilder, type LabelsQueryResult, type ListLabelsRequest, type ListLabelsResponse, type MessageEnvelope, type Page, type Pages, type QueryLabelsRequest, type QueryLabelsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncContentToMultilingualRequest, type SyncContentToMultilingualResponse, type URI, type URIs, type UpdateLabel, type UpdateLabelRequest, type UpdateLabelResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteLabels, countLabels, createLabel, deleteLabel, getLabel, listLabels, onItemLabelCreated, onItemLabelDeleted, onItemLabelUpdated, queryLabels, typedQueryLabels, updateLabel, utils };