@data-fair/lib-common-types 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/.type/index.d.ts +17 -2
- package/catalog/index.d.ts +3 -1
- package/catalog/schema.d.ts +16 -0
- package/catalog/schema.js +21 -3
- package/package.json +1 -1
- package/processings.js +1 -1
- package/ws.js +1 -1
package/catalog/.type/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export const schemaExports: string[]
|
|
|
11
11
|
* - importConfig: The plugin gives an import configuration schema
|
|
12
12
|
* - publishDataset: The plugin can publish a dataset
|
|
13
13
|
* - deletePublication: The plugin can delete a dataset or a resource published in a remote catalog
|
|
14
|
+
* - thumbnail: The plugin provides a thumbnail image
|
|
14
15
|
*
|
|
15
16
|
* This interface was referenced by `CatalogsCommonTypes`'s JSON-Schema
|
|
16
17
|
* via the `definition` "capability".
|
|
@@ -22,7 +23,8 @@ export type Capability =
|
|
|
22
23
|
| "additionalFilters"
|
|
23
24
|
| "importConfig"
|
|
24
25
|
| "publishDataset"
|
|
25
|
-
| "deletePublication"
|
|
26
|
+
| "deletePublication"
|
|
27
|
+
| "thumbnail";
|
|
26
28
|
|
|
27
29
|
export type CatalogsCommonTypes = {}
|
|
28
30
|
/**
|
|
@@ -44,6 +46,10 @@ export type Metadata = {
|
|
|
44
46
|
* The list of capabilities that a catalog can have.
|
|
45
47
|
*/
|
|
46
48
|
capabilities: Capability[];
|
|
49
|
+
/**
|
|
50
|
+
* Optional path of the thumbnail image from the root of the plugin to be displayed in the UI.
|
|
51
|
+
*/
|
|
52
|
+
thumbnailPath?: string;
|
|
47
53
|
}
|
|
48
54
|
/**
|
|
49
55
|
* This interface was referenced by `CatalogsCommonTypes`'s JSON-Schema
|
|
@@ -104,7 +110,16 @@ export type Resource = {
|
|
|
104
110
|
* The URL of the image representing the resource, if available
|
|
105
111
|
*/
|
|
106
112
|
image?: string;
|
|
107
|
-
license?:
|
|
113
|
+
license?: {
|
|
114
|
+
/**
|
|
115
|
+
* Short title for the license
|
|
116
|
+
*/
|
|
117
|
+
title: string;
|
|
118
|
+
/**
|
|
119
|
+
* The URL where the license can be read
|
|
120
|
+
*/
|
|
121
|
+
href: string;
|
|
122
|
+
};
|
|
108
123
|
/**
|
|
109
124
|
* The list of keywords associated with the resource, if available
|
|
110
125
|
*/
|
package/catalog/index.d.ts
CHANGED
|
@@ -210,4 +210,6 @@ export type DeletePublicationContext<TCatalogConfig> = {
|
|
|
210
210
|
export type CatalogMetadata<TCapabilities extends Capability[]> = Metadata & {
|
|
211
211
|
/** The capabilities of the catalog plugin */
|
|
212
212
|
capabilities: TCapabilities;
|
|
213
|
-
}
|
|
213
|
+
} & (Includes<TCapabilities, 'thumbnail'> extends true ? {
|
|
214
|
+
thumbnailPath: string;
|
|
215
|
+
} : {});
|
package/catalog/schema.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ declare const _default: {
|
|
|
31
31
|
$ref: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
thumbnailPath: {
|
|
35
|
+
description: string;
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
folder: {
|
|
@@ -85,6 +89,18 @@ declare const _default: {
|
|
|
85
89
|
};
|
|
86
90
|
license: {
|
|
87
91
|
type: string;
|
|
92
|
+
additionalProperties: boolean;
|
|
93
|
+
required: string[];
|
|
94
|
+
properties: {
|
|
95
|
+
title: {
|
|
96
|
+
type: string;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
href: {
|
|
100
|
+
type: string;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
88
104
|
};
|
|
89
105
|
keywords: {
|
|
90
106
|
type: string;
|
package/catalog/schema.js
CHANGED
|
@@ -14,7 +14,8 @@ export default {
|
|
|
14
14
|
- additionalFilters: The plugin can use additional filters in the list method
|
|
15
15
|
- importConfig: The plugin gives an import configuration schema
|
|
16
16
|
- publishDataset: The plugin can publish a dataset
|
|
17
|
-
- deletePublication: The plugin can delete a dataset or a resource published in a remote catalog
|
|
17
|
+
- deletePublication: The plugin can delete a dataset or a resource published in a remote catalog
|
|
18
|
+
- thumbnail: The plugin provides a thumbnail image`,
|
|
18
19
|
enum: [
|
|
19
20
|
'import',
|
|
20
21
|
'search',
|
|
@@ -22,7 +23,8 @@ export default {
|
|
|
22
23
|
'additionalFilters',
|
|
23
24
|
'importConfig',
|
|
24
25
|
'publishDataset',
|
|
25
|
-
'deletePublication'
|
|
26
|
+
'deletePublication',
|
|
27
|
+
'thumbnail'
|
|
26
28
|
]
|
|
27
29
|
},
|
|
28
30
|
metadata: {
|
|
@@ -45,6 +47,10 @@ export default {
|
|
|
45
47
|
items: {
|
|
46
48
|
$ref: '#/$defs/capability'
|
|
47
49
|
}
|
|
50
|
+
},
|
|
51
|
+
thumbnailPath: {
|
|
52
|
+
description: 'Optional path of the thumbnail image from the root of the plugin to be displayed in the UI.',
|
|
53
|
+
type: 'string',
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
56
|
},
|
|
@@ -100,7 +106,19 @@ export default {
|
|
|
100
106
|
description: 'The URL of the image representing the resource, if available'
|
|
101
107
|
},
|
|
102
108
|
license: {
|
|
103
|
-
type: '
|
|
109
|
+
type: 'object',
|
|
110
|
+
additionalProperties: false,
|
|
111
|
+
required: ['title', 'href'],
|
|
112
|
+
properties: {
|
|
113
|
+
title: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
description: 'Short title for the license'
|
|
116
|
+
},
|
|
117
|
+
href: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'The URL where the license can be read'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
104
122
|
},
|
|
105
123
|
keywords: {
|
|
106
124
|
type: 'array',
|
package/package.json
CHANGED
package/processings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {};
|
package/ws.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {};
|