import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models"; import { Identity } from "./identities"; export interface IDataOwner { /** * Omnia service owning the responsibility of storing and handle versioning of this data. * Inherit from this to create new basetypes that can be stored and versioned by your omnia service * */ readonly omniaServiceId: GuidValue; } export interface IVersionedDataTypeIdentifier { /** * Each data type that shoud be versioned must specify an identifier for the data type * */ readonly dataTypeId: GuidValue; } export interface IVersionedDataIdentifier extends IDataOwner, IVersionedDataTypeIdentifier { readonly dataId: string; } export interface IVersionReference extends IDataOwner, IVersionedDataTypeIdentifier { readonly versionId: number; } export interface IVersionInformation extends IVersionReference, IVersionedDataIdentifier { readonly majorVersion: number; readonly minorVersion: number; readonly modifiedAt: string; readonly modifiedBy: Identity; } export interface DataToVersion extends IDataOwner, IVersionedDataTypeIdentifier { readonly omniaServiceId: GuidValue; readonly dataTypeId: GuidValue; } export interface IVersionedData extends IVersionInformation { readonly data: DataType; } export interface ICheckedoutVersionedData extends IVersionedData { readonly checkedOutBy: Identity; } export declare class VersionReference implements IVersionReference { versionId: number; omniaServiceId: GuidValue; dataTypeId: GuidValue; constructor(data: IVersionReference); } export interface CheckoutRequest { dataIdentifier: IVersionedDataIdentifier; takeOver: boolean; } export interface LatestReferenceResponse { latestCheckedoutByMe: IVersionReference; latestCheckedout: IVersionReference; latestDraft: IVersionReference; latestPublished: IVersionReference; } export interface LatestDataResponse { latestCheckedoutByMe: ICheckedoutVersionedData; latestCheckedout: ICheckedoutVersionedData; latestDraft: IVersionedData; latestPublished: IVersionedData; }