From cd936c24a989633d3d8e71b908a375802d2e2970 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Wed, 6 Nov 2024 09:44:30 +0000 Subject: [PATCH] add file object types --- src/@types/Compute.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/@types/Compute.ts b/src/@types/Compute.ts index 26a6dbd07..85b5b123b 100644 --- a/src/@types/Compute.ts +++ b/src/@types/Compute.ts @@ -70,11 +70,30 @@ export enum EncryptMethod { AES = 'AES', ECIES = 'ECIES' } + +export interface HeadersObject { + [key: string]: string +} + export interface BaseFileObject { type: string encryptedBy?: string encryptMethod?: EncryptMethod } + +export interface UrlFileObject extends BaseFileObject { + url: string + method: string + headers?: [HeadersObject] +} + +export interface IpfsFileObject extends BaseFileObject { + hash: string +} + +export interface ArweaveFileObject extends BaseFileObject { + transactionId: string +} export interface ComputeAsset { fileObject?: BaseFileObject // C2D v2 documentId: string