@dakkitor/api-contracts 1.1.145 → 1.1.147
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/abilities/first-agent.abilities.json +39 -0
- package/dist/abilities/second-agent.abilities.json +36 -0
- package/dist/abilities/team-leads.json +30 -0
- package/dist/actives/actives.contract.d.ts +8606 -8270
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/agent-client-links/agent-client-links.contract.d.ts +973 -973
- package/dist/auth/auth.contract.d.ts +12 -12
- package/dist/bookings/bookings.contract.d.ts +12119 -11729
- package/dist/bookings/bookings.contract.d.ts.map +1 -1
- package/dist/bookings/bookings.contract.js +4 -6
- package/dist/call-history/call-history.contract.d.ts +620 -620
- package/dist/client-contacts/client-contacts.contract.d.ts +277 -277
- package/dist/clients/clients.contract.d.ts +173 -173
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +1868 -1868
- package/dist/collaborations/collaborations.contract.d.ts +1548 -1548
- package/dist/common/common-schemas.d.ts +4 -4
- package/dist/common/common-schemas.d.ts.map +1 -1
- package/dist/common/common-schemas.js +9 -7
- package/dist/companies/companies.contract.d.ts +26 -26
- package/dist/crews/crews.contract.d.ts +2549 -0
- package/dist/crews/crews.contract.d.ts.map +1 -0
- package/dist/crews/crews.contract.js +203 -0
- package/dist/cron-executions/cron-executions.contract.d.ts +26 -26
- package/dist/curated-workers/curated-workers.contract.d.ts +517 -517
- package/dist/dashboards/dashboard-widgets.contract.d.ts +66 -66
- package/dist/dashboards/dashboard.contract.d.ts +26 -26
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/jobs/jobs.contract.d.ts +4309 -4309
- package/dist/kpi-impersonation/kpi-impersonation.contract.d.ts +26 -26
- package/dist/lead-assignments/lead-assignments.contract.d.ts +498 -498
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +131 -131
- package/dist/leads/leads.contract.d.ts +184 -184
- package/dist/locations/locations.contract.d.ts +28 -28
- package/dist/own-research/own-research.contract.d.ts +728 -728
- package/dist/users/users.contract.d.ts +154 -154
- package/dist/workers/workers.contract.d.ts +6476 -4566
- package/dist/workers/workers.contract.d.ts.map +1 -1
- package/dist/workers/workers.contract.js +217 -65
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crews.contract.d.ts","sourceRoot":"","sources":["../../contracts/crews/crews.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,YAAY,mCAAiC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAIxD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWM,CAAC;AAElC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAQM,CAAC;AAExC,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAOM,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAa5D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaM,CAAC;AAE9B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBM,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGzB,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.crewsContract = exports.PaginatedCrewResponseSchema = exports.FilterCrewSchema = exports.AddCrewMembersSchema = exports.UpdateCrewSchema = exports.CreateCrewSchema = exports.CrewSchema = exports.CrewSummarySchema = exports.CreateSupplierSchema = exports.SupplierSchema = exports.CrewLeadType = 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
|
+
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
8
|
+
const common_schemas_1 = require("../common/common-schemas");
|
|
9
|
+
const error_schemas_1 = require("../common/error-schemas");
|
|
10
|
+
const pagination_query_schema_1 = require("../common/pagination-query.schema");
|
|
11
|
+
const pagination_schema_1 = require("../common/pagination.schema");
|
|
12
|
+
const c = (0, core_1.initContract)();
|
|
13
|
+
// --- Enums ---
|
|
14
|
+
exports.CrewLeadType = zod_1.z.enum(['WORKER', 'SUPPLIER']);
|
|
15
|
+
// --- Supplier Schemas ---
|
|
16
|
+
exports.SupplierSchema = zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
id: zod_1.z.string().uuid(),
|
|
19
|
+
name: zod_1.z.string(),
|
|
20
|
+
phoneNumber: zod_1.z.string(),
|
|
21
|
+
email: zod_1.z.string().email().nullable(),
|
|
22
|
+
company: zod_1.z.string().nullable(),
|
|
23
|
+
notes: zod_1.z.string().nullable(),
|
|
24
|
+
createdAt: zod_1.z.string().datetime().optional(),
|
|
25
|
+
updatedAt: zod_1.z.string().datetime().optional(),
|
|
26
|
+
})
|
|
27
|
+
.openapi({ title: 'Supplier' });
|
|
28
|
+
exports.CreateSupplierSchema = zod_1.z
|
|
29
|
+
.object({
|
|
30
|
+
name: zod_1.z.string().min(2, 'Supplier name must be at least 2 characters').max(100),
|
|
31
|
+
phoneNumber: common_schemas_1.PhoneSchema,
|
|
32
|
+
email: zod_1.z.string().email().nullable().optional(),
|
|
33
|
+
company: zod_1.z.string().max(200).nullable().optional(),
|
|
34
|
+
notes: zod_1.z.string().max(500).nullable().optional(),
|
|
35
|
+
})
|
|
36
|
+
.openapi({ title: 'CreateSupplier' });
|
|
37
|
+
// --- Crew Lead Summary (for worker responses) ---
|
|
38
|
+
exports.CrewSummarySchema = zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
id: zod_1.z.string().uuid(),
|
|
41
|
+
name: zod_1.z.string(),
|
|
42
|
+
leadName: zod_1.z.string(),
|
|
43
|
+
leadPhone: zod_1.z.string(),
|
|
44
|
+
})
|
|
45
|
+
.openapi({ title: 'CrewSummary' });
|
|
46
|
+
// --- Worker Summary (minimal worker info for crew responses) ---
|
|
47
|
+
const CrewWorkerSummarySchema = zod_1.z.object({
|
|
48
|
+
id: zod_1.z.string().uuid(),
|
|
49
|
+
firstName: zod_1.z.string(),
|
|
50
|
+
lastName: zod_1.z.string().nullable(),
|
|
51
|
+
hasPhoneNumber: zod_1.z.boolean(),
|
|
52
|
+
});
|
|
53
|
+
// --- Crew Schemas ---
|
|
54
|
+
exports.CrewSchema = zod_1.z
|
|
55
|
+
.object({
|
|
56
|
+
id: zod_1.z.string().uuid(),
|
|
57
|
+
name: zod_1.z.string(),
|
|
58
|
+
leadType: exports.CrewLeadType,
|
|
59
|
+
leadWorker: CrewWorkerSummarySchema.nullable(),
|
|
60
|
+
leadSupplier: exports.SupplierSchema.nullable(),
|
|
61
|
+
memberCount: zod_1.z.number(),
|
|
62
|
+
maxMembers: zod_1.z.number(),
|
|
63
|
+
members: zod_1.z.array(CrewWorkerSummarySchema).optional(),
|
|
64
|
+
createdAt: zod_1.z.string().datetime().optional(),
|
|
65
|
+
updatedAt: zod_1.z.string().datetime().optional(),
|
|
66
|
+
})
|
|
67
|
+
.openapi({ title: 'Crew' });
|
|
68
|
+
exports.CreateCrewSchema = zod_1.z
|
|
69
|
+
.object({
|
|
70
|
+
name: zod_1.z.string().min(2, 'Crew name must be at least 2 characters').max(100),
|
|
71
|
+
leadType: exports.CrewLeadType,
|
|
72
|
+
leadWorkerId: zod_1.z.string().uuid().optional(),
|
|
73
|
+
supplier: exports.CreateSupplierSchema.optional(),
|
|
74
|
+
})
|
|
75
|
+
.refine((data) => {
|
|
76
|
+
if (data.leadType === 'WORKER')
|
|
77
|
+
return !!data.leadWorkerId;
|
|
78
|
+
return true;
|
|
79
|
+
}, { message: 'leadWorkerId is required when leadType is WORKER', path: ['leadWorkerId'] })
|
|
80
|
+
.refine((data) => {
|
|
81
|
+
if (data.leadType === 'SUPPLIER')
|
|
82
|
+
return !!data.supplier;
|
|
83
|
+
return true;
|
|
84
|
+
}, { message: 'supplier details are required when leadType is SUPPLIER', path: ['supplier'] })
|
|
85
|
+
.openapi({ title: 'CreateCrew' });
|
|
86
|
+
exports.UpdateCrewSchema = zod_1.z
|
|
87
|
+
.object({
|
|
88
|
+
name: zod_1.z.string().min(2).max(100).optional(),
|
|
89
|
+
})
|
|
90
|
+
.openapi({ title: 'UpdateCrew' });
|
|
91
|
+
exports.AddCrewMembersSchema = zod_1.z
|
|
92
|
+
.object({
|
|
93
|
+
workerIds: zod_1.z.array(zod_1.z.string().uuid()).min(1, 'At least one worker ID is required'),
|
|
94
|
+
})
|
|
95
|
+
.openapi({ title: 'AddCrewMembers' });
|
|
96
|
+
exports.FilterCrewSchema = zod_1.z
|
|
97
|
+
.object({
|
|
98
|
+
name: zod_1.z.string().optional(),
|
|
99
|
+
leadType: exports.CrewLeadType.optional(),
|
|
100
|
+
})
|
|
101
|
+
.merge(pagination_query_schema_1.PaginationQuerySchema)
|
|
102
|
+
.openapi({ title: 'FilterCrew' });
|
|
103
|
+
// --- Paginated Response ---
|
|
104
|
+
exports.PaginatedCrewResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.CrewSchema).openapi({
|
|
105
|
+
title: 'PaginatedCrewResponse',
|
|
106
|
+
});
|
|
107
|
+
// --- Contract Router ---
|
|
108
|
+
exports.crewsContract = c.router({
|
|
109
|
+
create: {
|
|
110
|
+
method: 'POST',
|
|
111
|
+
path: '/crews',
|
|
112
|
+
body: exports.CreateCrewSchema,
|
|
113
|
+
responses: {
|
|
114
|
+
201: exports.CrewSchema,
|
|
115
|
+
409: error_schemas_1.ErrorResponseSchema,
|
|
116
|
+
},
|
|
117
|
+
summary: 'Create a new crew',
|
|
118
|
+
metadata: { tags: ['Crews'] },
|
|
119
|
+
},
|
|
120
|
+
findAll: {
|
|
121
|
+
method: 'GET',
|
|
122
|
+
path: '/crews',
|
|
123
|
+
query: exports.FilterCrewSchema,
|
|
124
|
+
responses: {
|
|
125
|
+
200: exports.PaginatedCrewResponseSchema,
|
|
126
|
+
},
|
|
127
|
+
summary: 'List all crews',
|
|
128
|
+
metadata: { tags: ['Crews'] },
|
|
129
|
+
},
|
|
130
|
+
findOne: {
|
|
131
|
+
method: 'GET',
|
|
132
|
+
path: '/crews/:id',
|
|
133
|
+
pathParams: zod_1.z.object({ id: zod_1.z.string().uuid() }),
|
|
134
|
+
responses: {
|
|
135
|
+
200: exports.CrewSchema,
|
|
136
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
137
|
+
},
|
|
138
|
+
summary: 'Get crew detail with members',
|
|
139
|
+
metadata: { tags: ['Crews'] },
|
|
140
|
+
},
|
|
141
|
+
update: {
|
|
142
|
+
method: 'PATCH',
|
|
143
|
+
path: '/crews/:id',
|
|
144
|
+
pathParams: zod_1.z.object({ id: zod_1.z.string().uuid() }),
|
|
145
|
+
body: exports.UpdateCrewSchema,
|
|
146
|
+
responses: {
|
|
147
|
+
200: exports.CrewSchema,
|
|
148
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
149
|
+
},
|
|
150
|
+
summary: 'Update a crew',
|
|
151
|
+
metadata: { tags: ['Crews'] },
|
|
152
|
+
},
|
|
153
|
+
remove: {
|
|
154
|
+
method: 'DELETE',
|
|
155
|
+
path: '/crews/:id',
|
|
156
|
+
pathParams: zod_1.z.object({ id: zod_1.z.string().uuid() }),
|
|
157
|
+
body: c.noBody(),
|
|
158
|
+
responses: {
|
|
159
|
+
204: zod_1.z.undefined(),
|
|
160
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
161
|
+
409: error_schemas_1.ErrorResponseSchema,
|
|
162
|
+
},
|
|
163
|
+
summary: 'Delete a crew (blocked if phone-less members exist)',
|
|
164
|
+
metadata: { tags: ['Crews'] },
|
|
165
|
+
},
|
|
166
|
+
addMembers: {
|
|
167
|
+
method: 'POST',
|
|
168
|
+
path: '/crews/:id/members',
|
|
169
|
+
pathParams: zod_1.z.object({ id: zod_1.z.string().uuid() }),
|
|
170
|
+
body: exports.AddCrewMembersSchema,
|
|
171
|
+
responses: {
|
|
172
|
+
200: exports.CrewSchema,
|
|
173
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
174
|
+
409: error_schemas_1.ErrorResponseSchema,
|
|
175
|
+
},
|
|
176
|
+
summary: 'Add workers to a crew',
|
|
177
|
+
metadata: { tags: ['Crews'] },
|
|
178
|
+
},
|
|
179
|
+
removeMember: {
|
|
180
|
+
method: 'DELETE',
|
|
181
|
+
path: '/crews/:id/members/:workerId',
|
|
182
|
+
pathParams: zod_1.z.object({
|
|
183
|
+
id: zod_1.z.string().uuid(),
|
|
184
|
+
workerId: zod_1.z.string().uuid(),
|
|
185
|
+
}),
|
|
186
|
+
body: c.noBody(),
|
|
187
|
+
responses: {
|
|
188
|
+
200: exports.CrewSchema,
|
|
189
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
190
|
+
409: error_schemas_1.ErrorResponseSchema,
|
|
191
|
+
},
|
|
192
|
+
summary: 'Remove a worker from a crew (blocked if worker has no phone)',
|
|
193
|
+
metadata: { tags: ['Crews'] },
|
|
194
|
+
},
|
|
195
|
+
}, {
|
|
196
|
+
pathPrefix: '/v2',
|
|
197
|
+
commonResponses: {
|
|
198
|
+
400: error_schemas_1.ErrorResponseSchema,
|
|
199
|
+
401: error_schemas_1.ErrorResponseSchema,
|
|
200
|
+
403: error_schemas_1.ErrorResponseSchema,
|
|
201
|
+
500: error_schemas_1.ErrorResponseSchema,
|
|
202
|
+
},
|
|
203
|
+
});
|
|
@@ -14,8 +14,8 @@ export declare const CronExecutionHistorySchema: z.ZodObject<{
|
|
|
14
14
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
id: string;
|
|
17
|
-
jobName: string;
|
|
18
17
|
status: string;
|
|
18
|
+
jobName: string;
|
|
19
19
|
startedAt: string;
|
|
20
20
|
completedAt?: string | null | undefined;
|
|
21
21
|
durationMs?: number | null | undefined;
|
|
@@ -25,8 +25,8 @@ export declare const CronExecutionHistorySchema: z.ZodObject<{
|
|
|
25
25
|
errorMessage?: string | null | undefined;
|
|
26
26
|
}, {
|
|
27
27
|
id: string;
|
|
28
|
-
jobName: string;
|
|
29
28
|
status: string;
|
|
29
|
+
jobName: string;
|
|
30
30
|
startedAt: string | Date;
|
|
31
31
|
completedAt?: string | Date | null | undefined;
|
|
32
32
|
durationMs?: number | null | undefined;
|
|
@@ -170,21 +170,21 @@ export declare const CronExecutionFilterSchema: z.ZodObject<{
|
|
|
170
170
|
}, "strip", z.ZodTypeAny, {
|
|
171
171
|
limit: number;
|
|
172
172
|
page: number;
|
|
173
|
+
sortBy?: "status" | "createdAt" | "jobName" | "startedAt" | "completedAt" | "durationMs" | undefined;
|
|
174
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
173
175
|
jobNames?: ("GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS")[] | undefined;
|
|
174
176
|
statuses?: ("SUCCESS" | "FAILED" | "PARTIAL")[] | undefined;
|
|
175
177
|
startedAfter?: string | undefined;
|
|
176
178
|
startedBefore?: string | undefined;
|
|
177
|
-
sortBy?: "jobName" | "status" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | undefined;
|
|
178
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
179
179
|
}, {
|
|
180
180
|
limit?: number | undefined;
|
|
181
181
|
page?: number | undefined;
|
|
182
|
+
sortBy?: "status" | "createdAt" | "jobName" | "startedAt" | "completedAt" | "durationMs" | undefined;
|
|
183
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
182
184
|
jobNames?: "GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS" | ("GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS")[] | undefined;
|
|
183
185
|
statuses?: "SUCCESS" | "FAILED" | "PARTIAL" | ("SUCCESS" | "FAILED" | "PARTIAL")[] | undefined;
|
|
184
186
|
startedAfter?: string | undefined;
|
|
185
187
|
startedBefore?: string | undefined;
|
|
186
|
-
sortBy?: "jobName" | "status" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | undefined;
|
|
187
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
188
188
|
}>;
|
|
189
189
|
export declare const PaginatedCronExecutionHistorySchema: z.ZodObject<{
|
|
190
190
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -200,8 +200,8 @@ export declare const PaginatedCronExecutionHistorySchema: z.ZodObject<{
|
|
|
200
200
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
201
201
|
}, "strip", z.ZodTypeAny, {
|
|
202
202
|
id: string;
|
|
203
|
-
jobName: string;
|
|
204
203
|
status: string;
|
|
204
|
+
jobName: string;
|
|
205
205
|
startedAt: string;
|
|
206
206
|
completedAt?: string | null | undefined;
|
|
207
207
|
durationMs?: number | null | undefined;
|
|
@@ -211,8 +211,8 @@ export declare const PaginatedCronExecutionHistorySchema: z.ZodObject<{
|
|
|
211
211
|
errorMessage?: string | null | undefined;
|
|
212
212
|
}, {
|
|
213
213
|
id: string;
|
|
214
|
-
jobName: string;
|
|
215
214
|
status: string;
|
|
215
|
+
jobName: string;
|
|
216
216
|
startedAt: string | Date;
|
|
217
217
|
completedAt?: string | Date | null | undefined;
|
|
218
218
|
durationMs?: number | null | undefined;
|
|
@@ -230,8 +230,8 @@ export declare const PaginatedCronExecutionHistorySchema: z.ZodObject<{
|
|
|
230
230
|
limit: number;
|
|
231
231
|
items: {
|
|
232
232
|
id: string;
|
|
233
|
-
jobName: string;
|
|
234
233
|
status: string;
|
|
234
|
+
jobName: string;
|
|
235
235
|
startedAt: string;
|
|
236
236
|
completedAt?: string | null | undefined;
|
|
237
237
|
durationMs?: number | null | undefined;
|
|
@@ -248,8 +248,8 @@ export declare const PaginatedCronExecutionHistorySchema: z.ZodObject<{
|
|
|
248
248
|
limit: number;
|
|
249
249
|
items: {
|
|
250
250
|
id: string;
|
|
251
|
-
jobName: string;
|
|
252
251
|
status: string;
|
|
252
|
+
jobName: string;
|
|
253
253
|
startedAt: string | Date;
|
|
254
254
|
completedAt?: string | Date | null | undefined;
|
|
255
255
|
durationMs?: number | null | undefined;
|
|
@@ -387,9 +387,6 @@ export type PaginatedCronExecutionHistory = z.infer<typeof PaginatedCronExecutio
|
|
|
387
387
|
export type PaginatedCronJobHealth = z.infer<typeof PaginatedCronJobHealthSchema>;
|
|
388
388
|
export declare const cronExecutionsContract: {
|
|
389
389
|
findAll: {
|
|
390
|
-
metadata: {
|
|
391
|
-
tags: string[];
|
|
392
|
-
};
|
|
393
390
|
query: z.ZodObject<{
|
|
394
391
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
395
392
|
page: z.ZodDefault<z.ZodNumber>;
|
|
@@ -403,22 +400,25 @@ export declare const cronExecutionsContract: {
|
|
|
403
400
|
}, "strip", z.ZodTypeAny, {
|
|
404
401
|
limit: number;
|
|
405
402
|
page: number;
|
|
403
|
+
sortBy?: "status" | "createdAt" | "jobName" | "startedAt" | "completedAt" | "durationMs" | undefined;
|
|
404
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
406
405
|
jobNames?: ("GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS")[] | undefined;
|
|
407
406
|
statuses?: ("SUCCESS" | "FAILED" | "PARTIAL")[] | undefined;
|
|
408
407
|
startedAfter?: string | undefined;
|
|
409
408
|
startedBefore?: string | undefined;
|
|
410
|
-
sortBy?: "jobName" | "status" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | undefined;
|
|
411
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
412
409
|
}, {
|
|
413
410
|
limit?: number | undefined;
|
|
414
411
|
page?: number | undefined;
|
|
412
|
+
sortBy?: "status" | "createdAt" | "jobName" | "startedAt" | "completedAt" | "durationMs" | undefined;
|
|
413
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
415
414
|
jobNames?: "GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS" | ("GENERATE_DAILY_ACTIVES" | "CLEANUP_ORPHANED_FILES" | "CLEANUP_ARCHIVED_FILES" | "UPDATE_AGENT_PERFORMANCE" | "RECONCILE_DAILY_METRICS" | "RECONCILE_ALL_DAILY_METRICS" | "RESET_LEAD_ASSIGNMENTS" | "RETRY_FAILED_CRON_JOBS")[] | undefined;
|
|
416
415
|
statuses?: "SUCCESS" | "FAILED" | "PARTIAL" | ("SUCCESS" | "FAILED" | "PARTIAL")[] | undefined;
|
|
417
416
|
startedAfter?: string | undefined;
|
|
418
417
|
startedBefore?: string | undefined;
|
|
419
|
-
sortBy?: "jobName" | "status" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | undefined;
|
|
420
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
421
418
|
}>;
|
|
419
|
+
metadata: {
|
|
420
|
+
tags: string[];
|
|
421
|
+
};
|
|
422
422
|
summary: "List all cron executions";
|
|
423
423
|
method: "GET";
|
|
424
424
|
path: "/v2/cron-executions";
|
|
@@ -512,8 +512,8 @@ export declare const cronExecutionsContract: {
|
|
|
512
512
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
513
513
|
}, "strip", z.ZodTypeAny, {
|
|
514
514
|
id: string;
|
|
515
|
-
jobName: string;
|
|
516
515
|
status: string;
|
|
516
|
+
jobName: string;
|
|
517
517
|
startedAt: string;
|
|
518
518
|
completedAt?: string | null | undefined;
|
|
519
519
|
durationMs?: number | null | undefined;
|
|
@@ -523,8 +523,8 @@ export declare const cronExecutionsContract: {
|
|
|
523
523
|
errorMessage?: string | null | undefined;
|
|
524
524
|
}, {
|
|
525
525
|
id: string;
|
|
526
|
-
jobName: string;
|
|
527
526
|
status: string;
|
|
527
|
+
jobName: string;
|
|
528
528
|
startedAt: string | Date;
|
|
529
529
|
completedAt?: string | Date | null | undefined;
|
|
530
530
|
durationMs?: number | null | undefined;
|
|
@@ -542,8 +542,8 @@ export declare const cronExecutionsContract: {
|
|
|
542
542
|
limit: number;
|
|
543
543
|
items: {
|
|
544
544
|
id: string;
|
|
545
|
-
jobName: string;
|
|
546
545
|
status: string;
|
|
546
|
+
jobName: string;
|
|
547
547
|
startedAt: string;
|
|
548
548
|
completedAt?: string | null | undefined;
|
|
549
549
|
durationMs?: number | null | undefined;
|
|
@@ -560,8 +560,8 @@ export declare const cronExecutionsContract: {
|
|
|
560
560
|
limit: number;
|
|
561
561
|
items: {
|
|
562
562
|
id: string;
|
|
563
|
-
jobName: string;
|
|
564
563
|
status: string;
|
|
564
|
+
jobName: string;
|
|
565
565
|
startedAt: string | Date;
|
|
566
566
|
completedAt?: string | Date | null | undefined;
|
|
567
567
|
durationMs?: number | null | undefined;
|
|
@@ -735,9 +735,6 @@ export declare const cronExecutionsContract: {
|
|
|
735
735
|
};
|
|
736
736
|
};
|
|
737
737
|
getHealthStatus: {
|
|
738
|
-
metadata: {
|
|
739
|
-
tags: string[];
|
|
740
|
-
};
|
|
741
738
|
query: z.ZodObject<{
|
|
742
739
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
743
740
|
page: z.ZodDefault<z.ZodNumber>;
|
|
@@ -748,6 +745,9 @@ export declare const cronExecutionsContract: {
|
|
|
748
745
|
limit?: number | undefined;
|
|
749
746
|
page?: number | undefined;
|
|
750
747
|
}>;
|
|
748
|
+
metadata: {
|
|
749
|
+
tags: string[];
|
|
750
|
+
};
|
|
751
751
|
summary: "Get health status for all cron jobs";
|
|
752
752
|
method: "GET";
|
|
753
753
|
path: "/v2/cron-executions/health";
|
|
@@ -1070,8 +1070,8 @@ export declare const cronExecutionsContract: {
|
|
|
1070
1070
|
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1071
1071
|
}, "strip", z.ZodTypeAny, {
|
|
1072
1072
|
id: string;
|
|
1073
|
-
jobName: string;
|
|
1074
1073
|
status: string;
|
|
1074
|
+
jobName: string;
|
|
1075
1075
|
startedAt: string;
|
|
1076
1076
|
completedAt?: string | null | undefined;
|
|
1077
1077
|
durationMs?: number | null | undefined;
|
|
@@ -1081,8 +1081,8 @@ export declare const cronExecutionsContract: {
|
|
|
1081
1081
|
errorMessage?: string | null | undefined;
|
|
1082
1082
|
}, {
|
|
1083
1083
|
id: string;
|
|
1084
|
-
jobName: string;
|
|
1085
1084
|
status: string;
|
|
1085
|
+
jobName: string;
|
|
1086
1086
|
startedAt: string | Date;
|
|
1087
1087
|
completedAt?: string | Date | null | undefined;
|
|
1088
1088
|
durationMs?: number | null | undefined;
|