@wix/referral 1.0.25 → 1.0.27

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.
@@ -29,4 +29,3 @@ exports.tracker = __importStar(require("@wix/referral_tracker/context"));
29
29
  exports.rewards = __importStar(require("@wix/referral_rewards/context"));
30
30
  exports.friends = __importStar(require("@wix/referral_friends/context"));
31
31
  exports.customers = __importStar(require("@wix/referral_customers/context"));
32
- //# sourceMappingURL=context.js.map
@@ -34,4 +34,3 @@ const friends = __importStar(require("@wix/referral_friends"));
34
34
  exports.friends = friends;
35
35
  const customers = __importStar(require("@wix/referral_customers"));
36
36
  exports.customers = customers;
37
- //# sourceMappingURL=index.js.map
package/build/cjs/meta.js CHANGED
@@ -29,4 +29,3 @@ exports.tracker = __importStar(require("@wix/referral_tracker/meta"));
29
29
  exports.rewards = __importStar(require("@wix/referral_rewards/meta"));
30
30
  exports.friends = __importStar(require("@wix/referral_friends/meta"));
31
31
  exports.customers = __importStar(require("@wix/referral_customers/meta"));
32
- //# sourceMappingURL=meta.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/referral",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,11 +18,11 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/referral_customers": "1.0.10",
22
- "@wix/referral_friends": "1.0.7",
23
- "@wix/referral_programs": "1.0.13",
24
- "@wix/referral_rewards": "1.0.10",
25
- "@wix/referral_tracker": "1.0.12"
21
+ "@wix/referral_customers": "1.0.11",
22
+ "@wix/referral_friends": "1.0.8",
23
+ "@wix/referral_programs": "1.0.14",
24
+ "@wix/referral_rewards": "1.0.11",
25
+ "@wix/referral_tracker": "1.0.13"
26
26
  },
27
27
  "devDependencies": {
28
28
  "glob": "^10.4.1",
@@ -47,5 +47,5 @@
47
47
  "fqdn": ""
48
48
  }
49
49
  },
50
- "falconPackageHash": "71b7a7dff88862d524b17dc23bd7398d9af6d71eac87f21c7bf17291"
50
+ "falconPackageHash": "831e6f90356e26c6c754bb89b029cfb1aaaa13d0cd7b317d55e4e41e"
51
51
  }
@@ -1,39 +1,39 @@
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>>;
1
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
2
+ interface HttpClient$4 {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
4
4
  fetchWithAuth: typeof fetch;
5
5
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
6
  }
7
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
- type HttpResponse<T = any> = {
7
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
8
+ type HttpResponse$4<T = any> = {
9
9
  data: T;
10
10
  status: number;
11
11
  statusText: string;
12
12
  headers: any;
13
13
  request?: any;
14
14
  };
15
- type RequestOptions<_TResponse = any, Data = any> = {
15
+ type RequestOptions$4<_TResponse = any, Data = any> = {
16
16
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
17
  url: string;
18
18
  data?: Data;
19
19
  params?: URLSearchParams;
20
- } & APIMetadata;
21
- type APIMetadata = {
20
+ } & APIMetadata$4;
21
+ type APIMetadata$4 = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
- type EventDefinition<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
27
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
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;
34
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
35
+ type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1548,14 +1548,14 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
1548
1548
  topic?: string;
1549
1549
  }
1550
1550
 
1551
- declare function getReferralProgram$1(httpClient: HttpClient): GetReferralProgramSignature;
1551
+ declare function getReferralProgram$1(httpClient: HttpClient$4): GetReferralProgramSignature;
1552
1552
  interface GetReferralProgramSignature {
1553
1553
  /**
1554
1554
  * Retrieves the referral program.
1555
1555
  */
1556
1556
  (): Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
1557
1557
  }
1558
- declare function queryReferralPrograms$1(httpClient: HttpClient): QueryReferralProgramsSignature;
1558
+ declare function queryReferralPrograms$1(httpClient: HttpClient$4): QueryReferralProgramsSignature;
1559
1559
  interface QueryReferralProgramsSignature {
1560
1560
  /**
1561
1561
  * Retrieves a list of referral programs, given the provided paging, filtering, and sorting.
@@ -1568,7 +1568,7 @@ interface QueryReferralProgramsSignature {
1568
1568
  */
1569
1569
  (): ReferralProgramsQueryBuilder;
1570
1570
  }
1571
- declare function updateReferralProgram$1(httpClient: HttpClient): UpdateReferralProgramSignature;
1571
+ declare function updateReferralProgram$1(httpClient: HttpClient$4): UpdateReferralProgramSignature;
1572
1572
  interface UpdateReferralProgramSignature {
1573
1573
  /**
1574
1574
  * Updates a referral program. Supports partial updates.
@@ -1579,21 +1579,21 @@ interface UpdateReferralProgramSignature {
1579
1579
  */
1580
1580
  (referralProgram: ReferralProgram): Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
1581
1581
  }
1582
- declare function activateReferralProgram$1(httpClient: HttpClient): ActivateReferralProgramSignature;
1582
+ declare function activateReferralProgram$1(httpClient: HttpClient$4): ActivateReferralProgramSignature;
1583
1583
  interface ActivateReferralProgramSignature {
1584
1584
  /**
1585
1585
  * Activates the referral program, changing its status to `ACTIVE`.
1586
1586
  */
1587
1587
  (): Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
1588
1588
  }
1589
- declare function pauseReferralProgram$1(httpClient: HttpClient): PauseReferralProgramSignature;
1589
+ declare function pauseReferralProgram$1(httpClient: HttpClient$4): PauseReferralProgramSignature;
1590
1590
  interface PauseReferralProgramSignature {
1591
1591
  /**
1592
1592
  * Pauses the referral program, changing its status to `PAUSED`.
1593
1593
  */
1594
1594
  (): Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
1595
1595
  }
1596
- declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GetAiSocialMediaPostsSuggestionsSignature;
1596
+ declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient$4): GetAiSocialMediaPostsSuggestionsSignature;
1597
1597
  interface GetAiSocialMediaPostsSuggestionsSignature {
1598
1598
  /**
1599
1599
  * Retrieves pre-generated AI social media post suggestions for promoting the referral program.
@@ -1605,7 +1605,7 @@ interface GetAiSocialMediaPostsSuggestionsSignature {
1605
1605
  */
1606
1606
  (options?: GetAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1607
1607
  }
1608
- declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GenerateAiSocialMediaPostsSuggestionsSignature;
1608
+ declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient$4): GenerateAiSocialMediaPostsSuggestionsSignature;
1609
1609
  interface GenerateAiSocialMediaPostsSuggestionsSignature {
1610
1610
  /**
1611
1611
  * Creates new AI-generated social media post suggestions for promoting the referral program.
@@ -1616,25 +1616,25 @@ interface GenerateAiSocialMediaPostsSuggestionsSignature {
1616
1616
  */
1617
1617
  (options?: GenerateAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1618
1618
  }
1619
- declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient): GetReferralProgramPremiumFeaturesSignature;
1619
+ declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient$4): GetReferralProgramPremiumFeaturesSignature;
1620
1620
  interface GetReferralProgramPremiumFeaturesSignature {
1621
1621
  /**
1622
1622
  * Retrieves information about the enabled premium features for the referral program.
1623
1623
  */
1624
1624
  (): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
1625
1625
  }
1626
- declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
1626
+ declare const onProgramUpdated$1: EventDefinition$3<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
1627
1627
 
1628
- declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1628
+ declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
1629
1629
 
1630
- declare const getReferralProgram: BuildRESTFunction<typeof getReferralProgram$1> & typeof getReferralProgram$1;
1631
- declare const queryReferralPrograms: BuildRESTFunction<typeof queryReferralPrograms$1> & typeof queryReferralPrograms$1;
1632
- declare const updateReferralProgram: BuildRESTFunction<typeof updateReferralProgram$1> & typeof updateReferralProgram$1;
1633
- declare const activateReferralProgram: BuildRESTFunction<typeof activateReferralProgram$1> & typeof activateReferralProgram$1;
1634
- declare const pauseReferralProgram: BuildRESTFunction<typeof pauseReferralProgram$1> & typeof pauseReferralProgram$1;
1635
- declare const getAiSocialMediaPostsSuggestions: BuildRESTFunction<typeof getAiSocialMediaPostsSuggestions$1> & typeof getAiSocialMediaPostsSuggestions$1;
1636
- declare const generateAiSocialMediaPostsSuggestions: BuildRESTFunction<typeof generateAiSocialMediaPostsSuggestions$1> & typeof generateAiSocialMediaPostsSuggestions$1;
1637
- declare const getReferralProgramPremiumFeatures: BuildRESTFunction<typeof getReferralProgramPremiumFeatures$1> & typeof getReferralProgramPremiumFeatures$1;
1630
+ declare const getReferralProgram: BuildRESTFunction$4<typeof getReferralProgram$1> & typeof getReferralProgram$1;
1631
+ declare const queryReferralPrograms: BuildRESTFunction$4<typeof queryReferralPrograms$1> & typeof queryReferralPrograms$1;
1632
+ declare const updateReferralProgram: BuildRESTFunction$4<typeof updateReferralProgram$1> & typeof updateReferralProgram$1;
1633
+ declare const activateReferralProgram: BuildRESTFunction$4<typeof activateReferralProgram$1> & typeof activateReferralProgram$1;
1634
+ declare const pauseReferralProgram: BuildRESTFunction$4<typeof pauseReferralProgram$1> & typeof pauseReferralProgram$1;
1635
+ declare const getAiSocialMediaPostsSuggestions: BuildRESTFunction$4<typeof getAiSocialMediaPostsSuggestions$1> & typeof getAiSocialMediaPostsSuggestions$1;
1636
+ declare const generateAiSocialMediaPostsSuggestions: BuildRESTFunction$4<typeof generateAiSocialMediaPostsSuggestions$1> & typeof generateAiSocialMediaPostsSuggestions$1;
1637
+ declare const getReferralProgramPremiumFeatures: BuildRESTFunction$4<typeof getReferralProgramPremiumFeatures$1> & typeof getReferralProgramPremiumFeatures$1;
1638
1638
 
1639
1639
  type _publicOnProgramUpdatedType = typeof onProgramUpdated$1;
1640
1640
  /** */
@@ -1767,6 +1767,50 @@ declare namespace context$4 {
1767
1767
  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$4 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__publicOnProgramUpdatedType as _publicOnProgramUpdatedType, 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 };
1768
1768
  }
1769
1769
 
1770
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
1771
+ interface HttpClient$3 {
1772
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
1773
+ fetchWithAuth: typeof fetch;
1774
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1775
+ }
1776
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
1777
+ type HttpResponse$3<T = any> = {
1778
+ data: T;
1779
+ status: number;
1780
+ statusText: string;
1781
+ headers: any;
1782
+ request?: any;
1783
+ };
1784
+ type RequestOptions$3<_TResponse = any, Data = any> = {
1785
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1786
+ url: string;
1787
+ data?: Data;
1788
+ params?: URLSearchParams;
1789
+ } & APIMetadata$3;
1790
+ type APIMetadata$3 = {
1791
+ methodFqn?: string;
1792
+ entityFqdn?: string;
1793
+ packageName?: string;
1794
+ };
1795
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
1796
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
1797
+ __type: 'event-definition';
1798
+ type: Type;
1799
+ isDomainEvent?: boolean;
1800
+ transformations?: (envelope: unknown) => Payload;
1801
+ __payload: Payload;
1802
+ };
1803
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
1804
+ type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
1805
+ type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
1806
+
1807
+ declare global {
1808
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1809
+ interface SymbolConstructor {
1810
+ readonly observable: symbol;
1811
+ }
1812
+ }
1813
+
1770
1814
  interface ReferralEvent extends ReferralEventEventTypeOneOf {
1771
1815
  /** Event triggered when a referred friend signs up. */
1772
1816
  referredFriendSignupEvent?: ReferredFriendSignupEvent;
@@ -2602,7 +2646,7 @@ interface QueryReferredFriendActionsOptions {
2602
2646
  contactIds?: string[];
2603
2647
  }
2604
2648
 
2605
- declare function getReferralEvent$1(httpClient: HttpClient): GetReferralEventSignature;
2649
+ declare function getReferralEvent$1(httpClient: HttpClient$3): GetReferralEventSignature;
2606
2650
  interface GetReferralEventSignature {
2607
2651
  /**
2608
2652
  * Retrieves a referral event by ID.
@@ -2611,7 +2655,7 @@ interface GetReferralEventSignature {
2611
2655
  */
2612
2656
  (referralEventId: string): Promise<ReferralEvent & ReferralEventNonNullableFields>;
2613
2657
  }
2614
- declare function queryReferralEvent$1(httpClient: HttpClient): QueryReferralEventSignature;
2658
+ declare function queryReferralEvent$1(httpClient: HttpClient$3): QueryReferralEventSignature;
2615
2659
  interface QueryReferralEventSignature {
2616
2660
  /**
2617
2661
  * Retrieves a list of referral events, given the provided paging, filtering, and sorting.
@@ -2623,14 +2667,14 @@ interface QueryReferralEventSignature {
2623
2667
  */
2624
2668
  (): ReferralEventsQueryBuilder;
2625
2669
  }
2626
- declare function getReferralStatistics$1(httpClient: HttpClient): GetReferralStatisticsSignature;
2670
+ declare function getReferralStatistics$1(httpClient: HttpClient$3): GetReferralStatisticsSignature;
2627
2671
  interface GetReferralStatisticsSignature {
2628
2672
  /**
2629
2673
  * Retrieves referral statistics.
2630
2674
  */
2631
2675
  (): Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
2632
2676
  }
2633
- declare function queryReferringCustomerTotals$1(httpClient: HttpClient): QueryReferringCustomerTotalsSignature;
2677
+ declare function queryReferringCustomerTotals$1(httpClient: HttpClient$3): QueryReferringCustomerTotalsSignature;
2634
2678
  interface QueryReferringCustomerTotalsSignature {
2635
2679
  /**
2636
2680
  * Retrieves a list of referring customer totals, given the provided paging, filtering, and sorting.
@@ -2642,7 +2686,7 @@ interface QueryReferringCustomerTotalsSignature {
2642
2686
  */
2643
2687
  (options?: QueryReferringCustomerTotalsOptions | undefined): Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
2644
2688
  }
2645
- declare function queryReferredFriendActions$1(httpClient: HttpClient): QueryReferredFriendActionsSignature;
2689
+ declare function queryReferredFriendActions$1(httpClient: HttpClient$3): QueryReferredFriendActionsSignature;
2646
2690
  interface QueryReferredFriendActionsSignature {
2647
2691
  /**
2648
2692
  * Retrieves a list of referred friend actions, given the provided paging, filtering, and sorting.
@@ -2654,15 +2698,15 @@ interface QueryReferredFriendActionsSignature {
2654
2698
  */
2655
2699
  (options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
2656
2700
  }
2657
- declare const onReferralEventCreated$1: EventDefinition<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
2701
+ declare const onReferralEventCreated$1: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
2658
2702
 
2659
- declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2703
+ declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
2660
2704
 
2661
- declare const getReferralEvent: BuildRESTFunction<typeof getReferralEvent$1> & typeof getReferralEvent$1;
2662
- declare const queryReferralEvent: BuildRESTFunction<typeof queryReferralEvent$1> & typeof queryReferralEvent$1;
2663
- declare const getReferralStatistics: BuildRESTFunction<typeof getReferralStatistics$1> & typeof getReferralStatistics$1;
2664
- declare const queryReferringCustomerTotals: BuildRESTFunction<typeof queryReferringCustomerTotals$1> & typeof queryReferringCustomerTotals$1;
2665
- declare const queryReferredFriendActions: BuildRESTFunction<typeof queryReferredFriendActions$1> & typeof queryReferredFriendActions$1;
2705
+ declare const getReferralEvent: BuildRESTFunction$3<typeof getReferralEvent$1> & typeof getReferralEvent$1;
2706
+ declare const queryReferralEvent: BuildRESTFunction$3<typeof queryReferralEvent$1> & typeof queryReferralEvent$1;
2707
+ declare const getReferralStatistics: BuildRESTFunction$3<typeof getReferralStatistics$1> & typeof getReferralStatistics$1;
2708
+ declare const queryReferringCustomerTotals: BuildRESTFunction$3<typeof queryReferringCustomerTotals$1> & typeof queryReferringCustomerTotals$1;
2709
+ declare const queryReferredFriendActions: BuildRESTFunction$3<typeof queryReferredFriendActions$1> & typeof queryReferredFriendActions$1;
2666
2710
 
2667
2711
  type _publicOnReferralEventCreatedType = typeof onReferralEventCreated$1;
2668
2712
  /** */
@@ -2715,6 +2759,40 @@ declare namespace context$3 {
2715
2759
  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$3 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__publicOnReferralEventCreatedType as _publicOnReferralEventCreatedType, 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 };
2716
2760
  }
2717
2761
 
2762
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
2763
+ interface HttpClient$2 {
2764
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
2765
+ fetchWithAuth: typeof fetch;
2766
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2767
+ }
2768
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
2769
+ type HttpResponse$2<T = any> = {
2770
+ data: T;
2771
+ status: number;
2772
+ statusText: string;
2773
+ headers: any;
2774
+ request?: any;
2775
+ };
2776
+ type RequestOptions$2<_TResponse = any, Data = any> = {
2777
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2778
+ url: string;
2779
+ data?: Data;
2780
+ params?: URLSearchParams;
2781
+ } & APIMetadata$2;
2782
+ type APIMetadata$2 = {
2783
+ methodFqn?: string;
2784
+ entityFqdn?: string;
2785
+ packageName?: string;
2786
+ };
2787
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
2788
+
2789
+ declare global {
2790
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2791
+ interface SymbolConstructor {
2792
+ readonly observable: symbol;
2793
+ }
2794
+ }
2795
+
2718
2796
  interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
2719
2797
  /**
2720
2798
  * ID of the referring customer who received the reward.
@@ -3320,7 +3398,7 @@ interface ReferralRewardsQueryBuilder {
3320
3398
  find: () => Promise<ReferralRewardsQueryResult>;
3321
3399
  }
3322
3400
 
3323
- declare function getReferralReward$1(httpClient: HttpClient): GetReferralRewardSignature;
3401
+ declare function getReferralReward$1(httpClient: HttpClient$2): GetReferralRewardSignature;
3324
3402
  interface GetReferralRewardSignature {
3325
3403
  /**
3326
3404
  * Retrieves a referral reward.
@@ -3329,7 +3407,7 @@ interface GetReferralRewardSignature {
3329
3407
  */
3330
3408
  (_id: string): Promise<ReferralReward & ReferralRewardNonNullableFields>;
3331
3409
  }
3332
- declare function queryReferralRewards$1(httpClient: HttpClient): QueryReferralRewardsSignature;
3410
+ declare function queryReferralRewards$1(httpClient: HttpClient$2): QueryReferralRewardsSignature;
3333
3411
  interface QueryReferralRewardsSignature {
3334
3412
  /**
3335
3413
  * Retrieves a list of referral rewards, given the provided paging, filtering, and sorting.
@@ -3342,8 +3420,8 @@ interface QueryReferralRewardsSignature {
3342
3420
  (options?: QueryReferralRewardsOptions | undefined): ReferralRewardsQueryBuilder;
3343
3421
  }
3344
3422
 
3345
- declare const getReferralReward: BuildRESTFunction<typeof getReferralReward$1> & typeof getReferralReward$1;
3346
- declare const queryReferralRewards: BuildRESTFunction<typeof queryReferralRewards$1> & typeof queryReferralRewards$1;
3423
+ declare const getReferralReward: BuildRESTFunction$2<typeof getReferralReward$1> & typeof getReferralReward$1;
3424
+ declare const queryReferralRewards: BuildRESTFunction$2<typeof queryReferralRewards$1> & typeof queryReferralRewards$1;
3347
3425
 
3348
3426
  type context$2_BulkGetReferralRewardsRequest = BulkGetReferralRewardsRequest;
3349
3427
  type context$2_BulkGetReferralRewardsResponse = BulkGetReferralRewardsResponse;
@@ -3387,6 +3465,50 @@ declare namespace context$2 {
3387
3465
  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 context$2_ReferralRewardsQueryBuilder as ReferralRewardsQueryBuilder, type context$2_ReferralRewardsQueryResult as ReferralRewardsQueryResult, type ReferredFriendDetails$1 as ReferredFriendDetails, type RestoreInfo$2 as RestoreInfo, 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_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, context$2_getReferralReward as getReferralReward, context$2_queryReferralRewards as queryReferralRewards };
3388
3466
  }
3389
3467
 
3468
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
3469
+ interface HttpClient$1 {
3470
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
3471
+ fetchWithAuth: typeof fetch;
3472
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
3473
+ }
3474
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
3475
+ type HttpResponse$1<T = any> = {
3476
+ data: T;
3477
+ status: number;
3478
+ statusText: string;
3479
+ headers: any;
3480
+ request?: any;
3481
+ };
3482
+ type RequestOptions$1<_TResponse = any, Data = any> = {
3483
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3484
+ url: string;
3485
+ data?: Data;
3486
+ params?: URLSearchParams;
3487
+ } & APIMetadata$1;
3488
+ type APIMetadata$1 = {
3489
+ methodFqn?: string;
3490
+ entityFqdn?: string;
3491
+ packageName?: string;
3492
+ };
3493
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
3494
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
3495
+ __type: 'event-definition';
3496
+ type: Type;
3497
+ isDomainEvent?: boolean;
3498
+ transformations?: (envelope: unknown) => Payload;
3499
+ __payload: Payload;
3500
+ };
3501
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
3502
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
3503
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
3504
+
3505
+ declare global {
3506
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3507
+ interface SymbolConstructor {
3508
+ readonly observable: symbol;
3509
+ }
3510
+ }
3511
+
3390
3512
  interface ReferredFriend {
3391
3513
  /**
3392
3514
  * ID of the referred friend.
@@ -3886,7 +4008,7 @@ interface ReferredFriendsQueryBuilder {
3886
4008
  find: () => Promise<ReferredFriendsQueryResult>;
3887
4009
  }
3888
4010
 
3889
- declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
4011
+ declare function createReferredFriend$1(httpClient: HttpClient$1): CreateReferredFriendSignature;
3890
4012
  interface CreateReferredFriendSignature {
3891
4013
  /**
3892
4014
  * Creates a new referred friend or returns an existing entity if it already exists.
@@ -3899,7 +4021,7 @@ interface CreateReferredFriendSignature {
3899
4021
  */
3900
4022
  (options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
3901
4023
  }
3902
- declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
4024
+ declare function getReferredFriend$1(httpClient: HttpClient$1): GetReferredFriendSignature;
3903
4025
  interface GetReferredFriendSignature {
3904
4026
  /**
3905
4027
  * Retrieves a referred friend by ID.
@@ -3907,7 +4029,7 @@ interface GetReferredFriendSignature {
3907
4029
  */
3908
4030
  (referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
3909
4031
  }
3910
- declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
4032
+ declare function getReferredFriendByContactId$1(httpClient: HttpClient$1): GetReferredFriendByContactIdSignature;
3911
4033
  interface GetReferredFriendByContactIdSignature {
3912
4034
  /**
3913
4035
  * Retrieves a referred friend by contact ID.
@@ -3918,7 +4040,7 @@ interface GetReferredFriendByContactIdSignature {
3918
4040
  */
3919
4041
  (contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
3920
4042
  }
3921
- declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
4043
+ declare function updateReferredFriend$1(httpClient: HttpClient$1): UpdateReferredFriendSignature;
3922
4044
  interface UpdateReferredFriendSignature {
3923
4045
  /**
3924
4046
  * Updates a referred friend. Supports partial updates.
@@ -3929,14 +4051,14 @@ interface UpdateReferredFriendSignature {
3929
4051
  */
3930
4052
  (_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
3931
4053
  }
3932
- declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
4054
+ declare function deleteReferredFriend$1(httpClient: HttpClient$1): DeleteReferredFriendSignature;
3933
4055
  interface DeleteReferredFriendSignature {
3934
4056
  /**
3935
4057
  * Deletes a referred friend.
3936
4058
  */
3937
4059
  (referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
3938
4060
  }
3939
- declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
4061
+ declare function queryReferredFriend$1(httpClient: HttpClient$1): QueryReferredFriendSignature;
3940
4062
  interface QueryReferredFriendSignature {
3941
4063
  /**
3942
4064
  * Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
@@ -3950,18 +4072,18 @@ interface QueryReferredFriendSignature {
3950
4072
  */
3951
4073
  (): ReferredFriendsQueryBuilder;
3952
4074
  }
3953
- declare const onReferredFriendCreated$1: EventDefinition<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
3954
- declare const onReferredFriendUpdated$1: EventDefinition<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
3955
- declare const onReferredFriendDeleted$1: EventDefinition<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
4075
+ declare const onReferredFriendCreated$1: EventDefinition$1<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
4076
+ declare const onReferredFriendUpdated$1: EventDefinition$1<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
4077
+ declare const onReferredFriendDeleted$1: EventDefinition$1<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
3956
4078
 
3957
- declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4079
+ declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
3958
4080
 
3959
- declare const createReferredFriend: BuildRESTFunction<typeof createReferredFriend$1> & typeof createReferredFriend$1;
3960
- declare const getReferredFriend: BuildRESTFunction<typeof getReferredFriend$1> & typeof getReferredFriend$1;
3961
- declare const getReferredFriendByContactId: BuildRESTFunction<typeof getReferredFriendByContactId$1> & typeof getReferredFriendByContactId$1;
3962
- declare const updateReferredFriend: BuildRESTFunction<typeof updateReferredFriend$1> & typeof updateReferredFriend$1;
3963
- declare const deleteReferredFriend: BuildRESTFunction<typeof deleteReferredFriend$1> & typeof deleteReferredFriend$1;
3964
- declare const queryReferredFriend: BuildRESTFunction<typeof queryReferredFriend$1> & typeof queryReferredFriend$1;
4081
+ declare const createReferredFriend: BuildRESTFunction$1<typeof createReferredFriend$1> & typeof createReferredFriend$1;
4082
+ declare const getReferredFriend: BuildRESTFunction$1<typeof getReferredFriend$1> & typeof getReferredFriend$1;
4083
+ declare const getReferredFriendByContactId: BuildRESTFunction$1<typeof getReferredFriendByContactId$1> & typeof getReferredFriendByContactId$1;
4084
+ declare const updateReferredFriend: BuildRESTFunction$1<typeof updateReferredFriend$1> & typeof updateReferredFriend$1;
4085
+ declare const deleteReferredFriend: BuildRESTFunction$1<typeof deleteReferredFriend$1> & typeof deleteReferredFriend$1;
4086
+ declare const queryReferredFriend: BuildRESTFunction$1<typeof queryReferredFriend$1> & typeof queryReferredFriend$1;
3965
4087
 
3966
4088
  type _publicOnReferredFriendCreatedType = typeof onReferredFriendCreated$1;
3967
4089
  /** */
@@ -4023,6 +4145,50 @@ declare namespace context$1 {
4023
4145
  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__publicOnReferredFriendCreatedType as _publicOnReferredFriendCreatedType, type context$1__publicOnReferredFriendDeletedType as _publicOnReferredFriendDeletedType, type context$1__publicOnReferredFriendUpdatedType as _publicOnReferredFriendUpdatedType, 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 };
4024
4146
  }
4025
4147
 
4148
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
4149
+ interface HttpClient {
4150
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4151
+ fetchWithAuth: typeof fetch;
4152
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
4153
+ }
4154
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
4155
+ type HttpResponse<T = any> = {
4156
+ data: T;
4157
+ status: number;
4158
+ statusText: string;
4159
+ headers: any;
4160
+ request?: any;
4161
+ };
4162
+ type RequestOptions<_TResponse = any, Data = any> = {
4163
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4164
+ url: string;
4165
+ data?: Data;
4166
+ params?: URLSearchParams;
4167
+ } & APIMetadata;
4168
+ type APIMetadata = {
4169
+ methodFqn?: string;
4170
+ entityFqdn?: string;
4171
+ packageName?: string;
4172
+ };
4173
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
4174
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
4175
+ __type: 'event-definition';
4176
+ type: Type;
4177
+ isDomainEvent?: boolean;
4178
+ transformations?: (envelope: unknown) => Payload;
4179
+ __payload: Payload;
4180
+ };
4181
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
4182
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
4183
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
4184
+
4185
+ declare global {
4186
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4187
+ interface SymbolConstructor {
4188
+ readonly observable: symbol;
4189
+ }
4190
+ }
4191
+
4026
4192
  /** ReferringCustomer is the main entity of ReferringCustomers. */
4027
4193
  interface ReferringCustomer {
4028
4194
  /**
@@ -1,39 +1,39 @@
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>>;
1
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
2
+ interface HttpClient$4 {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
4
4
  fetchWithAuth: typeof fetch;
5
5
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
6
  }
7
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
- type HttpResponse<T = any> = {
7
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
8
+ type HttpResponse$4<T = any> = {
9
9
  data: T;
10
10
  status: number;
11
11
  statusText: string;
12
12
  headers: any;
13
13
  request?: any;
14
14
  };
15
- type RequestOptions<_TResponse = any, Data = any> = {
15
+ type RequestOptions$4<_TResponse = any, Data = any> = {
16
16
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
17
  url: string;
18
18
  data?: Data;
19
19
  params?: URLSearchParams;
20
- } & APIMetadata;
21
- type APIMetadata = {
20
+ } & APIMetadata$4;
21
+ type APIMetadata$4 = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
- type EventDefinition<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
27
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
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;
34
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
35
+ type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1548,14 +1548,14 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
1548
1548
  topic?: string;
1549
1549
  }
1550
1550
 
1551
- declare function getReferralProgram$1(httpClient: HttpClient): GetReferralProgramSignature;
1551
+ declare function getReferralProgram$1(httpClient: HttpClient$4): GetReferralProgramSignature;
1552
1552
  interface GetReferralProgramSignature {
1553
1553
  /**
1554
1554
  * Retrieves the referral program.
1555
1555
  */
1556
1556
  (): Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
1557
1557
  }
1558
- declare function queryReferralPrograms$1(httpClient: HttpClient): QueryReferralProgramsSignature;
1558
+ declare function queryReferralPrograms$1(httpClient: HttpClient$4): QueryReferralProgramsSignature;
1559
1559
  interface QueryReferralProgramsSignature {
1560
1560
  /**
1561
1561
  * Retrieves a list of referral programs, given the provided paging, filtering, and sorting.
@@ -1568,7 +1568,7 @@ interface QueryReferralProgramsSignature {
1568
1568
  */
1569
1569
  (): ReferralProgramsQueryBuilder;
1570
1570
  }
1571
- declare function updateReferralProgram$1(httpClient: HttpClient): UpdateReferralProgramSignature;
1571
+ declare function updateReferralProgram$1(httpClient: HttpClient$4): UpdateReferralProgramSignature;
1572
1572
  interface UpdateReferralProgramSignature {
1573
1573
  /**
1574
1574
  * Updates a referral program. Supports partial updates.
@@ -1579,21 +1579,21 @@ interface UpdateReferralProgramSignature {
1579
1579
  */
1580
1580
  (referralProgram: ReferralProgram): Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
1581
1581
  }
1582
- declare function activateReferralProgram$1(httpClient: HttpClient): ActivateReferralProgramSignature;
1582
+ declare function activateReferralProgram$1(httpClient: HttpClient$4): ActivateReferralProgramSignature;
1583
1583
  interface ActivateReferralProgramSignature {
1584
1584
  /**
1585
1585
  * Activates the referral program, changing its status to `ACTIVE`.
1586
1586
  */
1587
1587
  (): Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
1588
1588
  }
1589
- declare function pauseReferralProgram$1(httpClient: HttpClient): PauseReferralProgramSignature;
1589
+ declare function pauseReferralProgram$1(httpClient: HttpClient$4): PauseReferralProgramSignature;
1590
1590
  interface PauseReferralProgramSignature {
1591
1591
  /**
1592
1592
  * Pauses the referral program, changing its status to `PAUSED`.
1593
1593
  */
1594
1594
  (): Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
1595
1595
  }
1596
- declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GetAiSocialMediaPostsSuggestionsSignature;
1596
+ declare function getAiSocialMediaPostsSuggestions$1(httpClient: HttpClient$4): GetAiSocialMediaPostsSuggestionsSignature;
1597
1597
  interface GetAiSocialMediaPostsSuggestionsSignature {
1598
1598
  /**
1599
1599
  * Retrieves pre-generated AI social media post suggestions for promoting the referral program.
@@ -1605,7 +1605,7 @@ interface GetAiSocialMediaPostsSuggestionsSignature {
1605
1605
  */
1606
1606
  (options?: GetAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1607
1607
  }
1608
- declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient): GenerateAiSocialMediaPostsSuggestionsSignature;
1608
+ declare function generateAiSocialMediaPostsSuggestions$1(httpClient: HttpClient$4): GenerateAiSocialMediaPostsSuggestionsSignature;
1609
1609
  interface GenerateAiSocialMediaPostsSuggestionsSignature {
1610
1610
  /**
1611
1611
  * Creates new AI-generated social media post suggestions for promoting the referral program.
@@ -1616,25 +1616,25 @@ interface GenerateAiSocialMediaPostsSuggestionsSignature {
1616
1616
  */
1617
1617
  (options?: GenerateAiSocialMediaPostsSuggestionsOptions | undefined): Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1618
1618
  }
1619
- declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient): GetReferralProgramPremiumFeaturesSignature;
1619
+ declare function getReferralProgramPremiumFeatures$1(httpClient: HttpClient$4): GetReferralProgramPremiumFeaturesSignature;
1620
1620
  interface GetReferralProgramPremiumFeaturesSignature {
1621
1621
  /**
1622
1622
  * Retrieves information about the enabled premium features for the referral program.
1623
1623
  */
1624
1624
  (): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
1625
1625
  }
1626
- declare const onProgramUpdated$1: EventDefinition<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
1626
+ declare const onProgramUpdated$1: EventDefinition$3<ProgramUpdatedEnvelope, "wix.loyalty.referral.v1.program_updated">;
1627
1627
 
1628
- declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1628
+ declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
1629
1629
 
1630
- declare const getReferralProgram: BuildRESTFunction<typeof getReferralProgram$1> & typeof getReferralProgram$1;
1631
- declare const queryReferralPrograms: BuildRESTFunction<typeof queryReferralPrograms$1> & typeof queryReferralPrograms$1;
1632
- declare const updateReferralProgram: BuildRESTFunction<typeof updateReferralProgram$1> & typeof updateReferralProgram$1;
1633
- declare const activateReferralProgram: BuildRESTFunction<typeof activateReferralProgram$1> & typeof activateReferralProgram$1;
1634
- declare const pauseReferralProgram: BuildRESTFunction<typeof pauseReferralProgram$1> & typeof pauseReferralProgram$1;
1635
- declare const getAiSocialMediaPostsSuggestions: BuildRESTFunction<typeof getAiSocialMediaPostsSuggestions$1> & typeof getAiSocialMediaPostsSuggestions$1;
1636
- declare const generateAiSocialMediaPostsSuggestions: BuildRESTFunction<typeof generateAiSocialMediaPostsSuggestions$1> & typeof generateAiSocialMediaPostsSuggestions$1;
1637
- declare const getReferralProgramPremiumFeatures: BuildRESTFunction<typeof getReferralProgramPremiumFeatures$1> & typeof getReferralProgramPremiumFeatures$1;
1630
+ declare const getReferralProgram: BuildRESTFunction$4<typeof getReferralProgram$1> & typeof getReferralProgram$1;
1631
+ declare const queryReferralPrograms: BuildRESTFunction$4<typeof queryReferralPrograms$1> & typeof queryReferralPrograms$1;
1632
+ declare const updateReferralProgram: BuildRESTFunction$4<typeof updateReferralProgram$1> & typeof updateReferralProgram$1;
1633
+ declare const activateReferralProgram: BuildRESTFunction$4<typeof activateReferralProgram$1> & typeof activateReferralProgram$1;
1634
+ declare const pauseReferralProgram: BuildRESTFunction$4<typeof pauseReferralProgram$1> & typeof pauseReferralProgram$1;
1635
+ declare const getAiSocialMediaPostsSuggestions: BuildRESTFunction$4<typeof getAiSocialMediaPostsSuggestions$1> & typeof getAiSocialMediaPostsSuggestions$1;
1636
+ declare const generateAiSocialMediaPostsSuggestions: BuildRESTFunction$4<typeof generateAiSocialMediaPostsSuggestions$1> & typeof generateAiSocialMediaPostsSuggestions$1;
1637
+ declare const getReferralProgramPremiumFeatures: BuildRESTFunction$4<typeof getReferralProgramPremiumFeatures$1> & typeof getReferralProgramPremiumFeatures$1;
1638
1638
 
1639
1639
  type _publicOnProgramUpdatedType = typeof onProgramUpdated$1;
1640
1640
  /** */
@@ -1767,6 +1767,50 @@ declare namespace index_d$4 {
1767
1767
  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$4 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__publicOnProgramUpdatedType as _publicOnProgramUpdatedType, 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 };
1768
1768
  }
1769
1769
 
1770
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
1771
+ interface HttpClient$3 {
1772
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
1773
+ fetchWithAuth: typeof fetch;
1774
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1775
+ }
1776
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
1777
+ type HttpResponse$3<T = any> = {
1778
+ data: T;
1779
+ status: number;
1780
+ statusText: string;
1781
+ headers: any;
1782
+ request?: any;
1783
+ };
1784
+ type RequestOptions$3<_TResponse = any, Data = any> = {
1785
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1786
+ url: string;
1787
+ data?: Data;
1788
+ params?: URLSearchParams;
1789
+ } & APIMetadata$3;
1790
+ type APIMetadata$3 = {
1791
+ methodFqn?: string;
1792
+ entityFqdn?: string;
1793
+ packageName?: string;
1794
+ };
1795
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
1796
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
1797
+ __type: 'event-definition';
1798
+ type: Type;
1799
+ isDomainEvent?: boolean;
1800
+ transformations?: (envelope: unknown) => Payload;
1801
+ __payload: Payload;
1802
+ };
1803
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
1804
+ type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
1805
+ type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
1806
+
1807
+ declare global {
1808
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1809
+ interface SymbolConstructor {
1810
+ readonly observable: symbol;
1811
+ }
1812
+ }
1813
+
1770
1814
  interface ReferralEvent extends ReferralEventEventTypeOneOf {
1771
1815
  /** Event triggered when a referred friend signs up. */
1772
1816
  referredFriendSignupEvent?: ReferredFriendSignupEvent;
@@ -2602,7 +2646,7 @@ interface QueryReferredFriendActionsOptions {
2602
2646
  contactIds?: string[];
2603
2647
  }
2604
2648
 
2605
- declare function getReferralEvent$1(httpClient: HttpClient): GetReferralEventSignature;
2649
+ declare function getReferralEvent$1(httpClient: HttpClient$3): GetReferralEventSignature;
2606
2650
  interface GetReferralEventSignature {
2607
2651
  /**
2608
2652
  * Retrieves a referral event by ID.
@@ -2611,7 +2655,7 @@ interface GetReferralEventSignature {
2611
2655
  */
2612
2656
  (referralEventId: string): Promise<ReferralEvent & ReferralEventNonNullableFields>;
2613
2657
  }
2614
- declare function queryReferralEvent$1(httpClient: HttpClient): QueryReferralEventSignature;
2658
+ declare function queryReferralEvent$1(httpClient: HttpClient$3): QueryReferralEventSignature;
2615
2659
  interface QueryReferralEventSignature {
2616
2660
  /**
2617
2661
  * Retrieves a list of referral events, given the provided paging, filtering, and sorting.
@@ -2623,14 +2667,14 @@ interface QueryReferralEventSignature {
2623
2667
  */
2624
2668
  (): ReferralEventsQueryBuilder;
2625
2669
  }
2626
- declare function getReferralStatistics$1(httpClient: HttpClient): GetReferralStatisticsSignature;
2670
+ declare function getReferralStatistics$1(httpClient: HttpClient$3): GetReferralStatisticsSignature;
2627
2671
  interface GetReferralStatisticsSignature {
2628
2672
  /**
2629
2673
  * Retrieves referral statistics.
2630
2674
  */
2631
2675
  (): Promise<GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields>;
2632
2676
  }
2633
- declare function queryReferringCustomerTotals$1(httpClient: HttpClient): QueryReferringCustomerTotalsSignature;
2677
+ declare function queryReferringCustomerTotals$1(httpClient: HttpClient$3): QueryReferringCustomerTotalsSignature;
2634
2678
  interface QueryReferringCustomerTotalsSignature {
2635
2679
  /**
2636
2680
  * Retrieves a list of referring customer totals, given the provided paging, filtering, and sorting.
@@ -2642,7 +2686,7 @@ interface QueryReferringCustomerTotalsSignature {
2642
2686
  */
2643
2687
  (options?: QueryReferringCustomerTotalsOptions | undefined): Promise<QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields>;
2644
2688
  }
2645
- declare function queryReferredFriendActions$1(httpClient: HttpClient): QueryReferredFriendActionsSignature;
2689
+ declare function queryReferredFriendActions$1(httpClient: HttpClient$3): QueryReferredFriendActionsSignature;
2646
2690
  interface QueryReferredFriendActionsSignature {
2647
2691
  /**
2648
2692
  * Retrieves a list of referred friend actions, given the provided paging, filtering, and sorting.
@@ -2654,15 +2698,15 @@ interface QueryReferredFriendActionsSignature {
2654
2698
  */
2655
2699
  (options?: QueryReferredFriendActionsOptions | undefined): Promise<QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields>;
2656
2700
  }
2657
- declare const onReferralEventCreated$1: EventDefinition<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
2701
+ declare const onReferralEventCreated$1: EventDefinition$2<ReferralEventCreatedEnvelope, "wix.loyalty.referral.v1.referral_event_created">;
2658
2702
 
2659
- declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2703
+ declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
2660
2704
 
2661
- declare const getReferralEvent: BuildRESTFunction<typeof getReferralEvent$1> & typeof getReferralEvent$1;
2662
- declare const queryReferralEvent: BuildRESTFunction<typeof queryReferralEvent$1> & typeof queryReferralEvent$1;
2663
- declare const getReferralStatistics: BuildRESTFunction<typeof getReferralStatistics$1> & typeof getReferralStatistics$1;
2664
- declare const queryReferringCustomerTotals: BuildRESTFunction<typeof queryReferringCustomerTotals$1> & typeof queryReferringCustomerTotals$1;
2665
- declare const queryReferredFriendActions: BuildRESTFunction<typeof queryReferredFriendActions$1> & typeof queryReferredFriendActions$1;
2705
+ declare const getReferralEvent: BuildRESTFunction$3<typeof getReferralEvent$1> & typeof getReferralEvent$1;
2706
+ declare const queryReferralEvent: BuildRESTFunction$3<typeof queryReferralEvent$1> & typeof queryReferralEvent$1;
2707
+ declare const getReferralStatistics: BuildRESTFunction$3<typeof getReferralStatistics$1> & typeof getReferralStatistics$1;
2708
+ declare const queryReferringCustomerTotals: BuildRESTFunction$3<typeof queryReferringCustomerTotals$1> & typeof queryReferringCustomerTotals$1;
2709
+ declare const queryReferredFriendActions: BuildRESTFunction$3<typeof queryReferredFriendActions$1> & typeof queryReferredFriendActions$1;
2666
2710
 
2667
2711
  type _publicOnReferralEventCreatedType = typeof onReferralEventCreated$1;
2668
2712
  /** */
@@ -2715,6 +2759,40 @@ declare namespace index_d$3 {
2715
2759
  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$3 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__publicOnReferralEventCreatedType as _publicOnReferralEventCreatedType, 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 };
2716
2760
  }
2717
2761
 
2762
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
2763
+ interface HttpClient$2 {
2764
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
2765
+ fetchWithAuth: typeof fetch;
2766
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2767
+ }
2768
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
2769
+ type HttpResponse$2<T = any> = {
2770
+ data: T;
2771
+ status: number;
2772
+ statusText: string;
2773
+ headers: any;
2774
+ request?: any;
2775
+ };
2776
+ type RequestOptions$2<_TResponse = any, Data = any> = {
2777
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2778
+ url: string;
2779
+ data?: Data;
2780
+ params?: URLSearchParams;
2781
+ } & APIMetadata$2;
2782
+ type APIMetadata$2 = {
2783
+ methodFqn?: string;
2784
+ entityFqdn?: string;
2785
+ packageName?: string;
2786
+ };
2787
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
2788
+
2789
+ declare global {
2790
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2791
+ interface SymbolConstructor {
2792
+ readonly observable: symbol;
2793
+ }
2794
+ }
2795
+
2718
2796
  interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
2719
2797
  /**
2720
2798
  * ID of the referring customer who received the reward.
@@ -3320,7 +3398,7 @@ interface ReferralRewardsQueryBuilder {
3320
3398
  find: () => Promise<ReferralRewardsQueryResult>;
3321
3399
  }
3322
3400
 
3323
- declare function getReferralReward$1(httpClient: HttpClient): GetReferralRewardSignature;
3401
+ declare function getReferralReward$1(httpClient: HttpClient$2): GetReferralRewardSignature;
3324
3402
  interface GetReferralRewardSignature {
3325
3403
  /**
3326
3404
  * Retrieves a referral reward.
@@ -3329,7 +3407,7 @@ interface GetReferralRewardSignature {
3329
3407
  */
3330
3408
  (_id: string): Promise<ReferralReward & ReferralRewardNonNullableFields>;
3331
3409
  }
3332
- declare function queryReferralRewards$1(httpClient: HttpClient): QueryReferralRewardsSignature;
3410
+ declare function queryReferralRewards$1(httpClient: HttpClient$2): QueryReferralRewardsSignature;
3333
3411
  interface QueryReferralRewardsSignature {
3334
3412
  /**
3335
3413
  * Retrieves a list of referral rewards, given the provided paging, filtering, and sorting.
@@ -3342,8 +3420,8 @@ interface QueryReferralRewardsSignature {
3342
3420
  (options?: QueryReferralRewardsOptions | undefined): ReferralRewardsQueryBuilder;
3343
3421
  }
3344
3422
 
3345
- declare const getReferralReward: BuildRESTFunction<typeof getReferralReward$1> & typeof getReferralReward$1;
3346
- declare const queryReferralRewards: BuildRESTFunction<typeof queryReferralRewards$1> & typeof queryReferralRewards$1;
3423
+ declare const getReferralReward: BuildRESTFunction$2<typeof getReferralReward$1> & typeof getReferralReward$1;
3424
+ declare const queryReferralRewards: BuildRESTFunction$2<typeof queryReferralRewards$1> & typeof queryReferralRewards$1;
3347
3425
 
3348
3426
  type index_d$2_BulkGetReferralRewardsRequest = BulkGetReferralRewardsRequest;
3349
3427
  type index_d$2_BulkGetReferralRewardsResponse = BulkGetReferralRewardsResponse;
@@ -3387,6 +3465,50 @@ declare namespace index_d$2 {
3387
3465
  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 index_d$2_ReferralRewardsQueryBuilder as ReferralRewardsQueryBuilder, type index_d$2_ReferralRewardsQueryResult as ReferralRewardsQueryResult, type ReferredFriendDetails$1 as ReferredFriendDetails, type RestoreInfo$2 as RestoreInfo, 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 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, index_d$2_getReferralReward as getReferralReward, index_d$2_queryReferralRewards as queryReferralRewards };
3388
3466
  }
3389
3467
 
3468
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
3469
+ interface HttpClient$1 {
3470
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
3471
+ fetchWithAuth: typeof fetch;
3472
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
3473
+ }
3474
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
3475
+ type HttpResponse$1<T = any> = {
3476
+ data: T;
3477
+ status: number;
3478
+ statusText: string;
3479
+ headers: any;
3480
+ request?: any;
3481
+ };
3482
+ type RequestOptions$1<_TResponse = any, Data = any> = {
3483
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3484
+ url: string;
3485
+ data?: Data;
3486
+ params?: URLSearchParams;
3487
+ } & APIMetadata$1;
3488
+ type APIMetadata$1 = {
3489
+ methodFqn?: string;
3490
+ entityFqdn?: string;
3491
+ packageName?: string;
3492
+ };
3493
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
3494
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
3495
+ __type: 'event-definition';
3496
+ type: Type;
3497
+ isDomainEvent?: boolean;
3498
+ transformations?: (envelope: unknown) => Payload;
3499
+ __payload: Payload;
3500
+ };
3501
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
3502
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
3503
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
3504
+
3505
+ declare global {
3506
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3507
+ interface SymbolConstructor {
3508
+ readonly observable: symbol;
3509
+ }
3510
+ }
3511
+
3390
3512
  interface ReferredFriend {
3391
3513
  /**
3392
3514
  * ID of the referred friend.
@@ -3886,7 +4008,7 @@ interface ReferredFriendsQueryBuilder {
3886
4008
  find: () => Promise<ReferredFriendsQueryResult>;
3887
4009
  }
3888
4010
 
3889
- declare function createReferredFriend$1(httpClient: HttpClient): CreateReferredFriendSignature;
4011
+ declare function createReferredFriend$1(httpClient: HttpClient$1): CreateReferredFriendSignature;
3890
4012
  interface CreateReferredFriendSignature {
3891
4013
  /**
3892
4014
  * Creates a new referred friend or returns an existing entity if it already exists.
@@ -3899,7 +4021,7 @@ interface CreateReferredFriendSignature {
3899
4021
  */
3900
4022
  (options?: CreateReferredFriendOptions | undefined): Promise<CreateReferredFriendResponse & CreateReferredFriendResponseNonNullableFields>;
3901
4023
  }
3902
- declare function getReferredFriend$1(httpClient: HttpClient): GetReferredFriendSignature;
4024
+ declare function getReferredFriend$1(httpClient: HttpClient$1): GetReferredFriendSignature;
3903
4025
  interface GetReferredFriendSignature {
3904
4026
  /**
3905
4027
  * Retrieves a referred friend by ID.
@@ -3907,7 +4029,7 @@ interface GetReferredFriendSignature {
3907
4029
  */
3908
4030
  (referredFriendId: string): Promise<GetReferredFriendResponse & GetReferredFriendResponseNonNullableFields>;
3909
4031
  }
3910
- declare function getReferredFriendByContactId$1(httpClient: HttpClient): GetReferredFriendByContactIdSignature;
4032
+ declare function getReferredFriendByContactId$1(httpClient: HttpClient$1): GetReferredFriendByContactIdSignature;
3911
4033
  interface GetReferredFriendByContactIdSignature {
3912
4034
  /**
3913
4035
  * Retrieves a referred friend by contact ID.
@@ -3918,7 +4040,7 @@ interface GetReferredFriendByContactIdSignature {
3918
4040
  */
3919
4041
  (contactId: string): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
3920
4042
  }
3921
- declare function updateReferredFriend$1(httpClient: HttpClient): UpdateReferredFriendSignature;
4043
+ declare function updateReferredFriend$1(httpClient: HttpClient$1): UpdateReferredFriendSignature;
3922
4044
  interface UpdateReferredFriendSignature {
3923
4045
  /**
3924
4046
  * Updates a referred friend. Supports partial updates.
@@ -3929,14 +4051,14 @@ interface UpdateReferredFriendSignature {
3929
4051
  */
3930
4052
  (_id: string, referredFriend: UpdateReferredFriend): Promise<ReferredFriend & ReferredFriendNonNullableFields>;
3931
4053
  }
3932
- declare function deleteReferredFriend$1(httpClient: HttpClient): DeleteReferredFriendSignature;
4054
+ declare function deleteReferredFriend$1(httpClient: HttpClient$1): DeleteReferredFriendSignature;
3933
4055
  interface DeleteReferredFriendSignature {
3934
4056
  /**
3935
4057
  * Deletes a referred friend.
3936
4058
  */
3937
4059
  (referredFriendId: string, options?: DeleteReferredFriendOptions | undefined): Promise<void>;
3938
4060
  }
3939
- declare function queryReferredFriend$1(httpClient: HttpClient): QueryReferredFriendSignature;
4061
+ declare function queryReferredFriend$1(httpClient: HttpClient$1): QueryReferredFriendSignature;
3940
4062
  interface QueryReferredFriendSignature {
3941
4063
  /**
3942
4064
  * Retrieves a list of referred friends, given the provided paging, filtering, and sorting.
@@ -3950,18 +4072,18 @@ interface QueryReferredFriendSignature {
3950
4072
  */
3951
4073
  (): ReferredFriendsQueryBuilder;
3952
4074
  }
3953
- declare const onReferredFriendCreated$1: EventDefinition<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
3954
- declare const onReferredFriendUpdated$1: EventDefinition<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
3955
- declare const onReferredFriendDeleted$1: EventDefinition<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
4075
+ declare const onReferredFriendCreated$1: EventDefinition$1<ReferredFriendCreatedEnvelope, "wix.loyalty.referral.v1.referred_friend_created">;
4076
+ declare const onReferredFriendUpdated$1: EventDefinition$1<ReferredFriendUpdatedEnvelope, "wix.loyalty.referral.v1.referred_friend_updated">;
4077
+ declare const onReferredFriendDeleted$1: EventDefinition$1<ReferredFriendDeletedEnvelope, "wix.loyalty.referral.v1.referred_friend_deleted">;
3956
4078
 
3957
- declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4079
+ declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
3958
4080
 
3959
- declare const createReferredFriend: BuildRESTFunction<typeof createReferredFriend$1> & typeof createReferredFriend$1;
3960
- declare const getReferredFriend: BuildRESTFunction<typeof getReferredFriend$1> & typeof getReferredFriend$1;
3961
- declare const getReferredFriendByContactId: BuildRESTFunction<typeof getReferredFriendByContactId$1> & typeof getReferredFriendByContactId$1;
3962
- declare const updateReferredFriend: BuildRESTFunction<typeof updateReferredFriend$1> & typeof updateReferredFriend$1;
3963
- declare const deleteReferredFriend: BuildRESTFunction<typeof deleteReferredFriend$1> & typeof deleteReferredFriend$1;
3964
- declare const queryReferredFriend: BuildRESTFunction<typeof queryReferredFriend$1> & typeof queryReferredFriend$1;
4081
+ declare const createReferredFriend: BuildRESTFunction$1<typeof createReferredFriend$1> & typeof createReferredFriend$1;
4082
+ declare const getReferredFriend: BuildRESTFunction$1<typeof getReferredFriend$1> & typeof getReferredFriend$1;
4083
+ declare const getReferredFriendByContactId: BuildRESTFunction$1<typeof getReferredFriendByContactId$1> & typeof getReferredFriendByContactId$1;
4084
+ declare const updateReferredFriend: BuildRESTFunction$1<typeof updateReferredFriend$1> & typeof updateReferredFriend$1;
4085
+ declare const deleteReferredFriend: BuildRESTFunction$1<typeof deleteReferredFriend$1> & typeof deleteReferredFriend$1;
4086
+ declare const queryReferredFriend: BuildRESTFunction$1<typeof queryReferredFriend$1> & typeof queryReferredFriend$1;
3965
4087
 
3966
4088
  type _publicOnReferredFriendCreatedType = typeof onReferredFriendCreated$1;
3967
4089
  /** */
@@ -4023,6 +4145,50 @@ declare namespace index_d$1 {
4023
4145
  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 RestoreInfo$1 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__publicOnReferredFriendCreatedType as _publicOnReferredFriendCreatedType, type index_d$1__publicOnReferredFriendDeletedType as _publicOnReferredFriendDeletedType, type index_d$1__publicOnReferredFriendUpdatedType as _publicOnReferredFriendUpdatedType, 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 };
4024
4146
  }
4025
4147
 
4148
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
4149
+ interface HttpClient {
4150
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4151
+ fetchWithAuth: typeof fetch;
4152
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
4153
+ }
4154
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
4155
+ type HttpResponse<T = any> = {
4156
+ data: T;
4157
+ status: number;
4158
+ statusText: string;
4159
+ headers: any;
4160
+ request?: any;
4161
+ };
4162
+ type RequestOptions<_TResponse = any, Data = any> = {
4163
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4164
+ url: string;
4165
+ data?: Data;
4166
+ params?: URLSearchParams;
4167
+ } & APIMetadata;
4168
+ type APIMetadata = {
4169
+ methodFqn?: string;
4170
+ entityFqdn?: string;
4171
+ packageName?: string;
4172
+ };
4173
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
4174
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
4175
+ __type: 'event-definition';
4176
+ type: Type;
4177
+ isDomainEvent?: boolean;
4178
+ transformations?: (envelope: unknown) => Payload;
4179
+ __payload: Payload;
4180
+ };
4181
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
4182
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
4183
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
4184
+
4185
+ declare global {
4186
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4187
+ interface SymbolConstructor {
4188
+ readonly observable: symbol;
4189
+ }
4190
+ }
4191
+
4026
4192
  /** ReferringCustomer is the main entity of ReferringCustomers. */
4027
4193
  interface ReferringCustomer {
4028
4194
  /**
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA2D;AAC3D,yEAAyD;AACzD,yEAAyD;AACzD,yEAAyD;AACzD,6EAA6D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAM1C,4BAAQ;AALjB,+DAAiD;AAK9B,0BAAO;AAJ1B,+DAAiD;AAIrB,0BAAO;AAHnC,+DAAiD;AAGZ,0BAAO;AAF5C,mEAAqD;AAEP,8BAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAwD;AACxD,sEAAsD;AACtD,sEAAsD;AACtD,sEAAsD;AACtD,0EAA0D"}