@sap/artifact-management-types 1.49.0 → 1.50.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/artifact-management-types",
3
- "version": "1.49.0",
3
+ "version": "1.50.0",
4
4
  "description": "Type signatures for artifact management",
5
5
  "types": "./src/index.d.ts",
6
6
  "main": "./src/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "pack": "npm run modify-types-import && npm pack"
11
11
  },
12
12
  "dependencies": {
13
- "@sap/artifact-management-base-types": "1.49.0"
13
+ "@sap/artifact-management-base-types": "1.50.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "gulp": "4.0.2"
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Error and warning message definitions for Data Product plugin
3
+ */
4
+ export declare const InfoList: Readonly<{
5
+ ERR_DPD_FILE_INVALID: {
6
+ code: string;
7
+ description: string;
8
+ };
9
+ ERR_DPD_HEADER_MISSING: {
10
+ code: string;
11
+ description: string;
12
+ };
13
+ ERR_DPD_NAME_UNDEFINED: {
14
+ code: string;
15
+ description: string;
16
+ };
17
+ ERR_DPD_NAMESPACE_UNDEFINED: {
18
+ code: string;
19
+ description: string;
20
+ };
21
+ ERR_DPD_VERSION_UNDEFINED: {
22
+ code: string;
23
+ description: string;
24
+ };
25
+ ERR_DATAPRODUCTS_FOLDER_EMPTY: {
26
+ code: string;
27
+ description: string;
28
+ };
29
+ WARN_DPD_TITLE_UNDEFINED: {
30
+ code: string;
31
+ description: string;
32
+ };
33
+ WARN_DPD_DESCRIPTION_UNDEFINED: {
34
+ code: string;
35
+ description: string;
36
+ };
37
+ }>;
@@ -0,0 +1,8 @@
1
+ import { Plugin } from '@sap/artifact-management-base-types';
2
+ /**
3
+ * Data Product Plugin for Artifact Management.
4
+ * Provides support for Data Product projects containing .dpd files.
5
+ */
6
+ declare const DataProductPlugin: Plugin;
7
+ export default DataProductPlugin;
8
+ export { InfoList } from './InfoList';
@@ -0,0 +1,24 @@
1
+ import { Item, ProjectEntityReaderReadOptions } from '@sap/artifact-management-base-types';
2
+ /**
3
+ * Item reader for individual .dpd files.
4
+ * Extracts metadata from each data product definition file.
5
+ */
6
+ export default class DataProductItemReader {
7
+ matchConditions: {
8
+ filePatterns: string[];
9
+ };
10
+ types: string[];
11
+ tags: string[];
12
+ /**
13
+ * Read all .dpd files in the current directory and extract their metadata.
14
+ */
15
+ read({ fs }: ProjectEntityReaderReadOptions): Promise<Item[]>;
16
+ /**
17
+ * Parse a .dpd file and create an Item from it.
18
+ */
19
+ private parseDataProductFile;
20
+ /**
21
+ * Create an error item when parsing fails.
22
+ */
23
+ private createErrorItem;
24
+ }
@@ -0,0 +1,17 @@
1
+ import { DetectionMechanism, KeyIn, ModuleData, ModuleReader, ModuleType, ProjectEntityReaderReadOptions } from '@sap/artifact-management-base-types';
2
+ import DataProductItemReader from './DataProductItemReader';
3
+ /**
4
+ * Module reader for the dataProducts folder.
5
+ * Reads the dataProducts folder and its .dpd files.
6
+ */
7
+ export default class DataProductModuleReader extends ModuleReader {
8
+ supportedProjectType: string[];
9
+ getType(): KeyIn<typeof ModuleType>;
10
+ getDetectionMechanism(): DetectionMechanism;
11
+ matchConditions: {
12
+ requiredFilePatterns: string[];
13
+ };
14
+ itemReaders: DataProductItemReader[];
15
+ tags: string[];
16
+ read({ fs }: ProjectEntityReaderReadOptions): Promise<ModuleData | undefined>;
17
+ }
@@ -0,0 +1,16 @@
1
+ import { DetectionMechanism, KeyIn, ProjectData, ProjectReader, ProjectReaderOptions, ProjectType } from '@sap/artifact-management-base-types';
2
+ import DataProductModuleReader from './DataProductModuleReader';
3
+ /**
4
+ * Project reader for Data Product projects.
5
+ * Detects projects that have a 'dataProducts' folder directly under root
6
+ * containing .dpd files.
7
+ */
8
+ export default class DataProductProjectReader extends ProjectReader {
9
+ constructor();
10
+ getType(): KeyIn<typeof ProjectType>;
11
+ getDetectionMechanism(): DetectionMechanism;
12
+ additionalModuleReaders: DataProductModuleReader[][];
13
+ tags: string[];
14
+ moduleSearchPattern(): Promise<string[]>;
15
+ read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
16
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * TypeScript interfaces for Data Product Definition (.dpd) files
3
+ */
4
+ /**
5
+ * Header section of the data product definition
6
+ */
7
+ export interface DataProductHeader {
8
+ name: string;
9
+ namespace: string;
10
+ version: string;
11
+ title?: string;
12
+ description?: string;
13
+ shortDescription?: string;
14
+ type?: string;
15
+ category?: string;
16
+ }
17
+ /**
18
+ * Output port configuration
19
+ */
20
+ export interface DataProductOutputPort {
21
+ name: string;
22
+ protocol: string;
23
+ }
24
+ /**
25
+ * Input port configuration
26
+ */
27
+ export interface DataProductInputPort {
28
+ name?: string;
29
+ protocol?: string;
30
+ }
31
+ /**
32
+ * Meta information
33
+ */
34
+ export interface DataProductMeta {
35
+ creator?: string;
36
+ }
37
+ /**
38
+ * Data source definition
39
+ */
40
+ export interface DataProductDataSource {
41
+ name: string;
42
+ definition?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Source configuration
46
+ */
47
+ export interface DataProductSource {
48
+ systemTypes?: string[];
49
+ systemId?: string;
50
+ dataSourceType?: string;
51
+ dataSources?: DataProductDataSource[];
52
+ }
53
+ /**
54
+ * Target configuration
55
+ */
56
+ export interface DataProductTarget {
57
+ definition?: {
58
+ definitions?: Record<string, unknown>;
59
+ };
60
+ }
61
+ /**
62
+ * Transformation configuration
63
+ */
64
+ export interface DataProductTransformation {
65
+ transformers?: Record<string, unknown>;
66
+ }
67
+ /**
68
+ * Main definition structure
69
+ */
70
+ export interface DataProductDefinitionContent {
71
+ header: DataProductHeader;
72
+ dataProductDefinitionInterop?: string;
73
+ inputPorts?: DataProductInputPort[];
74
+ outputPorts?: DataProductOutputPort[];
75
+ meta?: DataProductMeta;
76
+ source?: DataProductSource;
77
+ target?: DataProductTarget;
78
+ transformation?: DataProductTransformation;
79
+ }
80
+ /**
81
+ * Root structure of a .dpd file
82
+ */
83
+ export interface DataProductFile {
84
+ definition: DataProductDefinitionContent;
85
+ }
86
+ /**
87
+ * Extracted information from a data product for Project API
88
+ */
89
+ export interface DataProductInfo {
90
+ id: string;
91
+ title: string;
92
+ namespace: string;
93
+ version: string;
94
+ majorVersion: string;
95
+ description?: string;
96
+ }