export 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;
}
export 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?: WebhookIdentityType;
}
/** @oneof */
export 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;
}
export declare enum WebhookIdentityType {
    UNKNOWN = "UNKNOWN",
    ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
    MEMBER = "MEMBER",
    WIX_USER = "WIX_USER",
    APP = "APP"
}
export 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;
}
export interface ActionEvent {
    bodyAsJson?: string;
}
export 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 */
export interface DomainEventBodyOneOf {
    createdEvent?: EntityCreatedEvent;
    updatedEvent?: EntityUpdatedEvent;
    deletedEvent?: EntityDeletedEvent;
    actionEvent?: ActionEvent;
}
export interface EntityCreatedEvent {
    entityAsJson?: string;
    /**
     * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
     * @internal
     */
    triggeredByUndelete?: boolean | null;
    /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
    restoreInfo?: RestoreInfo;
    /**
     * Optional domain-specific metadata defined by the API owner, encoded as JSON.
     * @internal
     */
    additionalMetadataAsJson?: string | null;
}
export interface EntityDeletedEvent {
    /**
     * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
     * @internal
     */
    movedToTrash?: boolean | null;
    /** Entity that was deleted. */
    deletedEntityAsJson?: string | null;
    /**
     * Optional domain-specific metadata defined by the API owner, encoded as JSON.
     * @internal
     */
    additionalMetadataAsJson?: string | null;
}
export 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;
    /**
     * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
     * wont populate it / have any reference to it in the API.
     * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
     * the developer should send only the new (current) entity.
     * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
     * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
     * @internal
     * @deprecated
     */
    previousEntityAsJson?: string | null;
    /**
     * Map of fully qualified field paths to their previous values for fields that changed.
     * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
     * @internal
     */
    modifiedFields?: Record<string, any>;
    /**
     * Optional domain-specific metadata defined by the API owner, encoded as JSON.
     * @internal
     */
    additionalMetadataAsJson?: string | null;
}
export interface RestoreInfo {
    deletedDate?: Date | null;
}
export interface CreateGlobalTagRequest {
    /** The tag to be created. */
    tag: Tag;
}
export interface CreateGlobalTagResponse {
    /** The created tag. */
    tag?: Tag;
}
export interface CreateTagForAccountRequest {
    /** The tag to be created. */
    tag: Tag;
}
export interface CreateTagForAccountResponse {
    /** The created tag. */
    tag?: Tag;
}
export interface CreateTagRequest {
    /** The tag to be created. */
    tag: Tag;
}
export interface CreateTagResponse {
    /** The created tag. */
    tag?: Tag;
}
export interface DeleteGlobalTagRequest {
    /**
     * ID of the tag to delete.
     * @maxLength 5
     */
    tagId: string;
}
export interface DeleteGlobalTagResponse {
}
export interface DeleteTagForAccountRequest {
    /**
     * ID of the tag to delete.
     * @maxLength 5
     */
    tagId: string;
}
export interface DeleteTagForAccountResponse {
}
export interface DeleteTagRequest {
    /**
     * ID of the tag to delete.
     * @maxLength 5
     */
    tagId: string;
}
export interface DeleteTagResponse {
}
export interface GetGlobalTagRequest {
    /**
     * The ID of the tag to retrieve.
     * @maxLength 5
     */
    tagId: string;
}
export interface GetGlobalTagResponse {
    /** The requested tag. */
    tag?: Tag;
}
export interface GetTagForAccountRequest {
    /**
     * The ID of the tag to retrieve.
     * @maxLength 5
     */
    tagId: string;
}
export interface GetTagForAccountResponse {
    /** The requested tag. */
    tag?: Tag;
}
export interface GetTagRequest {
    /**
     * The ID of the tag to retrieve.
     * @maxLength 5
     */
    tagId: string;
}
export interface GetTagResponse {
    /** The requested tag. */
    tag?: Tag;
}
export interface ListGlobalTagsRequest {
    /**
     * The Fully Qualified Domain Name (FQDN) to which the tags are associated.
     * @maxLength 255
     */
    fqdn: string;
    /**
     * The tag exposure.
     * @internal
     */
    exposure?: TagExposure;
}
export interface ListGlobalTagsResponse {
    /** A list of tags. */
    tags?: Tag[];
}
export interface ListTagsForAccountRequest {
    /**
     * The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
     * @maxLength 255
     */
    fqdn: string;
    /**
     * The tag exposure.
     * @internal
     */
    exposure?: TagExposure;
}
export interface ListTagsForAccountResponse {
    /** A list of tags. */
    tags?: Tag[];
}
export interface ListTagsRequest {
    /**
     * The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
     * @maxLength 255
     */
    fqdn: string;
    /**
     * The tag exposure.
     * @internal
     */
    exposure?: TagExposure;
}
export interface ListTagsResponse {
    /** A list of tags. */
    tags?: Tag[];
}
export interface MigrateTagRequest {
    /** The tag to be migrated with custom createdDate. */
    tag: Tag;
}
export interface MigrateTagResponse {
    /** The migrated tag. */
    tag?: Tag;
}
export interface QueryTagsForAccountRequest {
    /**
     * The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
     * @maxLength 255
     */
    fqdn: string;
    /**
     * The tag exposure.
     * @internal
     */
    exposure?: TagExposure;
    /** WQL expression. */
    query: CursorQuery;
}
export interface QueryTagsForAccountResponse {
    /** A list of tags. */
    tags?: Tag[];
    /** Paging metadata */
    pagingMetadata?: CursorPagingMetadata;
}
export interface QueryTagsRequest {
    /**
     * The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
     * @maxLength 255
     */
    fqdn: string;
    /**
     * The tag exposure.
     * @internal
     */
    exposure?: TagExposure;
    /** WQL expression. */
    query: CursorQuery;
}
export interface QueryTagsResponse {
    /** A list of tags. */
    tags?: Tag[];
    /** Paging metadata */
    pagingMetadata?: CursorPagingMetadata;
}
export interface Tag {
    /**
     * Tag ID.
     * @readonly
     * @maxLength 5
     */
    id?: string | null;
    /**
     * Revision number, which increments by 1 each time the tag is updated.
     * @readonly
     */
    revision?: string | null;
    /**
     * Date and time the tag was created.
     * @readonly
     */
    createdDate?: Date | null;
    /**
     * Date and time the tag was last updated.
     * @readonly
     */
    updatedDate?: Date | null;
    /**
     * Tag name.
     * @maxLength 255
     */
    name?: string | null;
    /**
     * FQDN of the entity that belongs to this tag.
     * @immutable
     * @maxLength 255
     */
    fqdn?: string | null;
    /**
     * Tag exposure.
     * @internal
     */
    exposure?: TagExposure;
    /**
     * Indicates whether this tag is deleted.
     * @internal
     * @readonly
     */
    deleted?: boolean | null;
}
export declare enum TagExposure {
    UNKNOWN = "UNKNOWN",
    PRIVATE = "PRIVATE",
    /** Not handled by client yet. */
    PUBLIC = "PUBLIC"
}
export interface UpdateGlobalTagRequest {
    /** The tag to be updated, which may be partial. */
    tag: Tag;
}
export interface UpdateGlobalTagResponse {
    /** The updated tag. */
    tag?: Tag;
}
export interface UpdateTagForAccountRequest {
    /** The tag to be updated, which may be partial. */
    tag: Tag;
}
export interface UpdateTagForAccountResponse {
    /** The updated tag. */
    tag?: Tag;
}
export interface UpdateTagRequest {
    /** The tag to be updated, which may be partial. */
    tag: Tag;
}
export interface UpdateTagResponse {
    /** The updated tag. */
    tag?: Tag;
}
export interface CursorPaging {
    /**
     * Maximum number of items to return in the results.
     * @max 100
     */
    limit?: number | null;
    /**
     * Pointer to the next or previous page in the list of results.
     *
     * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
     * Not relevant for the first request.
     * @maxLength 16000
     */
    cursor?: string | null;
}
export interface CursorPagingMetadata {
    /** Number of items returned in current page. */
    count?: number | null;
    /** Cursor strings that point to the next page, previous page, or both. */
    cursors?: Cursors;
    /**
     * Whether there are more pages to retrieve following the current page.
     *
     * + `true`: Another page of results can be retrieved.
     * + `false`: This is the last page.
     */
    hasNext?: boolean | null;
}
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
    /**
     * Cursor paging options.
     *
     * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
     */
    cursorPaging?: CursorPaging;
    /**
     * Filter object.
     *
     * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
     */
    filter?: Record<string, any> | null;
    /**
     * Sort object.
     *
     * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
     * @maxSize 5
     */
    sort?: Sorting[];
}
/** @oneof */
export interface CursorQueryPagingMethodOneOf {
    /**
     * Cursor paging options.
     *
     * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
     */
    cursorPaging?: CursorPaging;
}
export interface Cursors {
    /**
     * Cursor string pointing to the next page in the list of results.
     * @maxLength 16000
     */
    next?: string | null;
    /**
     * Cursor pointing to the previous page in the list of results.
     * @maxLength 16000
     */
    prev?: string | null;
}
export interface Sorting {
    /**
     * Name of the field to sort by.
     * @maxLength 512
     */
    fieldName?: string;
    /** Sort order. */
    order?: SortOrder;
}
export declare enum SortOrder {
    ASC = "ASC",
    DESC = "DESC"
}
/** @docsIgnore */
export type CreateGlobalTagApplicationErrors = {
    code?: 'FQDN_NOT_FOUND';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAG_NAME_ALREADY_EXISTS';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAGS_REACHED_LIMIT';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS';
    description?: string;
    data?: Record<string, any>;
};
/** @docsIgnore */
export type CreateTagForAccountApplicationErrors = {
    code?: 'FQDN_NOT_FOUND';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAG_NAME_ALREADY_EXISTS';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAGS_REACHED_LIMIT';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS';
    description?: string;
    data?: Record<string, any>;
};
/** @docsIgnore */
export type CreateTagApplicationErrors = {
    code?: 'FQDN_NOT_FOUND';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAG_NAME_ALREADY_EXISTS';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'TAGS_REACHED_LIMIT';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS';
    description?: string;
    data?: Record<string, any>;
} | {
    code?: 'EXPOSURE_NOT_SUPPORTED';
    description?: string;
    data?: Record<string, any>;
};
