import { GetEmailSubscriptionRequest as GetEmailSubscriptionRequest$1, GetEmailSubscriptionResponse as GetEmailSubscriptionResponse$1, QueryEmailSubscriptionsRequest as QueryEmailSubscriptionsRequest$1, QueryEmailSubscriptionsResponse as QueryEmailSubscriptionsResponse$1, UpsertEmailSubscriptionRequest as UpsertEmailSubscriptionRequest$1, UpsertEmailSubscriptionResponse as UpsertEmailSubscriptionResponse$1, BulkUpsertEmailSubscriptionRequest as BulkUpsertEmailSubscriptionRequest$1, BulkUpsertEmailSubscriptionResponse as BulkUpsertEmailSubscriptionResponse$1, GenerateUnsubscribeLinkRequest as GenerateUnsubscribeLinkRequest$1, GenerateUnsubscribeLinkResponse as GenerateUnsubscribeLinkResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface EmailSubscription { /** * Email subscription ID. * @format GUID * @readonly */ id?: string | null; /** * Email address. * @format EMAIL */ email?: string; /** * Indicates the recipient's opt-in or opt-out status * for marketing emails. * * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known. * - `PENDING`: Subscription confirmation was requested, * but recipient hasn't confirmed yet. * - `SUBSCRIBED`: Recipient has opted in to marketing emails. * - `UNSUBSCRIBED`: Recipient has opted out of marketing emails. * * Defaults to `NOT_SET`. */ subscriptionStatus?: SubscriptionEnumStatusWithLiterals; /** * Indicates last reported status of sent emails. * * - `NOT_SET`: No status specified. This is the default, initial value before any info about the email address is known. * - `VALID`: Emails to this email address are being delivered successfully. * - `BOUNCED`: The last email to the recipient bounced or was rejected. * - `SPAM_COMPLAINT`: The recipient registered a spam complaint * with their email provider. * - `INACTIVE`: Multiple campaigns have been delivered to this address without any engagement from the recipient. (No emails were opened and no content was clicked.) * This status might impact subsequent emails sent to this address. * * Defaults to `NOT_SET`. */ deliverabilityStatus?: StatusWithLiterals; /** * Date and time the email subscription was created. * @readonly */ createdDate?: Date | null; /** * Date and time the email subscription was last updated. * @readonly */ updatedDate?: Date | null; } declare enum SubscriptionEnumStatus { UNKNOWN = "UNKNOWN", /** No Subscription exists */ NOT_SET = "NOT_SET", /** Pending Subscription */ PENDING = "PENDING", /** Subscribed */ SUBSCRIBED = "SUBSCRIBED", /** UnSubscribed */ UNSUBSCRIBED = "UNSUBSCRIBED" } /** @enumType */ type SubscriptionEnumStatusWithLiterals = SubscriptionEnumStatus | 'UNKNOWN' | 'NOT_SET' | 'PENDING' | 'SUBSCRIBED' | 'UNSUBSCRIBED'; declare enum Status { NOT_SET = "NOT_SET", /** valid/deferral */ VALID = "VALID", /** bounced/rejected/invalid */ BOUNCED = "BOUNCED", /** spam/complaint */ SPAM_COMPLAINT = "SPAM_COMPLAINT", /** valid, but no activity reported */ INACTIVE = "INACTIVE" } /** @enumType */ type StatusWithLiterals = Status | 'NOT_SET' | 'VALID' | 'BOUNCED' | 'SPAM_COMPLAINT' | 'INACTIVE'; /** Triggered when an email subscription's status is changed. */ interface EmailSubscriptionChanged { /** Email subscription that changed. */ subscription?: EmailSubscription; } interface GetEmailSubscriptionRequest { /** @format GUID */ id: string; } interface GetEmailSubscriptionResponse { /** Returned email subscription */ emailSubscription?: EmailSubscription; } interface UpdateEmailSubscriptionRequest { /** Email subscription to update */ subscription?: EmailSubscription; } interface UpdateEmailSubscriptionResponse { /** Updated email subscription */ subscription?: EmailSubscription; } interface QueryEmailSubscriptionsRequest { /** * Filter options. * Currently, querying is supported on the `email` field * with the `$in` array filter. */ filter: Record | null; /** * Pagination options. For more information, see * [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ paging?: Paging; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface QueryEmailSubscriptionsResponse { /** List of subscribed emails that matched the query options. */ subscriptions?: EmailSubscription[]; /** Metadata for the paginated results. */ metadata?: PagingMetadata; } interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; } interface UpsertEmailSubscriptionRequest { /** Email subscription to update or create. */ subscription?: EmailSubscription; } interface UpsertEmailSubscriptionResponse { /** Updated or created email subscription. */ subscription?: EmailSubscription; } interface BulkUpsertEmailSubscriptionRequest { /** * List of email subscriptions to update or create. * @minSize 1 * @maxSize 100 */ subscriptions: EmailSubscription[]; } interface BulkUpsertEmailSubscriptionResponse { /** List of updated or created email subscriptions. */ results?: BulkUpsertEmailSubscriptionResult[]; /** Numbers of successful and failed actions. */ metadata?: Metadata; } interface BulkUpsertEmailSubscriptionResult { /** Position of the requested email subscription in the bulk array. */ originalIndex?: number; /** New or updated email subscription. */ emailSubscription?: EmailSubscription; /** * Error information if the action failed. * Omitted from successful actions. */ error?: Error; } interface Error { /** Error code. */ errorCode?: string; /** Message that contains details about the error. */ message?: string; } interface Metadata { /** Number of successful actions. */ totalSuccess?: number; /** Number of failed actions. */ totalFailure?: number; } interface GenerateUnsubscribeLinkRequest { /** * Email address the unsubscribe link is for. * @format EMAIL */ emailAddress: string; /** Arbitrary parameters for closing-the-loop. */ metadata?: Record; /** * Language for displaying unsubscribe confirmation page. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * * Default: `EN` * @format LANGUAGE */ language?: string | null; } interface GenerateUnsubscribeLinkResponse { /** The unsubscribe link. */ link?: string; } interface RenderUnsubscribePageRequest { /** Payload */ payload?: string; /** Language */ language?: string | null; } interface RawHttpResponse { body?: Uint8Array; statusCode?: number | null; headers?: HeadersEntry[]; } interface HeadersEntry { key?: string; value?: string; } interface ConfirmUnsubscribeActionRequest { /** Payload */ payload?: string; } interface Empty { } 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 { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } 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. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } 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 V1RenderUnsubscribePageRequest { /** Payload */ payload?: string; /** Language */ language?: string | null; } interface V1ConfirmUnsubscribeActionRequest { /** Payload */ payload?: string; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getEmailSubscription(): __PublicMethodMetaInfo<'GET', { id: string; }, GetEmailSubscriptionRequest$1, GetEmailSubscriptionRequest, GetEmailSubscriptionResponse$1, GetEmailSubscriptionResponse>; declare function queryEmailSubscriptions(): __PublicMethodMetaInfo<'POST', {}, QueryEmailSubscriptionsRequest$1, QueryEmailSubscriptionsRequest, QueryEmailSubscriptionsResponse$1, QueryEmailSubscriptionsResponse>; declare function upsertEmailSubscription(): __PublicMethodMetaInfo<'POST', {}, UpsertEmailSubscriptionRequest$1, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionResponse$1, UpsertEmailSubscriptionResponse>; declare function bulkUpsertEmailSubscription(): __PublicMethodMetaInfo<'POST', {}, BulkUpsertEmailSubscriptionRequest$1, BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionResponse$1, BulkUpsertEmailSubscriptionResponse>; declare function generateUnsubscribeLink(): __PublicMethodMetaInfo<'POST', {}, GenerateUnsubscribeLinkRequest$1, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkResponse$1, GenerateUnsubscribeLinkResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type BulkUpsertEmailSubscriptionRequest as BulkUpsertEmailSubscriptionRequestOriginal, type BulkUpsertEmailSubscriptionResponse as BulkUpsertEmailSubscriptionResponseOriginal, type BulkUpsertEmailSubscriptionResult as BulkUpsertEmailSubscriptionResultOriginal, type ConfirmUnsubscribeActionRequest as ConfirmUnsubscribeActionRequestOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EmailSubscriptionChanged as EmailSubscriptionChangedOriginal, type EmailSubscription as EmailSubscriptionOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type Error as ErrorOriginal, type GenerateUnsubscribeLinkRequest as GenerateUnsubscribeLinkRequestOriginal, type GenerateUnsubscribeLinkResponse as GenerateUnsubscribeLinkResponseOriginal, type GetEmailSubscriptionRequest as GetEmailSubscriptionRequestOriginal, type GetEmailSubscriptionResponse as GetEmailSubscriptionResponseOriginal, type HeadersEntry as HeadersEntryOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Metadata as MetadataOriginal, type PagingMetadata as PagingMetadataOriginal, type Paging as PagingOriginal, type QueryEmailSubscriptionsRequest as QueryEmailSubscriptionsRequestOriginal, type QueryEmailSubscriptionsResponse as QueryEmailSubscriptionsResponseOriginal, type RawHttpResponse as RawHttpResponseOriginal, type RenderUnsubscribePageRequest as RenderUnsubscribePageRequestOriginal, type RestoreInfo as RestoreInfoOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, SubscriptionEnumStatus as SubscriptionEnumStatusOriginal, type SubscriptionEnumStatusWithLiterals as SubscriptionEnumStatusWithLiteralsOriginal, type UpdateEmailSubscriptionRequest as UpdateEmailSubscriptionRequestOriginal, type UpdateEmailSubscriptionResponse as UpdateEmailSubscriptionResponseOriginal, type UpsertEmailSubscriptionRequest as UpsertEmailSubscriptionRequestOriginal, type UpsertEmailSubscriptionResponse as UpsertEmailSubscriptionResponseOriginal, type V1ConfirmUnsubscribeActionRequest as V1ConfirmUnsubscribeActionRequestOriginal, type V1RenderUnsubscribePageRequest as V1RenderUnsubscribePageRequestOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkUpsertEmailSubscription, generateUnsubscribeLink, getEmailSubscription, queryEmailSubscriptions, upsertEmailSubscription };