/**
* An item modifier is a type of menu item that serves as an addition to a menu item.
* Read more about [item modifiers](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/item-modifiers/introduction).
*/
export interface Modifier {
/**
* Item modifier ID.
* @readonly
*/
_id?: string | null;
/**
* Revision number, which increments by 1 each time the item modifier is updated.
* To prevent conflicting changes,
* the current revision must be passed when updating the item modifier.
*
* Ignored when creating an item modifier.
* @readonly
*/
revision?: string | null;
/**
* Date and time the item modifier was created.
* @readonly
*/
_createdDate?: Date | null;
/**
* Date and time the item modifier was updated.
* @readonly
*/
_updatedDate?: Date | null;
/** Item modifier display name. */
name?: string | null;
/** Extended fields. */
extendedFields?: ExtendedFields;
/**
* Whether the modifier is in stock.
* Default: `true`.
*/
inStock?: boolean | null;
}
export 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>;
}
export interface InvalidateCache extends InvalidateCacheGetByOneOf {
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
metaSiteId?: string;
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
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;
/** tell us why you're invalidating the cache. You don't need to add your app name */
reason?: string | null;
/** Is local DS */
localDc?: boolean;
hardPurge?: boolean;
}
/** @oneof */
export interface InvalidateCacheGetByOneOf {
/** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
metaSiteId?: string;
/** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
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;
}
export interface App {
/** The AppDefId */
appDefId?: string;
/** The instance Id */
instanceId?: string;
}
export interface Page {
/** the msid the page is on */
metaSiteId?: string;
/** Invalidate by Page ID */
pageId?: string;
}
export interface URI {
/** the msid the URI is on */
metaSiteId?: string;
/** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
uriPath?: string;
}
export interface File {
/** the msid the file is related to */
metaSiteId?: string;
/** Invalidate by filename (for media files such as PDFs) */
fileName?: string;
}
export interface CreateModifierRequest {
/** Item modifier to create. */
modifier: Modifier;
}
export interface CreateModifierResponse {
/** Created item modifier. */
modifier?: Modifier;
}
export interface GetModifierRequest {
/** ID of the item modifier to retrieve. */
modifierId: string;
}
export interface GetModifierResponse {
/** Retrieved item modifier. */
modifier?: Modifier;
}
export interface ListModifiersRequest {
/** IDs of the item modifiers to retrieve. */
modifierIds?: string[];
/** Metadata of the paginated results. */
paging?: CursorPaging;
}
export interface CursorPaging {
/** Maximum number of items to load. */
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;
}
export interface ListModifiersResponse {
/** Retrieved item modifiers. */
modifiers?: Modifier[];
/** Metadata of the paginated results. */
metadata?: CursorPagingMetadata;
}
export interface CursorPagingMetadata {
/** Number of items returned in the response. */
count?: number | null;
/** Cursor pointing to the next page and the previous page in the list of results. */
cursors?: Cursors;
/**
* Whether 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;
}
export 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;
}
export interface UpdateModifierRequest {
/** Item Modifier with updated properties. */
modifier: Modifier;
}
export interface UpdateModifierResponse {
/** Updated item modifier. */
modifier?: Modifier;
}
export interface BulkCreateModifiersRequest {
/** List of item modifiers to create. */
modifiers: Modifier[];
/**
* Whether the created item modifiers are included in the response.
* Default: `false`.
*/
returnEntity?: boolean;
}
export interface BulkCreateModifiersResponse {
/** Information about the created item modifiers. */
results?: BulkCreateModifierResult[];
/** Metadata for Bulk Create Modifiers API call. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkCreateModifierResult {
/** Metadata for creation of the item modifer. */
itemMetadata?: ItemMetadata;
/** Created item modifier. */
modifier?: Modifier;
}
export 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;
}
export interface ApplicationError {
/** Error code. */
code?: string;
/** Description of the error. */
description?: string;
/** Data related to the error. */
data?: Record | null;
}
export 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;
}
export interface BulkUpdateModifiersRequest {
/** List of item modifiers to update. */
modifiers: MaskedModifier[];
/** Whether the updated item modifiers are included in the response. */
returnEntity?: boolean;
}
export interface MaskedModifier {
/** Item modifier to update. */
modifier?: Modifier;
/** Explicit list of fields to update. */
mask?: string[];
}
export interface BulkUpdateModifiersResponse {
/** Information about the updated item modifiers. */
results?: BulkUpdateModifierResult[];
/** Metadata for Bulk Update Modifiers API call. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkUpdateModifierResult {
/** Metadata for the update of the item modifer. */
itemMetadata?: ItemMetadata;
/** Updated item modifier. */
modifier?: Modifier;
}
export interface DeleteModifierRequest {
/** ID of the item modifier to delete. */
modifierId: string;
}
export interface DeleteModifierResponse {
}
export interface QueryModifiersRequest {
/** Query options. */
query?: CursorQuery;
}
export 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.
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
* for more information.
*
* For a detailed list of supported filters, see
* [Supported Filters](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/item-modifiers/supported-filters-and-sorting).
*/
filter?: Record | null;
/** Sort object. */
sort?: Sorting[];
}
/** @oneof */
export 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;
}
export interface Sorting {
/** Name of the field to sort by. */
fieldName?: string;
/** Sort order. */
order?: SortOrder;
}
export declare enum SortOrder {
ASC = "ASC",
DESC = "DESC"
}
export interface QueryModifiersResponse {
/** Retrieved item modifiers. */
modifiers?: Modifier[];
/** Metadata of the paginated results. */
pagingMetadata?: CursorPagingMetadata;
}
export interface CountModifiersRequest {
/** Filter for counting modifiers. */
filter?: Record | null;
}
export interface CountModifiersResponse {
/** Counted modifiers. */
count?: number;
}
export interface BulkDeleteModifiersRequest {
/** Item Modifier IDs. */
ids: string[];
}
export interface BulkDeleteModifiersResponse {
/** Information about the deleted modifiers. */
results?: BulkDeleteModifiersResult[];
/** Metadata for the API call. */
bulkActionMetadata?: BulkActionMetadata;
}
export interface BulkDeleteModifiersResult {
/** Metadata for modifiers deletion. */
itemMetadata?: ItemMetadata;
}
export interface CloneModifiersRequest {
/** The MetaSiteId to clone from */
metaSiteId?: string;
}
export interface CloneModifiersResponse {
}
export interface DomainEvent extends DomainEventBodyOneOf {
createdEvent?: EntityCreatedEvent;
updatedEvent?: EntityUpdatedEvent;
deletedEvent?: EntityDeletedEvent;
actionEvent?: ActionEvent;
/**
* Unique event ID.
* Allows clients to ignore duplicate webhooks.
*/
_id?: string;
/**
* Assumes actions are also always typed to an entity_type
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
*/
entityFqdn?: string;
/**
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
* This is although the created/updated/deleted notion is duplication of the oneof types
* Example: created/updated/deleted/started/completed/email_opened
*/
slug?: string;
/** ID of the entity associated with the event. */
entityId?: string;
/** Event timestamp 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 defining the order of updates to the underlying entity.
* For example, given that some entity was updated at 16:00 and than again at 16:01,
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
* To do so, you will need to persist this number on your end, and compare the sequence number from the
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
*/
entityEventSequence?: string | null;
}
/** @oneof */
export interface DomainEventBodyOneOf {
createdEvent?: EntityCreatedEvent;
updatedEvent?: EntityUpdatedEvent;
deletedEvent?: EntityDeletedEvent;
actionEvent?: ActionEvent;
}
export interface EntityCreatedEvent {
entity?: string;
}
export interface RestoreInfo {
deletedDate?: Date | null;
}
export interface EntityUpdatedEvent {
/**
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
*/
currentEntity?: string;
}
export interface EntityDeletedEvent {
/** Entity that was deleted */
deletedEntity?: string | null;
}
export interface ActionEvent {
body?: string;
}
export interface Empty {
}
export interface MessageEnvelope {
/** App instance ID. */
instanceId?: string | null;
/** Event type. */
eventType?: string;
/** The identification type and identity data. */
identity?: IdentificationData;
/** Stringify payload. */
data?: string;
}
export interface IdentificationData extends IdentificationDataIdOneOf {
/** ID of a site visitor that has not logged in to the site. */
anonymousVisitorId?: string;
/** ID of a site visitor that has logged in to the site. */
memberId?: string;
/** ID of a Wix user (site owner, contributor, etc.). */
wixUserId?: string;
/** ID of an app. */
appId?: string;
/** @readonly */
identityType?: WebhookIdentityType;
}
/** @oneof */
export interface IdentificationDataIdOneOf {
/** ID of a site visitor that has not logged in to the site. */
anonymousVisitorId?: string;
/** ID of a site visitor that has logged in to the site. */
memberId?: string;
/** ID of a Wix user (site owner, contributor, etc.). */
wixUserId?: string;
/** ID of an app. */
appId?: string;
}
export declare enum WebhookIdentityType {
UNKNOWN = "UNKNOWN",
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
MEMBER = "MEMBER",
WIX_USER = "WIX_USER",
APP = "APP"
}
export interface ModifierNonNullableFields {
businessLocationIds: string[];
}
export interface CreateModifierResponseNonNullableFields {
modifier?: ModifierNonNullableFields;
}
export interface GetModifierResponseNonNullableFields {
modifier?: ModifierNonNullableFields;
}
export interface ListModifiersResponseNonNullableFields {
modifiers: ModifierNonNullableFields[];
}
export interface UpdateModifierResponseNonNullableFields {
modifier?: ModifierNonNullableFields;
}
interface ApplicationErrorNonNullableFields {
code: string;
description: string;
}
interface ItemMetadataNonNullableFields {
originalIndex: number;
success: boolean;
error?: ApplicationErrorNonNullableFields;
}
interface BulkCreateModifierResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
modifier?: ModifierNonNullableFields;
}
interface BulkActionMetadataNonNullableFields {
totalSuccesses: number;
totalFailures: number;
undetailedFailures: number;
}
export interface BulkCreateModifiersResponseNonNullableFields {
results: BulkCreateModifierResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
interface BulkUpdateModifierResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
modifier?: ModifierNonNullableFields;
}
export interface BulkUpdateModifiersResponseNonNullableFields {
results: BulkUpdateModifierResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface QueryModifiersResponseNonNullableFields {
modifiers: ModifierNonNullableFields[];
}
export interface CountModifiersResponseNonNullableFields {
count: number;
}
interface BulkDeleteModifiersResultNonNullableFields {
itemMetadata?: ItemMetadataNonNullableFields;
}
export interface BulkDeleteModifiersResponseNonNullableFields {
results: BulkDeleteModifiersResultNonNullableFields[];
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
}
export interface BaseEventMetadata {
/** App instance ID. */
instanceId?: string | null;
/** Event type. */
eventType?: string;
/** The identification type and identity data. */
identity?: IdentificationData;
}
export interface EventMetadata extends BaseEventMetadata {
/**
* Unique event ID.
* Allows clients to ignore duplicate webhooks.
*/
_id?: string;
/**
* Assumes actions are also always typed to an entity_type
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
*/
entityFqdn?: string;
/**
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
* This is although the created/updated/deleted notion is duplication of the oneof types
* Example: created/updated/deleted/started/completed/email_opened
*/
slug?: string;
/** ID of the entity associated with the event. */
entityId?: string;
/** Event timestamp 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 defining the order of updates to the underlying entity.
* For example, given that some entity was updated at 16:00 and than again at 16:01,
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
* To do so, you will need to persist this number on your end, and compare the sequence number from the
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
*/
entityEventSequence?: string | null;
}
export interface ItemModifierCreatedEnvelope {
entity: Modifier;
metadata: EventMetadata;
}
/** @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @permissionId RESTAURANTS.MODIFIER_READ
* @webhook
* @eventType wix.restaurants.menus.v1.item_modifier_created
* @documentationMaturity preview
*/
export declare function onItemModifierCreated(handler: (event: ItemModifierCreatedEnvelope) => void | Promise): void;
export interface ItemModifierDeletedEnvelope {
metadata: EventMetadata;
}
/** @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @permissionId RESTAURANTS.MODIFIER_READ
* @webhook
* @eventType wix.restaurants.menus.v1.item_modifier_deleted
* @documentationMaturity preview
*/
export declare function onItemModifierDeleted(handler: (event: ItemModifierDeletedEnvelope) => void | Promise): void;
export interface ItemModifierUpdatedEnvelope {
entity: Modifier;
metadata: EventMetadata;
}
/** @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @permissionId RESTAURANTS.MODIFIER_READ
* @webhook
* @eventType wix.restaurants.menus.v1.item_modifier_updated
* @documentationMaturity preview
*/
export declare function onItemModifierUpdated(handler: (event: ItemModifierUpdatedEnvelope) => void | Promise): void;
/**
* > **Note:** The Item Modifiers 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 modifier.
*
* To create multiple item modifiers at once, use [Bulk Create Modifiers](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/item-modifiers/bulk-create-modifiers).
* @param modifier - Item modifier to create.
* @public
* @documentationMaturity preview
* @requiredField modifier
* @requiredField modifier.name
* @permissionId RESTAURANTS.MODIFIER_CREATE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @returns Created item modifier.
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.CreateModifier
*/
export declare function createModifier(modifier: Modifier): Promise;
/**
* > **Note:** The Item Modifier 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 modifier by ID.
* @param modifierId - ID of the item modifier to retrieve.
* @public
* @documentationMaturity preview
* @requiredField modifierId
* @permissionId RESTAURANTS.MODIFIER_READ
* @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @returns Retrieved item modifier.
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.GetModifier
*/
export declare function getModifier(modifierId: string): Promise;
/**
* > **Note:** The Item Modifier 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 100 item modifiers.
* @public
* @documentationMaturity preview
* @permissionId RESTAURANTS.MODIFIER_READ
* @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.ListModifiers
*/
export declare function listModifiers(options?: ListModifiersOptions): Promise;
export interface ListModifiersOptions {
/** IDs of the item modifiers to retrieve. */
modifierIds?: string[];
/** Metadata of the paginated results. */
paging?: CursorPaging;
}
/**
* > **Note:** The Item Modifier 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 modifier.
*
* To update multiple item modifiers at once, use [Bulk Update Item Modifiers](https://dev.wix.com/docs/rest/business-solutions/restaurants/menus/item-modifiers/bulk-update-modifiers).
*
* Each time an item modifier is updated, its revision increments by 1. The existing revision must be included when updating an item modifier. This ensures you're working with the latest item modifier information, and it prevents unintended overwrites.
* @param _id - Item modifier ID.
* @public
* @documentationMaturity preview
* @requiredField _id
* @requiredField modifier
* @requiredField modifier.revision
* @permissionId RESTAURANTS.MODIFIER_UPDATE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @returns Updated item modifier.
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.UpdateModifier
*/
export declare function updateModifier(_id: string | null, modifier: UpdateModifier): Promise;
export interface UpdateModifier {
/**
* Item modifier ID.
* @readonly
*/
_id?: string | null;
/**
* Revision number, which increments by 1 each time the item modifier is updated.
* To prevent conflicting changes,
* the current revision must be passed when updating the item modifier.
*
* Ignored when creating an item modifier.
* @readonly
*/
revision?: string | null;
/**
* Date and time the item modifier was created.
* @readonly
*/
_createdDate?: Date | null;
/**
* Date and time the item modifier was updated.
* @readonly
*/
_updatedDate?: Date | null;
/** Item modifier display name. */
name?: string | null;
/** Extended fields. */
extendedFields?: ExtendedFields;
/**
* Whether the modifier is in stock.
* Default: `true`.
*/
inStock?: boolean | null;
}
/**
* > **Note:** The Item Modifier 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 item modifiers.
* @param modifiers - List of item modifiers to create.
* @public
* @documentationMaturity preview
* @requiredField modifiers
* @permissionId RESTAURANTS.MODIFIER_CREATE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.BulkCreateModifiers
*/
export declare function bulkCreateModifiers(modifiers: Modifier[], options?: BulkCreateModifiersOptions): Promise;
export interface BulkCreateModifiersOptions {
/**
* Whether the created item modifiers are included in the response.
* Default: `false`.
*/
returnEntity?: boolean;
}
/**
* > **Note:** The Item modifier 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 item modifiers at once.
* Each time an item modifier is updated, its revision increments by 1. The existing revision must be included when updating the item modifier. This ensures you're working with the latest item modifier information, and prevents unintended overwrites.
* @param modifiers - List of item modifiers to update.
* @public
* @documentationMaturity preview
* @requiredField modifiers
* @permissionId RESTAURANTS.MODIFIER_UPDATE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.BulkUpdateModifiers
*/
export declare function bulkUpdateModifiers(modifiers: MaskedModifier[], options?: BulkUpdateModifiersOptions): Promise;
export interface BulkUpdateModifiersOptions {
/** Whether the updated item modifiers are included in the response. */
returnEntity?: boolean;
}
/**
* > **Note:** The Item modifier 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 modifier.
* @param modifierId - ID of the item modifier to delete.
* @public
* @documentationMaturity preview
* @requiredField modifierId
* @permissionId RESTAURANTS.MODIFIER_DELETE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.DeleteModifier
*/
export declare function deleteModifier(modifierId: string): Promise;
/**
* Creates a query to retrieve a list of item modifiers.
*
* The `queryModifiers()` function builds a query to retrieve a list of item modifiers and returns a `ModifiersQueryBuilder` object.
*
* The returned object contains the query definition, which is used to run the query using the [`find()`](/item-modifiers/modifiers-query-builder/find) function.
*
* You can refine the query by chaining `ModifiersQueryBuilder` functions onto the query. `ModifiersQueryBuilder` functions enable you to filter, sort, and control the results that `queryModifiers()` returns.
*
* `queryModifiers()` runs with the following `ModifiersQueryBuilder` defaults, which you can override:
*
* * [`limit(200)`](/item-modifiers/modifiers-query-builder/limit)
* * [`ascending('entityId')`](/item-modifiers/modifiers-query-builder/ascending)
*
* The following `ModifiersQueryBuilder` functions are supported for `queryModifiers()`. For a full description of the item modifier object, see the object returned for the [`items`](/item-modifiers/modifiers-query-builder/items) property in `ModifiersQueryResult`.
* @public
* @documentationMaturity preview
* @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @permissionId RESTAURANTS.MODIFIER_READ
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.QueryModifiers
*/
export declare function queryModifiers(): ModifiersQueryBuilder;
interface QueryCursorResult {
cursors: Cursors;
hasNext: () => boolean;
hasPrev: () => boolean;
length: number;
pageSize: number;
}
export interface ModifiersQueryResult extends QueryCursorResult {
items: Modifier[];
query: ModifiersQueryBuilder;
next: () => Promise;
prev: () => Promise;
}
export interface ModifiersQueryBuilder {
/** @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) => ModifiersQueryBuilder;
/** @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) => ModifiersQueryBuilder;
/** @param propertyName - Property whose value is compared with `value`.
* @param value - Value to compare against.
* @documentationMaturity preview
*/
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifiersQueryBuilder;
/** @param propertyName - Property whose value is compared with `value`.
* @param value - Value to compare against.
* @documentationMaturity preview
*/
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifiersQueryBuilder;
/** @param propertyName - Property whose value is compared with `value`.
* @param value - Value to compare against.
* @documentationMaturity preview
*/
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifiersQueryBuilder;
/** @param propertyName - Property whose value is compared with `value`.
* @param value - Value to compare against.
* @documentationMaturity preview
*/
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ModifiersQueryBuilder;
/** @documentationMaturity preview */
in: (propertyName: '_id' | 'name', value: any) => ModifiersQueryBuilder;
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
* @documentationMaturity preview
*/
limit: (limit: number) => ModifiersQueryBuilder;
/** @param cursor - A pointer to specific record
* @documentationMaturity preview
*/
skipTo: (cursor: string) => ModifiersQueryBuilder;
/** @documentationMaturity preview */
find: () => Promise;
}
/**
* > **Note:** The Item 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 modifiers that match a specified filter.
*
* If a filter isn't passed in the request, the endpoint returns the count of all modifiers.
* @public
* @documentationMaturity preview
* @permissionId RESTAURANTS.MODIFIER_READ
* @permissionScope Manage Bookings Services and Settings
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
* @permissionScope Manage Portfolio
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @applicableIdentity VISITOR
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.CountModifiers
*/
export declare function countModifiers(options?: CountModifiersOptions): Promise;
export interface CountModifiersOptions {
/** Filter for counting modifiers. */
filter?: Record | null;
}
/**
* > **Note:** The Item Modifier 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 Modifiers at once.
* @param ids - Item Modifier IDs.
* @public
* @documentationMaturity preview
* @requiredField ids
* @permissionId RESTAURANTS.MODIFIER_DELETE
* @permissionScope Manage Restaurants - all permissions
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
* @applicableIdentity APP
* @fqn wix.restaurants.menus_item_modifier.v1.ModifiersService.BulkDeleteModifiers
*/
export declare function bulkDeleteModifiers(ids: string[]): Promise;
export {};