@agenus-io/pixel-backend-sdk 1.1.5 → 1.1.6

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.
@@ -35,5 +35,5 @@ export declare class PixelSDK implements IPixelSdk {
35
35
  EventsDevice({ workSpaceId, startDate, endDate }: IEventsDeviceDTO.Params): Promise<IEventsDeviceDTO.Result>;
36
36
  EventsPerPage({ workSpaceId, startDate, endDate }: IEventsPerPageDTO.Params): Promise<IEventsPerPageDTO.Result>;
37
37
  EventsPerProject({ workSpaceId, startDate, endDate }: IEventsPerProjectDTO.Params): Promise<IEventsPerProjectDTO.Result>;
38
- Summary({ workSpaceId, startDate, endDate }: ISummaryDTO.Params): Promise<ISummaryDTO.Result>;
38
+ Summary({ workSpaceId, startDate, endDate, projectId, pageId }: ISummaryDTO.Params): Promise<ISummaryDTO.Result>;
39
39
  }
@@ -378,7 +378,7 @@ class PixelSDK {
378
378
  throw "Erro ao obter eventos por projeto";
379
379
  }
380
380
  }
381
- async Summary({ workSpaceId, startDate, endDate }) {
381
+ async Summary({ workSpaceId, startDate, endDate, projectId, pageId }) {
382
382
  try {
383
383
  const token = {
384
384
  appId: this.appId,
@@ -387,7 +387,7 @@ class PixelSDK {
387
387
  };
388
388
  const response = await axios_1.default.get(`${this.apiUrl}/metrics/events/summary`, {
389
389
  headers: { "app-id": token.appId, "app-secret-token": token.secretToken, "work-space-id": token.workSpaceId },
390
- params: { startDate, endDate },
390
+ params: { startDate, endDate, projectId, pageId },
391
391
  });
392
392
  return response.data;
393
393
  }
@@ -268,6 +268,8 @@ export declare namespace ISummaryDTO {
268
268
  workSpaceId: string;
269
269
  startDate: Date;
270
270
  endDate: Date;
271
+ projectId?: string;
272
+ pageId?: string;
271
273
  };
272
274
  type Result = {
273
275
  totalVisitors: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenus-io/pixel-backend-sdk",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
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",