Message API/docs/components/revision/api

API References

Technical reference for compare, align, and revision result events.

Compare Payload

Send `compare` when both source files are already positioned correctly and you want the viewer to generate a visual diff.

type ComparePayload = {
  backgroundUrl: string;
  overlayUrl: string;
  dpi?: 200 | 300 | 400 | 500 | 600;
  backgroundColor?: string;
  overlayColor?: string;
  equalColor?: string;
};
Compare Payload

Align Payload

Send `align` when the source files require interactive point matching before or during comparison.

type AlignPayload = {
  backgroundUrl: string;
  overlayUrl: string;
  dpi?: 200 | 300 | 400 | 500 | 600;
  backgroundColor?: string;
  overlayColor?: string;
};
Align Payload

Result Events

Both compare and align report through the same completion and error event types.

  • comparisonComplete: Returned when the compare or align workflow finishes successfully.
  • comparisonError: Returned when the compare or align workflow fails.
type ComparisonCompletePayload = {
  fileUrl?: string;
  message?: string;
  [key: string]: unknown;
};

type ComparisonErrorPayload = {
  message?: string;
  error?: string;
  reason?: string;
  [key: string]: unknown;
};
Result Events