@wix/auto_sdk_referral_programs 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.
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface ReferralProgram {
2
4
  /**
3
5
  * Referral program name.
@@ -1097,6 +1099,13 @@ interface Subscription {
1097
1099
  * format.
1098
1100
  */
1099
1101
  countryCode?: string | null;
1102
+ /**
1103
+ * Seats of the product that the subscription was purchased for.
1104
+ * Will be Null for products that don't support seats.
1105
+ * @min 1
1106
+ * @max 500
1107
+ */
1108
+ seats?: number | null;
1100
1109
  }
1101
1110
  interface BillingReference {
1102
1111
  /**
@@ -1600,6 +1609,78 @@ interface ProgramUpdatedEnvelope {
1600
1609
  entity: ReferralProgram;
1601
1610
  metadata: EventMetadata;
1602
1611
  }
1612
+ /**
1613
+ * Triggered when a referral program is updated.
1614
+ * @permissionScope Manage Referrals
1615
+ * @permissionScopeId SCOPE.DC-REFERRALS.MANAGE-REFERRALS
1616
+ * @permissionId REFERRALS.READ_PROGRAM
1617
+ * @webhook
1618
+ * @eventType wix.loyalty.referral.v1.program_updated
1619
+ * @serviceIdentifier wix.loyalty.referral.program.v1.ReferralPrograms
1620
+ * @slug updated
1621
+ */
1622
+ declare function onProgramUpdated(handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>): void;
1623
+ type ProgramNonNullablePaths = `status` | `referredFriendReward.couponOptions.fixedAmountOptions.amount` | `referredFriendReward.couponOptions.percentageOptions.percentage` | `referredFriendReward.couponOptions.minimumSubtotal` | `referredFriendReward.couponOptions.scope.namespace` | `referredFriendReward.couponOptions.scope.group.name` | `referredFriendReward.couponOptions.name` | `referredFriendReward.couponOptions.discountType` | `referredFriendReward.loyaltyPointsOptions.amount` | `referredFriendReward.type` | `referringCustomerReward.couponOptions.fixedAmountOptions.amount` | `referringCustomerReward.couponOptions.percentageOptions.percentage` | `referringCustomerReward.couponOptions.minimumSubtotal` | `referringCustomerReward.couponOptions.scope.namespace` | `referringCustomerReward.couponOptions.scope.group.name` | `referringCustomerReward.couponOptions.name` | `referringCustomerReward.couponOptions.discountType` | `referringCustomerReward.loyaltyPointsOptions.amount` | `referringCustomerReward.type` | `successfulReferralActions` | `emails.encourageToReferFriends` | `emails.notifyCustomersAboutReward` | `premiumFeatures.referralProgram`;
1624
+ /**
1625
+ * Retrieves the referral program.
1626
+ * @public
1627
+ * @permissionId REFERRALS.READ_PROGRAM
1628
+ * @applicableIdentity APP
1629
+ * @applicableIdentity VISITOR
1630
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram
1631
+ */
1632
+ declare function getReferralProgram(): Promise<NonNullablePaths<GetReferralProgramResponse, {
1633
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1634
+ }[ProgramNonNullablePaths]>>;
1635
+ /**
1636
+ * Updates a referral program. Supports partial updates.
1637
+ *
1638
+ * Revision number, which increments by 1 each time the referral program is updated.
1639
+ * To prevent conflicting changes, the current revision must be passed when updating the referral program.
1640
+ * @param referralProgram - Referral program to update. Include the latest `revision` for a successful update.
1641
+ * @public
1642
+ * @requiredField referralProgram
1643
+ * @requiredField referralProgram.revision
1644
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1645
+ * @applicableIdentity APP
1646
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram
1647
+ */
1648
+ declare function updateReferralProgram(referralProgram: NonNullablePaths<ReferralProgram, `revision`>): Promise<NonNullablePaths<UpdateReferralProgramResponse, {
1649
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1650
+ }[ProgramNonNullablePaths]>>;
1651
+ /**
1652
+ * Activates the referral program, changing its status to `ACTIVE`.
1653
+ * @public
1654
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1655
+ * @applicableIdentity APP
1656
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram
1657
+ */
1658
+ declare function activateReferralProgram(): Promise<NonNullablePaths<ActivateReferralProgramResponse, {
1659
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1660
+ }[ProgramNonNullablePaths]>>;
1661
+ /**
1662
+ * Pauses the referral program, changing its status to `PAUSED`.
1663
+ * @public
1664
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1665
+ * @applicableIdentity APP
1666
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram
1667
+ */
1668
+ declare function pauseReferralProgram(): Promise<NonNullablePaths<PauseReferralProgramResponse, {
1669
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1670
+ }[ProgramNonNullablePaths]>>;
1671
+ /**
1672
+ * Retrieves pre-generated AI social media post suggestions for promoting the referral program.
1673
+ *
1674
+ * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.
1675
+ *
1676
+ * >**Note**: This method retrieves existing suggestions. To generate new ones,
1677
+ * use Generate AI Social Media Posts Suggestions.
1678
+ * @public
1679
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1680
+ * @applicableIdentity APP
1681
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions
1682
+ */
1683
+ declare function getAiSocialMediaPostsSuggestions(options?: GetAiSocialMediaPostsSuggestionsOptions): Promise<NonNullablePaths<GetAISocialMediaPostsSuggestionsResponse, `suggestions` | `suggestions.${number}.postContent`>>;
1603
1684
  interface GetAiSocialMediaPostsSuggestionsOptions {
1604
1685
  /**
1605
1686
  * Topic to generate social media post suggestions for. For example, fitness, education, or technology.
@@ -1607,6 +1688,18 @@ interface GetAiSocialMediaPostsSuggestionsOptions {
1607
1688
  */
1608
1689
  topic?: string;
1609
1690
  }
1691
+ /**
1692
+ * Creates new AI-generated social media post suggestions for promoting the referral program.
1693
+ *
1694
+ * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.
1695
+ *
1696
+ * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.
1697
+ * @public
1698
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1699
+ * @applicableIdentity APP
1700
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions
1701
+ */
1702
+ declare function generateAiSocialMediaPostsSuggestions(options?: GenerateAiSocialMediaPostsSuggestionsOptions): Promise<NonNullablePaths<GenerateAISocialMediaPostsSuggestionsResponse, `suggestions` | `suggestions.${number}.postContent`>>;
1610
1703
  interface GenerateAiSocialMediaPostsSuggestionsOptions {
1611
1704
  /**
1612
1705
  * Topic to generate social media post suggestions for. For example, fitness, education, or technology.
@@ -1614,5 +1707,14 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
1614
1707
  */
1615
1708
  topic?: string;
1616
1709
  }
1710
+ /**
1711
+ * Retrieves information about the enabled premium features for the referral program.
1712
+ * @public
1713
+ * @permissionId REFERRALS.READ_PROGRAM
1714
+ * @applicableIdentity APP
1715
+ * @applicableIdentity VISITOR
1716
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures
1717
+ */
1718
+ declare function getReferralProgramPremiumFeatures(): Promise<NonNullablePaths<GetReferralProgramPremiumFeaturesResponse, `referralProgram`>>;
1617
1719
 
1618
- export { type GetReferralProgramPremiumFeaturesRequest as $, type ActivateReferralProgramResponse as A, type Group as B, ContractSwitchType as C, DiscountType as D, type Emails as E, type FixedAmountDiscount as F, type GetReferralProgramResponse as G, type PremiumFeatures as H, IntervalUnit as I, type GetReferralProgramRequest as J, type BulkGetReferralProgramRequest as K, type LoyaltyPoints as L, type BulkGetReferralProgramResponse as M, Namespace as N, type ProgramInSite as O, type PauseReferralProgramResponse as P, type UpdateReferralProgramRequest as Q, type ReferralProgram as R, State as S, Type as T, type UpdateReferralProgramResponse as U, type ActivateReferralProgramRequest as V, WebhookIdentityType as W, type PauseReferralProgramRequest as X, type GetAISocialMediaPostsSuggestionsRequest as Y, type AISocialMediaPostSuggestion as Z, type GenerateAISocialMediaPostsSuggestionsRequest as _, type GetAiSocialMediaPostsSuggestionsOptions as a, type DomainEvent as a0, type DomainEventBodyOneOf as a1, type EntityCreatedEvent as a2, type RestoreInfo as a3, type EntityUpdatedEvent as a4, type EntityDeletedEvent as a5, type ActionEvent as a6, type Empty as a7, type MetaSiteSpecialEvent as a8, type MetaSiteSpecialEventPayloadOneOf as a9, type SubscriptionEventEventOneOf as aA, type SubscriptionCreated as aB, type Subscription as aC, type BillingReference as aD, type Cycle as aE, type CycleCycleSelectorOneOf as aF, type Interval as aG, type OneTime as aH, type ReactivationData as aI, type SubscriptionAssigned as aJ, type SubscriptionCancelled as aK, type CancellationDetails as aL, type SubscriptionAutoRenewTurnedOn as aM, type SubscriptionAutoRenewTurnedOff as aN, type SubscriptionUnassigned as aO, type SubscriptionTransferred as aP, type RecurringChargeSucceeded as aQ, type ContractSwitched as aR, type ProductPriceIncreaseData as aS, type SubscriptionNearEndOfPeriod as aT, type SubscriptionPendingChange as aU, type RecurringChargeAttemptFailed as aV, type MessageEnvelope as aW, type IdentificationData as aX, type IdentificationDataIdOneOf as aY, type BaseEventMetadata as aZ, type EventMetadata as a_, type Asset as aa, type SiteCreated as ab, type SiteTransferred as ac, type SiteDeleted as ad, type DeleteContext as ae, type SiteUndeleted as af, type SitePublished as ag, type SiteUnpublished as ah, type SiteMarkedAsTemplate as ai, type SiteMarkedAsWixSite as aj, type ServiceProvisioned as ak, type ServiceRemoved as al, type SiteRenamed as am, type SiteHardDeleted as an, type NamespaceChanged as ao, type StudioAssigned as ap, type StudioUnassigned as aq, type SiteUrlChanged as ar, type SitePurgedExternally as as, type OdeditorAssigned as at, type OdeditorUnassigned as au, type PicassoAssigned as av, type PicassoUnassigned as aw, type HtmlSitePublished as ax, type Page as ay, type SubscriptionEvent as az, type GetAISocialMediaPostsSuggestionsResponse as b, type GenerateAiSocialMediaPostsSuggestionsOptions as c, type GenerateAISocialMediaPostsSuggestionsResponse as d, type GetReferralProgramPremiumFeaturesResponse as e, type ProgramUpdatedEnvelope as f, ProgramStatus as g, Action as h, App as i, SiteCreatedContext as j, DeleteStatus as k, ProviderName as l, SubscriptionStatus as m, ReactivationReasonEnum as n, Initiator as o, UnassignReason as p, ContractSwitchReason as q, PriceIncreaseTrigger as r, ProductAdjustment as s, type Reward as t, type RewardOptionsOneOf as u, type Coupon as v, type CouponDiscountTypeOptionsOneOf as w, type CouponScopeOrMinSubtotalOneOf as x, type PercentageDiscount as y, type CouponScope as z };
1720
+ export { type AISocialMediaPostSuggestion, Action, type ActionEvent, type ActionWithLiterals, type ActivateReferralProgramRequest, type ActivateReferralProgramResponse, App, type AppWithLiterals, type Asset, type BaseEventMetadata, type BillingReference, type BulkGetReferralProgramRequest, type BulkGetReferralProgramResponse, type CancellationDetails, ContractSwitchReason, type ContractSwitchReasonWithLiterals, ContractSwitchType, type ContractSwitchTypeWithLiterals, type ContractSwitched, type Coupon, type CouponDiscountTypeOptionsOneOf, type CouponScope, type CouponScopeOrMinSubtotalOneOf, type Cycle, type CycleCycleSelectorOneOf, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Emails, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FixedAmountDiscount, type GenerateAISocialMediaPostsSuggestionsRequest, type GenerateAISocialMediaPostsSuggestionsResponse, type GenerateAiSocialMediaPostsSuggestionsOptions, type GetAISocialMediaPostsSuggestionsRequest, type GetAISocialMediaPostsSuggestionsResponse, type GetAiSocialMediaPostsSuggestionsOptions, type GetReferralProgramPremiumFeaturesRequest, type GetReferralProgramPremiumFeaturesResponse, type GetReferralProgramRequest, type GetReferralProgramResponse, type Group, type HtmlSitePublished, type IdentificationData, type IdentificationDataIdOneOf, Initiator, type InitiatorWithLiterals, type Interval, IntervalUnit, type IntervalUnitWithLiterals, type LoyaltyPoints, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type OneTime, type Page, type PauseReferralProgramRequest, type PauseReferralProgramResponse, type PercentageDiscount, type PicassoAssigned, type PicassoUnassigned, type PremiumFeatures, PriceIncreaseTrigger, type PriceIncreaseTriggerWithLiterals, ProductAdjustment, type ProductAdjustmentWithLiterals, type ProductPriceIncreaseData, type ProgramInSite, ProgramStatus, type ProgramStatusWithLiterals, type ProgramUpdatedEnvelope, ProviderName, type ProviderNameWithLiterals, type ReactivationData, ReactivationReasonEnum, type ReactivationReasonEnumWithLiterals, type RecurringChargeAttemptFailed, type RecurringChargeSucceeded, type ReferralProgram, type RestoreInfo, type Reward, type RewardOptionsOneOf, type ServiceProvisioned, type ServiceRemoved, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, State, type StateWithLiterals, type StudioAssigned, type StudioUnassigned, type Subscription, type SubscriptionAssigned, type SubscriptionAutoRenewTurnedOff, type SubscriptionAutoRenewTurnedOn, type SubscriptionCancelled, type SubscriptionCreated, type SubscriptionEvent, type SubscriptionEventEventOneOf, type SubscriptionNearEndOfPeriod, type SubscriptionPendingChange, SubscriptionStatus, type SubscriptionStatusWithLiterals, type SubscriptionTransferred, type SubscriptionUnassigned, Type, type TypeWithLiterals, UnassignReason, type UnassignReasonWithLiterals, type UpdateReferralProgramRequest, type UpdateReferralProgramResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, activateReferralProgram, generateAiSocialMediaPostsSuggestions, getAiSocialMediaPostsSuggestions, getReferralProgram, getReferralProgramPremiumFeatures, onProgramUpdated, pauseReferralProgram, updateReferralProgram };