@dakkitor/api-contracts 1.1.108 → 1.1.111

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.
Files changed (31) hide show
  1. package/dist/actives/actives.contract.d.ts +3059 -3059
  2. package/dist/agent-client-links/agent-client-links.contract.d.ts +74 -74
  3. package/dist/bookings/bookings.contract.d.ts +11037 -11037
  4. package/dist/call-history/call-history.contract.d.ts +294 -294
  5. package/dist/client-contacts/client-contacts.contract.d.ts +186 -186
  6. package/dist/clients/clients.contract.d.ts +99 -99
  7. package/dist/clients/clients.contract.d.ts.map +1 -1
  8. package/dist/clients/clients.contract.js +5 -5
  9. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +440 -440
  10. package/dist/collaborations/collaborations.contract.d.ts +328 -328
  11. package/dist/companies/companies.contract.d.ts +22 -22
  12. package/dist/curated-workers/curated-workers.contract.d.ts +76 -76
  13. package/dist/dashboards/agent-daily-metrics.contract.d.ts +3 -3
  14. package/dist/dashboards/dashboard-widgets.contract.d.ts +274 -194
  15. package/dist/dashboards/dashboard-widgets.contract.d.ts.map +1 -1
  16. package/dist/dashboards/dashboard-widgets.contract.js +130 -98
  17. package/dist/dashboards/dashboard.contract.d.ts +14 -14
  18. package/dist/files/files.contract.d.ts +24 -24
  19. package/dist/jobs/jobs.contract.d.ts +907 -907
  20. package/dist/lead-assignments/lead-assignments.contract.d.ts +160 -160
  21. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +34 -34
  22. package/dist/lead-distribution/lead-distribution-config.contract.d.ts +7 -7
  23. package/dist/leads/leads.contract.d.ts +136 -136
  24. package/dist/postcodes/postcodes.contract.d.ts +18 -18
  25. package/dist/qualifications/qualifications.contract.d.ts +22 -22
  26. package/dist/trades/trades.contract.d.ts +16 -16
  27. package/dist/users/users.contract.d.ts +6 -6
  28. package/dist/workers/workers.contract.d.ts +288 -288
  29. package/package.json +41 -41
  30. package/dist/abilities/interconnection.json +0 -370
  31. package/dist/abilities/second-agent.abilities copy.json +0 -370
@@ -5,7 +5,17 @@
5
5
  * Description: Defines the API contracts for modular dashboard widget endpoints.
6
6
  * Provides role-specific widgets for First Agent (FA) and Second Agent (SA).
7
7
  */
8
- import { z } from 'zod';
8
+ import { z } from "zod";
9
+ /**
10
+ * Common query parameters for dashboard widgets
11
+ */
12
+ export declare const DashboardWidgetQuerySchema: z.ZodObject<{
13
+ date: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ date?: string | undefined;
16
+ }, {
17
+ date?: string | undefined;
18
+ }>;
9
19
  /**
10
20
  * Date range filter for historical queries
11
21
  */
@@ -38,15 +48,15 @@ export declare const TrendDataPointSchema: z.ZodObject<{
38
48
  export declare const FaPipelineWidgetSchema: z.ZodObject<{
39
49
  collaborations: z.ZodObject<{
40
50
  total: z.ZodNumber;
41
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
51
+ byStatus: z.ZodRecord<z.ZodEnum<["ACTIVE", "INACTIVE", "PENDING_APPROVAL", "REJECTED", "APPROVED", "CHANGED_COMPANY", "CHANGED_AGENT", "CHANGED_COMPANY_AND_AGENT"]>, z.ZodNumber>;
42
52
  recentCount: z.ZodNumber;
43
53
  }, "strip", z.ZodTypeAny, {
44
54
  total: number;
45
- byStatus: Record<string, number>;
55
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
46
56
  recentCount: number;
47
57
  }, {
48
58
  total: number;
49
- byStatus: Record<string, number>;
59
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
50
60
  recentCount: number;
51
61
  }>;
52
62
  summary: z.ZodObject<{
@@ -60,42 +70,42 @@ export declare const FaPipelineWidgetSchema: z.ZodObject<{
60
70
  pendingApproval: number;
61
71
  }>;
62
72
  }, "strip", z.ZodTypeAny, {
63
- collaborations: {
64
- total: number;
65
- byStatus: Record<string, number>;
66
- recentCount: number;
67
- };
68
73
  summary: {
69
74
  activeCollaborations: number;
70
75
  pendingApproval: number;
71
76
  };
72
- }, {
73
77
  collaborations: {
74
78
  total: number;
75
- byStatus: Record<string, number>;
79
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
76
80
  recentCount: number;
77
81
  };
82
+ }, {
78
83
  summary: {
79
84
  activeCollaborations: number;
80
85
  pendingApproval: number;
81
86
  };
87
+ collaborations: {
88
+ total: number;
89
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
90
+ recentCount: number;
91
+ };
82
92
  }>;
83
93
  /**
84
94
  * FA Clients Widget - Client portfolio summary
85
95
  */
86
96
  export declare const FaClientsWidgetSchema: z.ZodObject<{
87
97
  total: z.ZodNumber;
88
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
98
+ byStatus: z.ZodRecord<z.ZodEnum<["APPROVED", "PENDING_VERIFICATION", "BLACKLISTED"]>, z.ZodNumber>;
89
99
  recentlyAdded: z.ZodNumber;
90
100
  pendingVerification: z.ZodNumber;
91
101
  }, "strip", z.ZodTypeAny, {
92
102
  total: number;
93
- byStatus: Record<string, number>;
103
+ byStatus: Partial<Record<"APPROVED" | "PENDING_VERIFICATION" | "BLACKLISTED", number>>;
94
104
  recentlyAdded: number;
95
105
  pendingVerification: number;
96
106
  }, {
97
107
  total: number;
98
- byStatus: Record<string, number>;
108
+ byStatus: Partial<Record<"APPROVED" | "PENDING_VERIFICATION" | "BLACKLISTED", number>>;
99
109
  recentlyAdded: number;
100
110
  pendingVerification: number;
101
111
  }>;
@@ -125,28 +135,31 @@ export declare const FaCallHistoryWidgetSchema: z.ZodObject<{
125
135
  totalCalls: z.ZodNumber;
126
136
  callsToday: z.ZodNumber;
127
137
  callsThisWeek: z.ZodNumber;
128
- averageRating: z.ZodNumber;
138
+ averageRatingToday: z.ZodNumber;
139
+ efficientCallsToday: z.ZodNumber;
129
140
  conversionRate: z.ZodNumber;
130
141
  performanceScore: z.ZodNumber;
131
142
  performanceTier: z.ZodEnum<["high", "medium", "low", "new"]>;
132
143
  ratingBreakdown: z.ZodRecord<z.ZodString, z.ZodNumber>;
133
144
  }, "strip", z.ZodTypeAny, {
134
145
  totalCalls: number;
135
- callsToday: number;
136
- callsThisWeek: number;
137
- averageRating: number;
138
146
  conversionRate: number;
139
147
  performanceScore: number;
140
148
  performanceTier: "high" | "medium" | "low" | "new";
149
+ callsToday: number;
150
+ callsThisWeek: number;
151
+ averageRatingToday: number;
152
+ efficientCallsToday: number;
141
153
  ratingBreakdown: Record<string, number>;
142
154
  }, {
143
155
  totalCalls: number;
144
- callsToday: number;
145
- callsThisWeek: number;
146
- averageRating: number;
147
156
  conversionRate: number;
148
157
  performanceScore: number;
149
158
  performanceTier: "high" | "medium" | "low" | "new";
159
+ callsToday: number;
160
+ callsThisWeek: number;
161
+ averageRatingToday: number;
162
+ efficientCallsToday: number;
150
163
  ratingBreakdown: Record<string, number>;
151
164
  }>;
152
165
  /**
@@ -163,25 +176,25 @@ export declare const AgentCallHistoryItemSchema: z.ZodObject<{
163
176
  performanceScore: z.ZodNumber;
164
177
  performanceTier: z.ZodEnum<["high", "medium", "low", "new"]>;
165
178
  }, "strip", z.ZodTypeAny, {
179
+ agentId: string;
166
180
  totalCalls: number;
167
- averageRating: number;
168
181
  conversionRate: number;
169
182
  performanceScore: number;
170
183
  performanceTier: "high" | "medium" | "low" | "new";
171
- agentId: string;
172
184
  agentName: string;
173
185
  agentEmail: string;
174
186
  callsOnDate: number;
187
+ averageRating: number;
175
188
  }, {
189
+ agentId: string;
176
190
  totalCalls: number;
177
- averageRating: number;
178
191
  conversionRate: number;
179
192
  performanceScore: number;
180
193
  performanceTier: "high" | "medium" | "low" | "new";
181
- agentId: string;
182
194
  agentName: string;
183
195
  agentEmail: string;
184
196
  callsOnDate: number;
197
+ averageRating: number;
185
198
  }>;
186
199
  /**
187
200
  * Query parameters for all agents call history endpoint
@@ -215,25 +228,25 @@ export declare const AllAgentsCallHistoryResponseSchema: z.ZodObject<{
215
228
  performanceScore: z.ZodNumber;
216
229
  performanceTier: z.ZodEnum<["high", "medium", "low", "new"]>;
217
230
  }, "strip", z.ZodTypeAny, {
231
+ agentId: string;
218
232
  totalCalls: number;
219
- averageRating: number;
220
233
  conversionRate: number;
221
234
  performanceScore: number;
222
235
  performanceTier: "high" | "medium" | "low" | "new";
223
- agentId: string;
224
236
  agentName: string;
225
237
  agentEmail: string;
226
238
  callsOnDate: number;
239
+ averageRating: number;
227
240
  }, {
241
+ agentId: string;
228
242
  totalCalls: number;
229
- averageRating: number;
230
243
  conversionRate: number;
231
244
  performanceScore: number;
232
245
  performanceTier: "high" | "medium" | "low" | "new";
233
- agentId: string;
234
246
  agentName: string;
235
247
  agentEmail: string;
236
248
  callsOnDate: number;
249
+ averageRating: number;
237
250
  }>, "many">;
238
251
  totalCount: z.ZodNumber;
239
252
  limit: z.ZodNumber;
@@ -243,15 +256,15 @@ export declare const AllAgentsCallHistoryResponseSchema: z.ZodObject<{
243
256
  }, "strip", z.ZodTypeAny, {
244
257
  limit: number;
245
258
  items: {
259
+ agentId: string;
246
260
  totalCalls: number;
247
- averageRating: number;
248
261
  conversionRate: number;
249
262
  performanceScore: number;
250
263
  performanceTier: "high" | "medium" | "low" | "new";
251
- agentId: string;
252
264
  agentName: string;
253
265
  agentEmail: string;
254
266
  callsOnDate: number;
267
+ averageRating: number;
255
268
  }[];
256
269
  totalCount: number;
257
270
  skip: number;
@@ -260,15 +273,15 @@ export declare const AllAgentsCallHistoryResponseSchema: z.ZodObject<{
260
273
  }, {
261
274
  limit: number;
262
275
  items: {
276
+ agentId: string;
263
277
  totalCalls: number;
264
- averageRating: number;
265
278
  conversionRate: number;
266
279
  performanceScore: number;
267
280
  performanceTier: "high" | "medium" | "low" | "new";
268
- agentId: string;
269
281
  agentName: string;
270
282
  agentEmail: string;
271
283
  callsOnDate: number;
284
+ averageRating: number;
272
285
  }[];
273
286
  totalCount: number;
274
287
  skip: number;
@@ -281,47 +294,47 @@ export declare const AllAgentsCallHistoryResponseSchema: z.ZodObject<{
281
294
  export declare const FaActivesWidgetSchema: z.ZodObject<{
282
295
  today: z.ZodObject<{
283
296
  total: z.ZodNumber;
284
- byStatusFa: z.ZodRecord<z.ZodString, z.ZodNumber>;
297
+ byStatusFa: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
285
298
  }, "strip", z.ZodTypeAny, {
286
299
  total: number;
287
- byStatusFa: Record<string, number>;
300
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
288
301
  }, {
289
302
  total: number;
290
- byStatusFa: Record<string, number>;
303
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
291
304
  }>;
292
- pendingApproval: z.ZodNumber;
293
305
  }, "strip", z.ZodTypeAny, {
294
- pendingApproval: number;
295
306
  today: {
296
307
  total: number;
297
- byStatusFa: Record<string, number>;
308
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
298
309
  };
299
310
  }, {
300
- pendingApproval: number;
301
311
  today: {
302
312
  total: number;
303
- byStatusFa: Record<string, number>;
313
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
304
314
  };
305
315
  }>;
306
316
  /**
307
317
  * FA Bookings Widget - Booking management (FA perspective)
308
318
  */
309
319
  export declare const FaBookingsWidgetSchema: z.ZodObject<{
310
- total: z.ZodNumber;
311
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
312
- activeBookings: z.ZodNumber;
320
+ totalToday: z.ZodNumber;
321
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
322
+ ongoingBookings: z.ZodNumber;
323
+ startingToday: z.ZodNumber;
313
324
  pendingConfirmation: z.ZodNumber;
314
325
  upcomingStarts: z.ZodNumber;
315
326
  }, "strip", z.ZodTypeAny, {
316
- total: number;
317
- byStatus: Record<string, number>;
318
- activeBookings: number;
327
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
328
+ totalToday: number;
329
+ ongoingBookings: number;
330
+ startingToday: number;
319
331
  pendingConfirmation: number;
320
332
  upcomingStarts: number;
321
333
  }, {
322
- total: number;
323
- byStatus: Record<string, number>;
324
- activeBookings: number;
334
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
335
+ totalToday: number;
336
+ ongoingBookings: number;
337
+ startingToday: number;
325
338
  pendingConfirmation: number;
326
339
  upcomingStarts: number;
327
340
  }>;
@@ -332,37 +345,40 @@ export declare const SaWorkersWidgetSchema: z.ZodObject<{
332
345
  total: z.ZodNumber;
333
346
  addedThisWeek: z.ZodNumber;
334
347
  addedThisMonth: z.ZodNumber;
335
- byAvailability: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
348
+ byAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>, z.ZodNumber>>;
336
349
  }, "strip", z.ZodTypeAny, {
337
350
  total: number;
338
351
  addedThisWeek: number;
339
352
  addedThisMonth: number;
340
- byAvailability?: Record<string, number> | undefined;
353
+ byAvailability?: Partial<Record<"AVAILABLE" | "PARTIALLY_AVAILABLE" | "UNAVAILABLE", number>> | undefined;
341
354
  }, {
342
355
  total: number;
343
356
  addedThisWeek: number;
344
357
  addedThisMonth: number;
345
- byAvailability?: Record<string, number> | undefined;
358
+ byAvailability?: Partial<Record<"AVAILABLE" | "PARTIALLY_AVAILABLE" | "UNAVAILABLE", number>> | undefined;
346
359
  }>;
347
360
  /**
348
361
  * SA Bookings Widget - Booking management (SA perspective)
349
362
  */
350
363
  export declare const SaBookingsWidgetSchema: z.ZodObject<{
351
- total: z.ZodNumber;
352
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
353
- activeBookings: z.ZodNumber;
364
+ totalToday: z.ZodNumber;
365
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
366
+ ongoingBookings: z.ZodNumber;
367
+ startingToday: z.ZodNumber;
354
368
  waitingForConfirmation: z.ZodNumber;
355
369
  upcomingStarts: z.ZodNumber;
356
370
  }, "strip", z.ZodTypeAny, {
357
- total: number;
358
- byStatus: Record<string, number>;
359
- activeBookings: number;
371
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
372
+ totalToday: number;
373
+ ongoingBookings: number;
374
+ startingToday: number;
360
375
  upcomingStarts: number;
361
376
  waitingForConfirmation: number;
362
377
  }, {
363
- total: number;
364
- byStatus: Record<string, number>;
365
- activeBookings: number;
378
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
379
+ totalToday: number;
380
+ ongoingBookings: number;
381
+ startingToday: number;
366
382
  upcomingStarts: number;
367
383
  waitingForConfirmation: number;
368
384
  }>;
@@ -372,27 +388,24 @@ export declare const SaBookingsWidgetSchema: z.ZodObject<{
372
388
  export declare const SaActivesWidgetSchema: z.ZodObject<{
373
389
  today: z.ZodObject<{
374
390
  total: z.ZodNumber;
375
- byStatusSa: z.ZodRecord<z.ZodString, z.ZodNumber>;
391
+ byStatusSa: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
376
392
  }, "strip", z.ZodTypeAny, {
377
393
  total: number;
378
- byStatusSa: Record<string, number>;
394
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
379
395
  }, {
380
396
  total: number;
381
- byStatusSa: Record<string, number>;
397
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
382
398
  }>;
383
- pendingConfirmation: z.ZodNumber;
384
399
  }, "strip", z.ZodTypeAny, {
385
400
  today: {
386
401
  total: number;
387
- byStatusSa: Record<string, number>;
402
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
388
403
  };
389
- pendingConfirmation: number;
390
404
  }, {
391
405
  today: {
392
406
  total: number;
393
- byStatusSa: Record<string, number>;
407
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
394
408
  };
395
- pendingConfirmation: number;
396
409
  }>;
397
410
  /**
398
411
  * Actives trend data for charts
@@ -401,15 +414,15 @@ export declare const ActivesTrendSchema: z.ZodObject<{
401
414
  data: z.ZodArray<z.ZodObject<{
402
415
  date: z.ZodString;
403
416
  total: z.ZodNumber;
404
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
417
+ byStatus: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
405
418
  }, "strip", z.ZodTypeAny, {
406
419
  date: string;
407
420
  total: number;
408
- byStatus: Record<string, number>;
421
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
409
422
  }, {
410
423
  date: string;
411
424
  total: number;
412
- byStatus: Record<string, number>;
425
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
413
426
  }>, "many">;
414
427
  summary: z.ZodObject<{
415
428
  averageDaily: z.ZodNumber;
@@ -433,7 +446,7 @@ export declare const ActivesTrendSchema: z.ZodObject<{
433
446
  data: {
434
447
  date: string;
435
448
  total: number;
436
- byStatus: Record<string, number>;
449
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
437
450
  }[];
438
451
  }, {
439
452
  summary: {
@@ -444,7 +457,7 @@ export declare const ActivesTrendSchema: z.ZodObject<{
444
457
  data: {
445
458
  date: string;
446
459
  total: number;
447
- byStatus: Record<string, number>;
460
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
448
461
  }[];
449
462
  }>;
450
463
  /**
@@ -454,15 +467,15 @@ export declare const BookingsTrendSchema: z.ZodObject<{
454
467
  data: z.ZodArray<z.ZodObject<{
455
468
  date: z.ZodString;
456
469
  total: z.ZodNumber;
457
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
470
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
458
471
  }, "strip", z.ZodTypeAny, {
459
472
  date: string;
460
473
  total: number;
461
- byStatus: Record<string, number>;
474
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
462
475
  }, {
463
476
  date: string;
464
477
  total: number;
465
- byStatus: Record<string, number>;
478
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
466
479
  }>, "many">;
467
480
  summary: z.ZodObject<{
468
481
  averageDaily: z.ZodNumber;
@@ -482,7 +495,7 @@ export declare const BookingsTrendSchema: z.ZodObject<{
482
495
  data: {
483
496
  date: string;
484
497
  total: number;
485
- byStatus: Record<string, number>;
498
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
486
499
  }[];
487
500
  }, {
488
501
  summary: {
@@ -492,7 +505,7 @@ export declare const BookingsTrendSchema: z.ZodObject<{
492
505
  data: {
493
506
  date: string;
494
507
  total: number;
495
- byStatus: Record<string, number>;
508
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
496
509
  }[];
497
510
  }>;
498
511
  /**
@@ -508,15 +521,15 @@ export declare const CallPerformanceTrendSchema: z.ZodObject<{
508
521
  }, "strip", z.ZodTypeAny, {
509
522
  date: string;
510
523
  totalCalls: number;
511
- averageRating: number;
512
524
  conversionRate: number;
513
525
  performanceScore: number;
526
+ averageRating: number;
514
527
  }, {
515
528
  date: string;
516
529
  totalCalls: number;
517
- averageRating: number;
518
530
  conversionRate: number;
519
531
  performanceScore: number;
532
+ averageRating: number;
520
533
  }>, "many">;
521
534
  summary: z.ZodObject<{
522
535
  averageDailyCalls: z.ZodNumber;
@@ -540,9 +553,9 @@ export declare const CallPerformanceTrendSchema: z.ZodObject<{
540
553
  data: {
541
554
  date: string;
542
555
  totalCalls: number;
543
- averageRating: number;
544
556
  conversionRate: number;
545
557
  performanceScore: number;
558
+ averageRating: number;
546
559
  }[];
547
560
  }, {
548
561
  summary: {
@@ -553,9 +566,9 @@ export declare const CallPerformanceTrendSchema: z.ZodObject<{
553
566
  data: {
554
567
  date: string;
555
568
  totalCalls: number;
556
- averageRating: number;
557
569
  conversionRate: number;
558
570
  performanceScore: number;
571
+ averageRating: number;
559
572
  }[];
560
573
  }>;
561
574
  /**
@@ -613,14 +626,14 @@ export declare const CollaborationsTrendSchema: z.ZodObject<{
613
626
  data: z.ZodArray<z.ZodObject<{
614
627
  date: z.ZodString;
615
628
  created: z.ZodNumber;
616
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
629
+ byStatus: z.ZodRecord<z.ZodEnum<["ACTIVE", "INACTIVE", "PENDING_APPROVAL", "REJECTED", "APPROVED", "CHANGED_COMPANY", "CHANGED_AGENT", "CHANGED_COMPANY_AND_AGENT"]>, z.ZodNumber>;
617
630
  }, "strip", z.ZodTypeAny, {
618
631
  date: string;
619
- byStatus: Record<string, number>;
632
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
620
633
  created: number;
621
634
  }, {
622
635
  date: string;
623
- byStatus: Record<string, number>;
636
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
624
637
  created: number;
625
638
  }>, "many">;
626
639
  summary: z.ZodObject<{
@@ -640,7 +653,7 @@ export declare const CollaborationsTrendSchema: z.ZodObject<{
640
653
  };
641
654
  data: {
642
655
  date: string;
643
- byStatus: Record<string, number>;
656
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
644
657
  created: number;
645
658
  }[];
646
659
  }, {
@@ -650,29 +663,36 @@ export declare const CollaborationsTrendSchema: z.ZodObject<{
650
663
  };
651
664
  data: {
652
665
  date: string;
653
- byStatus: Record<string, number>;
666
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
654
667
  created: number;
655
668
  }[];
656
669
  }>;
657
670
  export declare const dashboardWidgetsContract: {
658
671
  getFaPipeline: {
659
- summary: "Get FA collaboration pipeline widget data";
660
672
  description: "Returns collaboration pipeline overview for First Agent dashboard";
673
+ query: z.ZodObject<{
674
+ date: z.ZodOptional<z.ZodString>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ date?: string | undefined;
677
+ }, {
678
+ date?: string | undefined;
679
+ }>;
680
+ summary: "Get FA collaboration pipeline widget data";
661
681
  method: "GET";
662
682
  path: "/widgets/fa/pipeline";
663
683
  responses: {
664
684
  200: z.ZodObject<{
665
685
  collaborations: z.ZodObject<{
666
686
  total: z.ZodNumber;
667
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
687
+ byStatus: z.ZodRecord<z.ZodEnum<["ACTIVE", "INACTIVE", "PENDING_APPROVAL", "REJECTED", "APPROVED", "CHANGED_COMPANY", "CHANGED_AGENT", "CHANGED_COMPANY_AND_AGENT"]>, z.ZodNumber>;
668
688
  recentCount: z.ZodNumber;
669
689
  }, "strip", z.ZodTypeAny, {
670
690
  total: number;
671
- byStatus: Record<string, number>;
691
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
672
692
  recentCount: number;
673
693
  }, {
674
694
  total: number;
675
- byStatus: Record<string, number>;
695
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
676
696
  recentCount: number;
677
697
  }>;
678
698
  summary: z.ZodObject<{
@@ -686,55 +706,69 @@ export declare const dashboardWidgetsContract: {
686
706
  pendingApproval: number;
687
707
  }>;
688
708
  }, "strip", z.ZodTypeAny, {
689
- collaborations: {
690
- total: number;
691
- byStatus: Record<string, number>;
692
- recentCount: number;
693
- };
694
709
  summary: {
695
710
  activeCollaborations: number;
696
711
  pendingApproval: number;
697
712
  };
698
- }, {
699
713
  collaborations: {
700
714
  total: number;
701
- byStatus: Record<string, number>;
715
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
702
716
  recentCount: number;
703
717
  };
718
+ }, {
704
719
  summary: {
705
720
  activeCollaborations: number;
706
721
  pendingApproval: number;
707
722
  };
723
+ collaborations: {
724
+ total: number;
725
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
726
+ recentCount: number;
727
+ };
708
728
  }>;
709
729
  };
710
730
  };
711
731
  getFaClients: {
712
- summary: "Get FA clients widget data";
713
732
  description: "Returns client portfolio summary for First Agent dashboard";
733
+ query: z.ZodObject<{
734
+ date: z.ZodOptional<z.ZodString>;
735
+ }, "strip", z.ZodTypeAny, {
736
+ date?: string | undefined;
737
+ }, {
738
+ date?: string | undefined;
739
+ }>;
740
+ summary: "Get FA clients widget data";
714
741
  method: "GET";
715
742
  path: "/widgets/fa/clients";
716
743
  responses: {
717
744
  200: z.ZodObject<{
718
745
  total: z.ZodNumber;
719
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
746
+ byStatus: z.ZodRecord<z.ZodEnum<["APPROVED", "PENDING_VERIFICATION", "BLACKLISTED"]>, z.ZodNumber>;
720
747
  recentlyAdded: z.ZodNumber;
721
748
  pendingVerification: z.ZodNumber;
722
749
  }, "strip", z.ZodTypeAny, {
723
750
  total: number;
724
- byStatus: Record<string, number>;
751
+ byStatus: Partial<Record<"APPROVED" | "PENDING_VERIFICATION" | "BLACKLISTED", number>>;
725
752
  recentlyAdded: number;
726
753
  pendingVerification: number;
727
754
  }, {
728
755
  total: number;
729
- byStatus: Record<string, number>;
756
+ byStatus: Partial<Record<"APPROVED" | "PENDING_VERIFICATION" | "BLACKLISTED", number>>;
730
757
  recentlyAdded: number;
731
758
  pendingVerification: number;
732
759
  }>;
733
760
  };
734
761
  };
735
762
  getFaCheckings: {
736
- summary: "Get FA collaboration checkings widget data";
737
763
  description: "Returns collaboration checking status for First Agent dashboard";
764
+ query: z.ZodObject<{
765
+ date: z.ZodOptional<z.ZodString>;
766
+ }, "strip", z.ZodTypeAny, {
767
+ date?: string | undefined;
768
+ }, {
769
+ date?: string | undefined;
770
+ }>;
771
+ summary: "Get FA collaboration checkings widget data";
738
772
  method: "GET";
739
773
  path: "/widgets/fa/checkings";
740
774
  responses: {
@@ -757,8 +791,15 @@ export declare const dashboardWidgetsContract: {
757
791
  };
758
792
  };
759
793
  getFaCallHistory: {
760
- summary: "Get FA call history widget data";
761
794
  description: "Returns call performance metrics for First Agent dashboard";
795
+ query: z.ZodObject<{
796
+ date: z.ZodOptional<z.ZodString>;
797
+ }, "strip", z.ZodTypeAny, {
798
+ date?: string | undefined;
799
+ }, {
800
+ date?: string | undefined;
801
+ }>;
802
+ summary: "Get FA call history widget data";
762
803
  method: "GET";
763
804
  path: "/widgets/fa/call-history";
764
805
  responses: {
@@ -766,34 +807,37 @@ export declare const dashboardWidgetsContract: {
766
807
  totalCalls: z.ZodNumber;
767
808
  callsToday: z.ZodNumber;
768
809
  callsThisWeek: z.ZodNumber;
769
- averageRating: z.ZodNumber;
810
+ averageRatingToday: z.ZodNumber;
811
+ efficientCallsToday: z.ZodNumber;
770
812
  conversionRate: z.ZodNumber;
771
813
  performanceScore: z.ZodNumber;
772
814
  performanceTier: z.ZodEnum<["high", "medium", "low", "new"]>;
773
815
  ratingBreakdown: z.ZodRecord<z.ZodString, z.ZodNumber>;
774
816
  }, "strip", z.ZodTypeAny, {
775
817
  totalCalls: number;
776
- callsToday: number;
777
- callsThisWeek: number;
778
- averageRating: number;
779
818
  conversionRate: number;
780
819
  performanceScore: number;
781
820
  performanceTier: "high" | "medium" | "low" | "new";
821
+ callsToday: number;
822
+ callsThisWeek: number;
823
+ averageRatingToday: number;
824
+ efficientCallsToday: number;
782
825
  ratingBreakdown: Record<string, number>;
783
826
  }, {
784
827
  totalCalls: number;
785
- callsToday: number;
786
- callsThisWeek: number;
787
- averageRating: number;
788
828
  conversionRate: number;
789
829
  performanceScore: number;
790
830
  performanceTier: "high" | "medium" | "low" | "new";
831
+ callsToday: number;
832
+ callsThisWeek: number;
833
+ averageRatingToday: number;
834
+ efficientCallsToday: number;
791
835
  ratingBreakdown: Record<string, number>;
792
836
  }>;
793
837
  };
794
838
  };
795
839
  getAllAvailableAgentsCallHistory: {
796
- summary: "Get call history for all available agents";
840
+ description: "Returns paginated call performance metrics for all agents marked as available in lead distribution";
797
841
  query: z.ZodObject<{
798
842
  limit: z.ZodDefault<z.ZodNumber>;
799
843
  page: z.ZodDefault<z.ZodNumber>;
@@ -808,7 +852,7 @@ export declare const dashboardWidgetsContract: {
808
852
  limit?: number | undefined;
809
853
  page?: number | undefined;
810
854
  }>;
811
- description: "Returns paginated call performance metrics for all agents marked as available in lead distribution";
855
+ summary: "Get call history for all available agents";
812
856
  method: "GET";
813
857
  path: "/widgets/agents/call-history";
814
858
  responses: {
@@ -824,25 +868,25 @@ export declare const dashboardWidgetsContract: {
824
868
  performanceScore: z.ZodNumber;
825
869
  performanceTier: z.ZodEnum<["high", "medium", "low", "new"]>;
826
870
  }, "strip", z.ZodTypeAny, {
871
+ agentId: string;
827
872
  totalCalls: number;
828
- averageRating: number;
829
873
  conversionRate: number;
830
874
  performanceScore: number;
831
875
  performanceTier: "high" | "medium" | "low" | "new";
832
- agentId: string;
833
876
  agentName: string;
834
877
  agentEmail: string;
835
878
  callsOnDate: number;
879
+ averageRating: number;
836
880
  }, {
881
+ agentId: string;
837
882
  totalCalls: number;
838
- averageRating: number;
839
883
  conversionRate: number;
840
884
  performanceScore: number;
841
885
  performanceTier: "high" | "medium" | "low" | "new";
842
- agentId: string;
843
886
  agentName: string;
844
887
  agentEmail: string;
845
888
  callsOnDate: number;
889
+ averageRating: number;
846
890
  }>, "many">;
847
891
  totalCount: z.ZodNumber;
848
892
  limit: z.ZodNumber;
@@ -852,15 +896,15 @@ export declare const dashboardWidgetsContract: {
852
896
  }, "strip", z.ZodTypeAny, {
853
897
  limit: number;
854
898
  items: {
899
+ agentId: string;
855
900
  totalCalls: number;
856
- averageRating: number;
857
901
  conversionRate: number;
858
902
  performanceScore: number;
859
903
  performanceTier: "high" | "medium" | "low" | "new";
860
- agentId: string;
861
904
  agentName: string;
862
905
  agentEmail: string;
863
906
  callsOnDate: number;
907
+ averageRating: number;
864
908
  }[];
865
909
  totalCount: number;
866
910
  skip: number;
@@ -869,15 +913,15 @@ export declare const dashboardWidgetsContract: {
869
913
  }, {
870
914
  limit: number;
871
915
  items: {
916
+ agentId: string;
872
917
  totalCalls: number;
873
- averageRating: number;
874
918
  conversionRate: number;
875
919
  performanceScore: number;
876
920
  performanceTier: "high" | "medium" | "low" | "new";
877
- agentId: string;
878
921
  agentName: string;
879
922
  agentEmail: string;
880
923
  callsOnDate: number;
924
+ averageRating: number;
881
925
  }[];
882
926
  totalCount: number;
883
927
  skip: number;
@@ -887,68 +931,89 @@ export declare const dashboardWidgetsContract: {
887
931
  };
888
932
  };
889
933
  getFaActives: {
890
- summary: "Get FA actives widget data";
891
934
  description: "Returns today's active workers from FA perspective";
935
+ query: z.ZodObject<{
936
+ date: z.ZodOptional<z.ZodString>;
937
+ }, "strip", z.ZodTypeAny, {
938
+ date?: string | undefined;
939
+ }, {
940
+ date?: string | undefined;
941
+ }>;
942
+ summary: "Get FA actives widget data";
892
943
  method: "GET";
893
944
  path: "/widgets/fa/actives";
894
945
  responses: {
895
946
  200: z.ZodObject<{
896
947
  today: z.ZodObject<{
897
948
  total: z.ZodNumber;
898
- byStatusFa: z.ZodRecord<z.ZodString, z.ZodNumber>;
949
+ byStatusFa: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
899
950
  }, "strip", z.ZodTypeAny, {
900
951
  total: number;
901
- byStatusFa: Record<string, number>;
952
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
902
953
  }, {
903
954
  total: number;
904
- byStatusFa: Record<string, number>;
955
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
905
956
  }>;
906
- pendingApproval: z.ZodNumber;
907
957
  }, "strip", z.ZodTypeAny, {
908
- pendingApproval: number;
909
958
  today: {
910
959
  total: number;
911
- byStatusFa: Record<string, number>;
960
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
912
961
  };
913
962
  }, {
914
- pendingApproval: number;
915
963
  today: {
916
964
  total: number;
917
- byStatusFa: Record<string, number>;
965
+ byStatusFa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
918
966
  };
919
967
  }>;
920
968
  };
921
969
  };
922
970
  getFaBookings: {
923
- summary: "Get FA bookings widget data";
924
971
  description: "Returns booking management summary for First Agent dashboard";
972
+ query: z.ZodObject<{
973
+ date: z.ZodOptional<z.ZodString>;
974
+ }, "strip", z.ZodTypeAny, {
975
+ date?: string | undefined;
976
+ }, {
977
+ date?: string | undefined;
978
+ }>;
979
+ summary: "Get FA bookings widget data";
925
980
  method: "GET";
926
981
  path: "/widgets/fa/bookings";
927
982
  responses: {
928
983
  200: z.ZodObject<{
929
- total: z.ZodNumber;
930
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
931
- activeBookings: z.ZodNumber;
984
+ totalToday: z.ZodNumber;
985
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
986
+ ongoingBookings: z.ZodNumber;
987
+ startingToday: z.ZodNumber;
932
988
  pendingConfirmation: z.ZodNumber;
933
989
  upcomingStarts: z.ZodNumber;
934
990
  }, "strip", z.ZodTypeAny, {
935
- total: number;
936
- byStatus: Record<string, number>;
937
- activeBookings: number;
991
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
992
+ totalToday: number;
993
+ ongoingBookings: number;
994
+ startingToday: number;
938
995
  pendingConfirmation: number;
939
996
  upcomingStarts: number;
940
997
  }, {
941
- total: number;
942
- byStatus: Record<string, number>;
943
- activeBookings: number;
998
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
999
+ totalToday: number;
1000
+ ongoingBookings: number;
1001
+ startingToday: number;
944
1002
  pendingConfirmation: number;
945
1003
  upcomingStarts: number;
946
1004
  }>;
947
1005
  };
948
1006
  };
949
1007
  getSaWorkers: {
950
- summary: "Get SA workers widget data";
951
1008
  description: "Returns worker recruitment summary for Second Agent dashboard";
1009
+ query: z.ZodObject<{
1010
+ date: z.ZodOptional<z.ZodString>;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ date?: string | undefined;
1013
+ }, {
1014
+ date?: string | undefined;
1015
+ }>;
1016
+ summary: "Get SA workers widget data";
952
1017
  method: "GET";
953
1018
  path: "/widgets/sa/workers";
954
1019
  responses: {
@@ -956,82 +1021,96 @@ export declare const dashboardWidgetsContract: {
956
1021
  total: z.ZodNumber;
957
1022
  addedThisWeek: z.ZodNumber;
958
1023
  addedThisMonth: z.ZodNumber;
959
- byAvailability: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1024
+ byAvailability: z.ZodOptional<z.ZodRecord<z.ZodEnum<["AVAILABLE", "PARTIALLY_AVAILABLE", "UNAVAILABLE"]>, z.ZodNumber>>;
960
1025
  }, "strip", z.ZodTypeAny, {
961
1026
  total: number;
962
1027
  addedThisWeek: number;
963
1028
  addedThisMonth: number;
964
- byAvailability?: Record<string, number> | undefined;
1029
+ byAvailability?: Partial<Record<"AVAILABLE" | "PARTIALLY_AVAILABLE" | "UNAVAILABLE", number>> | undefined;
965
1030
  }, {
966
1031
  total: number;
967
1032
  addedThisWeek: number;
968
1033
  addedThisMonth: number;
969
- byAvailability?: Record<string, number> | undefined;
1034
+ byAvailability?: Partial<Record<"AVAILABLE" | "PARTIALLY_AVAILABLE" | "UNAVAILABLE", number>> | undefined;
970
1035
  }>;
971
1036
  };
972
1037
  };
973
1038
  getSaBookings: {
974
- summary: "Get SA bookings widget data";
975
1039
  description: "Returns booking management summary for Second Agent dashboard";
1040
+ query: z.ZodObject<{
1041
+ date: z.ZodOptional<z.ZodString>;
1042
+ }, "strip", z.ZodTypeAny, {
1043
+ date?: string | undefined;
1044
+ }, {
1045
+ date?: string | undefined;
1046
+ }>;
1047
+ summary: "Get SA bookings widget data";
976
1048
  method: "GET";
977
1049
  path: "/widgets/sa/bookings";
978
1050
  responses: {
979
1051
  200: z.ZodObject<{
980
- total: z.ZodNumber;
981
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
982
- activeBookings: z.ZodNumber;
1052
+ totalToday: z.ZodNumber;
1053
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
1054
+ ongoingBookings: z.ZodNumber;
1055
+ startingToday: z.ZodNumber;
983
1056
  waitingForConfirmation: z.ZodNumber;
984
1057
  upcomingStarts: z.ZodNumber;
985
1058
  }, "strip", z.ZodTypeAny, {
986
- total: number;
987
- byStatus: Record<string, number>;
988
- activeBookings: number;
1059
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1060
+ totalToday: number;
1061
+ ongoingBookings: number;
1062
+ startingToday: number;
989
1063
  upcomingStarts: number;
990
1064
  waitingForConfirmation: number;
991
1065
  }, {
992
- total: number;
993
- byStatus: Record<string, number>;
994
- activeBookings: number;
1066
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1067
+ totalToday: number;
1068
+ ongoingBookings: number;
1069
+ startingToday: number;
995
1070
  upcomingStarts: number;
996
1071
  waitingForConfirmation: number;
997
1072
  }>;
998
1073
  };
999
1074
  };
1000
1075
  getSaActives: {
1001
- summary: "Get SA actives widget data";
1002
1076
  description: "Returns today's active workers from SA perspective";
1077
+ query: z.ZodObject<{
1078
+ date: z.ZodOptional<z.ZodString>;
1079
+ }, "strip", z.ZodTypeAny, {
1080
+ date?: string | undefined;
1081
+ }, {
1082
+ date?: string | undefined;
1083
+ }>;
1084
+ summary: "Get SA actives widget data";
1003
1085
  method: "GET";
1004
1086
  path: "/widgets/sa/actives";
1005
1087
  responses: {
1006
1088
  200: z.ZodObject<{
1007
1089
  today: z.ZodObject<{
1008
1090
  total: z.ZodNumber;
1009
- byStatusSa: z.ZodRecord<z.ZodString, z.ZodNumber>;
1091
+ byStatusSa: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
1010
1092
  }, "strip", z.ZodTypeAny, {
1011
1093
  total: number;
1012
- byStatusSa: Record<string, number>;
1094
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1013
1095
  }, {
1014
1096
  total: number;
1015
- byStatusSa: Record<string, number>;
1097
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1016
1098
  }>;
1017
- pendingConfirmation: z.ZodNumber;
1018
1099
  }, "strip", z.ZodTypeAny, {
1019
1100
  today: {
1020
1101
  total: number;
1021
- byStatusSa: Record<string, number>;
1102
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1022
1103
  };
1023
- pendingConfirmation: number;
1024
1104
  }, {
1025
1105
  today: {
1026
1106
  total: number;
1027
- byStatusSa: Record<string, number>;
1107
+ byStatusSa: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1028
1108
  };
1029
- pendingConfirmation: number;
1030
1109
  }>;
1031
1110
  };
1032
1111
  };
1033
1112
  getActivesTrend: {
1034
- summary: "Get actives historical trend";
1113
+ description: "Returns time-series data for actives over a date range";
1035
1114
  query: z.ZodObject<{
1036
1115
  startDate: z.ZodString;
1037
1116
  endDate: z.ZodString;
@@ -1042,7 +1121,7 @@ export declare const dashboardWidgetsContract: {
1042
1121
  startDate: string;
1043
1122
  endDate: string;
1044
1123
  }>;
1045
- description: "Returns time-series data for actives over a date range";
1124
+ summary: "Get actives historical trend";
1046
1125
  method: "GET";
1047
1126
  path: "/trends/actives";
1048
1127
  responses: {
@@ -1050,15 +1129,15 @@ export declare const dashboardWidgetsContract: {
1050
1129
  data: z.ZodArray<z.ZodObject<{
1051
1130
  date: z.ZodString;
1052
1131
  total: z.ZodNumber;
1053
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
1132
+ byStatus: z.ZodRecord<z.ZodEnum<["PENDING", "ACTIVE", "VACATION", "LEFT_THE_SITE", "MEDICAL_LEAVE", "DAY_OFF", "INJURY"]>, z.ZodNumber>;
1054
1133
  }, "strip", z.ZodTypeAny, {
1055
1134
  date: string;
1056
1135
  total: number;
1057
- byStatus: Record<string, number>;
1136
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1058
1137
  }, {
1059
1138
  date: string;
1060
1139
  total: number;
1061
- byStatus: Record<string, number>;
1140
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1062
1141
  }>, "many">;
1063
1142
  summary: z.ZodObject<{
1064
1143
  averageDaily: z.ZodNumber;
@@ -1082,7 +1161,7 @@ export declare const dashboardWidgetsContract: {
1082
1161
  data: {
1083
1162
  date: string;
1084
1163
  total: number;
1085
- byStatus: Record<string, number>;
1164
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1086
1165
  }[];
1087
1166
  }, {
1088
1167
  summary: {
@@ -1093,13 +1172,13 @@ export declare const dashboardWidgetsContract: {
1093
1172
  data: {
1094
1173
  date: string;
1095
1174
  total: number;
1096
- byStatus: Record<string, number>;
1175
+ byStatus: Partial<Record<"ACTIVE" | "PENDING" | "VACATION" | "LEFT_THE_SITE" | "MEDICAL_LEAVE" | "DAY_OFF" | "INJURY", number>>;
1097
1176
  }[];
1098
1177
  }>;
1099
1178
  };
1100
1179
  };
1101
1180
  getBookingsTrend: {
1102
- summary: "Get bookings historical trend";
1181
+ description: "Returns time-series data for bookings over a date range";
1103
1182
  query: z.ZodObject<{
1104
1183
  startDate: z.ZodString;
1105
1184
  endDate: z.ZodString;
@@ -1110,7 +1189,7 @@ export declare const dashboardWidgetsContract: {
1110
1189
  startDate: string;
1111
1190
  endDate: string;
1112
1191
  }>;
1113
- description: "Returns time-series data for bookings over a date range";
1192
+ summary: "Get bookings historical trend";
1114
1193
  method: "GET";
1115
1194
  path: "/trends/bookings";
1116
1195
  responses: {
@@ -1118,15 +1197,15 @@ export declare const dashboardWidgetsContract: {
1118
1197
  data: z.ZodArray<z.ZodObject<{
1119
1198
  date: z.ZodString;
1120
1199
  total: z.ZodNumber;
1121
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
1200
+ byStatus: z.ZodRecord<z.ZodEnum<["CANCELLED", "JOB_CANCELLED", "REFUSED_BY_CLIENT", "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY", "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE", "REFUSED_BY_FIRST_JOB_FILLED", "REFUSED_BY_FIRST_IGNORED_DENIED", "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE", "WAITING_FOR_CONFIRMATION", "DIDNT_START_BECAUSE_OF_WORKER", "DIDNT_START_BECAUSE_OF_US", "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE", "DIDNT_START_BECAUSE_OF_AGENCY", "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS", "DIDNT_START_OVERBOOK_BY_CLIENT", "DIDNT_START_OVERBOOK_BY_US", "ANOTHER_SITUATION", "CONFIRMED_OVERBOOK", "CONFIRMED", "YELLOW_FOR_TOMORROW", "SPOKE_WITH_WORKER_IN_THE_MORNING", "ON_THE_WAY_TO_THE_SITE", "AT_THE_INDUCTION", "STARTED_THE_JOB", "COMPLETED"]>, z.ZodNumber>;
1122
1201
  }, "strip", z.ZodTypeAny, {
1123
1202
  date: string;
1124
1203
  total: number;
1125
- byStatus: Record<string, number>;
1204
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1126
1205
  }, {
1127
1206
  date: string;
1128
1207
  total: number;
1129
- byStatus: Record<string, number>;
1208
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1130
1209
  }>, "many">;
1131
1210
  summary: z.ZodObject<{
1132
1211
  averageDaily: z.ZodNumber;
@@ -1146,7 +1225,7 @@ export declare const dashboardWidgetsContract: {
1146
1225
  data: {
1147
1226
  date: string;
1148
1227
  total: number;
1149
- byStatus: Record<string, number>;
1228
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1150
1229
  }[];
1151
1230
  }, {
1152
1231
  summary: {
@@ -1156,13 +1235,13 @@ export declare const dashboardWidgetsContract: {
1156
1235
  data: {
1157
1236
  date: string;
1158
1237
  total: number;
1159
- byStatus: Record<string, number>;
1238
+ byStatus: Partial<Record<"CANCELLED" | "JOB_CANCELLED" | "REFUSED_BY_CLIENT" | "REFUSED_BY_FIRST_BECAUSE_OF_NATIONALITY" | "REFUSED_BY_FIRST_NOT_ENOUGH_EXPERIENCE" | "REFUSED_BY_FIRST_JOB_FILLED" | "REFUSED_BY_FIRST_IGNORED_DENIED" | "REFUSED_BY_FIRST_BECAUSE_OF_DISTANCE" | "WAITING_FOR_CONFIRMATION" | "DIDNT_START_BECAUSE_OF_WORKER" | "DIDNT_START_BECAUSE_OF_US" | "DIDNT_START_BECAUSE_OF_CONSTRUCTION_SITE" | "DIDNT_START_BECAUSE_OF_AGENCY" | "DIDNT_START_BECAUSE_OF_TOOLS_REQUIREMENTS" | "DIDNT_START_OVERBOOK_BY_CLIENT" | "DIDNT_START_OVERBOOK_BY_US" | "ANOTHER_SITUATION" | "CONFIRMED_OVERBOOK" | "CONFIRMED" | "YELLOW_FOR_TOMORROW" | "SPOKE_WITH_WORKER_IN_THE_MORNING" | "ON_THE_WAY_TO_THE_SITE" | "AT_THE_INDUCTION" | "STARTED_THE_JOB" | "COMPLETED", number>>;
1160
1239
  }[];
1161
1240
  }>;
1162
1241
  };
1163
1242
  };
1164
1243
  getCallPerformanceTrend: {
1165
- summary: "Get call performance historical trend";
1244
+ description: "Returns time-series data for call performance over a date range";
1166
1245
  query: z.ZodObject<{
1167
1246
  startDate: z.ZodString;
1168
1247
  endDate: z.ZodString;
@@ -1173,7 +1252,7 @@ export declare const dashboardWidgetsContract: {
1173
1252
  startDate: string;
1174
1253
  endDate: string;
1175
1254
  }>;
1176
- description: "Returns time-series data for call performance over a date range";
1255
+ summary: "Get call performance historical trend";
1177
1256
  method: "GET";
1178
1257
  path: "/trends/call-performance";
1179
1258
  responses: {
@@ -1187,15 +1266,15 @@ export declare const dashboardWidgetsContract: {
1187
1266
  }, "strip", z.ZodTypeAny, {
1188
1267
  date: string;
1189
1268
  totalCalls: number;
1190
- averageRating: number;
1191
1269
  conversionRate: number;
1192
1270
  performanceScore: number;
1271
+ averageRating: number;
1193
1272
  }, {
1194
1273
  date: string;
1195
1274
  totalCalls: number;
1196
- averageRating: number;
1197
1275
  conversionRate: number;
1198
1276
  performanceScore: number;
1277
+ averageRating: number;
1199
1278
  }>, "many">;
1200
1279
  summary: z.ZodObject<{
1201
1280
  averageDailyCalls: z.ZodNumber;
@@ -1219,9 +1298,9 @@ export declare const dashboardWidgetsContract: {
1219
1298
  data: {
1220
1299
  date: string;
1221
1300
  totalCalls: number;
1222
- averageRating: number;
1223
1301
  conversionRate: number;
1224
1302
  performanceScore: number;
1303
+ averageRating: number;
1225
1304
  }[];
1226
1305
  }, {
1227
1306
  summary: {
@@ -1232,15 +1311,15 @@ export declare const dashboardWidgetsContract: {
1232
1311
  data: {
1233
1312
  date: string;
1234
1313
  totalCalls: number;
1235
- averageRating: number;
1236
1314
  conversionRate: number;
1237
1315
  performanceScore: number;
1316
+ averageRating: number;
1238
1317
  }[];
1239
1318
  }>;
1240
1319
  };
1241
1320
  };
1242
1321
  getWorkersTrend: {
1243
- summary: "Get workers historical trend (SA only)";
1322
+ description: "Returns time-series data for worker additions over a date range";
1244
1323
  query: z.ZodObject<{
1245
1324
  startDate: z.ZodString;
1246
1325
  endDate: z.ZodString;
@@ -1251,7 +1330,7 @@ export declare const dashboardWidgetsContract: {
1251
1330
  startDate: string;
1252
1331
  endDate: string;
1253
1332
  }>;
1254
- description: "Returns time-series data for worker additions over a date range";
1333
+ summary: "Get workers historical trend (SA only)";
1255
1334
  method: "GET";
1256
1335
  path: "/trends/workers";
1257
1336
  responses: {
@@ -1303,7 +1382,7 @@ export declare const dashboardWidgetsContract: {
1303
1382
  };
1304
1383
  };
1305
1384
  getCollaborationsTrend: {
1306
- summary: "Get collaborations historical trend (FA only)";
1385
+ description: "Returns time-series data for collaborations over a date range";
1307
1386
  query: z.ZodObject<{
1308
1387
  startDate: z.ZodString;
1309
1388
  endDate: z.ZodString;
@@ -1314,7 +1393,7 @@ export declare const dashboardWidgetsContract: {
1314
1393
  startDate: string;
1315
1394
  endDate: string;
1316
1395
  }>;
1317
- description: "Returns time-series data for collaborations over a date range";
1396
+ summary: "Get collaborations historical trend (FA only)";
1318
1397
  method: "GET";
1319
1398
  path: "/trends/collaborations";
1320
1399
  responses: {
@@ -1322,14 +1401,14 @@ export declare const dashboardWidgetsContract: {
1322
1401
  data: z.ZodArray<z.ZodObject<{
1323
1402
  date: z.ZodString;
1324
1403
  created: z.ZodNumber;
1325
- byStatus: z.ZodRecord<z.ZodString, z.ZodNumber>;
1404
+ byStatus: z.ZodRecord<z.ZodEnum<["ACTIVE", "INACTIVE", "PENDING_APPROVAL", "REJECTED", "APPROVED", "CHANGED_COMPANY", "CHANGED_AGENT", "CHANGED_COMPANY_AND_AGENT"]>, z.ZodNumber>;
1326
1405
  }, "strip", z.ZodTypeAny, {
1327
1406
  date: string;
1328
- byStatus: Record<string, number>;
1407
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
1329
1408
  created: number;
1330
1409
  }, {
1331
1410
  date: string;
1332
- byStatus: Record<string, number>;
1411
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
1333
1412
  created: number;
1334
1413
  }>, "many">;
1335
1414
  summary: z.ZodObject<{
@@ -1349,7 +1428,7 @@ export declare const dashboardWidgetsContract: {
1349
1428
  };
1350
1429
  data: {
1351
1430
  date: string;
1352
- byStatus: Record<string, number>;
1431
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
1353
1432
  created: number;
1354
1433
  }[];
1355
1434
  }, {
@@ -1359,13 +1438,14 @@ export declare const dashboardWidgetsContract: {
1359
1438
  };
1360
1439
  data: {
1361
1440
  date: string;
1362
- byStatus: Record<string, number>;
1441
+ byStatus: Partial<Record<"APPROVED" | "ACTIVE" | "INACTIVE" | "PENDING_APPROVAL" | "REJECTED" | "CHANGED_COMPANY" | "CHANGED_AGENT" | "CHANGED_COMPANY_AND_AGENT", number>>;
1363
1442
  created: number;
1364
1443
  }[];
1365
1444
  }>;
1366
1445
  };
1367
1446
  };
1368
1447
  };
1448
+ export type DashboardWidgetQuery = z.infer<typeof DashboardWidgetQuerySchema>;
1369
1449
  export type DateRangeQuery = z.infer<typeof DateRangeQuerySchema>;
1370
1450
  export type TrendDataPoint = z.infer<typeof TrendDataPointSchema>;
1371
1451
  export type FaPipelineWidget = z.infer<typeof FaPipelineWidgetSchema>;