Skip to content

Commit

Permalink
add file object types
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Nov 6, 2024
1 parent 66b8da1 commit cd936c2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/@types/Compute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,30 @@ export enum EncryptMethod {
AES = 'AES',

Check warning on line 70 in src/@types/Compute.ts

View workflow job for this annotation

GitHub Actions / lint

'AES' is defined but never used
ECIES = 'ECIES'

Check warning on line 71 in src/@types/Compute.ts

View workflow job for this annotation

GitHub Actions / lint

'ECIES' is defined but never used
}

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
Expand Down

0 comments on commit cd936c2

Please sign in to comment.