@dakkitor/api-contracts 1.1.131 → 1.1.133
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/abilities.contract.d.ts +19 -13
- package/dist/abilities/abilities.contract.js +33 -18
- package/dist/abilities/first-agent.abilities.json +68 -56
- package/dist/abilities/second-agent.abilities.json +3 -3
- package/dist/abilities/team-leads.json +3 -6
- package/dist/actives/actives.contract.d.ts +6313 -6313
- package/dist/actives/actives.contract.js +92 -92
- package/dist/agent-client-links/agent-client-links.contract.d.ts +511 -511
- package/dist/auth/auth.contract.d.ts +16 -16
- package/dist/bookings/bookings.contract.d.ts +23378 -23378
- package/dist/call-history/call-history.contract.d.ts +366 -366
- package/dist/call-history/call-history.contract.js +67 -67
- package/dist/client-contacts/client-contacts.contract.d.ts +159 -159
- package/dist/clients/clients.contract.d.ts +72 -72
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +1330 -1330
- package/dist/collaborations/collaborations.contract.d.ts +1198 -1198
- package/dist/common/call-rating.schema.d.ts +12 -12
- package/dist/common/call-rating.schema.js +48 -40
- 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 +1 -2
- package/dist/common/error-schemas.d.ts +11 -5
- package/dist/common/error-schemas.js +11 -8
- package/dist/common/openapi-metadata.d.ts +54 -44
- package/dist/common/openapi-metadata.js +135 -129
- package/dist/common/pagination-query.schema.d.ts +11 -5
- package/dist/common/pagination-query.schema.js +11 -8
- package/dist/companies/companies.contract.d.ts +40 -40
- package/dist/cron-executions/cron-executions.contract.d.ts +14 -14
- package/dist/curated-workers/curated-workers.contract.d.ts +211 -211
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +798 -616
- package/dist/dashboards/agent-daily-metrics.contract.js +100 -89
- package/dist/dashboards/dashboard-widgets.contract.d.ts +75 -75
- package/dist/dashboards/dashboard-widgets.contract.js +89 -89
- package/dist/dashboards/dashboard.contract.d.ts +305 -215
- package/dist/files/files.contract.d.ts +1544 -1177
- package/dist/files/files.contract.js +177 -162
- package/dist/health/health.contract.d.ts +191 -144
- package/dist/health/health.contract.js +53 -40
- package/dist/index.d.ts +67 -67
- package/dist/jobs/jobs.contract.d.ts +2553 -2553
- package/dist/jobs/jobs.contract.js +150 -150
- package/dist/lead-assignments/lead-assignments.contract.d.ts +587 -587
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +239 -239
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +25 -25
- package/dist/leads/leads.contract.d.ts +108 -108
- package/dist/leads/leads.contract.js +119 -119
- package/dist/locations/locations.contract.d.ts +7 -7
- package/dist/monitoring/monitoring.contract.d.ts +13 -13
- package/dist/monitoring/monitoring.contract.js +37 -37
- package/dist/own-research/own-research.contract.d.ts +535 -134
- package/dist/own-research/own-research.contract.d.ts.map +1 -1
- package/dist/own-research/own-research.contract.js +88 -56
- package/dist/postcodes/postcodes.contract.d.ts +24 -24
- package/dist/qualifications/qualifications.contract.d.ts +1898 -1387
- package/dist/qualifications/qualifications.contract.js +193 -171
- package/dist/trades/trades.contract.d.ts +991 -763
- package/dist/trades/trades.contract.js +111 -89
- package/dist/users/users.contract.d.ts +202 -202
- package/dist/users/users.contract.js +121 -121
- package/dist/workers/workers.contract.d.ts +710 -710
- package/dist/workers/workers.contract.js +150 -150
- package/package.json +1 -1
|
@@ -14,50 +14,50 @@ const pagination_schema_1 = require("../common/pagination.schema");
|
|
|
14
14
|
* Lead Status Enum
|
|
15
15
|
*/
|
|
16
16
|
exports.LeadStatusSchema = zod_1.z
|
|
17
|
-
.enum([
|
|
18
|
-
.openapi({ title:
|
|
17
|
+
.enum(['AVAILABLE', 'ASSIGNED', 'BLACKLISTED'])
|
|
18
|
+
.openapi({ title: 'LeadStatus' });
|
|
19
19
|
/**
|
|
20
20
|
* Lead Sortable Fields Enum
|
|
21
21
|
*/
|
|
22
22
|
exports.LeadSortableFieldsSchema = zod_1.z
|
|
23
23
|
.enum([
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
'name',
|
|
25
|
+
'phoneNumber',
|
|
26
|
+
'status',
|
|
27
|
+
'source',
|
|
28
|
+
'lastCalledAt',
|
|
29
|
+
'qualityScore',
|
|
30
|
+
'conversionRate',
|
|
31
|
+
'totalCalls',
|
|
32
|
+
'createdAt',
|
|
33
|
+
'updatedAt',
|
|
34
34
|
])
|
|
35
|
-
.openapi({ title:
|
|
35
|
+
.openapi({ title: 'LeadSortableFields' });
|
|
36
36
|
/**
|
|
37
37
|
* Quality Tier Enum
|
|
38
38
|
*/
|
|
39
39
|
exports.QualityTierSchema = zod_1.z
|
|
40
|
-
.enum([
|
|
41
|
-
.openapi({ title:
|
|
40
|
+
.enum(['high', 'medium', 'low', 'untested'])
|
|
41
|
+
.openapi({ title: 'QualityTier' });
|
|
42
42
|
/**
|
|
43
43
|
* Main Lead Schema
|
|
44
44
|
*/
|
|
45
45
|
exports.LeadSchema = zod_1.z
|
|
46
46
|
.object({
|
|
47
|
-
id: zod_1.z.string().uuid().describe(
|
|
48
|
-
name: zod_1.z.string().describe(
|
|
49
|
-
phoneNumber: zod_1.z.string().describe(
|
|
50
|
-
status: exports.LeadStatusSchema.describe(
|
|
47
|
+
id: zod_1.z.string().uuid().describe('Lead ID'),
|
|
48
|
+
name: zod_1.z.string().describe('Company Name'),
|
|
49
|
+
phoneNumber: zod_1.z.string().describe('Phone Number'),
|
|
50
|
+
status: exports.LeadStatusSchema.describe('Lead Status'),
|
|
51
51
|
blacklistReason: zod_1.z
|
|
52
52
|
.string()
|
|
53
53
|
.optional()
|
|
54
54
|
.nullable()
|
|
55
|
-
.describe(
|
|
56
|
-
source: zod_1.z.string().describe(
|
|
55
|
+
.describe('Reason for Blacklisting'),
|
|
56
|
+
source: zod_1.z.string().describe('Lead Source'),
|
|
57
57
|
lastCalledAt: zod_1.z
|
|
58
58
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
59
59
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
60
|
-
.describe(
|
|
60
|
+
.describe('Last Called Date')
|
|
61
61
|
.optional()
|
|
62
62
|
.nullable(),
|
|
63
63
|
qualityScore: zod_1.z
|
|
@@ -66,52 +66,52 @@ exports.LeadSchema = zod_1.z
|
|
|
66
66
|
.max(1)
|
|
67
67
|
.optional()
|
|
68
68
|
.nullable()
|
|
69
|
-
.describe(
|
|
69
|
+
.describe('Overall Quality Score'),
|
|
70
70
|
qualityTier: exports.QualityTierSchema.optional()
|
|
71
71
|
.nullable()
|
|
72
|
-
.describe(
|
|
72
|
+
.describe('Quality Tier Classification'),
|
|
73
73
|
conversionRate: zod_1.z
|
|
74
74
|
.number()
|
|
75
75
|
.min(0)
|
|
76
76
|
.max(1)
|
|
77
77
|
.optional()
|
|
78
78
|
.nullable()
|
|
79
|
-
.describe(
|
|
80
|
-
totalCalls: zod_1.z.number().int().optional().nullable().describe(
|
|
79
|
+
.describe('Conversion Rate'),
|
|
80
|
+
totalCalls: zod_1.z.number().int().optional().nullable().describe('Total Calls'),
|
|
81
81
|
createdAt: zod_1.z
|
|
82
82
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
83
83
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
84
|
-
.describe(
|
|
84
|
+
.describe('Creation Date'),
|
|
85
85
|
updatedAt: zod_1.z
|
|
86
86
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
87
87
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
88
|
-
.describe(
|
|
88
|
+
.describe('Last Update Date'),
|
|
89
89
|
})
|
|
90
|
-
.openapi({ title:
|
|
90
|
+
.openapi({ title: 'Lead' });
|
|
91
91
|
/**
|
|
92
92
|
* Create Lead Schema
|
|
93
93
|
*/
|
|
94
94
|
exports.CreateLeadSchema = zod_1.z
|
|
95
95
|
.object({
|
|
96
|
-
name: zod_1.z.string().max(255).describe(
|
|
97
|
-
phoneNumber: zod_1.z.string().max(20).describe(
|
|
98
|
-
status: exports.LeadStatusSchema.optional().describe(
|
|
99
|
-
isBlacklisted: zod_1.z.boolean().default(false).describe(
|
|
96
|
+
name: zod_1.z.string().max(255).describe('Company Name'),
|
|
97
|
+
phoneNumber: zod_1.z.string().max(20).describe('Phone Number'),
|
|
98
|
+
status: exports.LeadStatusSchema.optional().describe('Lead Status'),
|
|
99
|
+
isBlacklisted: zod_1.z.boolean().default(false).describe('Is Blacklisted'),
|
|
100
100
|
blacklistReason: zod_1.z
|
|
101
101
|
.string()
|
|
102
102
|
.max(500)
|
|
103
103
|
.optional()
|
|
104
104
|
.nullable()
|
|
105
|
-
.describe(
|
|
106
|
-
source: zod_1.z.string().max(100).describe(
|
|
105
|
+
.describe('Reason for Blacklisting'),
|
|
106
|
+
source: zod_1.z.string().max(100).describe('Lead Source'),
|
|
107
107
|
})
|
|
108
|
-
.openapi({ title:
|
|
108
|
+
.openapi({ title: 'CreateLead' })
|
|
109
109
|
.superRefine((data, ctx) => {
|
|
110
|
-
if (data.status ===
|
|
110
|
+
if (data.status === 'BLACKLISTED' && !data.blacklistReason) {
|
|
111
111
|
ctx.addIssue({
|
|
112
112
|
code: zod_1.z.ZodIssueCode.custom,
|
|
113
|
-
message:
|
|
114
|
-
path: [
|
|
113
|
+
message: 'blacklistReason is required when status is BLACKLISTED',
|
|
114
|
+
path: ['blacklistReason'],
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
});
|
|
@@ -120,23 +120,23 @@ exports.CreateLeadSchema = zod_1.z
|
|
|
120
120
|
*/
|
|
121
121
|
exports.UpdateLeadSchema = zod_1.z
|
|
122
122
|
.object({
|
|
123
|
-
name: zod_1.z.string().max(255).optional().describe(
|
|
124
|
-
phoneNumber: zod_1.z.string().max(20).optional().describe(
|
|
125
|
-
status: exports.LeadStatusSchema.optional().describe(
|
|
123
|
+
name: zod_1.z.string().max(255).optional().describe('Company Name'),
|
|
124
|
+
phoneNumber: zod_1.z.string().max(20).optional().describe('Phone Number'),
|
|
125
|
+
status: exports.LeadStatusSchema.optional().describe('Lead Status'),
|
|
126
126
|
blacklistReason: zod_1.z
|
|
127
127
|
.string()
|
|
128
128
|
.optional()
|
|
129
129
|
.nullable()
|
|
130
|
-
.describe(
|
|
131
|
-
source: zod_1.z.string().max(100).optional().describe(
|
|
130
|
+
.describe('Reason for Blacklisting'),
|
|
131
|
+
source: zod_1.z.string().max(100).optional().describe('Lead Source'),
|
|
132
132
|
})
|
|
133
|
-
.openapi({ title:
|
|
133
|
+
.openapi({ title: 'UpdateLead' })
|
|
134
134
|
.superRefine((data, ctx) => {
|
|
135
|
-
if (data.status ===
|
|
135
|
+
if (data.status === 'BLACKLISTED' && !data.blacklistReason) {
|
|
136
136
|
ctx.addIssue({
|
|
137
137
|
code: zod_1.z.ZodIssueCode.custom,
|
|
138
|
-
message:
|
|
139
|
-
path: [
|
|
138
|
+
message: 'blacklistReason is required when status is BLACKLISTED',
|
|
139
|
+
path: ['blacklistReason'],
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
});
|
|
@@ -148,207 +148,207 @@ exports.FilterLeadSchema = pagination_query_schema_1.PaginationQuerySchema.exten
|
|
|
148
148
|
.string()
|
|
149
149
|
.optional()
|
|
150
150
|
.nullable()
|
|
151
|
-
.describe(
|
|
151
|
+
.describe('Filter by company name (case-insensitive, partial match)'),
|
|
152
152
|
phoneNumber: zod_1.z
|
|
153
153
|
.string()
|
|
154
154
|
.optional()
|
|
155
155
|
.nullable()
|
|
156
|
-
.describe(
|
|
156
|
+
.describe('Filter by phone number (partial match)'),
|
|
157
157
|
status: exports.LeadStatusSchema.optional()
|
|
158
158
|
.nullable()
|
|
159
|
-
.describe(
|
|
159
|
+
.describe('Filter by lead status'),
|
|
160
160
|
source: zod_1.z
|
|
161
161
|
.string()
|
|
162
162
|
.optional()
|
|
163
163
|
.nullable()
|
|
164
|
-
.describe(
|
|
164
|
+
.describe('Filter by source (case-insensitive, partial match)'),
|
|
165
165
|
minQualityScore: zod_1.z
|
|
166
166
|
.number()
|
|
167
167
|
.min(0)
|
|
168
168
|
.max(1)
|
|
169
169
|
.optional()
|
|
170
170
|
.nullable()
|
|
171
|
-
.describe(
|
|
171
|
+
.describe('Filter by minimum quality score (0-1)'),
|
|
172
172
|
maxQualityScore: zod_1.z
|
|
173
173
|
.number()
|
|
174
174
|
.min(0)
|
|
175
175
|
.max(1)
|
|
176
176
|
.optional()
|
|
177
177
|
.nullable()
|
|
178
|
-
.describe(
|
|
178
|
+
.describe('Filter by maximum quality score (0-1)'),
|
|
179
179
|
qualityTier: exports.QualityTierSchema.optional()
|
|
180
180
|
.nullable()
|
|
181
|
-
.describe(
|
|
181
|
+
.describe('Filter by quality tier'),
|
|
182
182
|
minConversionRate: zod_1.z
|
|
183
183
|
.number()
|
|
184
184
|
.min(0)
|
|
185
185
|
.max(1)
|
|
186
186
|
.optional()
|
|
187
187
|
.nullable()
|
|
188
|
-
.describe(
|
|
188
|
+
.describe('Filter by minimum conversion rate (0-1)'),
|
|
189
189
|
minTotalCalls: zod_1.z
|
|
190
190
|
.number()
|
|
191
191
|
.int()
|
|
192
192
|
.min(0)
|
|
193
193
|
.optional()
|
|
194
194
|
.nullable()
|
|
195
|
-
.describe(
|
|
195
|
+
.describe('Filter by minimum total calls'),
|
|
196
196
|
lastCalledAt: common_schemas_1.DateRangeSchema.optional()
|
|
197
197
|
.nullable()
|
|
198
|
-
.describe(
|
|
198
|
+
.describe('Filter by last called date range'),
|
|
199
199
|
sortBy: exports.LeadSortableFieldsSchema.optional()
|
|
200
200
|
.nullable()
|
|
201
|
-
.describe(
|
|
201
|
+
.describe('The field to sort the results by'),
|
|
202
202
|
sortOrder: common_schemas_1.SortOrderSchema.optional()
|
|
203
203
|
.nullable()
|
|
204
|
-
.describe(
|
|
204
|
+
.describe('The order to sort the results by'),
|
|
205
205
|
});
|
|
206
206
|
/**
|
|
207
207
|
* Call History Response Schema for leads
|
|
208
208
|
*/
|
|
209
209
|
exports.LeadCallHistoryResponseSchema = zod_1.z
|
|
210
210
|
.object({
|
|
211
|
-
id: zod_1.z.string().uuid().describe(
|
|
212
|
-
assignmentId: zod_1.z.string().uuid().describe(
|
|
213
|
-
leadId: zod_1.z.string().uuid().describe(
|
|
214
|
-
agentId: zod_1.z.string().uuid().describe(
|
|
211
|
+
id: zod_1.z.string().uuid().describe('Call History ID'),
|
|
212
|
+
assignmentId: zod_1.z.string().uuid().describe('Assignment ID'),
|
|
213
|
+
leadId: zod_1.z.string().uuid().describe('Lead ID'),
|
|
214
|
+
agentId: zod_1.z.string().uuid().describe('Agent ID'),
|
|
215
215
|
callDate: zod_1.z
|
|
216
216
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
217
217
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
218
|
-
.describe(
|
|
219
|
-
callType: call_history_contract_1.CallTypeSchema.describe(
|
|
220
|
-
rating: call_history_contract_1.CallRatingSchema.describe(
|
|
221
|
-
ratingWeight: zod_1.z.number().describe(
|
|
222
|
-
notes: zod_1.z.string().nullable().optional().describe(
|
|
218
|
+
.describe('Call Date'),
|
|
219
|
+
callType: call_history_contract_1.CallTypeSchema.describe('Call Type'),
|
|
220
|
+
rating: call_history_contract_1.CallRatingSchema.describe('Call Rating'),
|
|
221
|
+
ratingWeight: zod_1.z.number().describe('Rating Weight'),
|
|
222
|
+
notes: zod_1.z.string().nullable().optional().describe('Call Notes'),
|
|
223
223
|
createdAt: zod_1.z
|
|
224
224
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
225
225
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
226
|
-
.describe(
|
|
226
|
+
.describe('Creation Date'),
|
|
227
227
|
updatedAt: zod_1.z
|
|
228
228
|
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
229
229
|
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
230
|
-
.describe(
|
|
230
|
+
.describe('Last Update Date'),
|
|
231
231
|
})
|
|
232
|
-
.openapi({ title:
|
|
232
|
+
.openapi({ title: 'LeadCallHistoryResponse' });
|
|
233
233
|
/**
|
|
234
234
|
* Lead Statistics Schema for quality dashboard
|
|
235
235
|
*/
|
|
236
236
|
exports.TierDistributionSchema = zod_1.z
|
|
237
237
|
.object({
|
|
238
|
-
high: zod_1.z.number().int().describe(
|
|
239
|
-
medium: zod_1.z.number().int().describe(
|
|
240
|
-
low: zod_1.z.number().int().describe(
|
|
241
|
-
untested: zod_1.z.number().int().describe(
|
|
238
|
+
high: zod_1.z.number().int().describe('High Quality Leads'),
|
|
239
|
+
medium: zod_1.z.number().int().describe('Medium Quality Leads'),
|
|
240
|
+
low: zod_1.z.number().int().describe('Low Quality Leads'),
|
|
241
|
+
untested: zod_1.z.number().int().describe('Untested Leads'),
|
|
242
242
|
})
|
|
243
|
-
.openapi({ title:
|
|
243
|
+
.openapi({ title: 'TierDistribution' });
|
|
244
244
|
exports.LeadStatisticsSchema = zod_1.z
|
|
245
245
|
.object({
|
|
246
|
-
totalLeads: zod_1.z.number().int().describe(
|
|
247
|
-
avgQualityScore: zod_1.z.number().min(0).max(1).describe(
|
|
246
|
+
totalLeads: zod_1.z.number().int().describe('Total Leads'),
|
|
247
|
+
avgQualityScore: zod_1.z.number().min(0).max(1).describe('Average Quality Score'),
|
|
248
248
|
avgConversionRate: zod_1.z
|
|
249
249
|
.number()
|
|
250
250
|
.min(0)
|
|
251
251
|
.max(1)
|
|
252
|
-
.describe(
|
|
253
|
-
avgCallsPerLead: zod_1.z.number().describe(
|
|
254
|
-
tierDistribution: exports.TierDistributionSchema.describe(
|
|
252
|
+
.describe('Average Conversion Rate'),
|
|
253
|
+
avgCallsPerLead: zod_1.z.number().describe('Average Calls Per Lead'),
|
|
254
|
+
tierDistribution: exports.TierDistributionSchema.describe('Tier Distribution'),
|
|
255
255
|
})
|
|
256
|
-
.openapi({ title:
|
|
256
|
+
.openapi({ title: 'LeadStatistics' });
|
|
257
257
|
exports.PaginatedLeadResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.LeadSchema)
|
|
258
|
-
.describe(
|
|
259
|
-
.openapi({ title:
|
|
258
|
+
.describe('Leads retrieved successfully')
|
|
259
|
+
.openapi({ title: 'LeadsPaginatedResponse' });
|
|
260
260
|
const c = (0, core_1.initContract)();
|
|
261
261
|
exports.leadsContractRouter = c.router({
|
|
262
262
|
create: {
|
|
263
|
-
method:
|
|
264
|
-
path:
|
|
263
|
+
method: 'POST',
|
|
264
|
+
path: '/v2/leads',
|
|
265
265
|
responses: {
|
|
266
266
|
201: exports.LeadSchema,
|
|
267
267
|
409: error_schemas_1.ErrorResponseSchema,
|
|
268
268
|
},
|
|
269
269
|
body: exports.CreateLeadSchema,
|
|
270
|
-
summary:
|
|
271
|
-
metadata: { tags: [
|
|
270
|
+
summary: 'Create a new lead',
|
|
271
|
+
metadata: { tags: ['Leads'], openApi: { operationId: 'createLead' } },
|
|
272
272
|
},
|
|
273
273
|
findAll: {
|
|
274
|
-
method:
|
|
275
|
-
path:
|
|
274
|
+
method: 'GET',
|
|
275
|
+
path: '/v2/leads',
|
|
276
276
|
responses: {
|
|
277
277
|
200: exports.PaginatedLeadResponseSchema,
|
|
278
278
|
},
|
|
279
279
|
query: exports.FilterLeadSchema,
|
|
280
|
-
summary:
|
|
281
|
-
metadata: { tags: [
|
|
280
|
+
summary: 'Get all leads',
|
|
281
|
+
metadata: { tags: ['Leads'], openApi: { operationId: 'findAllLeads' } },
|
|
282
282
|
},
|
|
283
283
|
findOne: {
|
|
284
|
-
method:
|
|
285
|
-
path:
|
|
284
|
+
method: 'GET',
|
|
285
|
+
path: '/v2/leads/:id',
|
|
286
286
|
responses: {
|
|
287
287
|
200: exports.LeadSchema,
|
|
288
288
|
404: error_schemas_1.ErrorResponseSchema,
|
|
289
289
|
},
|
|
290
290
|
pathParams: zod_1.z.object({
|
|
291
|
-
id: zod_1.z.string().uuid().describe(
|
|
291
|
+
id: zod_1.z.string().uuid().describe('Lead ID'),
|
|
292
292
|
}),
|
|
293
|
-
summary:
|
|
294
|
-
metadata: { tags: [
|
|
293
|
+
summary: 'Get a lead by ID',
|
|
294
|
+
metadata: { tags: ['Leads'], openApi: { operationId: 'findLeadById' } },
|
|
295
295
|
},
|
|
296
296
|
update: {
|
|
297
|
-
method:
|
|
298
|
-
path:
|
|
297
|
+
method: 'PATCH',
|
|
298
|
+
path: '/v2/leads/:id',
|
|
299
299
|
responses: {
|
|
300
300
|
200: exports.LeadSchema,
|
|
301
301
|
404: error_schemas_1.ErrorResponseSchema,
|
|
302
302
|
409: error_schemas_1.ErrorResponseSchema,
|
|
303
303
|
},
|
|
304
304
|
pathParams: zod_1.z.object({
|
|
305
|
-
id: zod_1.z.string().uuid().describe(
|
|
305
|
+
id: zod_1.z.string().uuid().describe('Lead ID'),
|
|
306
306
|
}),
|
|
307
307
|
body: exports.UpdateLeadSchema,
|
|
308
|
-
summary:
|
|
309
|
-
metadata: { tags: [
|
|
308
|
+
summary: 'Update a lead',
|
|
309
|
+
metadata: { tags: ['Leads'], openApi: { operationId: 'updateLead' } },
|
|
310
310
|
},
|
|
311
311
|
remove: {
|
|
312
|
-
method:
|
|
313
|
-
path:
|
|
312
|
+
method: 'DELETE',
|
|
313
|
+
path: '/v2/leads/:id',
|
|
314
314
|
responses: {
|
|
315
315
|
204: zod_1.z.undefined(),
|
|
316
316
|
404: error_schemas_1.ErrorResponseSchema,
|
|
317
317
|
},
|
|
318
318
|
pathParams: zod_1.z.object({
|
|
319
|
-
id: zod_1.z.string().uuid().describe(
|
|
319
|
+
id: zod_1.z.string().uuid().describe('Lead ID'),
|
|
320
320
|
}),
|
|
321
321
|
body: c.noBody(),
|
|
322
|
-
summary:
|
|
323
|
-
metadata: { tags: [
|
|
322
|
+
summary: 'Delete a lead',
|
|
323
|
+
metadata: { tags: ['Leads'], openApi: { operationId: 'deleteLead' } },
|
|
324
324
|
},
|
|
325
325
|
recordCall: {
|
|
326
|
-
method:
|
|
327
|
-
path:
|
|
326
|
+
method: 'POST',
|
|
327
|
+
path: '/v2/leads/:id/call',
|
|
328
328
|
responses: {
|
|
329
329
|
201: exports.LeadCallHistoryResponseSchema,
|
|
330
330
|
},
|
|
331
331
|
pathParams: zod_1.z.object({
|
|
332
|
-
id: zod_1.z.string().uuid().describe(
|
|
332
|
+
id: zod_1.z.string().uuid().describe('Lead ID'),
|
|
333
333
|
}),
|
|
334
334
|
body: call_history_contract_1.CreateCallHistorySchema,
|
|
335
|
-
summary:
|
|
335
|
+
summary: 'Record a call to a lead',
|
|
336
336
|
metadata: {
|
|
337
|
-
tags: [
|
|
338
|
-
openApi: { operationId:
|
|
337
|
+
tags: ['Leads'],
|
|
338
|
+
openApi: { operationId: 'recordCallToLead' },
|
|
339
339
|
},
|
|
340
340
|
},
|
|
341
341
|
getQualityDashboard: {
|
|
342
|
-
method:
|
|
343
|
-
path:
|
|
342
|
+
method: 'GET',
|
|
343
|
+
path: '/v2/leads/analytics/quality-dashboard',
|
|
344
344
|
responses: {
|
|
345
345
|
200: exports.LeadStatisticsSchema,
|
|
346
346
|
},
|
|
347
347
|
query: zod_1.z.object({}),
|
|
348
|
-
summary:
|
|
348
|
+
summary: 'Get lead quality analytics dashboard',
|
|
349
349
|
metadata: {
|
|
350
|
-
tags: [
|
|
351
|
-
openApi: { operationId:
|
|
350
|
+
tags: ['Leads'],
|
|
351
|
+
openApi: { operationId: 'getQualityDashboard' },
|
|
352
352
|
},
|
|
353
353
|
},
|
|
354
354
|
}, {
|
|
@@ -58,11 +58,11 @@ export declare const FilterLocationSchema: z.ZodObject<{
|
|
|
58
58
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
59
59
|
page: z.ZodDefault<z.ZodNumber>;
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
limit: number;
|
|
62
61
|
page: number;
|
|
62
|
+
limit: number;
|
|
63
63
|
}, {
|
|
64
|
-
limit?: number | undefined;
|
|
65
64
|
page?: number | undefined;
|
|
65
|
+
limit?: number | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
export type Location = z.infer<typeof LocationSchema>;
|
|
68
68
|
export type UpdateLocation = z.infer<typeof UpdateLocationSchema>;
|
|
@@ -235,19 +235,19 @@ export declare const locationsContract: {
|
|
|
235
235
|
};
|
|
236
236
|
};
|
|
237
237
|
findAll: {
|
|
238
|
-
metadata: {
|
|
239
|
-
tags: string[];
|
|
240
|
-
};
|
|
241
238
|
query: z.ZodObject<{
|
|
242
239
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
243
240
|
page: z.ZodDefault<z.ZodNumber>;
|
|
244
241
|
}, "strip", z.ZodTypeAny, {
|
|
245
|
-
limit: number;
|
|
246
242
|
page: number;
|
|
243
|
+
limit: number;
|
|
247
244
|
}, {
|
|
248
|
-
limit?: number | undefined;
|
|
249
245
|
page?: number | undefined;
|
|
246
|
+
limit?: number | undefined;
|
|
250
247
|
}>;
|
|
248
|
+
metadata: {
|
|
249
|
+
tags: string[];
|
|
250
|
+
};
|
|
251
251
|
summary: "Get all locations";
|
|
252
252
|
method: "GET";
|
|
253
253
|
path: "/v2/locations";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare const LogLevelSchema: z.ZodEnum<["error", "warn", "info", "debug"]>;
|
|
3
3
|
export declare const LogEntrySchema: z.ZodObject<{
|
|
4
4
|
timestamp: z.ZodString;
|
|
@@ -264,12 +264,6 @@ export declare const monitoringContract: {
|
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
266
|
getLogs: {
|
|
267
|
-
metadata: {
|
|
268
|
-
tags: string[];
|
|
269
|
-
openApi: {
|
|
270
|
-
operationId: string;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
267
|
query: z.ZodObject<{
|
|
274
268
|
level: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
|
|
275
269
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -292,6 +286,12 @@ export declare const monitoringContract: {
|
|
|
292
286
|
endTime?: string | undefined;
|
|
293
287
|
cursor?: string | undefined;
|
|
294
288
|
}>;
|
|
289
|
+
metadata: {
|
|
290
|
+
tags: string[];
|
|
291
|
+
openApi: {
|
|
292
|
+
operationId: string;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
295
|
summary: "Get monitoring logs";
|
|
296
296
|
method: "GET";
|
|
297
297
|
path: "/v2/monitoring/logs";
|
|
@@ -447,12 +447,6 @@ export declare const monitoringContract: {
|
|
|
447
447
|
};
|
|
448
448
|
};
|
|
449
449
|
getLogsTail: {
|
|
450
|
-
metadata: {
|
|
451
|
-
tags: string[];
|
|
452
|
-
openApi: {
|
|
453
|
-
operationId: string;
|
|
454
|
-
};
|
|
455
|
-
};
|
|
456
450
|
query: z.ZodObject<{
|
|
457
451
|
since: z.ZodString;
|
|
458
452
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -460,6 +454,12 @@ export declare const monitoringContract: {
|
|
|
460
454
|
}, {
|
|
461
455
|
since: string;
|
|
462
456
|
}>;
|
|
457
|
+
metadata: {
|
|
458
|
+
tags: string[];
|
|
459
|
+
openApi: {
|
|
460
|
+
operationId: string;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
463
|
summary: "Tail monitoring logs";
|
|
464
464
|
method: "GET";
|
|
465
465
|
path: "/v2/monitoring/logs/tail";
|