@wix/referral 1.0.13 → 1.0.14

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.
@@ -1765,106 +1765,109 @@ declare namespace index_d$4 {
1765
1765
  }
1766
1766
 
1767
1767
  interface ReferralEvent extends ReferralEventEventTypeOneOf {
1768
- /** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
1768
+ /** Event triggered when a referred friend signs up. */
1769
1769
  referredFriendSignupEvent?: ReferredFriendSignupEvent;
1770
- /** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
1770
+ /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
1771
1771
  successfulReferralEvent?: V1SuccessfulReferralEvent;
1772
- /** ActionEvent is an event that is triggered when an action is performed. */
1772
+ /** Event triggered when an action is performed. For example, placing an order. */
1773
1773
  actionEvent?: V1ActionEvent;
1774
- /** RewardEvent is an event that is triggered when a reward is given. */
1774
+ /** Event triggered when a reward is given. */
1775
1775
  rewardEvent?: RewardEvent;
1776
1776
  /**
1777
- * ReferralEvent ID.
1777
+ * Referral event ID.
1778
1778
  * @readonly
1779
1779
  */
1780
1780
  _id?: string | null;
1781
- /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
1781
+ /**
1782
+ * Revision number, which increments by 1 each time the referral event is updated.
1783
+ * To prevent conflicting changes, the current revision must be passed when updating the referral event.
1784
+ */
1782
1785
  revision?: string | null;
1783
1786
  /**
1784
- * Represents the time this ReferralEvent was created.
1787
+ * Date and time the referral event was created.
1785
1788
  * @readonly
1786
1789
  */
1787
1790
  _createdDate?: Date;
1788
1791
  /**
1789
- * Represents the time this ReferralEvent was last updated.
1792
+ * Date and time the referral event was last updated.
1790
1793
  * @readonly
1791
1794
  */
1792
1795
  _updatedDate?: Date;
1793
1796
  }
1794
1797
  /** @oneof */
1795
1798
  interface ReferralEventEventTypeOneOf {
1796
- /** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
1799
+ /** Event triggered when a referred friend signs up. */
1797
1800
  referredFriendSignupEvent?: ReferredFriendSignupEvent;
1798
- /** SuccessfulReferralEvent is an event that is triggered when a referral is successful. */
1801
+ /** Event triggered when a referral is successful. For example, customer places and pays for an order. */
1799
1802
  successfulReferralEvent?: V1SuccessfulReferralEvent;
1800
- /** ActionEvent is an event that is triggered when an action is performed. */
1803
+ /** Event triggered when an action is performed. For example, placing an order. */
1801
1804
  actionEvent?: V1ActionEvent;
1802
- /** RewardEvent is an event that is triggered when a reward is given. */
1805
+ /** Event triggered when a reward is given. */
1803
1806
  rewardEvent?: RewardEvent;
1804
1807
  }
1805
1808
  interface ReferredFriendSignupEvent {
1806
- /** The referred friend ID. */
1809
+ /** ID of the referred friend */
1807
1810
  referredFriendId?: string;
1808
1811
  }
1809
1812
  interface V1SuccessfulReferralEvent {
1810
- /** The referred friend ID. */
1813
+ /** ID of the referred friend */
1811
1814
  referredFriendId?: string;
1812
- /** The referring customer ID. */
1815
+ /** ID of the referring customer */
1813
1816
  referringCustomerId?: string;
1814
1817
  }
1815
1818
  interface V1ActionEvent {
1816
- /** The referred friend ID. */
1819
+ /** ID of the referred friend */
1817
1820
  referredFriendId?: string;
1818
- /** The referring customer ID. */
1821
+ /** ID of the referring customer */
1819
1822
  referringCustomerId?: string;
1820
- /** The trigger of the action. */
1823
+ /** Trigger for the action */
1821
1824
  trigger?: V1Trigger;
1822
- /** Amount. */
1825
+ /** Amount associated with the action. */
1823
1826
  amount?: string | null;
1824
- /** Currency. */
1827
+ /** Currency of the amount. */
1825
1828
  currency?: string | null;
1826
- /** Order ID. */
1829
+ /** ID of the associated order. */
1827
1830
  orderId?: string | null;
1828
1831
  }
1829
1832
  interface V1Trigger {
1830
- /** The app id of the app that triggered the event. */
1833
+ /** ID of the app that triggered the event */
1831
1834
  appId?: string;
1832
- /** The activity type that triggered the event. */
1835
+ /** Type of activity that triggered the event */
1833
1836
  activityType?: string;
1834
1837
  }
1835
1838
  interface RewardEvent extends RewardEventReceiverOneOf {
1836
1839
  /**
1837
- * The referring customer ID.
1840
+ * ID of the rewarded referring customer.
1838
1841
  * @readonly
1839
1842
  */
1840
1843
  rewardedReferringCustomerId?: string;
1841
1844
  /**
1842
- * The referred friend ID.
1845
+ * ID of the rewarded referred friend.
1843
1846
  * @readonly
1844
1847
  */
1845
1848
  rewardedReferredFriendId?: string;
1846
- /** The referral reward ID. */
1849
+ /** ID of the referral reward. */
1847
1850
  referralRewardId?: string;
1848
- /** The reward type. */
1851
+ /** Type of reward. */
1849
1852
  rewardType?: Reward$1;
1850
1853
  }
1851
1854
  /** @oneof */
1852
1855
  interface RewardEventReceiverOneOf {
1853
1856
  /**
1854
- * The referring customer ID.
1857
+ * ID of the rewarded referring customer.
1855
1858
  * @readonly
1856
1859
  */
1857
1860
  rewardedReferringCustomerId?: string;
1858
1861
  /**
1859
- * The referred friend ID.
1862
+ * ID of the rewarded referred friend.
1860
1863
  * @readonly
1861
1864
  */
1862
1865
  rewardedReferredFriendId?: string;
1863
1866
  }
1864
1867
  declare enum Reward$1 {
1865
- /** Unknown reward type. */
1868
+ /** Unknown reward. This field is not used. */
1866
1869
  UNKNOWN = "UNKNOWN",
1867
- /** Reward is a coupon. */
1870
+ /** Reward is a coupon */
1868
1871
  COUPON = "COUPON",
1869
1872
  /** Reward is loyalty points. */
1870
1873
  LOYALTY_POINTS = "LOYALTY_POINTS",
@@ -1872,23 +1875,23 @@ declare enum Reward$1 {
1872
1875
  NOTHING = "NOTHING"
1873
1876
  }
1874
1877
  interface CreateReferralEventRequest {
1875
- /** ReferralEvent to be created */
1878
+ /** Referral event to create */
1876
1879
  referralEvent?: ReferralEvent;
1877
1880
  }
1878
1881
  interface CreateReferralEventResponse {
1879
- /** The created ReferralEvent */
1882
+ /** Created referral event */
1880
1883
  referralEvent?: ReferralEvent;
1881
1884
  }
1882
1885
  interface GetReferralEventRequest {
1883
- /** Id of the ReferralEvent to retrieve */
1886
+ /** ID of the referral event to retrieve. */
1884
1887
  referralEventId: string;
1885
1888
  }
1886
1889
  interface GetReferralEventResponse {
1887
- /** The retrieved ReferralEvent */
1890
+ /** Retrieved referral event. */
1888
1891
  referralEvent?: ReferralEvent;
1889
1892
  }
1890
1893
  interface QueryReferralEventRequest {
1891
- /** Query to filter ReferralEvents. */
1894
+ /** Query to filter referral events */
1892
1895
  query: CursorQuery$3;
1893
1896
  }
1894
1897
  interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 {
@@ -1942,9 +1945,9 @@ interface CursorPaging$3 {
1942
1945
  cursor?: string | null;
1943
1946
  }
1944
1947
  interface QueryReferralEventResponse {
1945
- /** List of ReferralEvents that match the query. */
1948
+ /** List of referral events. */
1946
1949
  referralEvents?: ReferralEvent[];
1947
- /** Paging metadata. */
1950
+ /** Metadata for the paginated results. */
1948
1951
  metadata?: CursorPagingMetadata$3;
1949
1952
  }
1950
1953
  interface CursorPagingMetadata$3 {
@@ -1969,72 +1972,71 @@ interface Cursors$3 {
1969
1972
  interface GetReferralStatisticsRequest {
1970
1973
  }
1971
1974
  interface GetReferralStatisticsResponse {
1972
- /** Total sign ups completed by referred friends */
1975
+ /** Total number of sign-ups completed by referred friends. */
1973
1976
  totalSignUpsCompleted?: number;
1974
- /** Total actions completed by referred friends */
1977
+ /** Total number of actions completed by referred friends. */
1975
1978
  totalActionsCompleted?: number;
1976
- /** Total amount of purchases made by referred friends */
1979
+ /** Total amount of purchases made by referred friends. */
1977
1980
  totalAmountGenerated?: string;
1978
1981
  }
1979
1982
  interface QueryReferringCustomerTotalsRequest {
1980
- /** Query to filter ReferringCustomerTotals. */
1983
+ /** Query to filter referring customer totals. */
1981
1984
  query?: CursorQuery$3;
1982
- /** List of contact ids to filter ReferringCustomerTotals. */
1985
+ /** List of contact IDs to filter referring customer totals. */
1983
1986
  contactIds?: string[];
1984
1987
  }
1985
1988
  interface QueryReferringCustomerTotalsResponse {
1986
- /** List of ReferringCustomerTotals that match the query. */
1987
1989
  referringCustomerTotals?: ReferringCustomerTotal[];
1988
- /** Paging metadata. */
1990
+ /** Paging metadata */
1989
1991
  metadata?: CursorPagingMetadata$3;
1990
1992
  }
1991
1993
  interface ReferringCustomerTotal {
1992
1994
  /**
1993
- * Referring customer id.
1995
+ * ID of the referring customer.
1994
1996
  * @readonly
1995
1997
  */
1996
1998
  referringCustomerId?: string;
1997
1999
  /**
1998
- * Contact id.
2000
+ * Contact ID.
1999
2001
  * @readonly
2000
2002
  */
2001
2003
  contactId?: string;
2002
2004
  /**
2003
- * Last successful referral date.
2005
+ * Date and time of the last successful referral.
2004
2006
  * @readonly
2005
2007
  */
2006
2008
  lastSuccessfulReferral?: Date;
2007
2009
  /**
2008
- * Total successful referrals made by this customer.
2010
+ * Total number of successful referrals made by this customer.
2009
2011
  * @readonly
2010
2012
  */
2011
2013
  totalSuccessfulReferrals?: number;
2012
2014
  /**
2013
- * Total amount generated by friends referred by this customer.
2015
+ * Total amount of revenue generated by friends referred by this customer.
2014
2016
  * @readonly
2015
2017
  */
2016
2018
  totalAmountGenerated?: string;
2017
2019
  /**
2018
- * Last friend action date.
2020
+ * Date and time of the last friend action.
2019
2021
  * @readonly
2020
2022
  */
2021
2023
  lastFriendAction?: Date;
2022
2024
  /**
2023
- * Total friends that have actions done.
2025
+ * Number of friends who have completed actions.
2024
2026
  * @readonly
2025
2027
  */
2026
2028
  totalFriendsWithActions?: number;
2027
2029
  }
2028
2030
  interface QueryReferredFriendActionsRequest {
2029
- /** Query to filter ReferredFriendActions. */
2031
+ /** Query to filter referred friend actions. */
2030
2032
  query?: CursorQuery$3;
2031
- /** List of contact ids to filter ReferredFriendActions. */
2033
+ /** List of contact IDs to filter referred friend actions. */
2032
2034
  contactIds?: string[];
2033
2035
  }
2034
2036
  interface QueryReferredFriendActionsResponse {
2035
- /** List of ReferredFriendActions that match the query. */
2037
+ /** List of referred friend actions matching the query. */
2036
2038
  referredFriendActions?: ReferredFriendAction[];
2037
- /** Paging metadata. */
2039
+ /** Paging metadata */
2038
2040
  metadata?: CursorPagingMetadata$3;
2039
2041
  }
2040
2042
  interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
@@ -2043,28 +2045,28 @@ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneO
2043
2045
  /** Loyalty points reward type options. */
2044
2046
  loyaltyPoints?: LoyaltyPoints$1;
2045
2047
  /**
2046
- * Referred friend id.
2048
+ * Referred friend ID.
2047
2049
  * @readonly
2048
2050
  */
2049
2051
  referredFriendId?: string;
2050
2052
  /**
2051
- * Contact id.
2053
+ * Contact ID.
2052
2054
  * @readonly
2053
2055
  */
2054
2056
  contactId?: string;
2055
2057
  /**
2056
- * First action trigger.
2058
+ * Trigger for the first action.
2057
2059
  * @readonly
2058
2060
  */
2059
2061
  trigger?: V1Trigger;
2060
2062
  /**
2061
- * First action date.
2063
+ * Date and time of the first action.
2062
2064
  * @readonly
2063
2065
  */
2064
2066
  actionDate?: Date;
2065
- /** Issued reward type. */
2067
+ /** Type of issued reward. */
2066
2068
  rewardType?: Reward$1;
2067
- /** Total number of actions. */
2069
+ /** Number of actions completed. */
2068
2070
  totalActions?: number;
2069
2071
  /**
2070
2072
  * Total amount spent by this referred friend.
@@ -2072,7 +2074,7 @@ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneO
2072
2074
  */
2073
2075
  totalAmountSpent?: string;
2074
2076
  /**
2075
- * friend signup date.
2077
+ * Date and time of friend signup.
2076
2078
  * @readonly
2077
2079
  */
2078
2080
  signupDate?: Date;
@@ -2585,52 +2587,67 @@ interface ReferralEventsQueryBuilder {
2585
2587
  find: () => Promise<ReferralEventsQueryResult>;
2586
2588
  }
2587
2589
  interface QueryReferringCustomerTotalsOptions {
2588
- /** Query to filter ReferringCustomerTotals. */
2590
+ /** Query to filter referring customer totals. */
2589
2591
  query?: CursorQuery$3;
2590
- /** List of contact ids to filter ReferringCustomerTotals. */
2592
+ /** List of contact IDs to filter referring customer totals. */
2591
2593
  contactIds?: string[];
2592
2594
  }
2593
2595
  interface QueryReferredFriendActionsOptions {
2594
- /** Query to filter ReferredFriendActions. */
2596
+ /** Query to filter referred friend actions. */
2595
2597
  query?: CursorQuery$3;
2596
- /** List of contact ids to filter ReferredFriendActions. */
2598
+ /** List of contact IDs to filter referred friend actions. */
2597
2599
  contactIds?: string[];
2598
2600
  }
2599
2601
 
2600
2602
  declare function getReferralEvent$1(httpClient: HttpClient): GetReferralEventSignature;
2601
2603
  interface GetReferralEventSignature {
2602
2604
  /**
2603
- * Get a ReferralEvent by id.
2604
- * @param - Id of the ReferralEvent to retrieve
2605
- * @returns The retrieved ReferralEvent
2605
+ * Retrieves a referral event by ID.
2606
+ * @param - ID of the referral event to retrieve.
2607
+ * @returns Retrieved referral event.
2606
2608
  */
2607
2609
  (referralEventId: string): Promise<ReferralEvent & ReferralEventNonNullableFields>;
2608
2610
  }
2609
2611
  declare function queryReferralEvent$1(httpClient: HttpClient): QueryReferralEventSignature;
2610
2612
  interface QueryReferralEventSignature {
2611
2613
  /**
2612
- * Query ReferralEvents
2614
+ * Retrieves a list of referral events, given the provided paging, filtering, and sorting.
2615
+ *
2616
+ * To learn about working with Query endpoints, see
2617
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
2618
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
2619
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
2613
2620
  */
2614
2621
  (): ReferralEventsQueryBuilder;
2615
2622
  }
2616
2623
  declare function getReferralStatistics$1(httpClient: HttpClient): GetReferralStatisticsSignature;
2617
2624
  interface GetReferralStatisticsSignature {
2618
2625
  /**
2619
- * Get referral statistics.
2626
+ * Retrieves referral statistics.
2620
2627
  */
2621
2628
  (): Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
2622
2629
  }
2623
2630
  declare function queryReferringCustomerTotals$1(httpClient: HttpClient): QueryReferringCustomerTotalsSignature;
2624
2631
  interface QueryReferringCustomerTotalsSignature {
2625
2632
  /**
2626
- * Query referring customer totals.
2633
+ * Retrieves a list of referring customer totals, given the provided paging, filtering, and sorting.
2634
+ *
2635
+ * To learn about working with Query endpoints, see
2636
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
2637
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
2638
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
2627
2639
  */
2628
2640
  (options?: QueryReferringCustomerTotalsOptions | undefined): Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
2629
2641
  }
2630
2642
  declare function queryReferredFriendActions$1(httpClient: HttpClient): QueryReferredFriendActionsSignature;
2631
2643
  interface QueryReferredFriendActionsSignature {
2632
2644
  /**
2633
- * Query referred friend actions.
2645
+ * Retrieves a list of referred friend actions, given the provided paging, filtering, and sorting.
2646
+ *
2647
+ * To learn about working with Query endpoints, see
2648
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
2649
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
2650
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
2634
2651
  */
2635
2652
  (options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
2636
2653
  }