@griddo/api-types 1.0.11 → 1.0.13

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.
@@ -0,0 +1,18 @@
1
+ export type ExportFormat = 'json' | 'xml' | 'csv';
2
+ export type ExportedFile = {
3
+ type: 'single';
4
+ content: string;
5
+ contentType: string;
6
+ fileName: string;
7
+ } | {
8
+ type: 'zip';
9
+ buffer: Buffer;
10
+ contentType: string;
11
+ fileName: string;
12
+ };
13
+ export type ExportResponse = {
14
+ type: ExportedFile['type'];
15
+ contentType: string;
16
+ fileName: string;
17
+ send: string | Buffer;
18
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from './pagination';
2
+ export * from './export';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./pagination"), exports);
18
+ __exportStar(require("./export"), exports);
@@ -1,3 +1,4 @@
1
+ import type { ExportFormat, PaginationRequest } from 'src/common';
1
2
  export declare const LogActivityEventEnum: Record<string, string>;
2
3
  export declare enum ContentType {
3
4
  TEMPLATE = "template",// page
@@ -57,7 +58,7 @@ export interface BaseLogActivityDTO {
57
58
  contentTypePublic?: string;
58
59
  contentTypeTitle?: string;
59
60
  }
60
- type LogActivityUserGrouped<TLogActivity> = LogActivityUserDTO & {
61
+ export type LogActivityUserGrouped<TLogActivity> = LogActivityUserDTO & {
61
62
  logActivity: TLogActivity;
62
63
  };
63
64
  export type LogActivityDTO = Omit<BaseLogActivityDTO, 'createdAt' | 'contentType' | 'contentTypeId' | 'contentTypePublic' | 'contentTypeTitle' | 'userId' | 'siteId' | 'ip' | 'country'> & {
@@ -83,9 +84,17 @@ export type LogActivityUserGroupedLogDTO = LogActivityUserDTO & {
83
84
  LogActivityFormatDTO: Omit<LogActivityDTO, 'user'>[];
84
85
  };
85
86
  export interface LogActivityExportRequest {
86
- format: ('csv' | 'json' | 'xml')[];
87
+ format: ExportFormat[];
87
88
  dateRange: string;
88
89
  startTime?: string | null;
89
90
  maxEvents?: number | null;
90
91
  }
91
- export {};
92
+ export type LogActivityPaginationRequest = Omit<PaginationRequest, 'filters'> & {
93
+ page?: number;
94
+ itemsPerPage?: number;
95
+ date?: string;
96
+ sites?: (number | 'global')[];
97
+ contentTypes?: string[];
98
+ eventTypes?: number[];
99
+ authors?: number[];
100
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@griddo/api-types",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Tipos públicos de la API de Griddo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",