market/src/components/Publish/_types.ts

64 lines
1.5 KiB
TypeScript
Raw Normal View History

import { FileInfo, ServiceComputeOptions } from '@oceanprotocol/lib'
2022-01-11 16:40:40 +01:00
import { NftMetadata } from '@utils/nft'
import { ReactElement } from 'react'
2021-10-13 18:48:59 +02:00
export interface FormPublishService {
files: FileInfo[]
links?: FileInfo[]
2021-10-13 18:48:59 +02:00
timeout: string
dataTokenOptions: { name: string; symbol: string }
2021-10-13 18:48:59 +02:00
access: 'Download' | 'Compute' | string
providerUrl: { url: string; valid: boolean; custom: boolean }
algorithmPrivacy?: boolean
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
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
Feat: autocomplete tags functionality (#1471) * feat: add autocomplete tag component * feat: pass tags aggregated list to autocomplete component * feat: add initial styling to autocomplete tag component * fix: autocomplete style types * feat: move styling elements to module.css file * feat: update placeholder text for tag input field * feat: add default value to tags if present * feat: add edit tags functionality * fix: default tag value * fix: style for automplete menu's keyboard navigation * fix: tags aggregation query size * feat: return sorted tags aggregated list suggestion in publish * fix: set tags value touched state in edit mode * add package back * enhancement: autocomplete tag component config (#1679) * fix publishing when connecting wallet on publish form * fix reset pricing on tx execution * removed changing steps * cleanup * Fix headers (#1663) * test * test * test * test * test * test * test * remove link * enhancement: tag autocomplete settings * feat: add cursor type text * feat: tweak filter and sort for matched tags * fix: tags input font color * fix: tag autocomplete component input color Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it> Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro> Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com> * fix lock * test * fix * fix * minor fixes * fix cursor on remove item (x) * style updates * UX tweaks * start suggestions upon first key stroke * remove redundant help tooltip * change placeholder copy * remove input clear action * edit updates Co-authored-by: mihaisc <mihai.scarlat@smartcontrol.ro> Co-authored-by: EnzoVezzaro <enzo-vezzaro@live.it> Co-authored-by: Ana <84312885+AnaLoznianu@users.noreply.github.com> Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-10-05 16:40:00 +02:00
tags?: string[]
dockerImage?: string
dockerImageCustom?: string
dockerImageCustomTag?: string
dockerImageCustomEntrypoint?: string
dockerImageCustomChecksum?: string
2021-10-13 18:48:59 +02:00
}
services: FormPublishService[]
2022-08-02 11:53:22 +02:00
pricing: PricePublishOptions
feedback?: PublishFeedback
2021-10-13 18:48:59 +02:00
}
export interface StepContent {
step: number
title: string
component: ReactElement
}
export interface PublishFeedback {
[key: string]: {
name: string
2022-01-12 12:47:03 +01:00
description: string
status: 'success' | 'error' | 'pending' | 'active' | string
txCount: number
2022-01-12 18:48:52 +01:00
errorMessage?: string
2022-01-12 15:42:46 +01:00
txHash?: string
}
}
2022-08-02 11:53:22 +02:00
export interface MetadataAlgorithmContainer {
entrypoint: string
image: string
tag: string
checksum: string
}