@dakkitor/api-contracts 1.1.127 → 1.1.128
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/index.d.ts
CHANGED
|
@@ -1,66 +1,68 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
1
|
+
export * from "./abilities/abilities.contract";
|
|
2
|
+
export * from "./actives/actives.contract";
|
|
3
|
+
export * from "./agent-client-links/agent-client-links.contract";
|
|
4
|
+
export * from "./auth/auth.contract";
|
|
5
|
+
export * from "./bookings/bookings.contract";
|
|
6
|
+
export * from "./call-history/call-history.contract";
|
|
7
|
+
export * from "./client-contacts/client-contacts.contract";
|
|
8
|
+
export * from "./clients/clients.contract";
|
|
9
|
+
export * from "./collaboration-checkings/collaboration-checkings.contract";
|
|
10
|
+
export * from "./collaborations/collaborations.contract";
|
|
11
|
+
export * from "./common/call-rating.schema";
|
|
12
|
+
export * from "./common/common-schemas";
|
|
13
|
+
export * from "./common/error-schemas";
|
|
14
|
+
export * from "./common/openapi-metadata";
|
|
15
|
+
export * from "./common/pagination-query.schema";
|
|
16
|
+
export * from "./common/pagination.schema";
|
|
17
|
+
export * from "./companies/companies.contract";
|
|
18
|
+
export * from "./cron-executions/cron-executions.contract";
|
|
19
|
+
export * from "./curated-workers/curated-workers.contract";
|
|
20
|
+
export * from "./dashboards/agent-daily-metrics.contract";
|
|
21
|
+
export * from "./dashboards/dashboard.contract";
|
|
22
|
+
export * from "./dashboards/dashboard-widgets.contract";
|
|
23
|
+
export * from "./files/files.contract";
|
|
24
|
+
export * from "./health/health.contract";
|
|
25
|
+
export * from "./jobs/jobs.contract";
|
|
26
|
+
export * from "./lead-assignments/lead-assignments.contract";
|
|
27
|
+
export * from "./lead-distribution/agent-lead-distribution.contract";
|
|
28
|
+
export * from "./lead-distribution/lead-distribution-config.contract";
|
|
29
|
+
export * from "./leads/leads.contract";
|
|
30
|
+
export * from "./locations/locations.contract";
|
|
31
|
+
export * from "./monitoring/monitoring.contract";
|
|
32
|
+
export * from "./postcodes/postcodes.contract";
|
|
33
|
+
export * from "./qualifications/qualifications.contract";
|
|
34
|
+
export * from "./trades/trades.contract";
|
|
35
|
+
export * from "./users/users.contract";
|
|
36
|
+
export * from "./workers/workers.contract";
|
|
37
|
+
import { activesContractRouter } from "./actives/actives.contract";
|
|
38
|
+
import { agentClientLinksContract } from "./agent-client-links/agent-client-links.contract";
|
|
39
|
+
import { authContract } from "./auth/auth.contract";
|
|
40
|
+
import { bookingsContractRouter } from "./bookings/bookings.contract";
|
|
41
|
+
import { callHistoryContract } from "./call-history/call-history.contract";
|
|
42
|
+
import { clientContactsContractRouter } from "./client-contacts/client-contacts.contract";
|
|
43
|
+
import { clientsContractRouter } from "./clients/clients.contract";
|
|
44
|
+
import { collaborationCheckingsContract } from "./collaboration-checkings/collaboration-checkings.contract";
|
|
45
|
+
import { collaborationsContractRouter } from "./collaborations/collaborations.contract";
|
|
46
|
+
import { companiesContractRouter } from "./companies/companies.contract";
|
|
47
|
+
import { cronExecutionsContract } from "./cron-executions/cron-executions.contract";
|
|
48
|
+
import { curatedWorkersContract } from "./curated-workers/curated-workers.contract";
|
|
49
|
+
import { agentDailyMetricsContract } from "./dashboards/agent-daily-metrics.contract";
|
|
50
|
+
import { dashboardContract } from "./dashboards/dashboard.contract";
|
|
51
|
+
import { dashboardWidgetsContract } from "./dashboards/dashboard-widgets.contract";
|
|
52
|
+
import { filesContract } from "./files/files.contract";
|
|
53
|
+
import { healthContract } from "./health/health.contract";
|
|
54
|
+
import { jobsContractRouter } from "./jobs/jobs.contract";
|
|
55
|
+
import { leadAssignmentsContract } from "./lead-assignments/lead-assignments.contract";
|
|
56
|
+
import { agentLeadDistributionContract } from "./lead-distribution/agent-lead-distribution.contract";
|
|
57
|
+
import { leadDistributionConfigContract } from "./lead-distribution/lead-distribution-config.contract";
|
|
58
|
+
import { leadsContractRouter } from "./leads/leads.contract";
|
|
59
|
+
import { locationsContract } from "./locations/locations.contract";
|
|
60
|
+
import { monitoringContract } from "./monitoring/monitoring.contract";
|
|
61
|
+
import { postcodesContract } from "./postcodes/postcodes.contract";
|
|
62
|
+
import { qualificationsContract } from "./qualifications/qualifications.contract";
|
|
63
|
+
import { tradesContract } from "./trades/trades.contract";
|
|
64
|
+
import { usersContract } from "./users/users.contract";
|
|
65
|
+
import { workersContractRouter } from "./workers/workers.contract";
|
|
64
66
|
type ApiContractRouter = {
|
|
65
67
|
AgentClientLinks: typeof agentClientLinksContract;
|
|
66
68
|
CallHistory: typeof callHistoryContract;
|
|
@@ -90,6 +92,7 @@ type ApiContractRouter = {
|
|
|
90
92
|
LeadAssignments: typeof leadAssignmentsContract;
|
|
91
93
|
AgentLeadDistribution: typeof agentLeadDistributionContract;
|
|
92
94
|
LeadDistributionConfigs: typeof leadDistributionConfigContract;
|
|
95
|
+
Monitoring: typeof monitoringContract;
|
|
93
96
|
};
|
|
94
97
|
export declare const apiContractRouter: ApiContractRouter;
|
|
95
98
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kDAAkD,CAAC;AACjE,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4DAA4D,CAAC;AAC3E,cAAc,0CAA0C,CAAC;AACzD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8CAA8C,CAAC;AAC7D,cAAc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OAAO,YAAY,CAAC;IAC1B,iBAAiB,EAAE,OAAO,yBAAyB,CAAC;IACpD,SAAS,EAAE,OAAO,iBAAiB,CAAC;IACpC,gBAAgB,EAAE,OAAO,wBAAwB,CAAC;IAClD,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,eAAe,EAAE,OAAO,uBAAuB,CAAC;IAChD,qBAAqB,EAAE,OAAO,6BAA6B,CAAC;IAC5D,uBAAuB,EAAE,OAAO,8BAA8B,CAAC;IAC/D,UAAU,EAAE,OAAO,kBAAkB,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBA8B9B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __exportStar(require("./lead-distribution/agent-lead-distribution.contract"), ex
|
|
|
45
45
|
__exportStar(require("./lead-distribution/lead-distribution-config.contract"), exports);
|
|
46
46
|
__exportStar(require("./leads/leads.contract"), exports);
|
|
47
47
|
__exportStar(require("./locations/locations.contract"), exports);
|
|
48
|
+
__exportStar(require("./monitoring/monitoring.contract"), exports);
|
|
48
49
|
__exportStar(require("./postcodes/postcodes.contract"), exports);
|
|
49
50
|
__exportStar(require("./qualifications/qualifications.contract"), exports);
|
|
50
51
|
__exportStar(require("./trades/trades.contract"), exports);
|
|
@@ -74,6 +75,7 @@ const agent_lead_distribution_contract_1 = require("./lead-distribution/agent-le
|
|
|
74
75
|
const lead_distribution_config_contract_1 = require("./lead-distribution/lead-distribution-config.contract");
|
|
75
76
|
const leads_contract_1 = require("./leads/leads.contract");
|
|
76
77
|
const locations_contract_1 = require("./locations/locations.contract");
|
|
78
|
+
const monitoring_contract_1 = require("./monitoring/monitoring.contract");
|
|
77
79
|
const postcodes_contract_1 = require("./postcodes/postcodes.contract");
|
|
78
80
|
const qualifications_contract_1 = require("./qualifications/qualifications.contract");
|
|
79
81
|
const trades_contract_1 = require("./trades/trades.contract");
|
|
@@ -109,4 +111,5 @@ exports.apiContractRouter = c.router({
|
|
|
109
111
|
LeadAssignments: lead_assignments_contract_1.leadAssignmentsContract,
|
|
110
112
|
AgentLeadDistribution: agent_lead_distribution_contract_1.agentLeadDistributionContract,
|
|
111
113
|
LeadDistributionConfigs: lead_distribution_config_contract_1.leadDistributionConfigContract,
|
|
114
|
+
Monitoring: monitoring_contract_1.monitoringContract,
|
|
112
115
|
});
|
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const LogLevelSchema: z.ZodEnum<["error", "warn", "info", "debug"]>;
|
|
3
|
+
export declare const LogEntrySchema: z.ZodObject<{
|
|
4
|
+
timestamp: z.ZodString;
|
|
5
|
+
level: z.ZodEnum<["error", "warn", "info", "debug"]>;
|
|
6
|
+
message: z.ZodString;
|
|
7
|
+
context: z.ZodOptional<z.ZodString>;
|
|
8
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
timestamp: string;
|
|
12
|
+
level: "error" | "warn" | "info" | "debug";
|
|
13
|
+
message: string;
|
|
14
|
+
context?: string | undefined;
|
|
15
|
+
correlationId?: string | undefined;
|
|
16
|
+
metadata?: Record<string, unknown> | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
timestamp: string;
|
|
19
|
+
level: "error" | "warn" | "info" | "debug";
|
|
20
|
+
message: string;
|
|
21
|
+
context?: string | undefined;
|
|
22
|
+
correlationId?: string | undefined;
|
|
23
|
+
metadata?: Record<string, unknown> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const SlowestEndpointSchema: z.ZodObject<{
|
|
26
|
+
route: z.ZodString;
|
|
27
|
+
method: z.ZodString;
|
|
28
|
+
avgDurationMs: z.ZodNumber;
|
|
29
|
+
p95DurationMs: z.ZodNumber;
|
|
30
|
+
count: z.ZodNumber;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
route: string;
|
|
33
|
+
method: string;
|
|
34
|
+
avgDurationMs: number;
|
|
35
|
+
p95DurationMs: number;
|
|
36
|
+
count: number;
|
|
37
|
+
}, {
|
|
38
|
+
route: string;
|
|
39
|
+
method: string;
|
|
40
|
+
avgDurationMs: number;
|
|
41
|
+
p95DurationMs: number;
|
|
42
|
+
count: number;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const MetricsSummarySchema: z.ZodObject<{
|
|
45
|
+
totalRequests: z.ZodNumber;
|
|
46
|
+
errorRate: z.ZodNumber;
|
|
47
|
+
avgResponseTimeMs: z.ZodNumber;
|
|
48
|
+
requestsPerMinute: z.ZodNumber;
|
|
49
|
+
slowestEndpoints: z.ZodArray<z.ZodObject<{
|
|
50
|
+
route: z.ZodString;
|
|
51
|
+
method: z.ZodString;
|
|
52
|
+
avgDurationMs: z.ZodNumber;
|
|
53
|
+
p95DurationMs: z.ZodNumber;
|
|
54
|
+
count: z.ZodNumber;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
route: string;
|
|
57
|
+
method: string;
|
|
58
|
+
avgDurationMs: number;
|
|
59
|
+
p95DurationMs: number;
|
|
60
|
+
count: number;
|
|
61
|
+
}, {
|
|
62
|
+
route: string;
|
|
63
|
+
method: string;
|
|
64
|
+
avgDurationMs: number;
|
|
65
|
+
p95DurationMs: number;
|
|
66
|
+
count: number;
|
|
67
|
+
}>, "many">;
|
|
68
|
+
timestamp: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
timestamp: string;
|
|
71
|
+
totalRequests: number;
|
|
72
|
+
errorRate: number;
|
|
73
|
+
avgResponseTimeMs: number;
|
|
74
|
+
requestsPerMinute: number;
|
|
75
|
+
slowestEndpoints: {
|
|
76
|
+
route: string;
|
|
77
|
+
method: string;
|
|
78
|
+
avgDurationMs: number;
|
|
79
|
+
p95DurationMs: number;
|
|
80
|
+
count: number;
|
|
81
|
+
}[];
|
|
82
|
+
}, {
|
|
83
|
+
timestamp: string;
|
|
84
|
+
totalRequests: number;
|
|
85
|
+
errorRate: number;
|
|
86
|
+
avgResponseTimeMs: number;
|
|
87
|
+
requestsPerMinute: number;
|
|
88
|
+
slowestEndpoints: {
|
|
89
|
+
route: string;
|
|
90
|
+
method: string;
|
|
91
|
+
avgDurationMs: number;
|
|
92
|
+
p95DurationMs: number;
|
|
93
|
+
count: number;
|
|
94
|
+
}[];
|
|
95
|
+
}>;
|
|
96
|
+
export type LogLevel = z.infer<typeof LogLevelSchema>;
|
|
97
|
+
export type LogEntry = z.infer<typeof LogEntrySchema>;
|
|
98
|
+
export type SlowestEndpoint = z.infer<typeof SlowestEndpointSchema>;
|
|
99
|
+
export type MetricsSummary = z.infer<typeof MetricsSummarySchema>;
|
|
100
|
+
export declare const monitoringContract: {
|
|
101
|
+
getMetrics: {
|
|
102
|
+
metadata: {
|
|
103
|
+
tags: string[];
|
|
104
|
+
openApi: {
|
|
105
|
+
operationId: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
method: "GET";
|
|
109
|
+
summary: "Get monitoring metrics";
|
|
110
|
+
path: "/v2/monitoring/metrics";
|
|
111
|
+
responses: {
|
|
112
|
+
400: z.ZodObject<{
|
|
113
|
+
statusCode: z.ZodNumber;
|
|
114
|
+
message: z.ZodString;
|
|
115
|
+
code: z.ZodString;
|
|
116
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
117
|
+
timestamp: z.ZodString;
|
|
118
|
+
path: z.ZodString;
|
|
119
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
timestamp: string;
|
|
122
|
+
message: string;
|
|
123
|
+
code: string;
|
|
124
|
+
path: string;
|
|
125
|
+
statusCode: number;
|
|
126
|
+
correlationId?: string | undefined;
|
|
127
|
+
details?: unknown;
|
|
128
|
+
}, {
|
|
129
|
+
timestamp: string;
|
|
130
|
+
message: string;
|
|
131
|
+
code: string;
|
|
132
|
+
path: string;
|
|
133
|
+
statusCode: number;
|
|
134
|
+
correlationId?: string | undefined;
|
|
135
|
+
details?: unknown;
|
|
136
|
+
}>;
|
|
137
|
+
401: z.ZodObject<{
|
|
138
|
+
statusCode: z.ZodNumber;
|
|
139
|
+
message: z.ZodString;
|
|
140
|
+
code: z.ZodString;
|
|
141
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
142
|
+
timestamp: z.ZodString;
|
|
143
|
+
path: z.ZodString;
|
|
144
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
timestamp: string;
|
|
147
|
+
message: string;
|
|
148
|
+
code: string;
|
|
149
|
+
path: string;
|
|
150
|
+
statusCode: number;
|
|
151
|
+
correlationId?: string | undefined;
|
|
152
|
+
details?: unknown;
|
|
153
|
+
}, {
|
|
154
|
+
timestamp: string;
|
|
155
|
+
message: string;
|
|
156
|
+
code: string;
|
|
157
|
+
path: string;
|
|
158
|
+
statusCode: number;
|
|
159
|
+
correlationId?: string | undefined;
|
|
160
|
+
details?: unknown;
|
|
161
|
+
}>;
|
|
162
|
+
403: z.ZodObject<{
|
|
163
|
+
statusCode: z.ZodNumber;
|
|
164
|
+
message: z.ZodString;
|
|
165
|
+
code: z.ZodString;
|
|
166
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
167
|
+
timestamp: z.ZodString;
|
|
168
|
+
path: z.ZodString;
|
|
169
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
timestamp: string;
|
|
172
|
+
message: string;
|
|
173
|
+
code: string;
|
|
174
|
+
path: string;
|
|
175
|
+
statusCode: number;
|
|
176
|
+
correlationId?: string | undefined;
|
|
177
|
+
details?: unknown;
|
|
178
|
+
}, {
|
|
179
|
+
timestamp: string;
|
|
180
|
+
message: string;
|
|
181
|
+
code: string;
|
|
182
|
+
path: string;
|
|
183
|
+
statusCode: number;
|
|
184
|
+
correlationId?: string | undefined;
|
|
185
|
+
details?: unknown;
|
|
186
|
+
}>;
|
|
187
|
+
500: z.ZodObject<{
|
|
188
|
+
statusCode: z.ZodNumber;
|
|
189
|
+
message: z.ZodString;
|
|
190
|
+
code: z.ZodString;
|
|
191
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
192
|
+
timestamp: z.ZodString;
|
|
193
|
+
path: z.ZodString;
|
|
194
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
timestamp: string;
|
|
197
|
+
message: string;
|
|
198
|
+
code: string;
|
|
199
|
+
path: string;
|
|
200
|
+
statusCode: number;
|
|
201
|
+
correlationId?: string | undefined;
|
|
202
|
+
details?: unknown;
|
|
203
|
+
}, {
|
|
204
|
+
timestamp: string;
|
|
205
|
+
message: string;
|
|
206
|
+
code: string;
|
|
207
|
+
path: string;
|
|
208
|
+
statusCode: number;
|
|
209
|
+
correlationId?: string | undefined;
|
|
210
|
+
details?: unknown;
|
|
211
|
+
}>;
|
|
212
|
+
200: z.ZodObject<{
|
|
213
|
+
totalRequests: z.ZodNumber;
|
|
214
|
+
errorRate: z.ZodNumber;
|
|
215
|
+
avgResponseTimeMs: z.ZodNumber;
|
|
216
|
+
requestsPerMinute: z.ZodNumber;
|
|
217
|
+
slowestEndpoints: z.ZodArray<z.ZodObject<{
|
|
218
|
+
route: z.ZodString;
|
|
219
|
+
method: z.ZodString;
|
|
220
|
+
avgDurationMs: z.ZodNumber;
|
|
221
|
+
p95DurationMs: z.ZodNumber;
|
|
222
|
+
count: z.ZodNumber;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
route: string;
|
|
225
|
+
method: string;
|
|
226
|
+
avgDurationMs: number;
|
|
227
|
+
p95DurationMs: number;
|
|
228
|
+
count: number;
|
|
229
|
+
}, {
|
|
230
|
+
route: string;
|
|
231
|
+
method: string;
|
|
232
|
+
avgDurationMs: number;
|
|
233
|
+
p95DurationMs: number;
|
|
234
|
+
count: number;
|
|
235
|
+
}>, "many">;
|
|
236
|
+
timestamp: z.ZodString;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
timestamp: string;
|
|
239
|
+
totalRequests: number;
|
|
240
|
+
errorRate: number;
|
|
241
|
+
avgResponseTimeMs: number;
|
|
242
|
+
requestsPerMinute: number;
|
|
243
|
+
slowestEndpoints: {
|
|
244
|
+
route: string;
|
|
245
|
+
method: string;
|
|
246
|
+
avgDurationMs: number;
|
|
247
|
+
p95DurationMs: number;
|
|
248
|
+
count: number;
|
|
249
|
+
}[];
|
|
250
|
+
}, {
|
|
251
|
+
timestamp: string;
|
|
252
|
+
totalRequests: number;
|
|
253
|
+
errorRate: number;
|
|
254
|
+
avgResponseTimeMs: number;
|
|
255
|
+
requestsPerMinute: number;
|
|
256
|
+
slowestEndpoints: {
|
|
257
|
+
route: string;
|
|
258
|
+
method: string;
|
|
259
|
+
avgDurationMs: number;
|
|
260
|
+
p95DurationMs: number;
|
|
261
|
+
count: number;
|
|
262
|
+
}[];
|
|
263
|
+
}>;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
getLogs: {
|
|
267
|
+
metadata: {
|
|
268
|
+
tags: string[];
|
|
269
|
+
openApi: {
|
|
270
|
+
operationId: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
method: "GET";
|
|
274
|
+
query: z.ZodObject<{
|
|
275
|
+
level: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
|
|
276
|
+
search: z.ZodOptional<z.ZodString>;
|
|
277
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
278
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
279
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
280
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
281
|
+
}, "strip", z.ZodTypeAny, {
|
|
282
|
+
limit: number;
|
|
283
|
+
level?: "error" | "warn" | "info" | "debug" | undefined;
|
|
284
|
+
search?: string | undefined;
|
|
285
|
+
startTime?: string | undefined;
|
|
286
|
+
endTime?: string | undefined;
|
|
287
|
+
cursor?: string | undefined;
|
|
288
|
+
}, {
|
|
289
|
+
level?: "error" | "warn" | "info" | "debug" | undefined;
|
|
290
|
+
search?: string | undefined;
|
|
291
|
+
startTime?: string | undefined;
|
|
292
|
+
endTime?: string | undefined;
|
|
293
|
+
limit?: number | undefined;
|
|
294
|
+
cursor?: string | undefined;
|
|
295
|
+
}>;
|
|
296
|
+
summary: "Get monitoring logs";
|
|
297
|
+
path: "/v2/monitoring/logs";
|
|
298
|
+
responses: {
|
|
299
|
+
400: z.ZodObject<{
|
|
300
|
+
statusCode: z.ZodNumber;
|
|
301
|
+
message: z.ZodString;
|
|
302
|
+
code: z.ZodString;
|
|
303
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
304
|
+
timestamp: z.ZodString;
|
|
305
|
+
path: z.ZodString;
|
|
306
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
timestamp: string;
|
|
309
|
+
message: string;
|
|
310
|
+
code: string;
|
|
311
|
+
path: string;
|
|
312
|
+
statusCode: number;
|
|
313
|
+
correlationId?: string | undefined;
|
|
314
|
+
details?: unknown;
|
|
315
|
+
}, {
|
|
316
|
+
timestamp: string;
|
|
317
|
+
message: string;
|
|
318
|
+
code: string;
|
|
319
|
+
path: string;
|
|
320
|
+
statusCode: number;
|
|
321
|
+
correlationId?: string | undefined;
|
|
322
|
+
details?: unknown;
|
|
323
|
+
}>;
|
|
324
|
+
401: z.ZodObject<{
|
|
325
|
+
statusCode: z.ZodNumber;
|
|
326
|
+
message: z.ZodString;
|
|
327
|
+
code: z.ZodString;
|
|
328
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
329
|
+
timestamp: z.ZodString;
|
|
330
|
+
path: z.ZodString;
|
|
331
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
timestamp: string;
|
|
334
|
+
message: string;
|
|
335
|
+
code: string;
|
|
336
|
+
path: string;
|
|
337
|
+
statusCode: number;
|
|
338
|
+
correlationId?: string | undefined;
|
|
339
|
+
details?: unknown;
|
|
340
|
+
}, {
|
|
341
|
+
timestamp: string;
|
|
342
|
+
message: string;
|
|
343
|
+
code: string;
|
|
344
|
+
path: string;
|
|
345
|
+
statusCode: number;
|
|
346
|
+
correlationId?: string | undefined;
|
|
347
|
+
details?: unknown;
|
|
348
|
+
}>;
|
|
349
|
+
403: z.ZodObject<{
|
|
350
|
+
statusCode: z.ZodNumber;
|
|
351
|
+
message: z.ZodString;
|
|
352
|
+
code: z.ZodString;
|
|
353
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
354
|
+
timestamp: z.ZodString;
|
|
355
|
+
path: z.ZodString;
|
|
356
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
timestamp: string;
|
|
359
|
+
message: string;
|
|
360
|
+
code: string;
|
|
361
|
+
path: string;
|
|
362
|
+
statusCode: number;
|
|
363
|
+
correlationId?: string | undefined;
|
|
364
|
+
details?: unknown;
|
|
365
|
+
}, {
|
|
366
|
+
timestamp: string;
|
|
367
|
+
message: string;
|
|
368
|
+
code: string;
|
|
369
|
+
path: string;
|
|
370
|
+
statusCode: number;
|
|
371
|
+
correlationId?: string | undefined;
|
|
372
|
+
details?: unknown;
|
|
373
|
+
}>;
|
|
374
|
+
500: z.ZodObject<{
|
|
375
|
+
statusCode: z.ZodNumber;
|
|
376
|
+
message: z.ZodString;
|
|
377
|
+
code: z.ZodString;
|
|
378
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
379
|
+
timestamp: z.ZodString;
|
|
380
|
+
path: z.ZodString;
|
|
381
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, "strip", z.ZodTypeAny, {
|
|
383
|
+
timestamp: string;
|
|
384
|
+
message: string;
|
|
385
|
+
code: string;
|
|
386
|
+
path: string;
|
|
387
|
+
statusCode: number;
|
|
388
|
+
correlationId?: string | undefined;
|
|
389
|
+
details?: unknown;
|
|
390
|
+
}, {
|
|
391
|
+
timestamp: string;
|
|
392
|
+
message: string;
|
|
393
|
+
code: string;
|
|
394
|
+
path: string;
|
|
395
|
+
statusCode: number;
|
|
396
|
+
correlationId?: string | undefined;
|
|
397
|
+
details?: unknown;
|
|
398
|
+
}>;
|
|
399
|
+
200: z.ZodObject<{
|
|
400
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
401
|
+
timestamp: z.ZodString;
|
|
402
|
+
level: z.ZodEnum<["error", "warn", "info", "debug"]>;
|
|
403
|
+
message: z.ZodString;
|
|
404
|
+
context: z.ZodOptional<z.ZodString>;
|
|
405
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
406
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
407
|
+
}, "strip", z.ZodTypeAny, {
|
|
408
|
+
timestamp: string;
|
|
409
|
+
level: "error" | "warn" | "info" | "debug";
|
|
410
|
+
message: string;
|
|
411
|
+
context?: string | undefined;
|
|
412
|
+
correlationId?: string | undefined;
|
|
413
|
+
metadata?: Record<string, unknown> | undefined;
|
|
414
|
+
}, {
|
|
415
|
+
timestamp: string;
|
|
416
|
+
level: "error" | "warn" | "info" | "debug";
|
|
417
|
+
message: string;
|
|
418
|
+
context?: string | undefined;
|
|
419
|
+
correlationId?: string | undefined;
|
|
420
|
+
metadata?: Record<string, unknown> | undefined;
|
|
421
|
+
}>, "many">;
|
|
422
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
423
|
+
hasMore: z.ZodBoolean;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
logs: {
|
|
426
|
+
timestamp: string;
|
|
427
|
+
level: "error" | "warn" | "info" | "debug";
|
|
428
|
+
message: string;
|
|
429
|
+
context?: string | undefined;
|
|
430
|
+
correlationId?: string | undefined;
|
|
431
|
+
metadata?: Record<string, unknown> | undefined;
|
|
432
|
+
}[];
|
|
433
|
+
nextCursor: string | null;
|
|
434
|
+
hasMore: boolean;
|
|
435
|
+
}, {
|
|
436
|
+
logs: {
|
|
437
|
+
timestamp: string;
|
|
438
|
+
level: "error" | "warn" | "info" | "debug";
|
|
439
|
+
message: string;
|
|
440
|
+
context?: string | undefined;
|
|
441
|
+
correlationId?: string | undefined;
|
|
442
|
+
metadata?: Record<string, unknown> | undefined;
|
|
443
|
+
}[];
|
|
444
|
+
nextCursor: string | null;
|
|
445
|
+
hasMore: boolean;
|
|
446
|
+
}>;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
getLogsTail: {
|
|
450
|
+
metadata: {
|
|
451
|
+
tags: string[];
|
|
452
|
+
openApi: {
|
|
453
|
+
operationId: string;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
method: "GET";
|
|
457
|
+
query: z.ZodObject<{
|
|
458
|
+
since: z.ZodString;
|
|
459
|
+
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
since: string;
|
|
461
|
+
}, {
|
|
462
|
+
since: string;
|
|
463
|
+
}>;
|
|
464
|
+
summary: "Tail monitoring logs";
|
|
465
|
+
path: "/v2/monitoring/logs/tail";
|
|
466
|
+
responses: {
|
|
467
|
+
400: z.ZodObject<{
|
|
468
|
+
statusCode: z.ZodNumber;
|
|
469
|
+
message: z.ZodString;
|
|
470
|
+
code: z.ZodString;
|
|
471
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
472
|
+
timestamp: z.ZodString;
|
|
473
|
+
path: z.ZodString;
|
|
474
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
475
|
+
}, "strip", z.ZodTypeAny, {
|
|
476
|
+
timestamp: string;
|
|
477
|
+
message: string;
|
|
478
|
+
code: string;
|
|
479
|
+
path: string;
|
|
480
|
+
statusCode: number;
|
|
481
|
+
correlationId?: string | undefined;
|
|
482
|
+
details?: unknown;
|
|
483
|
+
}, {
|
|
484
|
+
timestamp: string;
|
|
485
|
+
message: string;
|
|
486
|
+
code: string;
|
|
487
|
+
path: string;
|
|
488
|
+
statusCode: number;
|
|
489
|
+
correlationId?: string | undefined;
|
|
490
|
+
details?: unknown;
|
|
491
|
+
}>;
|
|
492
|
+
401: z.ZodObject<{
|
|
493
|
+
statusCode: z.ZodNumber;
|
|
494
|
+
message: z.ZodString;
|
|
495
|
+
code: z.ZodString;
|
|
496
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
497
|
+
timestamp: z.ZodString;
|
|
498
|
+
path: z.ZodString;
|
|
499
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
timestamp: string;
|
|
502
|
+
message: string;
|
|
503
|
+
code: string;
|
|
504
|
+
path: string;
|
|
505
|
+
statusCode: number;
|
|
506
|
+
correlationId?: string | undefined;
|
|
507
|
+
details?: unknown;
|
|
508
|
+
}, {
|
|
509
|
+
timestamp: string;
|
|
510
|
+
message: string;
|
|
511
|
+
code: string;
|
|
512
|
+
path: string;
|
|
513
|
+
statusCode: number;
|
|
514
|
+
correlationId?: string | undefined;
|
|
515
|
+
details?: unknown;
|
|
516
|
+
}>;
|
|
517
|
+
403: z.ZodObject<{
|
|
518
|
+
statusCode: z.ZodNumber;
|
|
519
|
+
message: z.ZodString;
|
|
520
|
+
code: z.ZodString;
|
|
521
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
522
|
+
timestamp: z.ZodString;
|
|
523
|
+
path: z.ZodString;
|
|
524
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
525
|
+
}, "strip", z.ZodTypeAny, {
|
|
526
|
+
timestamp: string;
|
|
527
|
+
message: string;
|
|
528
|
+
code: string;
|
|
529
|
+
path: string;
|
|
530
|
+
statusCode: number;
|
|
531
|
+
correlationId?: string | undefined;
|
|
532
|
+
details?: unknown;
|
|
533
|
+
}, {
|
|
534
|
+
timestamp: string;
|
|
535
|
+
message: string;
|
|
536
|
+
code: string;
|
|
537
|
+
path: string;
|
|
538
|
+
statusCode: number;
|
|
539
|
+
correlationId?: string | undefined;
|
|
540
|
+
details?: unknown;
|
|
541
|
+
}>;
|
|
542
|
+
500: z.ZodObject<{
|
|
543
|
+
statusCode: z.ZodNumber;
|
|
544
|
+
message: z.ZodString;
|
|
545
|
+
code: z.ZodString;
|
|
546
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
547
|
+
timestamp: z.ZodString;
|
|
548
|
+
path: z.ZodString;
|
|
549
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
550
|
+
}, "strip", z.ZodTypeAny, {
|
|
551
|
+
timestamp: string;
|
|
552
|
+
message: string;
|
|
553
|
+
code: string;
|
|
554
|
+
path: string;
|
|
555
|
+
statusCode: number;
|
|
556
|
+
correlationId?: string | undefined;
|
|
557
|
+
details?: unknown;
|
|
558
|
+
}, {
|
|
559
|
+
timestamp: string;
|
|
560
|
+
message: string;
|
|
561
|
+
code: string;
|
|
562
|
+
path: string;
|
|
563
|
+
statusCode: number;
|
|
564
|
+
correlationId?: string | undefined;
|
|
565
|
+
details?: unknown;
|
|
566
|
+
}>;
|
|
567
|
+
200: z.ZodObject<{
|
|
568
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
569
|
+
timestamp: z.ZodString;
|
|
570
|
+
level: z.ZodEnum<["error", "warn", "info", "debug"]>;
|
|
571
|
+
message: z.ZodString;
|
|
572
|
+
context: z.ZodOptional<z.ZodString>;
|
|
573
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
574
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
575
|
+
}, "strip", z.ZodTypeAny, {
|
|
576
|
+
timestamp: string;
|
|
577
|
+
level: "error" | "warn" | "info" | "debug";
|
|
578
|
+
message: string;
|
|
579
|
+
context?: string | undefined;
|
|
580
|
+
correlationId?: string | undefined;
|
|
581
|
+
metadata?: Record<string, unknown> | undefined;
|
|
582
|
+
}, {
|
|
583
|
+
timestamp: string;
|
|
584
|
+
level: "error" | "warn" | "info" | "debug";
|
|
585
|
+
message: string;
|
|
586
|
+
context?: string | undefined;
|
|
587
|
+
correlationId?: string | undefined;
|
|
588
|
+
metadata?: Record<string, unknown> | undefined;
|
|
589
|
+
}>, "many">;
|
|
590
|
+
lastTimestamp: z.ZodString;
|
|
591
|
+
}, "strip", z.ZodTypeAny, {
|
|
592
|
+
logs: {
|
|
593
|
+
timestamp: string;
|
|
594
|
+
level: "error" | "warn" | "info" | "debug";
|
|
595
|
+
message: string;
|
|
596
|
+
context?: string | undefined;
|
|
597
|
+
correlationId?: string | undefined;
|
|
598
|
+
metadata?: Record<string, unknown> | undefined;
|
|
599
|
+
}[];
|
|
600
|
+
lastTimestamp: string;
|
|
601
|
+
}, {
|
|
602
|
+
logs: {
|
|
603
|
+
timestamp: string;
|
|
604
|
+
level: "error" | "warn" | "info" | "debug";
|
|
605
|
+
message: string;
|
|
606
|
+
context?: string | undefined;
|
|
607
|
+
correlationId?: string | undefined;
|
|
608
|
+
metadata?: Record<string, unknown> | undefined;
|
|
609
|
+
}[];
|
|
610
|
+
lastTimestamp: string;
|
|
611
|
+
}>;
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
//# sourceMappingURL=monitoring.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitoring.contract.d.ts","sourceRoot":"","sources":["../../contracts/monitoring/monitoring.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc,+CAEM,CAAC;AAElC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EASM,CAAC;AAElC,e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exports.monitoringContract = exports.MetricsSummarySchema = exports.SlowestEndpointSchema = exports.LogEntrySchema = exports.LogLevelSchema = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
|
+
const core_1 = require("@ts-rest/core");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const error_schemas_1 = require("../common/error-schemas");
|
|
8
|
+
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
9
|
+
exports.LogLevelSchema = zod_1.z
|
|
10
|
+
.enum(["error", "warn", "info", "debug"])
|
|
11
|
+
.openapi({ title: "LogLevel" });
|
|
12
|
+
exports.LogEntrySchema = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
timestamp: zod_1.z.string().datetime().describe("Log entry timestamp"),
|
|
15
|
+
level: exports.LogLevelSchema.describe("Log level"),
|
|
16
|
+
message: zod_1.z.string().describe("Log message"),
|
|
17
|
+
context: zod_1.z.string().optional().describe("Log context/category"),
|
|
18
|
+
correlationId: zod_1.z.string().optional().describe("Request correlation ID"),
|
|
19
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).optional().describe("Additional metadata"),
|
|
20
|
+
})
|
|
21
|
+
.openapi({ title: "LogEntry" });
|
|
22
|
+
exports.SlowestEndpointSchema = zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
route: zod_1.z.string().describe("Route path"),
|
|
25
|
+
method: zod_1.z.string().describe("HTTP method"),
|
|
26
|
+
avgDurationMs: zod_1.z.number().describe("Average duration in ms"),
|
|
27
|
+
p95DurationMs: zod_1.z.number().describe("95th percentile duration in ms"),
|
|
28
|
+
count: zod_1.z.number().describe("Number of requests"),
|
|
29
|
+
})
|
|
30
|
+
.openapi({ title: "SlowestEndpoint" });
|
|
31
|
+
exports.MetricsSummarySchema = zod_1.z
|
|
32
|
+
.object({
|
|
33
|
+
totalRequests: zod_1.z.number().describe("Total requests in the period"),
|
|
34
|
+
errorRate: zod_1.z.number().describe("Error rate (0-1)"),
|
|
35
|
+
avgResponseTimeMs: zod_1.z.number().describe("Average response time in ms"),
|
|
36
|
+
requestsPerMinute: zod_1.z.number().describe("Current requests per minute"),
|
|
37
|
+
slowestEndpoints: zod_1.z
|
|
38
|
+
.array(exports.SlowestEndpointSchema)
|
|
39
|
+
.describe("Slowest endpoints list"),
|
|
40
|
+
timestamp: zod_1.z.string().datetime().describe("Metrics calculation timestamp"),
|
|
41
|
+
})
|
|
42
|
+
.openapi({ title: "MetricsSummary" });
|
|
43
|
+
const c = (0, core_1.initContract)();
|
|
44
|
+
exports.monitoringContract = c.router({
|
|
45
|
+
getMetrics: {
|
|
46
|
+
method: "GET",
|
|
47
|
+
path: "/v2/monitoring/metrics",
|
|
48
|
+
responses: {
|
|
49
|
+
200: exports.MetricsSummarySchema,
|
|
50
|
+
},
|
|
51
|
+
summary: "Get monitoring metrics",
|
|
52
|
+
metadata: {
|
|
53
|
+
tags: ["Monitoring"],
|
|
54
|
+
openApi: { operationId: "getMetrics" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
getLogs: {
|
|
58
|
+
method: "GET",
|
|
59
|
+
path: "/v2/monitoring/logs",
|
|
60
|
+
responses: {
|
|
61
|
+
200: zod_1.z.object({
|
|
62
|
+
logs: zod_1.z.array(exports.LogEntrySchema),
|
|
63
|
+
nextCursor: zod_1.z.string().nullable(),
|
|
64
|
+
hasMore: zod_1.z.boolean(),
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
query: zod_1.z.object({
|
|
68
|
+
level: exports.LogLevelSchema.optional(),
|
|
69
|
+
search: zod_1.z.string().optional(),
|
|
70
|
+
startTime: zod_1.z.string().datetime().optional(),
|
|
71
|
+
endTime: zod_1.z.string().datetime().optional(),
|
|
72
|
+
limit: zod_1.z.coerce.number().optional().default(100),
|
|
73
|
+
cursor: zod_1.z.string().optional(),
|
|
74
|
+
}),
|
|
75
|
+
summary: "Get monitoring logs",
|
|
76
|
+
metadata: {
|
|
77
|
+
tags: ["Monitoring"],
|
|
78
|
+
openApi: { operationId: "getLogs" },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
getLogsTail: {
|
|
82
|
+
method: "GET",
|
|
83
|
+
path: "/v2/monitoring/logs/tail",
|
|
84
|
+
responses: {
|
|
85
|
+
200: zod_1.z.object({
|
|
86
|
+
logs: zod_1.z.array(exports.LogEntrySchema),
|
|
87
|
+
lastTimestamp: zod_1.z.string(),
|
|
88
|
+
}),
|
|
89
|
+
},
|
|
90
|
+
query: zod_1.z.object({
|
|
91
|
+
since: zod_1.z.string().datetime(),
|
|
92
|
+
}),
|
|
93
|
+
summary: "Tail monitoring logs",
|
|
94
|
+
metadata: {
|
|
95
|
+
tags: ["Monitoring"],
|
|
96
|
+
openApi: { operationId: "getLogsTail" },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
}, {
|
|
100
|
+
commonResponses: {
|
|
101
|
+
400: error_schemas_1.ErrorResponseSchema,
|
|
102
|
+
401: error_schemas_1.ErrorResponseSchema,
|
|
103
|
+
403: error_schemas_1.ErrorResponseSchema,
|
|
104
|
+
500: error_schemas_1.ErrorResponseSchema,
|
|
105
|
+
},
|
|
106
|
+
});
|