@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.
- package/dist/common/export.d.ts +18 -0
- package/dist/common/export.js +2 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/logs/activity.d.ts +12 -3
- package/package.json +1 -1
|
@@ -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
|
+
};
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
package/dist/logs/activity.d.ts
CHANGED
|
@@ -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:
|
|
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
|
+
};
|