import { CalculateServiceFeesRequest as CalculateServiceFeesRequest$1, CalculateServiceFeesResponse as CalculateServiceFeesResponse$1, CreateRuleRequest as CreateRuleRequest$1, CreateRuleResponse as CreateRuleResponse$1, GetRuleRequest as GetRuleRequest$1, GetRuleResponse as GetRuleResponse$1, UpdateRuleRequest as UpdateRuleRequest$1, UpdateRuleResponse as UpdateRuleResponse$1, DeleteRuleRequest as DeleteRuleRequest$1, DeleteRuleResponse as DeleteRuleResponse$1, ListRulesRequest as ListRulesRequest$1, ListRulesResponse as ListRulesResponse$1, QueryRulesRequest as QueryRulesRequest$1, QueryRulesResponse as QueryRulesResponse$1, BulkCreateRulesRequest as BulkCreateRulesRequest$1, BulkCreateRulesResponse as BulkCreateRulesResponse$1, BulkUpdateRulesRequest as BulkUpdateRulesRequest$1, BulkUpdateRulesResponse as BulkUpdateRulesResponse$1, BulkDeleteRulesRequest as BulkDeleteRulesRequest$1, BulkDeleteRulesResponse as BulkDeleteRulesResponse$1, BulkUpdateRuleTagsRequest as BulkUpdateRuleTagsRequest$1, BulkUpdateRuleTagsResponse as BulkUpdateRuleTagsResponse$1, BulkUpdateRuleTagsByFilterRequest as BulkUpdateRuleTagsByFilterRequest$1, BulkUpdateRuleTagsByFilterResponse as BulkUpdateRuleTagsByFilterResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Rule extends RuleValueOneOf, RuleRequirementsOneOf, RuleConditionsOneOf, RuleConditionTypeOptionsOneOf, RuleTaxesOneOf { /** * Fixed fee. Must hold a positive value. * @deprecated Fixed fee. Must hold a positive value. * @replacedBy fixed_fee * @targetRemovalDate 2024-02-15 */ amount?: CommonMoney; /** * Percentage fee. For example, `5` represents a 5% fee applied to the order's total. * @decimalValue options { maxScale:2, gte:0, lte:100 } * @deprecated * @replacedBy percentage_fee * @targetRemovalDate 2024-02-15 */ percentage?: string | null; /** Fixed fee. Must hold a positive value. */ fixedFee?: Money; /** * Percentage fee. For example, `5` represents a 5% fee applied to the order's total. * @decimalValue options { maxScale:2, gte:0, lte:100 } */ percentageFee?: string | null; /** * Single condition that must be met for the rule to be applied to an order. * @deprecated Single condition that must be met for the rule to be applied to an order. * @replacedBy condition_options * @targetRemovalDate 2024-02-15 */ condition?: Condition; /** * Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. * @deprecated Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. * @replacedBy condition_tree_options * @targetRemovalDate 2024-02-15 */ conditionTree?: ConditionTree; /** Single condition that must be met for the rule to be applied to an order. */ conditionOptions?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ conditionTreeOptions?: ConditionTree; /** Percentage value to apply as a custom tax rate. Range: [0-100]. */ customTaxRate?: string | null; /** * Tax group ID. Internal only. * @format GUID */ taxGroupId?: string | null; /** * Rule ID. * @readonly */ id?: string | null; /** * Business location ID ([SDK](https://dev.wix.com/docs/sdk/backend-modules/restaurants/wix-restaurants-new/about-business-locations) | [REST](https://dev.wix.com/docs/rest/business-solutions/restaurants/wix-restaurants-new/about-business-locations)) of the rule. * @format GUID */ locationId?: string | null; /** * Rule name. * @maxLength 50 * @minLength 1 */ name?: string | null; /** * Date and time the rule was created. * @readonly */ createdDate?: Date | null; /** * Date and time the rule was updated. * @readonly */ updatedDate?: Date | null; /** * Percentage value to apply as a custom tax rate. For example, `5` represents a 5% fee applied to the order's total.
* Min: '0'.
* Max: `100`. * @decimalValue options { maxScale:2, gte:0, lte:100 } * @deprecated * @replacedBy taxes * @targetRemovalDate 2023-09-16 */ taxRate?: string | null; /** * Specifies the type of condition. * @deprecated Specifies the type of condition. * @replacedBy condition_type * @targetRemovalDate 2024-02-15 */ conditionsType?: ConditionsTypeWithLiterals; /** Specifies the type of condition. */ conditionType?: ConditionTypeWithLiterals; /** Whether the rule is enabled. If `true`, the rule is evaluated when service fees are calculated. If `false`, the rule will not be evaluated when service fees are calculated. */ enabled?: boolean | null; /** * Revision number. Increments by 1 each time the rule is updated. * To prevent conflicting changes, the existing `revision` must be used when updating a rule. * @readonly */ revision?: string | null; /** * DEPRECATED. Defines the app that the rule is connected to. * @maxLength 100 * @minLength 1 * @deprecated DEPRECATED. Defines the app that the rule is connected to. * @replacedBy app_id * @targetRemovalDate 2023-02-19 */ label?: string | null; /** * Defines the app that the rule is connected to. * @format GUID */ appId?: string | null; /** Rounding strategy to apply to fee and tax calculation. */ roundingStrategy?: RoundingStrategyWithLiterals; /** Data Extensions */ extendedFields?: ExtendedFields; /** Tags ([SDK](https://dev.wix.com/docs/sdk/backend-modules/tags/tags/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/tags/introduction)) used to classify and sort different types of rules. */ tags?: Tags; } /** @oneof */ interface RuleValueOneOf { /** * Fixed fee. Must hold a positive value. * @deprecated Fixed fee. Must hold a positive value. * @replacedBy fixed_fee * @targetRemovalDate 2024-02-15 */ amount?: CommonMoney; /** * Percentage fee. For example, `5` represents a 5% fee applied to the order's total. * @decimalValue options { maxScale:2, gte:0, lte:100 } * @deprecated * @replacedBy percentage_fee * @targetRemovalDate 2024-02-15 */ percentage?: string | null; } /** @oneof */ interface RuleRequirementsOneOf { /** Fixed fee. Must hold a positive value. */ fixedFee?: Money; /** * Percentage fee. For example, `5` represents a 5% fee applied to the order's total. * @decimalValue options { maxScale:2, gte:0, lte:100 } */ percentageFee?: string | null; } /** @oneof */ interface RuleConditionsOneOf { /** * Single condition that must be met for the rule to be applied to an order. * @deprecated Single condition that must be met for the rule to be applied to an order. * @replacedBy condition_options * @targetRemovalDate 2024-02-15 */ condition?: Condition; /** * Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. * @deprecated Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. * @replacedBy condition_tree_options * @targetRemovalDate 2024-02-15 */ conditionTree?: ConditionTree; } /** @oneof */ interface RuleConditionTypeOptionsOneOf { /** Single condition that must be met for the rule to be applied to an order. */ conditionOptions?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ conditionTreeOptions?: ConditionTree; } /** @oneof */ interface RuleTaxesOneOf { /** Percentage value to apply as a custom tax rate. Range: [0-100]. */ customTaxRate?: string | null; /** * Tax group ID. Internal only. * @format GUID */ taxGroupId?: string | null; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ interface CommonMoney { /** * Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. * @format DECIMAL_VALUE */ value?: string; /** * Currency code. Must be valid ISO 4217 currency code (e.g., USD). * @format CURRENCY */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ interface Money { /** * Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. * @format DECIMAL_VALUE */ value?: string; /** * Currency code. Must be valid ISO 4217 currency code (e.g., USD). * @format CURRENCY */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } interface Condition extends ConditionValueOneOf { /** * Contains a numeric value and an operation. * * Required if `expectedFieldType` is `NUMBER`. */ number?: _Number; /** * Contains an array of strings to compare with the value of the specified field. If the value of the field matches a string in the array, the condition is considered met. * * Required if `expectedFieldType` is `LIST`. */ list?: List; /** * Path of the field in the order entity that this condition will evaluate. For example, `priceSummary.subtotal`. * @maxLength 1000 * @deprecated * @replacedBy order_field_path * @targetRemovalDate 2024-02-15 */ path?: string; /** * Path of the field in the order entity that this condition will evaluate. For example, `priceSummary.subtotal`. * @maxLength 1000 */ orderFieldPath?: string; /** * Type of the field specified in `orderFieldPath`. For example, the type of `priceSummary.subtotal` is `"NUMBER"`). * @deprecated Type of the field specified in `orderFieldPath`. For example, the type of `priceSummary.subtotal` is `"NUMBER"`). * @replacedBy expected_field_type * @targetRemovalDate 2024-02-15 */ expectedType?: ExpectedType; /** Type of the field specified in `orderFieldPath`. For example, the type of `priceSummary.subtotal` is `"NUMBER"`). */ expectedFieldType?: ExpectedFieldTypeWithLiterals; } /** @oneof */ interface ConditionValueOneOf { /** * Contains a numeric value and an operation. * * Required if `expectedFieldType` is `NUMBER`. */ number?: _Number; /** * Contains an array of strings to compare with the value of the specified field. If the value of the field matches a string in the array, the condition is considered met. * * Required if `expectedFieldType` is `LIST`. */ list?: List; } interface ExpectedType { /** Type of the field specified in `orderFieldPath`. */ value?: ValueWithLiterals; } declare enum Value { /** Represents a number value. */ NUMBER = "NUMBER", /** Represents a string value. */ STRING = "STRING" } /** @enumType */ type ValueWithLiterals = Value | 'NUMBER' | 'STRING'; declare enum ExpectedFieldType { /** Unknown expected field type */ UNKNOWN_EXPECTED_FIELD_TYPE = "UNKNOWN_EXPECTED_FIELD_TYPE", /** Represents a number value. */ NUMBER = "NUMBER", /** Represents a string value. */ STRING = "STRING" } /** @enumType */ type ExpectedFieldTypeWithLiterals = ExpectedFieldType | 'UNKNOWN_EXPECTED_FIELD_TYPE' | 'NUMBER' | 'STRING'; interface _Number { /** Numeric value to compare with the value of the specified field. */ value?: number; /** Operation to use. */ operation?: OperationWithLiterals; } declare enum Operation { /** Equal to. */ EQ = "EQ", /** Strictly less than. */ LT = "LT", /** Less than or equal to. */ LE = "LE", /** Strictly greater than. */ GT = "GT", /** Greater than or equal to. */ GE = "GE" } /** @enumType */ type OperationWithLiterals = Operation | 'EQ' | 'LT' | 'LE' | 'GT' | 'GE'; interface List { /** * Array of string values to compare with the value of the field. If the value of the fields matches a string in the array, the condition is considered met. * @minSize 1 * @maxSize 100 * @minLength 1 * @maxLength 100 */ values?: string[]; } /** Used to represent a logical condition in the form of a tree structure. */ interface ConditionTree extends ConditionTreeLeftConditionNodeOneOf, ConditionTreeRightConditionNodeOneOf { /** Single condition that must be met for the rule to be applied to an order. */ leftCondition?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ leftConditionsTree?: ConditionTree; /** Single condition that must be met for the rule to be applied to an order. */ rightCondition?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ rightConditionsTree?: ConditionTree; /** Specifies the logical operator to use when combining the evaluation of the left and right conditions. */ operator?: OperatorWithLiterals; } /** @oneof */ interface ConditionTreeLeftConditionNodeOneOf { /** Single condition that must be met for the rule to be applied to an order. */ leftCondition?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ leftConditionsTree?: ConditionTree; } /** @oneof */ interface ConditionTreeRightConditionNodeOneOf { /** Single condition that must be met for the rule to be applied to an order. */ rightCondition?: Condition; /** Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order. */ rightConditionsTree?: ConditionTree; } declare enum Operator { /** The condition is true if both the left and right sides are true. */ AND = "AND", /** The condition is true if either the left or right side is true. */ OR = "OR" } /** @enumType */ type OperatorWithLiterals = Operator | 'AND' | 'OR'; declare enum ConditionsType { /** Indicates that the Rule has no conditions specified. */ NO_CONDITIONS = "NO_CONDITIONS", /** Indicates that the Rule has a single Condition. */ CONDITION = "CONDITION", /** Indicates that the Rule has a complex condition specified as a ConditionTree. */ CONDITION_TREE = "CONDITION_TREE" } /** @enumType */ type ConditionsTypeWithLiterals = ConditionsType | 'NO_CONDITIONS' | 'CONDITION' | 'CONDITION_TREE'; declare enum ConditionType { /** Indicates that the Rule has no conditions specified. */ UNDEFINED_CONDITION_TYPE = "UNDEFINED_CONDITION_TYPE", /** Indicates that the Rule has a single Condition. */ CONDITION = "CONDITION", /** Indicates that the Rule has a complex condition specified as a ConditionTree. */ CONDITION_TREE = "CONDITION_TREE" } /** @enumType */ type ConditionTypeWithLiterals = ConditionType | 'UNDEFINED_CONDITION_TYPE' | 'CONDITION' | 'CONDITION_TREE'; declare enum RoundingStrategy { /** Rounds up any number exactly halfway between two integers. For example, `2.5` rounds to `3`, and `3.5` and rounds to `4`. */ HALF_UP = "HALF_UP", /** Rounds such numbers to the nearest even integer. For example, `2.5` rounds to `2`, but `3.5` rounds to `4`. */ HALF_EVEN = "HALF_EVEN" } /** @enumType */ type RoundingStrategyWithLiterals = RoundingStrategy | 'HALF_UP' | 'HALF_EVEN'; interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface CalculateServiceFeesRequest { /** Order information needed to evaluate the rules and calculate the relevant fees. */ order: Order; /** * DEPRECATED. Defines the app that the rule is connected to. * @maxLength 100 * @minLength 1 * @deprecated DEPRECATED. Defines the app that the rule is connected to. * @replacedBy app_id * @targetRemovalDate 2023-02-19 */ label?: string | null; /** * Defines the app that the rule is connected to. * @format GUID */ appId?: string | null; } interface Order { /** * Order ID. * @readonly */ id?: string; /** * ID of the site's location. * @format GUID */ locationId?: string | null; /** * Currency used for pricing on the site. * @format CURRENCY */ currency?: string | null; /** Information about the price of the order. */ priceSummary?: PriceSummary; /** Order's shipping information. */ shippingInfo?: ShippingInformation; /** Platform on which the order was placed. */ platform?: Platform; /** Order's locale. */ locale?: Locale; } interface PriceSummary { /** * Subtotal of the order. * @decimalValue options { maxScale:3 } */ subtotal?: string; } interface ShippingInformation { /** Information about the type of delivery. For example, pick-up. */ logistics?: DeliveryLogistics; } interface DeliveryLogistics { /** Type of delivery. For example, pick-up. */ type?: TypeWithLiterals; } declare enum Type { /** Missing type due to an error. */ UNSPECIFIED_FULFILLMENT_TYPE = "UNSPECIFIED_FULFILLMENT_TYPE", /** Pickup */ PICKUP = "PICKUP", /** Delivery */ DELIVERY = "DELIVERY", /** Dine-in */ DINE_IN = "DINE_IN", /** Curbside-pickup */ CURBSIDE_PICKUP = "CURBSIDE_PICKUP" } /** @enumType */ type TypeWithLiterals = Type | 'UNSPECIFIED_FULFILLMENT_TYPE' | 'PICKUP' | 'DELIVERY' | 'DINE_IN' | 'CURBSIDE_PICKUP'; interface Platform { /** Platform on which the order was placed. */ value?: PlatformValueWithLiterals; } declare enum PlatformValue { /** Site */ SITE = "SITE", /** Mobile site */ MOBILE_SITE = "MOBILE_SITE", /** Mobile app */ MOBILE_APP = "MOBILE_APP" } /** @enumType */ type PlatformValueWithLiterals = PlatformValue | 'SITE' | 'MOBILE_SITE' | 'MOBILE_APP'; interface Locale { /** * Locale in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, followed by an uppercase 2-letter country code. * For example, `en-US` for U.S. English, and `de-DE` for Germany German. */ languageCode?: string | null; /** 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */ country?: string | null; } interface CalculateServiceFeesResponse { /** A list of calculated fees based on rules evaluation. */ calculatedFees?: CalculatedFee[]; } interface CalculatedFee { /** * The ID of the rule that was used to calculate the fee. * @format GUID */ ruleId?: string; /** * The name of the rule that was used to calculate the fee. * @readonly */ name?: string; /** Fee amount. */ fee?: Money; /** Tax amount. */ tax?: Money; /** * Tax group ID. This is an alternative to calculating the tax amount manually. * @format GUID */ taxGroupId?: string | null; } interface CreateRuleRequest { /** Rule to create. */ rule: Rule; } interface CreateRuleResponse { /** Created rule */ rule?: Rule; } interface GetRuleRequest { /** * ID of the rule to retrieve. * @format GUID */ ruleId: string; } interface GetRuleResponse { /** The retrieved rule. */ rule?: Rule; } interface UpdateRuleRequest { /** Rule to update. */ rule: Rule; } interface UpdateRuleResponse { /** Updated rule. */ rule?: Rule; } interface DeleteRuleRequest { /** * ID of the rule to delete. * @format GUID */ ruleId: string; } interface DeleteRuleResponse { } interface ListRulesRequest { /** * Retrieve only rule that apply at the [location](https://dev.wix.com/docs/rest/api-reference/business-tools/locations/location-object) with this ID. If this field is `null`, the rules will not be filtered by location. * @format GUID */ locationId?: string | null; /** * DEPRECATED. Defines the app that the rule is connected to. * @maxLength 100 * @minLength 1 * @deprecated DEPRECATED. Defines the app that the rule is connected to. * @replacedBy app_id * @targetRemovalDate 2023-02-19 */ label?: string | null; /** * Defines the app that the rule is connected to. * @format GUID */ appId?: string | null; } interface ListRulesResponse { /** Array containing the retrieved rules. */ rules?: Rule[]; } interface QueryRulesRequest { /** 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. * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) * for more information. */ filter?: Record | null; /** Sort object. */ 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.
* Default: `50` * @max 100 */ 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 QueryRulesResponse { /** The retrieved rules. */ rules?: Rule[]; /** Paging metadata. */ 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 BulkCreateRulesRequest { /** Rules to create. */ rules: Rule[]; /** * Whether the full rule entity is returned.
* Default: `false`. */ returnFullEntity?: boolean; } interface BulkCreateRulesResponse { /** The created rules. Omitted if `returnFullEntity` is set to false. */ results?: BulkRuleResult[]; /** Bulk Create Rule metadata. */ bulkActionMetadata?: CommonBulkActionMetadata; } interface BulkRuleResult { /** Metadata of the rule. */ itemMetadata?: CommonItemMetadata; /** The created rule. */ rule?: Rule; } interface CommonItemMetadata { /** 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 CommonBulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateRulesRequest { /** Masked rules to update. */ rules: MaskedRule[]; /** * Whether the full rule entity is returned.
* Default: `false`. */ returnFullEntity?: boolean; } interface MaskedRule { /** Rule to update. */ rule?: Rule; /** Explicit list of fields to update */ mask?: string[]; } interface BulkUpdateRulesResponse { /** The updated rules. Omitted if `returnFullEntity` is set to false. */ results?: BulkRuleResult[]; /** Bulk Update Rule metadata. */ bulkActionMetadata?: CommonBulkActionMetadata; } interface BulkDeleteRulesRequest { /** * IDs of the rules to delete. * @format GUID */ ruleIds: string[]; } interface BulkDeleteRulesResponse { /** Information about the deleted rules. */ results?: BulkRuleResult[]; /** Bulk Delete Rule metadata. */ bulkActionMetadata?: CommonBulkActionMetadata; } interface BulkUpdateRuleTagsRequest { /** * IDs of the rules to update tags for. * @minSize 1 * @maxSize 100 * @format GUID */ ruleIds: string[]; /** Tags to assign to the rules. */ assignTags?: Tags; /** Tags to unassign from the rules. */ unassignTags?: Tags; } interface BulkUpdateRuleTagsResponse { /** * Results of the bulk update. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateRuleTagsResult[]; /** Metadata for the bulk update. */ bulkActionMetadata?: BulkActionMetadata; } 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 BulkUpdateRuleTagsResult { /** Metadata for the updated rule. */ itemMetadata?: ItemMetadata; } 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 BulkUpdateRuleTagsByFilterRequest { /** Filter that determines which rules to update tags for. */ filter: Record | null; /** Tags to assign to the rules. */ assignTags?: Tags; /** Tags to unassign from the rules. */ unassignTags?: Tags; } interface BulkUpdateRuleTagsByFilterResponse { /** * Job ID. Pass this ID to Get Async Job ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/get-async-job) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job)) to track the job's status. * @format GUID */ jobId?: string; } 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 { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } 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. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: 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 BulkUpdateRuleTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateRuleTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function calculateServiceFees(): __PublicMethodMetaInfo<'POST', {}, CalculateServiceFeesRequest$1, CalculateServiceFeesRequest, CalculateServiceFeesResponse$1, CalculateServiceFeesResponse>; declare function createRule(): __PublicMethodMetaInfo<'POST', {}, CreateRuleRequest$1, CreateRuleRequest, CreateRuleResponse$1, CreateRuleResponse>; declare function getRule(): __PublicMethodMetaInfo<'GET', { ruleId: string; }, GetRuleRequest$1, GetRuleRequest, GetRuleResponse$1, GetRuleResponse>; declare function updateRule(): __PublicMethodMetaInfo<'PATCH', { ruleId: string; }, UpdateRuleRequest$1, UpdateRuleRequest, UpdateRuleResponse$1, UpdateRuleResponse>; declare function deleteRule(): __PublicMethodMetaInfo<'DELETE', { ruleId: string; }, DeleteRuleRequest$1, DeleteRuleRequest, DeleteRuleResponse$1, DeleteRuleResponse>; declare function listRules(): __PublicMethodMetaInfo<'GET', {}, ListRulesRequest$1, ListRulesRequest, ListRulesResponse$1, ListRulesResponse>; declare function queryRules(): __PublicMethodMetaInfo<'POST', {}, QueryRulesRequest$1, QueryRulesRequest, QueryRulesResponse$1, QueryRulesResponse>; declare function bulkCreateRules(): __PublicMethodMetaInfo<'POST', {}, BulkCreateRulesRequest$1, BulkCreateRulesRequest, BulkCreateRulesResponse$1, BulkCreateRulesResponse>; declare function bulkUpdateRules(): __PublicMethodMetaInfo<'PATCH', {}, BulkUpdateRulesRequest$1, BulkUpdateRulesRequest, BulkUpdateRulesResponse$1, BulkUpdateRulesResponse>; declare function bulkDeleteRules(): __PublicMethodMetaInfo<'DELETE', {}, BulkDeleteRulesRequest$1, BulkDeleteRulesRequest, BulkDeleteRulesResponse$1, BulkDeleteRulesResponse>; declare function bulkUpdateRuleTags(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateRuleTagsRequest$1, BulkUpdateRuleTagsRequest, BulkUpdateRuleTagsResponse$1, BulkUpdateRuleTagsResponse>; declare function bulkUpdateRuleTagsByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateRuleTagsByFilterRequest$1, BulkUpdateRuleTagsByFilterRequest, BulkUpdateRuleTagsByFilterResponse$1, BulkUpdateRuleTagsByFilterResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCreateRulesRequest as BulkCreateRulesRequestOriginal, type BulkCreateRulesResponse as BulkCreateRulesResponseOriginal, type BulkDeleteRulesRequest as BulkDeleteRulesRequestOriginal, type BulkDeleteRulesResponse as BulkDeleteRulesResponseOriginal, type BulkRuleResult as BulkRuleResultOriginal, type BulkUpdateRuleTagsApplicationErrors as BulkUpdateRuleTagsApplicationErrorsOriginal, type BulkUpdateRuleTagsByFilterApplicationErrors as BulkUpdateRuleTagsByFilterApplicationErrorsOriginal, type BulkUpdateRuleTagsByFilterRequest as BulkUpdateRuleTagsByFilterRequestOriginal, type BulkUpdateRuleTagsByFilterResponse as BulkUpdateRuleTagsByFilterResponseOriginal, type BulkUpdateRuleTagsRequest as BulkUpdateRuleTagsRequestOriginal, type BulkUpdateRuleTagsResponse as BulkUpdateRuleTagsResponseOriginal, type BulkUpdateRuleTagsResult as BulkUpdateRuleTagsResultOriginal, type BulkUpdateRulesRequest as BulkUpdateRulesRequestOriginal, type BulkUpdateRulesResponse as BulkUpdateRulesResponseOriginal, type CalculateServiceFeesRequest as CalculateServiceFeesRequestOriginal, type CalculateServiceFeesResponse as CalculateServiceFeesResponseOriginal, type CalculatedFee as CalculatedFeeOriginal, type CommonBulkActionMetadata as CommonBulkActionMetadataOriginal, type CommonItemMetadata as CommonItemMetadataOriginal, type CommonMoney as CommonMoneyOriginal, type Condition as ConditionOriginal, type ConditionTreeLeftConditionNodeOneOf as ConditionTreeLeftConditionNodeOneOfOriginal, type ConditionTree as ConditionTreeOriginal, type ConditionTreeRightConditionNodeOneOf as ConditionTreeRightConditionNodeOneOfOriginal, ConditionType as ConditionTypeOriginal, type ConditionTypeWithLiterals as ConditionTypeWithLiteralsOriginal, type ConditionValueOneOf as ConditionValueOneOfOriginal, ConditionsType as ConditionsTypeOriginal, type ConditionsTypeWithLiterals as ConditionsTypeWithLiteralsOriginal, type CreateRuleRequest as CreateRuleRequestOriginal, type CreateRuleResponse as CreateRuleResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteRuleRequest as DeleteRuleRequestOriginal, type DeleteRuleResponse as DeleteRuleResponseOriginal, type DeliveryLogistics as DeliveryLogisticsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, ExpectedFieldType as ExpectedFieldTypeOriginal, type ExpectedFieldTypeWithLiterals as ExpectedFieldTypeWithLiteralsOriginal, type ExpectedType as ExpectedTypeOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetRuleRequest as GetRuleRequestOriginal, type GetRuleResponse as GetRuleResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type List as ListOriginal, type ListRulesRequest as ListRulesRequestOriginal, type ListRulesResponse as ListRulesResponseOriginal, type Locale as LocaleOriginal, type MaskedRule as MaskedRuleOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Money as MoneyOriginal, Operation as OperationOriginal, type OperationWithLiterals as OperationWithLiteralsOriginal, Operator as OperatorOriginal, type OperatorWithLiterals as OperatorWithLiteralsOriginal, type Order as OrderOriginal, type Platform as PlatformOriginal, PlatformValue as PlatformValueOriginal, type PlatformValueWithLiterals as PlatformValueWithLiteralsOriginal, type PriceSummary as PriceSummaryOriginal, type QueryRulesRequest as QueryRulesRequestOriginal, type QueryRulesResponse as QueryRulesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, RoundingStrategy as RoundingStrategyOriginal, type RoundingStrategyWithLiterals as RoundingStrategyWithLiteralsOriginal, type RuleConditionTypeOptionsOneOf as RuleConditionTypeOptionsOneOfOriginal, type RuleConditionsOneOf as RuleConditionsOneOfOriginal, type Rule as RuleOriginal, type RuleRequirementsOneOf as RuleRequirementsOneOfOriginal, type RuleTaxesOneOf as RuleTaxesOneOfOriginal, type RuleValueOneOf as RuleValueOneOfOriginal, type ShippingInformation as ShippingInformationOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TagList as TagListOriginal, type Tags as TagsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type UpdateRuleRequest as UpdateRuleRequestOriginal, type UpdateRuleResponse as UpdateRuleResponseOriginal, Value as ValueOriginal, type ValueWithLiterals as ValueWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type _Number as _NumberOriginal, type __PublicMethodMetaInfo, bulkCreateRules, bulkDeleteRules, bulkUpdateRuleTags, bulkUpdateRuleTagsByFilter, bulkUpdateRules, calculateServiceFees, createRule, deleteRule, getRule, listRules, queryRules, updateRule };