export interface ReferralEvent extends ReferralEventEventTypeOneOf { /** Event triggered when a referred friend signs up. */ referredFriendSignupEvent?: ReferredFriendSignupEvent; /** Event triggered when a referral is successful. For example, customer places and pays for an order. */ successfulReferralEvent?: V1SuccessfulReferralEvent; /** Event triggered when an action is performed. For example, placing an order. */ actionEvent?: V1ActionEvent; /** Event triggered when a reward is given. */ rewardEvent?: RewardEvent; /** * Referral event ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the referral event is updated. * To prevent conflicting changes, the current revision must be passed when updating the referral event. */ revision?: string | null; /** * Date and time the referral event was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the referral event was last updated. * @readonly */ _updatedDate?: Date | null; } /** @oneof */ export interface ReferralEventEventTypeOneOf { /** Event triggered when a referred friend signs up. */ referredFriendSignupEvent?: ReferredFriendSignupEvent; /** Event triggered when a referral is successful. For example, customer places and pays for an order. */ successfulReferralEvent?: V1SuccessfulReferralEvent; /** Event triggered when an action is performed. For example, placing an order. */ actionEvent?: V1ActionEvent; /** Event triggered when a reward is given. */ rewardEvent?: RewardEvent; } export interface ReferredFriendSignupEvent { /** ID of the referred friend. */ referredFriendId?: string; } export interface V1SuccessfulReferralEvent { /** ID of the referred friend. */ referredFriendId?: string; /** ID of the referring customer. */ referringCustomerId?: string; } export interface V1ActionEvent { /** ID of the referred friend. */ referredFriendId?: string; /** ID of the referring customer. */ referringCustomerId?: string; /** Trigger for the action. */ trigger?: V1Trigger; /** Amount associated with the action. */ amount?: string | null; /** Currency of the amount. */ currency?: string | null; /** ID of the associated order. */ orderId?: string | null; } export interface V1Trigger { /** ID of the app that triggered the event. */ appId?: string; /** Type of activity that triggered the event. */ activityType?: string; } export interface RewardEvent extends RewardEventReceiverOneOf { /** * ID of the rewarded referring customer. * @readonly */ rewardedReferringCustomerId?: string; /** * ID of the rewarded referred friend. * @readonly */ rewardedReferredFriendId?: string; /** ID of the referral reward. */ referralRewardId?: string; /** Type of reward. */ rewardType?: Reward; } /** @oneof */ export interface RewardEventReceiverOneOf { /** * ID of the rewarded referring customer. * @readonly */ rewardedReferringCustomerId?: string; /** * ID of the rewarded referred friend. * @readonly */ rewardedReferredFriendId?: string; } export declare enum Reward { /** Unknown reward. This field is not used. */ UNKNOWN = "UNKNOWN", /** Reward is a coupon. */ COUPON = "COUPON", /** Reward is loyalty points. */ LOYALTY_POINTS = "LOYALTY_POINTS", /** No reward. */ NOTHING = "NOTHING" } export interface CreateReferralEventRequest { /** Referral event to create. */ referralEvent?: ReferralEvent; } export interface CreateReferralEventResponse { /** Created referral event. */ referralEvent?: ReferralEvent; } export interface GetReferralEventRequest { /** ID of the referral event to retrieve. */ referralEventId: string; } export interface GetReferralEventResponse { /** Retrieved referral event. */ referralEvent?: ReferralEvent; } export interface QueryReferralEventRequest { /** Query to filter referral events. */ query: CursorQuery; } export 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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting[]; } /** @oneof */ export 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; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface QueryReferralEventResponse { /** List of referral events. */ referralEvents?: ReferralEvent[]; /** Metadata for the paginated results. */ metadata?: CursorPagingMetadata; } export 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; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface GetReferralStatisticsRequest { } export interface GetReferralStatisticsResponse { /** Total number of sign-ups completed by referred friends. */ totalSignUpsCompleted?: number; /** Total number of actions completed by referred friends. */ totalActionsCompleted?: number; /** Total amount of purchases made by referred friends. */ totalAmountGenerated?: string; } export interface QueryReferringCustomerTotalsRequest { /** Query to filter referring customer totals. */ query?: CursorQuery; /** List of contact IDs to filter referring customer totals. */ contactIds?: string[]; } export interface QueryReferringCustomerTotalsResponse { referringCustomerTotals?: ReferringCustomerTotal[]; /** Paging metadata. */ metadata?: CursorPagingMetadata; } export interface ReferringCustomerTotal { /** * ID of the referring customer. * @readonly */ referringCustomerId?: string; /** * Contact ID. * @readonly */ contactId?: string; /** * Date and time of the last successful referral. * @readonly */ lastSuccessfulReferral?: Date | null; /** * Total number of successful referrals made by this customer. * @readonly */ totalSuccessfulReferrals?: number; /** * Total amount of revenue generated by friends referred by this customer. * @readonly */ totalAmountGenerated?: string; /** * Date and time of the last friend action. * @readonly */ lastFriendAction?: Date | null; /** * Number of friends who have completed actions. * @readonly */ totalFriendsWithActions?: number; } export interface QueryReferredFriendActionsRequest { /** Query to filter referred friend actions. */ query?: CursorQuery; /** List of contact IDs to filter referred friend actions. */ contactIds?: string[]; } export interface QueryReferredFriendActionsResponse { /** List of referred friend actions matching the query. */ referredFriendActions?: ReferredFriendAction[]; /** Paging metadata. */ metadata?: CursorPagingMetadata; } export interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf { /** Coupon reward type options. */ coupon?: V1Coupon; /** Loyalty points reward type options. */ loyaltyPoints?: LoyaltyPoints; /** * Referred friend ID. * @readonly */ referredFriendId?: string; /** * Contact ID. * @readonly */ contactId?: string; /** * Trigger for the first action. * @readonly */ trigger?: V1Trigger; /** * Date and time of the first action. * @readonly */ actionDate?: Date | null; /** Type of issued reward. */ rewardType?: Reward; /** Number of actions completed. */ totalActions?: number; /** * Total amount spent by this referred friend. * @readonly */ totalAmountSpent?: string; /** * Date and time of friend signup. * @readonly */ signupDate?: Date | null; } /** @oneof */ export interface ReferredFriendActionRewardTypeOptionsOneOf { /** Coupon reward type options. */ coupon?: V1Coupon; /** Loyalty points reward type options. */ loyaltyPoints?: LoyaltyPoints; } export interface V1Coupon { /** * Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`. * @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?: Status; /** * Detailed specifications of the coupon. * @readonly */ couponSpecification?: Coupon; } export 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" } export 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. */ name?: string; /** Coupon discount type. */ discountType?: DiscountType; /** * 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 */ export interface CouponDiscountTypeOptionsOneOf { /** Options for fixed amount discount. */ fixedAmountOptions?: FixedAmountDiscount; /** Options for percentage discounts. */ percentageOptions?: PercentageDiscount; } /** @oneof */ export 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; } export 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" } export interface FixedAmountDiscount { /** Amount of the discount as a fixed value. */ amount?: number; } export interface PercentageDiscount { /** Percentage of discount. */ percentage?: number; } export 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; } export interface Group { /** Name of the group. */ name?: string; /** Entity ID of the group. */ entityId?: string | null; } export interface LoyaltyPoints { /** * Loyalty transaction ID. * @readonly */ transactionId?: string; /** * The number of loyalty points awarded. * @readonly */ amount?: number; } export interface ReprocessReferralEventsRequest extends ReprocessReferralEventsRequestEntityOneOf { /** ID of the referring customer. */ referringCustomerId?: string; /** ID of the referred friend. */ referredFriendId?: string; } /** @oneof */ export interface ReprocessReferralEventsRequestEntityOneOf { /** ID of the referring customer. */ referringCustomerId?: string; /** ID of the referred friend. */ referredFriendId?: string; } export interface ReprocessReferralEventsResponse { } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } export interface SuccessfulReferralEvent { /** Details of the referred friend who completed their referral. */ referredFriendDetails?: ReferredFriendDetails; } export interface ReferredFriendDetails { /** * ID of the referred friend. * @readonly */ referredFriendId?: string; /** * Contact ID of the referred friend. * @readonly */ contactId?: string; /** * ID of the customer who referred this friend. * @readonly */ referringCustomerId?: string; } export interface ReferredFriendActionEvent { /** Details of the referred friend. */ referredFriendDetails?: ReferredFriendDetails; /** Details of the trigger. */ trigger?: Trigger; /** Amount of the referral reward. */ amount?: string | null; /** Currency of the referral reward. */ currency?: string | null; /** ID of the order associated with the referral. */ orderId?: string | null; } export interface Trigger { /** ID of the app associated with the referral activity. */ appId?: string; /** Type of referral activity. */ activityType?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface ReferredFriendSignupEventNonNullableFields { referredFriendId: string; } interface V1SuccessfulReferralEventNonNullableFields { referredFriendId: string; referringCustomerId: string; } interface V1TriggerNonNullableFields { appId: string; activityType: string; } interface V1ActionEventNonNullableFields { referredFriendId: string; referringCustomerId: string; trigger?: V1TriggerNonNullableFields; } interface RewardEventNonNullableFields { rewardedReferringCustomerId: string; rewardedReferredFriendId: string; referralRewardId: string; rewardType: Reward; } export interface ReferralEventNonNullableFields { referredFriendSignupEvent?: ReferredFriendSignupEventNonNullableFields; successfulReferralEvent?: V1SuccessfulReferralEventNonNullableFields; actionEvent?: V1ActionEventNonNullableFields; rewardEvent?: RewardEventNonNullableFields; } export interface GetReferralEventResponseNonNullableFields { referralEvent?: ReferralEventNonNullableFields; } export interface QueryReferralEventResponseNonNullableFields { referralEvents: ReferralEventNonNullableFields[]; } export interface GetReferralStatisticsResponseNonNullableFields { totalSignUpsCompleted: number; totalActionsCompleted: number; totalAmountGenerated: string; } interface ReferringCustomerTotalNonNullableFields { referringCustomerId: string; contactId: string; totalSuccessfulReferrals: number; totalAmountGenerated: string; totalFriendsWithActions: number; } export interface QueryReferringCustomerTotalsResponseNonNullableFields { referringCustomerTotals: ReferringCustomerTotalNonNullableFields[]; } interface FixedAmountDiscountNonNullableFields { amount: number; } interface PercentageDiscountNonNullableFields { percentage: number; } interface GroupNonNullableFields { name: string; } interface CouponScopeNonNullableFields { namespace: string; group?: GroupNonNullableFields; } interface CouponNonNullableFields { fixedAmountOptions?: FixedAmountDiscountNonNullableFields; percentageOptions?: PercentageDiscountNonNullableFields; minimumSubtotal: number; scope?: CouponScopeNonNullableFields; name: string; discountType: DiscountType; } interface V1CouponNonNullableFields { _id: string; code: string; status: Status; couponSpecification?: CouponNonNullableFields; } interface LoyaltyPointsNonNullableFields { transactionId: string; amount: number; } interface ReferredFriendActionNonNullableFields { coupon?: V1CouponNonNullableFields; loyaltyPoints?: LoyaltyPointsNonNullableFields; referredFriendId: string; contactId: string; trigger?: V1TriggerNonNullableFields; rewardType: Reward; totalActions: number; totalAmountSpent: string; } export interface QueryReferredFriendActionsResponseNonNullableFields { referredFriendActions: ReferredFriendActionNonNullableFields[]; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface ReferralEventCreatedEnvelope { entity: ReferralEvent; metadata: EventMetadata; } /** @permissionId REFERRALS.READ_REFERRAL_EVENTS * @webhook * @eventType wix.loyalty.referral.v1.referral_event_created */ export declare function onReferralEventCreated(handler: (event: ReferralEventCreatedEnvelope) => void | Promise): void; /** * Retrieves a referral event by ID. * @param referralEventId - ID of the referral event to retrieve. * @public * @requiredField referralEventId * @permissionId REFERRALS.READ_REFERRAL_EVENTS * @returns Retrieved referral event. * @fqn wix.loyalty.referral.tracker.v1.ReferralEvents.GetReferralEvent */ export declare function getReferralEvent(referralEventId: string): Promise; /** * Creates a query to retrieve a list of referral events. * * The `queryReferralEvents()` function builds a query to retrieve a list of referral events and returns a `ReferralEventsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` function. * * You can refine the query by chaining `ReferralEventsQueryBuilder` functions onto the query. `ReferralEventsQueryBuilder` functions enable you to sort, filter, and control the results `queryReferralEvents()` returns. * * `queryReferralEvents()` runs with these `ReferralEventsQueryBuilder` defaults, which you can override: * * - skip(0) * - limit(50) * - descending("_createdDate") * * The functions that are chained to `queryReferralEvents()` are applied in the order they're called. For example, if you apply ascending('actionEvent') and then descending('rewardEvent'), the results are sorted first by the action events, and then, if there are multiple results with the same action events, the items are sorted by reward events. * @public * @permissionId REFERRALS.READ_REFERRAL_EVENTS * @fqn wix.loyalty.referral.tracker.v1.ReferralEvents.QueryReferralEvent */ export declare function queryReferralEvent(): ReferralEventsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface ReferralEventsQueryResult extends QueryCursorResult { items: ReferralEvent[]; query: ReferralEventsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface ReferralEventsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: 'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: 'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: 'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate', value: any[]) => ReferralEventsQueryBuilder; in: (propertyName: 'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate', value: any) => ReferralEventsQueryBuilder; exists: (propertyName: 'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate', value: boolean) => ReferralEventsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'referredFriendSignupEvent' | 'successfulReferralEvent' | 'actionEvent' | 'rewardEvent' | '_createdDate' | '_updatedDate'>) => ReferralEventsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => ReferralEventsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => ReferralEventsQueryBuilder; find: () => Promise; } /** * Retrieves referral statistics. * @public * @permissionId REFERRALS.READ_REFERRAL_STATISTICS * @fqn wix.loyalty.referral.tracker.v1.ReferralEvents.GetReferralStatistics */ export declare function getReferralStatistics(): Promise; /** * Retrieves a list of referring customer totals, given the provided paging, filtering, and sorting. * * 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). * @public * @permissionId REFERRALS.READ_REFERRAL_STATISTICS * @fqn wix.loyalty.referral.tracker.v1.ReferralEvents.QueryReferringCustomerTotals */ export declare function queryReferringCustomerTotals(options?: QueryReferringCustomerTotalsOptions): Promise; export interface QueryReferringCustomerTotalsOptions { /** Query to filter referring customer totals. */ query?: CursorQuery; /** List of contact IDs to filter referring customer totals. */ contactIds?: string[]; } /** * Retrieves a list of referred friend actions, given the provided paging, filtering, and sorting. * * 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). * @public * @permissionId REFERRALS.READ_REFERRAL_STATISTICS * @fqn wix.loyalty.referral.tracker.v1.ReferralEvents.QueryReferredFriendActions */ export declare function queryReferredFriendActions(options?: QueryReferredFriendActionsOptions): Promise; export interface QueryReferredFriendActionsOptions { /** Query to filter referred friend actions. */ query?: CursorQuery; /** List of contact IDs to filter referred friend actions. */ contactIds?: string[]; } export {};