@wix/auto_sdk_referral_programs 1.0.24 → 1.0.26

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,92 @@ interface ProgramUpdatedEnvelope {
1600
1609
  entity: ReferralProgram;
1601
1610
  metadata: EventMetadata;
1602
1611
  }
1612
+ /**
1613
+ * Triggered when a referral program is updated.
1614
+ * @permissionScope Manage Restaurants - all permissions
1615
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1616
+ * @permissionScope Manage Referrals
1617
+ * @permissionScopeId SCOPE.DC-REFERRALS.MANAGE-REFERRALS
1618
+ * @permissionId REFERRALS.READ_PROGRAM
1619
+ * @webhook
1620
+ * @eventType wix.loyalty.referral.v1.program_updated
1621
+ * @serviceIdentifier wix.loyalty.referral.program.v1.ReferralPrograms
1622
+ * @slug updated
1623
+ */
1624
+ declare function onProgramUpdated(handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>): void;
1625
+ 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`;
1626
+ /**
1627
+ * Retrieves the referral program.
1628
+ * @public
1629
+ * @permissionId REFERRALS.READ_PROGRAM
1630
+ * @applicableIdentity APP
1631
+ * @applicableIdentity VISITOR
1632
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram
1633
+ */
1634
+ declare function getReferralProgram(): Promise<NonNullablePaths<GetReferralProgramResponse, {
1635
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1636
+ }[ProgramNonNullablePaths]>>;
1637
+ /**
1638
+ * Retrieves multiple referral programs for all metasites that the caller is the member of.
1639
+ *
1640
+ * Must be called with a [user identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#identity-types).
1641
+ * @internal
1642
+ * @documentationMaturity preview
1643
+ * @permissionId REFERRALS.PROGRAM_BULK_READ
1644
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.BulkGetReferralProgram
1645
+ */
1646
+ declare function bulkGetReferralProgram(): Promise<NonNullablePaths<BulkGetReferralProgramResponse, `programInSites` | `programInSites.${number}.metaSiteId` | {
1647
+ [P in ProgramNonNullablePaths]: `programInSites.${number}.referralProgram.${P}`;
1648
+ }[ProgramNonNullablePaths]>>;
1649
+ /**
1650
+ * Updates a referral program. Supports partial updates.
1651
+ *
1652
+ * Revision number, which increments by 1 each time the referral program is updated.
1653
+ * To prevent conflicting changes, the current revision must be passed when updating the referral program.
1654
+ * @param referralProgram - Referral program to update. Include the latest `revision` for a successful update.
1655
+ * @public
1656
+ * @requiredField referralProgram
1657
+ * @requiredField referralProgram.revision
1658
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1659
+ * @applicableIdentity APP
1660
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram
1661
+ */
1662
+ declare function updateReferralProgram(referralProgram: NonNullablePaths<ReferralProgram, `revision`>): Promise<NonNullablePaths<UpdateReferralProgramResponse, {
1663
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1664
+ }[ProgramNonNullablePaths]>>;
1665
+ /**
1666
+ * Activates the referral program, changing its status to `ACTIVE`.
1667
+ * @public
1668
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1669
+ * @applicableIdentity APP
1670
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram
1671
+ */
1672
+ declare function activateReferralProgram(): Promise<NonNullablePaths<ActivateReferralProgramResponse, {
1673
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1674
+ }[ProgramNonNullablePaths]>>;
1675
+ /**
1676
+ * Pauses the referral program, changing its status to `PAUSED`.
1677
+ * @public
1678
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1679
+ * @applicableIdentity APP
1680
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram
1681
+ */
1682
+ declare function pauseReferralProgram(): Promise<NonNullablePaths<PauseReferralProgramResponse, {
1683
+ [P in ProgramNonNullablePaths]: `referralProgram.${P}`;
1684
+ }[ProgramNonNullablePaths]>>;
1685
+ /**
1686
+ * Retrieves pre-generated AI social media post suggestions for promoting the referral program.
1687
+ *
1688
+ * 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.
1689
+ *
1690
+ * >**Note**: This method retrieves existing suggestions. To generate new ones,
1691
+ * use Generate AI Social Media Posts Suggestions.
1692
+ * @public
1693
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1694
+ * @applicableIdentity APP
1695
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions
1696
+ */
1697
+ declare function getAiSocialMediaPostsSuggestions(options?: GetAiSocialMediaPostsSuggestionsOptions): Promise<NonNullablePaths<GetAISocialMediaPostsSuggestionsResponse, `suggestions` | `suggestions.${number}.postContent`>>;
1603
1698
  interface GetAiSocialMediaPostsSuggestionsOptions {
1604
1699
  /**
1605
1700
  * Topic to generate social media post suggestions for. For example, fitness, education, or technology.
@@ -1607,6 +1702,18 @@ interface GetAiSocialMediaPostsSuggestionsOptions {
1607
1702
  */
1608
1703
  topic?: string;
1609
1704
  }
1705
+ /**
1706
+ * Creates new AI-generated social media post suggestions for promoting the referral program.
1707
+ *
1708
+ * 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.
1709
+ *
1710
+ * >**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.
1711
+ * @public
1712
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1713
+ * @applicableIdentity APP
1714
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions
1715
+ */
1716
+ declare function generateAiSocialMediaPostsSuggestions(options?: GenerateAiSocialMediaPostsSuggestionsOptions): Promise<NonNullablePaths<GenerateAISocialMediaPostsSuggestionsResponse, `suggestions` | `suggestions.${number}.postContent`>>;
1610
1717
  interface GenerateAiSocialMediaPostsSuggestionsOptions {
1611
1718
  /**
1612
1719
  * Topic to generate social media post suggestions for. For example, fitness, education, or technology.
@@ -1614,5 +1721,14 @@ interface GenerateAiSocialMediaPostsSuggestionsOptions {
1614
1721
  */
1615
1722
  topic?: string;
1616
1723
  }
1724
+ /**
1725
+ * Retrieves information about the enabled premium features for the referral program.
1726
+ * @public
1727
+ * @permissionId REFERRALS.READ_PROGRAM
1728
+ * @applicableIdentity APP
1729
+ * @applicableIdentity VISITOR
1730
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures
1731
+ */
1732
+ declare function getReferralProgramPremiumFeatures(): Promise<NonNullablePaths<GetReferralProgramPremiumFeaturesResponse, `referralProgram`>>;
1617
1733
 
1618
- export { type GetReferralProgramPremiumFeaturesRequest as $, type ActivateReferralProgramResponse as A, type BulkGetReferralProgramResponse as B, ContractSwitchType as C, DiscountType as D, type Group as E, type FixedAmountDiscount as F, type GetReferralProgramResponse as G, type Emails as H, IntervalUnit as I, type PremiumFeatures as J, type GetReferralProgramRequest as K, type LoyaltyPoints as L, type BulkGetReferralProgramRequest 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 };
1734
+ 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, bulkGetReferralProgram, generateAiSocialMediaPostsSuggestions, getAiSocialMediaPostsSuggestions, getReferralProgram, getReferralProgramPremiumFeatures, onProgramUpdated, pauseReferralProgram, updateReferralProgram };