@hahnpro/hpc-api 2026.9.4 → 2026.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/hpc-api",
3
- "version": "2026.9.4",
3
+ "version": "2026.9.5",
4
4
  "description": "Module for easy access to the HahnPRO Cloud API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -16,7 +16,7 @@
16
16
  "@microsoft/fetch-event-source": "2.0.1",
17
17
  "axios": "1.20.0",
18
18
  "eventsource": "5.1.1",
19
- "jose": "6.2.11",
19
+ "jose": "6.2.12",
20
20
  "jwt-decode": "4.0.0",
21
21
  "p-queue": "9.3.3",
22
22
  "rxjs": "7.8.2",
@@ -1,9 +1,17 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText } from './localized-text.interface';
3
3
  export declare enum CapabilityBundleId {
4
+ ASSET_TYPE_EDITOR = "asset-type-editor",
5
+ ASSET_TYPE_VIEWER = "asset-type-viewer",
4
6
  ASSET_EDITOR = "asset-editor",
5
7
  ASSET_VIEWER = "asset-viewer",
8
+ CONTENT_EDITOR = "content-editor",
9
+ CONTENT_VIEWER = "content-viewer",
6
10
  FLANGE_SKILL_CONTROL = "flange-skill-control",
11
+ FLOW_EDITOR = "flow-editor",
12
+ FLOW_VIEWER = "flow-viewer",
13
+ TIME_SERIES_EDITOR = "time-series-editor",
14
+ TIME_SERIES_VIEWER = "time-series-viewer",
7
15
  ORGANIZATION_ADMINISTRATION = "organization-administration"
8
16
  }
9
17
  export interface CreateCapabilityBundle {
@@ -3,8 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CapabilityBundleId = void 0;
4
4
  var CapabilityBundleId;
5
5
  (function (CapabilityBundleId) {
6
+ // Assets
7
+ CapabilityBundleId["ASSET_TYPE_EDITOR"] = "asset-type-editor";
8
+ CapabilityBundleId["ASSET_TYPE_VIEWER"] = "asset-type-viewer";
6
9
  CapabilityBundleId["ASSET_EDITOR"] = "asset-editor";
7
10
  CapabilityBundleId["ASSET_VIEWER"] = "asset-viewer";
11
+ // Contents
12
+ CapabilityBundleId["CONTENT_EDITOR"] = "content-editor";
13
+ CapabilityBundleId["CONTENT_VIEWER"] = "content-viewer";
8
14
  CapabilityBundleId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
15
+ // Flows
16
+ CapabilityBundleId["FLOW_EDITOR"] = "flow-editor";
17
+ CapabilityBundleId["FLOW_VIEWER"] = "flow-viewer";
18
+ // Time series
19
+ CapabilityBundleId["TIME_SERIES_EDITOR"] = "time-series-editor";
20
+ CapabilityBundleId["TIME_SERIES_VIEWER"] = "time-series-viewer";
9
21
  CapabilityBundleId["ORGANIZATION_ADMINISTRATION"] = "organization-administration";
10
22
  })(CapabilityBundleId || (exports.CapabilityBundleId = CapabilityBundleId = {}));
@@ -2,40 +2,144 @@ import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText } from './localized-text.interface';
3
3
  export declare enum CapabilityId {
4
4
  SUPERUSER = "superuser",
5
+ ALERT_READ = "alert.read",
6
+ ALERT_CREATE = "alert.create",
7
+ ALERT_UPDATE = "alert.update",
8
+ ALERT_DELETE = "alert.delete",
9
+ ENDPOINT_READ = "endpoint.read",
10
+ ENDPOINT_CREATE = "endpoint.create",
11
+ ENDPOINT_UPDATE = "endpoint.update",
12
+ ENDPOINT_DELETE = "endpoint.delete",
13
+ RULE_READ = "rule.read",
14
+ RULE_CREATE = "rule.create",
15
+ RULE_UPDATE = "rule.update",
16
+ RULE_DELETE = "rule.delete",
5
17
  ASSET_READ = "asset.read",
18
+ ASSET_CREATE = "asset.create",
6
19
  ASSET_UPDATE = "asset.update",
7
20
  ASSET_DELETE = "asset.delete",
8
- ASSET_CREATE = "asset.create",
9
- ASSET_MANAGER = "asset.asset-manager",
21
+ ASSET_TYPE_READ = "asset-type.read",
22
+ ASSET_TYPE_CREATE = "asset-type.create",
23
+ ASSET_TYPE_UPDATE = "asset-type.update",
24
+ ASSET_TYPE_DELETE = "asset-type.delete",
25
+ ASSET_MANAGER = "asset-manager",
26
+ ASSET_INTELLIGENCE_AI = "asset-intelligence.ai",
27
+ AUDIT_READ = "audit.read",
28
+ EVENT_READ = "event.read",
29
+ EVENT_CREATE = "event.create",
30
+ EVENT_UPDATE = "event.update",
31
+ EVENT_DELETE = "event.delete",
32
+ TASK_READ = "task.read",
33
+ TASK_CREATE = "task.create",
34
+ TASK_UPDATE = "task.update",
35
+ TASK_DELETE = "task.delete",
36
+ CONTENT_READ = "content.read",
37
+ CONTENT_CREATE = "content.create",
38
+ CONTENT_UPDATE = "content.update",
39
+ CONTENT_DELETE = "content.delete",
40
+ CONTENT_DOWNLOAD = "content.download",
41
+ CONTENT_MANAGER = "content-manager",
42
+ CRM_IMPORT = "crm.import",
43
+ CRM_REMINDER_SEND = "crm.reminder.send",
44
+ DATASPACE_SHARE = "dataspace.share",
45
+ EDGE_DEVICE_READ = "edge-device.read",
46
+ EDGE_DEVICE_EXECUTE = "edge-device.execute",
10
47
  FLANGE_SKILL_CONTROL = "flange-skill-control",
11
48
  FLANGE_SKILL_CONTROL_UI = "flange-skill-control-ui",
49
+ FLOW_DEPLOYMENT_READ = "flow-deployment.read",
50
+ FLOW_DEPLOYMENT_CREATE = "flow-deployment.create",
51
+ FLOW_DEPLOYMENT_UPDATE = "flow-deployment.update",
52
+ FLOW_DEPLOYMENT_DELETE = "flow-deployment.delete",
53
+ FLOW_DEPLOYMENT_DOWNLOAD = "flow-deployment.download",
54
+ FLOW_DEPLOYMENT_TRIGGER = "flow-deployment.trigger",
55
+ FLOW_DEPLOYMENT_WEBHOOK = "flow-deployment.webhook",
56
+ FLOW_DEPLOYMENT_MESSAGE = "flow-deployment.message",
57
+ FLOW_READ = "flow.read",
58
+ FLOW_CREATE = "flow.create",
59
+ FLOW_UPDATE = "flow.update",
60
+ FLOW_DELETE = "flow.delete",
61
+ FLOW_FUNCTION_READ = "flow-function.read",
62
+ FLOW_FUNCTION_CREATE = "flow-function.create",
63
+ FLOW_FUNCTION_UPDATE = "flow-function.update",
64
+ FLOW_FUNCTION_DELETE = "flow-function.delete",
65
+ FLOW_MODULE_READ = "flow-module.read",
66
+ FLOW_MODULE_CREATE = "flow-module.create",
67
+ FLOW_MODULE_UPDATE = "flow-module.update",
68
+ FLOW_MODULE_DELETE = "flow-module.delete",
69
+ FLOW_STUDIO = "flow-studio",
70
+ LABEL_READ = "label.read",
71
+ LABEL_CREATE = "label.create",
72
+ LABEL_UPDATE = "label.update",
73
+ LABEL_DELETE = "label.delete",
74
+ NOTIFICATION_READ = "notification.read",
75
+ NOTIFICATION_CREATE = "notification.create",
76
+ NOTIFICATION_UPDATE = "notification.update",
77
+ NOTIFICATION_DELETE = "notification.delete",
78
+ NOTIFICATION_VIEW = "notification.view",
79
+ OBJECT_REFERENCE_READ = "object-reference.read",
80
+ OBJECT_REFERENCE_CREATE = "object-reference.create",
81
+ OBJECT_REFERENCE_UPDATE = "object-reference.update",
82
+ OBJECT_REFERENCE_DELETE = "object-reference.delete",
83
+ TIME_SERIES_READ = "time-series.read",
84
+ TIME_SERIES_CREATE = "time-series.create",
85
+ TIME_SERIES_UPDATE = "time-series.update",
86
+ TIME_SERIES_DELETE = "time-series.delete",
87
+ TIME_SERIES_MANAGER = "time-series-manager",
88
+ VAULT_SECRET_READ = "vault-secret.read",
89
+ VAULT_SECRET_CREATE = "vault-secret.create",
90
+ VAULT_SECRET_UPDATE = "vault-secret.update",
91
+ VAULT_SECRET_DELETE = "vault-secret.delete",
92
+ BILLING_READ = "billing.read",
93
+ ORGANIZATION_READ = "organization.read",
94
+ ORGANIZATION_CREATE = "organization.create",
95
+ ORGANIZATION_UPDATE = "organization.update",
96
+ ORGANIZATION_DELETE = "organization.delete",
97
+ ORG_CAPABILITY_READ = "org-capability.read",
98
+ ORG_CAPABILITY_BUNDLE_READ = "org-capability-bundle.read",
12
99
  ORG_GROUP_READ = "org-group.read",
100
+ ORG_GROUP_CREATE = "org-group.create",
13
101
  ORG_GROUP_UPDATE = "org-group.update",
14
102
  ORG_GROUP_DELETE = "org-group.delete",
15
- ORG_GROUP_CREATE = "org-group.create",
16
103
  ORG_GROUP_MEMBER_READ = "org-group-member.read",
104
+ ORG_GROUP_MEMBER_CREATE = "org-group-member.create",
17
105
  ORG_GROUP_MEMBER_UPDATE = "org-group-member.update",
18
106
  ORG_GROUP_MEMBER_DELETE = "org-group-member.delete",
19
- ORG_GROUP_MEMBER_CREATE = "org-group-member.create",
107
+ ORG_GROUP_CAPABILITY_READ = "org-group-capability.read",
108
+ ORG_GROUP_CAPABILITY_CREATE = "org-group-capability.create",
109
+ ORG_GROUP_CAPABILITY_DELETE = "org-group-capability.delete",
110
+ ORG_GROUP_CAPABILITY_BUNDLE_READ = "org-group-capability-bundle.read",
111
+ ORG_GROUP_CAPABILITY_BUNDLE_CREATE = "org-group-capability-bundle.create",
112
+ ORG_GROUP_CAPABILITY_BUNDLE_DELETE = "org-group-capability-bundle.delete",
20
113
  ORG_SUBSCRIPTION_READ = "org-subscription.read",
114
+ ORG_SUBSCRIPTION_CREATE = "org-subscription.create",
21
115
  ORG_SUBSCRIPTION_UPDATE = "org-subscription.update",
22
- ORG_SUBSCRIPTION_DELETE = "org-subscription.delete",
23
- ORG_SUBSCRIPTION_CREATE = "org-subscription.create"
116
+ ORG_SUBSCRIPTION_DELETE = "org-subscription.delete"
24
117
  }
25
118
  export declare enum CapabilityScope {
119
+ ADMINISTRATION = "administration",
120
+ ALERTS = "alerts",
121
+ ASSET_INTELLIGENCE = "asset-intelligence",
26
122
  ASSETS = "assets",
123
+ AUDIT = "audit",
124
+ CALENDAR = "calendar",
27
125
  CONTENTS = "contents",
28
- TIME_SERIES = "time-series",
126
+ CRM = "crm",
127
+ DATASPACE = "dataspace",
128
+ EDGE_DEVICES = "edge-devices",
129
+ FLANGE_SKILL_CONTROL = "flange-skill-control",
29
130
  FLOWS = "flows",
30
- FLANGE_SKILL_CONTROL = "flange-skill-control"
131
+ LABELS = "labels",
132
+ NOTIFICATIONS = "notifications",
133
+ OBJECT_REFERENCES = "object-references",
134
+ TIME_SERIES = "time-series",
135
+ USER = "user",
136
+ VAULT = "vault"
31
137
  }
32
138
  export declare enum CapabilityType {
33
139
  /**
34
- * UI capabilities are used to control access to user interface elements and features.
35
- * They are typically associated with roles that determine what a user can see and interact with in the application.
36
- * For example, a UI capability might allow a user to view a specific dashboard or access a particular section of the application.
140
+ * Admin capabilities are used to control access to administrative functions and settings within the application.
37
141
  */
38
- UI = "ui",
142
+ ADMINISTRATION = "administration",
39
143
  /**
40
144
  * Resource capabilities are used to control access to specific resources within the application.
41
145
  * They are typically associated with actions that can be performed on those resources, such as reading, updating, deleting, or creating them.
@@ -43,14 +147,16 @@ export declare enum CapabilityType {
43
147
  */
44
148
  RESOURCE = "resource",
45
149
  /**
46
- * Feature capabilities are used to control access to specific features or functionalities within the application.
47
- * These capabilities although used as permissions to access certain feature resources, like asset types, ...
150
+ * UI capabilities are used to control access to user interface elements and features.
151
+ * They are typically associated with roles that determine what a user can see and interact with in the application.
152
+ * For example, a UI capability might allow a user to view a specific dashboard or access a particular section of the application.
48
153
  */
49
- FEATURE = "feature",
154
+ UI = "ui",
50
155
  /**
51
- * Admin capabilities are used to control access to administrative functions and settings within the application.
156
+ * Feature capabilities are used to control access to specific features or functionalities within the application.
157
+ * These capabilities although used as permissions to access certain feature resources, like asset types, ...
52
158
  */
53
- ADMIN = "admin"
159
+ FEATURE = "feature"
54
160
  }
55
161
  export declare enum CapabilityAction {
56
162
  READ = "read",
@@ -4,60 +4,194 @@ exports.CapabilityAction = exports.CapabilityType = exports.CapabilityScope = ex
4
4
  var CapabilityId;
5
5
  (function (CapabilityId) {
6
6
  CapabilityId["SUPERUSER"] = "superuser";
7
+ // Alerts
8
+ CapabilityId["ALERT_READ"] = "alert.read";
9
+ CapabilityId["ALERT_CREATE"] = "alert.create";
10
+ CapabilityId["ALERT_UPDATE"] = "alert.update";
11
+ CapabilityId["ALERT_DELETE"] = "alert.delete";
12
+ // Endpoints
13
+ CapabilityId["ENDPOINT_READ"] = "endpoint.read";
14
+ CapabilityId["ENDPOINT_CREATE"] = "endpoint.create";
15
+ CapabilityId["ENDPOINT_UPDATE"] = "endpoint.update";
16
+ CapabilityId["ENDPOINT_DELETE"] = "endpoint.delete";
17
+ // Rules
18
+ CapabilityId["RULE_READ"] = "rule.read";
19
+ CapabilityId["RULE_CREATE"] = "rule.create";
20
+ CapabilityId["RULE_UPDATE"] = "rule.update";
21
+ CapabilityId["RULE_DELETE"] = "rule.delete";
22
+ // Asset
7
23
  CapabilityId["ASSET_READ"] = "asset.read";
24
+ CapabilityId["ASSET_CREATE"] = "asset.create";
8
25
  CapabilityId["ASSET_UPDATE"] = "asset.update";
9
26
  CapabilityId["ASSET_DELETE"] = "asset.delete";
10
- CapabilityId["ASSET_CREATE"] = "asset.create";
11
- CapabilityId["ASSET_MANAGER"] = "asset.asset-manager";
27
+ // Asset type
28
+ CapabilityId["ASSET_TYPE_READ"] = "asset-type.read";
29
+ CapabilityId["ASSET_TYPE_CREATE"] = "asset-type.create";
30
+ CapabilityId["ASSET_TYPE_UPDATE"] = "asset-type.update";
31
+ CapabilityId["ASSET_TYPE_DELETE"] = "asset-type.delete";
32
+ CapabilityId["ASSET_MANAGER"] = "asset-manager";
33
+ // Asset intelligence
34
+ CapabilityId["ASSET_INTELLIGENCE_AI"] = "asset-intelligence.ai";
35
+ // Audit
36
+ CapabilityId["AUDIT_READ"] = "audit.read";
37
+ // Events
38
+ CapabilityId["EVENT_READ"] = "event.read";
39
+ CapabilityId["EVENT_CREATE"] = "event.create";
40
+ CapabilityId["EVENT_UPDATE"] = "event.update";
41
+ CapabilityId["EVENT_DELETE"] = "event.delete";
42
+ // Tasks
43
+ CapabilityId["TASK_READ"] = "task.read";
44
+ CapabilityId["TASK_CREATE"] = "task.create";
45
+ CapabilityId["TASK_UPDATE"] = "task.update";
46
+ CapabilityId["TASK_DELETE"] = "task.delete";
47
+ // Content
48
+ CapabilityId["CONTENT_READ"] = "content.read";
49
+ CapabilityId["CONTENT_CREATE"] = "content.create";
50
+ CapabilityId["CONTENT_UPDATE"] = "content.update";
51
+ CapabilityId["CONTENT_DELETE"] = "content.delete";
52
+ CapabilityId["CONTENT_DOWNLOAD"] = "content.download";
53
+ CapabilityId["CONTENT_MANAGER"] = "content-manager";
54
+ // CRM
55
+ CapabilityId["CRM_IMPORT"] = "crm.import";
56
+ CapabilityId["CRM_REMINDER_SEND"] = "crm.reminder.send";
57
+ // Dataspace
58
+ CapabilityId["DATASPACE_SHARE"] = "dataspace.share";
59
+ // Edge devices
60
+ CapabilityId["EDGE_DEVICE_READ"] = "edge-device.read";
61
+ CapabilityId["EDGE_DEVICE_EXECUTE"] = "edge-device.execute";
62
+ // Flange Skill control
12
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
13
66
  CapabilityId["FLANGE_SKILL_CONTROL_UI"] = "flange-skill-control-ui";
67
+ // Flow deployment
68
+ CapabilityId["FLOW_DEPLOYMENT_READ"] = "flow-deployment.read";
69
+ CapabilityId["FLOW_DEPLOYMENT_CREATE"] = "flow-deployment.create";
70
+ CapabilityId["FLOW_DEPLOYMENT_UPDATE"] = "flow-deployment.update";
71
+ CapabilityId["FLOW_DEPLOYMENT_DELETE"] = "flow-deployment.delete";
72
+ CapabilityId["FLOW_DEPLOYMENT_DOWNLOAD"] = "flow-deployment.download";
73
+ CapabilityId["FLOW_DEPLOYMENT_TRIGGER"] = "flow-deployment.trigger";
74
+ CapabilityId["FLOW_DEPLOYMENT_WEBHOOK"] = "flow-deployment.webhook";
75
+ CapabilityId["FLOW_DEPLOYMENT_MESSAGE"] = "flow-deployment.message";
76
+ // Flow
77
+ CapabilityId["FLOW_READ"] = "flow.read";
78
+ CapabilityId["FLOW_CREATE"] = "flow.create";
79
+ CapabilityId["FLOW_UPDATE"] = "flow.update";
80
+ CapabilityId["FLOW_DELETE"] = "flow.delete";
81
+ // Flow functions
82
+ CapabilityId["FLOW_FUNCTION_READ"] = "flow-function.read";
83
+ CapabilityId["FLOW_FUNCTION_CREATE"] = "flow-function.create";
84
+ CapabilityId["FLOW_FUNCTION_UPDATE"] = "flow-function.update";
85
+ CapabilityId["FLOW_FUNCTION_DELETE"] = "flow-function.delete";
86
+ // Flow modules
87
+ CapabilityId["FLOW_MODULE_READ"] = "flow-module.read";
88
+ CapabilityId["FLOW_MODULE_CREATE"] = "flow-module.create";
89
+ CapabilityId["FLOW_MODULE_UPDATE"] = "flow-module.update";
90
+ CapabilityId["FLOW_MODULE_DELETE"] = "flow-module.delete";
91
+ // Flow studio (ui)
92
+ CapabilityId["FLOW_STUDIO"] = "flow-studio";
93
+ // Label
94
+ CapabilityId["LABEL_READ"] = "label.read";
95
+ CapabilityId["LABEL_CREATE"] = "label.create";
96
+ CapabilityId["LABEL_UPDATE"] = "label.update";
97
+ CapabilityId["LABEL_DELETE"] = "label.delete";
98
+ // Notification
99
+ CapabilityId["NOTIFICATION_READ"] = "notification.read";
100
+ CapabilityId["NOTIFICATION_CREATE"] = "notification.create";
101
+ CapabilityId["NOTIFICATION_UPDATE"] = "notification.update";
102
+ CapabilityId["NOTIFICATION_DELETE"] = "notification.delete";
103
+ CapabilityId["NOTIFICATION_VIEW"] = "notification.view";
104
+ // Object references
105
+ CapabilityId["OBJECT_REFERENCE_READ"] = "object-reference.read";
106
+ CapabilityId["OBJECT_REFERENCE_CREATE"] = "object-reference.create";
107
+ CapabilityId["OBJECT_REFERENCE_UPDATE"] = "object-reference.update";
108
+ CapabilityId["OBJECT_REFERENCE_DELETE"] = "object-reference.delete";
109
+ // Time series
110
+ CapabilityId["TIME_SERIES_READ"] = "time-series.read";
111
+ CapabilityId["TIME_SERIES_CREATE"] = "time-series.create";
112
+ CapabilityId["TIME_SERIES_UPDATE"] = "time-series.update";
113
+ CapabilityId["TIME_SERIES_DELETE"] = "time-series.delete";
114
+ CapabilityId["TIME_SERIES_MANAGER"] = "time-series-manager";
115
+ // Vault secrets
116
+ CapabilityId["VAULT_SECRET_READ"] = "vault-secret.read";
117
+ CapabilityId["VAULT_SECRET_CREATE"] = "vault-secret.create";
118
+ CapabilityId["VAULT_SECRET_UPDATE"] = "vault-secret.update";
119
+ CapabilityId["VAULT_SECRET_DELETE"] = "vault-secret.delete";
120
+ // Billing
121
+ CapabilityId["BILLING_READ"] = "billing.read";
122
+ // Organization
123
+ CapabilityId["ORGANIZATION_READ"] = "organization.read";
124
+ CapabilityId["ORGANIZATION_CREATE"] = "organization.create";
125
+ CapabilityId["ORGANIZATION_UPDATE"] = "organization.update";
126
+ CapabilityId["ORGANIZATION_DELETE"] = "organization.delete";
14
127
  // Organization capabilities
128
+ // TODO noch anpassen, wenn die Endpunkte kommen
129
+ CapabilityId["ORG_CAPABILITY_READ"] = "org-capability.read";
130
+ CapabilityId["ORG_CAPABILITY_BUNDLE_READ"] = "org-capability-bundle.read";
15
131
  CapabilityId["ORG_GROUP_READ"] = "org-group.read";
132
+ CapabilityId["ORG_GROUP_CREATE"] = "org-group.create";
16
133
  CapabilityId["ORG_GROUP_UPDATE"] = "org-group.update";
17
134
  CapabilityId["ORG_GROUP_DELETE"] = "org-group.delete";
18
- CapabilityId["ORG_GROUP_CREATE"] = "org-group.create";
19
135
  CapabilityId["ORG_GROUP_MEMBER_READ"] = "org-group-member.read";
136
+ CapabilityId["ORG_GROUP_MEMBER_CREATE"] = "org-group-member.create";
20
137
  CapabilityId["ORG_GROUP_MEMBER_UPDATE"] = "org-group-member.update";
21
138
  CapabilityId["ORG_GROUP_MEMBER_DELETE"] = "org-group-member.delete";
22
- CapabilityId["ORG_GROUP_MEMBER_CREATE"] = "org-group-member.create";
139
+ CapabilityId["ORG_GROUP_CAPABILITY_READ"] = "org-group-capability.read";
140
+ CapabilityId["ORG_GROUP_CAPABILITY_CREATE"] = "org-group-capability.create";
141
+ CapabilityId["ORG_GROUP_CAPABILITY_DELETE"] = "org-group-capability.delete";
142
+ CapabilityId["ORG_GROUP_CAPABILITY_BUNDLE_READ"] = "org-group-capability-bundle.read";
143
+ CapabilityId["ORG_GROUP_CAPABILITY_BUNDLE_CREATE"] = "org-group-capability-bundle.create";
144
+ CapabilityId["ORG_GROUP_CAPABILITY_BUNDLE_DELETE"] = "org-group-capability-bundle.delete";
23
145
  CapabilityId["ORG_SUBSCRIPTION_READ"] = "org-subscription.read";
146
+ CapabilityId["ORG_SUBSCRIPTION_CREATE"] = "org-subscription.create";
24
147
  CapabilityId["ORG_SUBSCRIPTION_UPDATE"] = "org-subscription.update";
25
148
  CapabilityId["ORG_SUBSCRIPTION_DELETE"] = "org-subscription.delete";
26
- CapabilityId["ORG_SUBSCRIPTION_CREATE"] = "org-subscription.create";
27
- // TODO: Add all other capabilities here as needed
28
149
  })(CapabilityId || (exports.CapabilityId = CapabilityId = {}));
29
150
  var CapabilityScope;
30
151
  (function (CapabilityScope) {
152
+ CapabilityScope["ADMINISTRATION"] = "administration";
153
+ // Services
154
+ CapabilityScope["ALERTS"] = "alerts";
155
+ CapabilityScope["ASSET_INTELLIGENCE"] = "asset-intelligence";
31
156
  CapabilityScope["ASSETS"] = "assets";
157
+ CapabilityScope["AUDIT"] = "audit";
158
+ CapabilityScope["CALENDAR"] = "calendar";
32
159
  CapabilityScope["CONTENTS"] = "contents";
33
- CapabilityScope["TIME_SERIES"] = "time-series";
34
- CapabilityScope["FLOWS"] = "flows";
160
+ CapabilityScope["CRM"] = "crm";
161
+ CapabilityScope["DATASPACE"] = "dataspace";
162
+ CapabilityScope["EDGE_DEVICES"] = "edge-devices";
35
163
  CapabilityScope["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
36
- // TODO: Add all other scopes here as needed
164
+ CapabilityScope["FLOWS"] = "flows";
165
+ CapabilityScope["LABELS"] = "labels";
166
+ CapabilityScope["NOTIFICATIONS"] = "notifications";
167
+ CapabilityScope["OBJECT_REFERENCES"] = "object-references";
168
+ CapabilityScope["TIME_SERIES"] = "time-series";
169
+ CapabilityScope["USER"] = "user";
170
+ CapabilityScope["VAULT"] = "vault";
37
171
  })(CapabilityScope || (exports.CapabilityScope = CapabilityScope = {}));
38
172
  var CapabilityType;
39
173
  (function (CapabilityType) {
40
174
  /**
41
- * UI capabilities are used to control access to user interface elements and features.
42
- * They are typically associated with roles that determine what a user can see and interact with in the application.
43
- * For example, a UI capability might allow a user to view a specific dashboard or access a particular section of the application.
175
+ * Admin capabilities are used to control access to administrative functions and settings within the application.
44
176
  */
45
- CapabilityType["UI"] = "ui";
177
+ CapabilityType["ADMINISTRATION"] = "administration";
46
178
  /**
47
179
  * Resource capabilities are used to control access to specific resources within the application.
48
180
  * They are typically associated with actions that can be performed on those resources, such as reading, updating, deleting, or creating them.
49
181
  * For example, a resource capability might allow a user to read data from a specific database table or update a particular record.
50
182
  */
51
183
  CapabilityType["RESOURCE"] = "resource";
184
+ /**
185
+ * UI capabilities are used to control access to user interface elements and features.
186
+ * They are typically associated with roles that determine what a user can see and interact with in the application.
187
+ * For example, a UI capability might allow a user to view a specific dashboard or access a particular section of the application.
188
+ */
189
+ CapabilityType["UI"] = "ui";
52
190
  /**
53
191
  * Feature capabilities are used to control access to specific features or functionalities within the application.
54
192
  * These capabilities although used as permissions to access certain feature resources, like asset types, ...
55
193
  */
56
194
  CapabilityType["FEATURE"] = "feature";
57
- /**
58
- * Admin capabilities are used to control access to administrative functions and settings within the application.
59
- */
60
- CapabilityType["ADMIN"] = "admin";
61
195
  })(CapabilityType || (exports.CapabilityType = CapabilityType = {}));
62
196
  var CapabilityAction;
63
197
  (function (CapabilityAction) {
@@ -1,10 +1,23 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText } from './localized-text.interface';
3
3
  export declare enum FeatureId {
4
- ASSETS = "assets",
4
+ ALERTS = "alerts",
5
5
  ASSET_MANAGER = "asset-manager",
6
+ ASSET_INTELLIGENCE = "asset-intelligence",
7
+ AUDIT = "audit",
8
+ CALENDAR = "calendar",
9
+ CONTENT_MANAGER = "content-manager",
10
+ CRM = "crm",
11
+ DATASPACE = "dataspace",
12
+ EDGE_DEVICES = "edge-devices",
6
13
  FLANGE_SKILL_CONTROL = "flange-skill-control",
7
- FLANGE_SKILL_CONTROL_UI = "flange-skill-control-ui",
14
+ FLOW_STUDIO = "flow-studio",
15
+ LABELS = "labels",
16
+ NOTIFICATIONS = "notifications",
17
+ OBJECT_REFERENCES = "object-references",
18
+ TIME_SERIES_MANAGER = "time-series-manager",
19
+ ORGANIZATIONS = "organizations",
20
+ VAULT = "vault",
8
21
  ORGANIZATION_MANAGEMENT = "organization-management",
9
22
  ORGANIZATION_MANAGEMENT_UI = "organization-management-ui",
10
23
  SUPERUSER = "superuser"
@@ -3,10 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FeatureId = void 0;
4
4
  var FeatureId;
5
5
  (function (FeatureId) {
6
- FeatureId["ASSETS"] = "assets";
6
+ // Alerts
7
+ FeatureId["ALERTS"] = "alerts";
8
+ // Assets
7
9
  FeatureId["ASSET_MANAGER"] = "asset-manager";
10
+ // Asset-Intelligence
11
+ FeatureId["ASSET_INTELLIGENCE"] = "asset-intelligence";
12
+ // Audit
13
+ FeatureId["AUDIT"] = "audit";
14
+ // Calendar
15
+ FeatureId["CALENDAR"] = "calendar";
16
+ // Contents
17
+ FeatureId["CONTENT_MANAGER"] = "content-manager";
18
+ // CRM
19
+ FeatureId["CRM"] = "crm";
20
+ // Dataspace
21
+ FeatureId["DATASPACE"] = "dataspace";
22
+ // Edge Devices
23
+ FeatureId["EDGE_DEVICES"] = "edge-devices";
24
+ // Flange Skill Control
8
25
  FeatureId["FLANGE_SKILL_CONTROL"] = "flange-skill-control";
9
- FeatureId["FLANGE_SKILL_CONTROL_UI"] = "flange-skill-control-ui";
26
+ // Flows
27
+ FeatureId["FLOW_STUDIO"] = "flow-studio";
28
+ // Labels
29
+ FeatureId["LABELS"] = "labels";
30
+ // Notifications
31
+ FeatureId["NOTIFICATIONS"] = "notifications";
32
+ // Object references
33
+ FeatureId["OBJECT_REFERENCES"] = "object-references";
34
+ // Time Series
35
+ FeatureId["TIME_SERIES_MANAGER"] = "time-series-manager";
36
+ // User
37
+ FeatureId["ORGANIZATIONS"] = "organizations";
38
+ // Vault
39
+ FeatureId["VAULT"] = "vault";
40
+ // Organization Management
10
41
  FeatureId["ORGANIZATION_MANAGEMENT"] = "organization-management";
11
42
  FeatureId["ORGANIZATION_MANAGEMENT_UI"] = "organization-management-ui";
12
43
  FeatureId["SUPERUSER"] = "superuser";
@@ -1,6 +1,7 @@
1
1
  import type { Audited } from './audited.interface';
2
2
  import type { LocalizedText } from './localized-text.interface';
3
3
  export declare enum PlanId {
4
+ DEVELOPER = "developer",
4
5
  DEFAULT = "default"
5
6
  }
6
7
  export interface CreatePlan {
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PlanId = void 0;
4
4
  var PlanId;
5
5
  (function (PlanId) {
6
+ PlanId["DEVELOPER"] = "developer";
6
7
  PlanId["DEFAULT"] = "default";
7
8
  })(PlanId || (exports.PlanId = PlanId = {}));
@@ -0,0 +1,138 @@
1
+ export type CrmAutonomyEntityType = 'company' | 'contact' | 'deal' | 'touchpoint';
2
+ export type CrmAutonomySource = 'assistant' | 'import' | 'outlook_mail' | 'outlook_calendar' | 'website_webform' | 'workflow';
3
+ export type CrmConfidenceLevel = 'high' | 'medium' | 'low';
4
+ export type CrmAutonomyDecision = 'execute' | 'needs_review' | 'reject';
5
+ export type CrmAutonomyOperationStatus = 'processing' | 'pending_review' | 'executed' | 'partially_executed' | 'rejected' | 'failed' | 'undoing' | 'undone';
6
+ export type CrmAutonomyReviewStatus = 'pending' | 'resolving' | 'rejected' | 'resolved';
7
+ export type CrmMutationOrigin = 'assistant_user_approved' | 'assistant_autonomous' | 'import' | 'outlook' | 'website_webform' | 'workflow';
8
+ export type CrmAutonomyPurpose = 'record_inbound_interaction' | 'create_contact' | 'create_sales_reminder' | 'abm_follow_up' | 'outbound_contact';
9
+ export interface CrmCandidateRelation {
10
+ type: string;
11
+ targetAssetId?: string;
12
+ targetCandidateId?: string;
13
+ }
14
+ export interface CrmAutonomyCandidateConfidence {
15
+ level: CrmConfidenceLevel;
16
+ score?: number;
17
+ reasons: string[];
18
+ }
19
+ export interface CrmAutonomyCandidate {
20
+ candidateId: string;
21
+ entityType: CrmAutonomyEntityType;
22
+ proposedAction: 'create' | 'update';
23
+ identityKey?: string;
24
+ targetAssetId?: string;
25
+ name?: string;
26
+ data: Record<string, unknown>;
27
+ parent?: string | null;
28
+ parentCandidateId?: string;
29
+ relations?: CrmCandidateRelation[];
30
+ source: CrmAutonomySource;
31
+ sourceId: string;
32
+ confidence: CrmAutonomyCandidateConfidence;
33
+ }
34
+ export interface CrmAutonomyTriggeredBy {
35
+ type: 'user' | 'process';
36
+ id: string;
37
+ }
38
+ export interface CrmAutonomyCandidateSubmissionRequest {
39
+ idempotencyKey: string;
40
+ source: CrmAutonomySource;
41
+ sourceId: string;
42
+ candidates: CrmAutonomyCandidate[];
43
+ correlationId?: string;
44
+ purpose?: CrmAutonomyPurpose;
45
+ }
46
+ export interface CrmAutonomyCandidateResult {
47
+ candidateId: string;
48
+ entityType: CrmAutonomyEntityType;
49
+ decision: CrmAutonomyDecision;
50
+ assetId?: string;
51
+ reviewItemId?: string;
52
+ appliedRule: string;
53
+ reasonCodes: string[];
54
+ undoable?: boolean;
55
+ merge?: CrmAutonomyMergeAudit;
56
+ }
57
+ export interface CrmAutonomyMergeAudit {
58
+ primaryAssetId: string;
59
+ mergedAssetIds: string[];
60
+ undoable: false;
61
+ }
62
+ export interface CrmAutonomyOperationSummary {
63
+ id: string;
64
+ ownerId: string;
65
+ source: CrmAutonomySource;
66
+ sourceId: string;
67
+ idempotencyKey: string;
68
+ payloadHash?: string;
69
+ correlationId?: string;
70
+ purpose?: CrmAutonomyPurpose;
71
+ status: CrmAutonomyOperationStatus;
72
+ triggeredBy: CrmAutonomyTriggeredBy;
73
+ policyVersion: string;
74
+ createdAssetIds: Record<string, string>;
75
+ candidateResults: CrmAutonomyCandidateResult[];
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ executedAt?: string;
79
+ finishedAt?: string;
80
+ error?: string;
81
+ failureCode?: string;
82
+ failureMessage?: string;
83
+ undoResult?: 'undone' | 'undo_conflict' | 'partially_undone';
84
+ undoProgress?: Record<string, string>;
85
+ }
86
+ export interface CrmAutonomyOperationDetail extends CrmAutonomyOperationSummary {
87
+ candidates: CrmAutonomyCandidate[];
88
+ beforeState?: Record<string, unknown>;
89
+ afterState?: Record<string, unknown>;
90
+ beforeRevision?: Record<string, number>;
91
+ afterRevision?: Record<string, number>;
92
+ reviewItems?: CrmAutonomyReviewItemSummary[];
93
+ }
94
+ export interface CrmAutonomyReviewItemSummary {
95
+ id: string;
96
+ ownerId: string;
97
+ operationId: string;
98
+ candidateId: string;
99
+ entityType: CrmAutonomyEntityType;
100
+ status: CrmAutonomyReviewStatus;
101
+ reviewType?: 'pre_execution' | 'contact_governance' | 'duplicate_merge';
102
+ purpose?: CrmAutonomyPurpose;
103
+ appliedRule: string;
104
+ reasonCodes: string[];
105
+ createdAssetId?: string;
106
+ duplicateGroups?: Array<{
107
+ groupId: string;
108
+ assetIds: string[];
109
+ }>;
110
+ createdAt: string;
111
+ updatedAt: string;
112
+ failureMessage?: string;
113
+ }
114
+ export interface CrmAutonomyReviewItemDetail extends CrmAutonomyReviewItemSummary {
115
+ candidate: CrmAutonomyCandidate;
116
+ reviewer?: CrmAutonomyTriggeredBy;
117
+ resolution?: {
118
+ decision: CrmAutonomyDecision;
119
+ note?: string;
120
+ approvalHash?: string;
121
+ reviewedAt: string;
122
+ };
123
+ }
124
+ export interface CrmAutonomySubmitCandidatesResponse {
125
+ operation: CrmAutonomyOperationSummary;
126
+ reviewItems: CrmAutonomyReviewItemSummary[];
127
+ }
128
+ export interface CrmAutonomyListOperationsResponse {
129
+ items: CrmAutonomyOperationSummary[];
130
+ }
131
+ export interface CrmAutonomyListReviewsResponse {
132
+ items: CrmAutonomyReviewItemSummary[];
133
+ }
134
+ export interface CrmAutonomyUndoResponse {
135
+ undone: boolean;
136
+ reason?: string;
137
+ operation: CrmAutonomyOperationSummary;
138
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -43,7 +43,7 @@ export type { Artifact, FileType, Storage, StorageProvider } from './storage.int
43
43
  export type { Assignee, Task } from './task.interface';
44
44
  export type { MostRecentTimeSeriesValueUpdate, Retention, SearchTimeSeriesResult, SelectedField, TimeSeries, TimeSeriesBucket, TimeseriesChange, TimeSeriesCondition, TimeseriesSubject, TimeSeriesValue, TS_GROUPS, } from './timeseries.interface';
45
45
  export type { Translation, TranslationData } from './translation.interface';
46
- export type { Application, Consent, Permission, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
46
+ export type { Consent, Permission, TableSetting, TableSettingProfile, UserSettings } from './user-settings.interface';
47
47
  export type { KVSecretVersion, VaultSecret } from './vault.interface';
48
48
  export { AgentId, AiAssistantId, AssistantMessageStatus, ATTACHMENT_CAPABLE_AGENT_IDS, AttachmentHandlingMode, AvailableLanguages, ErrorMessageType, FinishReason, HandOffTool, OneShotTaskId, ReferenceType, ReturnToReferrerTool, Role, ToolMessageStatus, ToolName, ToolType, } from './ai.interface';
49
49
  export { AlertLevel, AlertStatus, AlertType, DEFAULT_DEADMAN_CONDITION, DEFAULT_RELATIVE_CONDITION, DEFAULT_THRESHOLD_CONDITION, } from './alert.interface';
@@ -72,5 +72,6 @@ export { TranslationEditData } from './translation.interface';
72
72
  export { isAsset, isAssignee, isAuthor, isContent, isContentAnalysis, isEvent, isLogbookEntry, isOwner, isStorage, isTask, isUserMessage, } from './type-guards';
73
73
  export { SecretType } from './vault.interface';
74
74
  export { WebSocketMessageType } from './websockets.interface';
75
- export type { WebSocketError } from './websockets.interface';
75
+ export type { AiThreadListChangedEvent, WebSocketError } from './websockets.interface';
76
76
  export * from './authz';
77
+ export * from './crm-autonomy.interface';
@@ -120,3 +120,4 @@ Object.defineProperty(exports, "SecretType", { enumerable: true, get: function (
120
120
  var websockets_interface_1 = require("./websockets.interface");
121
121
  Object.defineProperty(exports, "WebSocketMessageType", { enumerable: true, get: function () { return websockets_interface_1.WebSocketMessageType; } });
122
122
  tslib_1.__exportStar(require("./authz"), exports);
123
+ tslib_1.__exportStar(require("./crm-autonomy.interface"), exports);
@@ -7,4 +7,5 @@ export interface DeleteAssetTypeQuery extends DeleteQuery {
7
7
  }
8
8
  export interface DeleteAssetQuery extends DeleteQuery {
9
9
  removeChildren?: boolean;
10
+ revision?: number;
10
11
  }
@@ -1,11 +1,6 @@
1
1
  import { Api } from './api.interface';
2
2
  export interface UserSettings extends Api {
3
- activeOrg?: string;
4
- activeTags?: string[];
5
- applications?: Application[];
6
3
  consent?: Consent;
7
- creationReadRoles?: Permission[];
8
- creationWriteRoles?: Permission[];
9
4
  deletionRequested?: boolean;
10
5
  favoriteLabelsOrder?: Record<string, number>;
11
6
  tableSettings?: TableSetting[];
@@ -15,11 +10,6 @@ export interface Consent {
15
10
  essential?: boolean;
16
11
  analytics?: boolean;
17
12
  }
18
- export interface Application {
19
- name: string;
20
- currentColumnSettings?: string;
21
- columnSettings?: string[];
22
- }
23
13
  export interface Permission {
24
14
  label: string;
25
15
  value: string;
@@ -5,6 +5,7 @@ export interface WebSocketError {
5
5
  retryable: boolean;
6
6
  }
7
7
  export declare enum WebSocketMessageType {
8
+ AI_THREAD_LIST_CHANGED = "ai_thread_list_changed",
8
9
  AI_ABORTED = "ai_aborted",
9
10
  AI_ABORTING = "ai_aborting",
10
11
  AI_ABORT_FAILED = "ai_abort_failed",
@@ -15,3 +16,8 @@ export declare enum WebSocketMessageType {
15
16
  AI_PARTIAL_MESSAGE = "ai_partial_message",
16
17
  AI_PROCESSING = "ai_processing"
17
18
  }
19
+ /** A notification that the current user's non-ephemeral thread list changed. */
20
+ export interface AiThreadListChangedEvent {
21
+ threadId: string;
22
+ reason: 'created' | 'deleted';
23
+ }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebSocketMessageType = void 0;
4
4
  var WebSocketMessageType;
5
5
  (function (WebSocketMessageType) {
6
+ WebSocketMessageType["AI_THREAD_LIST_CHANGED"] = "ai_thread_list_changed";
6
7
  WebSocketMessageType["AI_ABORTED"] = "ai_aborted";
7
8
  WebSocketMessageType["AI_ABORTING"] = "ai_aborting";
8
9
  WebSocketMessageType["AI_ABORT_FAILED"] = "ai_abort_failed";
@@ -1,5 +1,5 @@
1
1
  import { API } from '../api';
2
- import { Artifact, Asset, AssetRevision, AssetType, Content, Endpoint, Event, FlowDeployment, FlowDiagram, FlowDto, FlowFunctionDto, FlowFunctionRevision, FlowModule, FlowRevision, Label, LogbookEntry, Notification, ObjectReference, Organization, Secret, Task, TimeSeries, TimeSeriesValue, Translation, VaultSecret } from '../interfaces';
2
+ import { Artifact, Asset, AssetRevision, AssetType, Content, Endpoint, Event, FlowDeployment, FlowDiagram, FlowDto, FlowFunctionDto, FlowFunctionRevision, FlowModule, FlowRevision, Label, LogbookEntry, Notification, ObjectReference, Organization, Secret, Task, TimeSeries, TimeSeriesValue, Translation, UserSettings, VaultSecret } from '../interfaces';
3
3
  import { AiMockService } from './ai.mock.service';
4
4
  import { AlertMockService } from './alert.mock.service';
5
5
  import { AssetMockService } from './asset.mock.service';
@@ -131,4 +131,5 @@ export type OrganizationInit = AtLeast<Organization, 'id' | 'name'>;
131
131
  export type ObjectReferenceInit = AtLeast<ObjectReference, 'id' | 'src' | 'tgt' | 'srcType' | 'tgtType' | 'relType'>;
132
132
  export interface UserInit {
133
133
  roles: string[];
134
+ settings?: UserSettings;
134
135
  }
@@ -7,28 +7,28 @@ import { ShareMockService } from './share.mock.service';
7
7
  type ExtendedFlowModule = Replace<FlowModule, 'artifacts', Array<Artifact & {
8
8
  path: string;
9
9
  }>>;
10
- declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
10
+ declare const BaseService_base: import("ts-mixer/dist/types/types").Class<any[], DataMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
11
11
  artifacts: (Artifact & {
12
12
  path: string;
13
13
  })[];
14
- }>> & ShareMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
14
+ }>> & ShareMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
15
15
  artifacts: (Artifact & {
16
16
  path: string;
17
17
  })[];
18
- }>>, (abstract new (data?: import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
18
+ }>>, (abstract new (data?: import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
19
19
  artifacts: (Artifact & {
20
20
  path: string;
21
21
  })[];
22
- }>[]) => DataMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
22
+ }>[]) => DataMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
23
23
  artifacts: (Artifact & {
24
24
  path: string;
25
25
  })[];
26
26
  }>>) & {
27
- new (data?: import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
27
+ new (data?: import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
28
28
  artifacts: (Artifact & {
29
29
  path: string;
30
30
  })[];
31
- }>[]): ShareMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "author" | "revision" | "functions"> & {
31
+ }>[]): ShareMockService<import("./api.mock").Identity<Pick<FlowModule, "id" | "name" | "description" | "owner" | "createdAt" | "createdBy" | "updatedAt" | "updatedBy" | "tags" | "readPermissions" | "readWritePermissions" | "deletedAt" | "revision" | "author" | "functions"> & {
32
32
  artifacts: (Artifact & {
33
33
  path: string;
34
34
  })[];
@@ -1,7 +1,12 @@
1
+ import { TokenOption, UserSettings } from '../interfaces';
1
2
  import { UserService } from '../services';
2
3
  import type { UserInit } from './api.mock';
3
4
  export declare class UserMockService extends UserService {
4
5
  private users;
5
6
  constructor(users: UserInit);
6
7
  getCurrentUserRoles(): Promise<string[]>;
8
+ getUserSettings(options?: TokenOption): Promise<UserSettings>;
9
+ updateUserSettings(settings: UserSettings, options?: TokenOption): Promise<UserSettings>;
10
+ deleteUserSettings(options?: TokenOption): Promise<UserSettings>;
11
+ requestDeletion(options?: TokenOption): Promise<void>;
7
12
  }
@@ -10,5 +10,25 @@ class UserMockService extends services_1.UserService {
10
10
  getCurrentUserRoles() {
11
11
  return Promise.resolve(this.users.roles);
12
12
  }
13
+ getUserSettings(options = {}) {
14
+ return Promise.resolve(this.users.settings ?? {});
15
+ }
16
+ updateUserSettings(settings, options = {}) {
17
+ var _a;
18
+ (_a = this.users).settings ?? (_a.settings = {});
19
+ Object.assign(this.users.settings, settings);
20
+ return Promise.resolve(this.users.settings);
21
+ }
22
+ deleteUserSettings(options = {}) {
23
+ const tmp = this.users.settings;
24
+ this.users.settings = {};
25
+ return Promise.resolve(tmp ?? {});
26
+ }
27
+ requestDeletion(options = {}) {
28
+ var _a;
29
+ (_a = this.users).settings ?? (_a.settings = {});
30
+ this.users.settings.deletionRequested = true;
31
+ return Promise.resolve();
32
+ }
13
33
  }
14
34
  exports.UserMockService = UserMockService;
@@ -8,4 +8,5 @@ export declare class UserService {
8
8
  getUserSettings(options?: TokenOption): Promise<UserSettings>;
9
9
  updateUserSettings(settings: UserSettings, options?: TokenOption): Promise<UserSettings>;
10
10
  deleteUserSettings(options?: TokenOption): Promise<UserSettings>;
11
+ requestDeletion(options?: TokenOption): Promise<void>;
11
12
  }
@@ -26,5 +26,8 @@ class UserService {
26
26
  deleteUserSettings(options = {}) {
27
27
  return this.httpClient.delete(this.basePath, options);
28
28
  }
29
+ requestDeletion(options = {}) {
30
+ return this.httpClient.put(`${this.basePath}/request-deletion`, {}, options);
31
+ }
29
32
  }
30
33
  exports.UserService = UserService;