@wix/referral 1.0.11 → 1.0.13
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 +7 -7
- package/type-bundles/context.bundle.d.ts +408 -158
- package/type-bundles/index.bundle.d.ts +408 -158
- package/type-bundles/meta.bundle.d.ts +178 -116
|
@@ -1,17 +1,66 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
|
+
__type: 'event-definition';
|
|
29
|
+
type: Type;
|
|
30
|
+
isDomainEvent?: boolean;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
32
|
+
__payload: Payload;
|
|
33
|
+
};
|
|
34
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
1
45
|
interface ReferralProgram {
|
|
2
46
|
/** Referral program name. */
|
|
3
47
|
name?: string | null;
|
|
4
48
|
/**
|
|
5
|
-
*
|
|
49
|
+
* Status of the referral program.
|
|
6
50
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
51
|
+
* Possible values:
|
|
52
|
+
*
|
|
53
|
+
* - `UNKNOWN`: The status of the referral program is unknown. This value is not used.
|
|
54
|
+
* - `DRAFT`: The referral program is in a draft state and is being modified. It is not yet active.
|
|
55
|
+
* - `ACTIVE`: The referral program is active.
|
|
56
|
+
* - `PAUSED`: The referral program is paused.
|
|
11
57
|
* @readonly
|
|
12
58
|
*/
|
|
13
59
|
status?: ProgramStatus;
|
|
14
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Revision number, which increments by 1 each time the program is updated.
|
|
62
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the program.
|
|
63
|
+
*/
|
|
15
64
|
revision?: string | null;
|
|
16
65
|
/**
|
|
17
66
|
* Date and time the program was created.
|
|
@@ -19,7 +68,7 @@ interface ReferralProgram {
|
|
|
19
68
|
*/
|
|
20
69
|
_createdDate?: Date;
|
|
21
70
|
/**
|
|
22
|
-
* Date and time the program was updated.
|
|
71
|
+
* Date and time the program was last updated.
|
|
23
72
|
* @readonly
|
|
24
73
|
*/
|
|
25
74
|
_updatedDate?: Date;
|
|
@@ -34,7 +83,7 @@ interface ReferralProgram {
|
|
|
34
83
|
*/
|
|
35
84
|
referringCustomerReward?: Reward$2;
|
|
36
85
|
/**
|
|
37
|
-
*
|
|
86
|
+
* List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an order.
|
|
38
87
|
*
|
|
39
88
|
* Possible values:
|
|
40
89
|
*
|
|
@@ -48,8 +97,12 @@ interface ReferralProgram {
|
|
|
48
97
|
successfulReferralActions?: Action[];
|
|
49
98
|
/**
|
|
50
99
|
* Whether the user has the required plan to use the referral program.
|
|
100
|
+
*
|
|
101
|
+
* Deprecated: Use `[GetReferralProgramPremiumFeatures](https://dev.wix.com/docs/velo/api-reference/wix-marketing-v2/referral-program/programs/get-referral-program-premium-features)` instead.
|
|
51
102
|
* @readonly
|
|
52
103
|
* @deprecated Whether the user has the required plan to use the referral program.
|
|
104
|
+
*
|
|
105
|
+
* Deprecated: Use `[GetReferralProgramPremiumFeatures](https://dev.wix.com/docs/velo/api-reference/wix-marketing-v2/referral-program/programs/get-referral-program-premium-features)` instead.
|
|
53
106
|
* @replacedBy GetReferralProgramPremiumFeatures
|
|
54
107
|
* @targetRemovalDate 2024-09-01
|
|
55
108
|
*/
|
|
@@ -200,7 +253,7 @@ declare enum Action {
|
|
|
200
253
|
}
|
|
201
254
|
interface Emails {
|
|
202
255
|
/**
|
|
203
|
-
*
|
|
256
|
+
* Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled.
|
|
204
257
|
*
|
|
205
258
|
* Available apps:
|
|
206
259
|
*
|
|
@@ -231,7 +284,7 @@ declare enum App {
|
|
|
231
284
|
}
|
|
232
285
|
interface PremiumFeatures {
|
|
233
286
|
/**
|
|
234
|
-
* Whether the user has the referral program feature.
|
|
287
|
+
* Whether the user has access to the referral program feature.
|
|
235
288
|
* @readonly
|
|
236
289
|
*/
|
|
237
290
|
referralProgram?: boolean;
|
|
@@ -440,7 +493,7 @@ interface DomainEventBodyOneOf$4 {
|
|
|
440
493
|
interface EntityCreatedEvent$4 {
|
|
441
494
|
entity?: string;
|
|
442
495
|
}
|
|
443
|
-
interface RestoreInfo$
|
|
496
|
+
interface RestoreInfo$3 {
|
|
444
497
|
deletedDate?: Date;
|
|
445
498
|
}
|
|
446
499
|
interface EntityUpdatedEvent$4 {
|
|
@@ -1483,58 +1536,72 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
|
|
|
1483
1536
|
topic?: string;
|
|
1484
1537
|
}
|
|
1485
1538
|
|
|
1486
|
-
|
|
1487
|
-
interface
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1539
|
+
declare function getReferralProgram$1(httpClient: HttpClient): GetReferralProgramSignature;
|
|
1540
|
+
interface GetReferralProgramSignature {
|
|
1541
|
+
/**
|
|
1542
|
+
* Retrieves the referral program.
|
|
1543
|
+
*/
|
|
1544
|
+
(): Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
|
|
1491
1545
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
declare
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1546
|
+
declare function queryReferralPrograms$1(httpClient: HttpClient): QueryReferralProgramsSignature;
|
|
1547
|
+
interface QueryReferralProgramsSignature {
|
|
1548
|
+
/**
|
|
1549
|
+
* Retrieves a list of referral programs, given the provided paging, filtering, and sorting.
|
|
1550
|
+
*
|
|
1551
|
+
* To learn about working with _Query_ endpoints, see
|
|
1552
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
1553
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
1554
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
1555
|
+
* @deprecated
|
|
1556
|
+
*/
|
|
1557
|
+
(): ReferralProgramsQueryBuilder;
|
|
1558
|
+
}
|
|
1559
|
+
declare function updateReferralProgram$1(httpClient: HttpClient): UpdateReferralProgramSignature;
|
|
1560
|
+
interface UpdateReferralProgramSignature {
|
|
1561
|
+
/**
|
|
1562
|
+
* Updates a referral program. Supports partial updates.
|
|
1563
|
+
*
|
|
1564
|
+
* Revision number, which increments by 1 each time the referral program is updated.
|
|
1565
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referral program.
|
|
1566
|
+
* @param - Referral program to update. Include the latest `revision` for a successful update.
|
|
1567
|
+
*/
|
|
1568
|
+
(referralProgram: ReferralProgram): Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
|
|
1569
|
+
}
|
|
1570
|
+
declare function activateReferralProgram$1(httpClient: HttpClient): ActivateReferralProgramSignature;
|
|
1571
|
+
interface ActivateReferralProgramSignature {
|
|
1572
|
+
/**
|
|
1573
|
+
* Activates the referral program, changing its status to `ACTIVE`.
|
|
1574
|
+
*/
|
|
1575
|
+
(): Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
|
|
1576
|
+
}
|
|
1577
|
+
declare function pauseReferralProgram$1(httpClient: HttpClient): PauseReferralProgramSignature;
|
|
1578
|
+
interface PauseReferralProgramSignature {
|
|
1579
|
+
/**
|
|
1580
|
+
* Pauses the referral program, changing its status to `PAUSED`.
|
|
1581
|
+
*/
|
|
1582
|
+
(): Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
|
|
1583
|
+
}
|
|
1584
|
+
declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GetAiSocialMediaPostsSuggestionsSignature;
|
|
1585
|
+
interface GetAiSocialMediaPostsSuggestionsSignature {
|
|
1586
|
+
/**
|
|
1587
|
+
* Retrieves pre-generated social media post suggestions for promoting the referral program.
|
|
1588
|
+
*/
|
|
1589
|
+
(options?: GetAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1590
|
+
}
|
|
1591
|
+
declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GenerateAiSocialMediaPostsSuggestionsSignature;
|
|
1592
|
+
interface GenerateAiSocialMediaPostsSuggestionsSignature {
|
|
1593
|
+
/**
|
|
1594
|
+
* Creates new AI-generated social media post suggestions for promoting the referral program.
|
|
1595
|
+
*/
|
|
1596
|
+
(options?: GenerateAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1597
|
+
}
|
|
1598
|
+
declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient): GetReferralProgramPremiumFeaturesSignature;
|
|
1599
|
+
interface GetReferralProgramPremiumFeaturesSignature {
|
|
1600
|
+
/**
|
|
1601
|
+
* Retrieves information about enabled premium features for the referral program.
|
|
1602
|
+
*/
|
|
1603
|
+
(): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1528
1604
|
}
|
|
1529
|
-
|
|
1530
|
-
declare function getReferralProgram$1(httpClient: HttpClient): () => Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
|
|
1531
|
-
declare function queryReferralPrograms$1(httpClient: HttpClient): () => ReferralProgramsQueryBuilder;
|
|
1532
|
-
declare function updateReferralProgram$1(httpClient: HttpClient): (referralProgram: ReferralProgram) => Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
|
|
1533
|
-
declare function activateReferralProgram$1(httpClient: HttpClient): () => Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
|
|
1534
|
-
declare function pauseReferralProgram$1(httpClient: HttpClient): () => Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
|
|
1535
|
-
declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): (options?: GetAiSocialMediaPostsSuggestionsOptions) => Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1536
|
-
declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): (options?: GenerateAiSocialMediaPostsSuggestionsOptions) => Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1537
|
-
declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient): () => Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1538
1605
|
declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
|
|
1539
1606
|
|
|
1540
1607
|
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -1559,6 +1626,7 @@ type _publicGetReferralProgramPremiumFeaturesType = typeof getReferralProgramPre
|
|
|
1559
1626
|
declare const getReferralProgramPremiumFeatures: ReturnType<typeof createRESTModule$4<_publicGetReferralProgramPremiumFeaturesType>>;
|
|
1560
1627
|
|
|
1561
1628
|
type _publicOnProgramUpdatedType = typeof onProgramUpdated$1;
|
|
1629
|
+
/** */
|
|
1562
1630
|
declare const onProgramUpdated: ReturnType<typeof createEventModule$3<_publicOnProgramUpdatedType>>;
|
|
1563
1631
|
|
|
1564
1632
|
type context$4_AISocialMediaPostSuggestion = AISocialMediaPostSuggestion;
|
|
@@ -1693,10 +1761,9 @@ declare const context$4_pauseReferralProgram: typeof pauseReferralProgram;
|
|
|
1693
1761
|
declare const context$4_queryReferralPrograms: typeof queryReferralPrograms;
|
|
1694
1762
|
declare const context$4_updateReferralProgram: typeof updateReferralProgram;
|
|
1695
1763
|
declare namespace context$4 {
|
|
1696
|
-
export { type context$4_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, context$4_Action as Action, type ActionEvent$4 as ActionEvent, type context$4_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type context$4_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type context$4_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, context$4_App as App, type context$4_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type context$4_BillingReference as BillingReference, type context$4_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type context$4_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type context$4_CancellationDetails as CancellationDetails, context$4_ContractSwitchReason as ContractSwitchReason, context$4_ContractSwitchType as ContractSwitchType, type context$4_ContractSwitched as ContractSwitched, type Coupon$2 as Coupon, type CouponDiscountTypeOptionsOneOf$2 as CouponDiscountTypeOptionsOneOf, type CouponScope$2 as CouponScope, type CouponScopeOrMinSubtotalOneOf$2 as CouponScopeOrMinSubtotalOneOf, type CursorPaging$4 as CursorPaging, type CursorPagingMetadata$4 as CursorPagingMetadata, type CursorQuery$4 as CursorQuery, type CursorQueryPagingMethodOneOf$4 as CursorQueryPagingMethodOneOf, type Cursors$4 as Cursors, type context$4_Cycle as Cycle, type context$4_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type context$4_DeleteContext as DeleteContext, context$4_DeleteStatus as DeleteStatus, DiscountType$2 as DiscountType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type context$4_Emails as Emails, type Empty$3 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type FixedAmountDiscount$2 as FixedAmountDiscount, type context$4_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type context$4_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type context$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type context$4_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type context$4_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type context$4_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type context$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type context$4_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type context$4_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type context$4_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type context$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type context$4_GetReferralProgramRequest as GetReferralProgramRequest, type context$4_GetReferralProgramResponse as GetReferralProgramResponse, type context$4_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$2 as Group, type context$4_HtmlSitePublished as HtmlSitePublished, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, context$4_Initiator as Initiator, type context$4_Interval as Interval, context$4_IntervalUnit as IntervalUnit, type LoyaltyPoints$2 as LoyaltyPoints, type MessageEnvelope$4 as MessageEnvelope, type context$4_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context$4_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, context$4_Namespace as Namespace, type context$4_NamespaceChanged as NamespaceChanged, type context$4_OneTime as OneTime, type context$4_Page as Page, type context$4_PauseReferralProgramRequest as PauseReferralProgramRequest, type context$4_PauseReferralProgramResponse as PauseReferralProgramResponse, type context$4_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$2 as PercentageDiscount, type context$4_PremiumFeatures as PremiumFeatures, context$4_PriceIncreaseTrigger as PriceIncreaseTrigger, context$4_ProductAdjustment as ProductAdjustment, type context$4_ProductPriceIncreaseData as ProductPriceIncreaseData, type context$4_ProgramInSite as ProgramInSite, context$4_ProgramStatus as ProgramStatus, type context$4_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, context$4_ProviderName as ProviderName, type context$4_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type context$4_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type context$4_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type context$4_ReactivationData as ReactivationData, context$4_ReactivationReasonEnum as ReactivationReasonEnum, type context$4_RecurringChargeSucceeded as RecurringChargeSucceeded, type context$4_ReferralProgram as ReferralProgram, type context$4_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type context$4_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type RestoreInfo$
|
|
1764
|
+
export { type context$4_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, context$4_Action as Action, type ActionEvent$4 as ActionEvent, type context$4_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type context$4_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type context$4_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, context$4_App as App, type context$4_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type context$4_BillingReference as BillingReference, type context$4_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type context$4_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type context$4_CancellationDetails as CancellationDetails, context$4_ContractSwitchReason as ContractSwitchReason, context$4_ContractSwitchType as ContractSwitchType, type context$4_ContractSwitched as ContractSwitched, type Coupon$2 as Coupon, type CouponDiscountTypeOptionsOneOf$2 as CouponDiscountTypeOptionsOneOf, type CouponScope$2 as CouponScope, type CouponScopeOrMinSubtotalOneOf$2 as CouponScopeOrMinSubtotalOneOf, type CursorPaging$4 as CursorPaging, type CursorPagingMetadata$4 as CursorPagingMetadata, type CursorQuery$4 as CursorQuery, type CursorQueryPagingMethodOneOf$4 as CursorQueryPagingMethodOneOf, type Cursors$4 as Cursors, type context$4_Cycle as Cycle, type context$4_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type context$4_DeleteContext as DeleteContext, context$4_DeleteStatus as DeleteStatus, DiscountType$2 as DiscountType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type context$4_Emails as Emails, type Empty$3 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type FixedAmountDiscount$2 as FixedAmountDiscount, type context$4_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type context$4_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type context$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type context$4_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type context$4_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type context$4_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type context$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type context$4_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type context$4_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type context$4_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type context$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type context$4_GetReferralProgramRequest as GetReferralProgramRequest, type context$4_GetReferralProgramResponse as GetReferralProgramResponse, type context$4_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$2 as Group, type context$4_HtmlSitePublished as HtmlSitePublished, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, context$4_Initiator as Initiator, type context$4_Interval as Interval, context$4_IntervalUnit as IntervalUnit, type LoyaltyPoints$2 as LoyaltyPoints, type MessageEnvelope$4 as MessageEnvelope, type context$4_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context$4_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, context$4_Namespace as Namespace, type context$4_NamespaceChanged as NamespaceChanged, type context$4_OneTime as OneTime, type context$4_Page as Page, type context$4_PauseReferralProgramRequest as PauseReferralProgramRequest, type context$4_PauseReferralProgramResponse as PauseReferralProgramResponse, type context$4_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$2 as PercentageDiscount, type context$4_PremiumFeatures as PremiumFeatures, context$4_PriceIncreaseTrigger as PriceIncreaseTrigger, context$4_ProductAdjustment as ProductAdjustment, type context$4_ProductPriceIncreaseData as ProductPriceIncreaseData, type context$4_ProgramInSite as ProgramInSite, context$4_ProgramStatus as ProgramStatus, type context$4_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, context$4_ProviderName as ProviderName, type context$4_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type context$4_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type context$4_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type context$4_ReactivationData as ReactivationData, context$4_ReactivationReasonEnum as ReactivationReasonEnum, type context$4_RecurringChargeSucceeded as RecurringChargeSucceeded, type context$4_ReferralProgram as ReferralProgram, type context$4_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type context$4_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type RestoreInfo$3 as RestoreInfo, type Reward$2 as Reward, type RewardOptionsOneOf$1 as RewardOptionsOneOf, type context$4_ServiceProvisioned as ServiceProvisioned, type context$4_ServiceRemoved as ServiceRemoved, type context$4_SiteCreated as SiteCreated, context$4_SiteCreatedContext as SiteCreatedContext, type context$4_SiteDeleted as SiteDeleted, type context$4_SiteHardDeleted as SiteHardDeleted, type context$4_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context$4_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type context$4_SitePublished as SitePublished, type context$4_SiteRenamed as SiteRenamed, type context$4_SiteTransferred as SiteTransferred, type context$4_SiteUndeleted as SiteUndeleted, type context$4_SiteUnpublished as SiteUnpublished, SortOrder$4 as SortOrder, type Sorting$4 as Sorting, context$4_State as State, type context$4_StudioAssigned as StudioAssigned, type context$4_StudioUnassigned as StudioUnassigned, type context$4_Subscription as Subscription, type context$4_SubscriptionAssigned as SubscriptionAssigned, type context$4_SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOff, type context$4_SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOn, type context$4_SubscriptionCancelled as SubscriptionCancelled, type context$4_SubscriptionCreated as SubscriptionCreated, type context$4_SubscriptionEvent as SubscriptionEvent, type context$4_SubscriptionEventEventOneOf as SubscriptionEventEventOneOf, type context$4_SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriod, type context$4_SubscriptionPendingChange as SubscriptionPendingChange, context$4_SubscriptionStatus as SubscriptionStatus, type context$4_SubscriptionTransferred as SubscriptionTransferred, type context$4_SubscriptionUnassigned as SubscriptionUnassigned, Type$1 as Type, context$4_UnassignReason as UnassignReason, type context$4_UpdateReferralProgramRequest as UpdateReferralProgramRequest, type context$4_UpdateReferralProgramResponse as UpdateReferralProgramResponse, type context$4_UpdateReferralProgramResponseNonNullableFields as UpdateReferralProgramResponseNonNullableFields, WebhookIdentityType$4 as WebhookIdentityType, type context$4__publicActivateReferralProgramType as _publicActivateReferralProgramType, type context$4__publicGenerateAiSocialMediaPostsSuggestionsType as _publicGenerateAiSocialMediaPostsSuggestionsType, type context$4__publicGetAiSocialMediaPostsSuggestionsType as _publicGetAiSocialMediaPostsSuggestionsType, type context$4__publicGetReferralProgramPremiumFeaturesType as _publicGetReferralProgramPremiumFeaturesType, type context$4__publicGetReferralProgramType as _publicGetReferralProgramType, type context$4__publicOnProgramUpdatedType as _publicOnProgramUpdatedType, type context$4__publicPauseReferralProgramType as _publicPauseReferralProgramType, type context$4__publicQueryReferralProgramsType as _publicQueryReferralProgramsType, type context$4__publicUpdateReferralProgramType as _publicUpdateReferralProgramType, context$4_activateReferralProgram as activateReferralProgram, context$4_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, context$4_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, context$4_getReferralProgram as getReferralProgram, context$4_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, context$4_onProgramUpdated as onProgramUpdated, context$4_pauseReferralProgram as pauseReferralProgram, onProgramUpdated$1 as publicOnProgramUpdated, context$4_queryReferralPrograms as queryReferralPrograms, context$4_updateReferralProgram as updateReferralProgram };
|
|
1697
1765
|
}
|
|
1698
1766
|
|
|
1699
|
-
/** ReferralEvent. */
|
|
1700
1767
|
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
1701
1768
|
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1702
1769
|
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
@@ -2019,34 +2086,41 @@ interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
|
2019
2086
|
}
|
|
2020
2087
|
interface V1Coupon$1 {
|
|
2021
2088
|
/**
|
|
2022
|
-
* Coupon ID.
|
|
2089
|
+
* Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
|
|
2023
2090
|
* @readonly
|
|
2024
2091
|
*/
|
|
2025
2092
|
_id?: string;
|
|
2026
2093
|
/**
|
|
2027
|
-
*
|
|
2094
|
+
* The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
|
|
2028
2095
|
* @readonly
|
|
2029
2096
|
*/
|
|
2030
2097
|
code?: string;
|
|
2031
2098
|
/**
|
|
2032
|
-
*
|
|
2099
|
+
* Current status of the coupon.
|
|
2100
|
+
*
|
|
2101
|
+
* Possible values:
|
|
2102
|
+
*
|
|
2103
|
+
* - `UNKNOWN`: Unknown coupon status.
|
|
2104
|
+
* - `ACTIVE`: Coupon is active and can be applied.
|
|
2105
|
+
* - `APPLIED`: Coupon was already applied and can't be used anymore.
|
|
2106
|
+
* - `DELETED`: Coupon was deleted.
|
|
2033
2107
|
* @readonly
|
|
2034
2108
|
*/
|
|
2035
2109
|
status?: Status$2;
|
|
2036
2110
|
/**
|
|
2037
|
-
*
|
|
2111
|
+
* Detailed specifications of the coupon.
|
|
2038
2112
|
* @readonly
|
|
2039
2113
|
*/
|
|
2040
2114
|
couponSpecification?: Coupon$1;
|
|
2041
2115
|
}
|
|
2042
2116
|
declare enum Status$2 {
|
|
2043
|
-
/**
|
|
2117
|
+
/** The coupon status is unknown or not specified. */
|
|
2044
2118
|
UNKNOWN = "UNKNOWN",
|
|
2045
|
-
/**
|
|
2119
|
+
/** The coupon is active and can be applied to purchases. */
|
|
2046
2120
|
ACTIVE = "ACTIVE",
|
|
2047
|
-
/**
|
|
2121
|
+
/** The coupon has been applied and can't be used again. */
|
|
2048
2122
|
APPLIED = "APPLIED",
|
|
2049
|
-
/**
|
|
2123
|
+
/** The coupon has been deleted and is no longer valid. */
|
|
2050
2124
|
DELETED = "DELETED"
|
|
2051
2125
|
}
|
|
2052
2126
|
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
@@ -2139,7 +2213,7 @@ interface LoyaltyPoints$1 {
|
|
|
2139
2213
|
*/
|
|
2140
2214
|
transactionId?: string;
|
|
2141
2215
|
/**
|
|
2142
|
-
*
|
|
2216
|
+
* The number of loyalty points awarded.
|
|
2143
2217
|
* @readonly
|
|
2144
2218
|
*/
|
|
2145
2219
|
amount?: number;
|
|
@@ -2196,7 +2270,7 @@ interface DomainEventBodyOneOf$3 {
|
|
|
2196
2270
|
interface EntityCreatedEvent$3 {
|
|
2197
2271
|
entity?: string;
|
|
2198
2272
|
}
|
|
2199
|
-
interface RestoreInfo {
|
|
2273
|
+
interface RestoreInfo$2 {
|
|
2200
2274
|
deletedDate?: Date;
|
|
2201
2275
|
}
|
|
2202
2276
|
interface EntityUpdatedEvent$3 {
|
|
@@ -2217,42 +2291,42 @@ interface ActionEvent$3 {
|
|
|
2217
2291
|
interface Empty$2 {
|
|
2218
2292
|
}
|
|
2219
2293
|
interface SuccessfulReferralEvent$2 {
|
|
2220
|
-
/**
|
|
2294
|
+
/** Details of the referred friend who completed their referral. */
|
|
2221
2295
|
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2222
2296
|
}
|
|
2223
2297
|
interface ReferredFriendDetails$2 {
|
|
2224
2298
|
/**
|
|
2225
|
-
*
|
|
2299
|
+
* ID of the referred friend.
|
|
2226
2300
|
* @readonly
|
|
2227
2301
|
*/
|
|
2228
2302
|
referredFriendId?: string;
|
|
2229
2303
|
/**
|
|
2230
|
-
*
|
|
2304
|
+
* Contact ID of the referred friend.
|
|
2231
2305
|
* @readonly
|
|
2232
2306
|
*/
|
|
2233
2307
|
contactId?: string;
|
|
2234
2308
|
/**
|
|
2235
|
-
*
|
|
2309
|
+
* ID of the customer who referred this friend.
|
|
2236
2310
|
* @readonly
|
|
2237
2311
|
*/
|
|
2238
2312
|
referringCustomerId?: string;
|
|
2239
2313
|
}
|
|
2240
2314
|
interface ReferredFriendActionEvent {
|
|
2241
|
-
/**
|
|
2315
|
+
/** Details of the referred friend. */
|
|
2242
2316
|
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2243
|
-
/**
|
|
2317
|
+
/** Details of the trigger. */
|
|
2244
2318
|
trigger?: Trigger;
|
|
2245
|
-
/** Amount. */
|
|
2319
|
+
/** Amount of the referral reward. */
|
|
2246
2320
|
amount?: string | null;
|
|
2247
|
-
/** Currency. */
|
|
2321
|
+
/** Currency of the referral reward. */
|
|
2248
2322
|
currency?: string | null;
|
|
2249
|
-
/**
|
|
2323
|
+
/** ID of the order associated with the referral. */
|
|
2250
2324
|
orderId?: string | null;
|
|
2251
2325
|
}
|
|
2252
2326
|
interface Trigger {
|
|
2253
|
-
/**
|
|
2327
|
+
/** ID of the app associated with the referral activity. */
|
|
2254
2328
|
appId?: string;
|
|
2255
|
-
/**
|
|
2329
|
+
/** Type of referral activity. */
|
|
2256
2330
|
activityType?: string;
|
|
2257
2331
|
}
|
|
2258
2332
|
interface MessageEnvelope$3 {
|
|
@@ -2523,11 +2597,43 @@ interface QueryReferredFriendActionsOptions {
|
|
|
2523
2597
|
contactIds?: string[];
|
|
2524
2598
|
}
|
|
2525
2599
|
|
|
2526
|
-
declare function getReferralEvent$1(httpClient: HttpClient):
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2600
|
+
declare function getReferralEvent$1(httpClient: HttpClient): GetReferralEventSignature;
|
|
2601
|
+
interface GetReferralEventSignature {
|
|
2602
|
+
/**
|
|
2603
|
+
* Get a ReferralEvent by id.
|
|
2604
|
+
* @param - Id of the ReferralEvent to retrieve
|
|
2605
|
+
* @returns The retrieved ReferralEvent
|
|
2606
|
+
*/
|
|
2607
|
+
(referralEventId: string): Promise<ReferralEvent & ReferralEventNonNullableFields>;
|
|
2608
|
+
}
|
|
2609
|
+
declare function queryReferralEvent$1(httpClient: HttpClient): QueryReferralEventSignature;
|
|
2610
|
+
interface QueryReferralEventSignature {
|
|
2611
|
+
/**
|
|
2612
|
+
* Query ReferralEvents
|
|
2613
|
+
*/
|
|
2614
|
+
(): ReferralEventsQueryBuilder;
|
|
2615
|
+
}
|
|
2616
|
+
declare function getReferralStatistics$1(httpClient: HttpClient): GetReferralStatisticsSignature;
|
|
2617
|
+
interface GetReferralStatisticsSignature {
|
|
2618
|
+
/**
|
|
2619
|
+
* Get referral statistics.
|
|
2620
|
+
*/
|
|
2621
|
+
(): Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
2622
|
+
}
|
|
2623
|
+
declare function queryReferringCustomerTotals$1(httpClient: HttpClient): QueryReferringCustomerTotalsSignature;
|
|
2624
|
+
interface QueryReferringCustomerTotalsSignature {
|
|
2625
|
+
/**
|
|
2626
|
+
* Query referring customer totals.
|
|
2627
|
+
*/
|
|
2628
|
+
(options?: QueryReferringCustomerTotalsOptions | undefined): Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
2629
|
+
}
|
|
2630
|
+
declare function queryReferredFriendActions$1(httpClient: HttpClient): QueryReferredFriendActionsSignature;
|
|
2631
|
+
interface QueryReferredFriendActionsSignature {
|
|
2632
|
+
/**
|
|
2633
|
+
* Query referred friend actions.
|
|
2634
|
+
*/
|
|
2635
|
+
(options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
2636
|
+
}
|
|
2531
2637
|
declare const onReferralEventCreated$1: EventDefinition<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
2532
2638
|
|
|
2533
2639
|
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -2546,6 +2652,7 @@ type _publicQueryReferredFriendActionsType = typeof queryReferredFriendActions$1
|
|
|
2546
2652
|
declare const queryReferredFriendActions: ReturnType<typeof createRESTModule$3<_publicQueryReferredFriendActionsType>>;
|
|
2547
2653
|
|
|
2548
2654
|
type _publicOnReferralEventCreatedType = typeof onReferralEventCreated$1;
|
|
2655
|
+
/** */
|
|
2549
2656
|
declare const onReferralEventCreated: ReturnType<typeof createEventModule$2<_publicOnReferralEventCreatedType>>;
|
|
2550
2657
|
|
|
2551
2658
|
type context$3_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
@@ -2578,7 +2685,6 @@ type context$3_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
|
2578
2685
|
type context$3_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
2579
2686
|
type context$3_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
2580
2687
|
type context$3_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
2581
|
-
type context$3_RestoreInfo = RestoreInfo;
|
|
2582
2688
|
type context$3_RewardEvent = RewardEvent;
|
|
2583
2689
|
type context$3_RewardEventReceiverOneOf = RewardEventReceiverOneOf;
|
|
2584
2690
|
type context$3_Trigger = Trigger;
|
|
@@ -2598,7 +2704,7 @@ declare const context$3_queryReferralEvent: typeof queryReferralEvent;
|
|
|
2598
2704
|
declare const context$3_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
2599
2705
|
declare const context$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
2600
2706
|
declare namespace context$3 {
|
|
2601
|
-
export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type Coupon$1 as Coupon, type CouponDiscountTypeOptionsOneOf$1 as CouponDiscountTypeOptionsOneOf, type CouponScope$1 as CouponScope, type CouponScopeOrMinSubtotalOneOf$1 as CouponScopeOrMinSubtotalOneOf, type context$3_CreateReferralEventRequest as CreateReferralEventRequest, type context$3_CreateReferralEventResponse as CreateReferralEventResponse, type CursorPaging$3 as CursorPaging, type CursorPagingMetadata$3 as CursorPagingMetadata, type CursorQuery$3 as CursorQuery, type CursorQueryPagingMethodOneOf$3 as CursorQueryPagingMethodOneOf, type Cursors$3 as Cursors, DiscountType$1 as DiscountType, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type FixedAmountDiscount$1 as FixedAmountDiscount, type context$3_GetReferralEventRequest as GetReferralEventRequest, type context$3_GetReferralEventResponse as GetReferralEventResponse, type context$3_GetReferralEventResponseNonNullableFields as GetReferralEventResponseNonNullableFields, type context$3_GetReferralStatisticsRequest as GetReferralStatisticsRequest, type context$3_GetReferralStatisticsResponse as GetReferralStatisticsResponse, type context$3_GetReferralStatisticsResponseNonNullableFields as GetReferralStatisticsResponseNonNullableFields, type Group$1 as Group, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type LoyaltyPoints$1 as LoyaltyPoints, type MessageEnvelope$3 as MessageEnvelope, type PercentageDiscount$1 as PercentageDiscount, type context$3_QueryReferralEventRequest as QueryReferralEventRequest, type context$3_QueryReferralEventResponse as QueryReferralEventResponse, type context$3_QueryReferralEventResponseNonNullableFields as QueryReferralEventResponseNonNullableFields, type context$3_QueryReferredFriendActionsOptions as QueryReferredFriendActionsOptions, type context$3_QueryReferredFriendActionsRequest as QueryReferredFriendActionsRequest, type context$3_QueryReferredFriendActionsResponse as QueryReferredFriendActionsResponse, type context$3_QueryReferredFriendActionsResponseNonNullableFields as QueryReferredFriendActionsResponseNonNullableFields, type context$3_QueryReferringCustomerTotalsOptions as QueryReferringCustomerTotalsOptions, type context$3_QueryReferringCustomerTotalsRequest as QueryReferringCustomerTotalsRequest, type context$3_QueryReferringCustomerTotalsResponse as QueryReferringCustomerTotalsResponse, type context$3_QueryReferringCustomerTotalsResponseNonNullableFields as QueryReferringCustomerTotalsResponseNonNullableFields, type context$3_ReferralEvent as ReferralEvent, type context$3_ReferralEventCreatedEnvelope as ReferralEventCreatedEnvelope, type context$3_ReferralEventEventTypeOneOf as ReferralEventEventTypeOneOf, type context$3_ReferralEventNonNullableFields as ReferralEventNonNullableFields, type context$3_ReferralEventsQueryBuilder as ReferralEventsQueryBuilder, type context$3_ReferralEventsQueryResult as ReferralEventsQueryResult, type context$3_ReferredFriendAction as ReferredFriendAction, type context$3_ReferredFriendActionEvent as ReferredFriendActionEvent, type context$3_ReferredFriendActionRewardTypeOptionsOneOf as ReferredFriendActionRewardTypeOptionsOneOf, type ReferredFriendDetails$2 as ReferredFriendDetails, type context$3_ReferredFriendSignupEvent as ReferredFriendSignupEvent, type context$3_ReferringCustomerTotal as ReferringCustomerTotal, type
|
|
2707
|
+
export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type Coupon$1 as Coupon, type CouponDiscountTypeOptionsOneOf$1 as CouponDiscountTypeOptionsOneOf, type CouponScope$1 as CouponScope, type CouponScopeOrMinSubtotalOneOf$1 as CouponScopeOrMinSubtotalOneOf, type context$3_CreateReferralEventRequest as CreateReferralEventRequest, type context$3_CreateReferralEventResponse as CreateReferralEventResponse, type CursorPaging$3 as CursorPaging, type CursorPagingMetadata$3 as CursorPagingMetadata, type CursorQuery$3 as CursorQuery, type CursorQueryPagingMethodOneOf$3 as CursorQueryPagingMethodOneOf, type Cursors$3 as Cursors, DiscountType$1 as DiscountType, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type FixedAmountDiscount$1 as FixedAmountDiscount, type context$3_GetReferralEventRequest as GetReferralEventRequest, type context$3_GetReferralEventResponse as GetReferralEventResponse, type context$3_GetReferralEventResponseNonNullableFields as GetReferralEventResponseNonNullableFields, type context$3_GetReferralStatisticsRequest as GetReferralStatisticsRequest, type context$3_GetReferralStatisticsResponse as GetReferralStatisticsResponse, type context$3_GetReferralStatisticsResponseNonNullableFields as GetReferralStatisticsResponseNonNullableFields, type Group$1 as Group, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type LoyaltyPoints$1 as LoyaltyPoints, type MessageEnvelope$3 as MessageEnvelope, type PercentageDiscount$1 as PercentageDiscount, type context$3_QueryReferralEventRequest as QueryReferralEventRequest, type context$3_QueryReferralEventResponse as QueryReferralEventResponse, type context$3_QueryReferralEventResponseNonNullableFields as QueryReferralEventResponseNonNullableFields, type context$3_QueryReferredFriendActionsOptions as QueryReferredFriendActionsOptions, type context$3_QueryReferredFriendActionsRequest as QueryReferredFriendActionsRequest, type context$3_QueryReferredFriendActionsResponse as QueryReferredFriendActionsResponse, type context$3_QueryReferredFriendActionsResponseNonNullableFields as QueryReferredFriendActionsResponseNonNullableFields, type context$3_QueryReferringCustomerTotalsOptions as QueryReferringCustomerTotalsOptions, type context$3_QueryReferringCustomerTotalsRequest as QueryReferringCustomerTotalsRequest, type context$3_QueryReferringCustomerTotalsResponse as QueryReferringCustomerTotalsResponse, type context$3_QueryReferringCustomerTotalsResponseNonNullableFields as QueryReferringCustomerTotalsResponseNonNullableFields, type context$3_ReferralEvent as ReferralEvent, type context$3_ReferralEventCreatedEnvelope as ReferralEventCreatedEnvelope, type context$3_ReferralEventEventTypeOneOf as ReferralEventEventTypeOneOf, type context$3_ReferralEventNonNullableFields as ReferralEventNonNullableFields, type context$3_ReferralEventsQueryBuilder as ReferralEventsQueryBuilder, type context$3_ReferralEventsQueryResult as ReferralEventsQueryResult, type context$3_ReferredFriendAction as ReferredFriendAction, type context$3_ReferredFriendActionEvent as ReferredFriendActionEvent, type context$3_ReferredFriendActionRewardTypeOptionsOneOf as ReferredFriendActionRewardTypeOptionsOneOf, type ReferredFriendDetails$2 as ReferredFriendDetails, type context$3_ReferredFriendSignupEvent as ReferredFriendSignupEvent, type context$3_ReferringCustomerTotal as ReferringCustomerTotal, type RestoreInfo$2 as RestoreInfo, Reward$1 as Reward, type context$3_RewardEvent as RewardEvent, type context$3_RewardEventReceiverOneOf as RewardEventReceiverOneOf, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, Status$2 as Status, type SuccessfulReferralEvent$2 as SuccessfulReferralEvent, type context$3_Trigger as Trigger, type context$3_V1ActionEvent as V1ActionEvent, type V1Coupon$1 as V1Coupon, type context$3_V1SuccessfulReferralEvent as V1SuccessfulReferralEvent, type context$3_V1Trigger as V1Trigger, WebhookIdentityType$3 as WebhookIdentityType, type context$3__publicGetReferralEventType as _publicGetReferralEventType, type context$3__publicGetReferralStatisticsType as _publicGetReferralStatisticsType, type context$3__publicOnReferralEventCreatedType as _publicOnReferralEventCreatedType, type context$3__publicQueryReferralEventType as _publicQueryReferralEventType, type context$3__publicQueryReferredFriendActionsType as _publicQueryReferredFriendActionsType, type context$3__publicQueryReferringCustomerTotalsType as _publicQueryReferringCustomerTotalsType, context$3_getReferralEvent as getReferralEvent, context$3_getReferralStatistics as getReferralStatistics, context$3_onReferralEventCreated as onReferralEventCreated, onReferralEventCreated$1 as publicOnReferralEventCreated, context$3_queryReferralEvent as queryReferralEvent, context$3_queryReferredFriendActions as queryReferredFriendActions, context$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
|
|
2602
2708
|
}
|
|
2603
2709
|
|
|
2604
2710
|
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
@@ -2950,7 +3056,7 @@ interface DomainEventBodyOneOf$2 {
|
|
|
2950
3056
|
interface EntityCreatedEvent$2 {
|
|
2951
3057
|
entity?: string;
|
|
2952
3058
|
}
|
|
2953
|
-
interface UndeleteInfo
|
|
3059
|
+
interface UndeleteInfo {
|
|
2954
3060
|
deletedDate?: Date;
|
|
2955
3061
|
}
|
|
2956
3062
|
interface EntityUpdatedEvent$2 {
|
|
@@ -3080,8 +3186,26 @@ interface QueryReferralRewardsOptions {
|
|
|
3080
3186
|
contactId?: string | null;
|
|
3081
3187
|
}
|
|
3082
3188
|
|
|
3083
|
-
declare function getReferralReward$1(httpClient: HttpClient):
|
|
3084
|
-
|
|
3189
|
+
declare function getReferralReward$1(httpClient: HttpClient): GetReferralRewardSignature;
|
|
3190
|
+
interface GetReferralRewardSignature {
|
|
3191
|
+
/**
|
|
3192
|
+
* Get a ReferralReward by id.
|
|
3193
|
+
* @param - Id of the ReferralReward to retrieve.
|
|
3194
|
+
* @returns The retrieved ReferralReward.
|
|
3195
|
+
*/
|
|
3196
|
+
(_id: string): Promise<ReferralReward & ReferralRewardNonNullableFields>;
|
|
3197
|
+
}
|
|
3198
|
+
declare function queryReferralRewards$1(httpClient: HttpClient): QueryReferralRewardsSignature;
|
|
3199
|
+
interface QueryReferralRewardsSignature {
|
|
3200
|
+
/**
|
|
3201
|
+
* Query ReferralRewards.
|
|
3202
|
+
*
|
|
3203
|
+
* Can be filtered by `contact_id`. If it's set to `me` current identity's rewards are returned.
|
|
3204
|
+
* Supports filtering on `owner_type`, `reward_type` fields.
|
|
3205
|
+
* @param - Query to filter ReferralRewards.
|
|
3206
|
+
*/
|
|
3207
|
+
(query: CursorQuery$2, options?: QueryReferralRewardsOptions | undefined): Promise<QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields>;
|
|
3208
|
+
}
|
|
3085
3209
|
|
|
3086
3210
|
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
3087
3211
|
|
|
@@ -3120,6 +3244,7 @@ declare const context$2_RewardTypeType: typeof RewardTypeType;
|
|
|
3120
3244
|
type context$2_RewardsInSite = RewardsInSite;
|
|
3121
3245
|
type context$2_Type = Type;
|
|
3122
3246
|
declare const context$2_Type: typeof Type;
|
|
3247
|
+
type context$2_UndeleteInfo = UndeleteInfo;
|
|
3123
3248
|
type context$2_V1Coupon = V1Coupon;
|
|
3124
3249
|
type context$2_V1LoyaltyPoints = V1LoyaltyPoints;
|
|
3125
3250
|
type context$2_ValidateReferralRewardRequest = ValidateReferralRewardRequest;
|
|
@@ -3129,10 +3254,9 @@ type context$2__publicQueryReferralRewardsType = _publicQueryReferralRewardsType
|
|
|
3129
3254
|
declare const context$2_getReferralReward: typeof getReferralReward;
|
|
3130
3255
|
declare const context$2_queryReferralRewards: typeof queryReferralRewards;
|
|
3131
3256
|
declare namespace context$2 {
|
|
3132
|
-
export { type ActionEvent$2 as ActionEvent, type context$2_BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest, type context$2_BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse, type context$2_Coupon as Coupon, type context$2_CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOf, type context$2_CouponScope as CouponScope, type context$2_CouponScopeOrMinSubtotalOneOf as CouponScopeOrMinSubtotalOneOf, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type CursorQuery$2 as CursorQuery, type CursorQueryPagingMethodOneOf$2 as CursorQueryPagingMethodOneOf, type Cursors$2 as Cursors, context$2_DiscountType as DiscountType, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type context$2_FixedAmountDiscount as FixedAmountDiscount, type context$2_GetReferralRewardRequest as GetReferralRewardRequest, type context$2_GetReferralRewardResponse as GetReferralRewardResponse, type context$2_GetReferralRewardResponseNonNullableFields as GetReferralRewardResponseNonNullableFields, type context$2_Group as Group, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$2_LoyaltyPoints as LoyaltyPoints, type MessageEnvelope$2 as MessageEnvelope, type context$2_PercentageDiscount as PercentageDiscount, type context$2_QueryReferralRewardsOptions as QueryReferralRewardsOptions, type context$2_QueryReferralRewardsRequest as QueryReferralRewardsRequest, type context$2_QueryReferralRewardsResponse as QueryReferralRewardsResponse, type context$2_QueryReferralRewardsResponseNonNullableFields as QueryReferralRewardsResponseNonNullableFields, type context$2_ReferralReward as ReferralReward, type context$2_ReferralRewardNonNullableFields as ReferralRewardNonNullableFields, type context$2_ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOf, type context$2_ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOf, type ReferredFriendDetails$1 as ReferredFriendDetails, type context$2_Reward as Reward, type context$2_RewardOptionsOneOf as RewardOptionsOneOf, context$2_RewardTypeType as RewardTypeType, type context$2_RewardsInSite as RewardsInSite, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, Status$1 as Status, type SuccessfulReferralEvent$1 as SuccessfulReferralEvent, context$2_Type as Type, type
|
|
3257
|
+
export { type ActionEvent$2 as ActionEvent, type context$2_BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest, type context$2_BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse, type context$2_Coupon as Coupon, type context$2_CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOf, type context$2_CouponScope as CouponScope, type context$2_CouponScopeOrMinSubtotalOneOf as CouponScopeOrMinSubtotalOneOf, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type CursorQuery$2 as CursorQuery, type CursorQueryPagingMethodOneOf$2 as CursorQueryPagingMethodOneOf, type Cursors$2 as Cursors, context$2_DiscountType as DiscountType, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type context$2_FixedAmountDiscount as FixedAmountDiscount, type context$2_GetReferralRewardRequest as GetReferralRewardRequest, type context$2_GetReferralRewardResponse as GetReferralRewardResponse, type context$2_GetReferralRewardResponseNonNullableFields as GetReferralRewardResponseNonNullableFields, type context$2_Group as Group, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$2_LoyaltyPoints as LoyaltyPoints, type MessageEnvelope$2 as MessageEnvelope, type context$2_PercentageDiscount as PercentageDiscount, type context$2_QueryReferralRewardsOptions as QueryReferralRewardsOptions, type context$2_QueryReferralRewardsRequest as QueryReferralRewardsRequest, type context$2_QueryReferralRewardsResponse as QueryReferralRewardsResponse, type context$2_QueryReferralRewardsResponseNonNullableFields as QueryReferralRewardsResponseNonNullableFields, type context$2_ReferralReward as ReferralReward, type context$2_ReferralRewardNonNullableFields as ReferralRewardNonNullableFields, type context$2_ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOf, type context$2_ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOf, type ReferredFriendDetails$1 as ReferredFriendDetails, type context$2_Reward as Reward, type context$2_RewardOptionsOneOf as RewardOptionsOneOf, context$2_RewardTypeType as RewardTypeType, type context$2_RewardsInSite as RewardsInSite, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, Status$1 as Status, type SuccessfulReferralEvent$1 as SuccessfulReferralEvent, context$2_Type as Type, type context$2_UndeleteInfo as UndeleteInfo, type context$2_V1Coupon as V1Coupon, type context$2_V1LoyaltyPoints as V1LoyaltyPoints, type context$2_ValidateReferralRewardRequest as ValidateReferralRewardRequest, type context$2_ValidateReferralRewardResponse as ValidateReferralRewardResponse, WebhookIdentityType$2 as WebhookIdentityType, type context$2__publicGetReferralRewardType as _publicGetReferralRewardType, type context$2__publicQueryReferralRewardsType as _publicQueryReferralRewardsType, context$2_getReferralReward as getReferralReward, context$2_queryReferralRewards as queryReferralRewards };
|
|
3133
3258
|
}
|
|
3134
3259
|
|
|
3135
|
-
/** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
|
|
3136
3260
|
interface ReferredFriend {
|
|
3137
3261
|
/**
|
|
3138
3262
|
* ReferredFriend ID.
|
|
@@ -3176,6 +3300,8 @@ declare enum Status {
|
|
|
3176
3300
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
3177
3301
|
}
|
|
3178
3302
|
interface CreateReferredFriendRequest {
|
|
3303
|
+
/** Referral code for referred friend */
|
|
3304
|
+
referralCode?: string | null;
|
|
3179
3305
|
}
|
|
3180
3306
|
interface CreateReferredFriendResponse {
|
|
3181
3307
|
/** The created ReferredFriend. */
|
|
@@ -3218,26 +3344,32 @@ interface QueryReferredFriendRequest {
|
|
|
3218
3344
|
query: CursorQuery$1;
|
|
3219
3345
|
}
|
|
3220
3346
|
interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
|
|
3221
|
-
/**
|
|
3347
|
+
/**
|
|
3348
|
+
* Cursor paging options.
|
|
3349
|
+
*
|
|
3350
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3351
|
+
*/
|
|
3222
3352
|
cursorPaging?: CursorPaging$1;
|
|
3223
3353
|
/**
|
|
3224
|
-
* Filter object
|
|
3225
|
-
*
|
|
3226
|
-
*
|
|
3227
|
-
* "fieldName2":{"$operator":"value2"}
|
|
3228
|
-
* }`
|
|
3229
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
3354
|
+
* Filter object.
|
|
3355
|
+
*
|
|
3356
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3230
3357
|
*/
|
|
3231
3358
|
filter?: Record<string, any> | null;
|
|
3232
3359
|
/**
|
|
3233
|
-
* Sort object
|
|
3234
|
-
*
|
|
3360
|
+
* Sort object.
|
|
3361
|
+
*
|
|
3362
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3235
3363
|
*/
|
|
3236
3364
|
sort?: Sorting$1[];
|
|
3237
3365
|
}
|
|
3238
3366
|
/** @oneof */
|
|
3239
3367
|
interface CursorQueryPagingMethodOneOf$1 {
|
|
3240
|
-
/**
|
|
3368
|
+
/**
|
|
3369
|
+
* Cursor paging options.
|
|
3370
|
+
*
|
|
3371
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3372
|
+
*/
|
|
3241
3373
|
cursorPaging?: CursorPaging$1;
|
|
3242
3374
|
}
|
|
3243
3375
|
interface Sorting$1 {
|
|
@@ -3268,7 +3400,7 @@ interface QueryReferredFriendResponse {
|
|
|
3268
3400
|
metadata?: CursorPagingMetadata$1;
|
|
3269
3401
|
}
|
|
3270
3402
|
interface CursorPagingMetadata$1 {
|
|
3271
|
-
/** Number of items returned in
|
|
3403
|
+
/** Number of items returned in current page. */
|
|
3272
3404
|
count?: number | null;
|
|
3273
3405
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
3274
3406
|
cursors?: Cursors$1;
|
|
@@ -3309,7 +3441,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
3309
3441
|
slug?: string;
|
|
3310
3442
|
/** ID of the entity associated with the event. */
|
|
3311
3443
|
entityId?: string;
|
|
3312
|
-
/** Event timestamp. */
|
|
3444
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3313
3445
|
eventTime?: Date;
|
|
3314
3446
|
/**
|
|
3315
3447
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -3338,7 +3470,7 @@ interface DomainEventBodyOneOf$1 {
|
|
|
3338
3470
|
interface EntityCreatedEvent$1 {
|
|
3339
3471
|
entity?: string;
|
|
3340
3472
|
}
|
|
3341
|
-
interface
|
|
3473
|
+
interface RestoreInfo$1 {
|
|
3342
3474
|
deletedDate?: Date;
|
|
3343
3475
|
}
|
|
3344
3476
|
interface EntityUpdatedEvent$1 {
|
|
@@ -3359,22 +3491,22 @@ interface ActionEvent$1 {
|
|
|
3359
3491
|
interface Empty {
|
|
3360
3492
|
}
|
|
3361
3493
|
interface SuccessfulReferralEvent {
|
|
3362
|
-
/**
|
|
3494
|
+
/** Details of the referred friend who completed their referral. */
|
|
3363
3495
|
referredFriendDetails?: ReferredFriendDetails;
|
|
3364
3496
|
}
|
|
3365
3497
|
interface ReferredFriendDetails {
|
|
3366
3498
|
/**
|
|
3367
|
-
*
|
|
3499
|
+
* ID of the referred friend.
|
|
3368
3500
|
* @readonly
|
|
3369
3501
|
*/
|
|
3370
3502
|
referredFriendId?: string;
|
|
3371
3503
|
/**
|
|
3372
|
-
*
|
|
3504
|
+
* Contact ID of the referred friend.
|
|
3373
3505
|
* @readonly
|
|
3374
3506
|
*/
|
|
3375
3507
|
contactId?: string;
|
|
3376
3508
|
/**
|
|
3377
|
-
*
|
|
3509
|
+
* ID of the customer who referred this friend.
|
|
3378
3510
|
* @readonly
|
|
3379
3511
|
*/
|
|
3380
3512
|
referringCustomerId?: string;
|
|
@@ -3467,7 +3599,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
3467
3599
|
slug?: string;
|
|
3468
3600
|
/** ID of the entity associated with the event. */
|
|
3469
3601
|
entityId?: string;
|
|
3470
|
-
/** Event timestamp. */
|
|
3602
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3471
3603
|
eventTime?: Date;
|
|
3472
3604
|
/**
|
|
3473
3605
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -3497,6 +3629,10 @@ interface ReferredFriendUpdatedEnvelope {
|
|
|
3497
3629
|
interface ReferredFriendDeletedEnvelope {
|
|
3498
3630
|
metadata: EventMetadata$1;
|
|
3499
3631
|
}
|
|
3632
|
+
interface CreateReferredFriendOptions {
|
|
3633
|
+
/** Referral code for referred friend */
|
|
3634
|
+
referralCode?: string | null;
|
|
3635
|
+
}
|
|
3500
3636
|
interface UpdateReferredFriend {
|
|
3501
3637
|
/**
|
|
3502
3638
|
* ReferredFriend ID.
|
|
@@ -3613,12 +3749,62 @@ interface ReferredFriendsQueryBuilder {
|
|
|
3613
3749
|
find: () => Promise<ReferredFriendsQueryResult>;
|
|
3614
3750
|
}
|
|
3615
3751
|
|
|
3616
|
-
declare function createReferredFriend$1(httpClient: HttpClient):
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3752
|
+
declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
|
|
3753
|
+
interface CreateReferredFriendSignature {
|
|
3754
|
+
/**
|
|
3755
|
+
* Try to create the ReferredFriend or return existing entity if it already exists.
|
|
3756
|
+
*
|
|
3757
|
+
* Must be called with member identity.
|
|
3758
|
+
* Referral code must be provided either in the request or via scope.
|
|
3759
|
+
* Member must be eligible to become referred friend.
|
|
3760
|
+
*/
|
|
3761
|
+
(options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
|
|
3762
|
+
}
|
|
3763
|
+
declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
|
|
3764
|
+
interface GetReferredFriendSignature {
|
|
3765
|
+
/**
|
|
3766
|
+
* Get a ReferredFriend by id.
|
|
3767
|
+
* @param - Id of the ReferredFriend to retrieve.
|
|
3768
|
+
*/
|
|
3769
|
+
(referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
|
|
3770
|
+
}
|
|
3771
|
+
declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
|
|
3772
|
+
interface GetReferredFriendByContactIdSignature {
|
|
3773
|
+
/**
|
|
3774
|
+
* Get a ReferredFriend by contactId.
|
|
3775
|
+
*
|
|
3776
|
+
* You can provide "me" instead of specific contact id to get referring friend for current identity's contact.
|
|
3777
|
+
* @param - Contact id or "me" to get current identity's Contact.
|
|
3778
|
+
* @returns The retrieved ReferredFriend.
|
|
3779
|
+
*/
|
|
3780
|
+
(contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3781
|
+
}
|
|
3782
|
+
declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
|
|
3783
|
+
interface UpdateReferredFriendSignature {
|
|
3784
|
+
/**
|
|
3785
|
+
* Update a ReferredFriend, supports partial update.
|
|
3786
|
+
*
|
|
3787
|
+
* Pass the latest `revision` for a successful update.
|
|
3788
|
+
* @param - ReferredFriend ID.
|
|
3789
|
+
* @returns The updated ReferredFriend.
|
|
3790
|
+
*/
|
|
3791
|
+
(_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3792
|
+
}
|
|
3793
|
+
declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
|
|
3794
|
+
interface DeleteReferredFriendSignature {
|
|
3795
|
+
/**
|
|
3796
|
+
* Delete a ReferredFriend.
|
|
3797
|
+
* @param - Id of the ReferredFriend to delete.
|
|
3798
|
+
*/
|
|
3799
|
+
(referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
|
|
3800
|
+
}
|
|
3801
|
+
declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
|
|
3802
|
+
interface QueryReferredFriendSignature {
|
|
3803
|
+
/**
|
|
3804
|
+
* Query ReferredFriends using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
3805
|
+
*/
|
|
3806
|
+
(): ReferredFriendsQueryBuilder;
|
|
3807
|
+
}
|
|
3622
3808
|
declare const onReferredFriendCreated$1: EventDefinition<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
|
|
3623
3809
|
declare const onReferredFriendUpdated$1: EventDefinition<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
|
|
3624
3810
|
declare const onReferredFriendDeleted$1: EventDefinition<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
|
|
@@ -3641,14 +3827,18 @@ type _publicQueryReferredFriendType = typeof queryReferredFriend$1;
|
|
|
3641
3827
|
declare const queryReferredFriend: ReturnType<typeof createRESTModule$1<_publicQueryReferredFriendType>>;
|
|
3642
3828
|
|
|
3643
3829
|
type _publicOnReferredFriendCreatedType = typeof onReferredFriendCreated$1;
|
|
3830
|
+
/** */
|
|
3644
3831
|
declare const onReferredFriendCreated: ReturnType<typeof createEventModule$1<_publicOnReferredFriendCreatedType>>;
|
|
3645
3832
|
|
|
3646
3833
|
type _publicOnReferredFriendUpdatedType = typeof onReferredFriendUpdated$1;
|
|
3834
|
+
/** */
|
|
3647
3835
|
declare const onReferredFriendUpdated: ReturnType<typeof createEventModule$1<_publicOnReferredFriendUpdatedType>>;
|
|
3648
3836
|
|
|
3649
3837
|
type _publicOnReferredFriendDeletedType = typeof onReferredFriendDeleted$1;
|
|
3838
|
+
/** */
|
|
3650
3839
|
declare const onReferredFriendDeleted: ReturnType<typeof createEventModule$1<_publicOnReferredFriendDeletedType>>;
|
|
3651
3840
|
|
|
3841
|
+
type context$1_CreateReferredFriendOptions = CreateReferredFriendOptions;
|
|
3652
3842
|
type context$1_CreateReferredFriendRequest = CreateReferredFriendRequest;
|
|
3653
3843
|
type context$1_CreateReferredFriendResponse = CreateReferredFriendResponse;
|
|
3654
3844
|
type context$1_CreateReferredFriendResponseNonNullableFields = CreateReferredFriendResponseNonNullableFields;
|
|
@@ -3699,61 +3889,64 @@ declare const context$1_onReferredFriendUpdated: typeof onReferredFriendUpdated;
|
|
|
3699
3889
|
declare const context$1_queryReferredFriend: typeof queryReferredFriend;
|
|
3700
3890
|
declare const context$1_updateReferredFriend: typeof updateReferredFriend;
|
|
3701
3891
|
declare namespace context$1 {
|
|
3702
|
-
export { type ActionEvent$1 as ActionEvent, type BaseEventMetadata$1 as BaseEventMetadata, type context$1_CreateReferredFriendRequest as CreateReferredFriendRequest, type context$1_CreateReferredFriendResponse as CreateReferredFriendResponse, type context$1_CreateReferredFriendResponseNonNullableFields as CreateReferredFriendResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type CursorQuery$1 as CursorQuery, type CursorQueryPagingMethodOneOf$1 as CursorQueryPagingMethodOneOf, type Cursors$1 as Cursors, type context$1_DeleteReferredFriendOptions as DeleteReferredFriendOptions, type context$1_DeleteReferredFriendRequest as DeleteReferredFriendRequest, type context$1_DeleteReferredFriendResponse as DeleteReferredFriendResponse, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$1_Empty as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequest, type context$1_GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponse, type context$1_GetReferredFriendByContactIdResponseNonNullableFields as GetReferredFriendByContactIdResponseNonNullableFields, type context$1_GetReferredFriendRequest as GetReferredFriendRequest, type context$1_GetReferredFriendResponse as GetReferredFriendResponse, type context$1_GetReferredFriendResponseNonNullableFields as GetReferredFriendResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$1_QueryReferredFriendRequest as QueryReferredFriendRequest, type context$1_QueryReferredFriendResponse as QueryReferredFriendResponse, type context$1_QueryReferredFriendResponseNonNullableFields as QueryReferredFriendResponseNonNullableFields, type context$1_ReferredFriend as ReferredFriend, type context$1_ReferredFriendCreatedEnvelope as ReferredFriendCreatedEnvelope, type context$1_ReferredFriendDeletedEnvelope as ReferredFriendDeletedEnvelope, type context$1_ReferredFriendDetails as ReferredFriendDetails, type context$1_ReferredFriendNonNullableFields as ReferredFriendNonNullableFields, type context$1_ReferredFriendUpdatedEnvelope as ReferredFriendUpdatedEnvelope, type context$1_ReferredFriendsQueryBuilder as ReferredFriendsQueryBuilder, type context$1_ReferredFriendsQueryResult as ReferredFriendsQueryResult, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, context$1_Status as Status, type context$1_SuccessfulReferralEvent as SuccessfulReferralEvent, type
|
|
3892
|
+
export { type ActionEvent$1 as ActionEvent, type BaseEventMetadata$1 as BaseEventMetadata, type context$1_CreateReferredFriendOptions as CreateReferredFriendOptions, type context$1_CreateReferredFriendRequest as CreateReferredFriendRequest, type context$1_CreateReferredFriendResponse as CreateReferredFriendResponse, type context$1_CreateReferredFriendResponseNonNullableFields as CreateReferredFriendResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type CursorQuery$1 as CursorQuery, type CursorQueryPagingMethodOneOf$1 as CursorQueryPagingMethodOneOf, type Cursors$1 as Cursors, type context$1_DeleteReferredFriendOptions as DeleteReferredFriendOptions, type context$1_DeleteReferredFriendRequest as DeleteReferredFriendRequest, type context$1_DeleteReferredFriendResponse as DeleteReferredFriendResponse, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$1_Empty as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequest, type context$1_GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponse, type context$1_GetReferredFriendByContactIdResponseNonNullableFields as GetReferredFriendByContactIdResponseNonNullableFields, type context$1_GetReferredFriendRequest as GetReferredFriendRequest, type context$1_GetReferredFriendResponse as GetReferredFriendResponse, type context$1_GetReferredFriendResponseNonNullableFields as GetReferredFriendResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$1_QueryReferredFriendRequest as QueryReferredFriendRequest, type context$1_QueryReferredFriendResponse as QueryReferredFriendResponse, type context$1_QueryReferredFriendResponseNonNullableFields as QueryReferredFriendResponseNonNullableFields, type context$1_ReferredFriend as ReferredFriend, type context$1_ReferredFriendCreatedEnvelope as ReferredFriendCreatedEnvelope, type context$1_ReferredFriendDeletedEnvelope as ReferredFriendDeletedEnvelope, type context$1_ReferredFriendDetails as ReferredFriendDetails, type context$1_ReferredFriendNonNullableFields as ReferredFriendNonNullableFields, type context$1_ReferredFriendUpdatedEnvelope as ReferredFriendUpdatedEnvelope, type context$1_ReferredFriendsQueryBuilder as ReferredFriendsQueryBuilder, type context$1_ReferredFriendsQueryResult as ReferredFriendsQueryResult, type RestoreInfo$1 as RestoreInfo, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, context$1_Status as Status, type context$1_SuccessfulReferralEvent as SuccessfulReferralEvent, type context$1_UpdateReferredFriend as UpdateReferredFriend, type context$1_UpdateReferredFriendRequest as UpdateReferredFriendRequest, type context$1_UpdateReferredFriendResponse as UpdateReferredFriendResponse, type context$1_UpdateReferredFriendResponseNonNullableFields as UpdateReferredFriendResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicCreateReferredFriendType as _publicCreateReferredFriendType, type context$1__publicDeleteReferredFriendType as _publicDeleteReferredFriendType, type context$1__publicGetReferredFriendByContactIdType as _publicGetReferredFriendByContactIdType, type context$1__publicGetReferredFriendType as _publicGetReferredFriendType, type context$1__publicOnReferredFriendCreatedType as _publicOnReferredFriendCreatedType, type context$1__publicOnReferredFriendDeletedType as _publicOnReferredFriendDeletedType, type context$1__publicOnReferredFriendUpdatedType as _publicOnReferredFriendUpdatedType, type context$1__publicQueryReferredFriendType as _publicQueryReferredFriendType, type context$1__publicUpdateReferredFriendType as _publicUpdateReferredFriendType, context$1_createReferredFriend as createReferredFriend, context$1_deleteReferredFriend as deleteReferredFriend, context$1_getReferredFriend as getReferredFriend, context$1_getReferredFriendByContactId as getReferredFriendByContactId, context$1_onReferredFriendCreated as onReferredFriendCreated, context$1_onReferredFriendDeleted as onReferredFriendDeleted, context$1_onReferredFriendUpdated as onReferredFriendUpdated, onReferredFriendCreated$1 as publicOnReferredFriendCreated, onReferredFriendDeleted$1 as publicOnReferredFriendDeleted, onReferredFriendUpdated$1 as publicOnReferredFriendUpdated, context$1_queryReferredFriend as queryReferredFriend, context$1_updateReferredFriend as updateReferredFriend };
|
|
3703
3893
|
}
|
|
3704
3894
|
|
|
3705
3895
|
/** ReferringCustomer is the main entity of ReferringCustomers. */
|
|
3706
3896
|
interface ReferringCustomer {
|
|
3707
3897
|
/**
|
|
3708
|
-
*
|
|
3898
|
+
* ID of the referring customer.
|
|
3709
3899
|
* @readonly
|
|
3710
3900
|
*/
|
|
3711
3901
|
_id?: string;
|
|
3712
3902
|
/**
|
|
3713
|
-
* Contact
|
|
3903
|
+
* Contact ID associated with the referring customer.
|
|
3714
3904
|
* @readonly
|
|
3715
3905
|
*/
|
|
3716
3906
|
contactId?: string;
|
|
3717
3907
|
/**
|
|
3718
|
-
*
|
|
3908
|
+
* Unique code for the referral. For example, `GxpxwAoMqxH8`.
|
|
3719
3909
|
* @readonly
|
|
3720
3910
|
*/
|
|
3721
3911
|
referralCode?: string;
|
|
3722
|
-
/**
|
|
3912
|
+
/**
|
|
3913
|
+
* Revision number, which increments by 1 each time the referring customer is updated.
|
|
3914
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referring customer.
|
|
3915
|
+
*/
|
|
3723
3916
|
revision?: string | null;
|
|
3724
3917
|
/**
|
|
3725
|
-
*
|
|
3918
|
+
* Date and time the referring customer was created.
|
|
3726
3919
|
* @readonly
|
|
3727
3920
|
*/
|
|
3728
3921
|
_createdDate?: Date;
|
|
3729
3922
|
/**
|
|
3730
|
-
*
|
|
3923
|
+
* Date and time the referring customer was last updated.
|
|
3731
3924
|
* @readonly
|
|
3732
3925
|
*/
|
|
3733
3926
|
_updatedDate?: Date;
|
|
3734
3927
|
}
|
|
3735
3928
|
interface GenerateReferringCustomerForContactRequest {
|
|
3736
|
-
/** Contact
|
|
3929
|
+
/** Contact ID or `"me"` to generate the current identity's referring customer. */
|
|
3737
3930
|
contactId: string;
|
|
3738
3931
|
}
|
|
3739
3932
|
interface GenerateReferringCustomerForContactResponse {
|
|
3740
|
-
/**
|
|
3933
|
+
/** Created referring customer. */
|
|
3741
3934
|
referringCustomer?: ReferringCustomer;
|
|
3742
3935
|
}
|
|
3743
3936
|
interface GetReferringCustomerRequest {
|
|
3744
|
-
/**
|
|
3937
|
+
/** ID of the referring customer to retrieve. */
|
|
3745
3938
|
referringCustomerId: string;
|
|
3746
3939
|
}
|
|
3747
3940
|
interface GetReferringCustomerResponse {
|
|
3748
|
-
/**
|
|
3941
|
+
/** Retrieved referring customer. */
|
|
3749
3942
|
referringCustomer?: ReferringCustomer;
|
|
3750
3943
|
}
|
|
3751
3944
|
interface GetReferringCustomerByReferralCodeRequest {
|
|
3752
|
-
/** Referral
|
|
3945
|
+
/** Referral code of the referring customer to retrieve. */
|
|
3753
3946
|
referralCode: string;
|
|
3754
3947
|
}
|
|
3755
3948
|
interface GetReferringCustomerByReferralCodeResponse {
|
|
3756
|
-
/**
|
|
3949
|
+
/** Retrieved referring customer. */
|
|
3757
3950
|
referringCustomer?: ReferringCustomer;
|
|
3758
3951
|
}
|
|
3759
3952
|
interface QueryReferringCustomersRequest {
|
|
@@ -3761,26 +3954,32 @@ interface QueryReferringCustomersRequest {
|
|
|
3761
3954
|
query: CursorQuery;
|
|
3762
3955
|
}
|
|
3763
3956
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
3764
|
-
/**
|
|
3957
|
+
/**
|
|
3958
|
+
* Cursor paging options.
|
|
3959
|
+
*
|
|
3960
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3961
|
+
*/
|
|
3765
3962
|
cursorPaging?: CursorPaging;
|
|
3766
3963
|
/**
|
|
3767
|
-
* Filter object
|
|
3768
|
-
*
|
|
3769
|
-
*
|
|
3770
|
-
* "fieldName2":{"$operator":"value2"}
|
|
3771
|
-
* }`
|
|
3772
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
3964
|
+
* Filter object.
|
|
3965
|
+
*
|
|
3966
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3773
3967
|
*/
|
|
3774
3968
|
filter?: Record<string, any> | null;
|
|
3775
3969
|
/**
|
|
3776
|
-
* Sort object
|
|
3777
|
-
*
|
|
3970
|
+
* Sort object.
|
|
3971
|
+
*
|
|
3972
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3778
3973
|
*/
|
|
3779
3974
|
sort?: Sorting[];
|
|
3780
3975
|
}
|
|
3781
3976
|
/** @oneof */
|
|
3782
3977
|
interface CursorQueryPagingMethodOneOf {
|
|
3783
|
-
/**
|
|
3978
|
+
/**
|
|
3979
|
+
* Cursor paging options.
|
|
3980
|
+
*
|
|
3981
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3982
|
+
*/
|
|
3784
3983
|
cursorPaging?: CursorPaging;
|
|
3785
3984
|
}
|
|
3786
3985
|
interface Sorting {
|
|
@@ -3805,13 +4004,13 @@ interface CursorPaging {
|
|
|
3805
4004
|
cursor?: string | null;
|
|
3806
4005
|
}
|
|
3807
4006
|
interface QueryReferringCustomersResponse {
|
|
3808
|
-
/**
|
|
4007
|
+
/** List of retrieved referring customers. */
|
|
3809
4008
|
referringCustomers?: ReferringCustomer[];
|
|
3810
4009
|
/** Paging metadata. */
|
|
3811
4010
|
metadata?: CursorPagingMetadata;
|
|
3812
4011
|
}
|
|
3813
4012
|
interface CursorPagingMetadata {
|
|
3814
|
-
/** Number of items returned in
|
|
4013
|
+
/** Number of items returned in current page. */
|
|
3815
4014
|
count?: number | null;
|
|
3816
4015
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
3817
4016
|
cursors?: Cursors;
|
|
@@ -3830,9 +4029,9 @@ interface Cursors {
|
|
|
3830
4029
|
prev?: string | null;
|
|
3831
4030
|
}
|
|
3832
4031
|
interface DeleteReferringCustomerRequest {
|
|
3833
|
-
/**
|
|
4032
|
+
/** ID of the referring customer to delete. */
|
|
3834
4033
|
referringCustomerId: string;
|
|
3835
|
-
/**
|
|
4034
|
+
/** Revision number of the referring customer. */
|
|
3836
4035
|
revision?: string;
|
|
3837
4036
|
}
|
|
3838
4037
|
interface DeleteReferringCustomerResponse {
|
|
@@ -3860,7 +4059,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
3860
4059
|
slug?: string;
|
|
3861
4060
|
/** ID of the entity associated with the event. */
|
|
3862
4061
|
entityId?: string;
|
|
3863
|
-
/** Event timestamp. */
|
|
4062
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3864
4063
|
eventTime?: Date;
|
|
3865
4064
|
/**
|
|
3866
4065
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -3889,7 +4088,7 @@ interface DomainEventBodyOneOf {
|
|
|
3889
4088
|
interface EntityCreatedEvent {
|
|
3890
4089
|
entity?: string;
|
|
3891
4090
|
}
|
|
3892
|
-
interface
|
|
4091
|
+
interface RestoreInfo {
|
|
3893
4092
|
deletedDate?: Date;
|
|
3894
4093
|
}
|
|
3895
4094
|
interface EntityUpdatedEvent {
|
|
@@ -3991,7 +4190,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
3991
4190
|
slug?: string;
|
|
3992
4191
|
/** ID of the entity associated with the event. */
|
|
3993
4192
|
entityId?: string;
|
|
3994
|
-
/** Event timestamp. */
|
|
4193
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3995
4194
|
eventTime?: Date;
|
|
3996
4195
|
/**
|
|
3997
4196
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -4095,15 +4294,64 @@ interface ReferringCustomersQueryBuilder {
|
|
|
4095
4294
|
find: () => Promise<ReferringCustomersQueryResult>;
|
|
4096
4295
|
}
|
|
4097
4296
|
interface DeleteReferringCustomerOptions {
|
|
4098
|
-
/**
|
|
4297
|
+
/** Revision number of the referring customer. */
|
|
4099
4298
|
revision?: string;
|
|
4100
4299
|
}
|
|
4101
4300
|
|
|
4102
|
-
declare function generateReferringCustomerForContact$1(httpClient: HttpClient):
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4301
|
+
declare function generateReferringCustomerForContact$1(httpClient: HttpClient): GenerateReferringCustomerForContactSignature;
|
|
4302
|
+
interface GenerateReferringCustomerForContactSignature {
|
|
4303
|
+
/**
|
|
4304
|
+
* Creates a new referring customer or returns an existing one for the provided contact ID.
|
|
4305
|
+
*
|
|
4306
|
+
* You can use "me" instead of a specific contact ID to generate a referring customer for the current identity's contact.
|
|
4307
|
+
*
|
|
4308
|
+
* See [About Identities](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) to learn more about identies.
|
|
4309
|
+
* @param - Contact ID or `"me"` to generate the current identity's referring customer.
|
|
4310
|
+
*/
|
|
4311
|
+
(contactId: string): Promise<GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields>;
|
|
4312
|
+
}
|
|
4313
|
+
declare function getReferringCustomer$1(httpClient: HttpClient): GetReferringCustomerSignature;
|
|
4314
|
+
interface GetReferringCustomerSignature {
|
|
4315
|
+
/**
|
|
4316
|
+
* Retrieves a referring customer by ID.
|
|
4317
|
+
* @param - ID of the referring customer to retrieve.
|
|
4318
|
+
* @returns Retrieved referring customer.
|
|
4319
|
+
*/
|
|
4320
|
+
(referringCustomerId: string): Promise<ReferringCustomer & ReferringCustomerNonNullableFields>;
|
|
4321
|
+
}
|
|
4322
|
+
declare function getReferringCustomerByReferralCode$1(httpClient: HttpClient): GetReferringCustomerByReferralCodeSignature;
|
|
4323
|
+
interface GetReferringCustomerByReferralCodeSignature {
|
|
4324
|
+
/**
|
|
4325
|
+
* Retrieves a referring customer by referral code.
|
|
4326
|
+
* @param - Referral code of the referring customer to retrieve.
|
|
4327
|
+
*/
|
|
4328
|
+
(referralCode: string): Promise<GetReferringCustomerByReferralCodeResponse & GetReferringCustomerByReferralCodeResponseNonNullableFields>;
|
|
4329
|
+
}
|
|
4330
|
+
declare function queryReferringCustomers$1(httpClient: HttpClient): QueryReferringCustomersSignature;
|
|
4331
|
+
interface QueryReferringCustomersSignature {
|
|
4332
|
+
/**
|
|
4333
|
+
* Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
|
|
4334
|
+
*
|
|
4335
|
+
* TODO: This endpoint supports [WQL (Wix Query Language)](https://dev.wix.com/api/rest/getting-started/api-query-language) with these properties:
|
|
4336
|
+
* `contact_id`, `referral_code`, `created_date`, `updated_date`.
|
|
4337
|
+
*
|
|
4338
|
+
* To learn about working with _Query_ endpoints, see
|
|
4339
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
4340
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
4341
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
4342
|
+
*/
|
|
4343
|
+
(): ReferringCustomersQueryBuilder;
|
|
4344
|
+
}
|
|
4345
|
+
declare function deleteReferringCustomer$1(httpClient: HttpClient): DeleteReferringCustomerSignature;
|
|
4346
|
+
interface DeleteReferringCustomerSignature {
|
|
4347
|
+
/**
|
|
4348
|
+
* Deletes a referring customer by ID.
|
|
4349
|
+
*
|
|
4350
|
+
* You must provide the latest `revision` to prevent conflicting changes.
|
|
4351
|
+
* @param - ID of the referring customer to delete.
|
|
4352
|
+
*/
|
|
4353
|
+
(referringCustomerId: string, options?: DeleteReferringCustomerOptions | undefined): Promise<void>;
|
|
4354
|
+
}
|
|
4107
4355
|
declare const onReferringCustomerCreated$1: EventDefinition<ReferringCustomerCreatedEnvelope, "wix.loyalty.referral.v1.referring_customer_created">;
|
|
4108
4356
|
declare const onReferringCustomerDeleted$1: EventDefinition<ReferringCustomerDeletedEnvelope, "wix.loyalty.referral.v1.referring_customer_deleted">;
|
|
4109
4357
|
|
|
@@ -4123,9 +4371,11 @@ type _publicDeleteReferringCustomerType = typeof deleteReferringCustomer$1;
|
|
|
4123
4371
|
declare const deleteReferringCustomer: ReturnType<typeof createRESTModule<_publicDeleteReferringCustomerType>>;
|
|
4124
4372
|
|
|
4125
4373
|
type _publicOnReferringCustomerCreatedType = typeof onReferringCustomerCreated$1;
|
|
4374
|
+
/** */
|
|
4126
4375
|
declare const onReferringCustomerCreated: ReturnType<typeof createEventModule<_publicOnReferringCustomerCreatedType>>;
|
|
4127
4376
|
|
|
4128
4377
|
type _publicOnReferringCustomerDeletedType = typeof onReferringCustomerDeleted$1;
|
|
4378
|
+
/** */
|
|
4129
4379
|
declare const onReferringCustomerDeleted: ReturnType<typeof createEventModule<_publicOnReferringCustomerDeletedType>>;
|
|
4130
4380
|
|
|
4131
4381
|
type context_ActionEvent = ActionEvent;
|
|
@@ -4165,10 +4415,10 @@ type context_ReferringCustomerDeletedEnvelope = ReferringCustomerDeletedEnvelope
|
|
|
4165
4415
|
type context_ReferringCustomerNonNullableFields = ReferringCustomerNonNullableFields;
|
|
4166
4416
|
type context_ReferringCustomersQueryBuilder = ReferringCustomersQueryBuilder;
|
|
4167
4417
|
type context_ReferringCustomersQueryResult = ReferringCustomersQueryResult;
|
|
4418
|
+
type context_RestoreInfo = RestoreInfo;
|
|
4168
4419
|
type context_SortOrder = SortOrder;
|
|
4169
4420
|
declare const context_SortOrder: typeof SortOrder;
|
|
4170
4421
|
type context_Sorting = Sorting;
|
|
4171
|
-
type context_UndeleteInfo = UndeleteInfo;
|
|
4172
4422
|
type context_WebhookIdentityType = WebhookIdentityType;
|
|
4173
4423
|
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
4174
4424
|
type context__publicDeleteReferringCustomerType = _publicDeleteReferringCustomerType;
|
|
@@ -4186,7 +4436,7 @@ declare const context_onReferringCustomerCreated: typeof onReferringCustomerCrea
|
|
|
4186
4436
|
declare const context_onReferringCustomerDeleted: typeof onReferringCustomerDeleted;
|
|
4187
4437
|
declare const context_queryReferringCustomers: typeof queryReferringCustomers;
|
|
4188
4438
|
declare namespace context {
|
|
4189
|
-
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteReferringCustomerOptions as DeleteReferringCustomerOptions, type context_DeleteReferringCustomerRequest as DeleteReferringCustomerRequest, type context_DeleteReferringCustomerResponse as DeleteReferringCustomerResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_GenerateReferringCustomerForContactRequest as GenerateReferringCustomerForContactRequest, type context_GenerateReferringCustomerForContactResponse as GenerateReferringCustomerForContactResponse, type context_GenerateReferringCustomerForContactResponseNonNullableFields as GenerateReferringCustomerForContactResponseNonNullableFields, type context_GetReferringCustomerByReferralCodeRequest as GetReferringCustomerByReferralCodeRequest, type context_GetReferringCustomerByReferralCodeResponse as GetReferringCustomerByReferralCodeResponse, type context_GetReferringCustomerByReferralCodeResponseNonNullableFields as GetReferringCustomerByReferralCodeResponseNonNullableFields, type context_GetReferringCustomerRequest as GetReferringCustomerRequest, type context_GetReferringCustomerResponse as GetReferringCustomerResponse, type context_GetReferringCustomerResponseNonNullableFields as GetReferringCustomerResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_MessageEnvelope as MessageEnvelope, type context_QueryReferringCustomersRequest as QueryReferringCustomersRequest, type context_QueryReferringCustomersResponse as QueryReferringCustomersResponse, type context_QueryReferringCustomersResponseNonNullableFields as QueryReferringCustomersResponseNonNullableFields, type context_ReferringCustomer as ReferringCustomer, type context_ReferringCustomerCreatedEnvelope as ReferringCustomerCreatedEnvelope, type context_ReferringCustomerDeletedEnvelope as ReferringCustomerDeletedEnvelope, type context_ReferringCustomerNonNullableFields as ReferringCustomerNonNullableFields, type context_ReferringCustomersQueryBuilder as ReferringCustomersQueryBuilder, type context_ReferringCustomersQueryResult as ReferringCustomersQueryResult,
|
|
4439
|
+
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteReferringCustomerOptions as DeleteReferringCustomerOptions, type context_DeleteReferringCustomerRequest as DeleteReferringCustomerRequest, type context_DeleteReferringCustomerResponse as DeleteReferringCustomerResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_GenerateReferringCustomerForContactRequest as GenerateReferringCustomerForContactRequest, type context_GenerateReferringCustomerForContactResponse as GenerateReferringCustomerForContactResponse, type context_GenerateReferringCustomerForContactResponseNonNullableFields as GenerateReferringCustomerForContactResponseNonNullableFields, type context_GetReferringCustomerByReferralCodeRequest as GetReferringCustomerByReferralCodeRequest, type context_GetReferringCustomerByReferralCodeResponse as GetReferringCustomerByReferralCodeResponse, type context_GetReferringCustomerByReferralCodeResponseNonNullableFields as GetReferringCustomerByReferralCodeResponseNonNullableFields, type context_GetReferringCustomerRequest as GetReferringCustomerRequest, type context_GetReferringCustomerResponse as GetReferringCustomerResponse, type context_GetReferringCustomerResponseNonNullableFields as GetReferringCustomerResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_MessageEnvelope as MessageEnvelope, type context_QueryReferringCustomersRequest as QueryReferringCustomersRequest, type context_QueryReferringCustomersResponse as QueryReferringCustomersResponse, type context_QueryReferringCustomersResponseNonNullableFields as QueryReferringCustomersResponseNonNullableFields, type context_ReferringCustomer as ReferringCustomer, type context_ReferringCustomerCreatedEnvelope as ReferringCustomerCreatedEnvelope, type context_ReferringCustomerDeletedEnvelope as ReferringCustomerDeletedEnvelope, type context_ReferringCustomerNonNullableFields as ReferringCustomerNonNullableFields, type context_ReferringCustomersQueryBuilder as ReferringCustomersQueryBuilder, type context_ReferringCustomersQueryResult as ReferringCustomersQueryResult, type context_RestoreInfo as RestoreInfo, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_WebhookIdentityType as WebhookIdentityType, type context__publicDeleteReferringCustomerType as _publicDeleteReferringCustomerType, type context__publicGenerateReferringCustomerForContactType as _publicGenerateReferringCustomerForContactType, type context__publicGetReferringCustomerByReferralCodeType as _publicGetReferringCustomerByReferralCodeType, type context__publicGetReferringCustomerType as _publicGetReferringCustomerType, type context__publicOnReferringCustomerCreatedType as _publicOnReferringCustomerCreatedType, type context__publicOnReferringCustomerDeletedType as _publicOnReferringCustomerDeletedType, type context__publicQueryReferringCustomersType as _publicQueryReferringCustomersType, context_deleteReferringCustomer as deleteReferringCustomer, context_generateReferringCustomerForContact as generateReferringCustomerForContact, context_getReferringCustomer as getReferringCustomer, context_getReferringCustomerByReferralCode as getReferringCustomerByReferralCode, context_onReferringCustomerCreated as onReferringCustomerCreated, context_onReferringCustomerDeleted as onReferringCustomerDeleted, onReferringCustomerCreated$1 as publicOnReferringCustomerCreated, onReferringCustomerDeleted$1 as publicOnReferringCustomerDeleted, context_queryReferringCustomers as queryReferringCustomers };
|
|
4190
4440
|
}
|
|
4191
4441
|
|
|
4192
4442
|
export { context as customers, context$1 as friends, context$4 as programs, context$2 as rewards, context$3 as tracker };
|