@hahnpro/hpc-api 2026.9.9 → 2026.9.11

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 (76) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/lib/api.d.ts +2 -1
  4. package/src/lib/api.js +1 -0
  5. package/src/lib/interfaces/ai.interface.d.ts +25 -7
  6. package/src/lib/interfaces/ai.interface.js +6 -0
  7. package/src/lib/interfaces/authz/capability-bundle.interface.d.ts +8 -2
  8. package/src/lib/interfaces/authz/capability-bundle.interface.js +11 -1
  9. package/src/lib/interfaces/authz/capability.interface.d.ts +13 -11
  10. package/src/lib/interfaces/authz/capability.interface.js +19 -13
  11. package/src/lib/interfaces/authz/feature.interface.d.ts +6 -2
  12. package/src/lib/interfaces/authz/feature.interface.js +9 -2
  13. package/src/lib/interfaces/authz/plan.interface.d.ts +6 -2
  14. package/src/lib/interfaces/authz/plan.interface.js +5 -1
  15. package/src/lib/interfaces/index.d.ts +2 -1
  16. package/src/lib/interfaces/index.js +1 -0
  17. package/src/lib/interfaces/knowledge.interface.d.ts +142 -0
  18. package/src/lib/interfaces/knowledge.interface.js +12 -0
  19. package/src/lib/interfaces/nats.interface.d.ts +10 -0
  20. package/src/lib/interfaces/nats.interface.js +10 -0
  21. package/src/lib/interfaces/resource.interface.d.ts +2 -0
  22. package/src/lib/interfaces/resource.interface.js +3 -0
  23. package/src/lib/mock/api.mock.d.ts +4 -1
  24. package/src/lib/mock/api.mock.js +2 -0
  25. package/src/lib/mock/authz/authorization.mock.service.d.ts +10 -0
  26. package/src/lib/mock/authz/authorization.mock.service.js +22 -0
  27. package/src/lib/mock/authz/authz.mock.service.d.ts +2 -6
  28. package/src/lib/mock/authz/authz.mock.service.js +2 -6
  29. package/src/lib/mock/authz/org-group-capability-bundle.mock.service.d.ts +4 -4
  30. package/src/lib/mock/authz/org-group-capability-bundle.mock.service.js +4 -4
  31. package/src/lib/mock/authz/org-group-capability.mock.service.d.ts +4 -4
  32. package/src/lib/mock/authz/org-group-capability.mock.service.js +4 -4
  33. package/src/lib/mock/authz/org-group-member.mock.service.d.ts +3 -3
  34. package/src/lib/mock/authz/org-group-member.mock.service.js +3 -3
  35. package/src/lib/mock/authz/org-group.mock.service.d.ts +5 -5
  36. package/src/lib/mock/authz/org-group.mock.service.js +5 -5
  37. package/src/lib/mock/authz/org-subscription.mock.service.d.ts +2 -5
  38. package/src/lib/mock/authz/org-subscription.mock.service.js +2 -11
  39. package/src/lib/mock/index.d.ts +1 -0
  40. package/src/lib/mock/index.js +1 -0
  41. package/src/lib/mock/knowledge.mock.service.d.ts +28 -0
  42. package/src/lib/mock/knowledge.mock.service.js +171 -0
  43. package/src/lib/mock/timeseries.mock.service.d.ts +1 -1
  44. package/src/lib/mock/timeseries.mock.service.js +4 -3
  45. package/src/lib/services/authz/authorization.service.d.ts +11 -0
  46. package/src/lib/services/authz/authorization.service.js +22 -0
  47. package/src/lib/services/authz/authz.service.d.ts +2 -6
  48. package/src/lib/services/authz/authz.service.js +2 -6
  49. package/src/lib/services/authz/org-group-capability-bundle.service.d.ts +5 -4
  50. package/src/lib/services/authz/org-group-capability-bundle.service.js +11 -8
  51. package/src/lib/services/authz/org-group-capability.service.d.ts +5 -4
  52. package/src/lib/services/authz/org-group-capability.service.js +11 -8
  53. package/src/lib/services/authz/org-group-member.service.d.ts +4 -3
  54. package/src/lib/services/authz/org-group-member.service.js +9 -6
  55. package/src/lib/services/authz/org-group.service.d.ts +6 -5
  56. package/src/lib/services/authz/org-group.service.js +10 -10
  57. package/src/lib/services/authz/org-subscription.service.d.ts +4 -6
  58. package/src/lib/services/authz/org-subscription.service.js +4 -13
  59. package/src/lib/services/index.d.ts +1 -0
  60. package/src/lib/services/index.js +1 -0
  61. package/src/lib/services/knowledge.service.d.ts +22 -0
  62. package/src/lib/services/knowledge.service.js +50 -0
  63. package/src/lib/services/timeseries.service.d.ts +1 -1
  64. package/src/lib/services/timeseries.service.js +2 -2
  65. package/src/lib/mock/authz/capability-bundle.mock.service.d.ts +0 -6
  66. package/src/lib/mock/authz/capability-bundle.mock.service.js +0 -13
  67. package/src/lib/mock/authz/capability.mock.service.d.ts +0 -6
  68. package/src/lib/mock/authz/capability.mock.service.js +0 -13
  69. package/src/lib/mock/authz/user-capabilities-and-permissions.mock.service.d.ts +0 -9
  70. package/src/lib/mock/authz/user-capabilities-and-permissions.mock.service.js +0 -16
  71. package/src/lib/services/authz/capability-bundle.service.d.ts +0 -7
  72. package/src/lib/services/authz/capability-bundle.service.js +0 -13
  73. package/src/lib/services/authz/capability.service.d.ts +0 -7
  74. package/src/lib/services/authz/capability.service.js +0 -13
  75. package/src/lib/services/authz/user-capabilities-and-permissions.service.d.ts +0 -9
  76. package/src/lib/services/authz/user-capabilities-and-permissions.service.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @hahnpro/hpc-api
2
2
 
3
+ # 2026.9.11
4
+
5
+ - Added `api.knowledge` client, shared types and mock support for pages, revisions, discovery and lifecycle operations #5262
6
+
7
+ # 2026.9.10
8
+
9
+ - Updated AI interface and added limit to `getValuesOfPeriod` of timeseries service
10
+
3
11
  # 2026.9.8
4
12
 
5
13
  - Added new timeseries-value-feed-management service
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2026.9.9",
3
+ "version": "2026.9.11",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
package/src/lib/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { TimeSeriesValueFeedManagementApi } from './interfaces';
2
2
  import { QueueOptions } from './queue';
3
- import { AiService, AlertService, AssetService, AssetTypesService, AuthzService, ContentService, CrmService, DataspaceService, EndpointService, EventService, FlangeSkillControlService, FlowDeploymentService, FlowFunctionService, FlowModuleService, FlowService, HttpClientService, LabelService, LogbookService, NotificationRuleService, NotificationService, ObjectReferenceService, OrganizationsAdministrationService, OrganizationsResourcesService, OrganizationsService, ProxyService, SearchService, TaskService, TimeSeriesService, UserService, VaultService } from './services';
3
+ import { AiService, AlertService, AssetService, AssetTypesService, AuthzService, ContentService, CrmService, DataspaceService, EndpointService, EventService, FlangeSkillControlService, FlowDeploymentService, FlowFunctionService, FlowModuleService, FlowService, HttpClientService, KnowledgeService, LabelService, LogbookService, NotificationRuleService, NotificationService, ObjectReferenceService, OrganizationsAdministrationService, OrganizationsResourcesService, OrganizationsService, ProxyService, SearchService, TaskService, TimeSeriesService, UserService, VaultService } from './services';
4
4
  export declare class API {
5
5
  readonly httpClient?: HttpClientService;
6
6
  ai: AiService;
@@ -18,6 +18,7 @@ export declare class API {
18
18
  flowDeployments: FlowDeploymentService;
19
19
  flowFunctions: FlowFunctionService;
20
20
  flowModules: FlowModuleService;
21
+ knowledge: KnowledgeService;
21
22
  labels: LabelService;
22
23
  logbook: LogbookService;
23
24
  objectReferences: ObjectReferenceService;
package/src/lib/api.js CHANGED
@@ -49,6 +49,7 @@ class API {
49
49
  this.flowDeployments = new services_1.FlowDeploymentService(this.httpClient);
50
50
  this.flowFunctions = new services_1.FlowFunctionService(this.httpClient);
51
51
  this.flowModules = new services_1.FlowModuleService(this.httpClient);
52
+ this.knowledge = new services_1.KnowledgeService(this.httpClient);
52
53
  this.labels = new services_1.LabelService(this.httpClient);
53
54
  this.logbook = new services_1.LogbookService(this.httpClient);
54
55
  this.objectReferences = new services_1.ObjectReferenceService(this.httpClient);
@@ -59,6 +59,7 @@ export declare enum ReferenceType {
59
59
  EVENT = "event",
60
60
  LOGBOOK_ENTRY = "logbook-entry",
61
61
  TASK = "task",
62
+ TIMESERIES = "timeseries",
62
63
  WEB_SOURCE = "web-source"
63
64
  }
64
65
  export declare enum AgentId {
@@ -76,7 +77,8 @@ export declare enum AgentId {
76
77
  RESEARCH_INSTRUCTION_BUILDER = "research-instruction-builder-agent",
77
78
  AXALTA_ASSET_IDENTIFIER = "axalta-asset-identifier-agent",
78
79
  AXALTA_MESSAGE = "axalta-message-agent",
79
- TRIAGE = "triage-agent"
80
+ TRIAGE = "triage-agent",
81
+ HAWIC = "hawic-agent"
80
82
  }
81
83
  export declare const ATTACHMENT_CAPABLE_AGENT_IDS: AgentId[];
82
84
  export declare enum ToolName {
@@ -125,7 +127,10 @@ export declare enum ToolName {
125
127
  WEB_SEARCH = "web_search",
126
128
  USE_SKILL = "useSkill",
127
129
  READ_SKILL_FILE = "readSkillFile",
128
- RUN_SKILL_SCRIPT = "runSkillScript"
130
+ RUN_SKILL_SCRIPT = "runSkillScript",
131
+ SEARCH_TIME_SERIES = "searchTimeSeries",
132
+ TIME_SERIES_SELECTION = "timeSeriesSelection",
133
+ RETRIEVE_TIME_SERIES_VALUES = "retrieveTimeSeriesValues"
129
134
  }
130
135
  export declare enum ReturnToReferrerTool {
131
136
  ASSET_IDENTIFIER = "returnToReferrer_asset-identifier-agent",
@@ -149,7 +154,8 @@ export declare enum AiAssistantId {
149
154
  CRM = "crm-assistant",
150
155
  INCIDENT = "incident-assistant",
151
156
  REPORT = "report-assistant",
152
- AXALTA_INCIDENT = "axalta-incident-assistant"
157
+ AXALTA_INCIDENT = "axalta-incident-assistant",
158
+ HAWIC = "hawic-assistant"
153
159
  }
154
160
  export type ToolNameType = ToolName | HandOffTool | ReturnToReferrerTool;
155
161
  export interface AiAssistant {
@@ -194,8 +200,9 @@ interface AssistantLabels {
194
200
  }
195
201
  interface SelectionMessage {
196
202
  message: string;
197
- resourceType: ReferenceType;
198
- moreMatches: boolean;
203
+ resourceType?: ReferenceType;
204
+ moreMatches?: boolean;
205
+ isMultiSelect: boolean;
199
206
  choices: ResourceSelectionOption[];
200
207
  }
201
208
  interface BaseMessage {
@@ -302,10 +309,21 @@ export interface LogbookEntryResourceSelectionOption extends BaseResourceSelecti
302
309
  date: string;
303
310
  duration?: number;
304
311
  }
312
+ export interface TimeSeriesSelectionOption extends BaseResourceSelectionOption {
313
+ resourceType: ReferenceType.TIMESERIES;
314
+ name: string;
315
+ assetRef: string;
316
+ assetName?: string;
317
+ metrics?: string[];
318
+ }
305
319
  export interface GenericResourceSelectionOption extends BaseResourceSelectionOption {
306
- resourceType: Exclude<ReferenceType, ReferenceType.ASSET | ReferenceType.DOCUMENT | ReferenceType.LOGBOOK_ENTRY>;
320
+ resourceType: Exclude<ReferenceType, ReferenceType.ASSET | ReferenceType.DOCUMENT | ReferenceType.LOGBOOK_ENTRY | ReferenceType.TIMESERIES>;
321
+ }
322
+ export type ResourceSelectionOption = AssetResourceSelectionOption | DocumentResourceSelectionOption | LogbookEntryResourceSelectionOption | TimeSeriesSelectionOption | GenericResourceSelectionOption;
323
+ export interface MultiChoiceSelectionResult {
324
+ selected: ResourceSelectionOption[];
307
325
  }
308
- export type ResourceSelectionOption = AssetResourceSelectionOption | DocumentResourceSelectionOption | LogbookEntryResourceSelectionOption | GenericResourceSelectionOption;
326
+ export type ChoiceSelectionResult = ResourceSelectionOption | MultiChoiceSelectionResult | ResourceSelectionRejected;
309
327
  export declare enum OneShotTaskId {
310
328
  ASSET_ASSISTANT_PARTIAL_SUMMARY = "ASSET_ASSISTANT_PARTIAL_SUMMARY"
311
329
  }
@@ -68,6 +68,7 @@ var ReferenceType;
68
68
  ReferenceType["EVENT"] = "event";
69
69
  ReferenceType["LOGBOOK_ENTRY"] = "logbook-entry";
70
70
  ReferenceType["TASK"] = "task";
71
+ ReferenceType["TIMESERIES"] = "timeseries";
71
72
  ReferenceType["WEB_SOURCE"] = "web-source";
72
73
  })(ReferenceType || (exports.ReferenceType = ReferenceType = {}));
73
74
  var AgentId;
@@ -87,6 +88,7 @@ var AgentId;
87
88
  AgentId["AXALTA_ASSET_IDENTIFIER"] = "axalta-asset-identifier-agent";
88
89
  AgentId["AXALTA_MESSAGE"] = "axalta-message-agent";
89
90
  AgentId["TRIAGE"] = "triage-agent";
91
+ AgentId["HAWIC"] = "hawic-agent";
90
92
  })(AgentId || (exports.AgentId = AgentId = {}));
91
93
  exports.ATTACHMENT_CAPABLE_AGENT_IDS = [AgentId.ASSET, AgentId.ASSET_WEB, AgentId.CRM, AgentId.REPORT, AgentId.MESSAGE];
92
94
  var ToolName;
@@ -137,6 +139,9 @@ var ToolName;
137
139
  ToolName["USE_SKILL"] = "useSkill";
138
140
  ToolName["READ_SKILL_FILE"] = "readSkillFile";
139
141
  ToolName["RUN_SKILL_SCRIPT"] = "runSkillScript";
142
+ ToolName["SEARCH_TIME_SERIES"] = "searchTimeSeries";
143
+ ToolName["TIME_SERIES_SELECTION"] = "timeSeriesSelection";
144
+ ToolName["RETRIEVE_TIME_SERIES_VALUES"] = "retrieveTimeSeriesValues";
140
145
  })(ToolName || (exports.ToolName = ToolName = {}));
141
146
  var ReturnToReferrerTool;
142
147
  (function (ReturnToReferrerTool) {
@@ -164,6 +169,7 @@ var AiAssistantId;
164
169
  AiAssistantId["INCIDENT"] = "incident-assistant";
165
170
  AiAssistantId["REPORT"] = "report-assistant";
166
171
  AiAssistantId["AXALTA_INCIDENT"] = "axalta-incident-assistant";
172
+ AiAssistantId["HAWIC"] = "hawic-assistant";
167
173
  })(AiAssistantId || (exports.AiAssistantId = AiAssistantId = {}));
168
174
  var OneShotTaskId;
169
175
  (function (OneShotTaskId) {
@@ -7,12 +7,18 @@ export declare enum CapabilityBundleId {
7
7
  ASSET_VIEWER = "asset-viewer",
8
8
  CONTENT_EDITOR = "content-editor",
9
9
  CONTENT_VIEWER = "content-viewer",
10
- FLANGE_SKILL_CONTROL = "flange-skill-control",
11
10
  FLOW_EDITOR = "flow-editor",
12
11
  FLOW_VIEWER = "flow-viewer",
12
+ NOTIFICATION_EDITOR = "notification-editor",
13
+ NOTIFICATION_VIEWER = "notification-viewer",
14
+ PROJECT_MANAGER = "project-manager",
13
15
  TIME_SERIES_EDITOR = "time-series-editor",
14
16
  TIME_SERIES_VIEWER = "time-series-viewer",
15
- ORGANIZATION_MANAGEMENT = "organization-management"
17
+ ORGANIZATION_DEFAULT_CAPABILITIES = "organization-default-capabilities",
18
+ ORGANIZATION_MANAGEMENT = "organization-management",
19
+ FLANGE_SKILL_CONTROL = "flange-skill-control",
20
+ HAWIC_DIRECT_MARKETERS = "hawic-direct-marketers",
21
+ WIND_X = "wind-x"
16
22
  }
17
23
  export interface CreateCapabilityBundle {
18
24
  id: CapabilityBundleId;
@@ -11,12 +11,22 @@ var CapabilityBundleId;
11
11
  // Contents
12
12
  CapabilityBundleId["CONTENT_EDITOR"] = "content-editor";
13
13
  CapabilityBundleId["CONTENT_VIEWER"] = "content-viewer";
14
- CapabilityBundleId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
15
14
  // Flows
16
15
  CapabilityBundleId["FLOW_EDITOR"] = "flow-editor";
17
16
  CapabilityBundleId["FLOW_VIEWER"] = "flow-viewer";
17
+ // Notifications
18
+ CapabilityBundleId["NOTIFICATION_EDITOR"] = "notification-editor";
19
+ CapabilityBundleId["NOTIFICATION_VIEWER"] = "notification-viewer";
20
+ // Project manager
21
+ CapabilityBundleId["PROJECT_MANAGER"] = "project-manager";
18
22
  // Time series
19
23
  CapabilityBundleId["TIME_SERIES_EDITOR"] = "time-series-editor";
20
24
  CapabilityBundleId["TIME_SERIES_VIEWER"] = "time-series-viewer";
25
+ // User
26
+ CapabilityBundleId["ORGANIZATION_DEFAULT_CAPABILITIES"] = "organization-default-capabilities";
21
27
  CapabilityBundleId["ORGANIZATION_MANAGEMENT"] = "organization-management";
28
+ // Others
29
+ CapabilityBundleId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
30
+ CapabilityBundleId["HAWIC_DIRECT_MARKETERS"] = "hawic-direct-marketers";
31
+ CapabilityBundleId["WIND_X"] = "wind-x";
22
32
  })(CapabilityBundleId || (exports.CapabilityBundleId = CapabilityBundleId = {}));
@@ -1,7 +1,6 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
3
3
  export declare enum CapabilityId {
4
- SUPERUSER = "superuser",
5
4
  ALERT_READ = "alert.read",
6
5
  ALERT_CREATE = "alert.create",
7
6
  ALERT_UPDATE = "alert.update",
@@ -41,11 +40,10 @@ export declare enum CapabilityId {
41
40
  CONTENT_MANAGER = "content-manager",
42
41
  CRM_IMPORT = "crm.import",
43
42
  CRM_REMINDER_SEND = "crm.reminder.send",
43
+ CRM_MANAGER = "crm-manager",
44
44
  DATASPACE_SHARE = "dataspace.share",
45
45
  EDGE_DEVICE_READ = "edge-device.read",
46
46
  EDGE_DEVICE_EXECUTE = "edge-device.execute",
47
- FLANGE_SKILL_CONTROL = "flange-skill-control",
48
- FLANGE_SKILL_CONTROL_UI = "flange-skill-control-ui",
49
47
  FLOW_DEPLOYMENT_READ = "flow-deployment.read",
50
48
  FLOW_DEPLOYMENT_CREATE = "flow-deployment.create",
51
49
  FLOW_DEPLOYMENT_UPDATE = "flow-deployment.update",
@@ -75,11 +73,12 @@ export declare enum CapabilityId {
75
73
  NOTIFICATION_CREATE = "notification.create",
76
74
  NOTIFICATION_UPDATE = "notification.update",
77
75
  NOTIFICATION_DELETE = "notification.delete",
78
- NOTIFICATION_VIEW = "notification.view",
76
+ NOTIFICATION_MANAGER = "notification-manager",
79
77
  OBJECT_REFERENCE_READ = "object-reference.read",
80
78
  OBJECT_REFERENCE_CREATE = "object-reference.create",
81
79
  OBJECT_REFERENCE_UPDATE = "object-reference.update",
82
80
  OBJECT_REFERENCE_DELETE = "object-reference.delete",
81
+ PROJECT_MANAGER = "project-manager",
83
82
  TIME_SERIES_READ = "time-series.read",
84
83
  TIME_SERIES_CREATE = "time-series.create",
85
84
  TIME_SERIES_UPDATE = "time-series.update",
@@ -102,7 +101,6 @@ export declare enum CapabilityId {
102
101
  ORG_GROUP_DELETE = "org-group.delete",
103
102
  ORG_GROUP_MEMBER_READ = "org-group-member.read",
104
103
  ORG_GROUP_MEMBER_CREATE = "org-group-member.create",
105
- ORG_GROUP_MEMBER_UPDATE = "org-group-member.update",
106
104
  ORG_GROUP_MEMBER_DELETE = "org-group-member.delete",
107
105
  ORG_GROUP_CAPABILITY_READ = "org-group-capability.read",
108
106
  ORG_GROUP_CAPABILITY_CREATE = "org-group-capability.create",
@@ -111,12 +109,12 @@ export declare enum CapabilityId {
111
109
  ORG_GROUP_CAPABILITY_BUNDLE_CREATE = "org-group-capability-bundle.create",
112
110
  ORG_GROUP_CAPABILITY_BUNDLE_DELETE = "org-group-capability-bundle.delete",
113
111
  ORG_SUBSCRIPTION_READ = "org-subscription.read",
114
- ORG_SUBSCRIPTION_CREATE = "org-subscription.create",
115
- ORG_SUBSCRIPTION_UPDATE = "org-subscription.update",
116
- ORG_SUBSCRIPTION_DELETE = "org-subscription.delete"
112
+ SUPERUSER = "superuser",
113
+ FLANGE_SKILL_CONTROL = "flange-skill-control",
114
+ HAWIC_DIRECT_MARKETERS = "hawic-direct-marketers",
115
+ WIND_X = "wind-x"
117
116
  }
118
117
  export declare enum CapabilityScope {
119
- ADMINISTRATION = "administration",
120
118
  ALERTS = "alerts",
121
119
  ASSET_INTELLIGENCE = "asset-intelligence",
122
120
  ASSETS = "assets",
@@ -126,14 +124,18 @@ export declare enum CapabilityScope {
126
124
  CRM = "crm",
127
125
  DATASPACE = "dataspace",
128
126
  EDGE_DEVICES = "edge-devices",
129
- FLANGE_SKILL_CONTROL = "flange-skill-control",
130
127
  FLOWS = "flows",
131
128
  LABELS = "labels",
132
129
  NOTIFICATIONS = "notifications",
133
130
  OBJECT_REFERENCES = "object-references",
131
+ PROJECT_MANAGER = "project-manager",
134
132
  TIME_SERIES = "time-series",
135
133
  USER = "user",
136
- VAULT = "vault"
134
+ VAULT = "vault",
135
+ ADMINISTRATION = "administration",
136
+ FLANGE_SKILL_CONTROL = "flange-skill-control",
137
+ HAWIC = "hawic",
138
+ WIND_X = "wind-x"
137
139
  }
138
140
  export declare enum CapabilityType {
139
141
  /**
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CapabilityAction = exports.CapabilityType = exports.CapabilityScope = exports.CapabilityId = void 0;
4
4
  var CapabilityId;
5
5
  (function (CapabilityId) {
6
- CapabilityId["SUPERUSER"] = "superuser";
7
6
  // Alerts
8
7
  CapabilityId["ALERT_READ"] = "alert.read";
9
8
  CapabilityId["ALERT_CREATE"] = "alert.create";
@@ -54,16 +53,12 @@ var CapabilityId;
54
53
  // CRM
55
54
  CapabilityId["CRM_IMPORT"] = "crm.import";
56
55
  CapabilityId["CRM_REMINDER_SEND"] = "crm.reminder.send";
56
+ CapabilityId["CRM_MANAGER"] = "crm-manager";
57
57
  // Dataspace
58
58
  CapabilityId["DATASPACE_SHARE"] = "dataspace.share";
59
59
  // Edge devices
60
60
  CapabilityId["EDGE_DEVICE_READ"] = "edge-device.read";
61
61
  CapabilityId["EDGE_DEVICE_EXECUTE"] = "edge-device.execute";
62
- // Flange Skill control
63
- CapabilityId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
64
- // TODO add and implement administrator role, power user role, ui role, app role
65
- // Flange Skill control ui
66
- CapabilityId["FLANGE_SKILL_CONTROL_UI"] = "flange-skill-control-ui";
67
62
  // Flow deployment
68
63
  CapabilityId["FLOW_DEPLOYMENT_READ"] = "flow-deployment.read";
69
64
  CapabilityId["FLOW_DEPLOYMENT_CREATE"] = "flow-deployment.create";
@@ -100,12 +95,14 @@ var CapabilityId;
100
95
  CapabilityId["NOTIFICATION_CREATE"] = "notification.create";
101
96
  CapabilityId["NOTIFICATION_UPDATE"] = "notification.update";
102
97
  CapabilityId["NOTIFICATION_DELETE"] = "notification.delete";
103
- CapabilityId["NOTIFICATION_VIEW"] = "notification.view";
98
+ CapabilityId["NOTIFICATION_MANAGER"] = "notification-manager";
104
99
  // Object references
105
100
  CapabilityId["OBJECT_REFERENCE_READ"] = "object-reference.read";
106
101
  CapabilityId["OBJECT_REFERENCE_CREATE"] = "object-reference.create";
107
102
  CapabilityId["OBJECT_REFERENCE_UPDATE"] = "object-reference.update";
108
103
  CapabilityId["OBJECT_REFERENCE_DELETE"] = "object-reference.delete";
104
+ // Project manager
105
+ CapabilityId["PROJECT_MANAGER"] = "project-manager";
109
106
  // Time series
110
107
  CapabilityId["TIME_SERIES_READ"] = "time-series.read";
111
108
  CapabilityId["TIME_SERIES_CREATE"] = "time-series.create";
@@ -133,7 +130,6 @@ var CapabilityId;
133
130
  CapabilityId["ORG_GROUP_DELETE"] = "org-group.delete";
134
131
  CapabilityId["ORG_GROUP_MEMBER_READ"] = "org-group-member.read";
135
132
  CapabilityId["ORG_GROUP_MEMBER_CREATE"] = "org-group-member.create";
136
- CapabilityId["ORG_GROUP_MEMBER_UPDATE"] = "org-group-member.update";
137
133
  CapabilityId["ORG_GROUP_MEMBER_DELETE"] = "org-group-member.delete";
138
134
  CapabilityId["ORG_GROUP_CAPABILITY_READ"] = "org-group-capability.read";
139
135
  CapabilityId["ORG_GROUP_CAPABILITY_CREATE"] = "org-group-capability.create";
@@ -142,13 +138,18 @@ var CapabilityId;
142
138
  CapabilityId["ORG_GROUP_CAPABILITY_BUNDLE_CREATE"] = "org-group-capability-bundle.create";
143
139
  CapabilityId["ORG_GROUP_CAPABILITY_BUNDLE_DELETE"] = "org-group-capability-bundle.delete";
144
140
  CapabilityId["ORG_SUBSCRIPTION_READ"] = "org-subscription.read";
145
- CapabilityId["ORG_SUBSCRIPTION_CREATE"] = "org-subscription.create";
146
- CapabilityId["ORG_SUBSCRIPTION_UPDATE"] = "org-subscription.update";
147
- CapabilityId["ORG_SUBSCRIPTION_DELETE"] = "org-subscription.delete";
141
+ // Superuser
142
+ CapabilityId["SUPERUSER"] = "superuser";
143
+ // Flange Skill control
144
+ CapabilityId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
145
+ // TODO add and implement administrator role, power user role, ui role, app role
146
+ // Hawic
147
+ CapabilityId["HAWIC_DIRECT_MARKETERS"] = "hawic-direct-marketers";
148
+ // Wind-X
149
+ CapabilityId["WIND_X"] = "wind-x";
148
150
  })(CapabilityId || (exports.CapabilityId = CapabilityId = {}));
149
151
  var CapabilityScope;
150
152
  (function (CapabilityScope) {
151
- CapabilityScope["ADMINISTRATION"] = "administration";
152
153
  // Services
153
154
  CapabilityScope["ALERTS"] = "alerts";
154
155
  CapabilityScope["ASSET_INTELLIGENCE"] = "asset-intelligence";
@@ -159,14 +160,19 @@ var CapabilityScope;
159
160
  CapabilityScope["CRM"] = "crm";
160
161
  CapabilityScope["DATASPACE"] = "dataspace";
161
162
  CapabilityScope["EDGE_DEVICES"] = "edge-devices";
162
- CapabilityScope["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
163
163
  CapabilityScope["FLOWS"] = "flows";
164
164
  CapabilityScope["LABELS"] = "labels";
165
165
  CapabilityScope["NOTIFICATIONS"] = "notifications";
166
166
  CapabilityScope["OBJECT_REFERENCES"] = "object-references";
167
+ CapabilityScope["PROJECT_MANAGER"] = "project-manager";
167
168
  CapabilityScope["TIME_SERIES"] = "time-series";
168
169
  CapabilityScope["USER"] = "user";
169
170
  CapabilityScope["VAULT"] = "vault";
171
+ // Others
172
+ CapabilityScope["ADMINISTRATION"] = "administration";
173
+ CapabilityScope["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
174
+ CapabilityScope["HAWIC"] = "hawic";
175
+ CapabilityScope["WIND_X"] = "wind-x";
170
176
  })(CapabilityScope || (exports.CapabilityScope = CapabilityScope = {}));
171
177
  var CapabilityType;
172
178
  (function (CapabilityType) {
@@ -3,23 +3,27 @@ import type { LocalizedText, LocalizedTextPatch } from './localized-text.interfa
3
3
  export declare enum FeatureId {
4
4
  ALERTS = "alerts",
5
5
  ASSET_MANAGER = "asset-manager",
6
+ ASSET_MANAGER_READ_ONLY = "asset-manager-read-only",
6
7
  ASSET_INTELLIGENCE = "asset-intelligence",
7
8
  AUDIT = "audit",
8
9
  CALENDAR = "calendar",
10
+ CALENDAR_EVENTS = "calendar-events",
11
+ CALENDAR_TASKS = "calendar-tasks",
9
12
  CONTENT_MANAGER = "content-manager",
10
13
  CRM = "crm",
11
14
  DATASPACE = "dataspace",
12
15
  EDGE_DEVICES = "edge-devices",
13
16
  FLANGE_SKILL_CONTROL = "flange-skill-control",
14
17
  FLOW_STUDIO = "flow-studio",
18
+ HAWIC_DIRECT_MARKETERS = "hawic-direct-marketers",
15
19
  LABELS = "labels",
16
20
  NOTIFICATIONS = "notifications",
17
21
  OBJECT_REFERENCES = "object-references",
22
+ PROJECT_MANAGER = "project-manager",
18
23
  TIME_SERIES_MANAGER = "time-series-manager",
19
24
  ORGANIZATIONS = "organizations",
20
25
  VAULT = "vault",
21
- ORGANIZATION_MANAGEMENT = "organization-management",
22
- ORGANIZATION_MANAGEMENT_UI = "organization-management-ui",
26
+ WIND_X = "wind-x",
23
27
  SUPERUSER = "superuser"
24
28
  }
25
29
  export interface CreateFeature {
@@ -7,12 +7,15 @@ var FeatureId;
7
7
  FeatureId["ALERTS"] = "alerts";
8
8
  // Assets
9
9
  FeatureId["ASSET_MANAGER"] = "asset-manager";
10
+ FeatureId["ASSET_MANAGER_READ_ONLY"] = "asset-manager-read-only";
10
11
  // Asset-Intelligence
11
12
  FeatureId["ASSET_INTELLIGENCE"] = "asset-intelligence";
12
13
  // Audit
13
14
  FeatureId["AUDIT"] = "audit";
14
15
  // Calendar
15
16
  FeatureId["CALENDAR"] = "calendar";
17
+ FeatureId["CALENDAR_EVENTS"] = "calendar-events";
18
+ FeatureId["CALENDAR_TASKS"] = "calendar-tasks";
16
19
  // Contents
17
20
  FeatureId["CONTENT_MANAGER"] = "content-manager";
18
21
  // CRM
@@ -25,20 +28,24 @@ var FeatureId;
25
28
  FeatureId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
26
29
  // Flows
27
30
  FeatureId["FLOW_STUDIO"] = "flow-studio";
31
+ // Hawic Direct marketers
32
+ FeatureId["HAWIC_DIRECT_MARKETERS"] = "hawic-direct-marketers";
28
33
  // Labels
29
34
  FeatureId["LABELS"] = "labels";
30
35
  // Notifications
31
36
  FeatureId["NOTIFICATIONS"] = "notifications";
32
37
  // Object references
33
38
  FeatureId["OBJECT_REFERENCES"] = "object-references";
39
+ // Project Manager
40
+ FeatureId["PROJECT_MANAGER"] = "project-manager";
34
41
  // Time Series
35
42
  FeatureId["TIME_SERIES_MANAGER"] = "time-series-manager";
36
43
  // User
37
44
  FeatureId["ORGANIZATIONS"] = "organizations";
38
45
  // Vault
39
46
  FeatureId["VAULT"] = "vault";
47
+ // Wind-X
48
+ FeatureId["WIND_X"] = "wind-x";
40
49
  // Organization Management
41
- FeatureId["ORGANIZATION_MANAGEMENT"] = "organization-management";
42
- FeatureId["ORGANIZATION_MANAGEMENT_UI"] = "organization-management-ui";
43
50
  FeatureId["SUPERUSER"] = "superuser";
44
51
  })(FeatureId || (exports.FeatureId = FeatureId = {}));
@@ -1,9 +1,13 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText, LocalizedTextPatch } from './localized-text.interface';
3
3
  export declare enum PlanId {
4
+ DEFAULT = "default",
4
5
  DEVELOPER = "developer",
5
- SUPERUSER = "superuser",
6
- DEFAULT = "default"
6
+ FLANGE_SKILL_CONTROL = "flange-skill-control",
7
+ HAWIC_DIRECT_MARKETERS = "hawic-direct-marketers",
8
+ HAWIC_OPERATOR_SERVICE = "hawic-operator-service",
9
+ WIND_X = "wind-x",
10
+ SUPERUSER = "superuser"
7
11
  }
8
12
  export interface CreatePlan {
9
13
  id: PlanId;
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PlanId = void 0;
4
4
  var PlanId;
5
5
  (function (PlanId) {
6
+ PlanId["DEFAULT"] = "default";
6
7
  PlanId["DEVELOPER"] = "developer";
8
+ PlanId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
9
+ PlanId["HAWIC_DIRECT_MARKETERS"] = "hawic-direct-marketers";
10
+ PlanId["HAWIC_OPERATOR_SERVICE"] = "hawic-operator-service";
11
+ PlanId["WIND_X"] = "wind-x";
7
12
  PlanId["SUPERUSER"] = "superuser";
8
- PlanId["DEFAULT"] = "default";
9
13
  })(PlanId || (exports.PlanId = PlanId = {}));
@@ -1,4 +1,4 @@
1
- export type { AiAssistant, AiSkill, AiSkillSummary, AudioTranscription, AssetResourceSelectionOption, AssistantMessage, DocumentResourceSelectionOption, ErrorMessage, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, MessageAttachment, OneShotTaskResult, ResourceSelectionOption, ResourceSelectionRejected, SystemMessage, Thread, ThreadPopulated, ToolMessage, ToolNameType, UserMessage, } from './ai.interface';
1
+ export type { AiAssistant, AiSkill, AiSkillSummary, AudioTranscription, AssetResourceSelectionOption, AssistantMessage, ChoiceSelectionResult, DocumentResourceSelectionOption, ErrorMessage, GenericResourceSelectionOption, LogbookEntryResourceSelectionOption, Message, MessageAttachment, MultiChoiceSelectionResult, OneShotTaskResult, ResourceSelectionOption, ResourceSelectionRejected, TimeSeriesSelectionOption, SystemMessage, Thread, ThreadPopulated, ToolMessage, ToolNameType, UserMessage, } from './ai.interface';
2
2
  export type { Alert, AlertCondition, TimeSeriesReference, UpdatedField } from './alert.interface';
3
3
  export type { Api, Change, ChangeSubject, ObjectIdLike } from './api.interface';
4
4
  export type { AddToProperty, Asset, AssetChange, AssetRevision, AssetSubject, AssetTimeSeriesValue, AssetType, AssetTypeRevision, AssetTypeSearchResult, Attachment, EventCause, EventLevelOverride, RemoveFromProperty, Template, } from './asset.interface';
@@ -77,3 +77,4 @@ export { WebSocketMessageType } from './websockets.interface';
77
77
  export type { AiThreadListChangedEvent, WebSocketError } from './websockets.interface';
78
78
  export * from './authz';
79
79
  export * from './crm-autonomy.interface';
80
+ export * from './knowledge.interface';
@@ -123,3 +123,4 @@ var websockets_interface_1 = require("./websockets.interface");
123
123
  Object.defineProperty(exports, "WebSocketMessageType", { enumerable: true, get: function () { return websockets_interface_1.WebSocketMessageType; } });
124
124
  tslib_1.__exportStar(require("./authz"), exports);
125
125
  tslib_1.__exportStar(require("./crm-autonomy.interface"), exports);
126
+ tslib_1.__exportStar(require("./knowledge.interface"), exports);
@@ -0,0 +1,142 @@
1
+ import type { Author } from './author.interface';
2
+ import type { Owner } from './owner.interface';
3
+ import { ResourceType } from './resource.interface';
4
+ export declare const KNOWLEDGE_TARGET_TYPES: readonly [ResourceType.KNOWLEDGE, ResourceType.ASSET, ResourceType.ASSETTYPE, ResourceType.CONTENT, ResourceType.EVENT, ResourceType.TASK];
5
+ export interface KnowledgeTarget {
6
+ resourceType: (typeof KNOWLEDGE_TARGET_TYPES)[number];
7
+ id: string;
8
+ }
9
+ export interface KnowledgeSource {
10
+ id: string;
11
+ kind: 'observation' | 'resource' | 'external';
12
+ target?: KnowledgeTarget;
13
+ text?: string;
14
+ url?: string;
15
+ version?: string;
16
+ locator?: string;
17
+ /** False means the target was not readable at response time. */
18
+ available?: boolean;
19
+ }
20
+ export interface KnowledgeLink {
21
+ target: KnowledgeTarget;
22
+ explicit: boolean;
23
+ parsed: boolean;
24
+ }
25
+ export type KnowledgeApplicability = {
26
+ mode: 'unknown' | 'organization';
27
+ } | {
28
+ mode: 'assets';
29
+ assetIds: string[];
30
+ } | {
31
+ mode: 'subtree';
32
+ rootId: string;
33
+ assetTypeId?: string;
34
+ } | {
35
+ mode: 'assetType';
36
+ assetTypeId: string;
37
+ };
38
+ export interface KnowledgeConfirmation {
39
+ actor: Author;
40
+ at: string;
41
+ revision: number;
42
+ }
43
+ export interface KnowledgePage {
44
+ id: string;
45
+ owner: Owner;
46
+ title: string;
47
+ body: string;
48
+ type: string;
49
+ description?: string;
50
+ tags: string[];
51
+ resource?: KnowledgeTarget;
52
+ origin: {
53
+ actor: Author;
54
+ at: string;
55
+ context?: KnowledgeTarget;
56
+ };
57
+ sources: KnowledgeSource[];
58
+ links: KnowledgeLink[];
59
+ applicability: KnowledgeApplicability;
60
+ readPermissions: string[];
61
+ readWritePermissions: string[];
62
+ state: 'active' | 'withdrawn';
63
+ staleAfter?: string;
64
+ confirmations: KnowledgeConfirmation[];
65
+ revision: number;
66
+ recordVersion: number;
67
+ createdBy: Author;
68
+ updatedBy: Author;
69
+ createdAt: string;
70
+ updatedAt: string;
71
+ deletedAt?: string;
72
+ }
73
+ export interface CreateKnowledge {
74
+ title: string;
75
+ body: string;
76
+ type?: string;
77
+ description?: string;
78
+ tags?: string[];
79
+ /** `null` clears the value on update. */
80
+ resource?: KnowledgeTarget | null;
81
+ /** `null` clears the value on update. */
82
+ originContext?: KnowledgeTarget | null;
83
+ sources?: Omit<KnowledgeSource, 'available'>[];
84
+ explicitLinks?: KnowledgeTarget[];
85
+ applicability?: KnowledgeApplicability;
86
+ readPermissions?: string[];
87
+ readWritePermissions?: string[];
88
+ staleAfter?: string | null;
89
+ }
90
+ export type UpdateKnowledge = Partial<CreateKnowledge> & {
91
+ recordVersion: number;
92
+ };
93
+ export interface KnowledgeVersion {
94
+ recordVersion: number;
95
+ }
96
+ export interface ConfirmKnowledge extends KnowledgeVersion {
97
+ revision: number;
98
+ }
99
+ export type KnowledgeRelation = 'OBSERVED_IN' | 'EVIDENCED_BY' | 'RELATED_TO' | 'APPLIES_TO';
100
+ export type KnowledgeScopeResult = 'matches' | 'not-established' | 'not-evaluated';
101
+ export interface KnowledgeQuery {
102
+ group?: 'direct' | 'broader' | 'related';
103
+ query?: string;
104
+ contextType?: 'asset' | 'location' | 'organization';
105
+ contextId?: string;
106
+ cursor?: string;
107
+ limit?: number;
108
+ }
109
+ export interface KnowledgeBacklinkQuery {
110
+ targetType: KnowledgeTarget['resourceType'];
111
+ targetId: string;
112
+ cursor?: string;
113
+ limit?: number;
114
+ }
115
+ export interface KnowledgePreview extends Omit<KnowledgePage, 'body'> {
116
+ excerpt: string;
117
+ scope: KnowledgeScopeResult;
118
+ relations: KnowledgeRelation[];
119
+ stale: boolean;
120
+ }
121
+ export interface KnowledgeList {
122
+ docs: KnowledgePreview[];
123
+ nextCursor?: string;
124
+ status: 'complete' | 'more' | 'incomplete' | 'unavailable';
125
+ }
126
+ export interface KnowledgeHome {
127
+ direct: KnowledgeList;
128
+ broader: KnowledgeList;
129
+ related: KnowledgeList;
130
+ }
131
+ export interface KnowledgeBatch {
132
+ docs: KnowledgePage[];
133
+ unavailableIds: string[];
134
+ }
135
+ export interface KnowledgeRevision {
136
+ page: KnowledgePage;
137
+ current: {
138
+ revision: number;
139
+ recordVersion: number;
140
+ state: KnowledgePage['state'];
141
+ };
142
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KNOWLEDGE_TARGET_TYPES = void 0;
4
+ const resource_interface_1 = require("./resource.interface");
5
+ exports.KNOWLEDGE_TARGET_TYPES = [
6
+ resource_interface_1.ResourceType.KNOWLEDGE,
7
+ resource_interface_1.ResourceType.ASSET,
8
+ resource_interface_1.ResourceType.ASSETTYPE,
9
+ resource_interface_1.ResourceType.CONTENT,
10
+ resource_interface_1.ResourceType.EVENT,
11
+ resource_interface_1.ResourceType.TASK,
12
+ ];