@hahnpro/hpc-api 2026.4.2 → 2026.4.3

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 (37) hide show
  1. package/package.json +2 -2
  2. package/src/lib/interfaces/alert.interface.d.ts +31 -1
  3. package/src/lib/interfaces/alert.interface.js +23 -1
  4. package/src/lib/interfaces/api.interface.d.ts +17 -0
  5. package/src/lib/interfaces/api.interface.js +7 -0
  6. package/src/lib/interfaces/endpoint.interface.d.ts +47 -8
  7. package/src/lib/interfaces/endpoint.interface.js +19 -0
  8. package/src/lib/interfaces/flow-deployment-status.interface.d.ts +32 -0
  9. package/src/lib/interfaces/flow-deployment-status.interface.js +58 -0
  10. package/src/lib/interfaces/flow-deployment.interface.d.ts +15 -11
  11. package/src/lib/interfaces/flow-deployment.interface.js +5 -0
  12. package/src/lib/interfaces/flow-executor.interface.d.ts +33 -0
  13. package/src/lib/interfaces/flow-executor.interface.js +2 -0
  14. package/src/lib/interfaces/flow-function.interface.d.ts +19 -22
  15. package/src/lib/interfaces/flow-module.interface.d.ts +7 -5
  16. package/src/lib/interfaces/flow.interface.d.ts +34 -5
  17. package/src/lib/interfaces/flow.interface.js +8 -0
  18. package/src/lib/interfaces/index.d.ts +17 -9
  19. package/src/lib/interfaces/index.js +27 -1
  20. package/src/lib/interfaces/notification-rule.interface.d.ts +5 -1
  21. package/src/lib/interfaces/notification-rule.interface.js +6 -0
  22. package/src/lib/interfaces/organization.interface.d.ts +1 -0
  23. package/src/lib/interfaces/resource.interface.d.ts +21 -4
  24. package/src/lib/interfaces/resource.interface.js +4 -1
  25. package/src/lib/interfaces/timeseries.interface.d.ts +25 -8
  26. package/src/lib/interfaces/timeseries.interface.js +2 -0
  27. package/src/lib/mock/flow.mock.service.js +2 -2
  28. package/src/lib/mock/organizations-administration.mock.service.d.ts +1 -1
  29. package/src/lib/mock/organizations-administration.mock.service.js +1 -1
  30. package/src/lib/mock/organizations.mock.service.d.ts +2 -1
  31. package/src/lib/mock/organizations.mock.service.js +3 -0
  32. package/src/lib/services/flow.service.js +2 -2
  33. package/src/lib/services/object-reference.service.js +4 -4
  34. package/src/lib/services/organizations-administration.service.d.ts +2 -3
  35. package/src/lib/services/organizations-administration.service.js +9 -4
  36. package/src/lib/services/organizations.service.d.ts +2 -1
  37. package/src/lib/services/organizations.service.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2026.4.2",
3
+ "version": "2026.4.3",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@microsoft/fetch-event-source": "2.0.1",
12
- "axios": "1.14.0",
12
+ "axios": "1.15.0",
13
13
  "eventsource": "4.1.0",
14
14
  "jose": "5.10.0",
15
15
  "jwt-decode": "4.0.0",
@@ -4,7 +4,7 @@ export interface Alert {
4
4
  name: string;
5
5
  description?: string;
6
6
  tsRefs: TimeSeriesReference[];
7
- status: string;
7
+ status: AlertStatus;
8
8
  condition: AlertCondition;
9
9
  messageTmpl?: string;
10
10
  tags?: string[];
@@ -24,11 +24,24 @@ export interface AlertCondition {
24
24
  period?: string;
25
25
  stopPeriod?: string;
26
26
  }
27
+ export interface AlertMessageTemplate {
28
+ label: string;
29
+ text: string;
30
+ }
27
31
  export interface TimeSeriesReference {
28
32
  alias?: string;
29
33
  id: string;
30
34
  field: string;
31
35
  }
36
+ export interface UpdatedField {
37
+ alias?: string;
38
+ field: string;
39
+ value: string | number;
40
+ }
41
+ export declare enum AlertStatus {
42
+ ACTIVE = "ACTIVE",
43
+ INACTIVE = "INACTIVE"
44
+ }
32
45
  export declare enum AlertType {
33
46
  Threshold = "threshold",
34
47
  Relative = "relative",
@@ -41,3 +54,20 @@ export declare enum AlertLevel {
41
54
  OK = "OK",
42
55
  ANY = "ANY"
43
56
  }
57
+ export declare const DEFAULT_THRESHOLD_CONDITION: {
58
+ level: AlertLevel;
59
+ range: number[];
60
+ operator: string;
61
+ };
62
+ export declare const DEFAULT_RELATIVE_CONDITION: {
63
+ level: AlertLevel;
64
+ operator: string;
65
+ change: string;
66
+ value: number;
67
+ period: string;
68
+ };
69
+ export declare const DEFAULT_DEADMAN_CONDITION: {
70
+ level: AlertLevel;
71
+ period: string;
72
+ stopPeriod: string;
73
+ };
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlertLevel = exports.AlertType = void 0;
3
+ exports.DEFAULT_DEADMAN_CONDITION = exports.DEFAULT_RELATIVE_CONDITION = exports.DEFAULT_THRESHOLD_CONDITION = exports.AlertLevel = exports.AlertType = exports.AlertStatus = void 0;
4
+ var AlertStatus;
5
+ (function (AlertStatus) {
6
+ AlertStatus["ACTIVE"] = "ACTIVE";
7
+ AlertStatus["INACTIVE"] = "INACTIVE";
8
+ })(AlertStatus || (exports.AlertStatus = AlertStatus = {}));
4
9
  var AlertType;
5
10
  (function (AlertType) {
6
11
  AlertType["Threshold"] = "threshold";
@@ -15,3 +20,20 @@ var AlertLevel;
15
20
  AlertLevel["OK"] = "OK";
16
21
  AlertLevel["ANY"] = "ANY";
17
22
  })(AlertLevel || (exports.AlertLevel = AlertLevel = {}));
23
+ exports.DEFAULT_THRESHOLD_CONDITION = {
24
+ level: AlertLevel.CRITICAL,
25
+ range: [10],
26
+ operator: 'greater',
27
+ };
28
+ exports.DEFAULT_RELATIVE_CONDITION = {
29
+ level: AlertLevel.CRITICAL,
30
+ operator: 'greater',
31
+ change: 'absolute',
32
+ value: 10,
33
+ period: '1m',
34
+ };
35
+ exports.DEFAULT_DEADMAN_CONDITION = {
36
+ level: AlertLevel.CRITICAL,
37
+ period: '60s',
38
+ stopPeriod: '10m',
39
+ };
@@ -9,3 +9,20 @@ export interface Api {
9
9
  updatedBy?: Author;
10
10
  owner?: Owner;
11
11
  }
12
+ export interface ObjectIdLike {
13
+ toString(): string;
14
+ }
15
+ export interface Change {
16
+ action: ChangeAction;
17
+ affectedObject: string;
18
+ subject: any;
19
+ value: any;
20
+ accepted: boolean;
21
+ priority: number;
22
+ }
23
+ export declare enum ChangeAction {
24
+ ADDED = 0,
25
+ REMOVED = 1,
26
+ CHANGED = 2
27
+ }
28
+ export type ChangeSubject = 'tags' | 'readPermissions' | 'readWritePermissions';
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChangeAction = void 0;
4
+ var ChangeAction;
5
+ (function (ChangeAction) {
6
+ ChangeAction[ChangeAction["ADDED"] = 0] = "ADDED";
7
+ ChangeAction[ChangeAction["REMOVED"] = 1] = "REMOVED";
8
+ ChangeAction[ChangeAction["CHANGED"] = 2] = "CHANGED";
9
+ })(ChangeAction || (exports.ChangeAction = ChangeAction = {}));
@@ -4,13 +4,9 @@ export interface Endpoint {
4
4
  id?: string;
5
5
  name: string;
6
6
  description?: string;
7
- status: string;
8
- config: {
9
- type: string;
10
- url?: string;
11
- authToken: string;
12
- recipients?: string[];
13
- };
7
+ tags?: string[];
8
+ status: NotificationEndpointStatus;
9
+ config: EndpointConfig;
14
10
  spamProtection?: string;
15
11
  pauseInterval?: number;
16
12
  readPermissions: string[];
@@ -22,14 +18,24 @@ export interface Endpoint {
22
18
  updatedAt?: string;
23
19
  deletedAt?: string;
24
20
  }
21
+ export interface EndpointConfig {
22
+ type: string;
23
+ url?: string;
24
+ authToken?: string;
25
+ recipients?: string[];
26
+ message?: string;
27
+ }
28
+ export type NotificationEndpoint = Endpoint;
29
+ export type NotificationLogType = 'info' | 'error';
25
30
  export interface EndpointLog {
26
31
  id?: string;
27
32
  endpoint: string;
28
- type?: 'info' | 'error';
33
+ type?: NotificationLogType;
29
34
  data?: string;
30
35
  group?: string;
31
36
  updatedAt?: string;
32
37
  }
38
+ export type NotificationEndpointLog = EndpointLog;
33
39
  export interface NotificationPayload {
34
40
  subject: string;
35
41
  message: string;
@@ -46,3 +52,36 @@ export interface NotificationPayload {
46
52
  assetName?: string;
47
53
  assetLink?: string;
48
54
  }
55
+ interface PreviousNotification {
56
+ subject: string;
57
+ timestamp: string;
58
+ }
59
+ export interface AdditionalNotificationData {
60
+ level?: string;
61
+ group?: string;
62
+ trigger?: string;
63
+ timestamp?: string;
64
+ previousNotification?: PreviousNotification;
65
+ eventLink?: string;
66
+ assetLink?: string;
67
+ }
68
+ export interface SearchEndpointResult {
69
+ readonly id: string;
70
+ readonly name: string;
71
+ }
72
+ export declare enum NotificationEndpointStatus {
73
+ ACTIVE = "ACTIVE",
74
+ INACTIVE = "INACTIVE"
75
+ }
76
+ export declare enum NotificationEndpointType {
77
+ POST = "post",
78
+ FLOW = "flow",
79
+ EMAIL = "email",
80
+ TEAMS = "teams"
81
+ }
82
+ export declare enum NotificationEndpointSpamProtection {
83
+ NONE = "none",
84
+ ASSET = "asset",
85
+ MESSAGE = "message"
86
+ }
87
+ export {};
@@ -1,2 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationEndpointSpamProtection = exports.NotificationEndpointType = exports.NotificationEndpointStatus = void 0;
4
+ var NotificationEndpointStatus;
5
+ (function (NotificationEndpointStatus) {
6
+ NotificationEndpointStatus["ACTIVE"] = "ACTIVE";
7
+ NotificationEndpointStatus["INACTIVE"] = "INACTIVE";
8
+ })(NotificationEndpointStatus || (exports.NotificationEndpointStatus = NotificationEndpointStatus = {}));
9
+ var NotificationEndpointType;
10
+ (function (NotificationEndpointType) {
11
+ NotificationEndpointType["POST"] = "post";
12
+ NotificationEndpointType["FLOW"] = "flow";
13
+ NotificationEndpointType["EMAIL"] = "email";
14
+ NotificationEndpointType["TEAMS"] = "teams";
15
+ })(NotificationEndpointType || (exports.NotificationEndpointType = NotificationEndpointType = {}));
16
+ var NotificationEndpointSpamProtection;
17
+ (function (NotificationEndpointSpamProtection) {
18
+ NotificationEndpointSpamProtection["NONE"] = "none";
19
+ NotificationEndpointSpamProtection["ASSET"] = "asset";
20
+ NotificationEndpointSpamProtection["MESSAGE"] = "message";
21
+ })(NotificationEndpointSpamProtection || (exports.NotificationEndpointSpamProtection = NotificationEndpointSpamProtection = {}));
@@ -0,0 +1,32 @@
1
+ export declare enum FlowDeploymentStatus {
2
+ CREATED = "created",
3
+ DEPLOYED = "deployed",
4
+ DEPLOYING = "deploying",
5
+ DEPLOYMENT_FAILED = "deployment failed",
6
+ DEPLOYMENT_QUEUED = "deployment queued",
7
+ DELETED = "deleted",
8
+ DELETING = "deleting",
9
+ DELETING_FAILED = "deleting failed",
10
+ GENERATED = "generated",
11
+ GENERATING = "generating",
12
+ GENERATING_FAILED = "generating failed",
13
+ GENERATING_QUEUED = "generating queued",
14
+ INACTIVE = "inactive",
15
+ PAUSED = "paused",
16
+ RUNNING = "running",
17
+ STOPPED = "stopped",
18
+ STOPPING = "stopping",
19
+ TIMEOUT = "timeout",
20
+ UNKNOWN = "unknown",
21
+ UPDATED = "updated",
22
+ UPDATING = "updating",
23
+ UPDATING_FAILED = "updating failed",
24
+ UPGRADED = "upgraded",
25
+ UPGRADING = "upgrading",
26
+ UPGRADING_FAILED = "upgrading failed"
27
+ }
28
+ export declare const RUNNING_STATES: FlowDeploymentStatus[];
29
+ export declare const STOPPED_STATES: FlowDeploymentStatus[];
30
+ export declare const PROCESSING_STATES: FlowDeploymentStatus[];
31
+ export declare const ERROR_STATES: FlowDeploymentStatus[];
32
+ export declare const UNKOWN_STATES: FlowDeploymentStatus[];
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNKOWN_STATES = exports.ERROR_STATES = exports.PROCESSING_STATES = exports.STOPPED_STATES = exports.RUNNING_STATES = exports.FlowDeploymentStatus = void 0;
4
+ var FlowDeploymentStatus;
5
+ (function (FlowDeploymentStatus) {
6
+ FlowDeploymentStatus["CREATED"] = "created";
7
+ FlowDeploymentStatus["DEPLOYED"] = "deployed";
8
+ FlowDeploymentStatus["DEPLOYING"] = "deploying";
9
+ FlowDeploymentStatus["DEPLOYMENT_FAILED"] = "deployment failed";
10
+ FlowDeploymentStatus["DEPLOYMENT_QUEUED"] = "deployment queued";
11
+ FlowDeploymentStatus["DELETED"] = "deleted";
12
+ FlowDeploymentStatus["DELETING"] = "deleting";
13
+ FlowDeploymentStatus["DELETING_FAILED"] = "deleting failed";
14
+ FlowDeploymentStatus["GENERATED"] = "generated";
15
+ FlowDeploymentStatus["GENERATING"] = "generating";
16
+ FlowDeploymentStatus["GENERATING_FAILED"] = "generating failed";
17
+ FlowDeploymentStatus["GENERATING_QUEUED"] = "generating queued";
18
+ FlowDeploymentStatus["INACTIVE"] = "inactive";
19
+ FlowDeploymentStatus["PAUSED"] = "paused";
20
+ FlowDeploymentStatus["RUNNING"] = "running";
21
+ FlowDeploymentStatus["STOPPED"] = "stopped";
22
+ FlowDeploymentStatus["STOPPING"] = "stopping";
23
+ FlowDeploymentStatus["TIMEOUT"] = "timeout";
24
+ FlowDeploymentStatus["UNKNOWN"] = "unknown";
25
+ FlowDeploymentStatus["UPDATED"] = "updated";
26
+ FlowDeploymentStatus["UPDATING"] = "updating";
27
+ FlowDeploymentStatus["UPDATING_FAILED"] = "updating failed";
28
+ FlowDeploymentStatus["UPGRADED"] = "upgraded";
29
+ FlowDeploymentStatus["UPGRADING"] = "upgrading";
30
+ FlowDeploymentStatus["UPGRADING_FAILED"] = "upgrading failed";
31
+ })(FlowDeploymentStatus || (exports.FlowDeploymentStatus = FlowDeploymentStatus = {}));
32
+ exports.RUNNING_STATES = [FlowDeploymentStatus.RUNNING];
33
+ exports.STOPPED_STATES = [FlowDeploymentStatus.STOPPED, FlowDeploymentStatus.PAUSED];
34
+ exports.PROCESSING_STATES = [
35
+ FlowDeploymentStatus.CREATED,
36
+ FlowDeploymentStatus.DEPLOYED,
37
+ FlowDeploymentStatus.DEPLOYING,
38
+ FlowDeploymentStatus.DEPLOYMENT_QUEUED,
39
+ FlowDeploymentStatus.DELETED,
40
+ FlowDeploymentStatus.DELETING,
41
+ FlowDeploymentStatus.GENERATED,
42
+ FlowDeploymentStatus.GENERATING,
43
+ FlowDeploymentStatus.GENERATING_QUEUED,
44
+ FlowDeploymentStatus.STOPPING,
45
+ FlowDeploymentStatus.UPDATED,
46
+ FlowDeploymentStatus.UPDATING,
47
+ FlowDeploymentStatus.UPGRADED,
48
+ FlowDeploymentStatus.UPGRADING,
49
+ ];
50
+ exports.ERROR_STATES = [
51
+ FlowDeploymentStatus.DEPLOYMENT_FAILED,
52
+ FlowDeploymentStatus.DELETING_FAILED,
53
+ FlowDeploymentStatus.GENERATING_FAILED,
54
+ FlowDeploymentStatus.UPDATING_FAILED,
55
+ FlowDeploymentStatus.UPGRADING_FAILED,
56
+ FlowDeploymentStatus.TIMEOUT,
57
+ ];
58
+ exports.UNKOWN_STATES = [FlowDeploymentStatus.INACTIVE, FlowDeploymentStatus.UNKNOWN];
@@ -1,11 +1,15 @@
1
- import { FlowDiagram, FlowDto, Resource, Storage } from '.';
2
- export interface FlowDeployment extends Resource {
3
- flow: string | FlowDto;
4
- diagram: string | FlowDiagram;
1
+ import type { ObjectIdLike } from './api.interface';
2
+ import { FlowDeploymentStatus } from './flow-deployment-status.interface';
3
+ import type { Flow, FlowDiagram, FlowDto } from './flow.interface';
4
+ import { ResourceClass, type ResourceReference } from './resource.interface';
5
+ import type { Storage } from './storage.interface';
6
+ export declare class FlowDeployment extends ResourceClass {
7
+ flow: string | ObjectIdLike | Flow | FlowDto;
8
+ diagram: string | ObjectIdLike | FlowDiagram;
5
9
  artifact: Storage;
6
10
  flowModel: FlowModel;
7
- desiredStatus: string;
8
- actualStatus: string;
11
+ desiredStatus: FlowDeploymentStatus | string;
12
+ actualStatus: FlowDeploymentStatus | string;
9
13
  target: string;
10
14
  statistic?: FlowDeploymentStatistic;
11
15
  }
@@ -20,19 +24,19 @@ export interface FlowDeploymentStatistic {
20
24
  metrics?: Record<string, any>;
21
25
  }
22
26
  export interface FlowModel {
23
- elements: FlowModelElement[];
27
+ elements: FlowElement[];
24
28
  connections: FlowConnection[];
25
- modules?: any;
26
- refs?: any;
29
+ modules?: Record<string, string>;
27
30
  properties?: Record<string, any>;
31
+ refs?: ResourceReference[];
28
32
  }
29
- export interface FlowModelElement {
33
+ export interface FlowElement {
30
34
  id: string;
31
35
  name?: string;
36
+ functionFqn: string;
32
37
  type?: string;
33
38
  properties?: Record<string, any>;
34
39
  module: string;
35
- functionFqn: string;
36
40
  }
37
41
  export interface FlowConnection {
38
42
  id: string;
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowDeployment = void 0;
4
+ const resource_interface_1 = require("./resource.interface");
5
+ class FlowDeployment extends resource_interface_1.ResourceClass {
6
+ }
7
+ exports.FlowDeployment = FlowDeployment;
@@ -0,0 +1,33 @@
1
+ import type { Metrics } from './flow-deployment.interface';
2
+ import type { Owner } from './owner.interface';
3
+ export type DeploymentId = string;
4
+ export type ExecutorId = string;
5
+ export type WorkerId = number;
6
+ export type BillingEventsData = ({
7
+ deploymentId: string;
8
+ owner?: Owner;
9
+ } & Metrics)[];
10
+ export interface ExecutorEnvironment {
11
+ pod?: string;
12
+ namespace?: string;
13
+ node?: string;
14
+ versions?: {
15
+ flowSdk?: string;
16
+ node?: string;
17
+ python?: string;
18
+ };
19
+ }
20
+ export interface ExecutorStats {
21
+ uptime?: number;
22
+ }
23
+ export interface Executor {
24
+ id: ExecutorId;
25
+ deployments: DeploymentId[];
26
+ environment: ExecutorEnvironment;
27
+ stats: ExecutorStats;
28
+ }
29
+ export interface DeploymentTriggerResponse {
30
+ success?: boolean;
31
+ error?: string;
32
+ }
33
+ export type ExecutorEventType = 'com.flowstudio.executor.heartbeat' | 'com.flowstudio.executor.terminate';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,45 +1,42 @@
1
- export interface FlowFunctionDto {
1
+ import type { Api } from './api.interface';
2
+ import type { JsonSchemaForm } from './schema.interface';
3
+ export interface FlowFunction extends Api {
2
4
  fqn: string;
3
5
  category: string;
6
+ managedPermissions?: boolean;
4
7
  readPermissions: string[];
5
8
  readWritePermissions: string[];
6
- author: string;
9
+ author?: string;
7
10
  name?: string;
8
11
  description?: string;
9
12
  icon?: string;
10
13
  isAbstract?: boolean;
11
14
  supertype?: string;
12
- propertiesSchema?: Schema;
15
+ propertiesSchema?: JsonSchemaForm;
13
16
  inputStreams?: Stream[];
14
17
  outputStreams?: Stream[];
15
18
  tags?: string[];
16
19
  createdAt?: string;
17
20
  updatedAt?: string;
18
- revision?: string;
19
21
  }
20
- export type FlowFunctionRevision = FlowFunctionDto & {
22
+ export type FlowFunctionDto = FlowFunction;
23
+ export type FlowFunctionRevision = FlowFunction & {
21
24
  id: string;
22
25
  originalId: string;
23
26
  };
24
- interface Stream {
27
+ export interface Stream {
25
28
  name: string;
29
+ mime: string;
30
+ dataDescription: DataDescription;
26
31
  }
27
- interface Schema {
28
- schema: {
29
- type: string;
30
- properties?: {
31
- [key: string]: SchemaProperty;
32
- };
33
- };
34
- layout?: any[];
35
- data?: any;
32
+ export interface DataDescription {
33
+ type: string;
34
+ schemaUri: string;
35
+ schema: string;
36
36
  }
37
- type SchemaPropertyType = 'array' | 'boolean' | 'number' | 'string';
38
- interface SchemaProperty {
39
- type: SchemaPropertyType;
40
- title?: string;
37
+ export interface SearchFlowTypeResult {
38
+ id: string;
39
+ fqn: string;
40
+ name: string;
41
41
  description?: string;
42
- default?: any;
43
- [key: string]: any;
44
42
  }
45
- export {};
@@ -1,13 +1,15 @@
1
- import { Artifact } from '.';
2
- export interface FlowModule {
1
+ import type { Api } from './api.interface';
2
+ import type { Storage } from './storage.interface';
3
+ export interface FlowModule extends Api {
3
4
  name: string;
4
5
  description?: string;
5
- artifacts: Artifact[];
6
+ artifacts: FlowModuleArtifact[];
6
7
  author: string;
7
8
  tags?: string[];
8
9
  functions: string[];
9
10
  readPermissions: string[];
10
11
  readWritePermissions: string[];
11
- createdAt?: string;
12
- updatedAt?: string;
12
+ }
13
+ export interface FlowModuleArtifact extends Storage {
14
+ version: string;
13
15
  }
@@ -1,7 +1,21 @@
1
- import { FlowDeployment, JsonSchemaForm, Resource } from '.';
2
- export interface FlowDto extends Resource {
1
+ import type { Change, ChangeSubject, ObjectIdLike } from './api.interface';
2
+ import type { FlowDeployment } from './flow-deployment.interface';
3
+ import { ResourceClass, type Resource as ApiResource } from './resource.interface';
4
+ import type { JsonSchemaForm } from './schema.interface';
5
+ export declare class Flow extends ResourceClass {
6
+ diagram: string | ObjectIdLike | FlowDiagram;
7
+ deployments?: Array<string | ObjectIdLike | FlowDeployment>;
8
+ dashboard?: DashboardItem[];
9
+ propertiesSchema?: JsonSchemaForm;
10
+ author?: string;
11
+ }
12
+ export type FlowPopulated = Omit<Flow, 'diagram' | 'deployments'> & {
13
+ diagram: FlowDiagram;
14
+ deployments?: Array<string | FlowDeployment>;
15
+ };
16
+ export interface FlowDto extends ApiResource {
3
17
  diagram: string | FlowDiagram;
4
- deployments?: string[] | FlowDeployment[];
18
+ deployments?: Array<string | FlowDeployment>;
5
19
  dashboard?: DashboardItem[];
6
20
  propertiesSchema?: JsonSchemaForm;
7
21
  }
@@ -15,12 +29,27 @@ export interface DashboardItem {
15
29
  x: number;
16
30
  y: number;
17
31
  }
18
- export interface FlowDiagram {
32
+ export declare class FlowDiagram {
19
33
  id: string;
20
- flow: string | FlowDto;
34
+ flow: string | ObjectIdLike | Flow | FlowDto;
21
35
  json: string;
22
36
  author: string;
23
37
  createdAt?: Date | string;
24
38
  updatedAt?: Date | string;
25
39
  deletedAt?: Date | string;
26
40
  }
41
+ export interface FlowDeploymentDto {
42
+ name?: string;
43
+ diagramId?: string;
44
+ properties?: Record<string, any>;
45
+ tags?: string[];
46
+ readPermissions?: string[];
47
+ readWritePermissions?: string[];
48
+ }
49
+ export interface Function2ModuleMap {
50
+ [functionFqn: string]: string[];
51
+ }
52
+ export interface FlowChange extends Change {
53
+ subject: ChangeSubject;
54
+ value: string;
55
+ }
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowDiagram = exports.Flow = void 0;
4
+ const resource_interface_1 = require("./resource.interface");
5
+ class Flow extends resource_interface_1.ResourceClass {
6
+ }
7
+ exports.Flow = Flow;
8
+ class FlowDiagram {
9
+ }
10
+ exports.FlowDiagram = FlowDiagram;
@@ -1,17 +1,18 @@
1
1
  export type { AiAssistant, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, ResourceSelectionOption, ResourceSelectionRejected, SpeechToken, SystemMessage, Thread, ThreadPopulated, ToolMessage, ToolNameType, UserMessage, } from './ai.interface';
2
- export type { Alert, AlertCondition, TimeSeriesReference } from './alert.interface';
3
- export type { Api } from './api.interface';
2
+ export type { Alert, AlertCondition, AlertMessageTemplate, TimeSeriesReference, UpdatedField } from './alert.interface';
3
+ export type { Api, Change, ChangeSubject, ObjectIdLike } from './api.interface';
4
4
  export type { AddToProperty, Asset, AssetRevision, AssetTimeSeriesValue, AssetType, AssetTypeRevision, Attachment, EventCause, EventLevelOverride, RemoveFromProperty, Template, } from './asset.interface';
5
5
  export type { Author } from './author.interface';
6
6
  export type { Content, ContentAnalysis } from './content.interface';
7
7
  export type { CrmImportJsonRequest, CrmImportParser, CrmImportResponse } from './crm.interface';
8
8
  export type { DataInterface, Filter, Paginated, RequestParameter } from './data.interface';
9
- export type { Endpoint, EndpointLog, NotificationPayload } from './endpoint.interface';
9
+ export type { AdditionalNotificationData, Endpoint, EndpointConfig, EndpointLog, NotificationEndpoint, NotificationEndpointLog, NotificationLogType, NotificationPayload, SearchEndpointResult, } from './endpoint.interface';
10
10
  export type { CreateEventDto, Event, EventCountByAsset } from './event.interface';
11
- export type { FlowConnection, FlowDeployment, FlowDeploymentMetrics, FlowDeploymentStatistic, FlowLog, FlowModel, FlowModelElement, Metrics, Stats, StatsValues, } from './flow-deployment.interface';
12
- export type { FlowFunctionDto, FlowFunctionRevision } from './flow-function.interface';
13
- export type { FlowModule } from './flow-module.interface';
14
- export type { DashboardItem, FlowDiagram, FlowDto, FlowRevision } from './flow.interface';
11
+ export type { FlowConnection, FlowDeploymentMetrics, FlowDeploymentStatistic, FlowElement, FlowLog, FlowModel, Metrics, Stats, StatsValues, } from './flow-deployment.interface';
12
+ export type { FlowFunction, FlowFunctionDto, FlowFunctionRevision, SearchFlowTypeResult, Stream, DataDescription, } from './flow-function.interface';
13
+ export type { FlowModule, FlowModuleArtifact } from './flow-module.interface';
14
+ export type { DashboardItem, FlowDto, FlowRevision, FlowDeploymentDto, Function2ModuleMap, FlowChange, FlowPopulated, } from './flow.interface';
15
+ export type { BillingEventsData, DeploymentId, DeploymentTriggerResponse, Executor, ExecutorEnvironment, ExecutorEventType, ExecutorId, ExecutorStats, WorkerId, } from './flow-executor.interface';
15
16
  export type { Config, Issuer, TokenOption } from './http.interface';
16
17
  export type { InvitationRepresentation } from './invitation-representation.interface';
17
18
  export type { KeycloakProfile } from './keycloak-profile.interface';
@@ -32,16 +33,23 @@ export type { Secret } from './secret.interface';
32
33
  export type { ServerSentEvent } from './sse.interface';
33
34
  export type { Artifact, FileType, Storage, StorageProvider } from './storage.interface';
34
35
  export type { Assignee, LogbookEntry, LogbookEntryDto, Task } from './task.interface';
35
- export type { TimeSeries, TimeSeriesBucket, TimeSeriesCondition, TimeSeriesValue, TS_GROUPS } from './timeseries.interface';
36
+ export type { Retention, SearchTimeSeriesResult, SelectedField, TimeSeries, TimeSeriesBucket, TimeSeriesCondition, TimeSeriesValue, TS_GROUPS, } from './timeseries.interface';
36
37
  export type { Application, Consent, Permission, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
37
38
  export type { VaultSecret } from './vault.interface';
38
39
  export { AgentId, AiAssistantId, AssistantMessageStatus, AvailableLanguages, FinishReason, HandOffTool, ReferenceType, ReturnToReferrerTool, Role, ToolMessageStatus, ToolName, ToolType, } from './ai.interface';
39
- export { AlertLevel, AlertType } from './alert.interface';
40
+ export { ChangeAction } from './api.interface';
41
+ export { AlertLevel, AlertStatus, AlertType, DEFAULT_THRESHOLD_CONDITION, DEFAULT_RELATIVE_CONDITION, DEFAULT_DEADMAN_CONDITION, } from './alert.interface';
40
42
  export { ReturnType } from './content.interface';
41
43
  export { instanceOfTimePeriod } from './data.interface';
44
+ export { NotificationEndpointStatus, NotificationEndpointType, NotificationEndpointSpamProtection } from './endpoint.interface';
42
45
  export { EventLevel } from './event.interface';
46
+ export { Flow, FlowDiagram } from './flow.interface';
47
+ export { FlowDeployment } from './flow-deployment.interface';
48
+ export { ERROR_STATES, FlowDeploymentStatus, PROCESSING_STATES, RUNNING_STATES, STOPPED_STATES, UNKOWN_STATES, } from './flow-deployment-status.interface';
43
49
  export { LABEL_COLORS } from './label.interface';
50
+ export { NotificationRuleStatus } from './notification-rule.interface';
44
51
  export { OwnerType } from './owner.interface';
45
52
  export { ObjectReferenceType } from './reference.interface';
46
53
  export { PermissionType, ResourceApiPath, resourceApiPathToTypeMap, ResourceType } from './resource.interface';
47
54
  export { AssigneeType, Priority, TaskStatus } from './task.interface';
55
+ export { RETENTION_VALUES } from './timeseries.interface';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaskStatus = exports.Priority = exports.AssigneeType = exports.ResourceType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.PermissionType = exports.ObjectReferenceType = exports.OwnerType = exports.LABEL_COLORS = exports.EventLevel = exports.instanceOfTimePeriod = exports.ReturnType = exports.AlertType = exports.AlertLevel = exports.ToolType = exports.ToolName = exports.ToolMessageStatus = exports.Role = exports.ReturnToReferrerTool = exports.ReferenceType = exports.HandOffTool = exports.FinishReason = exports.AvailableLanguages = exports.AssistantMessageStatus = exports.AiAssistantId = exports.AgentId = exports.OrganizationMembersInviteOrAdd = void 0;
3
+ exports.RETENTION_VALUES = exports.TaskStatus = exports.Priority = exports.AssigneeType = exports.ResourceType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.PermissionType = exports.ObjectReferenceType = exports.OwnerType = exports.NotificationRuleStatus = exports.LABEL_COLORS = exports.UNKOWN_STATES = exports.STOPPED_STATES = exports.RUNNING_STATES = exports.PROCESSING_STATES = exports.FlowDeploymentStatus = exports.ERROR_STATES = exports.FlowDeployment = exports.FlowDiagram = exports.Flow = exports.EventLevel = exports.NotificationEndpointSpamProtection = exports.NotificationEndpointType = exports.NotificationEndpointStatus = exports.instanceOfTimePeriod = exports.ReturnType = exports.DEFAULT_DEADMAN_CONDITION = exports.DEFAULT_RELATIVE_CONDITION = exports.DEFAULT_THRESHOLD_CONDITION = exports.AlertType = exports.AlertStatus = exports.AlertLevel = exports.ChangeAction = exports.ToolType = exports.ToolName = exports.ToolMessageStatus = exports.Role = exports.ReturnToReferrerTool = exports.ReferenceType = exports.HandOffTool = exports.FinishReason = exports.AvailableLanguages = exports.AssistantMessageStatus = exports.AiAssistantId = exports.AgentId = exports.OrganizationMembersInviteOrAdd = void 0;
4
4
  var organization_interface_1 = require("./organization.interface");
5
5
  Object.defineProperty(exports, "OrganizationMembersInviteOrAdd", { enumerable: true, get: function () { return organization_interface_1.OrganizationMembersInviteOrAdd; } });
6
6
  var ai_interface_1 = require("./ai.interface");
@@ -16,17 +16,41 @@ Object.defineProperty(exports, "Role", { enumerable: true, get: function () { re
16
16
  Object.defineProperty(exports, "ToolMessageStatus", { enumerable: true, get: function () { return ai_interface_1.ToolMessageStatus; } });
17
17
  Object.defineProperty(exports, "ToolName", { enumerable: true, get: function () { return ai_interface_1.ToolName; } });
18
18
  Object.defineProperty(exports, "ToolType", { enumerable: true, get: function () { return ai_interface_1.ToolType; } });
19
+ var api_interface_1 = require("./api.interface");
20
+ Object.defineProperty(exports, "ChangeAction", { enumerable: true, get: function () { return api_interface_1.ChangeAction; } });
19
21
  var alert_interface_1 = require("./alert.interface");
20
22
  Object.defineProperty(exports, "AlertLevel", { enumerable: true, get: function () { return alert_interface_1.AlertLevel; } });
23
+ Object.defineProperty(exports, "AlertStatus", { enumerable: true, get: function () { return alert_interface_1.AlertStatus; } });
21
24
  Object.defineProperty(exports, "AlertType", { enumerable: true, get: function () { return alert_interface_1.AlertType; } });
25
+ Object.defineProperty(exports, "DEFAULT_THRESHOLD_CONDITION", { enumerable: true, get: function () { return alert_interface_1.DEFAULT_THRESHOLD_CONDITION; } });
26
+ Object.defineProperty(exports, "DEFAULT_RELATIVE_CONDITION", { enumerable: true, get: function () { return alert_interface_1.DEFAULT_RELATIVE_CONDITION; } });
27
+ Object.defineProperty(exports, "DEFAULT_DEADMAN_CONDITION", { enumerable: true, get: function () { return alert_interface_1.DEFAULT_DEADMAN_CONDITION; } });
22
28
  var content_interface_1 = require("./content.interface");
23
29
  Object.defineProperty(exports, "ReturnType", { enumerable: true, get: function () { return content_interface_1.ReturnType; } });
24
30
  var data_interface_1 = require("./data.interface");
25
31
  Object.defineProperty(exports, "instanceOfTimePeriod", { enumerable: true, get: function () { return data_interface_1.instanceOfTimePeriod; } });
32
+ var endpoint_interface_1 = require("./endpoint.interface");
33
+ Object.defineProperty(exports, "NotificationEndpointStatus", { enumerable: true, get: function () { return endpoint_interface_1.NotificationEndpointStatus; } });
34
+ Object.defineProperty(exports, "NotificationEndpointType", { enumerable: true, get: function () { return endpoint_interface_1.NotificationEndpointType; } });
35
+ Object.defineProperty(exports, "NotificationEndpointSpamProtection", { enumerable: true, get: function () { return endpoint_interface_1.NotificationEndpointSpamProtection; } });
26
36
  var event_interface_1 = require("./event.interface");
27
37
  Object.defineProperty(exports, "EventLevel", { enumerable: true, get: function () { return event_interface_1.EventLevel; } });
38
+ var flow_interface_1 = require("./flow.interface");
39
+ Object.defineProperty(exports, "Flow", { enumerable: true, get: function () { return flow_interface_1.Flow; } });
40
+ Object.defineProperty(exports, "FlowDiagram", { enumerable: true, get: function () { return flow_interface_1.FlowDiagram; } });
41
+ var flow_deployment_interface_1 = require("./flow-deployment.interface");
42
+ Object.defineProperty(exports, "FlowDeployment", { enumerable: true, get: function () { return flow_deployment_interface_1.FlowDeployment; } });
43
+ var flow_deployment_status_interface_1 = require("./flow-deployment-status.interface");
44
+ Object.defineProperty(exports, "ERROR_STATES", { enumerable: true, get: function () { return flow_deployment_status_interface_1.ERROR_STATES; } });
45
+ Object.defineProperty(exports, "FlowDeploymentStatus", { enumerable: true, get: function () { return flow_deployment_status_interface_1.FlowDeploymentStatus; } });
46
+ Object.defineProperty(exports, "PROCESSING_STATES", { enumerable: true, get: function () { return flow_deployment_status_interface_1.PROCESSING_STATES; } });
47
+ Object.defineProperty(exports, "RUNNING_STATES", { enumerable: true, get: function () { return flow_deployment_status_interface_1.RUNNING_STATES; } });
48
+ Object.defineProperty(exports, "STOPPED_STATES", { enumerable: true, get: function () { return flow_deployment_status_interface_1.STOPPED_STATES; } });
49
+ Object.defineProperty(exports, "UNKOWN_STATES", { enumerable: true, get: function () { return flow_deployment_status_interface_1.UNKOWN_STATES; } });
28
50
  var label_interface_1 = require("./label.interface");
29
51
  Object.defineProperty(exports, "LABEL_COLORS", { enumerable: true, get: function () { return label_interface_1.LABEL_COLORS; } });
52
+ var notification_rule_interface_1 = require("./notification-rule.interface");
53
+ Object.defineProperty(exports, "NotificationRuleStatus", { enumerable: true, get: function () { return notification_rule_interface_1.NotificationRuleStatus; } });
30
54
  var owner_interface_1 = require("./owner.interface");
31
55
  Object.defineProperty(exports, "OwnerType", { enumerable: true, get: function () { return owner_interface_1.OwnerType; } });
32
56
  var reference_interface_1 = require("./reference.interface");
@@ -40,3 +64,5 @@ var task_interface_1 = require("./task.interface");
40
64
  Object.defineProperty(exports, "AssigneeType", { enumerable: true, get: function () { return task_interface_1.AssigneeType; } });
41
65
  Object.defineProperty(exports, "Priority", { enumerable: true, get: function () { return task_interface_1.Priority; } });
42
66
  Object.defineProperty(exports, "TaskStatus", { enumerable: true, get: function () { return task_interface_1.TaskStatus; } });
67
+ var timeseries_interface_1 = require("./timeseries.interface");
68
+ Object.defineProperty(exports, "RETENTION_VALUES", { enumerable: true, get: function () { return timeseries_interface_1.RETENTION_VALUES; } });
@@ -5,7 +5,7 @@ export interface NotificationRule {
5
5
  description?: string;
6
6
  endpointRef: string;
7
7
  endpointRef$name?: string;
8
- status: string;
8
+ status: NotificationRuleStatus;
9
9
  every: string;
10
10
  offset?: string;
11
11
  statusRule: StatusRule;
@@ -27,3 +27,7 @@ export interface TagRule {
27
27
  operator: 'equal' | 'notEqual';
28
28
  value: string;
29
29
  }
30
+ export declare enum NotificationRuleStatus {
31
+ ACTIVE = "ACTIVE",
32
+ INACTIVE = "INACTIVE"
33
+ }
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationRuleStatus = void 0;
4
+ var NotificationRuleStatus;
5
+ (function (NotificationRuleStatus) {
6
+ NotificationRuleStatus["ACTIVE"] = "ACTIVE";
7
+ NotificationRuleStatus["INACTIVE"] = "INACTIVE";
8
+ })(NotificationRuleStatus || (exports.NotificationRuleStatus = NotificationRuleStatus = {}));
@@ -67,6 +67,7 @@ export interface OrganizationRolesAdjustment {
67
67
  }
68
68
  export interface OrganizationSearchQuery {
69
69
  name?: string;
70
+ attributes?: Record<string, string[]>;
70
71
  }
71
72
  export interface UserWithOrgRoles {
72
73
  username: string;
@@ -1,3 +1,4 @@
1
+ import type { Api } from './api.interface';
1
2
  import { Author } from './author.interface';
2
3
  import { Owner } from './owner.interface';
3
4
  export declare enum ResourceType {
@@ -52,11 +53,27 @@ export interface Resource {
52
53
  readPermissions: string[];
53
54
  readWritePermissions: string[];
54
55
  owner?: Owner;
55
- createdAt?: string;
56
+ createdAt?: string | Date;
56
57
  createdBy?: Author;
57
- updatedAt?: string;
58
+ updatedAt?: string | Date;
58
59
  updatedBy?: Author;
59
- deletedAt?: string;
60
+ deletedAt?: string | Date;
61
+ }
62
+ export declare class ResourceClass implements Api, Resource {
63
+ id?: string;
64
+ name: string;
65
+ description?: string;
66
+ tags?: string[];
67
+ refs?: ResourceReference[];
68
+ readPermissions: string[];
69
+ readWritePermissions: string[];
70
+ owner?: Owner;
71
+ createdAt?: string | Date;
72
+ createdBy?: Author;
73
+ updatedAt?: string | Date;
74
+ updatedBy?: Author;
75
+ deletedAt?: string | Date;
76
+ revision?: number;
60
77
  }
61
78
  export declare enum PermissionType {
62
79
  READ = "read",
@@ -65,7 +82,7 @@ export declare enum PermissionType {
65
82
  }
66
83
  export interface OrgResourcePermission {
67
84
  id: string;
68
- name: string;
85
+ name?: string;
69
86
  permissionType: PermissionType;
70
87
  }
71
88
  export interface ConnectedResourceItem {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PermissionType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = void 0;
3
+ exports.PermissionType = exports.ResourceClass = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = void 0;
4
4
  var ResourceType;
5
5
  (function (ResourceType) {
6
6
  ResourceType["ALERT"] = "alert";
@@ -57,6 +57,9 @@ exports.resourceApiPathToTypeMap = {
57
57
  [ResourceApiPath.TIMESERIES]: ResourceType.TIMESERIES,
58
58
  [ResourceApiPath.TASK]: ResourceType.TASK,
59
59
  };
60
+ class ResourceClass {
61
+ }
62
+ exports.ResourceClass = ResourceClass;
60
63
  var PermissionType;
61
64
  (function (PermissionType) {
62
65
  PermissionType["READ"] = "read";
@@ -3,19 +3,25 @@ import { Owner } from './owner.interface';
3
3
  export interface TimeSeries {
4
4
  id?: string;
5
5
  name: string;
6
- description: string;
6
+ description?: string;
7
+ tags?: string[];
7
8
  readPermissions: string[];
8
9
  readWritePermissions: string[];
9
10
  assetRef?: string;
10
11
  assetRef$name?: string;
11
12
  assetTsId?: string;
12
- maxDate: Date;
13
- minDate: Date;
13
+ maxDate?: Date;
14
+ minDate?: Date;
14
15
  metrics?: string[];
15
- maxBucketTimeRange: number;
16
- tsRef?: [string];
17
- autoDelData: Date;
18
- autoDelBucket: Date;
16
+ dataRetention?: Retention;
17
+ offset?: number;
18
+ minValue?: number;
19
+ maxValue?: number;
20
+ maxBucketTimeRange?: number;
21
+ saveDataAfterDeletion?: boolean;
22
+ tsRef?: string[];
23
+ autoDelData?: Date;
24
+ autoDelBucket?: Date;
19
25
  metadata?: Record<string, any>;
20
26
  owner?: Owner;
21
27
  createdBy?: Author;
@@ -30,7 +36,7 @@ export interface TimeSeriesCondition {
30
36
  }
31
37
  export interface TimeSeriesValue {
32
38
  timestamp: number;
33
- value: number | string | any;
39
+ value?: number | string | any;
34
40
  raw?: number;
35
41
  [key: string]: any;
36
42
  }
@@ -47,4 +53,15 @@ export interface TimeSeriesBucket {
47
53
  meta: any;
48
54
  final: boolean;
49
55
  }
56
+ export interface SelectedField {
57
+ name: string;
58
+ isSelected: boolean;
59
+ color?: string;
60
+ }
61
+ export interface SearchTimeSeriesResult extends Record<string, any> {
62
+ readonly id: string;
63
+ readonly name: string;
64
+ }
50
65
  export type TS_GROUPS = 'none' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '3h' | '6h' | '12h' | '1d' | '7d';
66
+ export type Retention = 'always' | '1h' | '3h' | '6h' | '12h' | '24h' | '48h' | '72h' | '7d' | '14d' | '30d' | '90d' | '180d';
67
+ export declare const RETENTION_VALUES: string[];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RETENTION_VALUES = void 0;
4
+ exports.RETENTION_VALUES = ['always', '1h', '3h', '6h', '12h', '24h', '48h', '72h', '7d', '14d', '30d', '90d', '180d'];
@@ -43,8 +43,8 @@ class FlowMockService extends BaseService {
43
43
  return Promise.resolve(flow);
44
44
  }
45
45
  async isDeploymentOnLatestDiagramVersion(depl) {
46
- const flowId = typeof depl.flow === 'string' ? depl.flow : depl.flow.id;
47
- const diagramId = typeof depl.diagram === 'string' ? depl.diagram : depl.diagram.id;
46
+ const flowId = typeof depl.flow === 'string' ? depl.flow : 'id' in depl.flow ? String(depl.flow.id) : String(depl.flow);
47
+ const diagramId = typeof depl.diagram === 'string' ? depl.diagram : 'id' in depl.diagram ? String(depl.diagram.id) : String(depl.diagram);
48
48
  const revisions = await this.getDiagramRevisions(flowId);
49
49
  return revisions[revisions.length - 1].id === diagramId;
50
50
  }
@@ -5,7 +5,7 @@ import { OrganizationsAdministrationService } from '../services';
5
5
  export declare class OrganizationsAdministrationMockService extends APIBaseMock<Organization> implements OrganizationsAdministrationService {
6
6
  private readonly organizationMockService;
7
7
  constructor(organizationMockService: OrganizationsMockService);
8
- searchAllOrganizationWithOrganizationClient(query: OrganizationSearchQuery): Promise<Organization[]>;
8
+ searchForOrganizations(query: OrganizationSearchQuery): Promise<Organization[]>;
9
9
  get data(): Organization[];
10
10
  getOneCombined(id: string): Promise<Organization>;
11
11
  addOrganizationMembers(id: string, usersWithOrgRoles: UserWithOrgRoles[]): Promise<void>;
@@ -9,7 +9,7 @@ class OrganizationsAdministrationMockService extends _1.APIBaseMock {
9
9
  super(null);
10
10
  this.organizationMockService = organizationMockService;
11
11
  }
12
- searchAllOrganizationWithOrganizationClient(query) {
12
+ searchForOrganizations(query) {
13
13
  throw new Error('Method not implemented.');
14
14
  }
15
15
  get data() {
@@ -1,9 +1,10 @@
1
1
  import { APIBaseMock } from '.';
2
- import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
2
+ import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment, OrganizationSearchQuery } from '../interfaces';
3
3
  import { OrganizationsService } from '../services';
4
4
  import { OrganizationRoleRepresentation } from '../services/organizations.service';
5
5
  export declare class OrganizationsMockService extends APIBaseMock<Organization> implements OrganizationsService {
6
6
  constructor(organizations: Organization[]);
7
+ searchForOrganizationNames(query: OrganizationSearchQuery): Promise<OrganizationName[]>;
7
8
  inviteUser(id: string, email: string, roles: string[]): Promise<void>;
8
9
  getOrganizationIdByName(name: string): Promise<OrganizationName>;
9
10
  addOne(dto: CreateOrganizationDto): Promise<Organization>;
@@ -7,6 +7,9 @@ class OrganizationsMockService extends _1.APIBaseMock {
7
7
  super(null);
8
8
  this.data = organizations;
9
9
  }
10
+ searchForOrganizationNames(query) {
11
+ throw new Error('Method not implemented.');
12
+ }
10
13
  inviteUser(id, email, roles) {
11
14
  if (!id || !email || !roles?.length) {
12
15
  return Promise.reject('Bad Request');
@@ -36,8 +36,8 @@ class FlowService extends BaseService {
36
36
  return this.httpClient.get(`${this.basePath}/${id}/diagram/revisions`, options);
37
37
  }
38
38
  async isDeploymentOnLatestDiagramVersion(depl, options = {}) {
39
- const flowId = typeof depl.flow === 'string' ? depl.flow : depl.flow.id;
40
- const diagramId = typeof depl.diagram === 'string' ? depl.diagram : depl.diagram.id;
39
+ const flowId = typeof depl.flow === 'string' ? depl.flow : 'id' in depl.flow ? String(depl.flow.id) : String(depl.flow);
40
+ const diagramId = typeof depl.diagram === 'string' ? depl.diagram : 'id' in depl.diagram ? String(depl.diagram.id) : String(depl.diagram);
41
41
  const revisions = await this.getDiagramRevisions(flowId, options);
42
42
  return revisions[revisions.length - 1].id === diagramId;
43
43
  }
@@ -9,16 +9,16 @@ class ObjectReferenceService extends api_base_1.APIBase {
9
9
  async find(query, options = {}) {
10
10
  const params = new URLSearchParams();
11
11
  params.append('objId', query.objId);
12
- if (query.types) {
13
- params.append('type', query.types.join(','));
12
+ if (query.types?.length > 0) {
13
+ params.append('types', query.types.join(','));
14
14
  }
15
15
  if (query.connectedObjType) {
16
16
  params.append('connectedObjType', query.connectedObjType.toString());
17
17
  }
18
- if (query.objIsTgt !== undefined) {
18
+ if (query.objIsTgt === true) {
19
19
  params.append('objIsTgt', query.objIsTgt.toString());
20
20
  }
21
- if (query.objIsSrc !== undefined) {
21
+ if (query.objIsSrc === true) {
22
22
  params.append('objIsSrc', query.objIsSrc.toString());
23
23
  }
24
24
  return await this.httpClient.get(`${this.basePath}?${params.toString()}`, options);
@@ -33,10 +33,9 @@ export declare class OrganizationsAdministrationService extends APIBase {
33
33
  * Searches for all organizations using the organization client.
34
34
  *
35
35
  * @param {OrganizationSearchQuery} query - The search query object containing optional filters.
36
- * @param {string} query.name - The name of the organization to filter by (optional).
37
- * @returns {Promise<Organization[]>} - An observable containing an array of organizations matching the query.
36
+ * @returns {Promise<Organization[]>} - A promise containing an array of organizations matching the query.
38
37
  */
39
- searchAllOrganizationWithOrganizationClient(query: OrganizationSearchQuery): Promise<Organization[]>;
38
+ searchForOrganizations(query?: OrganizationSearchQuery): Promise<Organization[]>;
40
39
  /**
41
40
  * Creates an organization with a free subscription and invites or adds a user to it.
42
41
  * The owner of the organization can be either the user or the service account 'organization-client', depending on the 'createOrgAsOwner' flag in the OrganizationCreateFlowDto.
@@ -45,11 +45,16 @@ class OrganizationsAdministrationService extends api_base_1.APIBase {
45
45
  * Searches for all organizations using the organization client.
46
46
  *
47
47
  * @param {OrganizationSearchQuery} query - The search query object containing optional filters.
48
- * @param {string} query.name - The name of the organization to filter by (optional).
49
- * @returns {Promise<Organization[]>} - An observable containing an array of organizations matching the query.
48
+ * @returns {Promise<Organization[]>} - A promise containing an array of organizations matching the query.
50
49
  */
51
- searchAllOrganizationWithOrganizationClient(query) {
52
- const params = query.name ? { name: query.name } : {};
50
+ searchForOrganizations(query = {}) {
51
+ const params = {};
52
+ if (query.name) {
53
+ params.name = query.name;
54
+ }
55
+ if (query.attributes && Object.keys(query.attributes).length > 0) {
56
+ params.attributes = JSON.stringify(query.attributes);
57
+ }
53
58
  return this.httpClient.get(`${this.basePath}/search`, { params });
54
59
  }
55
60
  /**
@@ -1,8 +1,9 @@
1
1
  import { APIBase } from '../api-base';
2
- import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment } from '../interfaces';
2
+ import { CreateOrganizationDto, KeycloakProfile, Organization, OrganizationData, OrganizationDataKind, OrganizationName, OrganizationRolesAdjustment, OrganizationSearchQuery } from '../interfaces';
3
3
  import { HttpClientService } from './';
4
4
  export declare class OrganizationsService extends APIBase {
5
5
  constructor(httpClientClient: HttpClientService);
6
+ searchForOrganizationNames(query: OrganizationSearchQuery): Promise<OrganizationName[]>;
6
7
  /**
7
8
  * Create an organization.
8
9
  *
@@ -6,6 +6,16 @@ class OrganizationsService extends api_base_1.APIBase {
6
6
  constructor(httpClientClient) {
7
7
  super(httpClientClient, '/organizations');
8
8
  }
9
+ searchForOrganizationNames(query) {
10
+ const params = {};
11
+ if (query.name) {
12
+ params.name = query.name;
13
+ }
14
+ if (query.attributes && Object.keys(query.attributes).length > 0) {
15
+ params.attributes = JSON.stringify(query.attributes);
16
+ }
17
+ return this.httpClient.get(`${this.basePath}/search`, { params });
18
+ }
9
19
  /**
10
20
  * Create an organization.
11
21
  *