@wix/referral 1.0.14 → 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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/referral",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/referral_customers": "1.0.
|
|
22
|
-
"@wix/referral_friends": "1.0.
|
|
21
|
+
"@wix/referral_customers": "1.0.6",
|
|
22
|
+
"@wix/referral_friends": "1.0.5",
|
|
23
23
|
"@wix/referral_programs": "1.0.7",
|
|
24
24
|
"@wix/referral_rewards": "1.0.4",
|
|
25
25
|
"@wix/referral_tracker": "1.0.10"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "bbf7fbe99d9bc40d610f2f40d4b70953894060b4ff7baf3ade03c830"
|
|
51
51
|
}
|
|
@@ -3276,34 +3276,35 @@ declare namespace context$2 {
|
|
|
3276
3276
|
|
|
3277
3277
|
interface ReferredFriend {
|
|
3278
3278
|
/**
|
|
3279
|
-
*
|
|
3279
|
+
* ID of the referred friend.
|
|
3280
3280
|
* @readonly
|
|
3281
3281
|
*/
|
|
3282
3282
|
_id?: string;
|
|
3283
3283
|
/**
|
|
3284
|
-
*
|
|
3284
|
+
* Contact ID of the referred friend.
|
|
3285
3285
|
* @readonly
|
|
3286
3286
|
*/
|
|
3287
3287
|
contactId?: string;
|
|
3288
3288
|
/**
|
|
3289
|
-
*
|
|
3289
|
+
* ID of the customer who referred this friend.
|
|
3290
3290
|
* @readonly
|
|
3291
3291
|
*/
|
|
3292
3292
|
referringCustomerId?: string;
|
|
3293
|
-
/** Status of the
|
|
3293
|
+
/** Status of the referred friend. */
|
|
3294
3294
|
status?: Status;
|
|
3295
3295
|
/**
|
|
3296
|
-
*
|
|
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.
|
|
3297
3298
|
* @readonly
|
|
3298
3299
|
*/
|
|
3299
3300
|
revision?: string | null;
|
|
3300
3301
|
/**
|
|
3301
|
-
*
|
|
3302
|
+
* Date and time the referred friend was created.
|
|
3302
3303
|
* @readonly
|
|
3303
3304
|
*/
|
|
3304
3305
|
_createdDate?: Date;
|
|
3305
3306
|
/**
|
|
3306
|
-
*
|
|
3307
|
+
* Date and time the referred friend was last updated.
|
|
3307
3308
|
* @readonly
|
|
3308
3309
|
*/
|
|
3309
3310
|
_updatedDate?: Date;
|
|
@@ -3311,47 +3312,49 @@ interface ReferredFriend {
|
|
|
3311
3312
|
declare enum Status {
|
|
3312
3313
|
/** Unknown status. */
|
|
3313
3314
|
UNKNOWN = "UNKNOWN",
|
|
3314
|
-
/** Initial status
|
|
3315
|
+
/** Initial status when the referred friend joins the site as a member. */
|
|
3315
3316
|
SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
|
|
3316
|
-
/**
|
|
3317
|
+
/** Status after the referred friend completes specific actions, such as making a purchase. */
|
|
3317
3318
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
3318
3319
|
}
|
|
3319
3320
|
interface CreateReferredFriendRequest {
|
|
3320
|
-
/** Referral code for referred friend */
|
|
3321
|
+
/** Referral code for the referred friend. */
|
|
3321
3322
|
referralCode?: string | null;
|
|
3322
3323
|
}
|
|
3323
3324
|
interface CreateReferredFriendResponse {
|
|
3324
|
-
/**
|
|
3325
|
+
/** Created referred friend. */
|
|
3325
3326
|
referredFriend?: ReferredFriend;
|
|
3326
3327
|
}
|
|
3327
3328
|
interface GetReferredFriendRequest {
|
|
3328
|
-
/**
|
|
3329
|
+
/** ID of the referred friend to retrieve. */
|
|
3329
3330
|
referredFriendId: string;
|
|
3330
3331
|
}
|
|
3331
3332
|
interface GetReferredFriendResponse {
|
|
3332
|
-
/**
|
|
3333
|
+
/** Retrieved referred friend. */
|
|
3333
3334
|
referredFriend?: ReferredFriend;
|
|
3334
3335
|
}
|
|
3335
3336
|
interface GetReferredFriendByContactIdRequest {
|
|
3336
|
-
/** Contact
|
|
3337
|
+
/** Contact ID or "me" to get the current identity's contact. */
|
|
3337
3338
|
contactId: string;
|
|
3338
3339
|
}
|
|
3339
3340
|
interface GetReferredFriendByContactIdResponse {
|
|
3340
|
-
/**
|
|
3341
|
+
/** Retrieved referred friend. */
|
|
3341
3342
|
referredFriend?: ReferredFriend;
|
|
3342
3343
|
}
|
|
3343
3344
|
interface UpdateReferredFriendRequest {
|
|
3344
|
-
/**
|
|
3345
|
+
/** Referred friend to be updated. May be partial. */
|
|
3345
3346
|
referredFriend: ReferredFriend;
|
|
3346
3347
|
}
|
|
3347
3348
|
interface UpdateReferredFriendResponse {
|
|
3348
|
-
/**
|
|
3349
|
+
/** Updated referred friend. */
|
|
3349
3350
|
referredFriend?: ReferredFriend;
|
|
3350
3351
|
}
|
|
3351
3352
|
interface DeleteReferredFriendRequest {
|
|
3352
|
-
/** Id of the ReferredFriend to delete. */
|
|
3353
3353
|
referredFriendId: string;
|
|
3354
|
-
/**
|
|
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
|
+
*/
|
|
3355
3358
|
revision?: string;
|
|
3356
3359
|
}
|
|
3357
3360
|
interface DeleteReferredFriendResponse {
|
|
@@ -3411,9 +3414,9 @@ interface CursorPaging$1 {
|
|
|
3411
3414
|
cursor?: string | null;
|
|
3412
3415
|
}
|
|
3413
3416
|
interface QueryReferredFriendResponse {
|
|
3414
|
-
/**
|
|
3417
|
+
/** Retrieved referred friends. */
|
|
3415
3418
|
referredFriends?: ReferredFriend[];
|
|
3416
|
-
/**
|
|
3419
|
+
/** Cursor paging metadata. */
|
|
3417
3420
|
metadata?: CursorPagingMetadata$1;
|
|
3418
3421
|
}
|
|
3419
3422
|
interface CursorPagingMetadata$1 {
|
|
@@ -3647,45 +3650,49 @@ interface ReferredFriendDeletedEnvelope {
|
|
|
3647
3650
|
metadata: EventMetadata$1;
|
|
3648
3651
|
}
|
|
3649
3652
|
interface CreateReferredFriendOptions {
|
|
3650
|
-
/** Referral code for referred friend */
|
|
3653
|
+
/** Referral code for the referred friend. */
|
|
3651
3654
|
referralCode?: string | null;
|
|
3652
3655
|
}
|
|
3653
3656
|
interface UpdateReferredFriend {
|
|
3654
3657
|
/**
|
|
3655
|
-
*
|
|
3658
|
+
* ID of the referred friend.
|
|
3656
3659
|
* @readonly
|
|
3657
3660
|
*/
|
|
3658
3661
|
_id?: string;
|
|
3659
3662
|
/**
|
|
3660
|
-
*
|
|
3663
|
+
* Contact ID of the referred friend.
|
|
3661
3664
|
* @readonly
|
|
3662
3665
|
*/
|
|
3663
3666
|
contactId?: string;
|
|
3664
3667
|
/**
|
|
3665
|
-
*
|
|
3668
|
+
* ID of the customer who referred this friend.
|
|
3666
3669
|
* @readonly
|
|
3667
3670
|
*/
|
|
3668
3671
|
referringCustomerId?: string;
|
|
3669
|
-
/** Status of the
|
|
3672
|
+
/** Status of the referred friend. */
|
|
3670
3673
|
status?: Status;
|
|
3671
3674
|
/**
|
|
3672
|
-
*
|
|
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.
|
|
3673
3677
|
* @readonly
|
|
3674
3678
|
*/
|
|
3675
3679
|
revision?: string | null;
|
|
3676
3680
|
/**
|
|
3677
|
-
*
|
|
3681
|
+
* Date and time the referred friend was created.
|
|
3678
3682
|
* @readonly
|
|
3679
3683
|
*/
|
|
3680
3684
|
_createdDate?: Date;
|
|
3681
3685
|
/**
|
|
3682
|
-
*
|
|
3686
|
+
* Date and time the referred friend was last updated.
|
|
3683
3687
|
* @readonly
|
|
3684
3688
|
*/
|
|
3685
3689
|
_updatedDate?: Date;
|
|
3686
3690
|
}
|
|
3687
3691
|
interface DeleteReferredFriendOptions {
|
|
3688
|
-
/**
|
|
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
|
+
*/
|
|
3689
3696
|
revision?: string;
|
|
3690
3697
|
}
|
|
3691
3698
|
interface QueryCursorResult$1 {
|
|
@@ -3769,56 +3776,69 @@ interface ReferredFriendsQueryBuilder {
|
|
|
3769
3776
|
declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
|
|
3770
3777
|
interface CreateReferredFriendSignature {
|
|
3771
3778
|
/**
|
|
3772
|
-
*
|
|
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).
|
|
3773
3782
|
*
|
|
3774
|
-
*
|
|
3775
|
-
*
|
|
3776
|
-
*
|
|
3783
|
+
* A referral code must be provided either in the request or via scope.
|
|
3784
|
+
*
|
|
3785
|
+
* The member must be eligible to become a referred friend.
|
|
3777
3786
|
*/
|
|
3778
3787
|
(options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
|
|
3779
3788
|
}
|
|
3780
3789
|
declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
|
|
3781
3790
|
interface GetReferredFriendSignature {
|
|
3782
3791
|
/**
|
|
3783
|
-
*
|
|
3784
|
-
* @param -
|
|
3792
|
+
* Retrieves a referred friend by ID.
|
|
3793
|
+
* @param - ID of the referred friend to retrieve.
|
|
3785
3794
|
*/
|
|
3786
3795
|
(referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
|
|
3787
3796
|
}
|
|
3788
3797
|
declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
|
|
3789
3798
|
interface GetReferredFriendByContactIdSignature {
|
|
3790
3799
|
/**
|
|
3791
|
-
*
|
|
3800
|
+
* Retrieves a referred friend by contact ID.
|
|
3792
3801
|
*
|
|
3793
|
-
* You can
|
|
3794
|
-
* @param - Contact
|
|
3795
|
-
* @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.
|
|
3796
3805
|
*/
|
|
3797
3806
|
(contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3798
3807
|
}
|
|
3799
3808
|
declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
|
|
3800
3809
|
interface UpdateReferredFriendSignature {
|
|
3801
3810
|
/**
|
|
3802
|
-
*
|
|
3811
|
+
* Updates a referred friend. Supports partial updates.
|
|
3803
3812
|
*
|
|
3804
|
-
*
|
|
3805
|
-
* @param -
|
|
3806
|
-
* @returns
|
|
3813
|
+
* You must pass the latest revision for a successful update.
|
|
3814
|
+
* @param - ID of the referred friend.
|
|
3815
|
+
* @returns Updated referred friend.
|
|
3807
3816
|
*/
|
|
3808
3817
|
(_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3809
3818
|
}
|
|
3810
3819
|
declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
|
|
3811
3820
|
interface DeleteReferredFriendSignature {
|
|
3812
3821
|
/**
|
|
3813
|
-
*
|
|
3814
|
-
* @param - Id of the ReferredFriend to delete.
|
|
3822
|
+
* Deletes a referred friend.
|
|
3815
3823
|
*/
|
|
3816
3824
|
(referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
|
|
3817
3825
|
}
|
|
3818
3826
|
declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
|
|
3819
3827
|
interface QueryReferredFriendSignature {
|
|
3820
3828
|
/**
|
|
3821
|
-
*
|
|
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).
|
|
3822
3842
|
*/
|
|
3823
3843
|
(): ReferredFriendsQueryBuilder;
|
|
3824
3844
|
}
|
|
@@ -4320,9 +4340,9 @@ interface GenerateReferringCustomerForContactSignature {
|
|
|
4320
4340
|
/**
|
|
4321
4341
|
* Creates a new referring customer or returns an existing one for the provided contact ID.
|
|
4322
4342
|
*
|
|
4323
|
-
* 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.
|
|
4324
4344
|
*
|
|
4325
|
-
* 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.
|
|
4326
4346
|
* @param - Contact ID or `"me"` to generate the current identity's referring customer.
|
|
4327
4347
|
*/
|
|
4328
4348
|
(contactId: string): Promise<GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields>;
|
|
@@ -4349,7 +4369,7 @@ interface QueryReferringCustomersSignature {
|
|
|
4349
4369
|
/**
|
|
4350
4370
|
* Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
|
|
4351
4371
|
*
|
|
4352
|
-
*
|
|
4372
|
+
* This endpoint supports [WQL (Wix Query Language)](https://dev.wix.com/api/rest/getting-started/api-query-language) with these properties:
|
|
4353
4373
|
* `contact_id`, `referral_code`, `created_date`, `updated_date`.
|
|
4354
4374
|
*
|
|
4355
4375
|
* To learn about working with _Query_ endpoints, see
|
|
@@ -3276,34 +3276,35 @@ declare namespace index_d$2 {
|
|
|
3276
3276
|
|
|
3277
3277
|
interface ReferredFriend {
|
|
3278
3278
|
/**
|
|
3279
|
-
*
|
|
3279
|
+
* ID of the referred friend.
|
|
3280
3280
|
* @readonly
|
|
3281
3281
|
*/
|
|
3282
3282
|
_id?: string;
|
|
3283
3283
|
/**
|
|
3284
|
-
*
|
|
3284
|
+
* Contact ID of the referred friend.
|
|
3285
3285
|
* @readonly
|
|
3286
3286
|
*/
|
|
3287
3287
|
contactId?: string;
|
|
3288
3288
|
/**
|
|
3289
|
-
*
|
|
3289
|
+
* ID of the customer who referred this friend.
|
|
3290
3290
|
* @readonly
|
|
3291
3291
|
*/
|
|
3292
3292
|
referringCustomerId?: string;
|
|
3293
|
-
/** Status of the
|
|
3293
|
+
/** Status of the referred friend. */
|
|
3294
3294
|
status?: Status;
|
|
3295
3295
|
/**
|
|
3296
|
-
*
|
|
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.
|
|
3297
3298
|
* @readonly
|
|
3298
3299
|
*/
|
|
3299
3300
|
revision?: string | null;
|
|
3300
3301
|
/**
|
|
3301
|
-
*
|
|
3302
|
+
* Date and time the referred friend was created.
|
|
3302
3303
|
* @readonly
|
|
3303
3304
|
*/
|
|
3304
3305
|
_createdDate?: Date;
|
|
3305
3306
|
/**
|
|
3306
|
-
*
|
|
3307
|
+
* Date and time the referred friend was last updated.
|
|
3307
3308
|
* @readonly
|
|
3308
3309
|
*/
|
|
3309
3310
|
_updatedDate?: Date;
|
|
@@ -3311,47 +3312,49 @@ interface ReferredFriend {
|
|
|
3311
3312
|
declare enum Status {
|
|
3312
3313
|
/** Unknown status. */
|
|
3313
3314
|
UNKNOWN = "UNKNOWN",
|
|
3314
|
-
/** Initial status
|
|
3315
|
+
/** Initial status when the referred friend joins the site as a member. */
|
|
3315
3316
|
SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
|
|
3316
|
-
/**
|
|
3317
|
+
/** Status after the referred friend completes specific actions, such as making a purchase. */
|
|
3317
3318
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
3318
3319
|
}
|
|
3319
3320
|
interface CreateReferredFriendRequest {
|
|
3320
|
-
/** Referral code for referred friend */
|
|
3321
|
+
/** Referral code for the referred friend. */
|
|
3321
3322
|
referralCode?: string | null;
|
|
3322
3323
|
}
|
|
3323
3324
|
interface CreateReferredFriendResponse {
|
|
3324
|
-
/**
|
|
3325
|
+
/** Created referred friend. */
|
|
3325
3326
|
referredFriend?: ReferredFriend;
|
|
3326
3327
|
}
|
|
3327
3328
|
interface GetReferredFriendRequest {
|
|
3328
|
-
/**
|
|
3329
|
+
/** ID of the referred friend to retrieve. */
|
|
3329
3330
|
referredFriendId: string;
|
|
3330
3331
|
}
|
|
3331
3332
|
interface GetReferredFriendResponse {
|
|
3332
|
-
/**
|
|
3333
|
+
/** Retrieved referred friend. */
|
|
3333
3334
|
referredFriend?: ReferredFriend;
|
|
3334
3335
|
}
|
|
3335
3336
|
interface GetReferredFriendByContactIdRequest {
|
|
3336
|
-
/** Contact
|
|
3337
|
+
/** Contact ID or "me" to get the current identity's contact. */
|
|
3337
3338
|
contactId: string;
|
|
3338
3339
|
}
|
|
3339
3340
|
interface GetReferredFriendByContactIdResponse {
|
|
3340
|
-
/**
|
|
3341
|
+
/** Retrieved referred friend. */
|
|
3341
3342
|
referredFriend?: ReferredFriend;
|
|
3342
3343
|
}
|
|
3343
3344
|
interface UpdateReferredFriendRequest {
|
|
3344
|
-
/**
|
|
3345
|
+
/** Referred friend to be updated. May be partial. */
|
|
3345
3346
|
referredFriend: ReferredFriend;
|
|
3346
3347
|
}
|
|
3347
3348
|
interface UpdateReferredFriendResponse {
|
|
3348
|
-
/**
|
|
3349
|
+
/** Updated referred friend. */
|
|
3349
3350
|
referredFriend?: ReferredFriend;
|
|
3350
3351
|
}
|
|
3351
3352
|
interface DeleteReferredFriendRequest {
|
|
3352
|
-
/** Id of the ReferredFriend to delete. */
|
|
3353
3353
|
referredFriendId: string;
|
|
3354
|
-
/**
|
|
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
|
+
*/
|
|
3355
3358
|
revision?: string;
|
|
3356
3359
|
}
|
|
3357
3360
|
interface DeleteReferredFriendResponse {
|
|
@@ -3411,9 +3414,9 @@ interface CursorPaging$1 {
|
|
|
3411
3414
|
cursor?: string | null;
|
|
3412
3415
|
}
|
|
3413
3416
|
interface QueryReferredFriendResponse {
|
|
3414
|
-
/**
|
|
3417
|
+
/** Retrieved referred friends. */
|
|
3415
3418
|
referredFriends?: ReferredFriend[];
|
|
3416
|
-
/**
|
|
3419
|
+
/** Cursor paging metadata. */
|
|
3417
3420
|
metadata?: CursorPagingMetadata$1;
|
|
3418
3421
|
}
|
|
3419
3422
|
interface CursorPagingMetadata$1 {
|
|
@@ -3647,45 +3650,49 @@ interface ReferredFriendDeletedEnvelope {
|
|
|
3647
3650
|
metadata: EventMetadata$1;
|
|
3648
3651
|
}
|
|
3649
3652
|
interface CreateReferredFriendOptions {
|
|
3650
|
-
/** Referral code for referred friend */
|
|
3653
|
+
/** Referral code for the referred friend. */
|
|
3651
3654
|
referralCode?: string | null;
|
|
3652
3655
|
}
|
|
3653
3656
|
interface UpdateReferredFriend {
|
|
3654
3657
|
/**
|
|
3655
|
-
*
|
|
3658
|
+
* ID of the referred friend.
|
|
3656
3659
|
* @readonly
|
|
3657
3660
|
*/
|
|
3658
3661
|
_id?: string;
|
|
3659
3662
|
/**
|
|
3660
|
-
*
|
|
3663
|
+
* Contact ID of the referred friend.
|
|
3661
3664
|
* @readonly
|
|
3662
3665
|
*/
|
|
3663
3666
|
contactId?: string;
|
|
3664
3667
|
/**
|
|
3665
|
-
*
|
|
3668
|
+
* ID of the customer who referred this friend.
|
|
3666
3669
|
* @readonly
|
|
3667
3670
|
*/
|
|
3668
3671
|
referringCustomerId?: string;
|
|
3669
|
-
/** Status of the
|
|
3672
|
+
/** Status of the referred friend. */
|
|
3670
3673
|
status?: Status;
|
|
3671
3674
|
/**
|
|
3672
|
-
*
|
|
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.
|
|
3673
3677
|
* @readonly
|
|
3674
3678
|
*/
|
|
3675
3679
|
revision?: string | null;
|
|
3676
3680
|
/**
|
|
3677
|
-
*
|
|
3681
|
+
* Date and time the referred friend was created.
|
|
3678
3682
|
* @readonly
|
|
3679
3683
|
*/
|
|
3680
3684
|
_createdDate?: Date;
|
|
3681
3685
|
/**
|
|
3682
|
-
*
|
|
3686
|
+
* Date and time the referred friend was last updated.
|
|
3683
3687
|
* @readonly
|
|
3684
3688
|
*/
|
|
3685
3689
|
_updatedDate?: Date;
|
|
3686
3690
|
}
|
|
3687
3691
|
interface DeleteReferredFriendOptions {
|
|
3688
|
-
/**
|
|
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
|
+
*/
|
|
3689
3696
|
revision?: string;
|
|
3690
3697
|
}
|
|
3691
3698
|
interface QueryCursorResult$1 {
|
|
@@ -3769,56 +3776,69 @@ interface ReferredFriendsQueryBuilder {
|
|
|
3769
3776
|
declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
|
|
3770
3777
|
interface CreateReferredFriendSignature {
|
|
3771
3778
|
/**
|
|
3772
|
-
*
|
|
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).
|
|
3773
3782
|
*
|
|
3774
|
-
*
|
|
3775
|
-
*
|
|
3776
|
-
*
|
|
3783
|
+
* A referral code must be provided either in the request or via scope.
|
|
3784
|
+
*
|
|
3785
|
+
* The member must be eligible to become a referred friend.
|
|
3777
3786
|
*/
|
|
3778
3787
|
(options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
|
|
3779
3788
|
}
|
|
3780
3789
|
declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
|
|
3781
3790
|
interface GetReferredFriendSignature {
|
|
3782
3791
|
/**
|
|
3783
|
-
*
|
|
3784
|
-
* @param -
|
|
3792
|
+
* Retrieves a referred friend by ID.
|
|
3793
|
+
* @param - ID of the referred friend to retrieve.
|
|
3785
3794
|
*/
|
|
3786
3795
|
(referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
|
|
3787
3796
|
}
|
|
3788
3797
|
declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
|
|
3789
3798
|
interface GetReferredFriendByContactIdSignature {
|
|
3790
3799
|
/**
|
|
3791
|
-
*
|
|
3800
|
+
* Retrieves a referred friend by contact ID.
|
|
3792
3801
|
*
|
|
3793
|
-
* You can
|
|
3794
|
-
* @param - Contact
|
|
3795
|
-
* @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.
|
|
3796
3805
|
*/
|
|
3797
3806
|
(contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3798
3807
|
}
|
|
3799
3808
|
declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
|
|
3800
3809
|
interface UpdateReferredFriendSignature {
|
|
3801
3810
|
/**
|
|
3802
|
-
*
|
|
3811
|
+
* Updates a referred friend. Supports partial updates.
|
|
3803
3812
|
*
|
|
3804
|
-
*
|
|
3805
|
-
* @param -
|
|
3806
|
-
* @returns
|
|
3813
|
+
* You must pass the latest revision for a successful update.
|
|
3814
|
+
* @param - ID of the referred friend.
|
|
3815
|
+
* @returns Updated referred friend.
|
|
3807
3816
|
*/
|
|
3808
3817
|
(_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3809
3818
|
}
|
|
3810
3819
|
declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
|
|
3811
3820
|
interface DeleteReferredFriendSignature {
|
|
3812
3821
|
/**
|
|
3813
|
-
*
|
|
3814
|
-
* @param - Id of the ReferredFriend to delete.
|
|
3822
|
+
* Deletes a referred friend.
|
|
3815
3823
|
*/
|
|
3816
3824
|
(referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
|
|
3817
3825
|
}
|
|
3818
3826
|
declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
|
|
3819
3827
|
interface QueryReferredFriendSignature {
|
|
3820
3828
|
/**
|
|
3821
|
-
*
|
|
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).
|
|
3822
3842
|
*/
|
|
3823
3843
|
(): ReferredFriendsQueryBuilder;
|
|
3824
3844
|
}
|
|
@@ -4320,9 +4340,9 @@ interface GenerateReferringCustomerForContactSignature {
|
|
|
4320
4340
|
/**
|
|
4321
4341
|
* Creates a new referring customer or returns an existing one for the provided contact ID.
|
|
4322
4342
|
*
|
|
4323
|
-
* 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.
|
|
4324
4344
|
*
|
|
4325
|
-
* 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.
|
|
4326
4346
|
* @param - Contact ID or `"me"` to generate the current identity's referring customer.
|
|
4327
4347
|
*/
|
|
4328
4348
|
(contactId: string): Promise<GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields>;
|
|
@@ -4349,7 +4369,7 @@ interface QueryReferringCustomersSignature {
|
|
|
4349
4369
|
/**
|
|
4350
4370
|
* Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
|
|
4351
4371
|
*
|
|
4352
|
-
*
|
|
4372
|
+
* This endpoint supports [WQL (Wix Query Language)](https://dev.wix.com/api/rest/getting-started/api-query-language) with these properties:
|
|
4353
4373
|
* `contact_id`, `referral_code`, `created_date`, `updated_date`.
|
|
4354
4374
|
*
|
|
4355
4375
|
* To learn about working with _Query_ endpoints, see
|
|
@@ -2677,34 +2677,35 @@ declare namespace meta$2 {
|
|
|
2677
2677
|
|
|
2678
2678
|
interface ReferredFriend$1 {
|
|
2679
2679
|
/**
|
|
2680
|
-
*
|
|
2680
|
+
* ID of the referred friend.
|
|
2681
2681
|
* @readonly
|
|
2682
2682
|
*/
|
|
2683
2683
|
id?: string;
|
|
2684
2684
|
/**
|
|
2685
|
-
*
|
|
2685
|
+
* Contact ID of the referred friend.
|
|
2686
2686
|
* @readonly
|
|
2687
2687
|
*/
|
|
2688
2688
|
contactId?: string;
|
|
2689
2689
|
/**
|
|
2690
|
-
*
|
|
2690
|
+
* ID of the customer who referred this friend.
|
|
2691
2691
|
* @readonly
|
|
2692
2692
|
*/
|
|
2693
2693
|
referringCustomerId?: string;
|
|
2694
|
-
/** Status of the
|
|
2694
|
+
/** Status of the referred friend. */
|
|
2695
2695
|
status?: Status$1;
|
|
2696
2696
|
/**
|
|
2697
|
-
*
|
|
2697
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
2698
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
2698
2699
|
* @readonly
|
|
2699
2700
|
*/
|
|
2700
2701
|
revision?: string | null;
|
|
2701
2702
|
/**
|
|
2702
|
-
*
|
|
2703
|
+
* Date and time the referred friend was created.
|
|
2703
2704
|
* @readonly
|
|
2704
2705
|
*/
|
|
2705
2706
|
createdDate?: Date;
|
|
2706
2707
|
/**
|
|
2707
|
-
*
|
|
2708
|
+
* Date and time the referred friend was last updated.
|
|
2708
2709
|
* @readonly
|
|
2709
2710
|
*/
|
|
2710
2711
|
updatedDate?: Date;
|
|
@@ -2712,47 +2713,49 @@ interface ReferredFriend$1 {
|
|
|
2712
2713
|
declare enum Status$1 {
|
|
2713
2714
|
/** Unknown status. */
|
|
2714
2715
|
UNKNOWN = "UNKNOWN",
|
|
2715
|
-
/** Initial status
|
|
2716
|
+
/** Initial status when the referred friend joins the site as a member. */
|
|
2716
2717
|
SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
|
|
2717
|
-
/**
|
|
2718
|
+
/** Status after the referred friend completes specific actions, such as making a purchase. */
|
|
2718
2719
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
2719
2720
|
}
|
|
2720
2721
|
interface CreateReferredFriendRequest$1 {
|
|
2721
|
-
/** Referral code for referred friend */
|
|
2722
|
+
/** Referral code for the referred friend. */
|
|
2722
2723
|
referralCode?: string | null;
|
|
2723
2724
|
}
|
|
2724
2725
|
interface CreateReferredFriendResponse$1 {
|
|
2725
|
-
/**
|
|
2726
|
+
/** Created referred friend. */
|
|
2726
2727
|
referredFriend?: ReferredFriend$1;
|
|
2727
2728
|
}
|
|
2728
2729
|
interface GetReferredFriendRequest$1 {
|
|
2729
|
-
/**
|
|
2730
|
+
/** ID of the referred friend to retrieve. */
|
|
2730
2731
|
referredFriendId: string;
|
|
2731
2732
|
}
|
|
2732
2733
|
interface GetReferredFriendResponse$1 {
|
|
2733
|
-
/**
|
|
2734
|
+
/** Retrieved referred friend. */
|
|
2734
2735
|
referredFriend?: ReferredFriend$1;
|
|
2735
2736
|
}
|
|
2736
2737
|
interface GetReferredFriendByContactIdRequest$1 {
|
|
2737
|
-
/** Contact
|
|
2738
|
+
/** Contact ID or "me" to get the current identity's contact. */
|
|
2738
2739
|
contactId: string;
|
|
2739
2740
|
}
|
|
2740
2741
|
interface GetReferredFriendByContactIdResponse$1 {
|
|
2741
|
-
/**
|
|
2742
|
+
/** Retrieved referred friend. */
|
|
2742
2743
|
referredFriend?: ReferredFriend$1;
|
|
2743
2744
|
}
|
|
2744
2745
|
interface UpdateReferredFriendRequest$1 {
|
|
2745
|
-
/**
|
|
2746
|
+
/** Referred friend to be updated. May be partial. */
|
|
2746
2747
|
referredFriend: ReferredFriend$1;
|
|
2747
2748
|
}
|
|
2748
2749
|
interface UpdateReferredFriendResponse$1 {
|
|
2749
|
-
/**
|
|
2750
|
+
/** Updated referred friend. */
|
|
2750
2751
|
referredFriend?: ReferredFriend$1;
|
|
2751
2752
|
}
|
|
2752
2753
|
interface DeleteReferredFriendRequest$1 {
|
|
2753
|
-
/** Id of the ReferredFriend to delete. */
|
|
2754
2754
|
referredFriendId: string;
|
|
2755
|
-
/**
|
|
2755
|
+
/**
|
|
2756
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
2757
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
2758
|
+
*/
|
|
2756
2759
|
revision?: string;
|
|
2757
2760
|
}
|
|
2758
2761
|
interface DeleteReferredFriendResponse$1 {
|
|
@@ -2812,9 +2815,9 @@ interface CursorPaging$3 {
|
|
|
2812
2815
|
cursor?: string | null;
|
|
2813
2816
|
}
|
|
2814
2817
|
interface QueryReferredFriendResponse$1 {
|
|
2815
|
-
/**
|
|
2818
|
+
/** Retrieved referred friends. */
|
|
2816
2819
|
referredFriends?: ReferredFriend$1[];
|
|
2817
|
-
/**
|
|
2820
|
+
/** Cursor paging metadata. */
|
|
2818
2821
|
metadata?: CursorPagingMetadata$3;
|
|
2819
2822
|
}
|
|
2820
2823
|
interface CursorPagingMetadata$3 {
|
|
@@ -2860,34 +2863,35 @@ interface QueryReferredFriendResponseNonNullableFields$1 {
|
|
|
2860
2863
|
|
|
2861
2864
|
interface ReferredFriend {
|
|
2862
2865
|
/**
|
|
2863
|
-
*
|
|
2866
|
+
* ID of the referred friend.
|
|
2864
2867
|
* @readonly
|
|
2865
2868
|
*/
|
|
2866
2869
|
_id?: string;
|
|
2867
2870
|
/**
|
|
2868
|
-
*
|
|
2871
|
+
* Contact ID of the referred friend.
|
|
2869
2872
|
* @readonly
|
|
2870
2873
|
*/
|
|
2871
2874
|
contactId?: string;
|
|
2872
2875
|
/**
|
|
2873
|
-
*
|
|
2876
|
+
* ID of the customer who referred this friend.
|
|
2874
2877
|
* @readonly
|
|
2875
2878
|
*/
|
|
2876
2879
|
referringCustomerId?: string;
|
|
2877
|
-
/** Status of the
|
|
2880
|
+
/** Status of the referred friend. */
|
|
2878
2881
|
status?: Status;
|
|
2879
2882
|
/**
|
|
2880
|
-
*
|
|
2883
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
2884
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
2881
2885
|
* @readonly
|
|
2882
2886
|
*/
|
|
2883
2887
|
revision?: string | null;
|
|
2884
2888
|
/**
|
|
2885
|
-
*
|
|
2889
|
+
* Date and time the referred friend was created.
|
|
2886
2890
|
* @readonly
|
|
2887
2891
|
*/
|
|
2888
2892
|
_createdDate?: Date;
|
|
2889
2893
|
/**
|
|
2890
|
-
*
|
|
2894
|
+
* Date and time the referred friend was last updated.
|
|
2891
2895
|
* @readonly
|
|
2892
2896
|
*/
|
|
2893
2897
|
_updatedDate?: Date;
|
|
@@ -2895,47 +2899,49 @@ interface ReferredFriend {
|
|
|
2895
2899
|
declare enum Status {
|
|
2896
2900
|
/** Unknown status. */
|
|
2897
2901
|
UNKNOWN = "UNKNOWN",
|
|
2898
|
-
/** Initial status
|
|
2902
|
+
/** Initial status when the referred friend joins the site as a member. */
|
|
2899
2903
|
SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED",
|
|
2900
|
-
/**
|
|
2904
|
+
/** Status after the referred friend completes specific actions, such as making a purchase. */
|
|
2901
2905
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
2902
2906
|
}
|
|
2903
2907
|
interface CreateReferredFriendRequest {
|
|
2904
|
-
/** Referral code for referred friend */
|
|
2908
|
+
/** Referral code for the referred friend. */
|
|
2905
2909
|
referralCode?: string | null;
|
|
2906
2910
|
}
|
|
2907
2911
|
interface CreateReferredFriendResponse {
|
|
2908
|
-
/**
|
|
2912
|
+
/** Created referred friend. */
|
|
2909
2913
|
referredFriend?: ReferredFriend;
|
|
2910
2914
|
}
|
|
2911
2915
|
interface GetReferredFriendRequest {
|
|
2912
|
-
/**
|
|
2916
|
+
/** ID of the referred friend to retrieve. */
|
|
2913
2917
|
referredFriendId: string;
|
|
2914
2918
|
}
|
|
2915
2919
|
interface GetReferredFriendResponse {
|
|
2916
|
-
/**
|
|
2920
|
+
/** Retrieved referred friend. */
|
|
2917
2921
|
referredFriend?: ReferredFriend;
|
|
2918
2922
|
}
|
|
2919
2923
|
interface GetReferredFriendByContactIdRequest {
|
|
2920
|
-
/** Contact
|
|
2924
|
+
/** Contact ID or "me" to get the current identity's contact. */
|
|
2921
2925
|
contactId: string;
|
|
2922
2926
|
}
|
|
2923
2927
|
interface GetReferredFriendByContactIdResponse {
|
|
2924
|
-
/**
|
|
2928
|
+
/** Retrieved referred friend. */
|
|
2925
2929
|
referredFriend?: ReferredFriend;
|
|
2926
2930
|
}
|
|
2927
2931
|
interface UpdateReferredFriendRequest {
|
|
2928
|
-
/**
|
|
2932
|
+
/** Referred friend to be updated. May be partial. */
|
|
2929
2933
|
referredFriend: ReferredFriend;
|
|
2930
2934
|
}
|
|
2931
2935
|
interface UpdateReferredFriendResponse {
|
|
2932
|
-
/**
|
|
2936
|
+
/** Updated referred friend. */
|
|
2933
2937
|
referredFriend?: ReferredFriend;
|
|
2934
2938
|
}
|
|
2935
2939
|
interface DeleteReferredFriendRequest {
|
|
2936
|
-
/** Id of the ReferredFriend to delete. */
|
|
2937
2940
|
referredFriendId: string;
|
|
2938
|
-
/**
|
|
2941
|
+
/**
|
|
2942
|
+
* Revision number, which increments by 1 each time the referred friend is updated.
|
|
2943
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referred friend.
|
|
2944
|
+
*/
|
|
2939
2945
|
revision?: string;
|
|
2940
2946
|
}
|
|
2941
2947
|
interface DeleteReferredFriendResponse {
|
|
@@ -2995,9 +3001,9 @@ interface CursorPaging$2 {
|
|
|
2995
3001
|
cursor?: string | null;
|
|
2996
3002
|
}
|
|
2997
3003
|
interface QueryReferredFriendResponse {
|
|
2998
|
-
/**
|
|
3004
|
+
/** Retrieved referred friends. */
|
|
2999
3005
|
referredFriends?: ReferredFriend[];
|
|
3000
|
-
/**
|
|
3006
|
+
/** Cursor paging metadata. */
|
|
3001
3007
|
metadata?: CursorPagingMetadata$2;
|
|
3002
3008
|
}
|
|
3003
3009
|
interface CursorPagingMetadata$2 {
|