From e84cfbb870bc9938c89f7c4789c7fb998b8f2b01 Mon Sep 17 00:00:00 2001 From: Antonin Cezard Date: Fri, 9 Aug 2024 14:34:17 +0200 Subject: [PATCH] feat: Update file metadata types This commit takes into account the decision on the metadata format for shortcuts taken as part of this PR : https://github.com/cozy/cozy-doctypes/pull/268 --- packages/cozy-client/src/types.js | 6 ++++++ packages/cozy-client/types/types.d.ts | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/packages/cozy-client/src/types.js b/packages/cozy-client/src/types.js index 7f4efec763..9611dfcf6b 100644 --- a/packages/cozy-client/src/types.js +++ b/packages/cozy-client/src/types.js @@ -441,6 +441,12 @@ import { QueryDefinition } from './queries/dsl' * @property {string} [noticePeriod] - Notice period of the paper, in days * @property {string} [datetime] - Image EXIF date, if relevant * @property {string} [instanceName] - Name of the instance + * @property {object} [target] - Information of the target of the shortcut + * @property {string} [target.title] - The title of the application to which the shortcut redirects + * @property {string} [target.description] - A brief description of the application + * @property {string} [target.category] - The category of the application + * @property {object} [externalDataSource] - Additional information to maintain link with external data source + * @property {string} [externalDataSource.source] - The space to which the application belongs */ /** diff --git a/packages/cozy-client/types/types.d.ts b/packages/cozy-client/types/types.d.ts index 0073348087..f2935de14d 100644 --- a/packages/cozy-client/types/types.d.ts +++ b/packages/cozy-client/types/types.d.ts @@ -783,6 +783,20 @@ export type FileMetadata = { * - Name of the instance */ instanceName?: string; + /** + * - Information of the target of the shortcut + */ + target?: { + title: string; + description: string; + category: string; + }; + /** + * - Additional information to maintain link with external data source + */ + externalDataSource?: { + source: string; + }; }; /** * - An io.cozy.files document