diff --git a/package.json b/package.json index 607d138..a3a5976 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@celonis/content-cli", - "version": "0.10.0", + "version": "0.11.0", "description": "CLI Tool to help manage content in Celonis EMS", "main": "content-cli.js", "bin": { diff --git a/src/interfaces/diff-package.transport.ts b/src/interfaces/diff-package.transport.ts index be6f119..8fd4e05 100644 --- a/src/interfaces/diff-package.transport.ts +++ b/src/interfaces/diff-package.transport.ts @@ -8,14 +8,38 @@ export interface ConfigurationChangeTransport { export interface NodeDiffTransport { nodeKey: string; changes: ConfigurationChangeTransport[]; + baseConfiguration: NodeConfiguration; +} + +export interface NodeConfiguration { + [key: string]: any; } export interface PackageDiffTransport { packageKey: string; + basePackageConfiguration: PackageConfiguration; packageChanges: ConfigurationChangeTransport[]; nodesWithChanges: NodeDiffTransport[]; } +export interface PackageConfiguration { + variables?: VariableDefinition[]; + dependencies?: PackageDependency[]; + [key: string]: any; +} + +export interface PackageDependency { + key: string; + version: string; + [key: string]: any; +} + +export interface VariableDefinition { + key: string; + type: string; + [key: string]: any; +} + export interface PackageDiffMetadata { packageKey: string; hasChanges: boolean; diff --git a/tests/config/config-diff.spec.ts b/tests/config/config-diff.spec.ts index 8504fe1..1d7e3d2 100644 --- a/tests/config/config-diff.spec.ts +++ b/tests/config/config-diff.spec.ts @@ -58,6 +58,7 @@ describe("Config diff", () => { const diffResponse: PackageDiffTransport[] = [{ packageKey: "package-key", + basePackageConfiguration: {metadata: {description: "test"}}, packageChanges: [ { op: "add", @@ -72,7 +73,8 @@ describe("Config diff", () => { path: "/test", from: "bbb", value: JSON.parse("234") - }] + }], + baseConfiguration: {} }] }]; @@ -100,6 +102,7 @@ describe("Config diff", () => { const diffResponse: PackageDiffTransport[] = [{ packageKey: "package-key", + basePackageConfiguration: {metadata: {description: "test"}}, packageChanges: [ { op: "add", @@ -114,7 +117,8 @@ describe("Config diff", () => { path: "/test", from: "bbb", value: JSON.parse("234") - }] + }], + baseConfiguration: {} }] }];