@wix/referral 1.0.13 → 1.0.15
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.
- package/package.json +5 -5
- package/type-bundles/context.bundle.d.ts +161 -124
- package/type-bundles/index.bundle.d.ts +161 -124
- package/type-bundles/meta.bundle.d.ts +174 -164
|
@@ -1765,106 +1765,109 @@ declare namespace index_d$4 {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
|
|
1767
1767
|
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
1768
|
-
/**
|
|
1768
|
+
/** Event triggered when a referred friend signs up. */
|
|
1769
1769
|
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1770
|
-
/**
|
|
1770
|
+
/** Event triggered when a referral is successful. For example, customer places and pays for an order. */
|
|
1771
1771
|
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1772
|
-
/**
|
|
1772
|
+
/** Event triggered when an action is performed. For example, placing an order. */
|
|
1773
1773
|
actionEvent?: V1ActionEvent;
|
|
1774
|
-
/**
|
|
1774
|
+
/** Event triggered when a reward is given. */
|
|
1775
1775
|
rewardEvent?: RewardEvent;
|
|
1776
1776
|
/**
|
|
1777
|
-
*
|
|
1777
|
+
* Referral event ID.
|
|
1778
1778
|
* @readonly
|
|
1779
1779
|
*/
|
|
1780
1780
|
_id?: string | null;
|
|
1781
|
-
/**
|
|
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
|
-
*
|
|
1787
|
+
* Date and time the referral event was created.
|
|
1785
1788
|
* @readonly
|
|
1786
1789
|
*/
|
|
1787
1790
|
_createdDate?: Date;
|
|
1788
1791
|
/**
|
|
1789
|
-
*
|
|
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
|
-
/**
|
|
1799
|
+
/** Event triggered when a referred friend signs up. */
|
|
1797
1800
|
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
1798
|
-
/**
|
|
1801
|
+
/** Event triggered when a referral is successful. For example, customer places and pays for an order. */
|
|
1799
1802
|
successfulReferralEvent?: V1SuccessfulReferralEvent;
|
|
1800
|
-
/**
|
|
1803
|
+
/** Event triggered when an action is performed. For example, placing an order. */
|
|
1801
1804
|
actionEvent?: V1ActionEvent;
|
|
1802
|
-
/**
|
|
1805
|
+
/** Event triggered when a reward is given. */
|
|
1803
1806
|
rewardEvent?: RewardEvent;
|
|
1804
1807
|
}
|
|
1805
1808
|
interface ReferredFriendSignupEvent {
|
|
1806
|
-
/**
|
|
1809
|
+
/** ID of the referred friend */
|
|
1807
1810
|
referredFriendId?: string;
|
|
1808
1811
|
}
|
|
1809
1812
|
interface V1SuccessfulReferralEvent {
|
|
1810
|
-
/**
|
|
1813
|
+
/** ID of the referred friend */
|
|
1811
1814
|
referredFriendId?: string;
|
|
1812
|
-
/**
|
|
1815
|
+
/** ID of the referring customer */
|
|
1813
1816
|
referringCustomerId?: string;
|
|
1814
1817
|
}
|
|
1815
1818
|
interface V1ActionEvent {
|
|
1816
|
-
/**
|
|
1819
|
+
/** ID of the referred friend */
|
|
1817
1820
|
referredFriendId?: string;
|
|
1818
|
-
/**
|
|
1821
|
+
/** ID of the referring customer */
|
|
1819
1822
|
referringCustomerId?: string;
|
|
1820
|
-
/**
|
|
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
|
-
/**
|
|
1829
|
+
/** ID of the associated order. */
|
|
1827
1830
|
orderId?: string | null;
|
|
1828
1831
|
}
|
|
1829
1832
|
interface V1Trigger {
|
|
1830
|
-
/**
|
|
1833
|
+
/** ID of the app that triggered the event */
|
|
1831
1834
|
appId?: string;
|
|
1832
|
-
/**
|
|
1835
|
+
/** Type of activity that triggered the event */
|
|
1833
1836
|
activityType?: string;
|
|
1834
1837
|
}
|
|
1835
1838
|
interface RewardEvent extends RewardEventReceiverOneOf {
|
|
1836
1839
|
/**
|
|
1837
|
-
*
|
|
1840
|
+
* ID of the rewarded referring customer.
|
|
1838
1841
|
* @readonly
|
|
1839
1842
|
*/
|
|
1840
1843
|
rewardedReferringCustomerId?: string;
|
|
1841
1844
|
/**
|
|
1842
|
-
*
|
|
1845
|
+
* ID of the rewarded referred friend.
|
|
1843
1846
|
* @readonly
|
|
1844
1847
|
*/
|
|
1845
1848
|
rewardedReferredFriendId?: string;
|
|
1846
|
-
/**
|
|
1849
|
+
/** ID of the referral reward. */
|
|
1847
1850
|
referralRewardId?: string;
|
|
1848
|
-
/**
|
|
1851
|
+
/** Type of reward. */
|
|
1849
1852
|
rewardType?: Reward$1;
|
|
1850
1853
|
}
|
|
1851
1854
|
/** @oneof */
|
|
1852
1855
|
interface RewardEventReceiverOneOf {
|
|
1853
1856
|
/**
|
|
1854
|
-
*
|
|
1857
|
+
* ID of the rewarded referring customer.
|
|
1855
1858
|
* @readonly
|
|
1856
1859
|
*/
|
|
1857
1860
|
rewardedReferringCustomerId?: string;
|
|
1858
1861
|
/**
|
|
1859
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
1878
|
+
/** Referral event to create */
|
|
1876
1879
|
referralEvent?: ReferralEvent;
|
|
1877
1880
|
}
|
|
1878
1881
|
interface CreateReferralEventResponse {
|
|
1879
|
-
/**
|
|
1882
|
+
/** Created referral event */
|
|
1880
1883
|
referralEvent?: ReferralEvent;
|
|
1881
1884
|
}
|
|
1882
1885
|
interface GetReferralEventRequest {
|
|
1883
|
-
/**
|
|
1886
|
+
/** ID of the referral event to retrieve. */
|
|
1884
1887
|
referralEventId: string;
|
|
1885
1888
|
}
|
|
1886
1889
|
interface GetReferralEventResponse {
|
|
1887
|
-
/**
|
|
1890
|
+
/** Retrieved referral event. */
|
|
1888
1891
|
referralEvent?: ReferralEvent;
|
|
1889
1892
|
}
|
|
1890
1893
|
interface QueryReferralEventRequest {
|
|
1891
|
-
/** Query to filter
|
|
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
|
|
1948
|
+
/** List of referral events. */
|
|
1946
1949
|
referralEvents?: ReferralEvent[];
|
|
1947
|
-
/**
|
|
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
|
|
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
|
|
1983
|
+
/** Query to filter referring customer totals. */
|
|
1981
1984
|
query?: CursorQuery$3;
|
|
1982
|
-
/** List of contact
|
|
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
|
-
*
|
|
1995
|
+
* ID of the referring customer.
|
|
1994
1996
|
* @readonly
|
|
1995
1997
|
*/
|
|
1996
1998
|
referringCustomerId?: string;
|
|
1997
1999
|
/**
|
|
1998
|
-
* Contact
|
|
2000
|
+
* Contact ID.
|
|
1999
2001
|
* @readonly
|
|
2000
2002
|
*/
|
|
2001
2003
|
contactId?: string;
|
|
2002
2004
|
/**
|
|
2003
|
-
*
|
|
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
|
-
*
|
|
2020
|
+
* Date and time of the last friend action.
|
|
2019
2021
|
* @readonly
|
|
2020
2022
|
*/
|
|
2021
2023
|
lastFriendAction?: Date;
|
|
2022
2024
|
/**
|
|
2023
|
-
*
|
|
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
|
|
2031
|
+
/** Query to filter referred friend actions. */
|
|
2030
2032
|
query?: CursorQuery$3;
|
|
2031
|
-
/** List of contact
|
|
2033
|
+
/** List of contact IDs to filter referred friend actions. */
|
|
2032
2034
|
contactIds?: string[];
|
|
2033
2035
|
}
|
|
2034
2036
|
interface QueryReferredFriendActionsResponse {
|
|
2035
|
-
/** List of
|
|
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
|
|
2048
|
+
* Referred friend ID.
|
|
2047
2049
|
* @readonly
|
|
2048
2050
|
*/
|
|
2049
2051
|
referredFriendId?: string;
|
|
2050
2052
|
/**
|
|
2051
|
-
* Contact
|
|
2053
|
+
* Contact ID.
|
|
2052
2054
|
* @readonly
|
|
2053
2055
|
*/
|
|
2054
2056
|
contactId?: string;
|
|
2055
2057
|
/**
|
|
2056
|
-
*
|
|
2058
|
+
* Trigger for the first action.
|
|
2057
2059
|
* @readonly
|
|
2058
2060
|
*/
|
|
2059
2061
|
trigger?: V1Trigger;
|
|
2060
2062
|
/**
|
|
2061
|
-
*
|
|
2063
|
+
* Date and time of the first action.
|
|
2062
2064
|
* @readonly
|
|
2063
2065
|
*/
|
|
2064
2066
|
actionDate?: Date;
|
|
2065
|
-
/**
|
|
2067
|
+
/** Type of issued reward. */
|
|
2066
2068
|
rewardType?: Reward$1;
|
|
2067
|
-
/**
|
|
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
|
|
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
|
|
2590
|
+
/** Query to filter referring customer totals. */
|
|
2589
2591
|
query?: CursorQuery$3;
|
|
2590
|
-
/** List of contact
|
|
2592
|
+
/** List of contact IDs to filter referring customer totals. */
|
|
2591
2593
|
contactIds?: string[];
|
|
2592
2594
|
}
|
|
2593
2595
|
interface QueryReferredFriendActionsOptions {
|
|
2594
|
-
/** Query to filter
|
|
2596
|
+
/** Query to filter referred friend actions. */
|
|
2595
2597
|
query?: CursorQuery$3;
|
|
2596
|
-
/** List of contact
|
|
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
|
-
*
|
|
2604
|
-
* @param -
|
|
2605
|
-
* @returns
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|
|
@@ -3259,34 +3276,35 @@ declare namespace index_d$2 {
|
|
|
3259
3276
|
|
|
3260
3277
|
interface ReferredFriend {
|
|
3261
3278
|
/**
|
|
3262
|
-
*
|
|
3279
|
+
* ID of the referred friend.
|
|
3263
3280
|
* @readonly
|
|
3264
3281
|
*/
|
|
3265
3282
|
_id?: string;
|
|
3266
3283
|
/**
|
|
3267
|
-
*
|
|
3284
|
+
* Contact ID of the referred friend.
|
|
3268
3285
|
* @readonly
|
|
3269
3286
|
*/
|
|
3270
3287
|
contactId?: string;
|
|
3271
3288
|
/**
|
|
3272
|
-
*
|
|
3289
|
+
* ID of the customer who referred this friend.
|
|
3273
3290
|
* @readonly
|
|
3274
3291
|
*/
|
|
3275
3292
|
referringCustomerId?: string;
|
|
3276
|
-
/** Status of the
|
|
3293
|
+
/** Status of the referred friend. */
|
|
3277
3294
|
status?: Status;
|
|
3278
3295
|
/**
|
|
3279
|
-
*
|
|
3296
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
3297
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
3280
3298
|
* @readonly
|
|
3281
3299
|
*/
|
|
3282
3300
|
revision?: string | null;
|
|
3283
3301
|
/**
|
|
3284
|
-
*
|
|
3302
|
+
* Date and time the referred friend was created.
|
|
3285
3303
|
* @readonly
|
|
3286
3304
|
*/
|
|
3287
3305
|
_createdDate?: Date;
|
|
3288
3306
|
/**
|
|
3289
|
-
*
|
|
3307
|
+
* Date and time the referred friend was last updated.
|
|
3290
3308
|
* @readonly
|
|
3291
3309
|
*/
|
|
3292
3310
|
_updatedDate?: Date;
|
|
@@ -3294,47 +3312,49 @@ interface ReferredFriend {
|
|
|
3294
3312
|
declare enum Status {
|
|
3295
3313
|
/** Unknown status. */
|
|
3296
3314
|
UNKNOWN = "UNKNOWN",
|
|
3297
|
-
/** Initial status
|
|
3315
|
+
/** Initial status when the referred friend joins the site as a member. */
|
|
3298
3316
|
SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
|
|
3299
|
-
/**
|
|
3317
|
+
/** Status after the referred friend completes specific actions, such as making a purchase. */
|
|
3300
3318
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
3301
3319
|
}
|
|
3302
3320
|
interface CreateReferredFriendRequest {
|
|
3303
|
-
/** Referral code for referred friend */
|
|
3321
|
+
/** Referral code for the referred friend. */
|
|
3304
3322
|
referralCode?: string | null;
|
|
3305
3323
|
}
|
|
3306
3324
|
interface CreateReferredFriendResponse {
|
|
3307
|
-
/**
|
|
3325
|
+
/** Created referred friend. */
|
|
3308
3326
|
referredFriend?: ReferredFriend;
|
|
3309
3327
|
}
|
|
3310
3328
|
interface GetReferredFriendRequest {
|
|
3311
|
-
/**
|
|
3329
|
+
/** ID of the referred friend to retrieve. */
|
|
3312
3330
|
referredFriendId: string;
|
|
3313
3331
|
}
|
|
3314
3332
|
interface GetReferredFriendResponse {
|
|
3315
|
-
/**
|
|
3333
|
+
/** Retrieved referred friend. */
|
|
3316
3334
|
referredFriend?: ReferredFriend;
|
|
3317
3335
|
}
|
|
3318
3336
|
interface GetReferredFriendByContactIdRequest {
|
|
3319
|
-
/** Contact
|
|
3337
|
+
/** Contact ID or "me" to get the current identity's contact. */
|
|
3320
3338
|
contactId: string;
|
|
3321
3339
|
}
|
|
3322
3340
|
interface GetReferredFriendByContactIdResponse {
|
|
3323
|
-
/**
|
|
3341
|
+
/** Retrieved referred friend. */
|
|
3324
3342
|
referredFriend?: ReferredFriend;
|
|
3325
3343
|
}
|
|
3326
3344
|
interface UpdateReferredFriendRequest {
|
|
3327
|
-
/**
|
|
3345
|
+
/** Referred friend to be updated. May be partial. */
|
|
3328
3346
|
referredFriend: ReferredFriend;
|
|
3329
3347
|
}
|
|
3330
3348
|
interface UpdateReferredFriendResponse {
|
|
3331
|
-
/**
|
|
3349
|
+
/** Updated referred friend. */
|
|
3332
3350
|
referredFriend?: ReferredFriend;
|
|
3333
3351
|
}
|
|
3334
3352
|
interface DeleteReferredFriendRequest {
|
|
3335
|
-
/** Id of the ReferredFriend to delete. */
|
|
3336
3353
|
referredFriendId: string;
|
|
3337
|
-
/**
|
|
3354
|
+
/**
|
|
3355
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
3356
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
3357
|
+
*/
|
|
3338
3358
|
revision?: string;
|
|
3339
3359
|
}
|
|
3340
3360
|
interface DeleteReferredFriendResponse {
|
|
@@ -3394,9 +3414,9 @@ interface CursorPaging$1 {
|
|
|
3394
3414
|
cursor?: string | null;
|
|
3395
3415
|
}
|
|
3396
3416
|
interface QueryReferredFriendResponse {
|
|
3397
|
-
/**
|
|
3417
|
+
/** Retrieved referred friends. */
|
|
3398
3418
|
referredFriends?: ReferredFriend[];
|
|
3399
|
-
/**
|
|
3419
|
+
/** Cursor paging metadata. */
|
|
3400
3420
|
metadata?: CursorPagingMetadata$1;
|
|
3401
3421
|
}
|
|
3402
3422
|
interface CursorPagingMetadata$1 {
|
|
@@ -3630,45 +3650,49 @@ interface ReferredFriendDeletedEnvelope {
|
|
|
3630
3650
|
metadata: EventMetadata$1;
|
|
3631
3651
|
}
|
|
3632
3652
|
interface CreateReferredFriendOptions {
|
|
3633
|
-
/** Referral code for referred friend */
|
|
3653
|
+
/** Referral code for the referred friend. */
|
|
3634
3654
|
referralCode?: string | null;
|
|
3635
3655
|
}
|
|
3636
3656
|
interface UpdateReferredFriend {
|
|
3637
3657
|
/**
|
|
3638
|
-
*
|
|
3658
|
+
* ID of the referred friend.
|
|
3639
3659
|
* @readonly
|
|
3640
3660
|
*/
|
|
3641
3661
|
_id?: string;
|
|
3642
3662
|
/**
|
|
3643
|
-
*
|
|
3663
|
+
* Contact ID of the referred friend.
|
|
3644
3664
|
* @readonly
|
|
3645
3665
|
*/
|
|
3646
3666
|
contactId?: string;
|
|
3647
3667
|
/**
|
|
3648
|
-
*
|
|
3668
|
+
* ID of the customer who referred this friend.
|
|
3649
3669
|
* @readonly
|
|
3650
3670
|
*/
|
|
3651
3671
|
referringCustomerId?: string;
|
|
3652
|
-
/** Status of the
|
|
3672
|
+
/** Status of the referred friend. */
|
|
3653
3673
|
status?: Status;
|
|
3654
3674
|
/**
|
|
3655
|
-
*
|
|
3675
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
3676
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
3656
3677
|
* @readonly
|
|
3657
3678
|
*/
|
|
3658
3679
|
revision?: string | null;
|
|
3659
3680
|
/**
|
|
3660
|
-
*
|
|
3681
|
+
* Date and time the referred friend was created.
|
|
3661
3682
|
* @readonly
|
|
3662
3683
|
*/
|
|
3663
3684
|
_createdDate?: Date;
|
|
3664
3685
|
/**
|
|
3665
|
-
*
|
|
3686
|
+
* Date and time the referred friend was last updated.
|
|
3666
3687
|
* @readonly
|
|
3667
3688
|
*/
|
|
3668
3689
|
_updatedDate?: Date;
|
|
3669
3690
|
}
|
|
3670
3691
|
interface DeleteReferredFriendOptions {
|
|
3671
|
-
/**
|
|
3692
|
+
/**
|
|
3693
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
3694
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
3695
|
+
*/
|
|
3672
3696
|
revision?: string;
|
|
3673
3697
|
}
|
|
3674
3698
|
interface QueryCursorResult$1 {
|
|
@@ -3752,56 +3776,69 @@ interface ReferredFriendsQueryBuilder {
|
|
|
3752
3776
|
declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
|
|
3753
3777
|
interface CreateReferredFriendSignature {
|
|
3754
3778
|
/**
|
|
3755
|
-
*
|
|
3779
|
+
* Creates a new referred friend or returns an existing entity if it already exists.
|
|
3780
|
+
*
|
|
3781
|
+
* This method must be called with a [member identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#site-members).
|
|
3782
|
+
*
|
|
3783
|
+
* A referral code must be provided either in the request or via scope.
|
|
3756
3784
|
*
|
|
3757
|
-
*
|
|
3758
|
-
* Referral code must be provided either in the request or via scope.
|
|
3759
|
-
* Member must be eligible to become referred friend.
|
|
3785
|
+
* The member must be eligible to become a referred friend.
|
|
3760
3786
|
*/
|
|
3761
3787
|
(options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
|
|
3762
3788
|
}
|
|
3763
3789
|
declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
|
|
3764
3790
|
interface GetReferredFriendSignature {
|
|
3765
3791
|
/**
|
|
3766
|
-
*
|
|
3767
|
-
* @param -
|
|
3792
|
+
* Retrieves a referred friend by ID.
|
|
3793
|
+
* @param - ID of the referred friend to retrieve.
|
|
3768
3794
|
*/
|
|
3769
3795
|
(referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
|
|
3770
3796
|
}
|
|
3771
3797
|
declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
|
|
3772
3798
|
interface GetReferredFriendByContactIdSignature {
|
|
3773
3799
|
/**
|
|
3774
|
-
*
|
|
3800
|
+
* Retrieves a referred friend by contact ID.
|
|
3775
3801
|
*
|
|
3776
|
-
* You can
|
|
3777
|
-
* @param - Contact
|
|
3778
|
-
* @returns
|
|
3802
|
+
* You can use `"me"` instead of a specific contact ID to get the referred friend for the current identity's contact.
|
|
3803
|
+
* @param - Contact ID or "me" to get the current identity's contact.
|
|
3804
|
+
* @returns Retrieved referred friend.
|
|
3779
3805
|
*/
|
|
3780
3806
|
(contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3781
3807
|
}
|
|
3782
3808
|
declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
|
|
3783
3809
|
interface UpdateReferredFriendSignature {
|
|
3784
3810
|
/**
|
|
3785
|
-
*
|
|
3811
|
+
* Updates a referred friend. Supports partial updates.
|
|
3786
3812
|
*
|
|
3787
|
-
*
|
|
3788
|
-
* @param -
|
|
3789
|
-
* @returns
|
|
3813
|
+
* You must pass the latest revision for a successful update.
|
|
3814
|
+
* @param - ID of the referred friend.
|
|
3815
|
+
* @returns Updated referred friend.
|
|
3790
3816
|
*/
|
|
3791
3817
|
(_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3792
3818
|
}
|
|
3793
3819
|
declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
|
|
3794
3820
|
interface DeleteReferredFriendSignature {
|
|
3795
3821
|
/**
|
|
3796
|
-
*
|
|
3797
|
-
* @param - Id of the ReferredFriend to delete.
|
|
3822
|
+
* Deletes a referred friend.
|
|
3798
3823
|
*/
|
|
3799
3824
|
(referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
|
|
3800
3825
|
}
|
|
3801
3826
|
declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
|
|
3802
3827
|
interface QueryReferredFriendSignature {
|
|
3803
3828
|
/**
|
|
3804
|
-
*
|
|
3829
|
+
* Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
|
|
3830
|
+
*
|
|
3831
|
+
* This endpoint supports [WQL (Wix Query Language)](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
3832
|
+
*
|
|
3833
|
+
* You can filter by:
|
|
3834
|
+
* - `referring_customer_id`
|
|
3835
|
+
* - `status`
|
|
3836
|
+
* - `created_date`
|
|
3837
|
+
*
|
|
3838
|
+
* To learn about working with _Query_ endpoints, see
|
|
3839
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
3840
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
3841
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
3805
3842
|
*/
|
|
3806
3843
|
(): ReferredFriendsQueryBuilder;
|
|
3807
3844
|
}
|
|
@@ -4303,9 +4340,9 @@ interface GenerateReferringCustomerForContactSignature {
|
|
|
4303
4340
|
/**
|
|
4304
4341
|
* Creates a new referring customer or returns an existing one for the provided contact ID.
|
|
4305
4342
|
*
|
|
4306
|
-
* You can use "me" instead of a specific contact ID to generate a referring customer for the current identity's contact.
|
|
4343
|
+
* You can use `"me"`` instead of a specific contact ID to generate a referring customer for the current identity's contact.
|
|
4307
4344
|
*
|
|
4308
|
-
* See [About Identities](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) to learn more about identies.
|
|
4345
|
+
* See the [About Identities](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) article to learn more about identies.
|
|
4309
4346
|
* @param - Contact ID or `"me"` to generate the current identity's referring customer.
|
|
4310
4347
|
*/
|
|
4311
4348
|
(contactId: string): Promise<GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields>;
|
|
@@ -4332,7 +4369,7 @@ interface QueryReferringCustomersSignature {
|
|
|
4332
4369
|
/**
|
|
4333
4370
|
* Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
|
|
4334
4371
|
*
|
|
4335
|
-
*
|
|
4372
|
+
* This endpoint supports [WQL (Wix Query Language)](https://dev.wix.com/api/rest/getting-started/api-query-language) with these properties:
|
|
4336
4373
|
* `contact_id`, `referral_code`, `created_date`, `updated_date`.
|
|
4337
4374
|
*
|
|
4338
4375
|
* To learn about working with _Query_ endpoints, see
|