Skip to main content

NvmAppMetadata

@nevermined-io/sdk - v3.0.40 / NvmAppMetadata

Class: NvmAppMetadata

Table of contents

Constructors

Methods

Constructors

constructor

new NvmAppMetadata(): NvmAppMetadata

Returns

NvmAppMetadata

Methods

getCreditsSubscriptionMetadataTemplate

getCreditsSubscriptionMetadataTemplate(name, author, customData?): MetaData

It returns a metadata template for a credits limitted subscription

Parameters

NameTypeDescription
namestringthe name of the subscription
authorstringthe author of the subscrpiton
customDataObjectany key-value pair to be included in the metadata

Returns

MetaData

Metadata

Defined in

src/ddo/NvmAppMetadata.ts:46


getFileMetadataTemplate

getFileMetadataTemplate(name, author, customData?): MetaData

It gets a metadata template for a file type of asset (datasets, moldels, algorithms, etc.)

Parameters

NameTypeDescription
namestringthe name of the asset
authorstringthe autor of the asset
customDataObjectkey-value pairs to be included in the metadata

Returns

MetaData

Metadata

Defined in

src/ddo/NvmAppMetadata.ts:199


getServiceMetadataTemplate

getServiceMetadataTemplate(name, author, endpoints, openEndpoints, openApiEndpoint, serviceType?, authType, authToken?, authUser?, authPassword?, isPriceDynamic?, isNeverminedHosted?, queryProtocol?, serviceHost?, customData?, nonce?): MetaData

It returns a metadata template for Web Service

Parameters

NameTypeDefault valueDescription
namestringundefinedthe name of the subscription
authorstringundefinedthe author of the subscrpiton
endpoints{ [verb: string]: string; }[]undefinedthe list of endpoints
openEndpointsstring[]undefinedthe list of open endpoints (not protected)
openApiEndpointundefined | stringundefinedthe openApi endpoint endpoint if any
serviceTypestring'RESTful'the type of the service
authType"none" | "basic" | "bearer" | "oauth"undefinedthe type of authentication required by the service
authToken?stringundefinedthe token to be used for authentication (if authType is oauth or bearer)
authUser?stringundefinedthe username to be used for authentication (if authType is basic)
authPassword?stringundefinedthe password to be used for authentication (if authType is basic)
isPriceDynamicbooleanfalseif the price is dynamic
isNeverminedHostedbooleanfalse-
queryProtocolundefined | stringundefined-
serviceHostundefined | stringundefined-
customDataObject{}any key-value pair to be included in the metadata
noncestring | numberundefinedthe nonce to be included in the metadata

Returns

MetaData

Metadata

Defined in

src/ddo/NvmAppMetadata.ts:115


getSubscriptionMetadataTemplate

getSubscriptionMetadataTemplate(name, author, customData?): MetaData

It returns a metadata template for subscription

Parameters

NameTypeDescription
namestringthe name of the subscription
authorstringthe author of the subscrpiton
customDataObjectany key-value pair to be included in the metadata

Returns

MetaData

Metadata

Defined in

src/ddo/NvmAppMetadata.ts:71


getTimeSubscriptionMetadataTemplate

getTimeSubscriptionMetadataTemplate(name, author, timeMeasure, customData?): MetaData

It returns a metadata template for a subscription with time limit

Parameters

NameTypeDescription
namestringthe name of the subscription
authorstringthe author of the subscrpiton
timeMeasurestringthe string defining the time measure
customDataObjectany key-value pair to be included in the metadata

Returns

MetaData

Metadata

Defined in

src/ddo/NvmAppMetadata.ts:19


validateSubscription

validateSubscription(metadata, subscriptionType): MetadataValidationResults

Parameters

NameType
metadataMetaData
subscriptionTypeSubscriptionType

Returns

MetadataValidationResults

Defined in

src/ddo/NvmAppMetadata.ts:223