@data-fair/lib-common-types 1.9.2 → 1.10.1

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.
@@ -30,10 +30,6 @@ export type Metadata = {
30
30
  * The description of the plugin to be displayed in the UI
31
31
  */
32
32
  description: string;
33
- /**
34
- * The SVG Path icon of the plugin
35
- */
36
- icon: string;
37
33
  /**
38
34
  * The list of capabilities that a catalog can have.
39
35
  */
@@ -23,10 +23,6 @@ declare const _default: {
23
23
  description: string;
24
24
  type: string;
25
25
  };
26
- icon: {
27
- description: string;
28
- type: string;
29
- };
30
26
  capabilities: {
31
27
  description: string;
32
28
  type: string;
package/catalog/schema.js CHANGED
@@ -22,7 +22,7 @@ export default {
22
22
  metadata: {
23
23
  type: 'object',
24
24
  description: 'The metadata of the catalog plugin',
25
- required: ['title', 'description', 'icon', 'capabilities'],
25
+ required: ['title', 'description', 'capabilities'],
26
26
  additionalProperties: false,
27
27
  properties: {
28
28
  title: {
@@ -33,10 +33,6 @@ export default {
33
33
  description: 'The description of the plugin to be displayed in the UI',
34
34
  type: 'string'
35
35
  },
36
- icon: {
37
- description: 'The SVG Path icon of the plugin',
38
- type: 'string'
39
- },
40
36
  capabilities: {
41
37
  description: 'The list of capabilities that a catalog can have.',
42
38
  type: 'array',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-common-types",
3
- "version": "1.9.2",
3
+ "version": "1.10.1",
4
4
  "description": "Shared schemas and built type definitions in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/processings.d.ts CHANGED
@@ -3,9 +3,10 @@ import type { DataFairWsClient } from '@data-fair/lib-node/ws-client.js';
3
3
  /**
4
4
  * Processing context.
5
5
  */
6
- export interface ProcessingContext {
7
- processingConfig: any;
6
+ export interface ProcessingContext<TProcesssingConfig = any> {
7
+ processingConfig: TProcesssingConfig;
8
8
  pluginConfig: any;
9
+ secrets?: Record<string, string>;
9
10
  processingId: string;
10
11
  dir: string;
11
12
  tmpDir: string;
@@ -18,6 +19,19 @@ export interface ProcessingContext {
18
19
  dataset: any;
19
20
  }) => Promise<void>;
20
21
  }
22
+ /**
23
+ * Function to prepare a processing (trigger when the config is updated).
24
+ * It can be used to:
25
+ * - throw additional errors to validate the config
26
+ * - remove secrets from the config and store them in the secrets object
27
+ */
28
+ export type PrepareFunction<TProcesssingConfig = any> = (context: {
29
+ processingConfig: TProcesssingConfig;
30
+ secrets: Record<string, string>;
31
+ }) => Promise<{
32
+ processingConfig?: TProcesssingConfig;
33
+ secrets?: Record<string, string>;
34
+ }>;
21
35
  /**
22
36
  * Log functions.
23
37
  */