@yuuvis/client-core 0.6.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 (153) hide show
  1. package/README.md +111 -0
  2. package/esm2022/index.mjs +65 -0
  3. package/esm2022/lib/client-core.module.mjs +117 -0
  4. package/esm2022/lib/client-core.shared.module.mjs +18 -0
  5. package/esm2022/lib/common/pipes/filesize.pipe.mjs +37 -0
  6. package/esm2022/lib/common/pipes/index.mjs +6 -0
  7. package/esm2022/lib/common/pipes/keys.pipe.mjs +17 -0
  8. package/esm2022/lib/common/pipes/locale-date.pipe.mjs +45 -0
  9. package/esm2022/lib/common/pipes/locale-number.pipe.mjs +115 -0
  10. package/esm2022/lib/common/pipes/safe-html.pipe.mjs +44 -0
  11. package/esm2022/lib/common/services/native-notifications.interface.mjs +2 -0
  12. package/esm2022/lib/common/services/native-notifications.mjs +40 -0
  13. package/esm2022/lib/model/dms-object.interface.mjs +2 -0
  14. package/esm2022/lib/model/dms-object.model.mjs +79 -0
  15. package/esm2022/lib/model/object-flavor.interface.mjs +2 -0
  16. package/esm2022/lib/model/range-value.interface.mjs +2 -0
  17. package/esm2022/lib/model/yuv-error.model.mjs +37 -0
  18. package/esm2022/lib/model/yuv-user.model.mjs +38 -0
  19. package/esm2022/lib/service/audit/audit.interface.mjs +2 -0
  20. package/esm2022/lib/service/audit/audit.service.mjs +135 -0
  21. package/esm2022/lib/service/auth/auth.interceptor.mjs +50 -0
  22. package/esm2022/lib/service/auth/auth.interface.mjs +7 -0
  23. package/esm2022/lib/service/auth/auth.service.mjs +130 -0
  24. package/esm2022/lib/service/auth/oidc.service.mjs +81 -0
  25. package/esm2022/lib/service/backend/api.enum.mjs +11 -0
  26. package/esm2022/lib/service/backend/backend.interface.mjs +2 -0
  27. package/esm2022/lib/service/backend/backend.service.mjs +206 -0
  28. package/esm2022/lib/service/bpm/bpm.interface.mjs +8 -0
  29. package/esm2022/lib/service/bpm/bpm.service.mjs +51 -0
  30. package/esm2022/lib/service/cache/app-cache.service.mjs +51 -0
  31. package/esm2022/lib/service/catalog/catalog.interface.mjs +2 -0
  32. package/esm2022/lib/service/catalog/catalog.service.mjs +13 -0
  33. package/esm2022/lib/service/clipboard/clipboard.interface.mjs +2 -0
  34. package/esm2022/lib/service/clipboard/clipboard.service.mjs +90 -0
  35. package/esm2022/lib/service/config/config.interface.mjs +6 -0
  36. package/esm2022/lib/service/config/config.service.mjs +115 -0
  37. package/esm2022/lib/service/config/core-config.mjs +20 -0
  38. package/esm2022/lib/service/config/core-config.tokens.mjs +9 -0
  39. package/esm2022/lib/service/connection/connection.service.mjs +36 -0
  40. package/esm2022/lib/service/connection/offline.interceptor.mjs +28 -0
  41. package/esm2022/lib/service/core-init/core-init.service.mjs +29 -0
  42. package/esm2022/lib/service/core-init/missing-translation-handler.mjs +10 -0
  43. package/esm2022/lib/service/core-init/translate-json-loader.mjs +117 -0
  44. package/esm2022/lib/service/device/device.interface.mjs +6 -0
  45. package/esm2022/lib/service/device/device.service.mjs +144 -0
  46. package/esm2022/lib/service/dms/dms.service.interface.mjs +2 -0
  47. package/esm2022/lib/service/dms/dms.service.mjs +440 -0
  48. package/esm2022/lib/service/event/event.interface.mjs +2 -0
  49. package/esm2022/lib/service/event/event.service.mjs +38 -0
  50. package/esm2022/lib/service/event/events.mjs +14 -0
  51. package/esm2022/lib/service/idm/idm.interface.mjs +2 -0
  52. package/esm2022/lib/service/idm/idm.service.mjs +34 -0
  53. package/esm2022/lib/service/logger/logger-console.service.mjs +73 -0
  54. package/esm2022/lib/service/logger/logger.interface.mjs +2 -0
  55. package/esm2022/lib/service/logger/logger.mjs +27 -0
  56. package/esm2022/lib/service/notification/notification.service.mjs +131 -0
  57. package/esm2022/lib/service/object-config/object-config.interface.mjs +2 -0
  58. package/esm2022/lib/service/object-config/object-config.service.mjs +229 -0
  59. package/esm2022/lib/service/pending-changes/pending-changes-component.interface.mjs +5 -0
  60. package/esm2022/lib/service/pending-changes/pending-changes-guard.service.mjs +25 -0
  61. package/esm2022/lib/service/pending-changes/pending-changes.service.mjs +123 -0
  62. package/esm2022/lib/service/prediction/prediction.interface.mjs +2 -0
  63. package/esm2022/lib/service/prediction/prediction.service.mjs +60 -0
  64. package/esm2022/lib/service/search/search.service.interface.mjs +39 -0
  65. package/esm2022/lib/service/search/search.service.mjs +178 -0
  66. package/esm2022/lib/service/session-storage/session-storage.service.mjs +50 -0
  67. package/esm2022/lib/service/system/object-form.interface.mjs +2 -0
  68. package/esm2022/lib/service/system/system.enum.mjs +179 -0
  69. package/esm2022/lib/service/system/system.interface.mjs +2 -0
  70. package/esm2022/lib/service/system/system.service.mjs +597 -0
  71. package/esm2022/lib/service/upload/upload.interface.mjs +2 -0
  72. package/esm2022/lib/service/upload/upload.service.mjs +228 -0
  73. package/esm2022/lib/service/user/user.service.mjs +211 -0
  74. package/esm2022/lib/util/utils.helper.enum.mjs +15 -0
  75. package/esm2022/lib/util/utils.mjs +373 -0
  76. package/esm2022/yuuvis-client-core.mjs +5 -0
  77. package/fesm2022/yuuvis-client-core.mjs +4775 -0
  78. package/fesm2022/yuuvis-client-core.mjs.map +1 -0
  79. package/index.d.ts +61 -0
  80. package/lib/client-core.module.d.ts +20 -0
  81. package/lib/client-core.shared.module.d.ts +10 -0
  82. package/lib/common/pipes/filesize.pipe.d.ts +18 -0
  83. package/lib/common/pipes/index.d.ts +5 -0
  84. package/lib/common/pipes/keys.pipe.d.ts +10 -0
  85. package/lib/common/pipes/locale-date.pipe.d.ts +12 -0
  86. package/lib/common/pipes/locale-number.pipe.d.ts +47 -0
  87. package/lib/common/pipes/safe-html.pipe.d.ts +28 -0
  88. package/lib/common/services/native-notifications.d.ts +8 -0
  89. package/lib/common/services/native-notifications.interface.d.ts +5 -0
  90. package/lib/model/dms-object.interface.d.ts +16 -0
  91. package/lib/model/dms-object.model.d.ts +26 -0
  92. package/lib/model/object-flavor.interface.d.ts +30 -0
  93. package/lib/model/range-value.interface.d.ts +9 -0
  94. package/lib/model/yuv-error.model.d.ts +18 -0
  95. package/lib/model/yuv-user.model.d.ts +44 -0
  96. package/lib/service/audit/audit.interface.d.ts +47 -0
  97. package/lib/service/audit/audit.service.d.ts +35 -0
  98. package/lib/service/auth/auth.interceptor.d.ts +12 -0
  99. package/lib/service/auth/auth.interface.d.ts +34 -0
  100. package/lib/service/auth/auth.service.d.ts +50 -0
  101. package/lib/service/auth/oidc.service.d.ts +16 -0
  102. package/lib/service/backend/api.enum.d.ts +7 -0
  103. package/lib/service/backend/backend.interface.d.ts +29 -0
  104. package/lib/service/backend/backend.service.d.ts +118 -0
  105. package/lib/service/bpm/bpm.interface.d.ts +86 -0
  106. package/lib/service/bpm/bpm.service.d.ts +19 -0
  107. package/lib/service/cache/app-cache.service.d.ts +18 -0
  108. package/lib/service/catalog/catalog.interface.d.ts +12 -0
  109. package/lib/service/catalog/catalog.service.d.ts +5 -0
  110. package/lib/service/clipboard/clipboard.interface.d.ts +11 -0
  111. package/lib/service/clipboard/clipboard.service.d.ts +23 -0
  112. package/lib/service/config/config.interface.d.ts +34 -0
  113. package/lib/service/config/config.service.d.ts +45 -0
  114. package/lib/service/config/core-config.d.ts +14 -0
  115. package/lib/service/config/core-config.tokens.d.ts +7 -0
  116. package/lib/service/connection/connection.service.d.ts +25 -0
  117. package/lib/service/connection/offline.interceptor.d.ts +15 -0
  118. package/lib/service/core-init/core-init.service.d.ts +11 -0
  119. package/lib/service/core-init/missing-translation-handler.d.ts +8 -0
  120. package/lib/service/core-init/translate-json-loader.d.ts +20 -0
  121. package/lib/service/device/device.interface.d.ts +15 -0
  122. package/lib/service/device/device.service.d.ts +54 -0
  123. package/lib/service/dms/dms.service.d.ts +153 -0
  124. package/lib/service/dms/dms.service.interface.d.ts +59 -0
  125. package/lib/service/event/event.interface.d.ts +13 -0
  126. package/lib/service/event/event.service.d.ts +23 -0
  127. package/lib/service/event/events.d.ts +12 -0
  128. package/lib/service/idm/idm.interface.d.ts +5 -0
  129. package/lib/service/idm/idm.service.d.ts +9 -0
  130. package/lib/service/logger/logger-console.service.d.ts +20 -0
  131. package/lib/service/logger/logger.d.ts +17 -0
  132. package/lib/service/logger/logger.interface.d.ts +10 -0
  133. package/lib/service/notification/notification.service.d.ts +71 -0
  134. package/lib/service/object-config/object-config.interface.d.ts +62 -0
  135. package/lib/service/object-config/object-config.service.d.ts +38 -0
  136. package/lib/service/pending-changes/pending-changes-component.interface.d.ts +6 -0
  137. package/lib/service/pending-changes/pending-changes-guard.service.d.ts +14 -0
  138. package/lib/service/pending-changes/pending-changes.service.d.ts +57 -0
  139. package/lib/service/prediction/prediction.interface.d.ts +18 -0
  140. package/lib/service/prediction/prediction.service.d.ts +15 -0
  141. package/lib/service/search/search.service.d.ts +46 -0
  142. package/lib/service/search/search.service.interface.d.ts +119 -0
  143. package/lib/service/session-storage/session-storage.service.d.ts +15 -0
  144. package/lib/service/system/object-form.interface.d.ts +46 -0
  145. package/lib/service/system/system.enum.d.ts +141 -0
  146. package/lib/service/system/system.interface.d.ts +146 -0
  147. package/lib/service/system/system.service.d.ts +168 -0
  148. package/lib/service/upload/upload.interface.d.ts +55 -0
  149. package/lib/service/upload/upload.service.d.ts +34 -0
  150. package/lib/service/user/user.service.d.ts +69 -0
  151. package/lib/util/utils.d.ts +118 -0
  152. package/lib/util/utils.helper.enum.d.ts +13 -0
  153. package/package.json +33 -0
@@ -0,0 +1,153 @@
1
+ import { Observable } from 'rxjs';
2
+ import { DmsObject } from '../../model/dms-object.model';
3
+ import { HttpOptions } from '../backend/backend.interface';
4
+ import { SearchResponse, SearchResult } from '../search/search.service.interface';
5
+ import { CoreApiResponse, ObjectCopyOptions, ObjectDeleteOptions, ObjectDeleteResult, ObjectMoveOptions } from './dms.service.interface';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Service for working with dms objects: create them, delete, etc.
9
+ */
10
+ export declare class DmsService {
11
+ #private;
12
+ private triggerEvent;
13
+ /**
14
+ * Create new dms object(s). Providing an array of files here instead of one will create
15
+ * a new dms object for every file. In this case indexdata will shared across all files.
16
+ * @param objectTypeId The ID of the object type to be created
17
+ * @param indexdata Indexdata for the new object(s)
18
+ * @param files File(s) to create dms objects content(s) with
19
+ * @param label A label that will show up in the upload overlay dialog while uploading
20
+ *
21
+ * @returns Array of IDs of the objects that have been created
22
+ */
23
+ createDmsObject(objectTypeId: string, indexdata: any, files: File[], label?: string, silent?: boolean): Observable<string[]>;
24
+ /**
25
+ * Delete a dms object.
26
+ * @param id ID of the object to be deleted
27
+ */
28
+ deleteDmsObject(id: string, silent?: boolean): Observable<any>;
29
+ /**
30
+ * Restore older version of a dms object.
31
+ * @param id ID of the object to be restored
32
+ * @param version version of the object to be restored
33
+ */
34
+ restoreDmsObject(id: string, version: number, silent?: boolean): Observable<any>;
35
+ /**
36
+ * Upload (add/replace) content to a dms object.
37
+ * @param objectId ID of the dms object to upload the file to
38
+ * @param file The file to be uploaded
39
+ */
40
+ uploadContent(objectId: string, file: File): Observable<any>;
41
+ /**
42
+ * Path of dms object content file.
43
+ * @param objectId ID of the dms object
44
+ * @param version version number of the dms object
45
+ */
46
+ getContentPath(objectId: string, version?: number): string;
47
+ /**
48
+ * Original API Path of dms object content file.
49
+ * @param objectId ID of the dms object
50
+ * @param version version number of the dms object
51
+ * @param rendition should return rendition path of the dms object
52
+ */
53
+ getFullContentPath(objectId: string, version?: number, rendition?: boolean): string;
54
+ getSlideURI(objectId: string, mimeType?: string): string | undefined;
55
+ /**
56
+ * Downloads the content of dms objects.
57
+ *
58
+ * @param DmsObject[] dmsObjects Array of dms objects to be downloaded
59
+ * @param withVersion should download specific version of the object
60
+ */
61
+ downloadContent(objects: DmsObject[], withVersion?: boolean): void;
62
+ /**
63
+ * Fetch a dms object.
64
+ * @param id ID of the object to be retrieved
65
+ * @param version Desired version of the object
66
+ */
67
+ getDmsObject(id: string, version?: number, silent?: boolean, requestOptions?: HttpOptions | undefined): Observable<DmsObject>;
68
+ /**
69
+ * Updates a tag on a dms object.
70
+ * @param id The ID of the object
71
+ * @param tag The tag to be updated
72
+ * @param value The tags new value
73
+ */
74
+ setDmsObjectTag(id: string, tag: string, value: any, silent?: boolean): Observable<any>;
75
+ /**
76
+ * Deletes a tag from a dms object.
77
+ * @param id The ID of the object
78
+ * @param tag The tag to be deleted
79
+ */
80
+ deleteDmsObjectTag(id: string, tag: string, silent?: boolean): Observable<any>;
81
+ /**
82
+ * Update indexdata of a dms object.
83
+ * @param id ID of the object to apply the data to
84
+ * @param data Indexdata to be applied
85
+ * @param silent flag to trigger DMS_OBJECT_UPDATED event
86
+ */
87
+ updateDmsObject(id: string, data: any, silent?: boolean): Observable<DmsObject>;
88
+ /**
89
+ * Updates given objects.
90
+ * @param objects the objects to updated
91
+ */
92
+ updateDmsObjects(objects: {
93
+ id: string;
94
+ data: {
95
+ [key: string]: any;
96
+ };
97
+ }[], silent?: boolean): Observable<DmsObject[]>;
98
+ /**
99
+ * Updates a tag on a dms object.
100
+ * @param ids List of IDs of objects
101
+ * @param tag The tag to be updated
102
+ * @param value The tags new value
103
+ */
104
+ updateDmsObjectsTag(ids: string[], tag: string, value: any, silent?: boolean): Observable<any>;
105
+ /**
106
+ * Moves given objects to a different folder.
107
+ * @param folderId the id of the new parent folder
108
+ * @param objects objects to be moved
109
+ * @param options options for the move operation
110
+ */
111
+ moveDmsObjects(targetFolderId: string | null, objects: DmsObject[], options?: ObjectMoveOptions): Observable<any>;
112
+ /**
113
+ * Copy given objects to a different folder. The objects will be copied with their indexdata referencing
114
+ * the existing content of the source object.
115
+ * @param targetFolderId The ID of the target folder
116
+ * @param objects The objects to be copied
117
+ * @param options options for the copy operation
118
+ */
119
+ copyDmsObjects(targetFolderId: string | null, objects: DmsObject[], options?: ObjectCopyOptions): Observable<CoreApiResponse>;
120
+ /**
121
+ * Get a bunch of dms objects.
122
+ * @param ids List of IDs of objects to be retrieved
123
+ */
124
+ getDmsObjects(ids: string[], silent?: boolean): Observable<DmsObject[]>;
125
+ /**
126
+ * Delete a bunch of dms objects.
127
+ * @param ids List of IDs of objects to be deleted
128
+ * @param options Options for the delete operation
129
+ * @returns Array of delete results.
130
+ */
131
+ deleteDmsObjects(objects: string[] | {
132
+ id: string;
133
+ subject: string;
134
+ }[], options?: ObjectDeleteOptions): Observable<ObjectDeleteResult[]>;
135
+ /**
136
+ * Fetch a dms object versions.
137
+ * @param id ID of the object to be retrieved
138
+ */
139
+ getDmsObjectVersions(id: string): Observable<DmsObject[]>;
140
+ getDmsObjectVersion(id: string, version: number): Observable<DmsObject>;
141
+ coreApiResponseToDmsObject(res: CoreApiResponse): DmsObject;
142
+ batchUpdateTag(ids: string[], tag: string, value: any): Observable<any[]>;
143
+ batchDeleteTag(ids: string[], tag: string): Observable<any[]>;
144
+ batchDelete(ids: string[]): Observable<any[]>;
145
+ batchGet(ids: string[]): Observable<any[]>;
146
+ /**
147
+ * Map search result from the backend to applications SearchResult object
148
+ * @param searchResponse The backend response
149
+ */
150
+ toSearchResult(searchResponse: SearchResponse): SearchResult;
151
+ static ɵfac: i0.ɵɵFactoryDeclaration<DmsService, never>;
152
+ static ɵprov: i0.ɵɵInjectableDeclaration<DmsService>;
153
+ }
@@ -0,0 +1,59 @@
1
+ export interface ObjectDeleteOptions {
2
+ silent?: boolean;
3
+ waitForSearchConsistency?: boolean;
4
+ greedy?: boolean;
5
+ }
6
+ export interface ObjectDeleteResult {
7
+ id: string;
8
+ properties?: {
9
+ [key: string]: {
10
+ value: any;
11
+ };
12
+ };
13
+ _error?: ObjectDeleteError;
14
+ }
15
+ export interface ObjectDeleteError {
16
+ status: number;
17
+ message: string;
18
+ }
19
+ export interface ObjectMoveOptions {
20
+ waitForSearchConsistency?: boolean;
21
+ silent?: boolean;
22
+ }
23
+ export interface ObjectCopyOptions {
24
+ waitForSearchConsistency?: boolean;
25
+ }
26
+ export interface CoreApiObject {
27
+ properties: Record<string, CoreApiObjectProperty>;
28
+ contentStreams?: Partial<ContentStream>[];
29
+ }
30
+ export interface CoreApiObjectProperty {
31
+ value: unknown;
32
+ }
33
+ export interface ContentStream {
34
+ contentStreamId: string;
35
+ repositoryId: string;
36
+ digest: string;
37
+ fileName: string;
38
+ size: number;
39
+ archivePath?: string;
40
+ range?: string;
41
+ mimeType: string;
42
+ }
43
+ export interface CoreApiBatchResponse {
44
+ hasMoreItems: boolean;
45
+ numItems: number;
46
+ objects: CoreApiResponse[];
47
+ totalNumItems: number;
48
+ }
49
+ export interface CoreApiResponse {
50
+ properties: Record<string, CoreApiObjectProperty>;
51
+ contentStreams?: ContentStream[];
52
+ options: {
53
+ 'system:response': {
54
+ httpStatusCode: number;
55
+ serviceErrorCode?: number;
56
+ message: string;
57
+ };
58
+ };
59
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Triggerable and Subscribable events
3
+ */
4
+ export interface YuvEvent {
5
+ /**
6
+ * type
7
+ */
8
+ type: string;
9
+ /**
10
+ * data to be passed along with the event
11
+ */
12
+ data?: any;
13
+ }
@@ -0,0 +1,23 @@
1
+ import { Observable } from 'rxjs';
2
+ import { YuvEvent } from './event.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Service for providing triggered events
6
+ */
7
+ export declare class EventService {
8
+ #private;
9
+ event$: Observable<YuvEvent>;
10
+ /**
11
+ * Trigger an global event
12
+ * @param type Type/key of the event
13
+ * @param data Data to be send along with the event
14
+ */
15
+ trigger(type: string, data?: any): void;
16
+ /**
17
+ * Listen on a triggered event
18
+ * @param types Type/key of the event
19
+ */
20
+ on(...types: string[]): Observable<YuvEvent>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
23
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Events emitted by parts of the application
3
+ */
4
+ export declare enum YuvEventType {
5
+ LOGOUT = "yuv.user.logout",
6
+ CLIENT_LOCALE_CHANGED = "yuv.user.locale.client.changed",
7
+ DMS_OBJECT_LOADED = "yuv.dms.object.loaded",
8
+ DMS_OBJECT_CREATED = "yuv.dms.object.created",
9
+ DMS_OBJECT_DELETED = "yuv.dms.object.deleted",
10
+ DMS_OBJECT_UPDATED = "yuv.dms.object.updated",
11
+ DMS_OBJECTS_MOVED = "yuv.dms.objects.moved"
12
+ }
@@ -0,0 +1,5 @@
1
+ export interface OrganizationSetEntry {
2
+ id: string;
3
+ title: string;
4
+ type: 'user' | 'role';
5
+ }
@@ -0,0 +1,9 @@
1
+ import { Observable } from 'rxjs';
2
+ import { OrganizationSetEntry } from './idm.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class IdmService {
5
+ #private;
6
+ queryOrganizationEntity(term: string, targetTypes: string[], size?: number): Observable<OrganizationSetEntry[]>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdmService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<IdmService>;
9
+ }
@@ -0,0 +1,20 @@
1
+ import { ConfigService } from '../config/config.service';
2
+ import { ILogger } from './logger.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * @ignore
6
+ */
7
+ export declare class LoggerConsoleService implements ILogger {
8
+ private config;
9
+ constructor(config: ConfigService);
10
+ private styles;
11
+ private apply;
12
+ debug(...args: any[]): void;
13
+ error(...args: any[]): void;
14
+ info(...args: any[]): void;
15
+ log(...args: any[]): void;
16
+ warn(...args: any[]): void;
17
+ private shouldLog;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerConsoleService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoggerConsoleService>;
20
+ }
@@ -0,0 +1,17 @@
1
+ import { ILogger } from './logger.interface';
2
+ /**
3
+ * Set up the default logger.
4
+ * The default logger doesn't actually log anything;
5
+ * but, it provides the Dependency-Injection (DI) token that the rest of the
6
+ * application can use for dependency resolution. Each platform can then override
7
+ * this with a platform-specific logger implementation.
8
+ *
9
+ * @ignore
10
+ */
11
+ export declare class Logger implements ILogger {
12
+ error(...args: any[]): void;
13
+ debug(...args: any[]): void;
14
+ info(...args: any[]): void;
15
+ log(...args: any[]): void;
16
+ warn(...args: any[]): void;
17
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Interface providing a default logger, that is used for the Dependency-Injection (DI) token.
3
+ */
4
+ export interface ILogger {
5
+ debug(...args: any[]): void;
6
+ error(...args: any[]): void;
7
+ info(...args: any[]): void;
8
+ log(...args: any[]): void;
9
+ warn(...args: any[]): void;
10
+ }
@@ -0,0 +1,71 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Shows a message after completing each action.
4
+ */
5
+ export declare class NotificationService {
6
+ #private;
7
+ /**
8
+ * Set to true to suppress any notifications
9
+ */
10
+ silent: boolean;
11
+ /**
12
+ * Default Notofication Options
13
+ *
14
+ */
15
+ private options;
16
+ constructor();
17
+ /**
18
+ * Show info colored massage (blue)
19
+ *
20
+ * @param string title
21
+ * @param string msg
22
+ */
23
+ info(title: string, msg?: string): void;
24
+ /**
25
+ * Show success colored massage (green)
26
+ * @param string title
27
+ * @param string msg
28
+ */
29
+ success(title: string, msg?: string): void;
30
+ /**
31
+ * can not be in use
32
+ *
33
+ * @param string title
34
+ * @param string msg
35
+ */
36
+ wait(title: string, msg?: string): void;
37
+ /**
38
+ * Show error colored massage (red)
39
+ *
40
+ * @param string title
41
+ * @param string msg
42
+ */
43
+ error(title: string, msg?: string): void;
44
+ /**
45
+ * Show warning colored massage (yellow)
46
+ *
47
+ * @param string title
48
+ * @param string msg
49
+ */
50
+ warning(title: string, msg?: string): void;
51
+ /**
52
+ * Public wrapper for accessing the Toastr
53
+ *
54
+ * @param string title
55
+ * @param string msg
56
+ * @param string mode
57
+ * @param _options
58
+ */
59
+ private toast;
60
+ /**
61
+ * Accessing the toastr service
62
+ *
63
+ * @param string msg
64
+ * @param string title
65
+ * @param options
66
+ * @param string mode
67
+ */
68
+ private doToast;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
70
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
71
+ }
@@ -0,0 +1,62 @@
1
+ import { ObjectTypeFieldInternalType } from "../system/object-form.interface";
2
+ import { VirtualObjectType } from "../system/system.interface";
3
+ /**
4
+ * Config defining the most important/interessting fields for
5
+ * a certain object type. They'll be used to render result lists
6
+ * as well as headers for onbjects of that type.
7
+ */
8
+ export interface ObjectConfig {
9
+ objectTypeId: string;
10
+ icon?: ObjectConfigIcon;
11
+ title?: ObjectConfigProperty;
12
+ description?: ObjectConfigProperty;
13
+ meta?: ObjectConfigProperty;
14
+ aside?: ObjectConfigProperty;
15
+ actions?: ObjectConfigAction[];
16
+ badges?: ObjectConfigBadge[];
17
+ }
18
+ export interface ObjectConfigIcon {
19
+ svg: string;
20
+ }
21
+ export interface ObjectConfigAction {
22
+ id: string;
23
+ }
24
+ export interface ObjectConfigBadge {
25
+ label: string;
26
+ }
27
+ export interface ObjectConfigProperty {
28
+ label: string;
29
+ propertyName: string;
30
+ }
31
+ export interface StoredObjectConfig {
32
+ main: ObjectConfigRecord;
33
+ buckets: ObjectConfigBucket[];
34
+ }
35
+ export type ObjectConfigRecord = Record<string, ObjectConfig>;
36
+ export interface ObjectConfigBucket {
37
+ id: string;
38
+ configs: ObjectConfigRecord;
39
+ }
40
+ export interface ResolvedObjectConfig {
41
+ id: string;
42
+ objectTypeId: string;
43
+ icon?: ResolvedObjectConfigItem;
44
+ title: ResolvedObjectConfigItem;
45
+ description?: ResolvedObjectConfigItem;
46
+ meta?: ResolvedObjectConfigItem;
47
+ aside?: ResolvedObjectConfigItem;
48
+ actions?: ObjectConfigAction[];
49
+ badges?: ObjectConfigBadge[];
50
+ instanceData?: Record<string, unknown>;
51
+ }
52
+ export interface ResolvedObjectConfigItem {
53
+ propertyName: string;
54
+ rendererType?: RendererType;
55
+ value?: any;
56
+ meta?: Record<string, any>;
57
+ }
58
+ export type RendererType = Partial<ObjectTypeFieldInternalType | string>;
59
+ export interface ConfigTypeOption {
60
+ bucket?: string;
61
+ type: VirtualObjectType;
62
+ }
@@ -0,0 +1,38 @@
1
+ import { Observable } from 'rxjs';
2
+ import { VirtualObjectType } from '../system/system.interface';
3
+ import { ObjectConfig, ObjectConfigRecord, ResolvedObjectConfig } from './object-config.interface';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Service managing the configuarions for object types.
7
+ * Configuration means that you can pick certain fields
8
+ * of an object type and assign them to a config object.
9
+ */
10
+ export declare class ObjectConfigService {
11
+ #private;
12
+ OBJECT_CONFIG_STORAGE_KEY: string;
13
+ init(): Observable<any>;
14
+ getObjectConfigs$(bucket?: string, includeDefaults?: boolean): Observable<ObjectConfigRecord>;
15
+ /**
16
+ * Register default object configs. Apps can pre-define how their
17
+ * objects should be rendered.
18
+ * @param bucket Name of a bucket to bind configs to (usually the ID of the app) to
19
+ * separate the configs from other apps. If not provided configs will be saved for
20
+ * the global scope
21
+ */
22
+ registerDefaults(configs: ObjectConfigRecord, bucket?: string): void;
23
+ unregisterDefaults(configs: ObjectConfigRecord, bucket?: string): void;
24
+ /**
25
+ * Get object config for an object type.
26
+ * @param objectTypeId ID of the object type to get the config for
27
+ * @param bucket Optional bucket ID to fetch the config from. Buckets
28
+ * define separated areas to store/receive those configs. This way
29
+ * components/apps can store different object configs than the ones
30
+ * used accross the whole client application.
31
+ */
32
+ getObjectConfig(type: VirtualObjectType, bucket?: string): ObjectConfig;
33
+ saveObjectConfig(type: VirtualObjectType, config: ObjectConfig, bucket?: string): Observable<any>;
34
+ getDefaultConfig(objectTypeID: string): ObjectConfig;
35
+ getResolvedObjectConfig(data: Record<string, any>, type: VirtualObjectType, bucket?: string, includeDefaults?: boolean): ResolvedObjectConfig;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectConfigService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<ObjectConfigService>;
38
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Interface to be implemented by all components (state components) that are aware of pending changes
3
+ */
4
+ export interface PendingChangesComponent {
5
+ hasPendingChanges: () => boolean;
6
+ }
@@ -0,0 +1,14 @@
1
+ import { CanDeactivate } from '@angular/router';
2
+ import { PendingChangesComponent } from './pending-changes-component.interface';
3
+ import { PendingChangesService } from './pending-changes.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Providing a `PendingChangesComponent`.
7
+ */
8
+ export declare class PendingChangesGuard implements CanDeactivate<PendingChangesComponent> {
9
+ private pendingChanges;
10
+ constructor(pendingChanges: PendingChangesService);
11
+ canDeactivate(component: PendingChangesComponent): boolean;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<PendingChangesGuard, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<PendingChangesGuard>;
14
+ }
@@ -0,0 +1,57 @@
1
+ import { Observable } from 'rxjs';
2
+ import { PendingChangesComponent } from './pending-changes-component.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * EditingObserver service is used to track changes made inside the application, that should prevent
6
+ * doing something or going somewhere before the changes are persisted or ignored. For example when
7
+ * the user starts editing form data and tries to navigate away before saving the changes, this service
8
+ * will take care of notifying the user.
9
+ *
10
+ * It is working kind of like a registry for ongoing tasks that need to be monitored. Every component
11
+ * that needs to be aware of changes to be persisted can start a task and finish it when everything is done.
12
+ *
13
+ * Other components can ask the service for pending tasks to know whether or not to execute an action
14
+ * (e.g. list component will subscribe and prevent selecting another list item, if changes to the previous one haven't be finished)
15
+ *
16
+ * app.component will prevent relevant route changes while tasks are pending.
17
+ */
18
+ export declare class PendingChangesService {
19
+ #private;
20
+ tasks$: Observable<{
21
+ id: string;
22
+ message?: string;
23
+ }[]>;
24
+ /**
25
+ * Registers a task to be pending.
26
+ * @param message alert message
27
+ * @returns Unique id to be used for finishing this task
28
+ */
29
+ startTask(message: string): string;
30
+ /**
31
+ * Finishes a task
32
+ * @param id The id of the task to be finished. This is the one the component got from startTask()
33
+ */
34
+ finishTask(id: string): void;
35
+ /**
36
+ * Returns whether or not the service has pending tasks.
37
+ * If an id is provided, the method will check existence of one specific task.
38
+ *
39
+ * @param id The id of the task to be checked
40
+ * @returns
41
+ */
42
+ hasPendingTask(id?: string | string[]): boolean;
43
+ /**
44
+ * Returns whether or not the component|service has pending tasks.
45
+ * Checks via confirm dialog
46
+ * @param component
47
+ * @returns
48
+ */
49
+ check(component?: PendingChangesComponent): boolean;
50
+ checkForPendingTasks(taskIds: string | string[]): boolean;
51
+ /**
52
+ * Clear list of pending tasks
53
+ */
54
+ clear(): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<PendingChangesService, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<PendingChangesService>;
57
+ }
@@ -0,0 +1,18 @@
1
+ export interface PredictionClassifyResult {
2
+ objectId: string;
3
+ properties: PredictionClassifyResultItem[];
4
+ }
5
+ export interface PredictionClassifyResultItem {
6
+ type: string;
7
+ probability: number;
8
+ }
9
+ export interface PredictionExtractResult {
10
+ objectId: string;
11
+ properties: Record<string, PredictionExtractResultItem[]>;
12
+ }
13
+ export interface PredictionExtractResultItem {
14
+ value: string;
15
+ probability: number;
16
+ boundingBox?: number[];
17
+ page?: number;
18
+ }
@@ -0,0 +1,15 @@
1
+ import { Observable } from 'rxjs';
2
+ import { PredictionClassifyResult, PredictionExtractResult } from './prediction.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PredictionService {
5
+ #private;
6
+ classify(objectIDs: string[], schemaObjectTypeId?: string): Observable<Record<string, PredictionClassifyResult>>;
7
+ /**
8
+ * @param schemaObjectTypeId
9
+ * @param objectIDs
10
+ * @returns Observable<Record<string, PredictionClassifyResult>> string is objectID
11
+ */
12
+ extract(schemaObjectTypeId: string, objectIDs: string[]): Observable<Record<string, PredictionExtractResult>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<PredictionService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<PredictionService>;
15
+ }
@@ -0,0 +1,46 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AggregateResult, SearchQuery, SearchResponse, SearchResult } from './search.service.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SearchService {
5
+ #private;
6
+ static DEFAULT_QUERY_SIZE: number;
7
+ /**
8
+ * Execute a search query ans transform the result to a SearchResult object
9
+ * @param query The search query
10
+ * @returns Observable of a SearchResult
11
+ */
12
+ search(query: SearchQuery): Observable<SearchResult>;
13
+ /**
14
+ * Execute a raw search query and return the result as is.
15
+ * @param query The search query
16
+ * @returns Observable of the raw search result
17
+ */
18
+ searchRaw(query: SearchQuery): Observable<any>;
19
+ /**
20
+ * Search for objects in the dms using CMIS like SQL syntax.
21
+ * @param statement The query statement
22
+ * @param size The number of items to return
23
+ * @returns Observable of a SearchResult
24
+ */
25
+ searchCmis(statement: string, size?: number): Observable<SearchResult>;
26
+ /**
27
+ * Fetch aggragations for a given query.
28
+ * @param q The query
29
+ * @param aggregations List of aggregations to be fetched (e.g. `enaio:objectTypeId`
30
+ * to get an aggregation of object types)
31
+ */
32
+ aggregate(q: SearchQuery, aggregations: string[]): Observable<AggregateResult>;
33
+ /**
34
+ * Go to a page of a search result.
35
+ * @param searchResult The search result (that supports pagination)
36
+ * @param page The number of the page to go to
37
+ */
38
+ getPage(query: SearchQuery, page: number): Observable<SearchResult>;
39
+ /**
40
+ * Map search result from the backend to applications SearchResult object
41
+ * @param searchResponse The backend response
42
+ */
43
+ toSearchResult(searchResponse: SearchResponse): SearchResult;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchService, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<SearchService>;
46
+ }