@hahnpro/hpc-api 2026.4.3 → 2026.4.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.
Files changed (41) hide show
  1. package/package.json +1 -1
  2. package/src/lib/interfaces/alert.interface.d.ts +0 -4
  3. package/src/lib/interfaces/asset.interface.d.ts +18 -3
  4. package/src/lib/interfaces/audit.interface.d.ts +19 -0
  5. package/src/lib/interfaces/audit.interface.js +2 -0
  6. package/src/lib/interfaces/billing.interface.d.ts +72 -0
  7. package/src/lib/interfaces/billing.interface.js +15 -0
  8. package/src/lib/interfaces/content.interface.d.ts +32 -1
  9. package/src/lib/interfaces/content.interface.js +9 -1
  10. package/src/lib/interfaces/edge-device.interface.d.ts +28 -0
  11. package/src/lib/interfaces/edge-device.interface.js +2 -0
  12. package/src/lib/interfaces/event.interface.d.ts +16 -7
  13. package/src/lib/interfaces/event.interface.js +27 -8
  14. package/src/lib/interfaces/index.d.ts +27 -13
  15. package/src/lib/interfaces/index.js +42 -7
  16. package/src/lib/interfaces/label.interface.d.ts +4 -4
  17. package/src/lib/interfaces/marketplace.interface.d.ts +82 -0
  18. package/src/lib/interfaces/marketplace.interface.js +12 -0
  19. package/src/lib/interfaces/nats.interface.d.ts +57 -0
  20. package/src/lib/interfaces/nats.interface.js +60 -0
  21. package/src/lib/interfaces/organization.interface.d.ts +0 -1
  22. package/src/lib/interfaces/reference.interface.d.ts +1 -2
  23. package/src/lib/interfaces/reference.interface.js +0 -1
  24. package/src/lib/interfaces/resource.interface.d.ts +27 -1
  25. package/src/lib/interfaces/resource.interface.js +23 -1
  26. package/src/lib/interfaces/role.interface.d.ts +13 -0
  27. package/src/lib/interfaces/role.interface.js +2 -0
  28. package/src/lib/interfaces/schema.interface.d.ts +4 -0
  29. package/src/lib/interfaces/search.interface.d.ts +4 -0
  30. package/src/lib/interfaces/task.interface.d.ts +1 -4
  31. package/src/lib/interfaces/task.interface.js +0 -3
  32. package/src/lib/interfaces/timeseries.interface.d.ts +8 -2
  33. package/src/lib/interfaces/translation.interface.d.ts +14 -0
  34. package/src/lib/interfaces/translation.interface.js +6 -0
  35. package/src/lib/interfaces/type-guards.d.ts +17 -0
  36. package/src/lib/interfaces/type-guards.js +203 -0
  37. package/src/lib/interfaces/user-settings.interface.d.ts +15 -10
  38. package/src/lib/interfaces/vault.interface.d.ts +11 -0
  39. package/src/lib/interfaces/vault.interface.js +6 -0
  40. package/src/lib/interfaces/websockets.interface.d.ts +11 -0
  41. package/src/lib/interfaces/websockets.interface.js +15 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionType = void 0;
4
+ var SubscriptionType;
5
+ (function (SubscriptionType) {
6
+ SubscriptionType["AZURE"] = "azure";
7
+ SubscriptionType["DEV"] = "dev";
8
+ SubscriptionType["FREE"] = "free";
9
+ SubscriptionType["INACTIVE"] = "inactive";
10
+ SubscriptionType["PRO"] = "pro";
11
+ SubscriptionType["UNKNOWN"] = "unknown";
12
+ })(SubscriptionType || (exports.SubscriptionType = SubscriptionType = {}));
@@ -0,0 +1,57 @@
1
+ export declare const NatsStreams: {
2
+ readonly Resource: "resource";
3
+ readonly Flows: "flows";
4
+ readonly Audit: "audit";
5
+ };
6
+ export declare const NatsConsumers: {
7
+ readonly resource: {
8
+ readonly AttachmentRemover: "attachment-remover";
9
+ readonly Billing: "billing";
10
+ readonly ContentAnalyzer: "content-analyzer";
11
+ readonly ContentIndexer: "content-indexer";
12
+ readonly ContentDeindexer: "content-deindexer";
13
+ readonly ContentAnalysis: {
14
+ readonly AssetsReferencesResolver: "content-analysis-assets-references-resolver";
15
+ readonly ContentTrashed: "content-trashed";
16
+ readonly ContentRestored: "content-restored";
17
+ };
18
+ readonly EventEmbedding: "event-embedding";
19
+ readonly FavoriteLabelRemover: "favorite-label-remover";
20
+ readonly AlertService: {
21
+ readonly AlertReferencesResolver: "alerts-srv-alert-references-resolver";
22
+ readonly RuleReferencesResolver: "alerts-srv-rule-references-resolver";
23
+ readonly TimeSeriesData: "alerts-srv-time-series-data";
24
+ };
25
+ readonly CalendarService: {
26
+ readonly EventReferencesResolver: "calendar-srv-event-references-resolver";
27
+ readonly TaskReferencesResolver: "calendar-srv-task-references-resolver";
28
+ };
29
+ readonly AssetService: {
30
+ readonly AssetsReferencesResolver: "asset-srv-assets-references-resolver";
31
+ readonly AssetTypesReferencesResolver: "asset-srv-asset-types-references-resolver";
32
+ };
33
+ readonly TimeSeriesService: {
34
+ readonly AssetsReferencesResolver: "timeseries-srv-assets-references-resolver";
35
+ readonly TimeSeriesReferencesResolver: "timeseries-srv-timeseries-references-resolver";
36
+ };
37
+ readonly ReferenceService: {
38
+ readonly ReferencedObjectsUpdated: "referenced-objects-updated";
39
+ readonly ReferenceObjectDeleted: "reference-object-deleted";
40
+ readonly ReferenceTargetTrashed: "reference-target-trashed";
41
+ readonly ReferenceTargetRestored: "reference-target-restored";
42
+ readonly ReferenceCreateCommand: "reference-create-command";
43
+ };
44
+ };
45
+ readonly flows: {
46
+ readonly FlowDeploymentTrigger: "flow-deployment-trigger";
47
+ readonly FlowDeploymentDeploy: "flow-deployment-deploy";
48
+ readonly FlowDeploymentHealth: "flow-deployment-health";
49
+ readonly FlowDeploymentLogs: "flow-deployment-logs";
50
+ readonly FlowExecutorEvents: "flow-executor-events";
51
+ };
52
+ readonly audit: {
53
+ readonly AuditLogger: "audit-logger";
54
+ };
55
+ };
56
+ export declare const natsHpcPrefix = "com.hahnpro";
57
+ export declare const natsFlowsPrefix = "fs";
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.natsFlowsPrefix = exports.natsHpcPrefix = exports.NatsConsumers = exports.NatsStreams = void 0;
4
+ exports.NatsStreams = {
5
+ Resource: 'resource',
6
+ Flows: 'flows',
7
+ Audit: 'audit',
8
+ };
9
+ exports.NatsConsumers = {
10
+ [exports.NatsStreams.Resource]: {
11
+ AttachmentRemover: 'attachment-remover',
12
+ Billing: 'billing',
13
+ ContentAnalyzer: 'content-analyzer',
14
+ ContentIndexer: 'content-indexer',
15
+ ContentDeindexer: 'content-deindexer',
16
+ ContentAnalysis: {
17
+ AssetsReferencesResolver: 'content-analysis-assets-references-resolver',
18
+ ContentTrashed: 'content-trashed',
19
+ ContentRestored: 'content-restored',
20
+ },
21
+ EventEmbedding: 'event-embedding',
22
+ FavoriteLabelRemover: 'favorite-label-remover',
23
+ AlertService: {
24
+ AlertReferencesResolver: 'alerts-srv-alert-references-resolver',
25
+ RuleReferencesResolver: 'alerts-srv-rule-references-resolver',
26
+ TimeSeriesData: 'alerts-srv-time-series-data',
27
+ },
28
+ CalendarService: {
29
+ EventReferencesResolver: 'calendar-srv-event-references-resolver',
30
+ TaskReferencesResolver: 'calendar-srv-task-references-resolver',
31
+ },
32
+ AssetService: {
33
+ AssetsReferencesResolver: 'asset-srv-assets-references-resolver',
34
+ AssetTypesReferencesResolver: 'asset-srv-asset-types-references-resolver',
35
+ },
36
+ TimeSeriesService: {
37
+ AssetsReferencesResolver: 'timeseries-srv-assets-references-resolver',
38
+ TimeSeriesReferencesResolver: 'timeseries-srv-timeseries-references-resolver',
39
+ },
40
+ ReferenceService: {
41
+ ReferencedObjectsUpdated: 'referenced-objects-updated',
42
+ ReferenceObjectDeleted: 'reference-object-deleted',
43
+ ReferenceTargetTrashed: 'reference-target-trashed',
44
+ ReferenceTargetRestored: 'reference-target-restored',
45
+ ReferenceCreateCommand: 'reference-create-command',
46
+ },
47
+ },
48
+ [exports.NatsStreams.Flows]: {
49
+ FlowDeploymentTrigger: 'flow-deployment-trigger',
50
+ FlowDeploymentDeploy: 'flow-deployment-deploy',
51
+ FlowDeploymentHealth: 'flow-deployment-health',
52
+ FlowDeploymentLogs: 'flow-deployment-logs',
53
+ FlowExecutorEvents: 'flow-executor-events',
54
+ },
55
+ [exports.NatsStreams.Audit]: {
56
+ AuditLogger: 'audit-logger',
57
+ },
58
+ };
59
+ exports.natsHpcPrefix = 'com.hahnpro';
60
+ exports.natsFlowsPrefix = 'fs';
@@ -73,7 +73,6 @@ export interface UserWithOrgRoles {
73
73
  username: string;
74
74
  orgRoles: string[];
75
75
  }
76
- export type SubscriptionType = 'dev' | 'free' | 'inactive' | 'pro';
77
76
  export declare enum OrganizationMembersInviteOrAdd {
78
77
  INVITE = "invite",
79
78
  ADD = "add"
@@ -16,8 +16,7 @@ export declare enum ObjectReferenceType {
16
16
  /**
17
17
  * Marks an Object as being part of the 'Weber Engineering - Flange Skill Control' to link the assets
18
18
  */
19
- FLANGE_SKILL_CONTROL_EXAMINEE_BOOKED_TIME_SLOT_IN_EXAMINATION = "flange_skill_control_examinee_booked_time_slot_in_examination",
20
- FLANGE_SKILL_CONTROL_EXAMINATION_BOOKED_TIME_SLOT = "flange_skill_control_examination_booked_time_slot"
19
+ FLANGE_SKILL_CONTROL_EXAMINEE_BOOKED_TIME_SLOT_IN_EXAMINATION = "flange_skill_control_examinee_booked_time_slot_in_examination"
21
20
  }
22
21
  export interface ObjectReference {
23
22
  id: number;
@@ -21,5 +21,4 @@ var ObjectReferenceType;
21
21
  * Marks an Object as being part of the 'Weber Engineering - Flange Skill Control' to link the assets
22
22
  */
23
23
  ObjectReferenceType["FLANGE_SKILL_CONTROL_EXAMINEE_BOOKED_TIME_SLOT_IN_EXAMINATION"] = "flange_skill_control_examinee_booked_time_slot_in_examination";
24
- ObjectReferenceType["FLANGE_SKILL_CONTROL_EXAMINATION_BOOKED_TIME_SLOT"] = "flange_skill_control_examination_booked_time_slot";
25
24
  })(ObjectReferenceType || (exports.ObjectReferenceType = ObjectReferenceType = {}));
@@ -1,4 +1,4 @@
1
- import type { Api } from './api.interface';
1
+ import type { Api, ObjectIdLike } from './api.interface';
2
2
  import { Author } from './author.interface';
3
3
  import { Owner } from './owner.interface';
4
4
  export declare enum ResourceType {
@@ -39,11 +39,26 @@ export declare enum ResourceApiPath {
39
39
  TASK = "tasks"
40
40
  }
41
41
  export declare const resourceApiPathToTypeMap: Record<ResourceApiPath, ResourceType>;
42
+ export declare enum EventType {
43
+ CREATED = "created",
44
+ UPDATED = "updated",
45
+ DELETED = "deleted",
46
+ TRASHED = "trashed",
47
+ RESTORED = "restored"
48
+ }
49
+ export declare enum CommandType {
50
+ CREATE = "create",
51
+ UPDATE = "update",
52
+ DELETE = "delete"
53
+ }
42
54
  export interface ResourceReference {
43
55
  id: string;
44
56
  resourceType: ResourceType;
45
57
  dependent?: boolean;
46
58
  }
59
+ export type ResolvedResourceReference = ResourceReference & Resource & {
60
+ id: string;
61
+ };
47
62
  export interface Resource {
48
63
  id?: string;
49
64
  name: string;
@@ -96,3 +111,14 @@ export interface ConnectedResourceItemArray {
96
111
  export type ConnectedResourceType = ResourceType.ASSET | ResourceType.ASSETTYPE | ResourceType.CONTENT | ResourceType.NOTIFICATIONENDPOINT | ResourceType.TIMESERIES | ResourceType.FLOW | ResourceType.FLOWMODULE | ResourceType.FLOWFUNCTION | ResourceType.FLOWDEPLOYMENT | ResourceType.EVENT | ResourceType.TASK;
97
112
  export type ConnectedResources = Partial<Record<ConnectedResourceType, ConnectedResourceItemArray>>;
98
113
  export type SharedResources = Partial<Record<ConnectedResourceType, string[]>>;
114
+ export interface Rollback<T> {
115
+ doc: T;
116
+ omitted: Partial<T>;
117
+ }
118
+ export declare function isPopulated<T extends {
119
+ id?: string;
120
+ }>(value: string | ObjectIdLike | T): value is T;
121
+ export declare function arePopulated<T extends Resource>(value: Array<string | ObjectIdLike | T>): value is T[];
122
+ export type Populated<M, K extends keyof M> = Omit<M, K> & {
123
+ [P in K]: Exclude<M[P], string | ObjectIdLike>;
124
+ };
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PermissionType = exports.ResourceClass = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = void 0;
3
+ exports.PermissionType = exports.ResourceClass = exports.CommandType = exports.EventType = exports.resourceApiPathToTypeMap = exports.ResourceApiPath = exports.ResourceType = void 0;
4
+ exports.isPopulated = isPopulated;
5
+ exports.arePopulated = arePopulated;
4
6
  var ResourceType;
5
7
  (function (ResourceType) {
6
8
  ResourceType["ALERT"] = "alert";
@@ -57,6 +59,20 @@ exports.resourceApiPathToTypeMap = {
57
59
  [ResourceApiPath.TIMESERIES]: ResourceType.TIMESERIES,
58
60
  [ResourceApiPath.TASK]: ResourceType.TASK,
59
61
  };
62
+ var EventType;
63
+ (function (EventType) {
64
+ EventType["CREATED"] = "created";
65
+ EventType["UPDATED"] = "updated";
66
+ EventType["DELETED"] = "deleted";
67
+ EventType["TRASHED"] = "trashed";
68
+ EventType["RESTORED"] = "restored";
69
+ })(EventType || (exports.EventType = EventType = {}));
70
+ var CommandType;
71
+ (function (CommandType) {
72
+ CommandType["CREATE"] = "create";
73
+ CommandType["UPDATE"] = "update";
74
+ CommandType["DELETE"] = "delete";
75
+ })(CommandType || (exports.CommandType = CommandType = {}));
60
76
  class ResourceClass {
61
77
  }
62
78
  exports.ResourceClass = ResourceClass;
@@ -66,3 +82,9 @@ var PermissionType;
66
82
  PermissionType["READWRITE"] = "read_write";
67
83
  PermissionType["NONE"] = "none";
68
84
  })(PermissionType || (exports.PermissionType = PermissionType = {}));
85
+ function isPopulated(value) {
86
+ return value.id !== undefined && typeof value.id === 'string';
87
+ }
88
+ function arePopulated(value) {
89
+ return Array.isArray(value) && value.length > 0 && value[0].id !== undefined;
90
+ }
@@ -0,0 +1,13 @@
1
+ export interface RoleRepresentation {
2
+ id?: string;
3
+ name?: string;
4
+ description?: string;
5
+ composite?: boolean;
6
+ composites?: {
7
+ realm?: string[];
8
+ client?: Record<string, string[]>;
9
+ };
10
+ clientRole?: boolean;
11
+ containerId?: string;
12
+ attributes?: Record<string, string[]>;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,9 @@ export type JsonSchemaType = string | number | boolean | {
7
7
  [key: string]: JsonSchemaType;
8
8
  } | JsonSchemaArray | null;
9
9
  export type JsonSchemaArray = Array<JsonSchemaType>;
10
+ export type JsonSchemaData = {
11
+ [key: string]: JsonSchemaType;
12
+ };
10
13
  export interface JsonSchema {
11
14
  default?: JsonSchemaType;
12
15
  description?: string;
@@ -15,4 +18,5 @@ export interface JsonSchema {
15
18
  required?: boolean | string[];
16
19
  title?: string;
17
20
  type?: JsonSchemaTypeName | JsonSchemaTypeName[];
21
+ enum?: (number | string)[];
18
22
  }
@@ -22,6 +22,10 @@ export interface SearchMatchReasonContentPart {
22
22
  text: string;
23
23
  isHighlighted: boolean;
24
24
  }
25
+ export interface SearchResultItem {
26
+ id: string;
27
+ name: string;
28
+ }
25
29
  export interface SearchResult<T extends {
26
30
  id?: string;
27
31
  } = any, K extends keyof T & string = keyof T & string> {
@@ -14,10 +14,7 @@ export declare enum TaskStatus {
14
14
  ACCEPTED = "ACCEPTED",
15
15
  SOLVED = "SOLVED",
16
16
  EXPIRED = "EXPIRED",
17
- UNKNOWN = "UNKNOWN",
18
- IN_PROGRESS = "IN PROGRESS",
19
- TODO = "TODO",
20
- DONE = "DONE"
17
+ IN_PROGRESS = "IN PROGRESS"
21
18
  }
22
19
  export declare enum Priority {
23
20
  LOW = "LOW",
@@ -14,10 +14,7 @@ var TaskStatus;
14
14
  TaskStatus["ACCEPTED"] = "ACCEPTED";
15
15
  TaskStatus["SOLVED"] = "SOLVED";
16
16
  TaskStatus["EXPIRED"] = "EXPIRED";
17
- TaskStatus["UNKNOWN"] = "UNKNOWN";
18
17
  TaskStatus["IN_PROGRESS"] = "IN PROGRESS";
19
- TaskStatus["TODO"] = "TODO";
20
- TaskStatus["DONE"] = "DONE";
21
18
  })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
22
19
  var Priority;
23
20
  (function (Priority) {
@@ -1,5 +1,6 @@
1
- import { Author } from './author.interface';
2
- import { Owner } from './owner.interface';
1
+ import type { Change, ChangeSubject } from './api.interface';
2
+ import type { Author } from './author.interface';
3
+ import type { Owner } from './owner.interface';
3
4
  export interface TimeSeries {
4
5
  id?: string;
5
6
  name: string;
@@ -65,3 +66,8 @@ export interface SearchTimeSeriesResult extends Record<string, any> {
65
66
  export type TS_GROUPS = 'none' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '3h' | '6h' | '12h' | '1d' | '7d';
66
67
  export type Retention = 'always' | '1h' | '3h' | '6h' | '12h' | '24h' | '48h' | '72h' | '7d' | '14d' | '30d' | '90d' | '180d';
67
68
  export declare const RETENTION_VALUES: string[];
69
+ export type TimeseriesSubject = ChangeSubject | 'assetRef' | 'maxBucketTimeRange';
70
+ export interface TimeseriesChange extends Change {
71
+ subject: TimeseriesSubject;
72
+ value: string;
73
+ }
@@ -0,0 +1,14 @@
1
+ export interface Translation {
2
+ de: TranslationData;
3
+ en: TranslationData;
4
+ readPermissions?: string[];
5
+ readWritePermissions?: string[];
6
+ }
7
+ export interface TranslationData {
8
+ name?: string;
9
+ [propertyName: string]: string;
10
+ }
11
+ export declare class TranslationEditData {
12
+ de: string;
13
+ en: string;
14
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TranslationEditData = void 0;
4
+ class TranslationEditData {
5
+ }
6
+ exports.TranslationEditData = TranslationEditData;
@@ -0,0 +1,17 @@
1
+ import type { Asset } from './asset.interface';
2
+ import type { Author } from './author.interface';
3
+ import type { Content, ContentAnalysis } from './content.interface';
4
+ import { type Event } from './event.interface';
5
+ import { type Owner } from './owner.interface';
6
+ import type { Storage } from './storage.interface';
7
+ import { type Assignee, type LogbookEntry, type Task } from './task.interface';
8
+ export declare function isAuthor(value: unknown): value is Author;
9
+ export declare function isOwner(value: unknown): value is Owner;
10
+ export declare function isStorage(value: unknown): value is Storage;
11
+ export declare function isContentAnalysis(value: unknown): value is ContentAnalysis;
12
+ export declare function isAsset(value: unknown): value is Asset;
13
+ export declare function isContent(value: unknown): value is Content;
14
+ export declare function isEvent(value: unknown): value is Event;
15
+ export declare function isAssignee(value: unknown): value is Assignee;
16
+ export declare function isLogbookEntry(value: unknown): value is LogbookEntry;
17
+ export declare function isTask(value: unknown): value is Task;
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAuthor = isAuthor;
4
+ exports.isOwner = isOwner;
5
+ exports.isStorage = isStorage;
6
+ exports.isContentAnalysis = isContentAnalysis;
7
+ exports.isAsset = isAsset;
8
+ exports.isContent = isContent;
9
+ exports.isEvent = isEvent;
10
+ exports.isAssignee = isAssignee;
11
+ exports.isLogbookEntry = isLogbookEntry;
12
+ exports.isTask = isTask;
13
+ const event_interface_1 = require("./event.interface");
14
+ const owner_interface_1 = require("./owner.interface");
15
+ const task_interface_1 = require("./task.interface");
16
+ function isRecord(value) {
17
+ return typeof value === 'object' && value !== null;
18
+ }
19
+ const isString = (value) => typeof value === 'string';
20
+ const isNumber = (value) => typeof value === 'number';
21
+ const isDate = (value) => value instanceof Date;
22
+ const isOptional = (value, predicate) => value === undefined || predicate(value);
23
+ const isOptionalString = (value) => isOptional(value, isString);
24
+ const isOptionalNumber = (value) => isOptional(value, isNumber);
25
+ const isOptionalDateOrString = (value) => value === undefined || isDate(value) || isString(value);
26
+ const isArrayOf = (value, predicate) => Array.isArray(value) && value.every(predicate);
27
+ const isOptionalArrayOf = (value, predicate) => value === undefined || isArrayOf(value, predicate);
28
+ const isStringArray = (value) => isArrayOf(value, isString);
29
+ const isOptionalStringArray = (value) => isOptionalArrayOf(value, isString);
30
+ const isOneOf = (value, allowed) => allowed.includes(value);
31
+ const isEnumValue = (target, value) => Object.values(target).includes(value);
32
+ const hasPermissions = (value) => isStringArray(value.readPermissions) && isStringArray(value.readWritePermissions);
33
+ const hasResourceMeta = (value, options) => {
34
+ const { owner, author, date } = options;
35
+ if (owner && value.owner !== undefined && !owner(value.owner)) {
36
+ return false;
37
+ }
38
+ if (author && value.createdBy !== undefined && !author(value.createdBy)) {
39
+ return false;
40
+ }
41
+ if (author && value.updatedBy !== undefined && !author(value.updatedBy)) {
42
+ return false;
43
+ }
44
+ if (date && value.createdAt !== undefined && !date(value.createdAt)) {
45
+ return false;
46
+ }
47
+ if (date && value.updatedAt !== undefined && !date(value.updatedAt)) {
48
+ return false;
49
+ }
50
+ if (date && value.deletedAt !== undefined && !date(value.deletedAt)) {
51
+ return false;
52
+ }
53
+ return true;
54
+ };
55
+ function isAuthor(value) {
56
+ if (!isRecord(value) || !isString(value.id)) {
57
+ return false;
58
+ }
59
+ return isOptionalString(value.username) && isOptionalString(value.impersonatorId) && isOptionalString(value.impersonatorUsername);
60
+ }
61
+ function isOwner(value) {
62
+ if (!isRecord(value) || !isString(value.id)) {
63
+ return false;
64
+ }
65
+ return isEnumValue(owner_interface_1.OwnerType, value.type) && isOptionalString(value.name);
66
+ }
67
+ function isStorage(value) {
68
+ if (!isRecord(value)) {
69
+ return false;
70
+ }
71
+ return (isString(value.id) &&
72
+ isString(value.filename) &&
73
+ isString(value.mimetype) &&
74
+ isNumber(value.size) &&
75
+ isString(value.createdAt) &&
76
+ isOneOf(value.provider, [undefined, 's3', 'mongo']) &&
77
+ isOneOf(value.type, [undefined, 'original', 'preview-sm', 'preview-md', 'preview-lg', 'preview-xl']) &&
78
+ isOptionalString(value.md5));
79
+ }
80
+ function isContentAnalysis(value) {
81
+ if (!isRecord(value)) {
82
+ return false;
83
+ }
84
+ return (isString(value.id) &&
85
+ isString(value.contentId) &&
86
+ isString(value.status) &&
87
+ isOptionalString(value.error) &&
88
+ isOptionalString(value.text) &&
89
+ isOptionalArrayOf(value.pages, (page) => isRecord(page) && isNumber(page.pageNumber) && isOptionalString(page.text)));
90
+ }
91
+ function isAsset(value) {
92
+ if (!isRecord(value)) {
93
+ return false;
94
+ }
95
+ return (isString(value.id) &&
96
+ isOptionalString(value.translationId) &&
97
+ isString(value.name) &&
98
+ isOptionalString(value.description) &&
99
+ hasPermissions(value) &&
100
+ isString(value.type) &&
101
+ isOptionalString(value.type$name) &&
102
+ isOptionalStringArray(value.tags) &&
103
+ isOptionalString(value.parent) &&
104
+ isOptionalString(value.parent$name) &&
105
+ isOptionalStringArray(value.attachments) &&
106
+ isOptionalStringArray(value.notificationEndpoints) &&
107
+ isOptionalStringArray(value.aliases) &&
108
+ isOptional(value.data, isRecord) &&
109
+ isOptional(value.timeseries, isRecord) &&
110
+ isOptional(value.event, isRecord) &&
111
+ hasResourceMeta(value, { owner: isOwner, author: isAuthor }));
112
+ }
113
+ function isContent(value) {
114
+ if (!isRecord(value)) {
115
+ return false;
116
+ }
117
+ const hasValidAnalysis = value.analysis === undefined || isString(value.analysis) || isContentAnalysis(value.analysis);
118
+ return (isOptionalString(value.id) &&
119
+ isString(value.fileId) &&
120
+ isString(value.filename) &&
121
+ isOptionalString(value.description) &&
122
+ isString(value.mimetype) &&
123
+ isNumber(value.size) &&
124
+ hasPermissions(value) &&
125
+ isOptionalStringArray(value.tags) &&
126
+ isOptionalStringArray(value.assets) &&
127
+ isOptionalArrayOf(value.files, isStorage) &&
128
+ hasResourceMeta(value, { owner: isOwner, author: isAuthor, date: isString }) &&
129
+ hasValidAnalysis);
130
+ }
131
+ function isEvent(value) {
132
+ if (!isRecord(value)) {
133
+ return false;
134
+ }
135
+ return (isOptionalString(value.id) &&
136
+ isString(value.name) &&
137
+ isOptionalString(value.description) &&
138
+ isOptionalStringArray(value.tags) &&
139
+ hasPermissions(value) &&
140
+ isEnumValue(event_interface_1.EventLevel, value.level) &&
141
+ isOptional(value.data, isRecord) &&
142
+ isOptionalString(value.assetRef) &&
143
+ isOptionalString(value.assetRef$name) &&
144
+ isOptionalString(value.alertRef) &&
145
+ isOptionalString(value.tsRef) &&
146
+ isOptionalString(value.eventRef) &&
147
+ isOptionalString(value.cause) &&
148
+ isOptionalString(value.group) &&
149
+ hasResourceMeta(value, { owner: isOwner, author: isAuthor, date: isString }));
150
+ }
151
+ function isAssignee(value) {
152
+ return isRecord(value) && isString(value.id) && isEnumValue(task_interface_1.AssigneeType, value.type);
153
+ }
154
+ function isLogbookEntry(value) {
155
+ if (!isRecord(value)) {
156
+ return false;
157
+ }
158
+ return (isString(value.taskId) &&
159
+ isString(value.date) &&
160
+ isNumber(value.duration) &&
161
+ isOneOf(value.source, ['manual', 'voice', 'automatic']) &&
162
+ isOptionalString(value.id) &&
163
+ isOptionalString(value.comment) &&
164
+ isOptionalString(value.createdAt) &&
165
+ isOptionalString(value.updatedAt) &&
166
+ isOptionalArrayOf(value.materials, (material) => isRecord(material) && isString(material.name) && isNumber(material.quantity)) &&
167
+ isOptional(value.data, isRecord) &&
168
+ isOptional(value.createdBy, isAuthor));
169
+ }
170
+ function isTask(value) {
171
+ if (!isRecord(value)) {
172
+ return false;
173
+ }
174
+ const hasValidStatusHistory = value.statusHistoryLog === undefined ||
175
+ (Array.isArray(value.statusHistoryLog) && value.statusHistoryLog.every((status) => isEnumValue(task_interface_1.TaskStatus, status)));
176
+ return (isOptionalString(value.id) &&
177
+ isOptionalDateOrString(value.createdAt) &&
178
+ isOptionalDateOrString(value.updatedAt) &&
179
+ isOptionalDateOrString(value.deletedAt) &&
180
+ isOptionalNumber(value.revision) &&
181
+ hasResourceMeta(value, { owner: isOwner, author: isAuthor, date: (candidate) => isString(candidate) || candidate instanceof Date }) &&
182
+ isString(value.name) &&
183
+ isOptionalString(value.description) &&
184
+ isEnumValue(task_interface_1.Priority, value.priority) &&
185
+ isOptionalStringArray(value.tags) &&
186
+ hasPermissions(value) &&
187
+ isOptionalString(value.assetRef) &&
188
+ isOptionalString(value.assetRef$name) &&
189
+ isOptionalString(value.eventRef) &&
190
+ isOptionalString(value.eventRef$name) &&
191
+ isOptionalNumber(value.gitHubNr) &&
192
+ isOptionalString(value.schedule) &&
193
+ (value.expiryDate === undefined || value.expiryDate instanceof Date) &&
194
+ isOptionalString(value.parent) &&
195
+ isOptionalString(value.parent$name) &&
196
+ isOptionalStringArray(value.subTasks) &&
197
+ isArrayOf(value.assignedTo, isAssignee) &&
198
+ isOptionalString(value.acceptedBy) &&
199
+ (value.status === undefined || isEnumValue(task_interface_1.TaskStatus, value.status)) &&
200
+ hasValidStatusHistory &&
201
+ isOptionalString(value.reason) &&
202
+ isOptionalString(value.logbookSchema));
203
+ }
@@ -1,16 +1,16 @@
1
1
  import { Api } from './api.interface';
2
2
  export interface UserSettings extends Api {
3
3
  activeOrg?: string;
4
- activeTags: string[];
5
- applications: Application[];
4
+ activeTags?: string[];
5
+ applications?: Application[];
6
6
  consent?: Consent;
7
- creationReadRoles: Permission[];
8
- creationWriteRoles: Permission[];
9
- deletionRequested: boolean;
10
- favoriteLabelsOrder: Record<string, number>;
11
- language: string;
12
- tableSettings: TableSetting[];
13
- userId: string;
7
+ creationReadRoles?: Permission[];
8
+ creationWriteRoles?: Permission[];
9
+ deletionRequested?: boolean;
10
+ favoriteLabelsOrder?: Record<string, number>;
11
+ language?: string;
12
+ tableSettings?: TableSetting[];
13
+ userId?: string;
14
14
  }
15
15
  export interface Consent {
16
16
  essential?: boolean;
@@ -27,7 +27,12 @@ export interface Permission {
27
27
  }
28
28
  export interface TableSettingProfile {
29
29
  name: string;
30
- cols: string;
30
+ isTranslationKey?: boolean;
31
+ cols?: Record<string, string> | string;
32
+ filter?: string;
33
+ sort?: string;
34
+ assetSupertypeFilter?: string;
35
+ errorTime?: number;
31
36
  }
32
37
  export interface TableSetting {
33
38
  name: string;
@@ -1,5 +1,14 @@
1
1
  import { Author } from './author.interface';
2
2
  import { Owner } from './owner.interface';
3
+ export declare enum SecretType {
4
+ KV = "KV",
5
+ OAuth2 = "OAuth2"
6
+ }
7
+ export interface KVSecretVersion {
8
+ version: number;
9
+ isCurrent: boolean;
10
+ createdAt: string;
11
+ }
3
12
  export interface VaultSecret {
4
13
  id?: string;
5
14
  name: string;
@@ -12,4 +21,6 @@ export interface VaultSecret {
12
21
  createdBy?: Author;
13
22
  updatedBy?: Author;
14
23
  updatedAt?: string;
24
+ secretType?: SecretType;
25
+ expiryDate?: string;
15
26
  }
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SecretType = void 0;
4
+ var SecretType;
5
+ (function (SecretType) {
6
+ SecretType["KV"] = "KV";
7
+ SecretType["OAuth2"] = "OAuth2";
8
+ })(SecretType || (exports.SecretType = SecretType = {}));