@agenus-io/pixel-backend-sdk 1.1.8 → 1.1.9

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.
@@ -253,6 +253,125 @@ export declare namespace IEventsPerPageDTO {
253
253
  data: Record<string, number>;
254
254
  };
255
255
  }
256
+ export type DeviceOs = {
257
+ name: string;
258
+ version: string;
259
+ };
260
+ export type DeviceEngine = {
261
+ name: string;
262
+ version: string;
263
+ };
264
+ export type DeviceScreen = {
265
+ width: number;
266
+ height: number;
267
+ pixel_ratio: number;
268
+ };
269
+ export type DeviceBrowser = {
270
+ name: string;
271
+ version: string;
272
+ };
273
+ export type EventDevice = {
274
+ id: string;
275
+ os: DeviceOs;
276
+ type: string;
277
+ engine: DeviceEngine;
278
+ screen: DeviceScreen;
279
+ browser: DeviceBrowser;
280
+ language: string;
281
+ userAgent: string;
282
+ };
283
+ export type EventScriptMeta = {
284
+ pageId: string;
285
+ version: string;
286
+ projectId: string;
287
+ script_url: string;
288
+ environment: string;
289
+ pixel_source: string;
290
+ };
291
+ export type BehaviorSnapshot = {
292
+ state: {
293
+ isIdle: boolean;
294
+ isActive: boolean;
295
+ isVisible: boolean;
296
+ };
297
+ pageId: string;
298
+ scroll: {
299
+ maxDepth: number;
300
+ };
301
+ timing: {
302
+ idleTime: number;
303
+ activeTime: number;
304
+ visibleTime: number;
305
+ };
306
+ sessionId: string;
307
+ timestamp: number;
308
+ visitorId: string;
309
+ engagement: {
310
+ level: string;
311
+ score: number;
312
+ };
313
+ interaction: {
314
+ clicks: number;
315
+ keypresses: number;
316
+ mouseMovements: number;
317
+ };
318
+ };
319
+ export type BehaviorCriticalEvent = {
320
+ type: string;
321
+ pageId: string;
322
+ sessionId: string;
323
+ timestamp: number;
324
+ visitorId: string;
325
+ };
326
+ export type BehaviorSummaryData = {
327
+ path: string;
328
+ hostname: string;
329
+ page_url: string;
330
+ sessionId: string;
331
+ timestamp: number;
332
+ visitorId: string;
333
+ behaviorSnapshots: BehaviorSnapshot[];
334
+ behaviorCriticalEvents: BehaviorCriticalEvent[];
335
+ };
336
+ export type UserIdleData = {
337
+ path: string;
338
+ hostname: string;
339
+ page_url: string;
340
+ active_ms: number;
341
+ timestamp: number;
342
+ idle_threshold_ms: number;
343
+ };
344
+ export type EventPayload = BehaviorSummaryData | UserIdleData | Record<string, unknown>;
345
+ export type EventItem = {
346
+ id: string;
347
+ eventId: string;
348
+ sent: boolean;
349
+ errorType: string;
350
+ errorMessage: string | null;
351
+ sessionId: string;
352
+ currency: string | null;
353
+ type: string;
354
+ category: string;
355
+ timestamp: string;
356
+ fingerprint: string;
357
+ ip: string;
358
+ userAgent: string;
359
+ device: EventDevice;
360
+ data: EventPayload;
361
+ meta: EventScriptMeta;
362
+ pixelId: string;
363
+ createdAt: string;
364
+ updatedAt: string;
365
+ visitorId: string;
366
+ utms: unknown;
367
+ utmSource: string | null;
368
+ utmMedium: string | null;
369
+ utmCampaign: string | null;
370
+ utmContent: string | null;
371
+ utmTerm: string | null;
372
+ pageusProjectId: string | null;
373
+ pageusPageId: string | null;
374
+ };
256
375
  export declare namespace IEventsPerProjectDTO {
257
376
  type Params = {
258
377
  workSpaceId: string;
@@ -265,125 +384,6 @@ export declare namespace IEventsPerProjectDTO {
265
384
  page: number;
266
385
  pageSize: number;
267
386
  };
268
- type DeviceOs = {
269
- name: string;
270
- version: string;
271
- };
272
- type DeviceEngine = {
273
- name: string;
274
- version: string;
275
- };
276
- type DeviceScreen = {
277
- width: number;
278
- height: number;
279
- pixel_ratio: number;
280
- };
281
- type DeviceBrowser = {
282
- name: string;
283
- version: string;
284
- };
285
- type EventDevice = {
286
- id: string;
287
- os: DeviceOs;
288
- type: string;
289
- engine: DeviceEngine;
290
- screen: DeviceScreen;
291
- browser: DeviceBrowser;
292
- language: string;
293
- userAgent: string;
294
- };
295
- type EventScriptMeta = {
296
- pageId: string;
297
- version: string;
298
- projectId: string;
299
- script_url: string;
300
- environment: string;
301
- pixel_source: string;
302
- };
303
- type BehaviorSnapshot = {
304
- state: {
305
- isIdle: boolean;
306
- isActive: boolean;
307
- isVisible: boolean;
308
- };
309
- pageId: string;
310
- scroll: {
311
- maxDepth: number;
312
- };
313
- timing: {
314
- idleTime: number;
315
- activeTime: number;
316
- visibleTime: number;
317
- };
318
- sessionId: string;
319
- timestamp: number;
320
- visitorId: string;
321
- engagement: {
322
- level: string;
323
- score: number;
324
- };
325
- interaction: {
326
- clicks: number;
327
- keypresses: number;
328
- mouseMovements: number;
329
- };
330
- };
331
- type BehaviorCriticalEvent = {
332
- type: string;
333
- pageId: string;
334
- sessionId: string;
335
- timestamp: number;
336
- visitorId: string;
337
- };
338
- type BehaviorSummaryData = {
339
- path: string;
340
- hostname: string;
341
- page_url: string;
342
- sessionId: string;
343
- timestamp: number;
344
- visitorId: string;
345
- behaviorSnapshots: BehaviorSnapshot[];
346
- behaviorCriticalEvents: BehaviorCriticalEvent[];
347
- };
348
- type UserIdleData = {
349
- path: string;
350
- hostname: string;
351
- page_url: string;
352
- active_ms: number;
353
- timestamp: number;
354
- idle_threshold_ms: number;
355
- };
356
- type EventPayload = BehaviorSummaryData | UserIdleData | Record<string, unknown>;
357
- type EventItem = {
358
- id: string;
359
- eventId: string;
360
- sent: boolean;
361
- errorType: string;
362
- errorMessage: string | null;
363
- sessionId: string;
364
- currency: string | null;
365
- type: string;
366
- category: string;
367
- timestamp: string;
368
- fingerprint: string;
369
- ip: string;
370
- userAgent: string;
371
- device: EventDevice;
372
- data: EventPayload;
373
- meta: EventScriptMeta;
374
- pixelId: string;
375
- createdAt: string;
376
- updatedAt: string;
377
- visitorId: string;
378
- utms: unknown;
379
- utmSource: string | null;
380
- utmMedium: string | null;
381
- utmCampaign: string | null;
382
- utmContent: string | null;
383
- utmTerm: string | null;
384
- pageusProjectId: string | null;
385
- pageusPageId: string | null;
386
- };
387
387
  type Result = {
388
388
  data: EventItem[];
389
389
  meta: PaginationMeta;
@@ -511,7 +511,13 @@ export declare namespace IEventGetDTO {
511
511
  category?: string[];
512
512
  };
513
513
  type Result = {
514
- data: Record<string, number>;
514
+ data: EventItem[];
515
+ meta: {
516
+ total: number;
517
+ totalPages: number;
518
+ page: number;
519
+ pageSize: number;
520
+ };
515
521
  };
516
522
  }
517
523
  export interface IPixelSdk {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenus-io/pixel-backend-sdk",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "SDK para envio de vendas para fila AWS SQS do micro-serviço de pixels",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",