import type { Operation } from '@api-client/json/patch/types.js';
import { AccessOperation } from '../models/store/Permission.js';
/**
 * An interface describing a schema to be sent to the server
 * when making a patch of a file.
 */
export interface PatchInfo {
    /**
     * Auto generated by the client sending the PATCH.
     */
    id: string;
    /**
     * The current timestamp.
     */
    timestamp: number;
    /**
     * The patch generated by the client.
     */
    patch: Operation[];
    /**
     * The application id that generated the patch.
     * This is a string that is assigned to each application in the suite.
     * External applications need to use a constant string for their apps.
     */
    app?: string;
    /**
     * The version of the application that generated the patch.
     * This can and will be used to handle potential differences between suite applications.
     */
    appVersion?: string;
}
/**
 * A patch used when patching a file media.
 */
export interface MediaPatchInfo extends PatchInfo {
    /**
     * The version of the document that this patch was based on.
     * This is used for conflict detection.
     */
    version: number;
}
/**
 * An interface describing a schema to be sent to the server
 * when making a patch with user access to a file.
 */
export interface AccessPatchInfo {
    /**
     * Auto generated by the client sending the PATCH.
     */
    id: string;
    /**
     * The patch generated by the client.
     */
    patch: AccessOperation[];
}
export interface PatchRevision extends PatchInfo {
    /**
     * The patch to apply to the object to revert the changes.
     */
    revert: Operation[];
}
/**
 * A schema sent by the store server in a response to the patch request.
 * It contains an information about the applied patch, the reverse operation associated with it,
 * application information, and the generated by the client patch id.
 */
export interface MediaPatchRevision extends MediaPatchInfo {
    /**
     * The patch to apply to the object to revert the changes.
     */
    revert: Operation[];
    /**
     * The new version number of the document after applying the patch.
     * Clients need to use this value when sending another patch.
     * If the client doesn't have the current version number, it needs to
     * refresh the document and try again.
     */
    newVersion: number;
}
//# sourceMappingURL=types.d.ts.map