2022-09-26 15:01:51 +02:00
|
|
|
import { FileInfo, ServiceComputeOptions } from '@oceanprotocol/lib'
|
2022-01-11 16:40:40 +01:00
|
|
|
import { NftMetadata } from '@utils/nft'
|
2021-11-01 15:42:55 +01:00
|
|
|
import { ReactElement } from 'react'
|
2021-10-13 18:48:59 +02:00
|
|
|
export interface FormPublishService {
|
2022-06-16 12:10:08 +02:00
|
|
|
files: FileInfo[]
|
|
|
|
links?: FileInfo[]
|
2021-10-13 18:48:59 +02:00
|
|
|
timeout: string
|
2022-01-13 18:51:33 +01:00
|
|
|
dataTokenOptions: { name: string; symbol: string }
|
2021-10-13 18:48:59 +02:00
|
|
|
access: 'Download' | 'Compute' | string
|
2022-04-15 15:28:45 +02:00
|
|
|
providerUrl: { url: string; valid: boolean; custom: boolean }
|
2021-11-15 13:44:27 +01:00
|
|
|
algorithmPrivacy?: boolean
|
2021-11-29 17:49:38 +01:00
|
|
|
computeOptions?: ServiceComputeOptions
|
2021-10-13 18:48:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface FormPublishData {
|
2021-11-19 14:47:58 +01:00
|
|
|
user: {
|
|
|
|
stepCurrent: number
|
|
|
|
accountId: string
|
|
|
|
chainId: number
|
|
|
|
}
|
2021-10-13 18:48:59 +02:00
|
|
|
metadata: {
|
2022-01-11 16:40:40 +01:00
|
|
|
nft: NftMetadata
|
2022-04-04 21:13:39 +02:00
|
|
|
transferable: boolean
|
2022-01-11 11:55:06 +01:00
|
|
|
type: 'dataset' | 'algorithm'
|
2021-10-13 18:48:59 +02:00
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
author: string
|
|
|
|
termsAndConditions: boolean
|
2022-10-05 16:40:00 +02:00
|
|
|
tags?: string[]
|
2021-11-15 13:44:27 +01:00
|
|
|
dockerImage?: string
|
|
|
|
dockerImageCustom?: string
|
|
|
|
dockerImageCustomTag?: string
|
|
|
|
dockerImageCustomEntrypoint?: string
|
2021-11-29 14:25:30 +01:00
|
|
|
dockerImageCustomChecksum?: string
|
2021-10-13 18:48:59 +02:00
|
|
|
}
|
|
|
|
services: FormPublishService[]
|
2022-08-02 11:53:22 +02:00
|
|
|
pricing: PricePublishOptions
|
2022-01-12 00:11:15 +01:00
|
|
|
feedback?: PublishFeedback
|
2021-10-13 18:48:59 +02:00
|
|
|
}
|
2021-11-01 15:42:55 +01:00
|
|
|
|
|
|
|
export interface StepContent {
|
|
|
|
step: number
|
|
|
|
title: string
|
|
|
|
component: ReactElement
|
|
|
|
}
|
2022-01-12 00:11:15 +01:00
|
|
|
|
|
|
|
export interface PublishFeedback {
|
2022-01-12 17:22:52 +01:00
|
|
|
[key: string]: {
|
2022-01-12 00:11:15 +01:00
|
|
|
name: string
|
2022-01-12 12:47:03 +01:00
|
|
|
description: string
|
2022-01-12 17:22:52 +01:00
|
|
|
status: 'success' | 'error' | 'pending' | 'active' | string
|
2022-01-12 16:20:18 +01:00
|
|
|
txCount: number
|
2022-01-12 18:48:52 +01:00
|
|
|
errorMessage?: string
|
2022-01-12 15:42:46 +01:00
|
|
|
txHash?: string
|
2022-01-12 00:11:15 +01:00
|
|
|
}
|
|
|
|
}
|
2022-08-02 11:53:22 +02:00
|
|
|
|
|
|
|
export interface MetadataAlgorithmContainer {
|
|
|
|
entrypoint: string
|
|
|
|
image: string
|
|
|
|
tag: string
|
|
|
|
checksum: string
|
|
|
|
}
|