@wix/auto_sdk_ecom_discount-rules 1.0.67 → 1.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ecom-discounts-v1-discount-rule-discount-rules.http.ts","../../src/ecom-discounts-v1-discount-rule-discount-rules.types.ts","../../src/ecom-discounts-v1-discount-rule-discount-rules.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomDiscountsDiscountRuleServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/discount-rules-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n {\n srcPath: '/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/discounts/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n _: [\n {\n srcPath: '/ecom/discounts/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_discount-rules';\n\n/**\n * Creates a new discount rule.\n *\n *\n * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.\n */\nexport function createDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDiscountRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDiscountRule;\n}\n\n/**\n * Retrieves a discount rule.\n *\n *\n * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.\n */\nexport function getDiscountRule(payload: object): RequestOptionsFactory<any> {\n function __getDiscountRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'GET' as any,\n methodFqn: 'com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRuleId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDiscountRule;\n}\n\n/**\n * Updates a discount rule's properties.\n *\n *\n * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.\n *\n * Each time the discount rule is updated, `revision` increments by 1. The existing `revision` must be included when updating the discount rule. This ensures you're working with the latest discount rule information, and it prevents unintended overwrites.\n */\nexport function updateDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateDiscountRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRule.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateDiscountRule;\n}\n\n/**\n * Deletes a discount rule.\n *\n *\n * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.\n */\nexport function deleteDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteDiscountRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.DeleteDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRuleId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteDiscountRule;\n}\n\n/**\n * Creates a query to retrieve a list of discount rules.\n *\n *\n * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](/discount-rules/discount-rules-query-builder/find) function.\n *\n * You can refine the query by chaining `DiscountRulesQueryBuilder` functions onto the query. `DiscountRulesQueryBuilder` functions enable you to sort, filter, and control the results queryDiscountRules() returns.\n *\n * By default, `queryDiscountRules()` sorts results by [`ascending(\"_id\")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.\n *\n * To learn how to query posts, refer to the table below.\n *\n * The following `DiscountRulesQueryBuilder` functions are supported for the `queryDiscountRules()` function. For a full description of the discount rule object, see the object returned for the [`items`](/discount-rules/discount-rules-query-result/items) property in the `DiscountRulesQueryResult`.\n */\nexport function queryDiscountRules(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryDiscountRules({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRules.createdDate' },\n { path: 'discountRules.updatedDate' },\n { path: 'discountRules.activeTimeInfo.start' },\n { path: 'discountRules.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRules.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryDiscountRules;\n}\n","export interface DiscountRule {\n /**\n * Discount rule ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the discount rule is updated.\n * To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the discount rule was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the discount rule was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Whether the discount rule is active.\n *\n * Default: `true`\n */\n active?: boolean | null;\n /**\n * Discount rule name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Discount rule trigger.\n * A set of conditions that must be met for the `discounts` to be applied.\n * Not passing a trigger will cause the discount to always apply.\n */\n trigger?: DiscountTrigger;\n /** Time frame in which the discount rule is active. */\n activeTimeInfo?: ActiveTimeInfo;\n /**\n * List of discounts that are applied when one or more triggers are met.\n *\n * > **Notes:**\n * >\n * > + Currently, only 1 discount can be defined per discount rule.\n * > + A discount rule can be applied on multiple items per cart.\n * > + A discount rule can only be applied once per item.\n */\n discounts?: Discounts;\n /**\n * Discount rule status.\n * Default: `UNDEFINED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Number of times the discount rule was used.\n * @readonly\n */\n usageCount?: number;\n}\n\n/** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */\nexport interface DiscountTrigger extends DiscountTriggerTriggerOneOf {\n /** Chain multiple triggers with the `and` operator. */\n and?: And;\n /** Chain multiple triggers with the `or` operator. */\n or?: Or;\n /** Custom trigger. */\n customTrigger?: Custom;\n /** Subtotal trigger range. */\n subtotalRange?: SubtotalRange;\n /** Item quantity trigger range. */\n itemQuantityRange?: ItemQuantityRange;\n /** Trigger type. */\n triggerType?: TriggerTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountTriggerTriggerOneOf {\n /** Chain multiple triggers with the `and` operator. */\n and?: And;\n /** Chain multiple triggers with the `or` operator. */\n or?: Or;\n /** Custom trigger. */\n customTrigger?: Custom;\n /** Subtotal trigger range. */\n subtotalRange?: SubtotalRange;\n /** Item quantity trigger range. */\n itemQuantityRange?: ItemQuantityRange;\n}\n\n/**\n * This object represents a scope of catalog items. Examples:\n * 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id`\n * 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`\n * 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'\n */\nexport interface Scope extends ScopeScopeItemsOneOf {\n /** Catalog item filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n catalogItemFilter?: CatalogItemFilter;\n /** Custom filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n customFilter?: CustomFilter;\n /**\n * Scope ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /** Scope type. */\n type?: ScopeTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ScopeScopeItemsOneOf {\n /** Catalog item filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n catalogItemFilter?: CatalogItemFilter;\n /** Custom filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n customFilter?: CustomFilter;\n}\n\nexport enum ScopeType {\n UNDEFINED_SCOPE = 'UNDEFINED_SCOPE',\n /** Specific catalog items */\n CATALOG_ITEM = 'CATALOG_ITEM',\n /** Specific items by custom filters */\n CUSTOM_FILTER = 'CUSTOM_FILTER',\n}\n\n/** @enumType */\nexport type ScopeTypeWithLiterals =\n | ScopeType\n | 'UNDEFINED_SCOPE'\n | 'CATALOG_ITEM'\n | 'CUSTOM_FILTER';\n\nexport interface CatalogItemFilter {\n /**\n * Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`.\n * @format GUID\n */\n catalogAppId?: string;\n /**\n * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores.\n * @minLength 1\n * @maxLength 36\n * @maxSize 50\n */\n catalogItemIds?: string[];\n}\n\nexport interface CustomFilter {\n /**\n * Custom filter app ID, when relevant.\n * @format GUID\n */\n appId?: string;\n /**\n * Custom filter in `{ \"key\": \"value\" }` form.\n * For example, an array of `collectionIDs`:\n * `{ [\"collectionId\": \"12345\"], [\"collectionId\": \"67890\"] }`.\n */\n params?: Record<string, any> | null;\n}\n\nexport interface And {\n /**\n * List of triggers to have an \"AND\" operator between their results.\n * @minSize 2\n * @maxSize 5\n */\n triggers?: DiscountTrigger[];\n}\n\nexport interface Or {\n /**\n * List of triggers to have an \"OR\" operator between their results.\n * @minSize 2\n * @maxSize 5\n */\n triggers?: DiscountTrigger[];\n}\n\nexport interface Custom {\n /**\n * Trigger ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * ID of the app that created the trigger.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface SubtotalRange {\n /**\n * Relevant scopes for `SPECIFIC_ITEMS` target type.\n * @maxSize 50\n */\n scopes?: Scope[];\n /**\n * Minimum subtotal price (inclusive).\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n from?: string | null;\n /**\n * Maximum subtotal price (inclusive).\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n to?: string | null;\n}\n\nexport interface ItemQuantityRange {\n /**\n * Relevant scopes for `SPECIFIC_ITEMS` target type.\n * @maxSize 50\n */\n scopes?: Scope[];\n /**\n * Minimum item quantity (inclusive).\n * @min 1\n */\n from?: number | null;\n /**\n * Maximum item quantity (inclusive).\n * @min 1\n */\n to?: number | null;\n}\n\nexport interface CustomerEligibility extends CustomerEligibilityOptionsOneOf {\n /** Information about specific members. */\n individualMembersInfo?: IndividualMembers;\n}\n\n/** @oneof */\nexport interface CustomerEligibilityOptionsOneOf {\n /** Information about specific members. */\n individualMembersInfo?: IndividualMembers;\n}\n\nexport enum EligibilityType {\n /** Eligibility type is not defined. */\n UNKNOWN_ELIGIBILITY_TYPE = 'UNKNOWN_ELIGIBILITY_TYPE',\n /** Only specific customers based on member id. */\n INDIVIDUAL_MEMBERS = 'INDIVIDUAL_MEMBERS',\n}\n\n/** @enumType */\nexport type EligibilityTypeWithLiterals =\n | EligibilityType\n | 'UNKNOWN_ELIGIBILITY_TYPE'\n | 'INDIVIDUAL_MEMBERS';\n\nexport interface ContactSegments {\n /**\n * Eligible segment ids.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n segmentIds?: string[];\n}\n\nexport interface ContactTags {\n /**\n * Eligible tag and label ids.\n * @minSize 1\n * @maxSize 100\n */\n tagReferences?: TagReference[];\n}\n\nexport interface TagReference {\n /**\n * Eligible tag id.\n * @maxLength 5\n */\n tagId?: string;\n /**\n * Eligible label id.\n * @maxLength 80\n */\n labelKey?: string;\n}\n\nexport interface IndividualMembers {\n /**\n * Eligible member ids.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n memberIds?: string[];\n}\n\nexport enum TriggerType {\n UNDEFINED = 'UNDEFINED',\n /** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */\n AND = 'AND',\n /** Subtotal must be within the specified `subtotalRange` values. */\n SUBTOTAL_RANGE = 'SUBTOTAL_RANGE',\n /** Quantity of items in scope must be within specified `itemQuantityRange` values. */\n ITEM_QUANTITY_RANGE = 'ITEM_QUANTITY_RANGE',\n /** Custom trigger type defined in `customTrigger` object. */\n CUSTOM = 'CUSTOM',\n /** Chain multiple triggers with OR operator */\n OR = 'OR',\n}\n\n/** @enumType */\nexport type TriggerTypeWithLiterals =\n | TriggerType\n | 'UNDEFINED'\n | 'AND'\n | 'SUBTOTAL_RANGE'\n | 'ITEM_QUANTITY_RANGE'\n | 'CUSTOM'\n | 'OR';\n\nexport interface ActiveTimeInfo {\n /** Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */\n start?: Date | null;\n /** Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */\n end?: Date | null;\n}\n\nexport interface Recurrence {\n /** Weekly discount recurrence. */\n weeklySchedule?: WeeklySchedule;\n}\n\nexport enum DayOfWeek {\n UNKOWN_DAY_OF_WEEK = 'UNKOWN_DAY_OF_WEEK',\n /** Monday. */\n MON = 'MON',\n /** Tuesday. */\n TUE = 'TUE',\n /** Wednesday. */\n WED = 'WED',\n /** Thursday. */\n THU = 'THU',\n /** Friday. */\n FRI = 'FRI',\n /** Saturday. */\n SAT = 'SAT',\n /** Sunday. */\n SUN = 'SUN',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n | DayOfWeek\n | 'UNKOWN_DAY_OF_WEEK'\n | 'MON'\n | 'TUE'\n | 'WED'\n | 'THU'\n | 'FRI'\n | 'SAT'\n | 'SUN';\n\nexport interface TimeOfDay {\n /**\n * Hours. Min: `0`. Max: `23`.\n * @max 23\n */\n hours?: number;\n /**\n * Minutes. Min: `0`. Max: `59`.\n * @max 59\n */\n minutes?: number;\n}\n\nexport interface TimeWindow {\n /** Day of week. */\n dayOfWeek?: DayOfWeekWithLiterals;\n /** Start time window during each recurrence. */\n startTime?: TimeOfDay;\n /** End time window during each recurrence. */\n endTime?: TimeOfDay;\n}\n\nexport interface WeeklySchedule {\n /**\n * A list of days with their respective active time ranges.\n * @minSize 1\n * @maxSize 100\n */\n timeWindows?: TimeWindow[];\n}\n\nexport interface Discounts {\n /**\n * Discounts.\n * @minSize 1\n * @maxSize 1\n */\n values?: Discount[];\n}\n\nexport interface Discount extends DiscountDiscountOneOf {\n /**\n * Percentage to discount from original price.\n * @min 0.1\n * @max 100\n */\n percentage?: number;\n /**\n * Amount to discount from original price.\n * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }\n */\n fixedAmount?: string;\n /**\n * Fixed price. Line item will be fixed to this price.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n fixedPrice?: string;\n /** A special price is applied for a specific quantity of items. For example, 3 for $10. */\n quantityBased?: QuantityBased;\n /**\n * Discount target.\n *\n * + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.\n */\n targetType?: TypeWithLiterals;\n /** Data related to `SPECIFIC_ITEMS` target type. */\n specificItemsInfo?: SpecificItemsInfo;\n /** Discount type. */\n discountType?: DiscountTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountDiscountOneOf {\n /**\n * Percentage to discount from original price.\n * @min 0.1\n * @max 100\n */\n percentage?: number;\n /**\n * Amount to discount from original price.\n * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }\n */\n fixedAmount?: string;\n /**\n * Fixed price. Line item will be fixed to this price.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n fixedPrice?: string;\n /** A special price is applied for a specific quantity of items. For example, 3 for $10. */\n quantityBased?: QuantityBased;\n}\n\nexport enum Type {\n /** Target type is not defined */\n UNDEFINED = 'UNDEFINED',\n /** Target type is a set of specific items */\n SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNDEFINED' | 'SPECIFIC_ITEMS';\n\nexport interface SpecificItemsInfo {\n /**\n * All associated scopes for `SPECIFIC_ITEMS` target type.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\n/** A special price is applied for a specific quantity of items. For example, 3 for $10. */\nexport interface QuantityBased {\n /**\n * list of discountConfig options.\n * @minSize 1\n * @maxSize 1\n */\n configurations?: DiscountConfig[];\n}\n\nexport interface DiscountConfig {\n /**\n * DiscountConfig ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * The number of items that must be added to the cart to be eligible for the discount (Represents X).\n * @min 2\n */\n quantity?: number;\n /**\n * The DiscountConfig price (Represents Amount).\n * @decimalValue options { gte:0, lte:1000000, maxScale:4 }\n */\n price?: string;\n}\n\nexport enum DiscountType {\n UNDEFINED = 'UNDEFINED',\n /** Price is reduced by percentage value. */\n PERCENTAGE = 'PERCENTAGE',\n /** Price is reduced by fixed amount. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Price will be set to fixed amount. */\n FIXED_PRICE = 'FIXED_PRICE',\n /**\n * Quantity based options for Buy X For Amount.\n * @documentationMaturity preview\n */\n QUANTITY_BASED = 'QUANTITY_BASED',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'UNDEFINED'\n | 'PERCENTAGE'\n | 'FIXED_AMOUNT'\n | 'FIXED_PRICE'\n | 'QUANTITY_BASED';\n\nexport interface BuyXGetYInfo {\n /** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */\n customerBuys?: CustomerBuy;\n /** Information about which items will be discounted (get Y). */\n customerGets?: CustomerGet;\n /**\n * The maximum number of times the 'buy X get Y' discount can be applied.\n * For example, when the value of `limit` is `2`, with a \"2+1\" sale on all items, the following logic applies:\n * + Buy 2 get 1, buy 3 get 1.\n * + Buy 4 get 2, buy 6 get 2, buy 9 get 2, and so on.\n * @min 1\n */\n limit?: number | null;\n}\n\nexport interface CustomerBuy extends CustomerBuyConditionOneOf {\n /**\n * Minimum number of items the customer must add to the cart to be eligible for a discount.\n * @min 1\n */\n minimumQuantity?: number;\n /**\n * Minimum price the customer must add to the cart to be eligible for a discount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n minimumSpend?: string | null;\n /**\n * Scopes of the items that must be added to the cart to enable the discount.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\n/** @oneof */\nexport interface CustomerBuyConditionOneOf {\n /**\n * Minimum number of items the customer must add to the cart to be eligible for a discount.\n * @min 1\n */\n minimumQuantity?: number;\n /**\n * Minimum price the customer must add to the cart to be eligible for a discount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n minimumSpend?: string | null;\n}\n\nexport interface CustomerGet {\n /**\n * Exact number of items in the cart that will be discounted.\n * If the cart contains fewer items than the value of quantity, the discount will not apply.\n * @min 1\n */\n quantity?: number;\n /**\n * Scopes of the items that will be discounted.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\nexport enum Status {\n /** Rule status is not defined. */\n UNDEFINED = 'UNDEFINED',\n /** Rule status is live. */\n LIVE = 'LIVE',\n /** Rule status is expired, it might have been live in the past. */\n EXPIRED = 'EXPIRED',\n /** Rule status is pending, it might be live in the future. */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNDEFINED'\n | 'LIVE'\n | 'EXPIRED'\n | 'PENDING';\n\n/** The discount settings */\nexport interface DiscountSettings {\n /** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */\n appliesTo?: AppliedSubjectTypeWithLiterals;\n /**\n * Whether the discount will apply to subscriptions.\n *\n * Default: `false`\n */\n includeSubscription?: boolean | null;\n /**\n * Maximum total number of uses allowed for the discount rule.\n * @min 1\n * @max 2147483646\n */\n usageLimit?: number | null;\n /**\n * The usage limit per user per discount.\n * When not provided, this setting will not apply.\n * @min 1\n * @max 2147483646\n */\n usageLimitPerUser?: number | null;\n}\n\n/** TODO: check if can be removed */\nexport enum AppliedSubjectType {\n UNDEFINED = 'UNDEFINED',\n /** Discount applies to all items at checkout. */\n ALL_ITEMS = 'ALL_ITEMS',\n /** Discount applies to the lowest priced item at checkout. */\n LOWEST_PRICED_ITEM = 'LOWEST_PRICED_ITEM',\n}\n\n/** @enumType */\nexport type AppliedSubjectTypeWithLiterals =\n | AppliedSubjectType\n | 'UNDEFINED'\n | 'ALL_ITEMS'\n | 'LOWEST_PRICED_ITEM';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateDiscountRuleRequest {\n /** Discount rule info. */\n discountRule: DiscountRule;\n}\n\nexport interface CreateDiscountRuleResponse {\n /** Discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface GetDiscountRuleRequest {\n /**\n * ID of the discount rule to retrieve.\n * @format GUID\n */\n discountRuleId: string;\n}\n\nexport interface GetDiscountRuleResponse {\n /** The requested discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface UpdateDiscountRuleRequest {\n /** Discount rule info. */\n discountRule: DiscountRule;\n}\n\nexport interface UpdateDiscountRuleResponse {\n /** Updated discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface DeleteDiscountRuleRequest {\n /**\n * ID of the discount rule to delete.\n * @format GUID\n */\n discountRuleId: string;\n}\n\nexport interface DeleteDiscountRuleResponse {}\n\nexport interface QueryDiscountRulesRequest {\n /** Query options. */\n query?: PlatformQuery;\n}\n\nexport interface PlatformQuery extends PlatformQueryPagingMethodOneOf {\n /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n paging?: PlatformPaging;\n /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /** Filter object. */\n filter?: Record<string, any> | null;\n /** Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`. */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface PlatformQueryPagingMethodOneOf {\n /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n paging?: PlatformPaging;\n /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface PlatformPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryDiscountRulesResponse {\n /** List of discount rules. */\n discountRules?: DiscountRule[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PlatformPagingMetadata;\n}\n\nexport interface PlatformPagingMetadata {\n /** The number of items returned in this response. */\n count?: number | null;\n /** The offset which was requested. Returned if offset paging was used. */\n offset?: number | null;\n /** The total number of items that match the query. Returned if offset paging was used. */\n total?: number | null;\n /** Cursors to navigate through result pages. Returned if cursor paging was used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface GetAppliedDiscountsRequest {\n /**\n * Line items for which to check for discount rules.\n * @maxSize 1000\n */\n lineItems?: LineItem[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /** Buyer Information */\n buyerInfo?: BuyerInfo;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * Line item quantity.\n * @max 100000\n */\n quantity?: number | null;\n /** Catalog and item reference info. Learn more about [integrating Wix Stores products with Wix eCommerce](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration). */\n catalogReference?: CatalogReference;\n /**\n * Line item price.\n * @decimalValue options { gte:0 }\n */\n price?: string;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface BuyerInfo {\n /**\n * Email of the customer.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id of the customer.\n * @format GUID\n */\n memberId?: string | null;\n}\n\nexport interface ShippingInfo {\n /** Address (if applicable). */\n address?: Address;\n /**\n * Preferred shipping option code. For example, \"usps_std_overnight\".\n * @minLength 1\n * @maxLength 100\n */\n preferredShippingOptionCode?: string | null;\n}\n\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n}\n\nexport interface GetAppliedDiscountsResponse {\n /** All eligible discounts. */\n appliedDiscounts?: AppliedDiscount[];\n}\n\nexport interface AppliedDiscount {\n /** Discount type. */\n discountType?: TypeWithLiterals;\n /**\n * IDs of line items the discount applies to, in GUID format.\n * @format GUID\n * @maxSize 1000\n */\n lineItemIds?: string[];\n /** Applied discount rule. */\n appliedDiscountRule?: AppliedDiscountRule;\n}\n\nexport interface AppliedDiscountRule {\n /**\n * Applied discount rule ID.\n * @format GUID\n */\n id?: string;\n /** Discount rule name. */\n name?: DiscountRuleName;\n /** Total amount reduced from all discounted line items. */\n amount?: MultiCurrencyPrice;\n /** Discount rule type. */\n discountRuleType?: DiscountTypeWithLiterals;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language.\n *\n * Default: `original`\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface ItemCombination {\n /**\n * Number of times this specific bundle composition was formed\n * by the discount rule.\n */\n repeatCount?: number;\n /**\n * Line items that participated together in this bundle composition.\n * @maxSize 100\n */\n lineItems?: ItemCombinationLineItem[];\n}\n\nexport interface ItemCombinationLineItem {\n /**\n * Line item ID that took part in this bundle composition.\n * @format GUID\n */\n lineItemId?: string;\n /** Discount amount applied to this line item *per bundle composition*. */\n amount?: MultiCurrencyPrice;\n /**\n * Number of units from this line item that participated\n * in a single bundle composition.\n * @min 1\n * @max 1000000\n */\n discountedQuantity?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface DiscountRuleUsageLimitReached {\n /** Discount Rule */\n rule?: DiscountRule;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateDiscountRuleApplicationErrors =\n | {\n code?: 'MAX_DISCOUNT_RULES_REACHED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_QUANTITY_BASED_DISCOUNTS_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDiscountRuleValidationErrors =\n | {\n ruleName?: 'INVALID_ACTIVE_TIME_RANGE';\n }\n | {\n ruleName?: 'INVALID_EMPTY_DISCOUNT';\n }\n | {\n ruleName?: 'INVALID_DISCOUNT_TYPE';\n }\n | {\n ruleName?: 'MISSING_SUBTOTAL_RANGE';\n }\n | {\n ruleName?: 'MISSING_ITEM_QUANTITY_RANGE';\n }\n | {\n ruleName?: 'INVALID_SUBTOTAL_RANGE';\n }\n | {\n ruleName?: 'INVALID_ITEM_QUANTITY_RANGE';\n }\n | {\n ruleName?: 'INVALID_TARGET_TYPE_FIELD';\n }\n | {\n ruleName?: 'OPERATOR_TOO_DEEPLY_NESTED';\n }\n | {\n ruleName?: 'INVALID_SCOPE_TYPE';\n }\n | {\n ruleName?: 'INVALID_TRIGGER_TYPE';\n }\n | {\n ruleName?: 'INVALID_SETTINGS_SUBJECT_TYPE';\n }\n | {\n ruleName?: 'INVALID_CUSTOMER_BUY_CONDITION';\n }\n | {\n ruleName?: 'INVALID_SCOPE';\n };\n","import * as ambassadorWixEcomDiscountsV1DiscountRule from './ecom-discounts-v1-discount-rule-discount-rules.http.js';\nimport * as ambassadorWixEcomDiscountsV1DiscountRuleTypes from './ecom-discounts-v1-discount-rule-discount-rules.types.js';\nimport * as ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes from './ecom-discounts-v1-discount-rule-discount-rules.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createDiscountRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.CreateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.CreateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.CreateDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.CreateDiscountRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.createDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/discount-rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getDiscountRule(): __PublicMethodMetaInfo<\n 'GET',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.GetDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.GetDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.GetDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.GetDiscountRuleResponse\n> {\n const payload = { discountRuleId: ':discountRuleId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.getDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/discount-rules/{discountRuleId}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateDiscountRule(): __PublicMethodMetaInfo<\n 'PATCH',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.UpdateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.UpdateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.UpdateDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.UpdateDiscountRuleResponse\n> {\n const payload = { discountRule: { id: ':discountRuleId' } } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.updateDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/discount-rules/{discountRule.id}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteDiscountRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.DeleteDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.DeleteDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.DeleteDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.DeleteDiscountRuleResponse\n> {\n const payload = { discountRuleId: ':discountRuleId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.deleteDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/discount-rules/{discountRuleId}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryDiscountRules(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.QueryDiscountRulesRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.QueryDiscountRulesRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.QueryDiscountRulesResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.QueryDiscountRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.queryDiscountRules(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/discount-rules/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n DiscountRule as DiscountRuleOriginal,\n DiscountTrigger as DiscountTriggerOriginal,\n DiscountTriggerTriggerOneOf as DiscountTriggerTriggerOneOfOriginal,\n Scope as ScopeOriginal,\n ScopeScopeItemsOneOf as ScopeScopeItemsOneOfOriginal,\n ScopeType as ScopeTypeOriginal,\n ScopeTypeWithLiterals as ScopeTypeWithLiteralsOriginal,\n CatalogItemFilter as CatalogItemFilterOriginal,\n CustomFilter as CustomFilterOriginal,\n And as AndOriginal,\n Or as OrOriginal,\n Custom as CustomOriginal,\n SubtotalRange as SubtotalRangeOriginal,\n ItemQuantityRange as ItemQuantityRangeOriginal,\n CustomerEligibility as CustomerEligibilityOriginal,\n CustomerEligibilityOptionsOneOf as CustomerEligibilityOptionsOneOfOriginal,\n EligibilityType as EligibilityTypeOriginal,\n EligibilityTypeWithLiterals as EligibilityTypeWithLiteralsOriginal,\n ContactSegments as ContactSegmentsOriginal,\n ContactTags as ContactTagsOriginal,\n TagReference as TagReferenceOriginal,\n IndividualMembers as IndividualMembersOriginal,\n TriggerType as TriggerTypeOriginal,\n TriggerTypeWithLiterals as TriggerTypeWithLiteralsOriginal,\n ActiveTimeInfo as ActiveTimeInfoOriginal,\n Recurrence as RecurrenceOriginal,\n DayOfWeek as DayOfWeekOriginal,\n DayOfWeekWithLiterals as DayOfWeekWithLiteralsOriginal,\n TimeOfDay as TimeOfDayOriginal,\n TimeWindow as TimeWindowOriginal,\n WeeklySchedule as WeeklyScheduleOriginal,\n Discounts as DiscountsOriginal,\n Discount as DiscountOriginal,\n DiscountDiscountOneOf as DiscountDiscountOneOfOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n SpecificItemsInfo as SpecificItemsInfoOriginal,\n QuantityBased as QuantityBasedOriginal,\n DiscountConfig as DiscountConfigOriginal,\n DiscountType as DiscountTypeOriginal,\n DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal,\n BuyXGetYInfo as BuyXGetYInfoOriginal,\n CustomerBuy as CustomerBuyOriginal,\n CustomerBuyConditionOneOf as CustomerBuyConditionOneOfOriginal,\n CustomerGet as CustomerGetOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n DiscountSettings as DiscountSettingsOriginal,\n AppliedSubjectType as AppliedSubjectTypeOriginal,\n AppliedSubjectTypeWithLiterals as AppliedSubjectTypeWithLiteralsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreateDiscountRuleRequest as CreateDiscountRuleRequestOriginal,\n CreateDiscountRuleResponse as CreateDiscountRuleResponseOriginal,\n GetDiscountRuleRequest as GetDiscountRuleRequestOriginal,\n GetDiscountRuleResponse as GetDiscountRuleResponseOriginal,\n UpdateDiscountRuleRequest as UpdateDiscountRuleRequestOriginal,\n UpdateDiscountRuleResponse as UpdateDiscountRuleResponseOriginal,\n DeleteDiscountRuleRequest as DeleteDiscountRuleRequestOriginal,\n DeleteDiscountRuleResponse as DeleteDiscountRuleResponseOriginal,\n QueryDiscountRulesRequest as QueryDiscountRulesRequestOriginal,\n PlatformQuery as PlatformQueryOriginal,\n PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n PlatformPaging as PlatformPagingOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryDiscountRulesResponse as QueryDiscountRulesResponseOriginal,\n PlatformPagingMetadata as PlatformPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n GetAppliedDiscountsRequest as GetAppliedDiscountsRequestOriginal,\n LineItem as LineItemOriginal,\n CatalogReference as CatalogReferenceOriginal,\n BuyerInfo as BuyerInfoOriginal,\n ShippingInfo as ShippingInfoOriginal,\n Address as AddressOriginal,\n GetAppliedDiscountsResponse as GetAppliedDiscountsResponseOriginal,\n AppliedDiscount as AppliedDiscountOriginal,\n AppliedDiscountRule as AppliedDiscountRuleOriginal,\n DiscountRuleName as DiscountRuleNameOriginal,\n MultiCurrencyPrice as MultiCurrencyPriceOriginal,\n ItemCombination as ItemCombinationOriginal,\n ItemCombinationLineItem as ItemCombinationLineItemOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n DiscountRuleUsageLimitReached as DiscountRuleUsageLimitReachedOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n CreateDiscountRuleApplicationErrors as CreateDiscountRuleApplicationErrorsOriginal,\n CreateDiscountRuleValidationErrors as CreateDiscountRuleValidationErrorsOriginal,\n} from './ecom-discounts-v1-discount-rule-discount-rules.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAA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BAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,gBAAgB,iBAAiB;AAAA,IAC/C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,mBAAmB,OAAO;AAErE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","ScopeType","EligibilityType","TriggerType","DayOfWeek","Type","DiscountType","Status","AppliedSubjectType","SortOrder","WebhookIdentityType","createDiscountRule","getDiscountRule","updateDiscountRule","deleteDiscountRule","queryDiscountRules"]}
1
+ {"version":3,"sources":["../../src/ecom-discounts-v1-discount-rule-discount-rules.http.ts","../../src/ecom-discounts-v1-discount-rule-discount-rules.types.ts","../../src/ecom-discounts-v1-discount-rule-discount-rules.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomDiscountsDiscountRuleServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/discount-rules-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n {\n srcPath: '/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/discounts/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n _: [\n {\n srcPath: '/ecom/discounts/v1/discount-rules',\n destPath: '/v1/discount-rules',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_discount-rules';\n\n/**\n * Creates a new discount rule.\n *\n *\n * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.\n */\nexport function createDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDiscountRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.CreateDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDiscountRule;\n}\n\n/**\n * Retrieves a discount rule.\n *\n *\n * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.\n */\nexport function getDiscountRule(payload: object): RequestOptionsFactory<any> {\n function __getDiscountRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'GET' as any,\n methodFqn: 'com.wix.ecom.discounts.DiscountRuleService.GetDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRuleId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDiscountRule;\n}\n\n/**\n * Updates a discount rule's properties.\n *\n *\n * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.\n *\n * Each time the discount rule is updated, `revision` increments by 1. The existing `revision` must be included when updating the discount rule. This ensures you're working with the latest discount rule information, and it prevents unintended overwrites.\n */\nexport function updateDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateDiscountRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.UpdateDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRule.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRule.createdDate' },\n { path: 'discountRule.updatedDate' },\n { path: 'discountRule.activeTimeInfo.start' },\n { path: 'discountRule.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRule.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateDiscountRule;\n}\n\n/**\n * Deletes a discount rule.\n *\n *\n * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.\n */\nexport function deleteDiscountRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteDiscountRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.DeleteDiscountRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/{discountRuleId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteDiscountRule;\n}\n\n/**\n * Creates a query to retrieve a list of discount rules.\n *\n *\n * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](/discount-rules/discount-rules-query-builder/find) function.\n *\n * You can refine the query by chaining `DiscountRulesQueryBuilder` functions onto the query. `DiscountRulesQueryBuilder` functions enable you to sort, filter, and control the results queryDiscountRules() returns.\n *\n * By default, `queryDiscountRules()` sorts results by [`ascending(\"_id\")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.\n *\n * To learn how to query posts, refer to the table below.\n *\n * The following `DiscountRulesQueryBuilder` functions are supported for the `queryDiscountRules()` function. For a full description of the discount rule object, see the object returned for the [`items`](/discount-rules/discount-rules-query-result/items) property in the `DiscountRulesQueryResult`.\n */\nexport function queryDiscountRules(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryDiscountRules({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.discounts.v1.discount_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.discounts.DiscountRuleService.QueryDiscountRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({\n protoPath: '/v1/discount-rules/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'discountRules.createdDate' },\n { path: 'discountRules.updatedDate' },\n { path: 'discountRules.activeTimeInfo.start' },\n { path: 'discountRules.activeTimeInfo.end' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'discountRules.discounts.values.percentage' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryDiscountRules;\n}\n","export interface DiscountRule {\n /**\n * Discount rule ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the discount rule is updated.\n * To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the discount rule was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the discount rule was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Whether the discount rule is active.\n *\n * Default: `true`\n */\n active?: boolean | null;\n /**\n * Discount rule name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Discount rule trigger.\n * A set of conditions that must be met for the `discounts` to be applied.\n * Not passing a trigger will cause the discount to always apply.\n */\n trigger?: DiscountTrigger;\n /** Time frame in which the discount rule is active. */\n activeTimeInfo?: ActiveTimeInfo;\n /**\n * List of discounts that are applied when one or more triggers are met.\n *\n * > **Notes:**\n * >\n * > + Currently, only 1 discount can be defined per discount rule.\n * > + A discount rule can be applied on multiple items per cart.\n * > + A discount rule can only be applied once per item.\n */\n discounts?: Discounts;\n /**\n * Discount rule status.\n * Default: `UNDEFINED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Number of times the discount rule was used.\n * @readonly\n */\n usageCount?: number;\n}\n\n/** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */\nexport interface DiscountTrigger extends DiscountTriggerTriggerOneOf {\n /** Chain multiple triggers with the `and` operator. */\n and?: And;\n /** Chain multiple triggers with the `or` operator. */\n or?: Or;\n /** Custom trigger. */\n customTrigger?: Custom;\n /** Subtotal trigger range. */\n subtotalRange?: SubtotalRange;\n /** Item quantity trigger range. */\n itemQuantityRange?: ItemQuantityRange;\n /** Trigger type. */\n triggerType?: TriggerTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountTriggerTriggerOneOf {\n /** Chain multiple triggers with the `and` operator. */\n and?: And;\n /** Chain multiple triggers with the `or` operator. */\n or?: Or;\n /** Custom trigger. */\n customTrigger?: Custom;\n /** Subtotal trigger range. */\n subtotalRange?: SubtotalRange;\n /** Item quantity trigger range. */\n itemQuantityRange?: ItemQuantityRange;\n}\n\n/**\n * This object represents a scope of catalog items. Examples:\n * 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id`\n * 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`\n * 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'\n */\nexport interface Scope extends ScopeScopeItemsOneOf {\n /** Catalog item filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n catalogItemFilter?: CatalogItemFilter;\n /** Custom filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n customFilter?: CustomFilter;\n /**\n * Scope ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /** Scope type. */\n type?: ScopeTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ScopeScopeItemsOneOf {\n /** Catalog item filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n catalogItemFilter?: CatalogItemFilter;\n /** Custom filter. Must be passed with `type.\"CATALOG_ITEM\"`. */\n customFilter?: CustomFilter;\n}\n\nexport enum ScopeType {\n UNDEFINED_SCOPE = 'UNDEFINED_SCOPE',\n /** Specific catalog items */\n CATALOG_ITEM = 'CATALOG_ITEM',\n /** Specific items by custom filters */\n CUSTOM_FILTER = 'CUSTOM_FILTER',\n}\n\n/** @enumType */\nexport type ScopeTypeWithLiterals =\n | ScopeType\n | 'UNDEFINED_SCOPE'\n | 'CATALOG_ITEM'\n | 'CUSTOM_FILTER';\n\nexport interface CatalogItemFilter {\n /**\n * Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`.\n * @format GUID\n */\n catalogAppId?: string;\n /**\n * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores.\n * @minLength 1\n * @maxLength 36\n * @maxSize 50\n */\n catalogItemIds?: string[];\n}\n\nexport interface CustomFilter {\n /**\n * Custom filter app ID, when relevant.\n * @format GUID\n */\n appId?: string;\n /**\n * Custom filter in `{ \"key\": \"value\" }` form.\n * For example, an array of `collectionIDs`:\n * `{ [\"collectionId\": \"12345\"], [\"collectionId\": \"67890\"] }`.\n */\n params?: Record<string, any> | null;\n}\n\nexport interface And {\n /**\n * List of triggers to have an \"AND\" operator between their results.\n * @minSize 2\n * @maxSize 5\n */\n triggers?: DiscountTrigger[];\n}\n\nexport interface Or {\n /**\n * List of triggers to have an \"OR\" operator between their results.\n * @minSize 2\n * @maxSize 5\n */\n triggers?: DiscountTrigger[];\n}\n\nexport interface Custom {\n /**\n * Trigger ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * ID of the app that created the trigger.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface SubtotalRange {\n /**\n * Relevant scopes for `SPECIFIC_ITEMS` target type.\n * @maxSize 50\n */\n scopes?: Scope[];\n /**\n * Minimum subtotal price (inclusive).\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n from?: string | null;\n /**\n * Maximum subtotal price (inclusive).\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n to?: string | null;\n}\n\nexport interface ItemQuantityRange {\n /**\n * Relevant scopes for `SPECIFIC_ITEMS` target type.\n * @maxSize 50\n */\n scopes?: Scope[];\n /**\n * Minimum item quantity (inclusive).\n * @min 1\n */\n from?: number | null;\n /**\n * Maximum item quantity (inclusive).\n * @min 1\n */\n to?: number | null;\n}\n\nexport interface CustomerEligibility extends CustomerEligibilityOptionsOneOf {\n /** Information about specific members. */\n individualMembersInfo?: IndividualMembers;\n}\n\n/** @oneof */\nexport interface CustomerEligibilityOptionsOneOf {\n /** Information about specific members. */\n individualMembersInfo?: IndividualMembers;\n}\n\nexport enum EligibilityType {\n /** Eligibility type is not defined. */\n UNKNOWN_ELIGIBILITY_TYPE = 'UNKNOWN_ELIGIBILITY_TYPE',\n /** Only specific customers based on member id. */\n INDIVIDUAL_MEMBERS = 'INDIVIDUAL_MEMBERS',\n}\n\n/** @enumType */\nexport type EligibilityTypeWithLiterals =\n | EligibilityType\n | 'UNKNOWN_ELIGIBILITY_TYPE'\n | 'INDIVIDUAL_MEMBERS';\n\nexport interface ContactSegments {\n /**\n * Eligible segment ids.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n segmentIds?: string[];\n}\n\nexport interface ContactTags {\n /**\n * Eligible tag and label ids.\n * @minSize 1\n * @maxSize 100\n */\n tagReferences?: TagReference[];\n}\n\nexport interface TagReference {\n /**\n * Eligible tag id.\n * @maxLength 5\n */\n tagId?: string;\n /**\n * Eligible label id.\n * @maxLength 80\n */\n labelKey?: string;\n}\n\nexport interface IndividualMembers {\n /**\n * Eligible member ids.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n memberIds?: string[];\n}\n\nexport enum TriggerType {\n UNDEFINED = 'UNDEFINED',\n /** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */\n AND = 'AND',\n /** Subtotal must be within the specified `subtotalRange` values. */\n SUBTOTAL_RANGE = 'SUBTOTAL_RANGE',\n /** Quantity of items in scope must be within specified `itemQuantityRange` values. */\n ITEM_QUANTITY_RANGE = 'ITEM_QUANTITY_RANGE',\n /** Custom trigger type defined in `customTrigger` object. */\n CUSTOM = 'CUSTOM',\n /** Chain multiple triggers with OR operator */\n OR = 'OR',\n}\n\n/** @enumType */\nexport type TriggerTypeWithLiterals =\n | TriggerType\n | 'UNDEFINED'\n | 'AND'\n | 'SUBTOTAL_RANGE'\n | 'ITEM_QUANTITY_RANGE'\n | 'CUSTOM'\n | 'OR';\n\nexport interface ActiveTimeInfo {\n /** Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */\n start?: Date | null;\n /** Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */\n end?: Date | null;\n}\n\nexport interface Recurrence {\n /** Weekly discount recurrence. */\n weeklySchedule?: WeeklySchedule;\n}\n\nexport enum DayOfWeek {\n UNKOWN_DAY_OF_WEEK = 'UNKOWN_DAY_OF_WEEK',\n /** Monday. */\n MON = 'MON',\n /** Tuesday. */\n TUE = 'TUE',\n /** Wednesday. */\n WED = 'WED',\n /** Thursday. */\n THU = 'THU',\n /** Friday. */\n FRI = 'FRI',\n /** Saturday. */\n SAT = 'SAT',\n /** Sunday. */\n SUN = 'SUN',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n | DayOfWeek\n | 'UNKOWN_DAY_OF_WEEK'\n | 'MON'\n | 'TUE'\n | 'WED'\n | 'THU'\n | 'FRI'\n | 'SAT'\n | 'SUN';\n\nexport interface TimeOfDay {\n /**\n * Hours. Min: `0`. Max: `23`.\n * @max 23\n */\n hours?: number;\n /**\n * Minutes. Min: `0`. Max: `59`.\n * @max 59\n */\n minutes?: number;\n}\n\nexport interface TimeWindow {\n /** Day of week. */\n dayOfWeek?: DayOfWeekWithLiterals;\n /** Start time window during each recurrence. */\n startTime?: TimeOfDay;\n /** End time window during each recurrence. */\n endTime?: TimeOfDay;\n}\n\nexport interface WeeklySchedule {\n /**\n * A list of days with their respective active time ranges.\n * @minSize 1\n * @maxSize 100\n */\n timeWindows?: TimeWindow[];\n}\n\nexport interface Discounts {\n /**\n * Discounts.\n * @minSize 1\n * @maxSize 1\n */\n values?: Discount[];\n}\n\nexport interface Discount extends DiscountDiscountOneOf {\n /**\n * Percentage to discount from original price.\n * @min 0.1\n * @max 100\n */\n percentage?: number;\n /**\n * Amount to discount from original price.\n * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }\n */\n fixedAmount?: string;\n /**\n * Fixed price. Line item will be fixed to this price.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n fixedPrice?: string;\n /** A special price is applied for a specific quantity of items. For example, 3 for $10. */\n quantityBased?: QuantityBased;\n /**\n * Discount target.\n *\n * + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.\n */\n targetType?: TypeWithLiterals;\n /** Data related to `SPECIFIC_ITEMS` target type. */\n specificItemsInfo?: SpecificItemsInfo;\n /** Discount type. */\n discountType?: DiscountTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountDiscountOneOf {\n /**\n * Percentage to discount from original price.\n * @min 0.1\n * @max 100\n */\n percentage?: number;\n /**\n * Amount to discount from original price.\n * @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }\n */\n fixedAmount?: string;\n /**\n * Fixed price. Line item will be fixed to this price.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }\n */\n fixedPrice?: string;\n /** A special price is applied for a specific quantity of items. For example, 3 for $10. */\n quantityBased?: QuantityBased;\n}\n\nexport enum Type {\n /** Target type is not defined */\n UNDEFINED = 'UNDEFINED',\n /** Target type is a set of specific items */\n SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNDEFINED' | 'SPECIFIC_ITEMS';\n\nexport interface SpecificItemsInfo {\n /**\n * All associated scopes for `SPECIFIC_ITEMS` target type.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\n/** A special price is applied for a specific quantity of items. For example, 3 for $10. */\nexport interface QuantityBased {\n /**\n * list of discountConfig options.\n * @minSize 1\n * @maxSize 1\n */\n configurations?: DiscountConfig[];\n}\n\nexport interface DiscountConfig {\n /**\n * DiscountConfig ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * The number of items that must be added to the cart to be eligible for the discount (Represents X).\n * @min 2\n */\n quantity?: number;\n /**\n * The DiscountConfig price (Represents Amount).\n * @decimalValue options { gte:0, lte:1000000, maxScale:4 }\n */\n price?: string;\n}\n\nexport enum DiscountType {\n UNDEFINED = 'UNDEFINED',\n /** Price is reduced by percentage value. */\n PERCENTAGE = 'PERCENTAGE',\n /** Price is reduced by fixed amount. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Price will be set to fixed amount. */\n FIXED_PRICE = 'FIXED_PRICE',\n /**\n * Quantity based options for Buy X For Amount.\n * @documentationMaturity preview\n */\n QUANTITY_BASED = 'QUANTITY_BASED',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'UNDEFINED'\n | 'PERCENTAGE'\n | 'FIXED_AMOUNT'\n | 'FIXED_PRICE'\n | 'QUANTITY_BASED';\n\nexport interface BuyXGetYInfo {\n /** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */\n customerBuys?: CustomerBuy;\n /** Information about which items will be discounted (get Y). */\n customerGets?: CustomerGet;\n /**\n * The maximum number of times the 'buy X get Y' discount can be applied.\n * For example, when the value of `limit` is `2`, with a \"2+1\" sale on all items, the following logic applies:\n * + Buy 2 get 1, buy 3 get 1.\n * + Buy 4 get 2, buy 6 get 2, buy 9 get 2, and so on.\n * @min 1\n */\n limit?: number | null;\n}\n\nexport interface CustomerBuy extends CustomerBuyConditionOneOf {\n /**\n * Minimum number of items the customer must add to the cart to be eligible for a discount.\n * @min 1\n */\n minimumQuantity?: number;\n /**\n * Minimum price the customer must add to the cart to be eligible for a discount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n minimumSpend?: string | null;\n /**\n * Scopes of the items that must be added to the cart to enable the discount.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\n/** @oneof */\nexport interface CustomerBuyConditionOneOf {\n /**\n * Minimum number of items the customer must add to the cart to be eligible for a discount.\n * @min 1\n */\n minimumQuantity?: number;\n /**\n * Minimum price the customer must add to the cart to be eligible for a discount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n minimumSpend?: string | null;\n}\n\nexport interface CustomerGet {\n /**\n * Exact number of items in the cart that will be discounted.\n * If the cart contains fewer items than the value of quantity, the discount will not apply.\n * @min 1\n */\n quantity?: number;\n /**\n * Scopes of the items that will be discounted.\n * @minSize 1\n * @maxSize 50\n */\n scopes?: Scope[];\n}\n\nexport enum Status {\n /** Rule status is not defined. */\n UNDEFINED = 'UNDEFINED',\n /** Rule status is live. */\n LIVE = 'LIVE',\n /** Rule status is expired, it might have been live in the past. */\n EXPIRED = 'EXPIRED',\n /** Rule status is pending, it might be live in the future. */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNDEFINED'\n | 'LIVE'\n | 'EXPIRED'\n | 'PENDING';\n\n/** The discount settings */\nexport interface DiscountSettings {\n /** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */\n appliesTo?: AppliedSubjectTypeWithLiterals;\n /**\n * Whether the discount will apply to subscriptions.\n *\n * Default: `false`\n */\n includeSubscription?: boolean | null;\n /**\n * Maximum total number of uses allowed for the discount rule.\n * @min 1\n * @max 2147483646\n */\n usageLimit?: number | null;\n /**\n * The usage limit per user per discount.\n * When not provided, this setting will not apply.\n * @min 1\n * @max 2147483646\n */\n usageLimitPerUser?: number | null;\n}\n\n/** TODO: check if can be removed */\nexport enum AppliedSubjectType {\n UNDEFINED = 'UNDEFINED',\n /** Discount applies to all items at checkout. */\n ALL_ITEMS = 'ALL_ITEMS',\n /** Discount applies to the lowest priced item at checkout. */\n LOWEST_PRICED_ITEM = 'LOWEST_PRICED_ITEM',\n}\n\n/** @enumType */\nexport type AppliedSubjectTypeWithLiterals =\n | AppliedSubjectType\n | 'UNDEFINED'\n | 'ALL_ITEMS'\n | 'LOWEST_PRICED_ITEM';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface CreateDiscountRuleRequest {\n /** Discount rule info. */\n discountRule: DiscountRule;\n}\n\nexport interface CreateDiscountRuleResponse {\n /** Discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface GetDiscountRuleRequest {\n /**\n * ID of the discount rule to retrieve.\n * @format GUID\n */\n discountRuleId: string;\n}\n\nexport interface GetDiscountRuleResponse {\n /** The requested discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface UpdateDiscountRuleRequest {\n /** Discount rule info. */\n discountRule: DiscountRule;\n}\n\nexport interface UpdateDiscountRuleResponse {\n /** Updated discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport interface DeleteDiscountRuleRequest {\n /**\n * ID of the discount rule to delete.\n * @format GUID\n */\n discountRuleId: string;\n}\n\nexport interface DeleteDiscountRuleResponse {}\n\nexport interface QueryDiscountRulesRequest {\n /** Query options. */\n query?: PlatformQuery;\n}\n\nexport interface PlatformQuery extends PlatformQueryPagingMethodOneOf {\n /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n paging?: PlatformPaging;\n /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /** Filter object. */\n filter?: Record<string, any> | null;\n /** Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`. */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface PlatformQueryPagingMethodOneOf {\n /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n paging?: PlatformPaging;\n /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface PlatformPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryDiscountRulesResponse {\n /** List of discount rules. */\n discountRules?: DiscountRule[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PlatformPagingMetadata;\n}\n\nexport interface PlatformPagingMetadata {\n /** The number of items returned in this response. */\n count?: number | null;\n /** The offset which was requested. Returned if offset paging was used. */\n offset?: number | null;\n /** The total number of items that match the query. Returned if offset paging was used. */\n total?: number | null;\n /** Cursors to navigate through result pages. Returned if cursor paging was used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface GetAppliedDiscountsRequest {\n /**\n * Line items for which to check for discount rules.\n * @maxSize 1000\n */\n lineItems?: LineItem[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /** Buyer Information */\n buyerInfo?: BuyerInfo;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /**\n * The business location ID to be used as the basis for some calculations.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @format GUID\n */\n businessLocationId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * Line item quantity.\n * @max 100000\n */\n quantity?: number | null;\n /** Catalog and item reference info. Learn more about [integrating Wix Stores products with Wix eCommerce](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration). */\n catalogReference?: CatalogReference;\n /**\n * Line item price.\n * @decimalValue options { gte:0 }\n */\n price?: string;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface BuyerInfo {\n /**\n * Email of the customer.\n * @format EMAIL\n */\n buyerEmail?: string | null;\n /**\n * Member id of the customer.\n * @format GUID\n */\n memberId?: string | null;\n}\n\nexport interface ShippingInfo {\n /** Address (if applicable). */\n address?: Address;\n /**\n * Preferred shipping option code. For example, \"usps_std_overnight\".\n * @minLength 1\n * @maxLength 100\n */\n preferredShippingOptionCode?: string | null;\n}\n\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n}\n\nexport interface GetAppliedDiscountsResponse {\n /** All eligible discounts. */\n appliedDiscounts?: AppliedDiscount[];\n}\n\nexport interface AppliedDiscount {\n /** Discount type. */\n discountType?: TypeWithLiterals;\n /**\n * IDs of line items the discount applies to, in GUID format.\n * @format GUID\n * @maxSize 1000\n */\n lineItemIds?: string[];\n /** Applied discount rule. */\n appliedDiscountRule?: AppliedDiscountRule;\n}\n\nexport interface AppliedDiscountRule {\n /**\n * Applied discount rule ID.\n * @format GUID\n */\n id?: string;\n /** Discount rule name. */\n name?: DiscountRuleName;\n /** Total amount reduced from all discounted line items. */\n amount?: MultiCurrencyPrice;\n /** Discount rule type. */\n discountRuleType?: DiscountTypeWithLiterals;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language.\n *\n * Default: `original`\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface BundleParticipation {\n /**\n * Number of times this specific bundle composition was formed\n * by the discount rule.\n */\n repeatCount?: number;\n /**\n * Line items that participated together in this bundle composition.\n * @maxSize 100\n */\n lineItems?: BundleParticipationItem[];\n}\n\nexport interface BundleParticipationItem {\n /**\n * Line item ID that took part in this bundle composition.\n * @format GUID\n */\n lineItemId?: string;\n /** Discount amount applied to this line item *per bundle composition*. */\n amount?: MultiCurrencyPrice;\n /**\n * Number of units from this line item that participated\n * in a single bundle composition.\n * @min 1\n * @max 1000000\n */\n discountedQuantity?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface DiscountRuleUsageLimitReached {\n /** Discount Rule */\n rule?: DiscountRule;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateDiscountRuleApplicationErrors =\n | {\n code?: 'MAX_DISCOUNT_RULES_REACHED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MAX_QUANTITY_BASED_DISCOUNTS_REACHED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDiscountRuleValidationErrors =\n | {\n ruleName?: 'INVALID_ACTIVE_TIME_RANGE';\n }\n | {\n ruleName?: 'INVALID_EMPTY_DISCOUNT';\n }\n | {\n ruleName?: 'INVALID_DISCOUNT_TYPE';\n }\n | {\n ruleName?: 'MISSING_SUBTOTAL_RANGE';\n }\n | {\n ruleName?: 'MISSING_ITEM_QUANTITY_RANGE';\n }\n | {\n ruleName?: 'INVALID_SUBTOTAL_RANGE';\n }\n | {\n ruleName?: 'INVALID_ITEM_QUANTITY_RANGE';\n }\n | {\n ruleName?: 'INVALID_TARGET_TYPE_FIELD';\n }\n | {\n ruleName?: 'OPERATOR_TOO_DEEPLY_NESTED';\n }\n | {\n ruleName?: 'INVALID_SCOPE_TYPE';\n }\n | {\n ruleName?: 'INVALID_TRIGGER_TYPE';\n }\n | {\n ruleName?: 'INVALID_SETTINGS_SUBJECT_TYPE';\n }\n | {\n ruleName?: 'INVALID_CUSTOMER_BUY_CONDITION';\n }\n | {\n ruleName?: 'INVALID_SCOPE';\n };\n","import * as ambassadorWixEcomDiscountsV1DiscountRule from './ecom-discounts-v1-discount-rule-discount-rules.http.js';\nimport * as ambassadorWixEcomDiscountsV1DiscountRuleTypes from './ecom-discounts-v1-discount-rule-discount-rules.types.js';\nimport * as ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes from './ecom-discounts-v1-discount-rule-discount-rules.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createDiscountRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.CreateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.CreateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.CreateDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.CreateDiscountRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.createDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/discount-rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getDiscountRule(): __PublicMethodMetaInfo<\n 'GET',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.GetDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.GetDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.GetDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.GetDiscountRuleResponse\n> {\n const payload = { discountRuleId: ':discountRuleId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.getDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/discount-rules/{discountRuleId}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateDiscountRule(): __PublicMethodMetaInfo<\n 'PATCH',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.UpdateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.UpdateDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.UpdateDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.UpdateDiscountRuleResponse\n> {\n const payload = { discountRule: { id: ':discountRuleId' } } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.updateDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/discount-rules/{discountRule.id}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteDiscountRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { discountRuleId: string },\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.DeleteDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.DeleteDiscountRuleRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.DeleteDiscountRuleResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.DeleteDiscountRuleResponse\n> {\n const payload = { discountRuleId: ':discountRuleId' } as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.deleteDiscountRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/discount-rules/{discountRuleId}',\n pathParams: { discountRuleId: 'discountRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryDiscountRules(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.QueryDiscountRulesRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.QueryDiscountRulesRequest,\n ambassadorWixEcomDiscountsV1DiscountRuleUniversalTypes.QueryDiscountRulesResponse,\n ambassadorWixEcomDiscountsV1DiscountRuleTypes.QueryDiscountRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomDiscountsV1DiscountRule.queryDiscountRules(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/discount-rules/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n DiscountRule as DiscountRuleOriginal,\n DiscountTrigger as DiscountTriggerOriginal,\n DiscountTriggerTriggerOneOf as DiscountTriggerTriggerOneOfOriginal,\n Scope as ScopeOriginal,\n ScopeScopeItemsOneOf as ScopeScopeItemsOneOfOriginal,\n ScopeType as ScopeTypeOriginal,\n ScopeTypeWithLiterals as ScopeTypeWithLiteralsOriginal,\n CatalogItemFilter as CatalogItemFilterOriginal,\n CustomFilter as CustomFilterOriginal,\n And as AndOriginal,\n Or as OrOriginal,\n Custom as CustomOriginal,\n SubtotalRange as SubtotalRangeOriginal,\n ItemQuantityRange as ItemQuantityRangeOriginal,\n CustomerEligibility as CustomerEligibilityOriginal,\n CustomerEligibilityOptionsOneOf as CustomerEligibilityOptionsOneOfOriginal,\n EligibilityType as EligibilityTypeOriginal,\n EligibilityTypeWithLiterals as EligibilityTypeWithLiteralsOriginal,\n ContactSegments as ContactSegmentsOriginal,\n ContactTags as ContactTagsOriginal,\n TagReference as TagReferenceOriginal,\n IndividualMembers as IndividualMembersOriginal,\n TriggerType as TriggerTypeOriginal,\n TriggerTypeWithLiterals as TriggerTypeWithLiteralsOriginal,\n ActiveTimeInfo as ActiveTimeInfoOriginal,\n Recurrence as RecurrenceOriginal,\n DayOfWeek as DayOfWeekOriginal,\n DayOfWeekWithLiterals as DayOfWeekWithLiteralsOriginal,\n TimeOfDay as TimeOfDayOriginal,\n TimeWindow as TimeWindowOriginal,\n WeeklySchedule as WeeklyScheduleOriginal,\n Discounts as DiscountsOriginal,\n Discount as DiscountOriginal,\n DiscountDiscountOneOf as DiscountDiscountOneOfOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n SpecificItemsInfo as SpecificItemsInfoOriginal,\n QuantityBased as QuantityBasedOriginal,\n DiscountConfig as DiscountConfigOriginal,\n DiscountType as DiscountTypeOriginal,\n DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal,\n BuyXGetYInfo as BuyXGetYInfoOriginal,\n CustomerBuy as CustomerBuyOriginal,\n CustomerBuyConditionOneOf as CustomerBuyConditionOneOfOriginal,\n CustomerGet as CustomerGetOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n DiscountSettings as DiscountSettingsOriginal,\n AppliedSubjectType as AppliedSubjectTypeOriginal,\n AppliedSubjectTypeWithLiterals as AppliedSubjectTypeWithLiteralsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n CreateDiscountRuleRequest as CreateDiscountRuleRequestOriginal,\n CreateDiscountRuleResponse as CreateDiscountRuleResponseOriginal,\n GetDiscountRuleRequest as GetDiscountRuleRequestOriginal,\n GetDiscountRuleResponse as GetDiscountRuleResponseOriginal,\n UpdateDiscountRuleRequest as UpdateDiscountRuleRequestOriginal,\n UpdateDiscountRuleResponse as UpdateDiscountRuleResponseOriginal,\n DeleteDiscountRuleRequest as DeleteDiscountRuleRequestOriginal,\n DeleteDiscountRuleResponse as DeleteDiscountRuleResponseOriginal,\n QueryDiscountRulesRequest as QueryDiscountRulesRequestOriginal,\n PlatformQuery as PlatformQueryOriginal,\n PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n PlatformPaging as PlatformPagingOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryDiscountRulesResponse as QueryDiscountRulesResponseOriginal,\n PlatformPagingMetadata as PlatformPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n GetAppliedDiscountsRequest as GetAppliedDiscountsRequestOriginal,\n LineItem as LineItemOriginal,\n CatalogReference as CatalogReferenceOriginal,\n BuyerInfo as BuyerInfoOriginal,\n ShippingInfo as ShippingInfoOriginal,\n Address as AddressOriginal,\n GetAppliedDiscountsResponse as GetAppliedDiscountsResponseOriginal,\n AppliedDiscount as AppliedDiscountOriginal,\n AppliedDiscountRule as AppliedDiscountRuleOriginal,\n DiscountRuleName as DiscountRuleNameOriginal,\n MultiCurrencyPrice as MultiCurrencyPriceOriginal,\n BundleParticipation as BundleParticipationOriginal,\n BundleParticipationItem as BundleParticipationItemOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n DiscountRuleUsageLimitReached as DiscountRuleUsageLimitReachedOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n CreateDiscountRuleApplicationErrors as CreateDiscountRuleApplicationErrorsOriginal,\n CreateDiscountRuleValidationErrors as CreateDiscountRuleValidationErrorsOriginal,\n} from './ecom-discounts-v1-discount-rule-discount-rules.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAQd,SAAS,mBACd,SAC4B;AAC5B,WAAS,qBAAqB,EAAE,KAAK,GAAQ;AAC3C,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,2BAA2B;AAAA,UACnC,EAAE,MAAM,2BAA2B;AAAA,UACnC,EAAE,M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B;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,EAAE,cAAc,EAAE,IAAI,kBAAkB,EAAE;AAE1D,QAAM,oBACqC,mBAAmB,OAAO;AAErE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,gBAAgB,iBAAiB;AAAA,IAC/C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,EAAE,gBAAgB,kBAAkB;AAEpD,QAAM,oBACqC,mBAAmB,OAAO;AAErE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,gBAAgB,iBAAiB;AAAA,IAC/C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,mBAAmB,OAAO;AAErE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","ScopeType","EligibilityType","TriggerType","DayOfWeek","Type","DiscountType","Status","AppliedSubjectType","SortOrder","WebhookIdentityType","createDiscountRule","getDiscountRule","updateDiscountRule","deleteDiscountRule","queryDiscountRules"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { DiscountRule, CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, UpdateDiscountRule, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, DiscountRuleQuery, typedQueryDiscountRules } from './index.typings.js';
3
- export { ActionEvent, ActiveTimeInfo, Address, And, AppliedDiscount, AppliedDiscountRule, AppliedSubjectType, AppliedSubjectTypeWithLiterals, BaseEventMetadata, BuyXGetYInfo, BuyerInfo, CatalogItemFilter, CatalogReference, CommonQueryWithEntityContext, ContactSegments, ContactTags, CreateDiscountRuleRequest, CreateDiscountRuleResponse, CursorPaging, Cursors, Custom, CustomFilter, CustomerBuy, CustomerBuyConditionOneOf, CustomerEligibility, CustomerEligibilityOptionsOneOf, CustomerGet, DayOfWeek, DayOfWeekWithLiterals, DeleteDiscountRuleRequest, DeleteDiscountRuleResponse, Discount, DiscountConfig, DiscountDiscountOneOf, DiscountRuleName, DiscountRuleQuerySpec, DiscountRuleUsageLimitReached, DiscountRulesQueryResult, DiscountSettings, DiscountTrigger, DiscountTriggerTriggerOneOf, DiscountType, DiscountTypeWithLiterals, Discounts, DomainEvent, DomainEventBodyOneOf, EligibilityType, EligibilityTypeWithLiterals, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetAppliedDiscountsRequest, GetAppliedDiscountsResponse, GetDiscountRuleRequest, GetDiscountRuleResponse, IdentificationData, IdentificationDataIdOneOf, IndividualMembers, ItemCombination, ItemCombinationLineItem, ItemQuantityRange, LineItem, MessageEnvelope, MultiCurrencyPrice, Or, PlatformPaging, PlatformPagingMetadata, PlatformQuery, PlatformQueryPagingMethodOneOf, QuantityBased, QueryDiscountRulesRequest, QueryDiscountRulesResponse, Recurrence, RestoreInfo, Scope, ScopeScopeItemsOneOf, ScopeType, ScopeTypeWithLiterals, ShippingInfo, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsInfo, Status, StatusWithLiterals, SubtotalRange, TagReference, TimeOfDay, TimeWindow, TriggerType, TriggerTypeWithLiterals, Type, TypeWithLiterals, UpdateDiscountRuleRequest, UpdateDiscountRuleResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeeklySchedule } from './index.typings.js';
3
+ export { ActionEvent, ActiveTimeInfo, Address, And, AppliedDiscount, AppliedDiscountRule, AppliedSubjectType, AppliedSubjectTypeWithLiterals, BaseEventMetadata, BundleParticipation, BundleParticipationItem, BuyXGetYInfo, BuyerInfo, CatalogItemFilter, CatalogReference, CommonQueryWithEntityContext, ContactSegments, ContactTags, CreateDiscountRuleRequest, CreateDiscountRuleResponse, CursorPaging, Cursors, Custom, CustomFilter, CustomerBuy, CustomerBuyConditionOneOf, CustomerEligibility, CustomerEligibilityOptionsOneOf, CustomerGet, DayOfWeek, DayOfWeekWithLiterals, DeleteDiscountRuleRequest, DeleteDiscountRuleResponse, Discount, DiscountConfig, DiscountDiscountOneOf, DiscountRuleName, DiscountRuleQuerySpec, DiscountRuleUsageLimitReached, DiscountRulesQueryResult, DiscountSettings, DiscountTrigger, DiscountTriggerTriggerOneOf, DiscountType, DiscountTypeWithLiterals, Discounts, DomainEvent, DomainEventBodyOneOf, EligibilityType, EligibilityTypeWithLiterals, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetAppliedDiscountsRequest, GetAppliedDiscountsResponse, GetDiscountRuleRequest, GetDiscountRuleResponse, IdentificationData, IdentificationDataIdOneOf, IndividualMembers, ItemQuantityRange, LineItem, MessageEnvelope, MultiCurrencyPrice, Or, PlatformPaging, PlatformPagingMetadata, PlatformQuery, PlatformQueryPagingMethodOneOf, QuantityBased, QueryDiscountRulesRequest, QueryDiscountRulesResponse, Recurrence, RestoreInfo, Scope, ScopeScopeItemsOneOf, ScopeType, ScopeTypeWithLiterals, ShippingInfo, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsInfo, Status, StatusWithLiterals, SubtotalRange, TagReference, TimeOfDay, TimeWindow, TriggerType, TriggerTypeWithLiterals, Type, TypeWithLiterals, UpdateDiscountRuleRequest, UpdateDiscountRuleResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeeklySchedule } from './index.typings.js';
4
4
 
5
5
  declare function createDiscountRule$1(httpClient: HttpClient): CreateDiscountRuleSignature;
6
6
  interface CreateDiscountRuleSignature {