@wix/auto_sdk_loyalty_rewards 1.0.11 → 1.0.12

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../index.typings.ts","../../../src/loyalty-v1-reward-rewards.universal.ts","../../../src/loyalty-v1-reward-rewards.http.ts"],"sourcesContent":["export * from './src/loyalty-v1-reward-rewards.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyV1Reward from './loyalty-v1-reward-rewards.http.js';\n\n/**\n * A loyalty reward is an object a customer can redeem with loyalty points.\n * Redeeming a reward then creates a loyalty coupon that the customer can use.\n */\nexport interface Reward extends RewardTypeDetailsOneOf {\n /** Discount details. */\n discountAmount?: DiscountAmount;\n /** Coupon details. */\n couponReward?: CouponReward;\n /**\n * Reward ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Reward name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /** Whether the reward is active. Default: `FALSE` */\n active?: boolean;\n /** Reward type. */\n type?: RewardTypeWithLiterals;\n /**\n * Revision number, which increments by 1 each time the loyalty reward is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty reward.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the reward was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reward was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/** @oneof */\nexport interface RewardTypeDetailsOneOf {\n /** Discount details. */\n discountAmount?: DiscountAmount;\n /** Coupon details. */\n couponReward?: CouponReward;\n}\n\n/** Available reward types. */\nexport enum RewardType {\n /** Undefined reward type. */\n UNDEFINED = 'UNDEFINED',\n /** Discount reward. Special flexible reward type used in checkout. */\n DISCOUNT_AMOUNT = 'DISCOUNT_AMOUNT',\n /** Coupon reward. [Learn more about coupons.](https://support.wix.com/en/article/using-coupons-as-loyalty-rewards) */\n COUPON_REWARD = 'COUPON_REWARD',\n /** For internal use. */\n SPI_DISCOUNT_AMOUNT = 'SPI_DISCOUNT_AMOUNT',\n}\n\n/** @enumType */\nexport type RewardTypeWithLiterals =\n | RewardType\n | 'UNDEFINED'\n | 'DISCOUNT_AMOUNT'\n | 'COUPON_REWARD'\n | 'SPI_DISCOUNT_AMOUNT';\n\nexport interface DiscountAmount {\n /**\n * Discount details for each tier.\n * @maxSize 21\n */\n configsByTier?: DiscountAmountConfig[];\n}\n\nexport interface DiscountAmountConfig {\n /**\n * Discount amount. Must be a positive value.\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0, maxScale:2 }\n */\n amount?: string;\n /**\n * Tier ID, or empty if config applies to the base tier.\n * @format GUID\n */\n tierId?: string | null;\n /**\n * Amount of points required to redeem the reward.\n * @min 1\n * @max 9999999\n */\n costInPoints?: number;\n}\n\nexport interface CouponReward\n extends CouponRewardDiscountTypeOneOf,\n CouponRewardScopeOrMinSubtotalOneOf {\n /** Discount as a fixed amount. */\n fixedAmount?: FixedAmountDiscount;\n /** Discount as a percentage. */\n percentage?: PercentageDiscount;\n /** Free shipping. */\n freeShipping?: FreeShippingDiscount;\n /** Limit the coupon to carts with a subtotal greater than this number. */\n minimumSubtotal?: number;\n /**\n * Specifies the type of line items this coupon will apply to.\n *\n * For more information, see the Coupons API.\n */\n scope?: CouponScope;\n /** Whether the coupon is limited to one item. */\n limitedToOneItem?: boolean | null;\n /**\n * Whether the coupon applies to subscription products.\n *\n * If set to `true`, the discount will apply to all billing cycles.\n */\n appliesToSubscriptions?: boolean | null;\n /**\n * Reserved for internal use.\n * @min 1\n * @max 999\n */\n discountedCycleCount?: number | null;\n}\n\n/** @oneof */\nexport interface CouponRewardDiscountTypeOneOf {\n /** Discount as a fixed amount. */\n fixedAmount?: FixedAmountDiscount;\n /** Discount as a percentage. */\n percentage?: PercentageDiscount;\n /** Free shipping. */\n freeShipping?: FreeShippingDiscount;\n}\n\n/** @oneof */\nexport interface CouponRewardScopeOrMinSubtotalOneOf {\n /** Limit the coupon to carts with a subtotal greater than this number. */\n minimumSubtotal?: number;\n /**\n * Specifies the type of line items this coupon will apply to.\n *\n * For more information, see the Coupons API.\n */\n scope?: CouponScope;\n}\n\nexport interface FixedAmountDiscount {\n /**\n * Discount details for each tier.\n * @minSize 1\n * @maxSize 21\n */\n configsByTier?: FixedAmountDiscountConfig[];\n}\n\nexport interface FixedAmountDiscountConfig {\n /**\n * Tier ID, or empty if config applies to the base tier.\n * @format GUID\n */\n tierId?: string | null;\n /**\n * Amount of points required to redeem the reward.\n * @min 1\n * @max 9999999\n */\n costInPoints?: number;\n /** Discount amount. */\n amount?: number;\n}\n\nexport interface PercentageDiscount {\n /**\n * Discount details for each tier.\n * @minSize 1\n * @maxSize 21\n */\n configsByTier?: PercentageDiscountConfig[];\n}\n\nexport interface PercentageDiscountConfig {\n /**\n * Tier ID, or empty if config applies to the base tier.\n * @format GUID\n */\n tierId?: string | null;\n /**\n * Amount of points required to redeem the reward.\n * @min 1\n * @max 9999999\n */\n costInPoints?: number;\n /** Percentage discount. */\n percentage?: number;\n}\n\nexport interface FreeShippingDiscount {\n /**\n * Discount details for each tier.\n * @minSize 1\n * @maxSize 21\n */\n configsByTier?: FreeShippingDiscountConfig[];\n}\n\nexport interface FreeShippingDiscountConfig {\n /**\n * Tier ID, or empty if config applies to the base tier.\n * @format GUID\n */\n tierId?: string | null;\n /**\n * Amount of points required to redeem the reward.\n * @min 1\n * @max 9999999\n */\n costInPoints?: number;\n}\n\nexport interface CouponScope {\n /**\n * Scope namespace.\n *\n * See the Coupons API for valid namespaces.\n */\n namespace?: string;\n /**\n * Coupon scope's applied group.\n *\n * See the Coupons API for valid groups.\n */\n group?: Group;\n}\n\nexport interface Group {\n /**\n * Name of coupon scope's group.\n *\n * See the Coupons API for valid groups.\n */\n name?: string;\n /** Entity ID, if the coupon scope is limited to just one item. */\n entityId?: string | null;\n}\n\nexport interface SpiDiscountAmount {\n /**\n * Discount details for each tier.\n * @maxSize 21\n */\n configsByTier?: DiscountAmountConfig[];\n /**\n * Description of the SPI discount amount reward. Taken from user input in the SPI config.\n * @maxLength 200\n */\n description?: string;\n}\n\nexport interface RewardDisabled {}\n\nexport interface CreateRewardRequest {\n /** Reward to create. */\n reward: Reward;\n}\n\nexport interface CreateRewardResponse {\n /** Created reward. */\n reward?: Reward;\n}\n\nexport interface BulkCreateRewardsRequest {\n /**\n * Rewards to create.\n * @minSize 1\n * @maxSize 10\n */\n rewards: Reward[];\n}\n\nexport interface BulkCreateRewardsResponse {\n /** Created rewards. */\n results?: BulkRewardResult[];\n /** Total successes and failures of the bulk create rewards action. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRewardResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Created reward. */\n item?: Reward;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface GetRewardRequest {\n /**\n * ID of the reward to retrieve.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetRewardResponse {\n /** Retrieved reward. */\n reward?: Reward;\n}\n\nexport interface BulkGetRewardsRequest {}\n\nexport interface BulkGetRewardsResponse {\n /** Found rewards per site. */\n rewardsInSite?: RewardsInSite[];\n}\n\nexport interface RewardsInSite {\n /**\n * Metasite id.\n * @format GUID\n */\n metaSiteId?: string;\n /** Rewards. */\n rewards?: Reward[];\n}\n\nexport interface QueryRewardsRequest {\n /** Query parameters. */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\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 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 QueryRewardsResponse {\n /** Retrieved loyalty rewards. */\n rewards?: Reward[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\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 UpdateRewardRequest {\n /** Reward information to update. */\n reward: Reward;\n}\n\nexport interface UpdateRewardResponse {\n /** Updated reward. */\n reward?: Reward;\n}\n\nexport interface DeleteRewardRequest {\n /**\n * ID of the reward to delete.\n * @format GUID\n */\n _id: string;\n /**\n * Revision number, which increments by 1 each time the reward is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.\n */\n revision?: string;\n}\n\nexport interface DeleteRewardResponse {}\n\nexport interface ListRewardsRequest {\n /** Pagination options. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListRewardsResponse {\n /** Retrieved loyalty rewards. */\n rewards?: Reward[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface ListRewardsInTierRequest {\n /**\n * Tier id.\n * @format GUID\n * @readonly\n */\n tierId?: string | null;\n /** Pagination options. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListRewardsInTierResponse {\n /** Retrieved loyalty rewards. */\n rewards?: Reward[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * 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 defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\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\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * 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 defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface RewardCreatedEnvelope {\n entity: Reward;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reward is created.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionId LOYALTY.READ_REWARDS\n * @webhook\n * @eventType wix.loyalty.v1.reward_created\n * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards\n * @slug created\n */\nexport declare function onRewardCreated(\n handler: (event: RewardCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface RewardDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reward is deleted.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionId LOYALTY.READ_REWARDS\n * @webhook\n * @eventType wix.loyalty.v1.reward_deleted\n * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards\n * @slug deleted\n */\nexport declare function onRewardDeleted(\n handler: (event: RewardDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface RewardUpdatedEnvelope {\n entity: Reward;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reward is updated.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionId LOYALTY.READ_REWARDS\n * @webhook\n * @eventType wix.loyalty.v1.reward_updated\n * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards\n * @slug updated\n */\nexport declare function onRewardUpdated(\n handler: (event: RewardUpdatedEnvelope) => void | Promise<void>\n): void;\n\ntype RewardNonNullablePaths =\n | `discountAmount.configsByTier`\n | `discountAmount.configsByTier.${number}.amount`\n | `discountAmount.configsByTier.${number}.costInPoints`\n | `couponReward.fixedAmount.configsByTier`\n | `couponReward.fixedAmount.configsByTier.${number}.costInPoints`\n | `couponReward.fixedAmount.configsByTier.${number}.amount`\n | `couponReward.percentage.configsByTier`\n | `couponReward.percentage.configsByTier.${number}.costInPoints`\n | `couponReward.percentage.configsByTier.${number}.percentage`\n | `couponReward.freeShipping.configsByTier`\n | `couponReward.freeShipping.configsByTier.${number}.costInPoints`\n | `couponReward.minimumSubtotal`\n | `couponReward.scope.namespace`\n | `couponReward.scope.group.name`\n | `name`\n | `active`\n | `type`;\n\n/**\n * Creates a reward that can be redeemed with loyalty points.\n *\n * When a customer redeems a reward, a loyalty coupon is created\n * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can\n * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,\n * no coupon is actually created until a reward is redeemed with points.\n * See the Coupons API for more information about coupons.\n *\n * A reward's `active` status defaults to `false`. To make the reward available to customers,\n * either set the `active` field to `true` during creation or call [`updateReward()`](#updatereward)\n * to change the status.\n *\n * To customize a reward for each loyalty tier, use the `configsByTier` parameter.\n * This allows you to specify the amount of the earned discount, the cost in loyalty points\n * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own\n * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,\n * leave the `tierId` field empty. See the Loyalty Tiers API for more information on tiers.\n * @param reward - Reward to create.\n * @public\n * @requiredField reward\n * @requiredField reward.name\n * @permissionId LOYALTY.MANAGE_REWARDS\n * @applicableIdentity APP\n * @returns Created reward.\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.CreateReward\n */\nexport async function createReward(\n reward: NonNullablePaths<Reward, `name`>\n): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ reward: reward });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.createReward(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reward!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reward: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reward']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple rewards.\n * @param rewards - Rewards to create.\n * @public\n * @requiredField rewards\n * @requiredField rewards.name\n * @permissionId LOYALTY.MANAGE_REWARDS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkCreateRewards\n */\nexport async function bulkCreateRewards(\n rewards: NonNullablePaths<Reward, `name`>[]\n): Promise<\n NonNullablePaths<\n BulkCreateRewardsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | {\n [P in RewardNonNullablePaths]: `results.${number}.item.${P}`;\n }[RewardNonNullablePaths]\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ rewards: rewards });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.bulkCreateRewards(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { rewards: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['rewards']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a reward.\n * @param _id - ID of the reward to retrieve.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.READ_REWARDS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Retrieved reward.\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.GetReward\n */\nexport async function getReward(\n _id: string\n): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.getReward(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reward!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves rewards from all metasites that the caller is the member of.\n *\n * Must be called with user identity.\n * @public\n * @documentationMaturity preview\n * @permissionId LOYALTY.REWARD_BULK_READ\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkGetRewards\n */\nexport async function bulkGetRewards(): Promise<\n NonNullablePaths<\n BulkGetRewardsResponse,\n | `rewardsInSite`\n | `rewardsInSite.${number}.metaSiteId`\n | {\n [P in RewardNonNullablePaths]: `rewardsInSite.${number}.rewards.${number}.${P}`;\n }[RewardNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.bulkGetRewards(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of rewards, given the provided paging, filtering, and sorting.\n *\n * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.\n *\n * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n * @param query - Query parameters.\n * @public\n * @requiredField query\n * @permissionId LOYALTY.READ_REWARDS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.QueryRewards\n */\nexport async function queryRewards(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryRewardsResponse,\n {\n [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;\n }[RewardNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.queryRewards(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a loyalty reward.\n *\n * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,\n * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.\n *\n * You may not change the `type` of a reward. That is set upon creation and cannot be updated.\n * @param _id - Reward ID.\n * @public\n * @requiredField _id\n * @requiredField reward\n * @requiredField reward.name\n * @requiredField reward.revision\n * @param reward - Reward info to update.\n * @permissionId LOYALTY.MANAGE_REWARDS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.UpdateReward\n */\nexport async function updateReward(\n _id: string,\n reward: NonNullablePaths<UpdateReward, `name` | `revision`>\n): Promise<\n NonNullablePaths<\n UpdateRewardResponse,\n { [P in RewardNonNullablePaths]: `reward.${P}` }[RewardNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reward: { ...reward, id: _id },\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.updateReward(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { reward: '$[1]' },\n explicitPathsToArguments: { 'reward.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'reward']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateReward {\n /** Discount details. */\n discountAmount?: DiscountAmount;\n /** Coupon details. */\n couponReward?: CouponReward;\n /**\n * Reward ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Reward name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /** Whether the reward is active. Default: `FALSE` */\n active?: boolean;\n /** Reward type. */\n type?: RewardTypeWithLiterals;\n /**\n * Revision number, which increments by 1 each time the loyalty reward is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty reward.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the reward was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reward was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a reward.\n * @param _id - ID of the reward to delete.\n * @param revision - Revision number, which increments by 1 each time the reward is updated.\n *\n * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.\n * @public\n * @requiredField _id\n * @requiredField revision\n * @permissionId LOYALTY.MANAGE_REWARDS\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.DeleteReward\n */\nexport async function deleteReward(\n _id: string,\n revision: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n revision: revision,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.deleteReward(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', revision: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of rewards.\n *\n * The list includes rewards that are currently nonredeemable due to insufficient points held by any customers.\n * @public\n * @param options - List options.\n * @permissionId LOYALTY.READ_REWARDS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.ListRewards\n */\nexport async function listRewards(\n options?: ListRewardsOptions\n): Promise<\n NonNullablePaths<\n ListRewardsResponse,\n {\n [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;\n }[RewardNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts = ambassadorWixLoyaltyV1Reward.listRewards(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cursorPaging: '$[0].cursorPaging' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListRewardsOptions {\n /** Pagination options. */\n cursorPaging?: CursorPaging;\n}\n","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 { 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 resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-rewards',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-rewards',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-rewards',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_rewards';\n\n/**\n * Creates a reward that can be redeemed with loyalty points.\n *\n * When a customer redeems a reward, a loyalty coupon is created\n * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can\n * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,\n * no coupon is actually created until a reward is redeemed with points.\n * See the Coupons API for more information about coupons.\n *\n * A reward's `active` status defaults to `false`. To make the reward available to customers,\n * either set the `active` field to `true` during creation or call [`updateReward()`](#updatereward)\n * to change the status.\n *\n * To customize a reward for each loyalty tier, use the `configsByTier` parameter.\n * This allows you to specify the amount of the earned discount, the cost in loyalty points\n * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own\n * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,\n * leave the `tierId` field empty. See the Loyalty Tiers API for more information on tiers.\n */\nexport function createReward(payload: object): RequestOptionsFactory<any> {\n function __createReward({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'reward.createdDate' }, { path: 'reward.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'reward.couponReward.minimumSubtotal' },\n { path: 'reward.couponReward.fixedAmount.configsByTier.amount' },\n { path: 'reward.couponReward.percentage.configsByTier.percentage' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.CreateReward',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reward.createdDate' },\n { path: 'reward.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'reward.couponReward.minimumSubtotal' },\n { path: 'reward.couponReward.fixedAmount.configsByTier.amount' },\n {\n path: 'reward.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createReward;\n}\n\n/** Creates multiple rewards. */\nexport function bulkCreateRewards(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateRewards({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'rewards.createdDate' },\n { path: 'rewards.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'rewards.couponReward.minimumSubtotal' },\n { path: 'rewards.couponReward.fixedAmount.configsByTier.amount' },\n { path: 'rewards.couponReward.percentage.configsByTier.percentage' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.BulkCreateRewards',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/bulk/rewards/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.item.couponReward.minimumSubtotal' },\n {\n path: 'results.item.couponReward.fixedAmount.configsByTier.amount',\n },\n {\n path: 'results.item.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateRewards;\n}\n\n/** Retrieves a reward. */\nexport function getReward(payload: object): RequestOptionsFactory<any> {\n function __getReward({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.GetReward',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards/{id}',\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: 'reward.createdDate' },\n { path: 'reward.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'reward.couponReward.minimumSubtotal' },\n { path: 'reward.couponReward.fixedAmount.configsByTier.amount' },\n {\n path: 'reward.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getReward;\n}\n\n/**\n * Retrieves rewards from all metasites that the caller is the member of.\n *\n * Must be called with user identity.\n */\nexport function bulkGetRewards(payload: object): RequestOptionsFactory<any> {\n function __bulkGetRewards({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.BulkGetRewards',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/bulk/rewards',\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: 'rewardsInSite.rewards.createdDate' },\n { path: 'rewardsInSite.rewards.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'rewardsInSite.rewards.couponReward.minimumSubtotal' },\n {\n path: 'rewardsInSite.rewards.couponReward.fixedAmount.configsByTier.amount',\n },\n {\n path: 'rewardsInSite.rewards.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkGetRewards;\n}\n\n/**\n * Retrieves a list of rewards, given the provided paging, filtering, and sorting.\n *\n * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.\n *\n * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n */\nexport function queryRewards(payload: object): RequestOptionsFactory<any> {\n function __queryRewards({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.QueryRewards',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards/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: 'rewards.createdDate' },\n { path: 'rewards.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'rewards.couponReward.minimumSubtotal' },\n { path: 'rewards.couponReward.fixedAmount.configsByTier.amount' },\n {\n path: 'rewards.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryRewards;\n}\n\n/**\n * Updates a loyalty reward.\n *\n * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,\n * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.\n *\n * You may not change the `type` of a reward. That is set upon creation and cannot be updated.\n */\nexport function updateReward(payload: object): RequestOptionsFactory<any> {\n function __updateReward({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'reward.createdDate' }, { path: 'reward.updatedDate' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'reward.couponReward.minimumSubtotal' },\n { path: 'reward.couponReward.fixedAmount.configsByTier.amount' },\n { path: 'reward.couponReward.percentage.configsByTier.percentage' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'PUT' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.UpdateReward',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards/{reward.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: 'reward.createdDate' },\n { path: 'reward.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'reward.couponReward.minimumSubtotal' },\n { path: 'reward.couponReward.fixedAmount.configsByTier.amount' },\n {\n path: 'reward.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateReward;\n}\n\n/** Deletes a reward. */\nexport function deleteReward(payload: object): RequestOptionsFactory<any> {\n function __deleteReward({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.DeleteReward',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteReward;\n}\n\n/**\n * Retrieves a list of rewards.\n *\n * The list includes rewards that are currently nonredeemable due to insufficient points held by any customers.\n */\nexport function listRewards(payload: object): RequestOptionsFactory<any> {\n function __listRewards({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.reward',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.loyalty.reward.LoyaltyRewards.ListRewards',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressLoyaltyRewardLoyaltyRewardsUrl({\n protoPath: '/v1/rewards',\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: 'rewards.createdDate' },\n { path: 'rewards.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'rewards.couponReward.minimumSubtotal' },\n { path: 'rewards.couponReward.fixedAmount.configsByTier.amount' },\n {\n path: 'rewards.couponReward.percentage.configsByTier.percentage',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listRewards;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA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,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAN;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,IAAI,QAAQ,UAAU,OAAO;AAAA,QACzD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,UAAU;AAAA,IACpB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAaA,eAAsBO,aACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAAuC,YAAY,OAAO;AAEhE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAP;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,oBAAoB;AAAA,QAC9D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkCreateRewards","bulkGetRewards","createReward","deleteReward","getReward","listRewards","queryRewards","updateReward","import_float","import_timestamp","import_rest_modules","payload","RewardType","SortOrder","WebhookIdentityType","createReward","sdkTransformError","bulkCreateRewards","getReward","bulkGetRewards","queryRewards","updateReward","deleteReward","listRewards"]}
@@ -1,4 +1,5 @@
1
- import { t as CreateRewardRequest$1, u as CreateRewardResponse$1, v as BulkCreateRewardsRequest$1, B as BulkCreateRewardsResponse$1, y as GetRewardRequest$1, z as GetRewardResponse$1, E as BulkGetRewardsRequest$1, a as BulkGetRewardsResponse$1, J as QueryRewardsRequest$1, Q as QueryRewardsResponse$1, V as UpdateRewardRequest$1, b as UpdateRewardResponse$1, X as DeleteRewardRequest$1, Y as DeleteRewardResponse$1, Z as ListRewardsRequest$1, c as ListRewardsResponse$1 } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.js';
1
+ import { CreateRewardRequest as CreateRewardRequest$1, CreateRewardResponse as CreateRewardResponse$1, BulkCreateRewardsRequest as BulkCreateRewardsRequest$1, BulkCreateRewardsResponse as BulkCreateRewardsResponse$1, GetRewardRequest as GetRewardRequest$1, GetRewardResponse as GetRewardResponse$1, BulkGetRewardsRequest as BulkGetRewardsRequest$1, BulkGetRewardsResponse as BulkGetRewardsResponse$1, QueryRewardsRequest as QueryRewardsRequest$1, QueryRewardsResponse as QueryRewardsResponse$1, UpdateRewardRequest as UpdateRewardRequest$1, UpdateRewardResponse as UpdateRewardResponse$1, DeleteRewardRequest as DeleteRewardRequest$1, DeleteRewardResponse as DeleteRewardResponse$1, ListRewardsRequest as ListRewardsRequest$1, ListRewardsResponse as ListRewardsResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
2
3
 
3
4
  /**
4
5
  * A loyalty reward is an object a customer can redeem with loyalty points.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { R as Reward, B as BulkCreateRewardsResponse, a as BulkGetRewardsResponse, C as CursorQuery, Q as QueryRewardsResponse, U as UpdateReward, b as UpdateRewardResponse, L as ListRewardsOptions, c as ListRewardsResponse, d as RewardCreatedEnvelope, e as RewardDeletedEnvelope, f as RewardUpdatedEnvelope } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.mjs';
3
- export { a7 as ActionEvent, A as ApplicationError, ac as BaseEventMetadata, x as BulkActionMetadata, v as BulkCreateRewardsRequest, E as BulkGetRewardsRequest, w as BulkRewardResult, j as CouponReward, k as CouponRewardDiscountTypeOneOf, l as CouponRewardScopeOrMinSubtotalOneOf, q as CouponScope, t as CreateRewardRequest, u as CreateRewardResponse, N as CursorPaging, O as CursorPagingMetadata, K as CursorQueryPagingMethodOneOf, T as Cursors, X as DeleteRewardRequest, Y as DeleteRewardResponse, D as DiscountAmount, i as DiscountAmountConfig, a1 as DomainEvent, a2 as DomainEventBodyOneOf, a8 as Empty, a3 as EntityCreatedEvent, a6 as EntityDeletedEvent, a5 as EntityUpdatedEvent, ad as EventMetadata, F as FixedAmountDiscount, m as FixedAmountDiscountConfig, o as FreeShippingDiscount, p as FreeShippingDiscountConfig, y as GetRewardRequest, z as GetRewardResponse, G as Group, aa as IdentificationData, ab as IdentificationDataIdOneOf, I as ItemMetadata, $ as ListRewardsInTierRequest, a0 as ListRewardsInTierResponse, Z as ListRewardsRequest, a9 as MessageEnvelope, _ as PagingMetadataV2, P as PercentageDiscount, n as PercentageDiscountConfig, J as QueryRewardsRequest, a4 as RestoreInfo, s as RewardDisabled, g as RewardType, h as RewardTypeDetailsOneOf, H as RewardsInSite, S as SortOrder, M as Sorting, r as SpiDiscountAmount, V as UpdateRewardRequest, W as WebhookIdentityType } from './loyalty-v1-reward-rewards.universal-BFnbQRqi.mjs';
2
+ import { Reward, BulkCreateRewardsResponse, BulkGetRewardsResponse, CursorQuery, QueryRewardsResponse, UpdateReward, UpdateRewardResponse, ListRewardsOptions, ListRewardsResponse, RewardCreatedEnvelope, RewardDeletedEnvelope, RewardUpdatedEnvelope } from './index.typings.mjs';
3
+ export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateRewardsRequest, BulkGetRewardsRequest, BulkRewardResult, CouponReward, CouponRewardDiscountTypeOneOf, CouponRewardScopeOrMinSubtotalOneOf, CouponScope, CreateRewardRequest, CreateRewardResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteRewardRequest, DeleteRewardResponse, DiscountAmount, DiscountAmountConfig, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FixedAmountDiscount, FixedAmountDiscountConfig, FreeShippingDiscount, FreeShippingDiscountConfig, GetRewardRequest, GetRewardResponse, Group, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, ListRewardsInTierRequest, ListRewardsInTierResponse, ListRewardsRequest, MessageEnvelope, PagingMetadataV2, PercentageDiscount, PercentageDiscountConfig, QueryRewardsRequest, RestoreInfo, RewardDisabled, RewardType, RewardTypeDetailsOneOf, RewardsInSite, SortOrder, Sorting, SpiDiscountAmount, UpdateRewardRequest, WebhookIdentityType } from './index.typings.mjs';
4
4
 
5
5
  declare function createReward$1(httpClient: HttpClient): CreateRewardSignature;
6
6
  interface CreateRewardSignature {
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  /**
2
4
  * A loyalty reward is an object a customer can redeem with loyalty points.
3
5
  * Redeeming a reward then creates a loyalty coupon that the customer can use.
@@ -678,13 +680,156 @@ interface RewardCreatedEnvelope {
678
680
  entity: Reward;
679
681
  metadata: EventMetadata;
680
682
  }
683
+ /**
684
+ * Triggered when a reward is created.
685
+ * @permissionScope Read Loyalty
686
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
687
+ * @permissionScope Manage Loyalty
688
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
689
+ * @permissionId LOYALTY.READ_REWARDS
690
+ * @webhook
691
+ * @eventType wix.loyalty.v1.reward_created
692
+ * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards
693
+ * @slug created
694
+ */
695
+ declare function onRewardCreated(handler: (event: RewardCreatedEnvelope) => void | Promise<void>): void;
681
696
  interface RewardDeletedEnvelope {
682
697
  metadata: EventMetadata;
683
698
  }
699
+ /**
700
+ * Triggered when a reward is deleted.
701
+ * @permissionScope Read Loyalty
702
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
703
+ * @permissionScope Manage Loyalty
704
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
705
+ * @permissionId LOYALTY.READ_REWARDS
706
+ * @webhook
707
+ * @eventType wix.loyalty.v1.reward_deleted
708
+ * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards
709
+ * @slug deleted
710
+ */
711
+ declare function onRewardDeleted(handler: (event: RewardDeletedEnvelope) => void | Promise<void>): void;
684
712
  interface RewardUpdatedEnvelope {
685
713
  entity: Reward;
686
714
  metadata: EventMetadata;
687
715
  }
716
+ /**
717
+ * Triggered when a reward is updated.
718
+ * @permissionScope Read Loyalty
719
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
720
+ * @permissionScope Manage Loyalty
721
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
722
+ * @permissionId LOYALTY.READ_REWARDS
723
+ * @webhook
724
+ * @eventType wix.loyalty.v1.reward_updated
725
+ * @serviceIdentifier com.wixpress.loyalty.reward.LoyaltyRewards
726
+ * @slug updated
727
+ */
728
+ declare function onRewardUpdated(handler: (event: RewardUpdatedEnvelope) => void | Promise<void>): void;
729
+ type RewardNonNullablePaths = `discountAmount.configsByTier` | `discountAmount.configsByTier.${number}.amount` | `discountAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier` | `couponReward.fixedAmount.configsByTier.${number}.costInPoints` | `couponReward.fixedAmount.configsByTier.${number}.amount` | `couponReward.percentage.configsByTier` | `couponReward.percentage.configsByTier.${number}.costInPoints` | `couponReward.percentage.configsByTier.${number}.percentage` | `couponReward.freeShipping.configsByTier` | `couponReward.freeShipping.configsByTier.${number}.costInPoints` | `couponReward.minimumSubtotal` | `couponReward.scope.namespace` | `couponReward.scope.group.name` | `name` | `active` | `type`;
730
+ /**
731
+ * Creates a reward that can be redeemed with loyalty points.
732
+ *
733
+ * When a customer redeems a reward, a loyalty coupon is created
734
+ * based on the specifications detailed in either the `discountAmount` or `couponReward` fields. This coupon can
735
+ * then be used by the customer to receive the discount. Note that while the Rewards API uses coupon scopes and specifications,
736
+ * no coupon is actually created until a reward is redeemed with points.
737
+ * See the Coupons API for more information about coupons.
738
+ *
739
+ * A reward's `active` status defaults to `false`. To make the reward available to customers,
740
+ * either set the `active` field to `true` during creation or call [`updateReward()`](#updatereward)
741
+ * to change the status.
742
+ *
743
+ * To customize a reward for each loyalty tier, use the `configsByTier` parameter.
744
+ * This allows you to specify the amount of the earned discount, the cost in loyalty points
745
+ * to redeem the reward, and the tier to which this configuration applies. Each tier requires its own
746
+ * `configsByTier` configuration. To create a reward that is available to loyalty accounts in the base tier,
747
+ * leave the `tierId` field empty. See the Loyalty Tiers API for more information on tiers.
748
+ * @param reward - Reward to create.
749
+ * @public
750
+ * @requiredField reward
751
+ * @requiredField reward.name
752
+ * @permissionId LOYALTY.MANAGE_REWARDS
753
+ * @applicableIdentity APP
754
+ * @returns Created reward.
755
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.CreateReward
756
+ */
757
+ declare function createReward(reward: NonNullablePaths<Reward, `name`>): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>>;
758
+ /**
759
+ * Creates multiple rewards.
760
+ * @param rewards - Rewards to create.
761
+ * @public
762
+ * @requiredField rewards
763
+ * @requiredField rewards.name
764
+ * @permissionId LOYALTY.MANAGE_REWARDS
765
+ * @applicableIdentity APP
766
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkCreateRewards
767
+ */
768
+ declare function bulkCreateRewards(rewards: NonNullablePaths<Reward, `name`>[]): Promise<NonNullablePaths<BulkCreateRewardsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
769
+ [P in RewardNonNullablePaths]: `results.${number}.item.${P}`;
770
+ }[RewardNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
771
+ /**
772
+ * Retrieves a reward.
773
+ * @param _id - ID of the reward to retrieve.
774
+ * @public
775
+ * @requiredField _id
776
+ * @permissionId LOYALTY.READ_REWARDS
777
+ * @applicableIdentity APP
778
+ * @applicableIdentity VISITOR
779
+ * @returns Retrieved reward.
780
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.GetReward
781
+ */
782
+ declare function getReward(_id: string): Promise<NonNullablePaths<Reward, RewardNonNullablePaths>>;
783
+ /**
784
+ * Retrieves rewards from all metasites that the caller is the member of.
785
+ *
786
+ * Must be called with user identity.
787
+ * @public
788
+ * @documentationMaturity preview
789
+ * @permissionId LOYALTY.REWARD_BULK_READ
790
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.BulkGetRewards
791
+ */
792
+ declare function bulkGetRewards(): Promise<NonNullablePaths<BulkGetRewardsResponse, `rewardsInSite` | `rewardsInSite.${number}.metaSiteId` | {
793
+ [P in RewardNonNullablePaths]: `rewardsInSite.${number}.rewards.${number}.${P}`;
794
+ }[RewardNonNullablePaths]>>;
795
+ /**
796
+ * Retrieves a list of rewards, given the provided paging, filtering, and sorting.
797
+ *
798
+ * Query Rewards runs with these defaults, which you can override: `cursorPaging.limit` is `50`.
799
+ *
800
+ * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
801
+ * @param query - Query parameters.
802
+ * @public
803
+ * @requiredField query
804
+ * @permissionId LOYALTY.READ_REWARDS
805
+ * @applicableIdentity APP
806
+ * @applicableIdentity VISITOR
807
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.QueryRewards
808
+ */
809
+ declare function queryRewards(query: CursorQuery): Promise<NonNullablePaths<QueryRewardsResponse, {
810
+ [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;
811
+ }[RewardNonNullablePaths]>>;
812
+ /**
813
+ * Updates a loyalty reward.
814
+ *
815
+ * Use this endpoint to update details of a reward, such as the name, whether or not a reward is active,
816
+ * or the amount of points it costs to redeem. Also use this endpoint to add new tiers that are eligible to redeem a reward.
817
+ *
818
+ * You may not change the `type` of a reward. That is set upon creation and cannot be updated.
819
+ * @param _id - Reward ID.
820
+ * @public
821
+ * @requiredField _id
822
+ * @requiredField reward
823
+ * @requiredField reward.name
824
+ * @requiredField reward.revision
825
+ * @param reward - Reward info to update.
826
+ * @permissionId LOYALTY.MANAGE_REWARDS
827
+ * @applicableIdentity APP
828
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.UpdateReward
829
+ */
830
+ declare function updateReward(_id: string, reward: NonNullablePaths<UpdateReward, `name` | `revision`>): Promise<NonNullablePaths<UpdateRewardResponse, {
831
+ [P in RewardNonNullablePaths]: `reward.${P}`;
832
+ }[RewardNonNullablePaths]>>;
688
833
  interface UpdateReward {
689
834
  /** Discount details. */
690
835
  discountAmount?: DiscountAmount;
@@ -724,9 +869,37 @@ interface UpdateReward {
724
869
  */
725
870
  _updatedDate?: Date | null;
726
871
  }
872
+ /**
873
+ * Deletes a reward.
874
+ * @param _id - ID of the reward to delete.
875
+ * @param revision - Revision number, which increments by 1 each time the reward is updated.
876
+ *
877
+ * To prevent conflicting changes, the current `revision` must be passed when deleting the reward.
878
+ * @public
879
+ * @requiredField _id
880
+ * @requiredField revision
881
+ * @permissionId LOYALTY.MANAGE_REWARDS
882
+ * @applicableIdentity APP
883
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.DeleteReward
884
+ */
885
+ declare function deleteReward(_id: string, revision: string): Promise<void>;
886
+ /**
887
+ * Retrieves a list of rewards.
888
+ *
889
+ * The list includes rewards that are currently nonredeemable due to insufficient points held by any customers.
890
+ * @public
891
+ * @param options - List options.
892
+ * @permissionId LOYALTY.READ_REWARDS
893
+ * @applicableIdentity APP
894
+ * @applicableIdentity VISITOR
895
+ * @fqn com.wixpress.loyalty.reward.LoyaltyRewards.ListRewards
896
+ */
897
+ declare function listRewards(options?: ListRewardsOptions): Promise<NonNullablePaths<ListRewardsResponse, {
898
+ [P in RewardNonNullablePaths]: `rewards.${number}.${P}`;
899
+ }[RewardNonNullablePaths]>>;
727
900
  interface ListRewardsOptions {
728
901
  /** Pagination options. */
729
902
  cursorPaging?: CursorPaging;
730
903
  }
731
904
 
732
- export { type ListRewardsInTierRequest as $, type ApplicationError as A, type BulkCreateRewardsResponse as B, type CursorQuery as C, type DiscountAmount as D, type BulkGetRewardsRequest as E, type FixedAmountDiscount as F, type Group as G, type RewardsInSite as H, type ItemMetadata as I, type QueryRewardsRequest as J, type CursorQueryPagingMethodOneOf as K, type ListRewardsOptions as L, type Sorting as M, type CursorPaging as N, type CursorPagingMetadata as O, type PercentageDiscount as P, type QueryRewardsResponse as Q, type Reward as R, SortOrder as S, type Cursors as T, type UpdateReward as U, type UpdateRewardRequest as V, WebhookIdentityType as W, type DeleteRewardRequest as X, type DeleteRewardResponse as Y, type ListRewardsRequest as Z, type PagingMetadataV2 as _, type BulkGetRewardsResponse as a, type ListRewardsInTierResponse as a0, type DomainEvent as a1, type DomainEventBodyOneOf as a2, type EntityCreatedEvent as a3, type RestoreInfo as a4, type EntityUpdatedEvent as a5, type EntityDeletedEvent as a6, type ActionEvent as a7, type Empty as a8, type MessageEnvelope as a9, type IdentificationData as aa, type IdentificationDataIdOneOf as ab, type BaseEventMetadata as ac, type EventMetadata as ad, type UpdateRewardResponse as b, type ListRewardsResponse as c, type RewardCreatedEnvelope as d, type RewardDeletedEnvelope as e, type RewardUpdatedEnvelope as f, RewardType as g, type RewardTypeDetailsOneOf as h, type DiscountAmountConfig as i, type CouponReward as j, type CouponRewardDiscountTypeOneOf as k, type CouponRewardScopeOrMinSubtotalOneOf as l, type FixedAmountDiscountConfig as m, type PercentageDiscountConfig as n, type FreeShippingDiscount as o, type FreeShippingDiscountConfig as p, type CouponScope as q, type SpiDiscountAmount as r, type RewardDisabled as s, type CreateRewardRequest as t, type CreateRewardResponse as u, type BulkCreateRewardsRequest as v, type BulkRewardResult as w, type BulkActionMetadata as x, type GetRewardRequest as y, type GetRewardResponse as z };
905
+ export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateRewardsRequest, type BulkCreateRewardsResponse, type BulkGetRewardsRequest, type BulkGetRewardsResponse, type BulkRewardResult, type CouponReward, type CouponRewardDiscountTypeOneOf, type CouponRewardScopeOrMinSubtotalOneOf, type CouponScope, type CreateRewardRequest, type CreateRewardResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteRewardRequest, type DeleteRewardResponse, type DiscountAmount, type DiscountAmountConfig, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FixedAmountDiscount, type FixedAmountDiscountConfig, type FreeShippingDiscount, type FreeShippingDiscountConfig, type GetRewardRequest, type GetRewardResponse, type Group, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListRewardsInTierRequest, type ListRewardsInTierResponse, type ListRewardsOptions, type ListRewardsRequest, type ListRewardsResponse, type MessageEnvelope, type PagingMetadataV2, type PercentageDiscount, type PercentageDiscountConfig, type QueryRewardsRequest, type QueryRewardsResponse, type RestoreInfo, type Reward, type RewardCreatedEnvelope, type RewardDeletedEnvelope, type RewardDisabled, RewardType, type RewardTypeDetailsOneOf, type RewardTypeWithLiterals, type RewardUpdatedEnvelope, type RewardsInSite, SortOrder, type SortOrderWithLiterals, type Sorting, type SpiDiscountAmount, type UpdateReward, type UpdateRewardRequest, type UpdateRewardResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateRewards, bulkGetRewards, createReward, deleteReward, getReward, listRewards, onRewardCreated, onRewardDeleted, onRewardUpdated, queryRewards, updateReward };