@celonis/content-cli 1.10.0 → 1.12.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.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/commands/asset-registry/asset-registry-api.js +14 -26
  3. package/commands/asset-registry/asset-registry-error.js +57 -0
  4. package/commands/asset-registry/asset-registry.service.js +38 -10
  5. package/commands/asset-registry/module.js +7 -6
  6. package/commands/configuration-management/api/metadata-api.js +38 -0
  7. package/commands/configuration-management/api/node-diff-api.js +15 -1
  8. package/commands/configuration-management/api/{diff-api.js → single-package-import-api.js} +5 -10
  9. package/commands/configuration-management/api/staging-package-api.js +39 -0
  10. package/commands/configuration-management/api/variable-api.js +36 -0
  11. package/commands/configuration-management/config-command.service.js +1 -61
  12. package/commands/configuration-management/connection-variable.helper.js +30 -0
  13. package/commands/configuration-management/interfaces/single-package-import.interfaces.js +12 -0
  14. package/commands/configuration-management/metadata.service.js +50 -0
  15. package/commands/configuration-management/module.js +76 -19
  16. package/commands/configuration-management/node-diff.service.js +40 -17
  17. package/commands/configuration-management/single-package-import.service.js +111 -0
  18. package/commands/configuration-management/staging-package.service.js +50 -0
  19. package/commands/configuration-management/variable.service.js +6 -7
  20. package/commands/t2tc/api/diff-api.js +40 -0
  21. package/commands/{configuration-management/api/batch-import-export-api.js → t2tc/api/t2tc-package-api.js} +7 -21
  22. package/commands/{configuration-management → t2tc}/diff.service.js +7 -7
  23. package/commands/t2tc/module.js +105 -0
  24. package/commands/{configuration-management → t2tc}/studio.service.js +4 -18
  25. package/commands/t2tc/t2tc-command.service.js +88 -0
  26. package/commands/{configuration-management/batch-import-export.service.js → t2tc/t2tc-package.service.js} +26 -41
  27. package/commands/view/module.js +54 -0
  28. package/commands/view/view-bookmarks-command.service.js +45 -0
  29. package/commands/view/view-bookmarks.manager-factory.js +39 -0
  30. package/commands/view/view-bookmarks.manager.js +60 -0
  31. package/core/utils/branches.js +23 -0
  32. package/core/utils/file-service.js +12 -0
  33. package/lib/commands/asset-registry/asset-registry-api.d.ts +2 -2
  34. package/lib/commands/asset-registry/asset-registry-error.d.ts +3 -0
  35. package/lib/commands/asset-registry/asset-registry.interfaces.d.ts +13 -1
  36. package/lib/commands/asset-registry/asset-registry.service.d.ts +2 -1
  37. package/lib/commands/asset-registry/module.d.ts +1 -1
  38. package/lib/commands/configuration-management/api/metadata-api.d.ts +7 -0
  39. package/lib/commands/configuration-management/api/node-diff-api.d.ts +2 -1
  40. package/lib/commands/configuration-management/api/single-package-import-api.d.ts +8 -0
  41. package/lib/commands/configuration-management/api/staging-package-api.d.ts +7 -0
  42. package/lib/commands/configuration-management/api/variable-api.d.ts +7 -0
  43. package/lib/commands/configuration-management/config-command.service.d.ts +0 -8
  44. package/lib/commands/configuration-management/connection-variable.helper.d.ts +2 -0
  45. package/lib/commands/configuration-management/interfaces/node-diff.interfaces.d.ts +8 -0
  46. package/lib/commands/configuration-management/interfaces/single-package-import.interfaces.d.ts +19 -0
  47. package/lib/commands/configuration-management/metadata.service.d.ts +7 -0
  48. package/lib/commands/configuration-management/module.d.ts +3 -1
  49. package/lib/commands/configuration-management/node-diff.service.d.ts +3 -0
  50. package/lib/commands/configuration-management/single-package-import.service.d.ts +12 -0
  51. package/lib/commands/configuration-management/staging-package.service.d.ts +7 -0
  52. package/lib/commands/configuration-management/variable.service.d.ts +1 -2
  53. package/lib/commands/t2tc/api/diff-api.d.ts +9 -0
  54. package/lib/commands/{configuration-management/api/batch-import-export-api.d.ts → t2tc/api/t2tc-package-api.d.ts} +5 -7
  55. package/lib/commands/{configuration-management → t2tc}/diff.service.d.ts +1 -1
  56. package/lib/commands/t2tc/module.d.ts +10 -0
  57. package/lib/commands/{configuration-management → t2tc}/studio.service.d.ts +1 -3
  58. package/lib/commands/t2tc/t2tc-command.service.d.ts +12 -0
  59. package/lib/commands/{configuration-management/batch-import-export.service.d.ts → t2tc/t2tc-package.service.d.ts} +7 -8
  60. package/lib/commands/view/module.d.ts +11 -0
  61. package/lib/commands/view/view-bookmarks-command.service.d.ts +7 -0
  62. package/lib/commands/view/view-bookmarks.manager-factory.d.ts +8 -0
  63. package/lib/commands/view/view-bookmarks.manager.d.ts +20 -0
  64. package/lib/core/utils/branches.d.ts +4 -0
  65. package/lib/core/utils/file-service.d.ts +1 -0
  66. package/package.json +1 -1
  67. package/lib/commands/configuration-management/api/diff-api.d.ts +0 -9
  68. /package/commands/{configuration-management/interfaces → t2tc}/batch-export-import.constants.js +0 -0
  69. /package/lib/commands/{configuration-management/interfaces → t2tc}/batch-export-import.constants.d.ts +0 -0
@@ -0,0 +1,23 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BranchUtils = void 0;
13
+ class BranchUtils {
14
+ static isBranchPackageKey(packageKey) {
15
+ if (!packageKey || packageKey.trim().length === 0) {
16
+ throw new Error("Package key cannot be empty");
17
+ }
18
+ return packageKey.includes(BranchUtils.BRANCH_SEPARATOR);
19
+ }
20
+ }
21
+ exports.BranchUtils = BranchUtils;
22
+ BranchUtils.BRANCH_SEPARATOR = "@";
23
+ });
@@ -95,6 +95,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
95
95
  finalZip.writeZip(zipFilePath, () => fs.chmodSync(zipFilePath, file_constants_1.FileConstants.DEFAULT_FILE_PERMISSIONS));
96
96
  return zipFilePath;
97
97
  }
98
+ zipDirectoryAsSinglePackage(sourceDir) {
99
+ if (fs.lstatSync(sourceDir).isSymbolicLink()) {
100
+ throw new logger_1.FatalError("Source directory cannot be a symbolic link.");
101
+ }
102
+ const zip = new AdmZip();
103
+ zip.addLocalFolder(sourceDir);
104
+ const tempDir = path.join(os.tmpdir(), "content-cli-imports");
105
+ fs.mkdirSync(tempDir, { recursive: true, mode: file_constants_1.FileConstants.DEFAULT_FOLDER_PERMISSIONS });
106
+ const zipFilePath = path.join(tempDir, `single_package_${(0, uuid_1.v4)()}.zip`);
107
+ zip.writeZip(zipFilePath, () => fs.chmodSync(zipFilePath, file_constants_1.FileConstants.DEFAULT_FILE_PERMISSIONS));
108
+ return zipFilePath;
109
+ }
98
110
  getSerializedFileContent(data) {
99
111
  return data;
100
112
  }
@@ -1,12 +1,12 @@
1
1
  import { Context } from "../../core/command/cli-context";
2
- import { AssetRegistryDescriptor, AssetRegistryMetadata } from "./asset-registry.interfaces";
2
+ import { AgentSkillsResponse, AssetRegistryDescriptor, AssetRegistryMetadata } from "./asset-registry.interfaces";
3
3
  export declare class AssetRegistryApi {
4
4
  private httpClient;
5
5
  constructor(context: Context);
6
6
  listTypes(): Promise<AssetRegistryMetadata>;
7
+ listSkills(): Promise<AgentSkillsResponse>;
7
8
  getType(assetType: string): Promise<AssetRegistryDescriptor>;
8
9
  getSchema(assetType: string): Promise<any>;
9
10
  getExamples(assetType: string): Promise<any>;
10
- getMethodology(assetType: string): Promise<any>;
11
11
  validate(assetType: string, body: any): Promise<any>;
12
12
  }
@@ -0,0 +1,3 @@
1
+ export declare const ASSET_REGISTRY_DISABLED_ERROR = "Asset registry feature is currently disabled";
2
+ export declare const ASSET_REGISTRY_DISABLED_USER_MESSAGE = "Asset registry is not enabled for this team. Contact your administrator to enable the feature.";
3
+ export declare function handleAssetRegistryApiError(operation: string, error: unknown): never;
@@ -20,8 +20,8 @@ export interface AssetService {
20
20
  export interface AssetEndpoints {
21
21
  schema: string;
22
22
  validate: string;
23
- methodology?: string;
24
23
  examples?: string;
24
+ skills?: string;
25
25
  }
26
26
  export interface AssetContributions {
27
27
  pigEntityTypes: string[];
@@ -36,3 +36,15 @@ export interface ValidateOptions {
36
36
  file?: string;
37
37
  json: boolean;
38
38
  }
39
+ export interface AgentSkillMetadata {
40
+ version: string;
41
+ }
42
+ export interface AgentSkill {
43
+ name: string;
44
+ description: string;
45
+ path: string;
46
+ metadata: AgentSkillMetadata;
47
+ }
48
+ export interface AgentSkillsResponse {
49
+ skills: AgentSkill[];
50
+ }
@@ -4,15 +4,16 @@ export declare class AssetRegistryService {
4
4
  private api;
5
5
  constructor(context: Context);
6
6
  listTypes(jsonResponse: boolean): Promise<void>;
7
+ listSkills(jsonResponse: boolean): Promise<void>;
7
8
  getType(assetType: string, jsonResponse: boolean): Promise<void>;
8
9
  getSchema(assetType: string, jsonResponse: boolean): Promise<void>;
9
10
  getExamples(assetType: string, jsonResponse: boolean): Promise<void>;
10
- getMethodology(assetType: string, jsonResponse: boolean): Promise<void>;
11
11
  validate(opts: ValidateOptions): Promise<void>;
12
12
  private static readonly INLINE_VALIDATION_NODE_KEY;
13
13
  private buildValidatePayload;
14
14
  private parseJson;
15
15
  private outputResponse;
16
16
  private logDescriptorSummary;
17
+ private logSkillSummary;
17
18
  private logDescriptorDetail;
18
19
  }
@@ -7,6 +7,6 @@ declare class Module extends IModule {
7
7
  private getSchema;
8
8
  private validate;
9
9
  private getExamples;
10
- private getMethodology;
10
+ private listSkills;
11
11
  }
12
12
  export = Module;
@@ -0,0 +1,7 @@
1
+ import { PackageMetadataExportTransport } from "../interfaces/package-export.interfaces";
2
+ import { Context } from "../../../core/command/cli-context";
3
+ export declare class MetadataApi {
4
+ private readonly httpClient;
5
+ constructor(context: Context);
6
+ exportPackagesMetadata(packageKeys: string[]): Promise<PackageMetadataExportTransport[]>;
7
+ }
@@ -1,7 +1,8 @@
1
1
  import { Context } from "../../../core/command/cli-context";
2
- import { GetNodeDiffRequest, NodeConfigurationDiffTransport } from "../interfaces/node-diff.interfaces";
2
+ import { GetNodeDiffRequest, GetNodeDiffWithFileRequest, NodeConfigurationDiffTransport } from "../interfaces/node-diff.interfaces";
3
3
  export declare class NodeDiffApi {
4
4
  private httpClient;
5
5
  constructor(context: Context);
6
6
  diff(request: GetNodeDiffRequest): Promise<NodeConfigurationDiffTransport>;
7
+ diffWithFile(request: GetNodeDiffWithFileRequest): Promise<NodeConfigurationDiffTransport>;
7
8
  }
@@ -0,0 +1,8 @@
1
+ import * as FormData from "form-data";
2
+ import { Context } from "../../../core/command/cli-context";
3
+ import { SinglePackageImportResult } from "../interfaces/single-package-import.interfaces";
4
+ export declare class SinglePackageImportApi {
5
+ private readonly httpClient;
6
+ constructor(context: Context);
7
+ importPackage(data: FormData, overwrite: boolean): Promise<SinglePackageImportResult>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { PackageExportTransport } from "../interfaces/package-export.interfaces";
2
+ import { Context } from "../../../core/command/cli-context";
3
+ export declare class StagingPackageApi {
4
+ private readonly httpClient;
5
+ constructor(context: Context);
6
+ findAllStagingPackages(flavors: string[], includeBranches?: boolean): Promise<PackageExportTransport[]>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PackageKeyAndVersionPair, VariableManifestTransport } from "../interfaces/package-export.interfaces";
2
+ import { Context } from "../../../core/command/cli-context";
3
+ export declare class VariableApi {
4
+ private readonly httpClient;
5
+ constructor(context: Context);
6
+ findVariablesWithValuesByPackageKeysAndVersion(packagesByKeyAndVersion: PackageKeyAndVersionPair[]): Promise<VariableManifestTransport[]>;
7
+ }
@@ -1,14 +1,6 @@
1
1
  import { Context } from "../../core/command/cli-context";
2
2
  export declare class ConfigCommandService {
3
- private batchImportExportService;
4
3
  private variableService;
5
- private diffService;
6
4
  constructor(context: Context);
7
- listPackages(jsonResponse: boolean, flavors: string[], withDependencies: boolean, packageKeys: string[], keysByVersion: string[], variableValue: string, variableType: string): Promise<void>;
8
5
  listVariables(jsonResponse: boolean, keysByVersion: string[], keysByVersionFile: string, packageKeys: string[]): Promise<void>;
9
- batchExportPackages(packageKeys: string[], packageKeysByVersion: string[], withDependencies: boolean, gitBranch: string, unzip: boolean): Promise<void>;
10
- batchExportPackagesMetadata(packageKeys: string[], jsonResponse: boolean): Promise<void>;
11
- batchImportPackages(file: string, directory: string, overwrite: boolean, gitBranch: string, performValidation?: boolean): Promise<void>;
12
- diffPackages(file: string, hasChanges: boolean, jsonResponse: boolean): Promise<void>;
13
- private listPackagesByVariableValue;
14
6
  }
@@ -0,0 +1,2 @@
1
+ import { VariableManifestTransport } from "./interfaces/package-export.interfaces";
2
+ export declare function fixConnectionVariables(variables: VariableManifestTransport[]): VariableManifestTransport[];
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ import { ReadStream } from "node:fs";
1
3
  import { ConfigurationChangeTransport, NodeConfigurationChangeType } from "./diff-package.interfaces";
2
4
  export interface GetNodeDiffRequest {
3
5
  packageKey: string;
@@ -5,6 +7,12 @@ export interface GetNodeDiffRequest {
5
7
  baseVersion: string;
6
8
  compareVersion: string;
7
9
  }
10
+ export interface GetNodeDiffWithFileRequest {
11
+ packageKey: string;
12
+ nodeKey: string;
13
+ baseVersion: string;
14
+ file: ReadStream;
15
+ }
8
16
  export interface NodeConfigurationDiffTransport {
9
17
  packageKey: string;
10
18
  nodeKey: string;
@@ -0,0 +1,19 @@
1
+ import { NodeTransport } from "./node.interfaces";
2
+ export interface PackageTransport {
3
+ id: string;
4
+ key: string;
5
+ name: string;
6
+ type?: string;
7
+ version?: string;
8
+ flavor?: string;
9
+ schemaVersion?: number;
10
+ createdBy?: string;
11
+ updatedBy?: string;
12
+ creationDate?: string;
13
+ changeDate?: string;
14
+ [key: string]: any;
15
+ }
16
+ export interface SinglePackageImportResult {
17
+ importedPackage: PackageTransport;
18
+ importedNodes: NodeTransport[];
19
+ }
@@ -0,0 +1,7 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ export declare class MetadataService {
3
+ private metadataApi;
4
+ constructor(context: Context);
5
+ exportPackagesMetadata(packageKeys: string[], jsonResponse: boolean): Promise<void>;
6
+ private exportListOfPackagesMetadata;
7
+ }
@@ -6,11 +6,13 @@ import { Context } from "../../core/command/cli-context";
6
6
  declare class Module extends IModule {
7
7
  register(context: Context, configurator: Configurator): void;
8
8
  private listPackages;
9
+ private listStagingPackages;
9
10
  private batchExportPackages;
10
- private batchExportPackagesMetadata;
11
+ private exportPackagesMetadata;
11
12
  private getPackageVersion;
12
13
  private createPackageVersion;
13
14
  private batchImportPackages;
15
+ private importSinglePackage;
14
16
  private diffPackages;
15
17
  private validatePackage;
16
18
  private listVariables;
@@ -3,4 +3,7 @@ export declare class NodeDiffService {
3
3
  private nodeDiffApi;
4
4
  constructor(context: Context);
5
5
  diff(packageKey: string, nodeKey: string, baseVersion: string, compareVersion: string, jsonResponse: boolean): Promise<void>;
6
+ diffWithFile(packageKey: string, nodeKey: string, baseVersion: string, file: string, jsonResponse: boolean): Promise<void>;
7
+ private exportDiffAsJson;
8
+ private logDiff;
6
9
  }
@@ -0,0 +1,12 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ export declare class SinglePackageImportService {
3
+ private static readonly MAX_UNCOMPRESSED_ZIP_SIZE;
4
+ private readonly singlePackageImportApi;
5
+ constructor(context: Context);
6
+ importPackage(file: string, directory: string, overwrite: boolean, jsonResponse: boolean): Promise<void>;
7
+ private resolveSource;
8
+ private buildBodyForImport;
9
+ private assertUncompressedSizeWithinLimit;
10
+ private getReadableStream;
11
+ private outputResult;
12
+ }
@@ -0,0 +1,7 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ export declare class StagingPackageService {
3
+ private stagingPackageApi;
4
+ constructor(context: Context);
5
+ listStagingPackages(flavors: string[], includeBranches: boolean, jsonResponse: boolean): Promise<void>;
6
+ private exportListOfPackages;
7
+ }
@@ -1,9 +1,8 @@
1
1
  import { Context } from "../../core/command/cli-context";
2
2
  export declare class VariableService {
3
- private batchImportExportApi;
3
+ private variableApi;
4
4
  private variableAssignmentCandidatesApi;
5
5
  private readonly stagingPackageVariablesApi;
6
- private studioService;
7
6
  constructor(context: Context);
8
7
  listVariables(keysByVersion: string[], keysByVersionFile: string): Promise<void>;
9
8
  listCandidateAssignments(type: string, params: string): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import * as FormData from "form-data";
2
+ import { Context } from "../../../core/command/cli-context";
3
+ import { PackageDiffMetadata, PackageDiffTransport } from "../../configuration-management/interfaces/diff-package.interfaces";
4
+ export declare class DiffApi {
5
+ private readonly httpClient;
6
+ constructor(context: Context);
7
+ diffPackages(baseVersion: string, data: FormData): Promise<PackageDiffTransport[]>;
8
+ hasChanges(baseVersion: string, data: FormData): Promise<PackageDiffMetadata[]>;
9
+ }
@@ -1,17 +1,15 @@
1
1
  /// <reference types="node" />
2
2
  import * as FormData from "form-data";
3
- import { PackageExportTransport, PackageKeyAndVersionPair, PackageMetadataExportTransport, PostPackageImportData, VariableManifestTransport } from "../interfaces/package-export.interfaces";
3
+ import { PackageExportTransport, PostPackageImportData } from "../../configuration-management/interfaces/package-export.interfaces";
4
4
  import { Context } from "../../../core/command/cli-context";
5
- export declare class BatchImportExportApi {
6
- private httpClient;
5
+ export declare class T2tcPackageApi {
6
+ private readonly httpClient;
7
7
  constructor(context: Context);
8
- findAllActivePackages(flavors: string[], withDependencies?: boolean): Promise<PackageExportTransport[]>;
9
- findActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<PackageExportTransport[]>;
8
+ findAllActivePackages(flavors: string[], withDependencies?: boolean, includeBranches?: boolean): Promise<PackageExportTransport[]>;
9
+ findActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string, includeBranches?: boolean): Promise<PackageExportTransport[]>;
10
10
  findActivePackagesByKeys(packageKeys: string[], withDependencies?: boolean): Promise<PackageExportTransport[]>;
11
11
  findPackagesByKeysAndVersion(packageKeysWithVersion: string[], withDependencies?: boolean): Promise<PackageExportTransport[]>;
12
12
  exportPackages(packageKeys: string[], withDependencies: boolean): Promise<Buffer>;
13
13
  exportPackagesByVersions(packageKeysWithVersion: string[], withDependencies: boolean): Promise<Buffer>;
14
- batchExportPackagesMetadata(packageKeys: string[]): Promise<PackageMetadataExportTransport[]>;
15
14
  importPackages(data: FormData, overwrite: boolean, performValidation: boolean): Promise<PostPackageImportData[]>;
16
- findVariablesWithValuesByPackageKeysAndVersion(packagesByKeyAndVersion: PackageKeyAndVersionPair[]): Promise<VariableManifestTransport[]>;
17
15
  }
@@ -2,7 +2,7 @@ import { Context } from "../../core/command/cli-context";
2
2
  export declare class DiffService {
3
3
  private diffApi;
4
4
  constructor(context: Context);
5
- diffPackages(file: string, hasChanges: boolean, jsonResponse: boolean): Promise<void>;
5
+ diffPackages(file: string, hasChanges: boolean, baseVersion: string, jsonResponse: boolean): Promise<void>;
6
6
  private hasChanges;
7
7
  private diffPackagesAndReturnDiff;
8
8
  private buildBodyForDiff;
@@ -0,0 +1,10 @@
1
+ import { Configurator, IModule } from "../../core/command/module-handler";
2
+ import { Context } from "../../core/command/cli-context";
3
+ declare class Module extends IModule {
4
+ register(context: Context, configurator: Configurator): void;
5
+ private listPackages;
6
+ private batchExportPackages;
7
+ private batchImportPackages;
8
+ private diffPackages;
9
+ }
10
+ export = Module;
@@ -1,6 +1,6 @@
1
1
  import { IZipEntry } from "adm-zip";
2
2
  import * as AdmZip from "adm-zip";
3
- import { PackageExportTransport, StudioPackageManifest, VariableManifestTransport } from "./interfaces/package-export.interfaces";
3
+ import { PackageExportTransport, StudioPackageManifest, VariableManifestTransport } from "../configuration-management/interfaces/package-export.interfaces";
4
4
  import { ContentNodeTransport } from "../studio/interfaces/package-manager.interfaces";
5
5
  import { Context } from "../../core/command/cli-context";
6
6
  export declare class StudioService {
@@ -13,13 +13,11 @@ export declare class StudioService {
13
13
  private studioVariableService;
14
14
  constructor(context: Context);
15
15
  getExportPackagesWithStudioData(packagesToExport: PackageExportTransport[], withDependencies: boolean): Promise<PackageExportTransport[]>;
16
- fixConnectionVariables(variables: VariableManifestTransport[]): VariableManifestTransport[];
17
16
  getStudioPackageManifests(studioPackageKeys: string[]): Promise<StudioPackageManifest[]>;
18
17
  processPackageForExport(exportedPackage: IZipEntry, exportedVariables: VariableManifestTransport[]): AdmZip;
19
18
  processImportedPackages(configs: AdmZip, existingStudioPackages: ContentNodeTransport[], studioManifests: StudioPackageManifest[]): Promise<void>;
20
19
  private setSpaceIdForStudioPackages;
21
20
  private setDataModelsForStudioPackages;
22
- private fixConnectionVariable;
23
21
  private deleteScenarioAssets;
24
22
  private fixConnectionVariablesForRootNodeFiles;
25
23
  private getPackageKeyAndVersion;
@@ -0,0 +1,12 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ export declare class T2tcCommandService {
3
+ private t2tcPackageService;
4
+ private diffService;
5
+ private stagingPackageService;
6
+ constructor(context: Context);
7
+ listPackages(jsonResponse: boolean, flavors: string[], withDependencies: boolean, packageKeys: string[], keysByVersion: string[], variableValue: string, variableType: string, includeBranches: boolean, staging: boolean): Promise<void>;
8
+ batchExportPackages(packageKeys: string[], packageKeysByVersion: string[], withDependencies: boolean, gitBranch: string, unzip: boolean): Promise<void>;
9
+ batchImportPackages(file: string, directory: string, overwrite: boolean, gitBranch: string, performValidation?: boolean): Promise<void>;
10
+ diffPackages(file: string, hasChanges: boolean, baseVersion: string, jsonResponse: boolean): Promise<void>;
11
+ private listPackagesByVariableValue;
12
+ }
@@ -1,22 +1,21 @@
1
1
  import { Context } from "../../core/command/cli-context";
2
- export declare class BatchImportExportService {
3
- private batchImportExportApi;
2
+ export declare class T2tcPackageService {
3
+ private t2tcPackageApi;
4
+ private variableApi;
4
5
  private studioPackageApi;
5
6
  private studioService;
6
7
  private gitService;
7
8
  constructor(context: Context);
8
- listActivePackages(flavors: string[]): Promise<void>;
9
- findAndExportListOfPackages(flavors: string[], packageKeys: string[], keysByVersion: string[], withDependencies: boolean): Promise<void>;
9
+ listActivePackages(flavors: string[], includeBranches: boolean): Promise<void>;
10
+ findAndExportListOfPackages(flavors: string[], packageKeys: string[], keysByVersion: string[], withDependencies: boolean, includeBranches: boolean): Promise<void>;
10
11
  listPackagesByKeysWithVersion(keysByVersion: string[], withDependencies: boolean): Promise<void>;
11
12
  batchExportPackages(packageKeys: string[], packageKeysByVersion: string[], withDependencies: boolean, gitBranch: string, unzip: boolean): Promise<void>;
12
- batchExportPackagesMetadata(packageKeys: string[], jsonResponse: boolean): Promise<void>;
13
13
  batchImportPackages(sourcePath: string, overwrite: boolean, gitBranch: string, performValidation?: boolean): Promise<void>;
14
- findAndExportListOfActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<void>;
15
- listActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<void>;
14
+ findAndExportListOfActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string, includeBranches: boolean): Promise<void>;
15
+ listActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string, includeBranches: boolean): Promise<void>;
16
16
  private exportListOfPackages;
17
17
  private getVersionsByPackageKey;
18
18
  private getVersionedVariablesForPackagesWithKeys;
19
- private exportListOfPackagesMetadata;
20
19
  private buildBodyForImport;
21
20
  private assertUncompressedSizeWithinLimit;
22
21
  private getReadableStream;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Commands related to the View feature.
3
+ */
4
+ import { Configurator, IModule } from "../../core/command/module-handler";
5
+ import { Context } from "../../core/command/cli-context";
6
+ declare class Module extends IModule {
7
+ register(context: Context, configurator: Configurator): void;
8
+ private pullViewBookmarks;
9
+ private pushViewBookmarks;
10
+ }
11
+ export = Module;
@@ -0,0 +1,7 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ export declare class ViewBookmarksCommandService {
3
+ private readonly viewBookmarksManagerFactory;
4
+ constructor(context: Context);
5
+ pullViewBookmarks(boardId: string, type?: string): Promise<void>;
6
+ pushViewBookmarks(boardId: string, filename: string): Promise<void>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { ViewBookmarksManager } from "./view-bookmarks.manager";
2
+ import { Context } from "../../core/command/cli-context";
3
+ export declare class ViewBookmarksManagerFactory {
4
+ private readonly context;
5
+ constructor(context: Context);
6
+ createViewBookmarksManager(filename: string, boardId: string, type?: string): ViewBookmarksManager;
7
+ private resolveFilePath;
8
+ }
@@ -0,0 +1,20 @@
1
+ import { Context } from "../../core/command/cli-context";
2
+ import { BaseManager } from "../../core/http/http-shared/base.manager";
3
+ import { ManagerConfig } from "../../core/http/http-shared/manager-config.interface";
4
+ export declare class ViewBookmarksManager extends BaseManager {
5
+ private static readonly BASE_URL;
6
+ private static readonly VIEW_BOOKMARKS_FILE_PREFIX;
7
+ private _boardId;
8
+ private _filePath;
9
+ private _type;
10
+ constructor(context: Context);
11
+ get filePath(): string;
12
+ set filePath(value: string);
13
+ get boardId(): string;
14
+ set boardId(value: string);
15
+ get type(): string;
16
+ set type(value: string);
17
+ getConfig(): ManagerConfig;
18
+ getBody(): any;
19
+ protected getSerializedFileContent(data: any): string;
20
+ }
@@ -0,0 +1,4 @@
1
+ export declare class BranchUtils {
2
+ private static readonly BRANCH_SEPARATOR;
3
+ static isBranchPackageKey(packageKey: string): boolean;
4
+ }
@@ -8,6 +8,7 @@ export declare class FileService {
8
8
  extractExportedZipWithNestedZipsToDir(zipFile: AdmZip, targetDir: string): string;
9
9
  isDirectory(sourcePath: string): boolean;
10
10
  zipDirectoryInBatchExportFormat(sourceDir: string): string;
11
+ zipDirectoryAsSinglePackage(sourceDir: string): string;
11
12
  private getSerializedFileContent;
12
13
  private restrictFilePermissions;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celonis/content-cli",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "description": "CLI Tool to help manage content in Celonis Platform",
5
5
  "main": "content-cli.js",
6
6
  "bin": {
@@ -1,9 +0,0 @@
1
- import * as FormData from "form-data";
2
- import { Context } from "../../../core/command/cli-context";
3
- import { PackageDiffMetadata, PackageDiffTransport } from "../interfaces/diff-package.interfaces";
4
- export declare class DiffApi {
5
- private httpClient;
6
- constructor(context: Context);
7
- diffPackages(data: FormData): Promise<PackageDiffTransport[]>;
8
- hasChanges(data: FormData): Promise<PackageDiffMetadata[]>;
9
- }