From 583db8e65df39b91b198186c9df85fa585713740 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