Start on C2PA and Exif info boxes on upload

This commit is contained in:
N-Pex 2025-07-04 12:51:57 +02:00
parent 114c09eb50
commit 54a1c05ddf
14 changed files with 337 additions and 49 deletions

View file

@ -1,4 +1,5 @@
import { ComputedRef, Ref } from "vue";
import { Proof } from "./proof";
export class UploadPromise<Type> {
wrappedPromise: Promise<Type>;
@ -48,7 +49,7 @@ export type Attachment = {
scaledDimensions?: { width: number; height: number };
useScaled: boolean;
src?: string;
proof?: any;
proof?: Proof;
sendInfo?: AttachmentSendInfo;
};

40
src/models/proof.ts Normal file
View file

@ -0,0 +1,40 @@
export type AIInferenceResult = {
aiGenerated: boolean;
aiProbability: number;
humanProbability: number;
}
export type C2PAActionsAssertion = {
actions: {
action: string;
softwareAgent?: string;
}[];
}
export type C2PAAssertion = {
label: string;
data: C2PAActionsAssertion | undefined;
}
export type C2PAManifest = {
assertions: C2PAAssertion[];
signature_info: {
time: string;
}
}
export type C2PAManifestInfo = {
active_manifest: string;
manifests: {[key: string]: C2PAManifest};
}
export type C2PAData = {
manifest_info: C2PAManifestInfo;
}
export type Proof = {
name?: string;
json?: string;
integrity?: { pgp?: any; c2pa?: any; exif?: {[key: string]: string | Object}; opentimestamps?: any };
ai?: { inferenceResult?: AIInferenceResult};
}