@acorex-platform/module-activity-insight-client 0.0.20
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/fesm2022/acorex-platform-module-activity-insight-client-activity-dashboard-page.component-CAcsbq4I.mjs +167 -0
- package/fesm2022/acorex-platform-module-activity-insight-client-activity-dashboard-page.component-CAcsbq4I.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-activity-insight-client-activity-timeline-page.component-DULl2SRF.mjs +286 -0
- package/fesm2022/acorex-platform-module-activity-insight-client-activity-timeline-page.component-DULl2SRF.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-activity-insight-client-contracts.mjs +262 -0
- package/fesm2022/acorex-platform-module-activity-insight-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-activity-insight-client.mjs +1606 -0
- package/fesm2022/acorex-platform-module-activity-insight-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-activity-insight-client-contracts.d.ts +398 -0
- package/types/acorex-platform-module-activity-insight-client.d.ts +131 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
declare const AXMActivityInsightMenuKeys: {
|
|
2
|
+
readonly ActivityInsight: {
|
|
3
|
+
readonly Root: "ActivityInsight:Menu:Root";
|
|
4
|
+
readonly Events: "ActivityInsight:Menu:Events";
|
|
5
|
+
readonly Timelines: "ActivityInsight:Menu:Timelines";
|
|
6
|
+
readonly Policies: "ActivityInsight:Menu:Policies";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Insights & Reporting capabilities used by this module.
|
|
12
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
13
|
+
*/
|
|
14
|
+
declare const AXPInsightsReportingPermissionKeys: {
|
|
15
|
+
readonly Access: "InsightsReporting:Permission:Access";
|
|
16
|
+
readonly MaintainReports: "InsightsReporting:Permission:MaintainReports";
|
|
17
|
+
readonly MaintainData: "InsightsReporting:Permission:MaintainData";
|
|
18
|
+
readonly ViewActivityInsight: "InsightsReporting:Permission:ViewActivityInsight";
|
|
19
|
+
readonly ManageActivityInsight: "InsightsReporting:Permission:ManageActivityInsight";
|
|
20
|
+
readonly Setup: "InsightsReporting:Permission:Setup";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.
|
|
24
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
25
|
+
*/
|
|
26
|
+
declare const AXMActivityInsightPermissionKeys: {
|
|
27
|
+
readonly ActivityInsight: {
|
|
28
|
+
readonly Events: {
|
|
29
|
+
readonly View: "InsightsReporting:Permission:ViewActivityInsight";
|
|
30
|
+
};
|
|
31
|
+
readonly Timelines: {
|
|
32
|
+
readonly View: "InsightsReporting:Permission:ViewActivityInsight";
|
|
33
|
+
};
|
|
34
|
+
readonly Policies: {
|
|
35
|
+
readonly Manage: "InsightsReporting:Permission:ManageActivityInsight";
|
|
36
|
+
};
|
|
37
|
+
readonly Admin: "InsightsReporting:Permission:ManageActivityInsight";
|
|
38
|
+
readonly Management: "InsightsReporting:Permission:ManageActivityInsight";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare enum AXPActivityInsightSettings {
|
|
43
|
+
Enabled = "ActivityInsight:Setting:Tracking.Enabled",
|
|
44
|
+
FlushIntervalMs = "ActivityInsight:Setting:Buffer.FlushIntervalMs",
|
|
45
|
+
MaxBatchSize = "ActivityInsight:Setting:Buffer.MaxBatchSize",
|
|
46
|
+
MaxPayloadBytes = "ActivityInsight:Setting:Buffer.MaxPayloadBytes",
|
|
47
|
+
MaxQueueSize = "ActivityInsight:Setting:Buffer.MaxQueueSize",
|
|
48
|
+
FlushOnVisibilityHidden = "ActivityInsight:Setting:Buffer.FlushOnVisibilityHidden",
|
|
49
|
+
UseBeaconForFinalFlush = "ActivityInsight:Setting:Buffer.UseBeaconForFinalFlush",
|
|
50
|
+
MaskingEnabled = "ActivityInsight:Setting:Privacy.MaskingEnabled",
|
|
51
|
+
SamplingEnabled = "ActivityInsight:Setting:Privacy.SamplingEnabled",
|
|
52
|
+
TrackAiContent = "ActivityInsight:Setting:Privacy.TrackAiContent"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare const AXMActivityInsightQueryKeys: {
|
|
56
|
+
readonly ActivityEvent: {
|
|
57
|
+
readonly List: "ActivityInsight:ActivityEvent:List";
|
|
58
|
+
readonly GetOne: "ActivityInsight:ActivityEvent:GetOne";
|
|
59
|
+
readonly Aggregate: "ActivityInsight:ActivityEvent:Aggregate";
|
|
60
|
+
};
|
|
61
|
+
readonly ActivityTimeline: {
|
|
62
|
+
readonly Session: "ActivityInsight:ActivityTimeline:Session";
|
|
63
|
+
readonly Journey: "ActivityInsight:ActivityTimeline:Journey";
|
|
64
|
+
readonly Entity: "ActivityInsight:ActivityTimeline:Entity";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
declare const AXMActivityInsightCommandKeys: {
|
|
69
|
+
readonly ActivityEvent: {
|
|
70
|
+
readonly Export: "ActivityInsight:ActivityEvent:Export";
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
declare const AXMActivityInsightTransportKeys: {
|
|
75
|
+
readonly Event: {
|
|
76
|
+
readonly BulkIngest: "ActivityInsight:Event:BulkIngest";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
type AXMActivityEventType = 'action' | 'view' | 'system' | 'error';
|
|
81
|
+
type AXMActivityCategory = 'navigation' | 'entity' | 'command' | 'query' | 'form' | 'ai' | 'workflow' | 'security' | 'error' | 'custom';
|
|
82
|
+
type AXMActivityEventStatus = 'started' | 'completed' | 'failed' | 'cancelled' | 'abandoned';
|
|
83
|
+
type AXMActivityEventSeverity = 'low' | 'normal' | 'high' | 'critical';
|
|
84
|
+
type AXMActivityEventPriority = 'low' | 'normal' | 'high';
|
|
85
|
+
type AXMActivityEventSource = 'frontend' | 'backend';
|
|
86
|
+
interface AXMActivityEvent {
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
type: AXMActivityEventType;
|
|
90
|
+
category: AXMActivityCategory;
|
|
91
|
+
timestamp: string;
|
|
92
|
+
sessionId: string;
|
|
93
|
+
journeyId?: string;
|
|
94
|
+
parentActivityId?: string;
|
|
95
|
+
userId?: string;
|
|
96
|
+
username?: string;
|
|
97
|
+
tenantId?: string;
|
|
98
|
+
applicationId?: string;
|
|
99
|
+
requestId?: string;
|
|
100
|
+
traceId?: string;
|
|
101
|
+
source: AXMActivityEventSource;
|
|
102
|
+
route?: string;
|
|
103
|
+
module?: string;
|
|
104
|
+
entityName?: string;
|
|
105
|
+
entityId?: string;
|
|
106
|
+
viewId?: string;
|
|
107
|
+
widgetId?: string;
|
|
108
|
+
commandName?: string;
|
|
109
|
+
queryName?: string;
|
|
110
|
+
workflowId?: string;
|
|
111
|
+
aiConversationId?: string;
|
|
112
|
+
status?: AXMActivityEventStatus;
|
|
113
|
+
durationMs?: number;
|
|
114
|
+
severity?: AXMActivityEventSeverity;
|
|
115
|
+
priority?: AXMActivityEventPriority;
|
|
116
|
+
properties?: Record<string, unknown>;
|
|
117
|
+
metadata?: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
interface AXMActivityBatch {
|
|
120
|
+
batchId: string;
|
|
121
|
+
sentAt: string;
|
|
122
|
+
events: AXMActivityEvent[];
|
|
123
|
+
}
|
|
124
|
+
interface AXMActivitySession {
|
|
125
|
+
id: string;
|
|
126
|
+
userId?: string;
|
|
127
|
+
tenantId?: string;
|
|
128
|
+
applicationId?: string;
|
|
129
|
+
startedAt: string;
|
|
130
|
+
endedAt?: string;
|
|
131
|
+
}
|
|
132
|
+
interface AXMActivityJourney {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
sessionId: string;
|
|
136
|
+
startedAt: string;
|
|
137
|
+
endedAt?: string;
|
|
138
|
+
status?: AXMActivityEventStatus;
|
|
139
|
+
result?: Record<string, unknown>;
|
|
140
|
+
}
|
|
141
|
+
interface AXMActivityStep {
|
|
142
|
+
activityId: string;
|
|
143
|
+
name: string;
|
|
144
|
+
timestamp: string;
|
|
145
|
+
durationMs?: number;
|
|
146
|
+
status?: AXMActivityEventStatus;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface ActivityInsightScopeContext {
|
|
150
|
+
tenantId: string;
|
|
151
|
+
userId?: string;
|
|
152
|
+
applicationId?: string;
|
|
153
|
+
}
|
|
154
|
+
interface ActivityInsightPagedResult<T> {
|
|
155
|
+
items: T[];
|
|
156
|
+
total: number;
|
|
157
|
+
skip?: number;
|
|
158
|
+
take?: number;
|
|
159
|
+
}
|
|
160
|
+
interface ActivityIngestResultDto {
|
|
161
|
+
accepted: number;
|
|
162
|
+
rejected: number;
|
|
163
|
+
errors: Array<{
|
|
164
|
+
index: number;
|
|
165
|
+
message: string;
|
|
166
|
+
}>;
|
|
167
|
+
}
|
|
168
|
+
interface ActivityIngestBulkDto {
|
|
169
|
+
batchId?: string;
|
|
170
|
+
sentAt?: string;
|
|
171
|
+
events: AXMActivityEvent[];
|
|
172
|
+
}
|
|
173
|
+
interface ActivityQueryDto {
|
|
174
|
+
skip?: number;
|
|
175
|
+
take?: number;
|
|
176
|
+
userId?: string;
|
|
177
|
+
sessionId?: string;
|
|
178
|
+
journeyId?: string;
|
|
179
|
+
entityName?: string;
|
|
180
|
+
entityId?: string;
|
|
181
|
+
commandName?: string;
|
|
182
|
+
queryName?: string;
|
|
183
|
+
requestId?: string;
|
|
184
|
+
traceId?: string;
|
|
185
|
+
category?: string;
|
|
186
|
+
name?: string;
|
|
187
|
+
from?: string;
|
|
188
|
+
to?: string;
|
|
189
|
+
}
|
|
190
|
+
interface ActivityAggregateQueryDto extends ActivityQueryDto {
|
|
191
|
+
groupBy?: Array<'module' | 'entityName' | 'name' | 'userId' | 'category'>;
|
|
192
|
+
interval?: string;
|
|
193
|
+
}
|
|
194
|
+
interface ActivityAggregateBucketDto {
|
|
195
|
+
key: Record<string, string>;
|
|
196
|
+
count: number;
|
|
197
|
+
}
|
|
198
|
+
interface ActivityTimelineDto {
|
|
199
|
+
id: string;
|
|
200
|
+
title: string;
|
|
201
|
+
steps: ActivityTimelineStepDto[];
|
|
202
|
+
}
|
|
203
|
+
interface ActivityTimelineStepDto {
|
|
204
|
+
activityId: string;
|
|
205
|
+
name: string;
|
|
206
|
+
timestamp: string;
|
|
207
|
+
durationMs?: number;
|
|
208
|
+
status?: string;
|
|
209
|
+
category?: string;
|
|
210
|
+
properties?: Record<string, unknown>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare const RootConfig: {
|
|
214
|
+
readonly config: {
|
|
215
|
+
i18n: string;
|
|
216
|
+
};
|
|
217
|
+
readonly module: {
|
|
218
|
+
readonly route: "activity-insight";
|
|
219
|
+
readonly module: "ActivityInsight";
|
|
220
|
+
readonly name: "ActivityInsight";
|
|
221
|
+
readonly title: "@activity-insight:module.title";
|
|
222
|
+
readonly icon: "fa-light fa-chart-network";
|
|
223
|
+
};
|
|
224
|
+
readonly entities: {
|
|
225
|
+
readonly activityEvent: {
|
|
226
|
+
readonly name: "ActivityEvent";
|
|
227
|
+
readonly title: "@activity-insight:entities.activity-event.title";
|
|
228
|
+
readonly titlePlural: "@activity-insight:entities.activity-event.plural";
|
|
229
|
+
readonly icon: "fa-light fa-wave-pulse";
|
|
230
|
+
};
|
|
231
|
+
readonly trackingRule: {
|
|
232
|
+
readonly name: "TrackingRule";
|
|
233
|
+
readonly title: "@activity-insight:entities.tracking-rule.title";
|
|
234
|
+
readonly titlePlural: "@activity-insight:entities.tracking-rule.plural";
|
|
235
|
+
readonly icon: "fa-light fa-sliders";
|
|
236
|
+
};
|
|
237
|
+
readonly activitySavedView: {
|
|
238
|
+
readonly name: "ActivitySavedView";
|
|
239
|
+
readonly title: "@activity-insight:entities.saved-view.title";
|
|
240
|
+
readonly titlePlural: "@activity-insight:entities.saved-view.plural";
|
|
241
|
+
readonly icon: "fa-light fa-bookmark";
|
|
242
|
+
};
|
|
243
|
+
readonly retentionPolicy: {
|
|
244
|
+
readonly name: "RetentionPolicy";
|
|
245
|
+
readonly title: "@activity-insight:entities.retention-policy.title";
|
|
246
|
+
readonly titlePlural: "@activity-insight:entities.retention-policy.plural";
|
|
247
|
+
readonly icon: "fa-light fa-calendar-clock";
|
|
248
|
+
};
|
|
249
|
+
readonly maskingPolicy: {
|
|
250
|
+
readonly name: "MaskingPolicy";
|
|
251
|
+
readonly title: "@activity-insight:entities.masking-policy.title";
|
|
252
|
+
readonly titlePlural: "@activity-insight:entities.masking-policy.plural";
|
|
253
|
+
readonly icon: "fa-light fa-eye-slash";
|
|
254
|
+
};
|
|
255
|
+
readonly samplingPolicy: {
|
|
256
|
+
readonly name: "SamplingPolicy";
|
|
257
|
+
readonly title: "@activity-insight:entities.sampling-policy.title";
|
|
258
|
+
readonly titlePlural: "@activity-insight:entities.sampling-policy.plural";
|
|
259
|
+
readonly icon: "fa-light fa-percent";
|
|
260
|
+
};
|
|
261
|
+
readonly activityDataSource: {
|
|
262
|
+
readonly name: "ActivityDataSource";
|
|
263
|
+
readonly title: "@activity-insight:entities.data-source.title";
|
|
264
|
+
readonly titlePlural: "@activity-insight:entities.data-source.plural";
|
|
265
|
+
readonly icon: "fa-light fa-database";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
declare const AXMActivityEventNames: {
|
|
271
|
+
readonly Page: {
|
|
272
|
+
readonly Viewed: "page.viewed";
|
|
273
|
+
};
|
|
274
|
+
readonly Entity: {
|
|
275
|
+
readonly ListOpened: "entity.list.opened";
|
|
276
|
+
readonly DetailOpened: "entity.detail.opened";
|
|
277
|
+
readonly FilterApplied: "entity.filter.applied";
|
|
278
|
+
readonly SearchApplied: "entity.search.applied";
|
|
279
|
+
readonly SortApplied: "entity.sort.applied";
|
|
280
|
+
readonly Created: "entity.created";
|
|
281
|
+
readonly Updated: "entity.updated";
|
|
282
|
+
readonly Deleted: "entity.deleted";
|
|
283
|
+
};
|
|
284
|
+
readonly Command: {
|
|
285
|
+
readonly Executed: "command.executed";
|
|
286
|
+
};
|
|
287
|
+
readonly Query: {
|
|
288
|
+
readonly Executed: "query.executed";
|
|
289
|
+
};
|
|
290
|
+
readonly Form: {
|
|
291
|
+
readonly Submitted: "form.submitted";
|
|
292
|
+
readonly ValidationFailed: "form.validation.failed";
|
|
293
|
+
readonly FieldChanged: "form.field.changed";
|
|
294
|
+
};
|
|
295
|
+
readonly Ai: {
|
|
296
|
+
readonly ChatStarted: "ai.chat.started";
|
|
297
|
+
readonly MessageSent: "ai.message.sent";
|
|
298
|
+
readonly GenerationStarted: "ai.generation.started";
|
|
299
|
+
readonly GenerationCompleted: "ai.generation.completed";
|
|
300
|
+
readonly GenerationStopped: "ai.generation.stopped";
|
|
301
|
+
readonly ImageGenerated: "ai.image.generated";
|
|
302
|
+
};
|
|
303
|
+
readonly Workflow: {
|
|
304
|
+
readonly ActionOpened: "workflow.action.opened";
|
|
305
|
+
readonly StepTransitioned: "workflow.step.transitioned";
|
|
306
|
+
};
|
|
307
|
+
readonly Security: {
|
|
308
|
+
readonly PermissionAdded: "security.permission.added";
|
|
309
|
+
readonly RoleUpdated: "security.role.updated";
|
|
310
|
+
};
|
|
311
|
+
readonly Error: {
|
|
312
|
+
readonly Seen: "error.seen";
|
|
313
|
+
};
|
|
314
|
+
readonly Process: {
|
|
315
|
+
readonly Abandoned: "process.abandoned";
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
interface AXMActivityTrackingPolicy {
|
|
320
|
+
enabled?: boolean;
|
|
321
|
+
list?: {
|
|
322
|
+
open?: boolean;
|
|
323
|
+
filterApply?: boolean;
|
|
324
|
+
search?: boolean;
|
|
325
|
+
sort?: boolean;
|
|
326
|
+
export?: boolean;
|
|
327
|
+
};
|
|
328
|
+
detail?: {
|
|
329
|
+
open?: boolean;
|
|
330
|
+
tabChange?: boolean;
|
|
331
|
+
};
|
|
332
|
+
form?: {
|
|
333
|
+
createStart?: boolean;
|
|
334
|
+
updateStart?: boolean;
|
|
335
|
+
submit?: boolean;
|
|
336
|
+
validationError?: boolean;
|
|
337
|
+
fieldChange?: {
|
|
338
|
+
enabled?: boolean;
|
|
339
|
+
include?: string[];
|
|
340
|
+
exclude?: string[];
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
commands?: Record<string, boolean | {
|
|
344
|
+
enabled?: boolean;
|
|
345
|
+
severity?: AXMActivityEventSeverity;
|
|
346
|
+
}>;
|
|
347
|
+
queries?: Record<string, boolean>;
|
|
348
|
+
masking?: {
|
|
349
|
+
fields?: string[];
|
|
350
|
+
};
|
|
351
|
+
sampling?: Record<string, number>;
|
|
352
|
+
}
|
|
353
|
+
interface AXMActivityMaskingPolicy {
|
|
354
|
+
enabled?: boolean;
|
|
355
|
+
denylist?: string[];
|
|
356
|
+
allowlist?: string[];
|
|
357
|
+
maxPropertyBytes?: number;
|
|
358
|
+
}
|
|
359
|
+
interface AXMActivitySamplingPolicy {
|
|
360
|
+
rates?: Record<string, number>;
|
|
361
|
+
defaultRate?: number;
|
|
362
|
+
}
|
|
363
|
+
interface AXMActivityRetentionPolicy {
|
|
364
|
+
enabled?: boolean;
|
|
365
|
+
periodDays?: number;
|
|
366
|
+
}
|
|
367
|
+
interface AXMActivityProviderConfig {
|
|
368
|
+
provider: 'noop' | 'console' | 'in-memory' | 'elasticsearch' | 'clickhouse' | 'posthog' | 'matomo' | 'custom-rest';
|
|
369
|
+
options?: Record<string, unknown>;
|
|
370
|
+
}
|
|
371
|
+
interface AXMActivityBufferConfig {
|
|
372
|
+
flushIntervalMs: number;
|
|
373
|
+
maxBatchSize: number;
|
|
374
|
+
maxPayloadBytes: number;
|
|
375
|
+
finalFlushMaxBytes: number;
|
|
376
|
+
maxQueueSize: number;
|
|
377
|
+
retryLimit: number;
|
|
378
|
+
retryBackoffMs: number;
|
|
379
|
+
maxPropertyBytes: number;
|
|
380
|
+
flushOnVisibilityHidden: boolean;
|
|
381
|
+
useBeaconForFinalFlush: boolean;
|
|
382
|
+
}
|
|
383
|
+
declare const AXM_DEFAULT_ACTIVITY_BUFFER_CONFIG: AXMActivityBufferConfig;
|
|
384
|
+
interface AXMActivityTrackingRule {
|
|
385
|
+
source: string;
|
|
386
|
+
eventName: string;
|
|
387
|
+
category?: string;
|
|
388
|
+
priority?: AXMActivityEventPriority;
|
|
389
|
+
severity?: AXMActivityEventSeverity;
|
|
390
|
+
samplingRate?: number;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare const AXM_DEFAULT_MASKING_DENYLIST: readonly ["password", "token", "secret", "accessToken", "refreshToken", "authorization", "apiKey", "privateKey", "creditCard"];
|
|
394
|
+
declare function maskActivityProperties(value: unknown, policy?: AXMActivityMaskingPolicy, depth?: number): unknown;
|
|
395
|
+
declare function truncateActivityProperties(properties: Record<string, unknown> | undefined, maxBytes: number): Record<string, unknown> | undefined;
|
|
396
|
+
|
|
397
|
+
export { AXMActivityEventNames, AXMActivityInsightCommandKeys, AXMActivityInsightMenuKeys, AXMActivityInsightPermissionKeys, AXMActivityInsightQueryKeys, AXMActivityInsightTransportKeys, AXM_DEFAULT_ACTIVITY_BUFFER_CONFIG, AXM_DEFAULT_MASKING_DENYLIST, AXPActivityInsightSettings, AXPInsightsReportingPermissionKeys, RootConfig, maskActivityProperties, truncateActivityProperties };
|
|
398
|
+
export type { AXMActivityBatch, AXMActivityBufferConfig, AXMActivityCategory, AXMActivityEvent, AXMActivityEventPriority, AXMActivityEventSeverity, AXMActivityEventSource, AXMActivityEventStatus, AXMActivityEventType, AXMActivityJourney, AXMActivityMaskingPolicy, AXMActivityProviderConfig, AXMActivityRetentionPolicy, AXMActivitySamplingPolicy, AXMActivitySession, AXMActivityStep, AXMActivityTrackingPolicy, AXMActivityTrackingRule, ActivityAggregateBucketDto, ActivityAggregateQueryDto, ActivityIngestBulkDto, ActivityIngestResultDto, ActivityInsightPagedResult, ActivityInsightScopeContext, ActivityQueryDto, ActivityTimelineDto, ActivityTimelineStepDto };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import * as i1 from '@acorex-platform/framework-client/runtime';
|
|
4
|
+
import * as i2 from '@acorex-platform/framework-client/common';
|
|
5
|
+
import { AXMActivityEvent, AXMActivityJourney, AXMActivityEventStatus, AXMActivityTrackingRule } from '@acorex-platform/module-activity-insight-client/contracts';
|
|
6
|
+
|
|
7
|
+
declare class AXMActivityInsightModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMActivityInsightModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMActivityInsightModule, never, [typeof i1.AXPRuntimeModule, typeof i2.AXPCommonModule], never>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXMActivityInsightModule>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface AXMActivityTrackPayload extends Partial<AXMActivityEvent> {
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
declare class AXMActivityInsightTrackerService {
|
|
17
|
+
private readonly sessionService;
|
|
18
|
+
private readonly settingsService;
|
|
19
|
+
private readonly hooks;
|
|
20
|
+
private readonly policy;
|
|
21
|
+
private readonly transport;
|
|
22
|
+
private readonly journeyService;
|
|
23
|
+
private readonly router;
|
|
24
|
+
private readonly destroyRef;
|
|
25
|
+
private readonly buffer;
|
|
26
|
+
private flushTimer;
|
|
27
|
+
private flushTimerStarting;
|
|
28
|
+
private flushChain;
|
|
29
|
+
private pendingRetry;
|
|
30
|
+
private initialized;
|
|
31
|
+
private visibilityHandlersRegistered;
|
|
32
|
+
private currentJourneyId;
|
|
33
|
+
init(): void;
|
|
34
|
+
track(name: string, payload?: Partial<AXMActivityEvent>): Promise<void>;
|
|
35
|
+
trackMany(events: AXMActivityTrackPayload[]): Promise<void>;
|
|
36
|
+
startJourney(name: string): AXMActivityJourney;
|
|
37
|
+
endJourney(journeyId?: string, status?: AXMActivityEventStatus, result?: Record<string, unknown>): void;
|
|
38
|
+
startActivity(name: string, properties?: Record<string, unknown>): string;
|
|
39
|
+
endActivity(activityId: string, status?: AXMActivityEventStatus, properties?: Record<string, unknown>): void;
|
|
40
|
+
trackPageView(route?: string): void;
|
|
41
|
+
trackClick(name: string, properties?: Record<string, unknown>): void;
|
|
42
|
+
trackEntityListOpen(module: string, entityName: string, properties?: Record<string, unknown>): void;
|
|
43
|
+
trackEntityDetailOpen(module: string, entityName: string, entityId?: string, properties?: Record<string, unknown>): void;
|
|
44
|
+
trackFilterApply(entityName: string, properties?: Record<string, unknown>): void;
|
|
45
|
+
trackSearch(entityName: string, properties?: Record<string, unknown>): void;
|
|
46
|
+
trackSort(entityName: string, properties?: Record<string, unknown>): void;
|
|
47
|
+
trackCommandExecution(commandName: string, options?: {
|
|
48
|
+
success?: boolean;
|
|
49
|
+
durationMs?: number;
|
|
50
|
+
properties?: Record<string, unknown>;
|
|
51
|
+
}): void;
|
|
52
|
+
trackQueryExecution(queryName: string, options?: {
|
|
53
|
+
success?: boolean;
|
|
54
|
+
durationMs?: number;
|
|
55
|
+
properties?: Record<string, unknown>;
|
|
56
|
+
}): void;
|
|
57
|
+
trackFormSubmit(entityName: string, properties?: Record<string, unknown>): void;
|
|
58
|
+
trackValidationError(entityName: string, properties?: Record<string, unknown>): void;
|
|
59
|
+
trackAiInteraction(name: string, properties?: Record<string, unknown>): void;
|
|
60
|
+
trackError(error: unknown, properties?: Record<string, unknown>): void;
|
|
61
|
+
flush(reason?: 'interval' | 'batch-size' | 'manual' | 'visibility' | 'final'): Promise<void>;
|
|
62
|
+
enable(): void;
|
|
63
|
+
disable(): void;
|
|
64
|
+
getSessionId(): string;
|
|
65
|
+
private canTrack;
|
|
66
|
+
private onSessionActive;
|
|
67
|
+
private onSessionInactive;
|
|
68
|
+
private cancelPendingRetry;
|
|
69
|
+
private buildEvent;
|
|
70
|
+
private inferType;
|
|
71
|
+
private inferCategory;
|
|
72
|
+
private ensureSessionId;
|
|
73
|
+
private flushIfNeeded;
|
|
74
|
+
private startFlushTimer;
|
|
75
|
+
private stopFlushTimer;
|
|
76
|
+
private registerVisibilityFlush;
|
|
77
|
+
private scheduleRetry;
|
|
78
|
+
private getSetting;
|
|
79
|
+
private getBufferSetting;
|
|
80
|
+
private clampBufferNumber;
|
|
81
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMActivityInsightTrackerService, never>;
|
|
82
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXMActivityInsightTrackerService>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface ActiveActivity {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
startedAt: string;
|
|
89
|
+
parentActivityId?: string;
|
|
90
|
+
journeyId?: string;
|
|
91
|
+
properties?: Record<string, unknown>;
|
|
92
|
+
}
|
|
93
|
+
interface ActiveJourney {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
sessionId: string;
|
|
97
|
+
startedAt: string;
|
|
98
|
+
}
|
|
99
|
+
declare class AXMActivityInsightJourneyService {
|
|
100
|
+
private readonly activities;
|
|
101
|
+
private readonly journeys;
|
|
102
|
+
startJourney(name: string, sessionId: string): AXMActivityJourney;
|
|
103
|
+
endJourney(journeyId: string, status?: AXMActivityEventStatus, result?: Record<string, unknown>): AXMActivityJourney | null;
|
|
104
|
+
getActiveJourney(journeyId: string): ActiveJourney | undefined;
|
|
105
|
+
startActivity(name: string, options?: {
|
|
106
|
+
parentActivityId?: string;
|
|
107
|
+
journeyId?: string;
|
|
108
|
+
properties?: Record<string, unknown>;
|
|
109
|
+
}): ActiveActivity;
|
|
110
|
+
endActivity(activityId: string, status?: AXMActivityEventStatus, properties?: Record<string, unknown>): (ActiveActivity & {
|
|
111
|
+
endedAt: string;
|
|
112
|
+
status: AXMActivityEventStatus;
|
|
113
|
+
durationMs: number;
|
|
114
|
+
}) | null;
|
|
115
|
+
buildActivityStartedEvent(activity: ActiveActivity, enrich: Partial<AXMActivityEvent>): Partial<AXMActivityEvent>;
|
|
116
|
+
buildActivityEndedEvent(activity: ActiveActivity & {
|
|
117
|
+
endedAt: string;
|
|
118
|
+
status: AXMActivityEventStatus;
|
|
119
|
+
durationMs: number;
|
|
120
|
+
}, enrich: Partial<AXMActivityEvent>): Partial<AXMActivityEvent>;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMActivityInsightJourneyService, never>;
|
|
122
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXMActivityInsightJourneyService>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
interface AXMActivityTrackingRuleProvider {
|
|
126
|
+
module: string;
|
|
127
|
+
rules: AXMActivityTrackingRule[];
|
|
128
|
+
}
|
|
129
|
+
declare const AXM_ACTIVITY_TRACKING_RULE_PROVIDER: InjectionToken<AXMActivityTrackingRuleProvider[]>;
|
|
130
|
+
|
|
131
|
+
export { AXMActivityInsightJourneyService, AXMActivityInsightModule, AXMActivityInsightTrackerService, AXM_ACTIVITY_TRACKING_RULE_PROVIDER };
|