import { NonNullablePaths } from '@wix/sdk-types'; interface FollowedChannel { /** * Followed social media channel ID. * @readonly * @format GUID */ _id?: string; /** * ID of the account that has followed a social media channel. * @readonly * @format GUID */ accountId?: string; /** Followed social media channel. */ channel?: TypeWithLiterals; /** * Date and time when an entity for following a social media channel was created. * @readonly */ _createdDate?: Date | null; } declare enum Type { /** Facebook social media channel. */ FACEBOOK = "FACEBOOK", /** Instagram social media channel. */ INSTAGRAM = "INSTAGRAM", /** LinkedIn social media channel. */ LINKEDIN = "LINKEDIN", /** X social media channel. */ X = "X", /** TikTok social media channel. */ TIKTOK = "TIKTOK" } /** @enumType */ type TypeWithLiterals = Type | 'FACEBOOK' | 'INSTAGRAM' | 'LINKEDIN' | 'X' | 'TIKTOK'; interface CreateFollowedChannelRequest { /** Followed social media channel details. */ followedChannel: FollowedChannel; } interface CreateFollowedChannelResponse { /** Followed social media channel details. */ followedChannel?: FollowedChannel; } interface ListFollowedChannelsRequest { } interface ListFollowedChannelsResponse { /** * List of followed social media channels. * @maxSize 5 */ followedChannels?: FollowedChannel[]; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface FollowedChannelCreatedEnvelope { entity: FollowedChannel; metadata: EventMetadata; } /** * Triggered when an account follows a new channel. * @permissionScope Read Loyalty * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY * @permissionScope Manage Loyalty * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ * @webhook * @eventType wix.loyalty.socialmedia.v1.followed_channel_created * @slug created */ declare function onFollowedChannelCreated(handler: (event: FollowedChannelCreatedEnvelope) => void | Promise): void; /** * Creates an entity for the specified account ID when the account follows a social media channel. * * Members can only follow enabled channels. A Wix user has to enable channels in the dashboard. * * >**Note:** * >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). * @param followedChannel - Followed social media channel details. * @public * @requiredField followedChannel * @requiredField followedChannel.channel * @permissionId LOYALTY.FOLLOWED_CHANNEL_CREATE * @applicableIdentity APP * @applicableIdentity MEMBER * @returns Followed social media channel details. * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel */ declare function createFollowedChannel(followedChannel: NonNullablePaths): Promise>; /** * Retrieves a list of social media channels followed by the account. The list is ordered by creation date. * * >**Note:** * >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities). * @public * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ * @applicableIdentity APP * @applicableIdentity MEMBER * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels */ declare function listFollowedChannels(): Promise>; export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type CreateFollowedChannelRequest, type CreateFollowedChannelResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FollowedChannel, type FollowedChannelCreatedEnvelope, type IdentificationData, type IdentificationDataIdOneOf, type ListFollowedChannelsRequest, type ListFollowedChannelsResponse, type MessageEnvelope, type RestoreInfo, Type, type TypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createFollowedChannel, listFollowedChannels, onFollowedChannelCreated };