From 2819536344f9cdabf34c6f98959c4222873e5aa7 Mon Sep 17 00:00:00 2001 From: Massy Mahamli Date: Thu, 9 Mar 2023 17:49:49 -0500 Subject: [PATCH 1/3] added types of c2pa-asset-ref --- packages/toolkit/types/index.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/toolkit/types/index.ts b/packages/toolkit/types/index.ts index 7c5a2e85..4e2566bb 100644 --- a/packages/toolkit/types/index.ts +++ b/packages/toolkit/types/index.ts @@ -111,11 +111,26 @@ export type CreativeWorkAssertion = Assertion< url?: string; } >; +interface Reference { + uri: string; +} + +interface Resource { + reference: Reference; +} + +export declare type C2paAssetRef = Assertion< + 'c2pa.asset-ref', + { + resources: Resource[]; + } +>; export type ManifestAssertion = | C2paActionsAssertion | C2paHashDataAssertion - | CreativeWorkAssertion; + | CreativeWorkAssertion + | C2paAssetRef; export interface Action { action: string; From 77ac2624de6c687d3274dbdc6b5273190dae712d Mon Sep 17 00:00:00 2001 From: Massy Mahamli Date: Thu, 9 Mar 2023 18:01:53 -0500 Subject: [PATCH 2/3] c2paassetRef in c2pa --- .../toolkit/CAI-3467_2023-03-09-22-59.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@contentauth/toolkit/CAI-3467_2023-03-09-22-59.json diff --git a/common/changes/@contentauth/toolkit/CAI-3467_2023-03-09-22-59.json b/common/changes/@contentauth/toolkit/CAI-3467_2023-03-09-22-59.json new file mode 100644 index 00000000..a0955485 --- /dev/null +++ b/common/changes/@contentauth/toolkit/CAI-3467_2023-03-09-22-59.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@contentauth/toolkit", + "comment": "Added c2pa-asset-ref types to support asset reference assertions", + "type": "patch" + } + ], + "packageName": "@contentauth/toolkit" +} \ No newline at end of file From b3a89f86af741db45a0698860567ecf3da4cad73 Mon Sep 17 00:00:00 2001 From: Massy Mahamli Date: Thu, 9 Mar 2023 18:02:49 -0500 Subject: [PATCH 3/3] adding export to c2pa --- packages/c2pa/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/c2pa/index.ts b/packages/c2pa/index.ts index 085be681..24542a36 100644 --- a/packages/c2pa/index.ts +++ b/packages/c2pa/index.ts @@ -7,6 +7,13 @@ * it. */ +export { + Assertion, + C2paActionsAssertion, + C2paAssetRef, + C2paHashDataAssertion, + CreativeWorkAssertion, +} from '@contentauth/toolkit'; export { AssertionAccessor, ExtendedAssertions } from './src/assertions'; export { C2pa, @@ -41,10 +48,3 @@ export { selectProducer } from './src/selectors/selectProducer'; export { selectSocialAccounts } from './src/selectors/selectSocialAccounts'; export { C2paSourceType, Source, SourceMetadata } from './src/source'; export { BlobUrlData, DisposableBlobUrl, Thumbnail } from './src/thumbnail'; - -export { - Assertion, - C2paActionsAssertion, - C2paHashDataAssertion, - CreativeWorkAssertion, -} from '@contentauth/toolkit';