@trii/types 2.10.657 → 2.10.658
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.
|
@@ -14,6 +14,148 @@ export declare enum TimeRange {
|
|
|
14
14
|
LAST_60_DAYS = 60,
|
|
15
15
|
CUSTOM = 0
|
|
16
16
|
}
|
|
17
|
+
export declare enum ScheduledReportStatus {
|
|
18
|
+
ACTIVE = "ACTIVE",
|
|
19
|
+
PAUSED = "PAUSED",
|
|
20
|
+
FINISHED = "FINISHED",
|
|
21
|
+
FAILED = "FAILED",
|
|
22
|
+
DELETED = "DELETED"
|
|
23
|
+
}
|
|
24
|
+
export declare enum ScheduledReportFormat {
|
|
25
|
+
XLSX = "XLSX",
|
|
26
|
+
CSV = "CSV",
|
|
27
|
+
JSONL = "JSONL",
|
|
28
|
+
PDF = "PDF"
|
|
29
|
+
}
|
|
30
|
+
export declare enum ScheduledReportDeliveryType {
|
|
31
|
+
EMAIL = "EMAIL",
|
|
32
|
+
DOWNLOAD_CENTER = "DOWNLOAD_CENTER",
|
|
33
|
+
WEBHOOK = "WEBHOOK"
|
|
34
|
+
}
|
|
35
|
+
export declare enum ScheduledReportExecutionStatus {
|
|
36
|
+
QUEUED = "QUEUED",
|
|
37
|
+
RUNNING = "RUNNING",
|
|
38
|
+
SUCCESS = "SUCCESS",
|
|
39
|
+
FAILED = "FAILED",
|
|
40
|
+
CANCELLED = "CANCELLED"
|
|
41
|
+
}
|
|
42
|
+
export declare enum ScheduledReportProcessorStatus {
|
|
43
|
+
ACCEPTED = "ACCEPTED",
|
|
44
|
+
SKIPPED = "SKIPPED",
|
|
45
|
+
COMPLETED = "COMPLETED",
|
|
46
|
+
FAILED = "FAILED"
|
|
47
|
+
}
|
|
48
|
+
export interface ScheduledReportRecipient {
|
|
49
|
+
email: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
userId?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ScheduledReportDelivery {
|
|
54
|
+
type: ScheduledReportDeliveryType;
|
|
55
|
+
recipients?: ScheduledReportRecipient[];
|
|
56
|
+
webhookUrl?: string;
|
|
57
|
+
subjectTemplate?: string;
|
|
58
|
+
messageTemplate?: string;
|
|
59
|
+
attachFile?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface ScheduledReportRuntimeOptions {
|
|
62
|
+
format: ScheduledReportFormat;
|
|
63
|
+
timezone: string;
|
|
64
|
+
includeDetail?: boolean;
|
|
65
|
+
businessHoursOnly?: boolean;
|
|
66
|
+
fieldNameKeys?: string[];
|
|
67
|
+
includeTimeline?: boolean;
|
|
68
|
+
includeSlaHistory?: boolean;
|
|
69
|
+
retentionDays?: number;
|
|
70
|
+
maxRows?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface ScheduledReportProcessorContext {
|
|
73
|
+
scheduledReportId: string;
|
|
74
|
+
executionId: string;
|
|
75
|
+
reportModule: string;
|
|
76
|
+
reportName: string;
|
|
77
|
+
timeRange: TimeRange;
|
|
78
|
+
filter: string;
|
|
79
|
+
options: ScheduledReportRuntimeOptions;
|
|
80
|
+
requestedAt: Date;
|
|
81
|
+
requestedBy?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ScheduledReportProcessorResult {
|
|
84
|
+
status: ScheduledReportProcessorStatus;
|
|
85
|
+
fileName?: string;
|
|
86
|
+
downloadUrl?: string;
|
|
87
|
+
rowCount?: number;
|
|
88
|
+
warningCount?: number;
|
|
89
|
+
warnings?: string[];
|
|
90
|
+
error?: string;
|
|
91
|
+
summary?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ScheduledReportExecution {
|
|
94
|
+
id: string;
|
|
95
|
+
scheduledReportId: string;
|
|
96
|
+
status: ScheduledReportExecutionStatus;
|
|
97
|
+
startedAt: Date;
|
|
98
|
+
finishedAt?: Date | null;
|
|
99
|
+
fileName?: string;
|
|
100
|
+
downloadUrl?: string;
|
|
101
|
+
rowCount?: number;
|
|
102
|
+
warningCount?: number;
|
|
103
|
+
error?: string | null;
|
|
104
|
+
triggeredBy: 'SCHEDULE' | 'MANUAL' | 'RETRY';
|
|
105
|
+
}
|
|
106
|
+
export interface ScheduledReportQuery {
|
|
107
|
+
reportModule?: string;
|
|
108
|
+
reportName?: string;
|
|
109
|
+
status?: ScheduledReportStatus;
|
|
110
|
+
search?: string;
|
|
111
|
+
createdBy?: string;
|
|
112
|
+
limit?: number;
|
|
113
|
+
cursor?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface ScheduledReportPage {
|
|
116
|
+
items: ScheduledReport[];
|
|
117
|
+
nextCursor?: string;
|
|
118
|
+
hasMore: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface CreateScheduledReportDto {
|
|
121
|
+
title: string;
|
|
122
|
+
description?: string;
|
|
123
|
+
reportModule: string;
|
|
124
|
+
reportName: string;
|
|
125
|
+
timeRange: TimeRange;
|
|
126
|
+
filter: string;
|
|
127
|
+
startAt: Date;
|
|
128
|
+
endsAt?: Date | null;
|
|
129
|
+
neverEnds?: boolean;
|
|
130
|
+
sendType: ReportSendType;
|
|
131
|
+
sendOnMonday?: boolean;
|
|
132
|
+
sendOnTuesday?: boolean;
|
|
133
|
+
sendOnWednesday?: boolean;
|
|
134
|
+
sendOnThursday?: boolean;
|
|
135
|
+
sendOnFriday?: boolean;
|
|
136
|
+
sendOnSaturday?: boolean;
|
|
137
|
+
sendOnSunday?: boolean;
|
|
138
|
+
dayOfMonth?: number;
|
|
139
|
+
dayOfWeek?: number;
|
|
140
|
+
sendTo?: string;
|
|
141
|
+
delivery?: ScheduledReportDelivery;
|
|
142
|
+
options?: ScheduledReportRuntimeOptions;
|
|
143
|
+
summary?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface UpdateScheduledReportDto extends Partial<CreateScheduledReportDto> {
|
|
146
|
+
status?: ScheduledReportStatus;
|
|
147
|
+
}
|
|
148
|
+
export interface ScheduledReportApi {
|
|
149
|
+
query(request: ScheduledReportQuery): Promise<ScheduledReportPage>;
|
|
150
|
+
get(id: string): Promise<ScheduledReport>;
|
|
151
|
+
create(payload: CreateScheduledReportDto): Promise<ScheduledReport>;
|
|
152
|
+
update(id: string, payload: UpdateScheduledReportDto): Promise<ScheduledReport>;
|
|
153
|
+
delete(id: string): Promise<void>;
|
|
154
|
+
runNow(id: string): Promise<ScheduledReportExecution>;
|
|
155
|
+
pause(id: string): Promise<ScheduledReport>;
|
|
156
|
+
resume(id: string): Promise<ScheduledReport>;
|
|
157
|
+
executions(id: string, limit?: number): Promise<ScheduledReportExecution[]>;
|
|
158
|
+
}
|
|
17
159
|
export interface ScheduledReport {
|
|
18
160
|
id: string;
|
|
19
161
|
title: string;
|
|
@@ -50,6 +192,10 @@ export interface ScheduledReport {
|
|
|
50
192
|
finished: boolean;
|
|
51
193
|
summary: string;
|
|
52
194
|
nextSend: Date;
|
|
195
|
+
status?: ScheduledReportStatus;
|
|
196
|
+
delivery?: ScheduledReportDelivery;
|
|
197
|
+
options?: ScheduledReportRuntimeOptions;
|
|
198
|
+
lastExecution?: ScheduledReportExecution | null;
|
|
53
199
|
createdBy: string;
|
|
54
200
|
createdAt: Date;
|
|
55
201
|
updatedAt: Date | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimeRange = exports.ReportSendType = void 0;
|
|
3
|
+
exports.ScheduledReportProcessorStatus = exports.ScheduledReportExecutionStatus = exports.ScheduledReportDeliveryType = exports.ScheduledReportFormat = exports.ScheduledReportStatus = exports.TimeRange = exports.ReportSendType = void 0;
|
|
4
4
|
var ReportSendType;
|
|
5
5
|
(function (ReportSendType) {
|
|
6
6
|
ReportSendType[ReportSendType["daily"] = 1] = "daily";
|
|
@@ -19,3 +19,39 @@ var TimeRange;
|
|
|
19
19
|
TimeRange[TimeRange["LAST_60_DAYS"] = 60] = "LAST_60_DAYS";
|
|
20
20
|
TimeRange[TimeRange["CUSTOM"] = 0] = "CUSTOM";
|
|
21
21
|
})(TimeRange || (exports.TimeRange = TimeRange = {}));
|
|
22
|
+
var ScheduledReportStatus;
|
|
23
|
+
(function (ScheduledReportStatus) {
|
|
24
|
+
ScheduledReportStatus["ACTIVE"] = "ACTIVE";
|
|
25
|
+
ScheduledReportStatus["PAUSED"] = "PAUSED";
|
|
26
|
+
ScheduledReportStatus["FINISHED"] = "FINISHED";
|
|
27
|
+
ScheduledReportStatus["FAILED"] = "FAILED";
|
|
28
|
+
ScheduledReportStatus["DELETED"] = "DELETED";
|
|
29
|
+
})(ScheduledReportStatus || (exports.ScheduledReportStatus = ScheduledReportStatus = {}));
|
|
30
|
+
var ScheduledReportFormat;
|
|
31
|
+
(function (ScheduledReportFormat) {
|
|
32
|
+
ScheduledReportFormat["XLSX"] = "XLSX";
|
|
33
|
+
ScheduledReportFormat["CSV"] = "CSV";
|
|
34
|
+
ScheduledReportFormat["JSONL"] = "JSONL";
|
|
35
|
+
ScheduledReportFormat["PDF"] = "PDF";
|
|
36
|
+
})(ScheduledReportFormat || (exports.ScheduledReportFormat = ScheduledReportFormat = {}));
|
|
37
|
+
var ScheduledReportDeliveryType;
|
|
38
|
+
(function (ScheduledReportDeliveryType) {
|
|
39
|
+
ScheduledReportDeliveryType["EMAIL"] = "EMAIL";
|
|
40
|
+
ScheduledReportDeliveryType["DOWNLOAD_CENTER"] = "DOWNLOAD_CENTER";
|
|
41
|
+
ScheduledReportDeliveryType["WEBHOOK"] = "WEBHOOK";
|
|
42
|
+
})(ScheduledReportDeliveryType || (exports.ScheduledReportDeliveryType = ScheduledReportDeliveryType = {}));
|
|
43
|
+
var ScheduledReportExecutionStatus;
|
|
44
|
+
(function (ScheduledReportExecutionStatus) {
|
|
45
|
+
ScheduledReportExecutionStatus["QUEUED"] = "QUEUED";
|
|
46
|
+
ScheduledReportExecutionStatus["RUNNING"] = "RUNNING";
|
|
47
|
+
ScheduledReportExecutionStatus["SUCCESS"] = "SUCCESS";
|
|
48
|
+
ScheduledReportExecutionStatus["FAILED"] = "FAILED";
|
|
49
|
+
ScheduledReportExecutionStatus["CANCELLED"] = "CANCELLED";
|
|
50
|
+
})(ScheduledReportExecutionStatus || (exports.ScheduledReportExecutionStatus = ScheduledReportExecutionStatus = {}));
|
|
51
|
+
var ScheduledReportProcessorStatus;
|
|
52
|
+
(function (ScheduledReportProcessorStatus) {
|
|
53
|
+
ScheduledReportProcessorStatus["ACCEPTED"] = "ACCEPTED";
|
|
54
|
+
ScheduledReportProcessorStatus["SKIPPED"] = "SKIPPED";
|
|
55
|
+
ScheduledReportProcessorStatus["COMPLETED"] = "COMPLETED";
|
|
56
|
+
ScheduledReportProcessorStatus["FAILED"] = "FAILED";
|
|
57
|
+
})(ScheduledReportProcessorStatus || (exports.ScheduledReportProcessorStatus = ScheduledReportProcessorStatus = {}));
|