snapshot.d.ts 880 B

1234567891011121314151617181920212223
  1. import { MetadataKind, Signed, SignedOptions } from './base';
  2. import { MetaFile } from './file';
  3. import { JSONObject } from './utils';
  4. type MetaFileMap = Record<string, MetaFile>;
  5. export interface SnapshotOptions extends SignedOptions {
  6. meta?: MetaFileMap;
  7. }
  8. /**
  9. * A container for the signed part of snapshot metadata.
  10. *
  11. * Snapshot contains information about all target Metadata files.
  12. * A top-level role that specifies the latest versions of all targets metadata files,
  13. * and hence the latest versions of all targets (including any dependencies between them) on the repository.
  14. */
  15. export declare class Snapshot extends Signed {
  16. readonly type = MetadataKind.Snapshot;
  17. readonly meta: MetaFileMap;
  18. constructor(opts: SnapshotOptions);
  19. equals(other: Snapshot): boolean;
  20. toJSON(): JSONObject;
  21. static fromJSON(data: JSONObject): Snapshot;
  22. }
  23. export {};