export interface GCBackup { /** @readonly */ id?: string; } export interface CreateGCBackupRequest { instanceId?: string; segment?: Segment; clusterId?: string; databaseName?: string; } export declare enum Segment { Dev = "Dev", Public = "Public" } export interface CreateGCBackupResponse { backupId?: string | null; } export interface GetGCBackupRequest { backupId?: string; } export interface GCBackupResponse { backupId?: string; instanceId?: string; segment?: Segment; clusterId?: string; databaseName?: string; status?: GCBackupResponseStatus; size?: string | null; requestedDate?: Date | null; finishedDate?: Date | null; restorations?: Restoration[]; } export declare enum RestorationStatus { PENDING = "PENDING", FAILED = "FAILED", COMPLETED = "COMPLETED", CANCELED = "CANCELED" } export declare enum GCBackupResponseStatus { PENDING = "PENDING", READY = "READY", FAILED = "FAILED", CANCELED = "CANCELED" } export interface Restoration { restorationId?: string; clusterId?: string; databaseName?: string; status?: RestorationStatus; instanceId?: string | null; } export interface FindGCBackupRequest { instanceId?: string; segment?: Segment; clusterId?: string; databaseName?: string; } export interface FindGCBackupResponse { backups?: GCBackupResponse[]; } export interface RestoreGCBackupRequest { instanceId?: string; backupId?: string; clusterId?: string; databaseName?: string; } export interface RestoreGCBackupResponse { restorationId?: string; } export interface CancelGCBackupRequest { backupId?: string; } export interface CancelGCBackupResponse { } export interface CancelGCRestorationRequest { backupId?: string; restorationId?: string; } export interface CancelGCRestorationResponse { } export interface DeleteExpiredBackupRecordsRequest { } export interface DeleteExpiredBackupRecordsResponse { } export interface Backup { /** * Backup ID. * @readonly */ id?: string; /** * Backup status. * @readonly */ status?: Status; /** * Type of backup, based on how it was triggered. * @readonly */ type?: Type; /** * Date and time the backup was requested. * @readonly */ requestedDate?: Date | null; /** * Date and time the backup commenced. Value is `null` until the backup process begins in the background. * @readonly */ startedDate?: Date | null; /** * Date and time the backup process finished. Value is `null` until the backup process is completed in the background. * @readonly */ finishedDate?: Date | null; /** * Date and time the backup was deleted. Value is `null` if that backup hasn't been deleted. * @readonly */ deletedDate?: Date | null; /** * Backup size in bytes. Value is `null` until the backup process is completed. * @readonly */ sizeInBytes?: string | null; /** * IDs and display names of collections the backup contains. * @readonly */ collections?: Collection[]; } export declare enum Status { /** Backup creation is in progress. */ PENDING = "PENDING", /** Backup has been created successfully and can be used for data restoration. */ READY = "READY", /** Backup creation has failed. */ FAILED = "FAILED", /** Backup has been deleted. */ DELETED = "DELETED", /** Backup has been canceled. */ CANCELED = "CANCELED" } export declare enum Type { /** Backup taken on demand. */ ON_DEMAND = "ON_DEMAND", /** Backup taken automatically by the system on a regular schedule. */ AUTO = "AUTO" } export interface Collection { /** * Collection ID. * @readonly */ id?: string; /** * Collection display name. * @readonly */ displayName?: string | null; } export interface DisableInstanceRequest { instanceId?: string; } export interface Empty { } export interface EnableInstanceRequest { instanceId?: string; } export interface DeleteAllRequest { instanceId?: string; } export interface GetBackupMetadataRequest { backupId?: string; } export interface GetBackupMetadataResponse { metaData?: Record | null; } export interface RebuildRequest { backupId?: string; } export interface MoveRequest { backupId?: string; } export interface RemoveDeletedRequest { limit?: number; } export interface FailRestorationRequest { restorationId?: string; } export interface TakeBackupRequest { instanceId?: string; type?: Type; } export interface UpdateBackupMetadataRequest { backupId?: string; s3Region?: string; s3Bucket?: string; } /** event triggered when backup state is changed (i.e. it was created, started, completed or failed) */ export interface BackupStateChanged { /** * current state of backup * @readonly */ backup?: Backup; } /** event triggered when backup restoration state is changed (i.e. it was created, started or completed) */ export interface RestorationStateChanged { /** * current state of restoration * @readonly */ restoration?: V2Restoration; } export interface V2Restoration { /** * Restoration ID. * @readonly */ id?: string; /** * Details of the backup used for the restoration. * @readonly */ backup?: Backup; /** * Status of restoration. * @readonly */ status?: V2RestorationStatus; /** * Date and time the restoration was requested. * @readonly */ requestedDate?: Date | null; /** * Date and time the restoration commenced. Value is `null` until the restoration process begins in the background. * @readonly */ startedDate?: Date | null; /** * Date and time the restoration finished. Value is `null` until the restoration process is completed in the background. * @readonly */ finishedDate?: Date | null; /** * List of collections restored. * @readonly * @deprecated * @replacedBy restoration_collections * @targetRemovalDate 2025-12-31 */ collections?: Collection[]; /** @readonly */ restorationCollections?: RestorationCollection[]; } export declare enum V2RestorationStatus { /** Restoration from a backup is in progress. */ PENDING = "PENDING", /** Restoration from a backup has been successful. */ COMPLETED = "COMPLETED", /** Restoration from a backup has failed. */ FAILED = "FAILED" } export interface RestorationCollection { /** * Collection to be restored. * * **Note**: If two collections have a multireference relation, the references will be restored only if both collections are restored. */ dataCollectionId?: string; /** * Destination where to restore the collection. * When not specified destination is taken from backup. */ restoreDestination?: RestoreDestination; } export interface RestoreDestination { /** Collection id. */ dataCollectionId?: string; /** Display name. When not specified value is taken from the backup. */ displayName?: string | null; } export interface CreateBackupRequest { } export interface CreateBackupResponse { /** Details of the requested backup. */ backup?: Backup; } export interface ListBackupsRequest { /** * Statuses to filter by. * If provided, only backups with the specified statuses are listed. * For example, to list only completed backups, use `?status=READY`. * To list completed and pending backups, use `?status=READY&status=PENDING`. * * Default: No filtering */ status?: Status[]; /** * Type to filter by. If provided, only backups of the specified type are listed. * * Default: No filtering */ type?: Type[]; /** Paging preferences. */ paging?: Paging; } export interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface ListBackupsResponse { /** Retrieved backups. */ backups?: Backup[]; /** Paging information. */ pagingMetadata?: PagingMetadataV2; } export interface PagingMetadataV2 { /** 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. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; } export interface RestoreBackupRequest { /** ID of backup to be restored. */ backupId: string; } export interface RestoreBackupResponse { /** Details of data restoration from backup. */ restoration?: V2Restoration; } export interface RestorePartialBackupRequest { /** ID of backup to be restored. */ backupId: string; /** * Collections to be restored. * * **Note**: If two collections have a multireference relation, the references will be restored only if both collections are restored. * @deprecated * @replacedBy restoration_collections * @targetRemovalDate 2025-12-31 */ dataCollectionIds?: string[]; /** Collections to be restored. */ restorationCollections?: RestorationCollection[]; } export interface ListRestorationsRequest { /** * Statuses to filter by. If provided, only restorations with the specified statuses are listed. * For example, to list only completed restorations, use `?status=COMPLETED`. * To list completed and pending restorations, use `?status=COMPLETED&status=PENDING`. * * Default: No filtering */ status?: V2RestorationStatus[]; /** Offset and limit of items to retrieve. */ paging?: Paging; } export interface ListRestorationsResponse { /** Retrieved restorations. */ restorations?: V2Restoration[]; /** Paging information. */ pagingMetadata?: PagingMetadataV2; } export interface DeleteBackupRequest { /** ID of the backup to be deleted. */ backupId: string; } export interface DeleteBackupResponse { } export interface CancelBackupRequest { /** ID of the backup to be cancelled. */ backupId?: string; } export interface CancelBackupResponse { } export interface MigrateNamespaceRequest { newNamespace?: string; existingNamespace?: string; } export interface MigrateNamespaceResponse { } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ 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 */ restoreInfo?: RestoreInfo; } export interface RestoreInfo { deletedDate?: Date | 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; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntityAsJson?: string | null; } export interface ActionEvent { bodyAsJson?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface CollectionNonNullableFields { id: string; } interface BackupNonNullableFields { id: string; status: Status; type: Type; collections: CollectionNonNullableFields[]; } export interface CreateBackupResponseNonNullableFields { backup?: BackupNonNullableFields; } export interface ListBackupsResponseNonNullableFields { backups: BackupNonNullableFields[]; } interface RestoreDestinationNonNullableFields { dataCollectionId: string; } interface RestorationCollectionNonNullableFields { dataCollectionId: string; restoreDestination?: RestoreDestinationNonNullableFields; } interface V2RestorationNonNullableFields { id: string; backup?: BackupNonNullableFields; status: V2RestorationStatus; collections: CollectionNonNullableFields[]; restorationCollections: RestorationCollectionNonNullableFields[]; } export interface RestoreBackupResponseNonNullableFields { restoration?: V2RestorationNonNullableFields; } export interface ListRestorationsResponseNonNullableFields { restorations: V2RestorationNonNullableFields[]; } export {};