1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

DDO updates, contentLength as string

This commit is contained in:
Matthias Kretschmann 2019-11-12 13:24:36 +01:00
parent 1091665b17
commit b9b63dabe9
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 13 additions and 21 deletions

View File

@ -84,7 +84,14 @@ export interface File {
* File index. * File index.
* @type {number} * @type {number}
*/ */
index?: number index: number
/**
* File format, if applicable.
* @type {string}
* @example "text/csv"
*/
contentType: string
/** /**
* File checksum. * File checksum.
@ -102,7 +109,7 @@ export interface File {
* File content length. * File content length.
* @type {[type]} * @type {[type]}
*/ */
contentLength?: number contentLength?: string
/** /**
* Resource ID (depending on the source). * Resource ID (depending on the source).
@ -123,13 +130,6 @@ export interface File {
* @example "zip" * @example "zip"
*/ */
compression?: string compression?: string
/**
* File format, if applicable.
* @type {string}
* @example "text/csv"
*/
contentType?: string
} }
/** /**
@ -197,12 +197,6 @@ export interface MetaDataMain {
*/ */
files: File[] files: File[]
/**
* SHA3 hash of concatenated values: [list of all file checksums] + name + author + license + did
* @type {string}
*/
checksum?: string
encryptedService?: any encryptedService?: any
workflow?: Workflow workflow?: Workflow

View File

@ -101,14 +101,14 @@ describe('DDO', () => {
{ {
index: 0, index: 0,
checksum: 'efb2c764274b745f5fc37f97c6b0e761', checksum: 'efb2c764274b745f5fc37f97c6b0e761',
contentLength: 4535431, contentLength: '4535431',
contentType: 'application/json', contentType: 'application/json',
resourceId: 'access-log2018-02-13-15-17-29-18386C502CAEA932' resourceId: 'access-log2018-02-13-15-17-29-18386C502CAEA932'
}, },
{ {
index: 1, index: 1,
checksum: '085340abffh21495345af97c6b0e761', checksum: '085340abffh21495345af97c6b0e761',
contentLength: 12324, contentLength: '12324',
contentType: 'application/json' contentType: 'application/json'
}, },
{ {

View File

@ -166,7 +166,7 @@
"index": 0, "index": 0,
"url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip", "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip",
"checksum": "085340abffh21495345af97c6b0e761", "checksum": "085340abffh21495345af97c6b0e761",
"contentLength": 12324 "contentLength": "12324"
}, },
{ {
"url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp2.zip" "url": "https://testocnfiles.blob.core.windows.net/testfiles/testzkp2.zip"
@ -182,9 +182,7 @@
"description": "Weather information of UK including temperature and humidity", "description": "Weather information of UK including temperature and humidity",
"copyrightHolder": "Met Office", "copyrightHolder": "Met Office",
"workExample": "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68", "workExample": "423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68",
"contentUrls": [ "contentUrls": ["https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip"],
"https://testocnfiles.blob.core.windows.net/testfiles/testzkp.zip"
],
"links": [ "links": [
{ {
"name": "Sample of Asset Data", "name": "Sample of Asset Data",