import { GetReferralRewardRequest as GetReferralRewardRequest$1, GetReferralRewardResponse as GetReferralRewardResponse$1, QueryReferralRewardsRequest as QueryReferralRewardsRequest$1, QueryReferralRewardsResponse as QueryReferralRewardsResponse$1, BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest$1, BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf { /** * ID of the referring customer who received the reward. * @format GUID * @readonly */ rewardedReferringCustomerId?: string; /** * ID of the referred friend who received the reward. * @format GUID * @readonly */ rewardedReferredFriendId?: string; /** Details of a coupon reward. Present when `rewardType` is `COUPON`. */ coupon?: V1Coupon; /** Details of a loyalty points reward. Present when `rewardType` is `LOYALTY_POINTS`. */ loyaltyPoints?: V1LoyaltyPoints; /** * Referral reward ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the referral reward is updated. * To prevent conflicting changes, the current revision must be passed when updating the referral reward. * @immutable */ revision?: string | null; /** * Date and time the referral reward was created. * @readonly */ createdDate?: Date | null; /** * Date and time the referral reward was last updated. * @readonly */ updatedDate?: Date | null; /** Type of reward given. */ rewardType?: RewardTypeTypeWithLiterals; } /** @oneof */ interface ReferralRewardReceiverOneOf { /** * ID of the referring customer who received the reward. * @format GUID * @readonly */ rewardedReferringCustomerId?: string; /** * ID of the referred friend who received the reward. * @format GUID * @readonly */ rewardedReferredFriendId?: string; } /** @oneof */ interface ReferralRewardRewardTypeOptionsOneOf { /** Details of a coupon reward. Present when `rewardType` is `COUPON`. */ coupon?: V1Coupon; /** Details of a loyalty points reward. Present when `rewardType` is `LOYALTY_POINTS`. */ loyaltyPoints?: V1LoyaltyPoints; } declare enum RewardTypeType { /** Unknown reward type. */ UNKNOWN = "UNKNOWN", /** Loyalty coupon is given. */ COUPON = "COUPON", /** Loyalty points are awarded. */ LOYALTY_POINTS = "LOYALTY_POINTS", /** No reward is given. */ NOTHING = "NOTHING" } /** @enumType */ type RewardTypeTypeWithLiterals = RewardTypeType | 'UNKNOWN' | 'COUPON' | 'LOYALTY_POINTS' | 'NOTHING'; interface V1Coupon { /** * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`. * @format GUID * @readonly */ id?: string; /** * The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`. * @readonly */ code?: string; /** * Current status of the coupon. * @readonly */ status?: StatusWithLiterals; /** * Detailed specifications of the coupon. * @readonly */ couponSpecification?: Coupon; } declare enum Status { /** Coupon status is unknown or not specified. */ UNKNOWN = "UNKNOWN", /** Coupon is active and can be applied to purchases. */ ACTIVE = "ACTIVE", /** Coupon was applied and can't be used again. */ APPLIED = "APPLIED", /** Coupon was deleted and is no longer valid. */ DELETED = "DELETED" } /** @enumType */ type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'APPLIED' | 'DELETED'; interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf { /** Options for fixed amount discount. */ fixedAmountOptions?: FixedAmountDiscount; /** Options for percentage discounts. */ percentageOptions?: PercentageDiscount; /** Limit the coupon to carts with a subtotal above this number. */ minimumSubtotal?: number; /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ scope?: CouponScope; /** * Coupon name. * @minLength 1 * @maxLength 50 */ name?: string; /** Coupon discount type. */ discountType?: DiscountTypeWithLiterals; /** * Whether the coupon is limited to one item. * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item. * Coupons with a bookings `scope.namespace` are always limited to one item. */ limitedToOneItem?: boolean | null; /** Whether the coupon applies to subscription products. */ appliesToSubscriptions?: boolean | null; /** * Specifies the amount of discounted cycles for a subscription item. * * - Can only be set when `scope.namespace = pricingPlans`. * - If `discountedCycleCount` is empty, the coupon applies to all available cycles. * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`. * * Max: `999` */ discountedCycleCount?: number | null; } /** @oneof */ interface CouponDiscountTypeOptionsOneOf { /** Options for fixed amount discount. */ fixedAmountOptions?: FixedAmountDiscount; /** Options for percentage discounts. */ percentageOptions?: PercentageDiscount; } /** @oneof */ interface CouponScopeOrMinSubtotalOneOf { /** Limit the coupon to carts with a subtotal above this number. */ minimumSubtotal?: number; /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ scope?: CouponScope; } declare enum DiscountType { /** Unknown discount type. */ UNKNOWN = "UNKNOWN", /** Discount as a fixed amount. */ FIXED_AMOUNT = "FIXED_AMOUNT", /** Discount as a percentage. */ PERCENTAGE = "PERCENTAGE", /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */ FREE_SHIPPING = "FREE_SHIPPING" } /** @enumType */ type DiscountTypeWithLiterals = DiscountType | 'UNKNOWN' | 'FIXED_AMOUNT' | 'PERCENTAGE' | 'FREE_SHIPPING'; interface FixedAmountDiscount { /** * Amount of the discount as a fixed value. * @min 0.01 */ amount?: number; } interface PercentageDiscount { /** * Percentage of discount. * @max 100 */ percentage?: number; } interface CouponScope { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */ group?: Group; } interface Group { /** Name of the group. */ name?: string; /** Entity ID of the group. */ entityId?: string | null; } interface V1LoyaltyPoints { /** * Loyalty transaction ID. * @format GUID * @readonly */ transactionId?: string; /** * The number of loyalty points awarded. * @readonly */ amount?: number; } interface GetReferralRewardRequest { /** * Referral reward ID. * @format GUID */ id: string; } interface GetReferralRewardResponse { /** Retrieved referral reward. */ referralReward?: ReferralReward; } interface QueryReferralRewardsRequest { /** Query to filter referral rewards. */ query: CursorQuery; /** Contact ID to filter rewards by. Use `"me"` for current identity's rewards. */ contactId?: string | null; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryReferralRewardsResponse { /** Retrieved referral rewards. */ referralRewards?: ReferralReward[]; /** Metadata for paging. */ metadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface ValidateReferralRewardRequest { /** Reward to validate. */ reward?: Reward; } interface Reward extends RewardOptionsOneOf { /** Options for coupon reward type. */ couponOptions?: Coupon; /** Options for the Loyalty points reward type. */ loyaltyPointsOptions?: LoyaltyPoints; /** Type of the reward. */ type?: TypeWithLiterals; } /** @oneof */ interface RewardOptionsOneOf { /** Options for coupon reward type. */ couponOptions?: Coupon; /** Options for the Loyalty points reward type. */ loyaltyPointsOptions?: LoyaltyPoints; } declare enum Type { /** Unknown reward type. */ UNKNOWN = "UNKNOWN", /** Coupon reward type. */ COUPON = "COUPON", /** Loyalty points reward type. */ LOYALTY_POINTS = "LOYALTY_POINTS", /** No reward type. */ NOTHING = "NOTHING" } /** @enumType */ type TypeWithLiterals = Type | 'UNKNOWN' | 'COUPON' | 'LOYALTY_POINTS' | 'NOTHING'; interface LoyaltyPoints { /** * Number of loyalty points to give. * @min 1 * @max 9999999 */ amount?: number; } interface ValidateReferralRewardResponse { } interface BulkGetReferralRewardsRequest { } interface BulkGetReferralRewardsResponse { /** Rewards grouped by site. */ rewardsInSite?: RewardsInSite[]; } interface RewardsInSite { /** * Metasite ID. * @format GUID */ metaSiteId?: string; /** List of rewards for the site. */ rewards?: ReferralReward[]; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface SuccessfulReferralEvent { /** Details of the referred friend who completed their referral. */ referredFriendDetails?: ReferredFriendDetails; } interface ReferredFriendDetails { /** * ID of the referred friend. * @format GUID * @readonly */ referredFriendId?: string; /** * Contact ID of the referred friend. * @format GUID * @readonly */ contactId?: string; /** * ID of the customer who referred this friend. * @format GUID * @readonly */ referringCustomerId?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getReferralReward(): __PublicMethodMetaInfo<'GET', { id: string; }, GetReferralRewardRequest$1, GetReferralRewardRequest, GetReferralRewardResponse$1, GetReferralRewardResponse>; declare function queryReferralRewards(): __PublicMethodMetaInfo<'POST', {}, QueryReferralRewardsRequest$1, QueryReferralRewardsRequest, QueryReferralRewardsResponse$1, QueryReferralRewardsResponse>; declare function bulkGetReferralRewards(): __PublicMethodMetaInfo<'GET', {}, BulkGetReferralRewardsRequest$1, BulkGetReferralRewardsRequest, BulkGetReferralRewardsResponse$1, BulkGetReferralRewardsResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequestOriginal, type BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponseOriginal, type CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOfOriginal, type Coupon as CouponOriginal, type CouponScopeOrMinSubtotalOneOf as CouponScopeOrMinSubtotalOneOfOriginal, type CouponScope as CouponScopeOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, DiscountType as DiscountTypeOriginal, type DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FixedAmountDiscount as FixedAmountDiscountOriginal, type GetReferralRewardRequest as GetReferralRewardRequestOriginal, type GetReferralRewardResponse as GetReferralRewardResponseOriginal, type Group as GroupOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type LoyaltyPoints as LoyaltyPointsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PercentageDiscount as PercentageDiscountOriginal, type QueryReferralRewardsRequest as QueryReferralRewardsRequestOriginal, type QueryReferralRewardsResponse as QueryReferralRewardsResponseOriginal, type ReferralReward as ReferralRewardOriginal, type ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOfOriginal, type ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOfOriginal, type ReferredFriendDetails as ReferredFriendDetailsOriginal, type RestoreInfo as RestoreInfoOriginal, type RewardOptionsOneOf as RewardOptionsOneOfOriginal, type Reward as RewardOriginal, RewardTypeType as RewardTypeTypeOriginal, type RewardTypeTypeWithLiterals as RewardTypeTypeWithLiteralsOriginal, type RewardsInSite as RewardsInSiteOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type SuccessfulReferralEvent as SuccessfulReferralEventOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type V1Coupon as V1CouponOriginal, type V1LoyaltyPoints as V1LoyaltyPointsOriginal, type ValidateReferralRewardRequest as ValidateReferralRewardRequestOriginal, type ValidateReferralRewardResponse as ValidateReferralRewardResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkGetReferralRewards, getReferralReward, queryReferralRewards };