@wix/referral 1.0.11 → 1.0.12
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 +340 -116
- package/type-bundles/index.bundle.d.ts +340 -116
- package/type-bundles/meta.bundle.d.ts +70 -44
|
@@ -1,3 +1,47 @@
|
|
|
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;
|
|
@@ -440,7 +484,7 @@ interface DomainEventBodyOneOf$4 {
|
|
|
440
484
|
interface EntityCreatedEvent$4 {
|
|
441
485
|
entity?: string;
|
|
442
486
|
}
|
|
443
|
-
interface RestoreInfo$
|
|
487
|
+
interface RestoreInfo$2 {
|
|
444
488
|
deletedDate?: Date;
|
|
445
489
|
}
|
|
446
490
|
interface EntityUpdatedEvent$4 {
|
|
@@ -1483,58 +1527,72 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
|
|
|
1483
1527
|
topic?: string;
|
|
1484
1528
|
}
|
|
1485
1529
|
|
|
1486
|
-
|
|
1487
|
-
interface
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1530
|
+
declare function getReferralProgram$1(httpClient: HttpClient): GetReferralProgramSignature;
|
|
1531
|
+
interface GetReferralProgramSignature {
|
|
1532
|
+
/**
|
|
1533
|
+
* Retrieves the referral program.
|
|
1534
|
+
*/
|
|
1535
|
+
(): Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
|
|
1491
1536
|
}
|
|
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
|
-
|
|
1537
|
+
declare function queryReferralPrograms$1(httpClient: HttpClient): QueryReferralProgramsSignature;
|
|
1538
|
+
interface QueryReferralProgramsSignature {
|
|
1539
|
+
/**
|
|
1540
|
+
* Retrieves a list of referral programs, given the provided paging, filtering, and sorting.
|
|
1541
|
+
*
|
|
1542
|
+
* To learn about working with _Query_ endpoints, see
|
|
1543
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
1544
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
1545
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
1546
|
+
* @deprecated
|
|
1547
|
+
*/
|
|
1548
|
+
(): ReferralProgramsQueryBuilder;
|
|
1549
|
+
}
|
|
1550
|
+
declare function updateReferralProgram$1(httpClient: HttpClient): UpdateReferralProgramSignature;
|
|
1551
|
+
interface UpdateReferralProgramSignature {
|
|
1552
|
+
/**
|
|
1553
|
+
* Updates a referral program. Supports partial updates.
|
|
1554
|
+
*
|
|
1555
|
+
* Revision number, which increments by 1 each time the referral program is updated.
|
|
1556
|
+
* To prevent conflicting changes, the current revision must be passed when updating the referral program.
|
|
1557
|
+
* @param - Referral program to update. Include the latest `revision` for a successful update.
|
|
1558
|
+
*/
|
|
1559
|
+
(referralProgram: ReferralProgram): Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
|
|
1560
|
+
}
|
|
1561
|
+
declare function activateReferralProgram$1(httpClient: HttpClient): ActivateReferralProgramSignature;
|
|
1562
|
+
interface ActivateReferralProgramSignature {
|
|
1563
|
+
/**
|
|
1564
|
+
* Activates the referral program, changing its status to `ACTIVE`.
|
|
1565
|
+
*/
|
|
1566
|
+
(): Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
|
|
1567
|
+
}
|
|
1568
|
+
declare function pauseReferralProgram$1(httpClient: HttpClient): PauseReferralProgramSignature;
|
|
1569
|
+
interface PauseReferralProgramSignature {
|
|
1570
|
+
/**
|
|
1571
|
+
* Pauses the referral program, changing its status to `PAUSED`.
|
|
1572
|
+
*/
|
|
1573
|
+
(): Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
|
|
1574
|
+
}
|
|
1575
|
+
declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GetAiSocialMediaPostsSuggestionsSignature;
|
|
1576
|
+
interface GetAiSocialMediaPostsSuggestionsSignature {
|
|
1577
|
+
/**
|
|
1578
|
+
* Retrieves pre-generated social media post suggestions for promoting the referral program.
|
|
1579
|
+
*/
|
|
1580
|
+
(options?: GetAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1581
|
+
}
|
|
1582
|
+
declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GenerateAiSocialMediaPostsSuggestionsSignature;
|
|
1583
|
+
interface GenerateAiSocialMediaPostsSuggestionsSignature {
|
|
1584
|
+
/**
|
|
1585
|
+
* Creates new AI-generated social media post suggestions for promoting the referral program.
|
|
1586
|
+
*/
|
|
1587
|
+
(options?: GenerateAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
|
|
1588
|
+
}
|
|
1589
|
+
declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient): GetReferralProgramPremiumFeaturesSignature;
|
|
1590
|
+
interface GetReferralProgramPremiumFeaturesSignature {
|
|
1591
|
+
/**
|
|
1592
|
+
* Retrieves information about enabled premium features for the referral program.
|
|
1593
|
+
*/
|
|
1594
|
+
(): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1528
1595
|
}
|
|
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
1596
|
declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
|
|
1539
1597
|
|
|
1540
1598
|
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -1559,6 +1617,7 @@ type _publicGetReferralProgramPremiumFeaturesType = typeof getReferralProgramPre
|
|
|
1559
1617
|
declare const getReferralProgramPremiumFeatures: ReturnType<typeof createRESTModule$4<_publicGetReferralProgramPremiumFeaturesType>>;
|
|
1560
1618
|
|
|
1561
1619
|
type _publicOnProgramUpdatedType = typeof onProgramUpdated$1;
|
|
1620
|
+
/** */
|
|
1562
1621
|
declare const onProgramUpdated: ReturnType<typeof createEventModule$3<_publicOnProgramUpdatedType>>;
|
|
1563
1622
|
|
|
1564
1623
|
type index_d$4_AISocialMediaPostSuggestion = AISocialMediaPostSuggestion;
|
|
@@ -1693,10 +1752,9 @@ declare const index_d$4_pauseReferralProgram: typeof pauseReferralProgram;
|
|
|
1693
1752
|
declare const index_d$4_queryReferralPrograms: typeof queryReferralPrograms;
|
|
1694
1753
|
declare const index_d$4_updateReferralProgram: typeof updateReferralProgram;
|
|
1695
1754
|
declare namespace index_d$4 {
|
|
1696
|
-
export { type index_d$4_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, index_d$4_Action as Action, type ActionEvent$4 as ActionEvent, type index_d$4_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type index_d$4_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type index_d$4_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, index_d$4_App as App, type index_d$4_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$4_BillingReference as BillingReference, type index_d$4_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type index_d$4_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type index_d$4_CancellationDetails as CancellationDetails, index_d$4_ContractSwitchReason as ContractSwitchReason, index_d$4_ContractSwitchType as ContractSwitchType, type index_d$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 index_d$4_Cycle as Cycle, type index_d$4_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type index_d$4_DeleteContext as DeleteContext, index_d$4_DeleteStatus as DeleteStatus, DiscountType$2 as DiscountType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type index_d$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 index_d$4_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type index_d$4_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type index_d$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type index_d$4_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type index_d$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type index_d$4_GetReferralProgramRequest as GetReferralProgramRequest, type index_d$4_GetReferralProgramResponse as GetReferralProgramResponse, type index_d$4_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$2 as Group, type index_d$4_HtmlSitePublished as HtmlSitePublished, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, index_d$4_Initiator as Initiator, type index_d$4_Interval as Interval, index_d$4_IntervalUnit as IntervalUnit, type LoyaltyPoints$2 as LoyaltyPoints, type MessageEnvelope$4 as MessageEnvelope, type index_d$4_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d$4_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d$4_Namespace as Namespace, type index_d$4_NamespaceChanged as NamespaceChanged, type index_d$4_OneTime as OneTime, type index_d$4_Page as Page, type index_d$4_PauseReferralProgramRequest as PauseReferralProgramRequest, type index_d$4_PauseReferralProgramResponse as PauseReferralProgramResponse, type index_d$4_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$2 as PercentageDiscount, type index_d$4_PremiumFeatures as PremiumFeatures, index_d$4_PriceIncreaseTrigger as PriceIncreaseTrigger, index_d$4_ProductAdjustment as ProductAdjustment, type index_d$4_ProductPriceIncreaseData as ProductPriceIncreaseData, type index_d$4_ProgramInSite as ProgramInSite, index_d$4_ProgramStatus as ProgramStatus, type index_d$4_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, index_d$4_ProviderName as ProviderName, type index_d$4_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type index_d$4_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type index_d$4_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type index_d$4_ReactivationData as ReactivationData, index_d$4_ReactivationReasonEnum as ReactivationReasonEnum, type index_d$4_RecurringChargeSucceeded as RecurringChargeSucceeded, type index_d$4_ReferralProgram as ReferralProgram, type index_d$4_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type index_d$4_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type RestoreInfo$
|
|
1755
|
+
export { type index_d$4_AISocialMediaPostSuggestion as AISocialMediaPostSuggestion, index_d$4_Action as Action, type ActionEvent$4 as ActionEvent, type index_d$4_ActivateReferralProgramRequest as ActivateReferralProgramRequest, type index_d$4_ActivateReferralProgramResponse as ActivateReferralProgramResponse, type index_d$4_ActivateReferralProgramResponseNonNullableFields as ActivateReferralProgramResponseNonNullableFields, index_d$4_App as App, type index_d$4_Asset as Asset, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$4_BillingReference as BillingReference, type index_d$4_BulkGetReferralProgramRequest as BulkGetReferralProgramRequest, type index_d$4_BulkGetReferralProgramResponse as BulkGetReferralProgramResponse, type index_d$4_CancellationDetails as CancellationDetails, index_d$4_ContractSwitchReason as ContractSwitchReason, index_d$4_ContractSwitchType as ContractSwitchType, type index_d$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 index_d$4_Cycle as Cycle, type index_d$4_CycleCycleSelectorOneOf as CycleCycleSelectorOneOf, type index_d$4_DeleteContext as DeleteContext, index_d$4_DeleteStatus as DeleteStatus, DiscountType$2 as DiscountType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type index_d$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 index_d$4_GenerateAISocialMediaPostsSuggestionsRequest as GenerateAISocialMediaPostsSuggestionsRequest, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponse as GenerateAISocialMediaPostsSuggestionsResponse, type index_d$4_GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields as GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GenerateAiSocialMediaPostsSuggestionsOptions as GenerateAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetAISocialMediaPostsSuggestionsRequest as GetAISocialMediaPostsSuggestionsRequest, type index_d$4_GetAISocialMediaPostsSuggestionsResponse as GetAISocialMediaPostsSuggestionsResponse, type index_d$4_GetAISocialMediaPostsSuggestionsResponseNonNullableFields as GetAISocialMediaPostsSuggestionsResponseNonNullableFields, type index_d$4_GetAiSocialMediaPostsSuggestionsOptions as GetAiSocialMediaPostsSuggestionsOptions, type index_d$4_GetReferralProgramPremiumFeaturesRequest as GetReferralProgramPremiumFeaturesRequest, type index_d$4_GetReferralProgramPremiumFeaturesResponse as GetReferralProgramPremiumFeaturesResponse, type index_d$4_GetReferralProgramPremiumFeaturesResponseNonNullableFields as GetReferralProgramPremiumFeaturesResponseNonNullableFields, type index_d$4_GetReferralProgramRequest as GetReferralProgramRequest, type index_d$4_GetReferralProgramResponse as GetReferralProgramResponse, type index_d$4_GetReferralProgramResponseNonNullableFields as GetReferralProgramResponseNonNullableFields, type Group$2 as Group, type index_d$4_HtmlSitePublished as HtmlSitePublished, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, index_d$4_Initiator as Initiator, type index_d$4_Interval as Interval, index_d$4_IntervalUnit as IntervalUnit, type LoyaltyPoints$2 as LoyaltyPoints, type MessageEnvelope$4 as MessageEnvelope, type index_d$4_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d$4_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d$4_Namespace as Namespace, type index_d$4_NamespaceChanged as NamespaceChanged, type index_d$4_OneTime as OneTime, type index_d$4_Page as Page, type index_d$4_PauseReferralProgramRequest as PauseReferralProgramRequest, type index_d$4_PauseReferralProgramResponse as PauseReferralProgramResponse, type index_d$4_PauseReferralProgramResponseNonNullableFields as PauseReferralProgramResponseNonNullableFields, type PercentageDiscount$2 as PercentageDiscount, type index_d$4_PremiumFeatures as PremiumFeatures, index_d$4_PriceIncreaseTrigger as PriceIncreaseTrigger, index_d$4_ProductAdjustment as ProductAdjustment, type index_d$4_ProductPriceIncreaseData as ProductPriceIncreaseData, type index_d$4_ProgramInSite as ProgramInSite, index_d$4_ProgramStatus as ProgramStatus, type index_d$4_ProgramUpdatedEnvelope as ProgramUpdatedEnvelope, index_d$4_ProviderName as ProviderName, type index_d$4_QueryReferralProgramsRequest as QueryReferralProgramsRequest, type index_d$4_QueryReferralProgramsResponse as QueryReferralProgramsResponse, type index_d$4_QueryReferralProgramsResponseNonNullableFields as QueryReferralProgramsResponseNonNullableFields, type index_d$4_ReactivationData as ReactivationData, index_d$4_ReactivationReasonEnum as ReactivationReasonEnum, type index_d$4_RecurringChargeSucceeded as RecurringChargeSucceeded, type index_d$4_ReferralProgram as ReferralProgram, type index_d$4_ReferralProgramsQueryBuilder as ReferralProgramsQueryBuilder, type index_d$4_ReferralProgramsQueryResult as ReferralProgramsQueryResult, type RestoreInfo$2 as RestoreInfo, type Reward$2 as Reward, type RewardOptionsOneOf$1 as RewardOptionsOneOf, type index_d$4_ServiceProvisioned as ServiceProvisioned, type index_d$4_ServiceRemoved as ServiceRemoved, type index_d$4_SiteCreated as SiteCreated, index_d$4_SiteCreatedContext as SiteCreatedContext, type index_d$4_SiteDeleted as SiteDeleted, type index_d$4_SiteHardDeleted as SiteHardDeleted, type index_d$4_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d$4_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d$4_SitePublished as SitePublished, type index_d$4_SiteRenamed as SiteRenamed, type index_d$4_SiteTransferred as SiteTransferred, type index_d$4_SiteUndeleted as SiteUndeleted, type index_d$4_SiteUnpublished as SiteUnpublished, SortOrder$4 as SortOrder, type Sorting$4 as Sorting, index_d$4_State as State, type index_d$4_StudioAssigned as StudioAssigned, type index_d$4_StudioUnassigned as StudioUnassigned, type index_d$4_Subscription as Subscription, type index_d$4_SubscriptionAssigned as SubscriptionAssigned, type index_d$4_SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOff, type index_d$4_SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOn, type index_d$4_SubscriptionCancelled as SubscriptionCancelled, type index_d$4_SubscriptionCreated as SubscriptionCreated, type index_d$4_SubscriptionEvent as SubscriptionEvent, type index_d$4_SubscriptionEventEventOneOf as SubscriptionEventEventOneOf, type index_d$4_SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriod, type index_d$4_SubscriptionPendingChange as SubscriptionPendingChange, index_d$4_SubscriptionStatus as SubscriptionStatus, type index_d$4_SubscriptionTransferred as SubscriptionTransferred, type index_d$4_SubscriptionUnassigned as SubscriptionUnassigned, Type$1 as Type, index_d$4_UnassignReason as UnassignReason, type index_d$4_UpdateReferralProgramRequest as UpdateReferralProgramRequest, type index_d$4_UpdateReferralProgramResponse as UpdateReferralProgramResponse, type index_d$4_UpdateReferralProgramResponseNonNullableFields as UpdateReferralProgramResponseNonNullableFields, WebhookIdentityType$4 as WebhookIdentityType, type index_d$4__publicActivateReferralProgramType as _publicActivateReferralProgramType, type index_d$4__publicGenerateAiSocialMediaPostsSuggestionsType as _publicGenerateAiSocialMediaPostsSuggestionsType, type index_d$4__publicGetAiSocialMediaPostsSuggestionsType as _publicGetAiSocialMediaPostsSuggestionsType, type index_d$4__publicGetReferralProgramPremiumFeaturesType as _publicGetReferralProgramPremiumFeaturesType, type index_d$4__publicGetReferralProgramType as _publicGetReferralProgramType, type index_d$4__publicOnProgramUpdatedType as _publicOnProgramUpdatedType, type index_d$4__publicPauseReferralProgramType as _publicPauseReferralProgramType, type index_d$4__publicQueryReferralProgramsType as _publicQueryReferralProgramsType, type index_d$4__publicUpdateReferralProgramType as _publicUpdateReferralProgramType, index_d$4_activateReferralProgram as activateReferralProgram, index_d$4_generateAiSocialMediaPostsSuggestions as generateAiSocialMediaPostsSuggestions, index_d$4_getAiSocialMediaPostsSuggestions as getAiSocialMediaPostsSuggestions, index_d$4_getReferralProgram as getReferralProgram, index_d$4_getReferralProgramPremiumFeatures as getReferralProgramPremiumFeatures, index_d$4_onProgramUpdated as onProgramUpdated, index_d$4_pauseReferralProgram as pauseReferralProgram, onProgramUpdated$1 as publicOnProgramUpdated, index_d$4_queryReferralPrograms as queryReferralPrograms, index_d$4_updateReferralProgram as updateReferralProgram };
|
|
1697
1756
|
}
|
|
1698
1757
|
|
|
1699
|
-
/** ReferralEvent. */
|
|
1700
1758
|
interface ReferralEvent extends ReferralEventEventTypeOneOf {
|
|
1701
1759
|
/** ReferredFriendSignupEvent is an event that is triggered when a referred friend signs up. */
|
|
1702
1760
|
referredFriendSignupEvent?: ReferredFriendSignupEvent;
|
|
@@ -2019,34 +2077,41 @@ interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
|
2019
2077
|
}
|
|
2020
2078
|
interface V1Coupon$1 {
|
|
2021
2079
|
/**
|
|
2022
|
-
* Coupon ID.
|
|
2080
|
+
* Coupon ID. Example: `8934b045-7052-4a90-be2b-832c70afc9da`.
|
|
2023
2081
|
* @readonly
|
|
2024
2082
|
*/
|
|
2025
2083
|
_id?: string;
|
|
2026
2084
|
/**
|
|
2027
|
-
*
|
|
2085
|
+
* The code that customers can use to apply the coupon. Example: `6RFD2A3HSPXW`.
|
|
2028
2086
|
* @readonly
|
|
2029
2087
|
*/
|
|
2030
2088
|
code?: string;
|
|
2031
2089
|
/**
|
|
2032
|
-
*
|
|
2090
|
+
* Current status of the coupon.
|
|
2091
|
+
*
|
|
2092
|
+
* Possible values:
|
|
2093
|
+
*
|
|
2094
|
+
* - `UNKNOWN`: Unknown coupon status.
|
|
2095
|
+
* - `ACTIVE`: Coupon is active and can be applied.
|
|
2096
|
+
* - `APPLIED`: Coupon was already applied and can't be used anymore.
|
|
2097
|
+
* - `DELETED`: Coupon was deleted.
|
|
2033
2098
|
* @readonly
|
|
2034
2099
|
*/
|
|
2035
2100
|
status?: Status$2;
|
|
2036
2101
|
/**
|
|
2037
|
-
*
|
|
2102
|
+
* Detailed specifications of the coupon.
|
|
2038
2103
|
* @readonly
|
|
2039
2104
|
*/
|
|
2040
2105
|
couponSpecification?: Coupon$1;
|
|
2041
2106
|
}
|
|
2042
2107
|
declare enum Status$2 {
|
|
2043
|
-
/**
|
|
2108
|
+
/** The coupon status is unknown or not specified. */
|
|
2044
2109
|
UNKNOWN = "UNKNOWN",
|
|
2045
|
-
/**
|
|
2110
|
+
/** The coupon is active and can be applied to purchases. */
|
|
2046
2111
|
ACTIVE = "ACTIVE",
|
|
2047
|
-
/**
|
|
2112
|
+
/** The coupon has been applied and can't be used again. */
|
|
2048
2113
|
APPLIED = "APPLIED",
|
|
2049
|
-
/**
|
|
2114
|
+
/** The coupon has been deleted and is no longer valid. */
|
|
2050
2115
|
DELETED = "DELETED"
|
|
2051
2116
|
}
|
|
2052
2117
|
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
@@ -2139,7 +2204,7 @@ interface LoyaltyPoints$1 {
|
|
|
2139
2204
|
*/
|
|
2140
2205
|
transactionId?: string;
|
|
2141
2206
|
/**
|
|
2142
|
-
*
|
|
2207
|
+
* The number of loyalty points awarded.
|
|
2143
2208
|
* @readonly
|
|
2144
2209
|
*/
|
|
2145
2210
|
amount?: number;
|
|
@@ -2196,7 +2261,7 @@ interface DomainEventBodyOneOf$3 {
|
|
|
2196
2261
|
interface EntityCreatedEvent$3 {
|
|
2197
2262
|
entity?: string;
|
|
2198
2263
|
}
|
|
2199
|
-
interface RestoreInfo {
|
|
2264
|
+
interface RestoreInfo$1 {
|
|
2200
2265
|
deletedDate?: Date;
|
|
2201
2266
|
}
|
|
2202
2267
|
interface EntityUpdatedEvent$3 {
|
|
@@ -2217,42 +2282,42 @@ interface ActionEvent$3 {
|
|
|
2217
2282
|
interface Empty$2 {
|
|
2218
2283
|
}
|
|
2219
2284
|
interface SuccessfulReferralEvent$2 {
|
|
2220
|
-
/**
|
|
2285
|
+
/** Details of the referred friend who completed their referral. */
|
|
2221
2286
|
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2222
2287
|
}
|
|
2223
2288
|
interface ReferredFriendDetails$2 {
|
|
2224
2289
|
/**
|
|
2225
|
-
*
|
|
2290
|
+
* ID of the referred friend.
|
|
2226
2291
|
* @readonly
|
|
2227
2292
|
*/
|
|
2228
2293
|
referredFriendId?: string;
|
|
2229
2294
|
/**
|
|
2230
|
-
*
|
|
2295
|
+
* Contact ID of the referred friend.
|
|
2231
2296
|
* @readonly
|
|
2232
2297
|
*/
|
|
2233
2298
|
contactId?: string;
|
|
2234
2299
|
/**
|
|
2235
|
-
*
|
|
2300
|
+
* ID of the customer who referred this friend.
|
|
2236
2301
|
* @readonly
|
|
2237
2302
|
*/
|
|
2238
2303
|
referringCustomerId?: string;
|
|
2239
2304
|
}
|
|
2240
2305
|
interface ReferredFriendActionEvent {
|
|
2241
|
-
/**
|
|
2306
|
+
/** Details of the referred friend. */
|
|
2242
2307
|
referredFriendDetails?: ReferredFriendDetails$2;
|
|
2243
|
-
/**
|
|
2308
|
+
/** Details of the trigger. */
|
|
2244
2309
|
trigger?: Trigger;
|
|
2245
|
-
/** Amount. */
|
|
2310
|
+
/** Amount of the referral reward. */
|
|
2246
2311
|
amount?: string | null;
|
|
2247
|
-
/** Currency. */
|
|
2312
|
+
/** Currency of the referral reward. */
|
|
2248
2313
|
currency?: string | null;
|
|
2249
|
-
/**
|
|
2314
|
+
/** ID of the order associated with the referral. */
|
|
2250
2315
|
orderId?: string | null;
|
|
2251
2316
|
}
|
|
2252
2317
|
interface Trigger {
|
|
2253
|
-
/**
|
|
2318
|
+
/** ID of the app associated with the referral activity. */
|
|
2254
2319
|
appId?: string;
|
|
2255
|
-
/**
|
|
2320
|
+
/** Type of referral activity. */
|
|
2256
2321
|
activityType?: string;
|
|
2257
2322
|
}
|
|
2258
2323
|
interface MessageEnvelope$3 {
|
|
@@ -2523,11 +2588,43 @@ interface QueryReferredFriendActionsOptions {
|
|
|
2523
2588
|
contactIds?: string[];
|
|
2524
2589
|
}
|
|
2525
2590
|
|
|
2526
|
-
declare function getReferralEvent$1(httpClient: HttpClient):
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2591
|
+
declare function getReferralEvent$1(httpClient: HttpClient): GetReferralEventSignature;
|
|
2592
|
+
interface GetReferralEventSignature {
|
|
2593
|
+
/**
|
|
2594
|
+
* Get a ReferralEvent by id.
|
|
2595
|
+
* @param - Id of the ReferralEvent to retrieve
|
|
2596
|
+
* @returns The retrieved ReferralEvent
|
|
2597
|
+
*/
|
|
2598
|
+
(referralEventId: string): Promise<ReferralEvent & ReferralEventNonNullableFields>;
|
|
2599
|
+
}
|
|
2600
|
+
declare function queryReferralEvent$1(httpClient: HttpClient): QueryReferralEventSignature;
|
|
2601
|
+
interface QueryReferralEventSignature {
|
|
2602
|
+
/**
|
|
2603
|
+
* Query ReferralEvents
|
|
2604
|
+
*/
|
|
2605
|
+
(): ReferralEventsQueryBuilder;
|
|
2606
|
+
}
|
|
2607
|
+
declare function getReferralStatistics$1(httpClient: HttpClient): GetReferralStatisticsSignature;
|
|
2608
|
+
interface GetReferralStatisticsSignature {
|
|
2609
|
+
/**
|
|
2610
|
+
* Get referral statistics.
|
|
2611
|
+
*/
|
|
2612
|
+
(): Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
|
|
2613
|
+
}
|
|
2614
|
+
declare function queryReferringCustomerTotals$1(httpClient: HttpClient): QueryReferringCustomerTotalsSignature;
|
|
2615
|
+
interface QueryReferringCustomerTotalsSignature {
|
|
2616
|
+
/**
|
|
2617
|
+
* Query referring customer totals.
|
|
2618
|
+
*/
|
|
2619
|
+
(options?: QueryReferringCustomerTotalsOptions | undefined): Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
|
|
2620
|
+
}
|
|
2621
|
+
declare function queryReferredFriendActions$1(httpClient: HttpClient): QueryReferredFriendActionsSignature;
|
|
2622
|
+
interface QueryReferredFriendActionsSignature {
|
|
2623
|
+
/**
|
|
2624
|
+
* Query referred friend actions.
|
|
2625
|
+
*/
|
|
2626
|
+
(options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
|
|
2627
|
+
}
|
|
2531
2628
|
declare const onReferralEventCreated$1: EventDefinition<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
|
|
2532
2629
|
|
|
2533
2630
|
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -2546,6 +2643,7 @@ type _publicQueryReferredFriendActionsType = typeof queryReferredFriendActions$1
|
|
|
2546
2643
|
declare const queryReferredFriendActions: ReturnType<typeof createRESTModule$3<_publicQueryReferredFriendActionsType>>;
|
|
2547
2644
|
|
|
2548
2645
|
type _publicOnReferralEventCreatedType = typeof onReferralEventCreated$1;
|
|
2646
|
+
/** */
|
|
2549
2647
|
declare const onReferralEventCreated: ReturnType<typeof createEventModule$2<_publicOnReferralEventCreatedType>>;
|
|
2550
2648
|
|
|
2551
2649
|
type index_d$3_CreateReferralEventRequest = CreateReferralEventRequest;
|
|
@@ -2578,7 +2676,6 @@ type index_d$3_ReferredFriendActionEvent = ReferredFriendActionEvent;
|
|
|
2578
2676
|
type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf = ReferredFriendActionRewardTypeOptionsOneOf;
|
|
2579
2677
|
type index_d$3_ReferredFriendSignupEvent = ReferredFriendSignupEvent;
|
|
2580
2678
|
type index_d$3_ReferringCustomerTotal = ReferringCustomerTotal;
|
|
2581
|
-
type index_d$3_RestoreInfo = RestoreInfo;
|
|
2582
2679
|
type index_d$3_RewardEvent = RewardEvent;
|
|
2583
2680
|
type index_d$3_RewardEventReceiverOneOf = RewardEventReceiverOneOf;
|
|
2584
2681
|
type index_d$3_Trigger = Trigger;
|
|
@@ -2598,7 +2695,7 @@ declare const index_d$3_queryReferralEvent: typeof queryReferralEvent;
|
|
|
2598
2695
|
declare const index_d$3_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
2599
2696
|
declare const index_d$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
2600
2697
|
declare namespace index_d$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 index_d$3_CreateReferralEventRequest as CreateReferralEventRequest, type index_d$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 index_d$3_GetReferralEventRequest as GetReferralEventRequest, type index_d$3_GetReferralEventResponse as GetReferralEventResponse, type index_d$3_GetReferralEventResponseNonNullableFields as GetReferralEventResponseNonNullableFields, type index_d$3_GetReferralStatisticsRequest as GetReferralStatisticsRequest, type index_d$3_GetReferralStatisticsResponse as GetReferralStatisticsResponse, type index_d$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 index_d$3_QueryReferralEventRequest as QueryReferralEventRequest, type index_d$3_QueryReferralEventResponse as QueryReferralEventResponse, type index_d$3_QueryReferralEventResponseNonNullableFields as QueryReferralEventResponseNonNullableFields, type index_d$3_QueryReferredFriendActionsOptions as QueryReferredFriendActionsOptions, type index_d$3_QueryReferredFriendActionsRequest as QueryReferredFriendActionsRequest, type index_d$3_QueryReferredFriendActionsResponse as QueryReferredFriendActionsResponse, type index_d$3_QueryReferredFriendActionsResponseNonNullableFields as QueryReferredFriendActionsResponseNonNullableFields, type index_d$3_QueryReferringCustomerTotalsOptions as QueryReferringCustomerTotalsOptions, type index_d$3_QueryReferringCustomerTotalsRequest as QueryReferringCustomerTotalsRequest, type index_d$3_QueryReferringCustomerTotalsResponse as QueryReferringCustomerTotalsResponse, type index_d$3_QueryReferringCustomerTotalsResponseNonNullableFields as QueryReferringCustomerTotalsResponseNonNullableFields, type index_d$3_ReferralEvent as ReferralEvent, type index_d$3_ReferralEventCreatedEnvelope as ReferralEventCreatedEnvelope, type index_d$3_ReferralEventEventTypeOneOf as ReferralEventEventTypeOneOf, type index_d$3_ReferralEventNonNullableFields as ReferralEventNonNullableFields, type index_d$3_ReferralEventsQueryBuilder as ReferralEventsQueryBuilder, type index_d$3_ReferralEventsQueryResult as ReferralEventsQueryResult, type index_d$3_ReferredFriendAction as ReferredFriendAction, type index_d$3_ReferredFriendActionEvent as ReferredFriendActionEvent, type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf as ReferredFriendActionRewardTypeOptionsOneOf, type ReferredFriendDetails$2 as ReferredFriendDetails, type index_d$3_ReferredFriendSignupEvent as ReferredFriendSignupEvent, type index_d$3_ReferringCustomerTotal as ReferringCustomerTotal, type
|
|
2698
|
+
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 index_d$3_CreateReferralEventRequest as CreateReferralEventRequest, type index_d$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 index_d$3_GetReferralEventRequest as GetReferralEventRequest, type index_d$3_GetReferralEventResponse as GetReferralEventResponse, type index_d$3_GetReferralEventResponseNonNullableFields as GetReferralEventResponseNonNullableFields, type index_d$3_GetReferralStatisticsRequest as GetReferralStatisticsRequest, type index_d$3_GetReferralStatisticsResponse as GetReferralStatisticsResponse, type index_d$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 index_d$3_QueryReferralEventRequest as QueryReferralEventRequest, type index_d$3_QueryReferralEventResponse as QueryReferralEventResponse, type index_d$3_QueryReferralEventResponseNonNullableFields as QueryReferralEventResponseNonNullableFields, type index_d$3_QueryReferredFriendActionsOptions as QueryReferredFriendActionsOptions, type index_d$3_QueryReferredFriendActionsRequest as QueryReferredFriendActionsRequest, type index_d$3_QueryReferredFriendActionsResponse as QueryReferredFriendActionsResponse, type index_d$3_QueryReferredFriendActionsResponseNonNullableFields as QueryReferredFriendActionsResponseNonNullableFields, type index_d$3_QueryReferringCustomerTotalsOptions as QueryReferringCustomerTotalsOptions, type index_d$3_QueryReferringCustomerTotalsRequest as QueryReferringCustomerTotalsRequest, type index_d$3_QueryReferringCustomerTotalsResponse as QueryReferringCustomerTotalsResponse, type index_d$3_QueryReferringCustomerTotalsResponseNonNullableFields as QueryReferringCustomerTotalsResponseNonNullableFields, type index_d$3_ReferralEvent as ReferralEvent, type index_d$3_ReferralEventCreatedEnvelope as ReferralEventCreatedEnvelope, type index_d$3_ReferralEventEventTypeOneOf as ReferralEventEventTypeOneOf, type index_d$3_ReferralEventNonNullableFields as ReferralEventNonNullableFields, type index_d$3_ReferralEventsQueryBuilder as ReferralEventsQueryBuilder, type index_d$3_ReferralEventsQueryResult as ReferralEventsQueryResult, type index_d$3_ReferredFriendAction as ReferredFriendAction, type index_d$3_ReferredFriendActionEvent as ReferredFriendActionEvent, type index_d$3_ReferredFriendActionRewardTypeOptionsOneOf as ReferredFriendActionRewardTypeOptionsOneOf, type ReferredFriendDetails$2 as ReferredFriendDetails, type index_d$3_ReferredFriendSignupEvent as ReferredFriendSignupEvent, type index_d$3_ReferringCustomerTotal as ReferringCustomerTotal, type RestoreInfo$1 as RestoreInfo, Reward$1 as Reward, type index_d$3_RewardEvent as RewardEvent, type index_d$3_RewardEventReceiverOneOf as RewardEventReceiverOneOf, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, Status$2 as Status, type SuccessfulReferralEvent$2 as SuccessfulReferralEvent, type index_d$3_Trigger as Trigger, type index_d$3_V1ActionEvent as V1ActionEvent, type V1Coupon$1 as V1Coupon, type index_d$3_V1SuccessfulReferralEvent as V1SuccessfulReferralEvent, type index_d$3_V1Trigger as V1Trigger, WebhookIdentityType$3 as WebhookIdentityType, type index_d$3__publicGetReferralEventType as _publicGetReferralEventType, type index_d$3__publicGetReferralStatisticsType as _publicGetReferralStatisticsType, type index_d$3__publicOnReferralEventCreatedType as _publicOnReferralEventCreatedType, type index_d$3__publicQueryReferralEventType as _publicQueryReferralEventType, type index_d$3__publicQueryReferredFriendActionsType as _publicQueryReferredFriendActionsType, type index_d$3__publicQueryReferringCustomerTotalsType as _publicQueryReferringCustomerTotalsType, index_d$3_getReferralEvent as getReferralEvent, index_d$3_getReferralStatistics as getReferralStatistics, index_d$3_onReferralEventCreated as onReferralEventCreated, onReferralEventCreated$1 as publicOnReferralEventCreated, index_d$3_queryReferralEvent as queryReferralEvent, index_d$3_queryReferredFriendActions as queryReferredFriendActions, index_d$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
|
|
2602
2699
|
}
|
|
2603
2700
|
|
|
2604
2701
|
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
@@ -2950,7 +3047,7 @@ interface DomainEventBodyOneOf$2 {
|
|
|
2950
3047
|
interface EntityCreatedEvent$2 {
|
|
2951
3048
|
entity?: string;
|
|
2952
3049
|
}
|
|
2953
|
-
interface UndeleteInfo$
|
|
3050
|
+
interface UndeleteInfo$1 {
|
|
2954
3051
|
deletedDate?: Date;
|
|
2955
3052
|
}
|
|
2956
3053
|
interface EntityUpdatedEvent$2 {
|
|
@@ -3080,8 +3177,26 @@ interface QueryReferralRewardsOptions {
|
|
|
3080
3177
|
contactId?: string | null;
|
|
3081
3178
|
}
|
|
3082
3179
|
|
|
3083
|
-
declare function getReferralReward$1(httpClient: HttpClient):
|
|
3084
|
-
|
|
3180
|
+
declare function getReferralReward$1(httpClient: HttpClient): GetReferralRewardSignature;
|
|
3181
|
+
interface GetReferralRewardSignature {
|
|
3182
|
+
/**
|
|
3183
|
+
* Get a ReferralReward by id.
|
|
3184
|
+
* @param - Id of the ReferralReward to retrieve.
|
|
3185
|
+
* @returns The retrieved ReferralReward.
|
|
3186
|
+
*/
|
|
3187
|
+
(_id: string): Promise<ReferralReward & ReferralRewardNonNullableFields>;
|
|
3188
|
+
}
|
|
3189
|
+
declare function queryReferralRewards$1(httpClient: HttpClient): QueryReferralRewardsSignature;
|
|
3190
|
+
interface QueryReferralRewardsSignature {
|
|
3191
|
+
/**
|
|
3192
|
+
* Query ReferralRewards.
|
|
3193
|
+
*
|
|
3194
|
+
* Can be filtered by `contact_id`. If it's set to `me` current identity's rewards are returned.
|
|
3195
|
+
* Supports filtering on `owner_type`, `reward_type` fields.
|
|
3196
|
+
* @param - Query to filter ReferralRewards.
|
|
3197
|
+
*/
|
|
3198
|
+
(query: CursorQuery$2, options?: QueryReferralRewardsOptions | undefined): Promise<QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields>;
|
|
3199
|
+
}
|
|
3085
3200
|
|
|
3086
3201
|
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
3087
3202
|
|
|
@@ -3129,10 +3244,9 @@ type index_d$2__publicQueryReferralRewardsType = _publicQueryReferralRewardsType
|
|
|
3129
3244
|
declare const index_d$2_getReferralReward: typeof getReferralReward;
|
|
3130
3245
|
declare const index_d$2_queryReferralRewards: typeof queryReferralRewards;
|
|
3131
3246
|
declare namespace index_d$2 {
|
|
3132
|
-
export { type ActionEvent$2 as ActionEvent, type index_d$2_BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest, type index_d$2_BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse, type index_d$2_Coupon as Coupon, type index_d$2_CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOf, type index_d$2_CouponScope as CouponScope, type index_d$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, index_d$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 index_d$2_FixedAmountDiscount as FixedAmountDiscount, type index_d$2_GetReferralRewardRequest as GetReferralRewardRequest, type index_d$2_GetReferralRewardResponse as GetReferralRewardResponse, type index_d$2_GetReferralRewardResponseNonNullableFields as GetReferralRewardResponseNonNullableFields, type index_d$2_Group as Group, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$2_LoyaltyPoints as LoyaltyPoints, type MessageEnvelope$2 as MessageEnvelope, type index_d$2_PercentageDiscount as PercentageDiscount, type index_d$2_QueryReferralRewardsOptions as QueryReferralRewardsOptions, type index_d$2_QueryReferralRewardsRequest as QueryReferralRewardsRequest, type index_d$2_QueryReferralRewardsResponse as QueryReferralRewardsResponse, type index_d$2_QueryReferralRewardsResponseNonNullableFields as QueryReferralRewardsResponseNonNullableFields, type index_d$2_ReferralReward as ReferralReward, type index_d$2_ReferralRewardNonNullableFields as ReferralRewardNonNullableFields, type index_d$2_ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOf, type index_d$2_ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOf, type ReferredFriendDetails$1 as ReferredFriendDetails, type index_d$2_Reward as Reward, type index_d$2_RewardOptionsOneOf as RewardOptionsOneOf, index_d$2_RewardTypeType as RewardTypeType, type index_d$2_RewardsInSite as RewardsInSite, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, Status$1 as Status, type SuccessfulReferralEvent$1 as SuccessfulReferralEvent, index_d$2_Type as Type, type UndeleteInfo$
|
|
3247
|
+
export { type ActionEvent$2 as ActionEvent, type index_d$2_BulkGetReferralRewardsRequest as BulkGetReferralRewardsRequest, type index_d$2_BulkGetReferralRewardsResponse as BulkGetReferralRewardsResponse, type index_d$2_Coupon as Coupon, type index_d$2_CouponDiscountTypeOptionsOneOf as CouponDiscountTypeOptionsOneOf, type index_d$2_CouponScope as CouponScope, type index_d$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, index_d$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 index_d$2_FixedAmountDiscount as FixedAmountDiscount, type index_d$2_GetReferralRewardRequest as GetReferralRewardRequest, type index_d$2_GetReferralRewardResponse as GetReferralRewardResponse, type index_d$2_GetReferralRewardResponseNonNullableFields as GetReferralRewardResponseNonNullableFields, type index_d$2_Group as Group, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$2_LoyaltyPoints as LoyaltyPoints, type MessageEnvelope$2 as MessageEnvelope, type index_d$2_PercentageDiscount as PercentageDiscount, type index_d$2_QueryReferralRewardsOptions as QueryReferralRewardsOptions, type index_d$2_QueryReferralRewardsRequest as QueryReferralRewardsRequest, type index_d$2_QueryReferralRewardsResponse as QueryReferralRewardsResponse, type index_d$2_QueryReferralRewardsResponseNonNullableFields as QueryReferralRewardsResponseNonNullableFields, type index_d$2_ReferralReward as ReferralReward, type index_d$2_ReferralRewardNonNullableFields as ReferralRewardNonNullableFields, type index_d$2_ReferralRewardReceiverOneOf as ReferralRewardReceiverOneOf, type index_d$2_ReferralRewardRewardTypeOptionsOneOf as ReferralRewardRewardTypeOptionsOneOf, type ReferredFriendDetails$1 as ReferredFriendDetails, type index_d$2_Reward as Reward, type index_d$2_RewardOptionsOneOf as RewardOptionsOneOf, index_d$2_RewardTypeType as RewardTypeType, type index_d$2_RewardsInSite as RewardsInSite, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, Status$1 as Status, type SuccessfulReferralEvent$1 as SuccessfulReferralEvent, index_d$2_Type as Type, type UndeleteInfo$1 as UndeleteInfo, type index_d$2_V1Coupon as V1Coupon, type index_d$2_V1LoyaltyPoints as V1LoyaltyPoints, type index_d$2_ValidateReferralRewardRequest as ValidateReferralRewardRequest, type index_d$2_ValidateReferralRewardResponse as ValidateReferralRewardResponse, WebhookIdentityType$2 as WebhookIdentityType, type index_d$2__publicGetReferralRewardType as _publicGetReferralRewardType, type index_d$2__publicQueryReferralRewardsType as _publicQueryReferralRewardsType, index_d$2_getReferralReward as getReferralReward, index_d$2_queryReferralRewards as queryReferralRewards };
|
|
3133
3248
|
}
|
|
3134
3249
|
|
|
3135
|
-
/** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
|
|
3136
3250
|
interface ReferredFriend {
|
|
3137
3251
|
/**
|
|
3138
3252
|
* ReferredFriend ID.
|
|
@@ -3176,6 +3290,8 @@ declare enum Status {
|
|
|
3176
3290
|
ACTIONS_COMPLETED = "ACTIONS_COMPLETED"
|
|
3177
3291
|
}
|
|
3178
3292
|
interface CreateReferredFriendRequest {
|
|
3293
|
+
/** Referral code for referred friend */
|
|
3294
|
+
referralCode?: string | null;
|
|
3179
3295
|
}
|
|
3180
3296
|
interface CreateReferredFriendResponse {
|
|
3181
3297
|
/** The created ReferredFriend. */
|
|
@@ -3218,26 +3334,32 @@ interface QueryReferredFriendRequest {
|
|
|
3218
3334
|
query: CursorQuery$1;
|
|
3219
3335
|
}
|
|
3220
3336
|
interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
|
|
3221
|
-
/**
|
|
3337
|
+
/**
|
|
3338
|
+
* Cursor paging options.
|
|
3339
|
+
*
|
|
3340
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3341
|
+
*/
|
|
3222
3342
|
cursorPaging?: CursorPaging$1;
|
|
3223
3343
|
/**
|
|
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`
|
|
3344
|
+
* Filter object.
|
|
3345
|
+
*
|
|
3346
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3230
3347
|
*/
|
|
3231
3348
|
filter?: Record<string, any> | null;
|
|
3232
3349
|
/**
|
|
3233
|
-
* Sort object
|
|
3234
|
-
*
|
|
3350
|
+
* Sort object.
|
|
3351
|
+
*
|
|
3352
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3235
3353
|
*/
|
|
3236
3354
|
sort?: Sorting$1[];
|
|
3237
3355
|
}
|
|
3238
3356
|
/** @oneof */
|
|
3239
3357
|
interface CursorQueryPagingMethodOneOf$1 {
|
|
3240
|
-
/**
|
|
3358
|
+
/**
|
|
3359
|
+
* Cursor paging options.
|
|
3360
|
+
*
|
|
3361
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
3362
|
+
*/
|
|
3241
3363
|
cursorPaging?: CursorPaging$1;
|
|
3242
3364
|
}
|
|
3243
3365
|
interface Sorting$1 {
|
|
@@ -3268,7 +3390,7 @@ interface QueryReferredFriendResponse {
|
|
|
3268
3390
|
metadata?: CursorPagingMetadata$1;
|
|
3269
3391
|
}
|
|
3270
3392
|
interface CursorPagingMetadata$1 {
|
|
3271
|
-
/** Number of items returned in
|
|
3393
|
+
/** Number of items returned in current page. */
|
|
3272
3394
|
count?: number | null;
|
|
3273
3395
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
3274
3396
|
cursors?: Cursors$1;
|
|
@@ -3309,7 +3431,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
3309
3431
|
slug?: string;
|
|
3310
3432
|
/** ID of the entity associated with the event. */
|
|
3311
3433
|
entityId?: string;
|
|
3312
|
-
/** Event timestamp. */
|
|
3434
|
+
/** 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
3435
|
eventTime?: Date;
|
|
3314
3436
|
/**
|
|
3315
3437
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -3338,7 +3460,7 @@ interface DomainEventBodyOneOf$1 {
|
|
|
3338
3460
|
interface EntityCreatedEvent$1 {
|
|
3339
3461
|
entity?: string;
|
|
3340
3462
|
}
|
|
3341
|
-
interface
|
|
3463
|
+
interface RestoreInfo {
|
|
3342
3464
|
deletedDate?: Date;
|
|
3343
3465
|
}
|
|
3344
3466
|
interface EntityUpdatedEvent$1 {
|
|
@@ -3359,22 +3481,22 @@ interface ActionEvent$1 {
|
|
|
3359
3481
|
interface Empty {
|
|
3360
3482
|
}
|
|
3361
3483
|
interface SuccessfulReferralEvent {
|
|
3362
|
-
/**
|
|
3484
|
+
/** Details of the referred friend who completed their referral. */
|
|
3363
3485
|
referredFriendDetails?: ReferredFriendDetails;
|
|
3364
3486
|
}
|
|
3365
3487
|
interface ReferredFriendDetails {
|
|
3366
3488
|
/**
|
|
3367
|
-
*
|
|
3489
|
+
* ID of the referred friend.
|
|
3368
3490
|
* @readonly
|
|
3369
3491
|
*/
|
|
3370
3492
|
referredFriendId?: string;
|
|
3371
3493
|
/**
|
|
3372
|
-
*
|
|
3494
|
+
* Contact ID of the referred friend.
|
|
3373
3495
|
* @readonly
|
|
3374
3496
|
*/
|
|
3375
3497
|
contactId?: string;
|
|
3376
3498
|
/**
|
|
3377
|
-
*
|
|
3499
|
+
* ID of the customer who referred this friend.
|
|
3378
3500
|
* @readonly
|
|
3379
3501
|
*/
|
|
3380
3502
|
referringCustomerId?: string;
|
|
@@ -3467,7 +3589,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
3467
3589
|
slug?: string;
|
|
3468
3590
|
/** ID of the entity associated with the event. */
|
|
3469
3591
|
entityId?: string;
|
|
3470
|
-
/** Event timestamp. */
|
|
3592
|
+
/** 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
3593
|
eventTime?: Date;
|
|
3472
3594
|
/**
|
|
3473
3595
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -3497,6 +3619,10 @@ interface ReferredFriendUpdatedEnvelope {
|
|
|
3497
3619
|
interface ReferredFriendDeletedEnvelope {
|
|
3498
3620
|
metadata: EventMetadata$1;
|
|
3499
3621
|
}
|
|
3622
|
+
interface CreateReferredFriendOptions {
|
|
3623
|
+
/** Referral code for referred friend */
|
|
3624
|
+
referralCode?: string | null;
|
|
3625
|
+
}
|
|
3500
3626
|
interface UpdateReferredFriend {
|
|
3501
3627
|
/**
|
|
3502
3628
|
* ReferredFriend ID.
|
|
@@ -3613,12 +3739,62 @@ interface ReferredFriendsQueryBuilder {
|
|
|
3613
3739
|
find: () => Promise<ReferredFriendsQueryResult>;
|
|
3614
3740
|
}
|
|
3615
3741
|
|
|
3616
|
-
declare function createReferredFriend$1(httpClient: HttpClient):
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3742
|
+
declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
|
|
3743
|
+
interface CreateReferredFriendSignature {
|
|
3744
|
+
/**
|
|
3745
|
+
* Try to create the ReferredFriend or return existing entity if it already exists.
|
|
3746
|
+
*
|
|
3747
|
+
* Must be called with member identity.
|
|
3748
|
+
* Referral code must be provided either in the request or via scope.
|
|
3749
|
+
* Member must be eligible to become referred friend.
|
|
3750
|
+
*/
|
|
3751
|
+
(options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
|
|
3752
|
+
}
|
|
3753
|
+
declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
|
|
3754
|
+
interface GetReferredFriendSignature {
|
|
3755
|
+
/**
|
|
3756
|
+
* Get a ReferredFriend by id.
|
|
3757
|
+
* @param - Id of the ReferredFriend to retrieve.
|
|
3758
|
+
*/
|
|
3759
|
+
(referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
|
|
3760
|
+
}
|
|
3761
|
+
declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
|
|
3762
|
+
interface GetReferredFriendByContactIdSignature {
|
|
3763
|
+
/**
|
|
3764
|
+
* Get a ReferredFriend by contactId.
|
|
3765
|
+
*
|
|
3766
|
+
* You can provide "me" instead of specific contact id to get referring friend for current identity's contact.
|
|
3767
|
+
* @param - Contact id or "me" to get current identity's Contact.
|
|
3768
|
+
* @returns The retrieved ReferredFriend.
|
|
3769
|
+
*/
|
|
3770
|
+
(contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3771
|
+
}
|
|
3772
|
+
declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
|
|
3773
|
+
interface UpdateReferredFriendSignature {
|
|
3774
|
+
/**
|
|
3775
|
+
* Update a ReferredFriend, supports partial update.
|
|
3776
|
+
*
|
|
3777
|
+
* Pass the latest `revision` for a successful update.
|
|
3778
|
+
* @param - ReferredFriend ID.
|
|
3779
|
+
* @returns The updated ReferredFriend.
|
|
3780
|
+
*/
|
|
3781
|
+
(_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
|
|
3782
|
+
}
|
|
3783
|
+
declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
|
|
3784
|
+
interface DeleteReferredFriendSignature {
|
|
3785
|
+
/**
|
|
3786
|
+
* Delete a ReferredFriend.
|
|
3787
|
+
* @param - Id of the ReferredFriend to delete.
|
|
3788
|
+
*/
|
|
3789
|
+
(referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
|
|
3790
|
+
}
|
|
3791
|
+
declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
|
|
3792
|
+
interface QueryReferredFriendSignature {
|
|
3793
|
+
/**
|
|
3794
|
+
* Query ReferredFriends using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
3795
|
+
*/
|
|
3796
|
+
(): ReferredFriendsQueryBuilder;
|
|
3797
|
+
}
|
|
3622
3798
|
declare const onReferredFriendCreated$1: EventDefinition<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
|
|
3623
3799
|
declare const onReferredFriendUpdated$1: EventDefinition<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
|
|
3624
3800
|
declare const onReferredFriendDeleted$1: EventDefinition<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
|
|
@@ -3641,14 +3817,18 @@ type _publicQueryReferredFriendType = typeof queryReferredFriend$1;
|
|
|
3641
3817
|
declare const queryReferredFriend: ReturnType<typeof createRESTModule$1<_publicQueryReferredFriendType>>;
|
|
3642
3818
|
|
|
3643
3819
|
type _publicOnReferredFriendCreatedType = typeof onReferredFriendCreated$1;
|
|
3820
|
+
/** */
|
|
3644
3821
|
declare const onReferredFriendCreated: ReturnType<typeof createEventModule$1<_publicOnReferredFriendCreatedType>>;
|
|
3645
3822
|
|
|
3646
3823
|
type _publicOnReferredFriendUpdatedType = typeof onReferredFriendUpdated$1;
|
|
3824
|
+
/** */
|
|
3647
3825
|
declare const onReferredFriendUpdated: ReturnType<typeof createEventModule$1<_publicOnReferredFriendUpdatedType>>;
|
|
3648
3826
|
|
|
3649
3827
|
type _publicOnReferredFriendDeletedType = typeof onReferredFriendDeleted$1;
|
|
3828
|
+
/** */
|
|
3650
3829
|
declare const onReferredFriendDeleted: ReturnType<typeof createEventModule$1<_publicOnReferredFriendDeletedType>>;
|
|
3651
3830
|
|
|
3831
|
+
type index_d$1_CreateReferredFriendOptions = CreateReferredFriendOptions;
|
|
3652
3832
|
type index_d$1_CreateReferredFriendRequest = CreateReferredFriendRequest;
|
|
3653
3833
|
type index_d$1_CreateReferredFriendResponse = CreateReferredFriendResponse;
|
|
3654
3834
|
type index_d$1_CreateReferredFriendResponseNonNullableFields = CreateReferredFriendResponseNonNullableFields;
|
|
@@ -3673,6 +3853,7 @@ type index_d$1_ReferredFriendNonNullableFields = ReferredFriendNonNullableFields
|
|
|
3673
3853
|
type index_d$1_ReferredFriendUpdatedEnvelope = ReferredFriendUpdatedEnvelope;
|
|
3674
3854
|
type index_d$1_ReferredFriendsQueryBuilder = ReferredFriendsQueryBuilder;
|
|
3675
3855
|
type index_d$1_ReferredFriendsQueryResult = ReferredFriendsQueryResult;
|
|
3856
|
+
type index_d$1_RestoreInfo = RestoreInfo;
|
|
3676
3857
|
type index_d$1_Status = Status;
|
|
3677
3858
|
declare const index_d$1_Status: typeof Status;
|
|
3678
3859
|
type index_d$1_SuccessfulReferralEvent = SuccessfulReferralEvent;
|
|
@@ -3699,7 +3880,7 @@ declare const index_d$1_onReferredFriendUpdated: typeof onReferredFriendUpdated;
|
|
|
3699
3880
|
declare const index_d$1_queryReferredFriend: typeof queryReferredFriend;
|
|
3700
3881
|
declare const index_d$1_updateReferredFriend: typeof updateReferredFriend;
|
|
3701
3882
|
declare namespace index_d$1 {
|
|
3702
|
-
export { type ActionEvent$1 as ActionEvent, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_CreateReferredFriendRequest as CreateReferredFriendRequest, type index_d$1_CreateReferredFriendResponse as CreateReferredFriendResponse, type index_d$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 index_d$1_DeleteReferredFriendOptions as DeleteReferredFriendOptions, type index_d$1_DeleteReferredFriendRequest as DeleteReferredFriendRequest, type index_d$1_DeleteReferredFriendResponse as DeleteReferredFriendResponse, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$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 index_d$1_GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequest, type index_d$1_GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponse, type index_d$1_GetReferredFriendByContactIdResponseNonNullableFields as GetReferredFriendByContactIdResponseNonNullableFields, type index_d$1_GetReferredFriendRequest as GetReferredFriendRequest, type index_d$1_GetReferredFriendResponse as GetReferredFriendResponse, type index_d$1_GetReferredFriendResponseNonNullableFields as GetReferredFriendResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_QueryReferredFriendRequest as QueryReferredFriendRequest, type index_d$1_QueryReferredFriendResponse as QueryReferredFriendResponse, type index_d$1_QueryReferredFriendResponseNonNullableFields as QueryReferredFriendResponseNonNullableFields, type index_d$1_ReferredFriend as ReferredFriend, type index_d$1_ReferredFriendCreatedEnvelope as ReferredFriendCreatedEnvelope, type index_d$1_ReferredFriendDeletedEnvelope as ReferredFriendDeletedEnvelope, type index_d$1_ReferredFriendDetails as ReferredFriendDetails, type index_d$1_ReferredFriendNonNullableFields as ReferredFriendNonNullableFields, type index_d$1_ReferredFriendUpdatedEnvelope as ReferredFriendUpdatedEnvelope, type index_d$1_ReferredFriendsQueryBuilder as ReferredFriendsQueryBuilder, type index_d$1_ReferredFriendsQueryResult as ReferredFriendsQueryResult, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, index_d$1_Status as Status, type index_d$1_SuccessfulReferralEvent as SuccessfulReferralEvent, type
|
|
3883
|
+
export { type ActionEvent$1 as ActionEvent, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_CreateReferredFriendOptions as CreateReferredFriendOptions, type index_d$1_CreateReferredFriendRequest as CreateReferredFriendRequest, type index_d$1_CreateReferredFriendResponse as CreateReferredFriendResponse, type index_d$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 index_d$1_DeleteReferredFriendOptions as DeleteReferredFriendOptions, type index_d$1_DeleteReferredFriendRequest as DeleteReferredFriendRequest, type index_d$1_DeleteReferredFriendResponse as DeleteReferredFriendResponse, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$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 index_d$1_GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequest, type index_d$1_GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponse, type index_d$1_GetReferredFriendByContactIdResponseNonNullableFields as GetReferredFriendByContactIdResponseNonNullableFields, type index_d$1_GetReferredFriendRequest as GetReferredFriendRequest, type index_d$1_GetReferredFriendResponse as GetReferredFriendResponse, type index_d$1_GetReferredFriendResponseNonNullableFields as GetReferredFriendResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_QueryReferredFriendRequest as QueryReferredFriendRequest, type index_d$1_QueryReferredFriendResponse as QueryReferredFriendResponse, type index_d$1_QueryReferredFriendResponseNonNullableFields as QueryReferredFriendResponseNonNullableFields, type index_d$1_ReferredFriend as ReferredFriend, type index_d$1_ReferredFriendCreatedEnvelope as ReferredFriendCreatedEnvelope, type index_d$1_ReferredFriendDeletedEnvelope as ReferredFriendDeletedEnvelope, type index_d$1_ReferredFriendDetails as ReferredFriendDetails, type index_d$1_ReferredFriendNonNullableFields as ReferredFriendNonNullableFields, type index_d$1_ReferredFriendUpdatedEnvelope as ReferredFriendUpdatedEnvelope, type index_d$1_ReferredFriendsQueryBuilder as ReferredFriendsQueryBuilder, type index_d$1_ReferredFriendsQueryResult as ReferredFriendsQueryResult, type index_d$1_RestoreInfo as RestoreInfo, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, index_d$1_Status as Status, type index_d$1_SuccessfulReferralEvent as SuccessfulReferralEvent, type index_d$1_UpdateReferredFriend as UpdateReferredFriend, type index_d$1_UpdateReferredFriendRequest as UpdateReferredFriendRequest, type index_d$1_UpdateReferredFriendResponse as UpdateReferredFriendResponse, type index_d$1_UpdateReferredFriendResponseNonNullableFields as UpdateReferredFriendResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type index_d$1__publicCreateReferredFriendType as _publicCreateReferredFriendType, type index_d$1__publicDeleteReferredFriendType as _publicDeleteReferredFriendType, type index_d$1__publicGetReferredFriendByContactIdType as _publicGetReferredFriendByContactIdType, type index_d$1__publicGetReferredFriendType as _publicGetReferredFriendType, type index_d$1__publicOnReferredFriendCreatedType as _publicOnReferredFriendCreatedType, type index_d$1__publicOnReferredFriendDeletedType as _publicOnReferredFriendDeletedType, type index_d$1__publicOnReferredFriendUpdatedType as _publicOnReferredFriendUpdatedType, type index_d$1__publicQueryReferredFriendType as _publicQueryReferredFriendType, type index_d$1__publicUpdateReferredFriendType as _publicUpdateReferredFriendType, index_d$1_createReferredFriend as createReferredFriend, index_d$1_deleteReferredFriend as deleteReferredFriend, index_d$1_getReferredFriend as getReferredFriend, index_d$1_getReferredFriendByContactId as getReferredFriendByContactId, index_d$1_onReferredFriendCreated as onReferredFriendCreated, index_d$1_onReferredFriendDeleted as onReferredFriendDeleted, index_d$1_onReferredFriendUpdated as onReferredFriendUpdated, onReferredFriendCreated$1 as publicOnReferredFriendCreated, onReferredFriendDeleted$1 as publicOnReferredFriendDeleted, onReferredFriendUpdated$1 as publicOnReferredFriendUpdated, index_d$1_queryReferredFriend as queryReferredFriend, index_d$1_updateReferredFriend as updateReferredFriend };
|
|
3703
3884
|
}
|
|
3704
3885
|
|
|
3705
3886
|
/** ReferringCustomer is the main entity of ReferringCustomers. */
|
|
@@ -4099,11 +4280,52 @@ interface DeleteReferringCustomerOptions {
|
|
|
4099
4280
|
revision?: string;
|
|
4100
4281
|
}
|
|
4101
4282
|
|
|
4102
|
-
declare function generateReferringCustomerForContact$1(httpClient: HttpClient):
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4283
|
+
declare function generateReferringCustomerForContact$1(httpClient: HttpClient): GenerateReferringCustomerForContactSignature;
|
|
4284
|
+
interface GenerateReferringCustomerForContactSignature {
|
|
4285
|
+
/**
|
|
4286
|
+
* Creates a new or returns existing ReferringCustomer for provided contact id.
|
|
4287
|
+
*
|
|
4288
|
+
* You can provide "me" instead of specific contact id to generate referring customer for current identity's contact.
|
|
4289
|
+
* @param - Contact id or "me" to generate current identity's referring customer.
|
|
4290
|
+
*/
|
|
4291
|
+
(contactId: string): Promise<GenerateReferringCustomerForContactResponse & GenerateReferringCustomerForContactResponseNonNullableFields>;
|
|
4292
|
+
}
|
|
4293
|
+
declare function getReferringCustomer$1(httpClient: HttpClient): GetReferringCustomerSignature;
|
|
4294
|
+
interface GetReferringCustomerSignature {
|
|
4295
|
+
/**
|
|
4296
|
+
* Get a ReferringCustomer by id.
|
|
4297
|
+
* @param - Id of the ReferringCustomer to retrieve.
|
|
4298
|
+
* @returns The retrieved ReferringCustomer.
|
|
4299
|
+
*/
|
|
4300
|
+
(referringCustomerId: string): Promise<ReferringCustomer & ReferringCustomerNonNullableFields>;
|
|
4301
|
+
}
|
|
4302
|
+
declare function getReferringCustomerByReferralCode$1(httpClient: HttpClient): GetReferringCustomerByReferralCodeSignature;
|
|
4303
|
+
interface GetReferringCustomerByReferralCodeSignature {
|
|
4304
|
+
/**
|
|
4305
|
+
* Get a ReferringCustomer by referral code.
|
|
4306
|
+
* @param - Referral Code of the ReferringCustomer to retrieve.
|
|
4307
|
+
*/
|
|
4308
|
+
(referralCode: string): Promise<GetReferringCustomerByReferralCodeResponse & GetReferringCustomerByReferralCodeResponseNonNullableFields>;
|
|
4309
|
+
}
|
|
4310
|
+
declare function queryReferringCustomers$1(httpClient: HttpClient): QueryReferringCustomersSignature;
|
|
4311
|
+
interface QueryReferringCustomersSignature {
|
|
4312
|
+
/**
|
|
4313
|
+
* Query ReferredFriends using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4314
|
+
*
|
|
4315
|
+
* Fields supported: `contact_id`, `referral_code`, `created_date`, `updated_date`.
|
|
4316
|
+
*/
|
|
4317
|
+
(): ReferringCustomersQueryBuilder;
|
|
4318
|
+
}
|
|
4319
|
+
declare function deleteReferringCustomer$1(httpClient: HttpClient): DeleteReferringCustomerSignature;
|
|
4320
|
+
interface DeleteReferringCustomerSignature {
|
|
4321
|
+
/**
|
|
4322
|
+
* Delete ReferringCustomer by id.
|
|
4323
|
+
*
|
|
4324
|
+
* You must also provide `revision`.
|
|
4325
|
+
* @param - Id of the ReferringCustomer to delete.
|
|
4326
|
+
*/
|
|
4327
|
+
(referringCustomerId: string, options?: DeleteReferringCustomerOptions | undefined): Promise<void>;
|
|
4328
|
+
}
|
|
4107
4329
|
declare const onReferringCustomerCreated$1: EventDefinition<ReferringCustomerCreatedEnvelope, "wix.loyalty.referral.v1.referring_customer_created">;
|
|
4108
4330
|
declare const onReferringCustomerDeleted$1: EventDefinition<ReferringCustomerDeletedEnvelope, "wix.loyalty.referral.v1.referring_customer_deleted">;
|
|
4109
4331
|
|
|
@@ -4123,9 +4345,11 @@ type _publicDeleteReferringCustomerType = typeof deleteReferringCustomer$1;
|
|
|
4123
4345
|
declare const deleteReferringCustomer: ReturnType<typeof createRESTModule<_publicDeleteReferringCustomerType>>;
|
|
4124
4346
|
|
|
4125
4347
|
type _publicOnReferringCustomerCreatedType = typeof onReferringCustomerCreated$1;
|
|
4348
|
+
/** */
|
|
4126
4349
|
declare const onReferringCustomerCreated: ReturnType<typeof createEventModule<_publicOnReferringCustomerCreatedType>>;
|
|
4127
4350
|
|
|
4128
4351
|
type _publicOnReferringCustomerDeletedType = typeof onReferringCustomerDeleted$1;
|
|
4352
|
+
/** */
|
|
4129
4353
|
declare const onReferringCustomerDeleted: ReturnType<typeof createEventModule<_publicOnReferringCustomerDeletedType>>;
|
|
4130
4354
|
|
|
4131
4355
|
type index_d_ActionEvent = ActionEvent;
|