import { NonNullablePaths } from '@wix/sdk-types'; /** A `connectedDomain` object holds information about an external domain and its connection to a Wix site. */ interface ConnectedDomain { /** * ID of the connected domain. Identical to the domain name including TLD. * @format HOSTNAME * @readonly */ _id?: string; /** * Domain name including TLD. * Both root domains and subdomains are supported. * @format HOSTNAME */ domain?: string; /** How the domain is connected to the Wix site. */ connectionType?: ConnectionTypeWithLiterals; /** * Information about the site to which the domain is assigned, and whether * it's the primary domain or a redirect. */ siteInfo?: SiteInfo; /** * Whether the site owner receives standard email notifications from Wix about * the connected domain. * * Default: `false` */ suppressNotifications?: boolean; /** * DNS propagation status. * @readonly */ dnsPropagationStatus?: DnsPropagationStatusWithLiterals; /** * Date and time the `connectedDomain` object was created in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _createdDate?: Date | null; /** * Date and time the `connectedDomain` object was last updated in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _updatedDate?: Date | null; } declare enum ConnectionType { /** The domain is connected by pointing. Wix doesn't manage DNS information. */ POINTING = "POINTING", /** The domain is connected by nameservers. Wix manages DNS information. */ NAMESERVERS = "NAMESERVERS", /** The domain isn't visible to site visitors. */ HIDDEN = "HIDDEN" } /** @enumType */ type ConnectionTypeWithLiterals = ConnectionType | 'POINTING' | 'NAMESERVERS' | 'HIDDEN'; interface SiteInfo extends SiteInfoAssignmentInfoOneOf { /** * Redirect information, relevant when `assignmentType` = `REDIRECT`. * @readonly */ redirectInfo?: RedirectAssignmentInfo; /** * ID of the site to which the domain is assigned. * @readonly * @format GUID */ _id?: string | null; /** * The relationship assigned for this domain to the site. * * Read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains). */ assignmentType?: AssignmentTypeWithLiterals; } /** @oneof */ interface SiteInfoAssignmentInfoOneOf { /** * Redirect information, relevant when `assignmentType` = `REDIRECT`. * @readonly */ redirectInfo?: RedirectAssignmentInfo; } declare enum AssignmentType { /** The singular primary domain for a site. When this type is assigned, this domain will lead directly to the site. */ PRIMARY = "PRIMARY", /** A redirect domain for a site. Each site can have multiple redirect domains. When this type is assigned, this domain will redirect to the primary domain. */ REDIRECT = "REDIRECT" } /** @enumType */ type AssignmentTypeWithLiterals = AssignmentType | 'PRIMARY' | 'REDIRECT'; interface RedirectAssignmentInfo { /** * Primary domain to which this domain will redirect. * @format HOSTNAME * @readonly */ primaryDomain?: string; } declare enum DnsPropagationStatus { /** The domain's DNS propagation process has successfully finished. */ COMPLETED = "COMPLETED", /** The domain's DNS propagation process has failed. */ FAILED = "FAILED", /** The domain's DNS propagation process has started but hasn't successfully completed yet. */ IN_PROGRESS = "IN_PROGRESS" } /** @enumType */ type DnsPropagationStatusWithLiterals = DnsPropagationStatus | 'COMPLETED' | 'FAILED' | 'IN_PROGRESS'; interface CreateConnectedDomainRequest { /** Domain to connect. */ connectedDomain: ConnectedDomain; } interface CreateConnectedDomainResponse { /** Connected domain. */ connectedDomain?: ConnectedDomain; } interface GetConnectedDomainRequest { /** * ID of the connected domain. Identical to the domain name including TLD. * @format HOSTNAME */ connectedDomainId: string; } interface GetConnectedDomainResponse { /** Retrieved connected domain. */ connectedDomain?: ConnectedDomain; } interface DeleteConnectedDomainRequest { /** * ID of the connected domain to delete. Identical to the domain name including TLD. * @format HOSTNAME */ connectedDomainId: string; } interface DeleteConnectedDomainResponse { } interface ListConnectedDomainsRequest { /** Cursor paging options. */ paging?: CursorPaging; } interface CursorPaging { /** * Number of domains to load. * * Min: `0` * Max: `100` * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface ListConnectedDomainsResponse { /** Metadata about the returned list of connected domains. */ pagingMetadata?: CursorPagingMetadata; /** Retrieved connected domains. */ connectedDomains?: ConnectedDomain[]; } interface CursorPagingMetadata { /** Number of domains returned in the response. */ count?: number | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } 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 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; } /** * Creates a `connectedDomain` object and starts the domain connection process. It may take up to 48 hours for the DNS changes to take effect. * * You must pass the relevant Wix account ID in the header of the call. You may also pass a Wix site ID in the header. * * You can only connect external domains using this endpoint. * * You can connect both root domains and subdomains to Wix sites. * * The domain can be assigned as a primary domain or a redirect. You can read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains). If you connect a domain as `"PRIMARY"` to a Wix site, the existing primary domain automatically becomes unassigned. * * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header. * @param connectedDomain - Domain to connect. * @public * @requiredField connectedDomain * @requiredField connectedDomain.domain * @permissionId DOMAINS.MANAGE_CONNECTED_DOMAINS * @returns Connected domain. * @fqn com.wixpress.premium.domain.connected.ConnectedDomainService.CreateConnectedDomain */ declare function createConnectedDomain(connectedDomain: NonNullablePaths): Promise>; /** * Retrieves a connected domain. * * * You must pass the relevant Wix account ID in the header of the call. * * > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header. * @param connectedDomainId - ID of the connected domain. Identical to the domain name including TLD. * @public * @requiredField connectedDomainId * @permissionId DOMAINS.READ_CONNECTED_DOMAINS * @returns Retrieved connected domain. * @fqn com.wixpress.premium.domain.connected.ConnectedDomainService.GetConnectedDomain */ declare function getConnectedDomain(connectedDomainId: string): Promise>; /** * Deletes a `connectedDomain` object and removes related DNS records from * [Google's Cloud DNS](https://cloud.google.com/dns). * * * You must pass the relevant Wix account ID in the header of the call. * * If you delete a `"PRIMARY"` domain, the site automatically uses the standard * URL for free Wix sites. Read more about * [URLs of free Wix sites](https://support.wix.com/en/article/changing-your-free-wix-url-8591528). * * When you delete a subdomain, its CNAME record is deleted from Google's Cloud DNS. * * > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header. * @param connectedDomainId - ID of the connected domain to delete. Identical to the domain name including TLD. * @public * @requiredField connectedDomainId * @permissionId DOMAINS.MANAGE_CONNECTED_DOMAINS * @fqn com.wixpress.premium.domain.connected.ConnectedDomainService.DeleteConnectedDomain */ declare function deleteConnectedDomain(connectedDomainId: string): Promise; /** * Retrieves a list of up to 100 connected domains. * * * You must pass the relevant Wix account ID in the header of the call. * * The retrieved domains are sorted by `createdDate` in descending order. * * > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header. * @public * @param options - Filter options. * @permissionId DOMAINS.READ_CONNECTED_DOMAINS * @fqn com.wixpress.premium.domain.connected.ConnectedDomainService.ListConnectedDomains */ declare function listConnectedDomains(options?: ListConnectedDomainsOptions): Promise>; interface ListConnectedDomainsOptions { /** Cursor paging options. */ paging?: CursorPaging; } export { type AccountInfo, type ActionEvent, AssignmentType, type AssignmentTypeWithLiterals, type ConnectedDomain, ConnectionType, type ConnectionTypeWithLiterals, type CreateConnectedDomainRequest, type CreateConnectedDomainResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteConnectedDomainRequest, type DeleteConnectedDomainResponse, DnsPropagationStatus, type DnsPropagationStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetConnectedDomainRequest, type GetConnectedDomainResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListConnectedDomainsOptions, type ListConnectedDomainsRequest, type ListConnectedDomainsResponse, type MessageEnvelope, type RedirectAssignmentInfo, type RestoreInfo, type SiteInfo, type SiteInfoAssignmentInfoOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createConnectedDomain, deleteConnectedDomain, getConnectedDomain, listConnectedDomains };