@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.
Files changed (63) hide show
  1. package/dist/abilities/abilities.contract.d.ts +19 -13
  2. package/dist/abilities/abilities.contract.js +33 -18
  3. package/dist/abilities/first-agent.abilities.json +68 -56
  4. package/dist/abilities/second-agent.abilities.json +3 -3
  5. package/dist/abilities/team-leads.json +3 -6
  6. package/dist/actives/actives.contract.d.ts +6313 -6313
  7. package/dist/actives/actives.contract.js +92 -92
  8. package/dist/agent-client-links/agent-client-links.contract.d.ts +511 -511
  9. package/dist/auth/auth.contract.d.ts +16 -16
  10. package/dist/bookings/bookings.contract.d.ts +23378 -23378
  11. package/dist/call-history/call-history.contract.d.ts +366 -366
  12. package/dist/call-history/call-history.contract.js +67 -67
  13. package/dist/client-contacts/client-contacts.contract.d.ts +159 -159
  14. package/dist/clients/clients.contract.d.ts +72 -72
  15. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +1330 -1330
  16. package/dist/collaborations/collaborations.contract.d.ts +1198 -1198
  17. package/dist/common/call-rating.schema.d.ts +12 -12
  18. package/dist/common/call-rating.schema.js +48 -40
  19. package/dist/common/common-schemas.d.ts +4 -4
  20. package/dist/common/common-schemas.d.ts.map +1 -1
  21. package/dist/common/common-schemas.js +1 -2
  22. package/dist/common/error-schemas.d.ts +11 -5
  23. package/dist/common/error-schemas.js +11 -8
  24. package/dist/common/openapi-metadata.d.ts +54 -44
  25. package/dist/common/openapi-metadata.js +135 -129
  26. package/dist/common/pagination-query.schema.d.ts +11 -5
  27. package/dist/common/pagination-query.schema.js +11 -8
  28. package/dist/companies/companies.contract.d.ts +40 -40
  29. package/dist/cron-executions/cron-executions.contract.d.ts +14 -14
  30. package/dist/curated-workers/curated-workers.contract.d.ts +211 -211
  31. package/dist/dashboards/agent-daily-metrics.contract.d.ts +798 -616
  32. package/dist/dashboards/agent-daily-metrics.contract.js +100 -89
  33. package/dist/dashboards/dashboard-widgets.contract.d.ts +75 -75
  34. package/dist/dashboards/dashboard-widgets.contract.js +89 -89
  35. package/dist/dashboards/dashboard.contract.d.ts +305 -215
  36. package/dist/files/files.contract.d.ts +1544 -1177
  37. package/dist/files/files.contract.js +177 -162
  38. package/dist/health/health.contract.d.ts +191 -144
  39. package/dist/health/health.contract.js +53 -40
  40. package/dist/index.d.ts +67 -67
  41. package/dist/jobs/jobs.contract.d.ts +2553 -2553
  42. package/dist/jobs/jobs.contract.js +150 -150
  43. package/dist/lead-assignments/lead-assignments.contract.d.ts +587 -587
  44. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +239 -239
  45. package/dist/lead-distribution/lead-distribution-config.contract.d.ts +25 -25
  46. package/dist/leads/leads.contract.d.ts +108 -108
  47. package/dist/leads/leads.contract.js +119 -119
  48. package/dist/locations/locations.contract.d.ts +7 -7
  49. package/dist/monitoring/monitoring.contract.d.ts +13 -13
  50. package/dist/monitoring/monitoring.contract.js +37 -37
  51. package/dist/own-research/own-research.contract.d.ts +535 -134
  52. package/dist/own-research/own-research.contract.d.ts.map +1 -1
  53. package/dist/own-research/own-research.contract.js +88 -56
  54. package/dist/postcodes/postcodes.contract.d.ts +24 -24
  55. package/dist/qualifications/qualifications.contract.d.ts +1898 -1387
  56. package/dist/qualifications/qualifications.contract.js +193 -171
  57. package/dist/trades/trades.contract.d.ts +991 -763
  58. package/dist/trades/trades.contract.js +111 -89
  59. package/dist/users/users.contract.d.ts +202 -202
  60. package/dist/users/users.contract.js +121 -121
  61. package/dist/workers/workers.contract.d.ts +710 -710
  62. package/dist/workers/workers.contract.js +150 -150
  63. package/package.json +1 -1
@@ -15,232 +15,232 @@ const curated_workers_contract_1 = require("../curated-workers/curated-workers.c
15
15
  * Job Status Enum
16
16
  */
17
17
  exports.JobStatusSchema = zod_1.z.enum([
18
- "CANCELED",
19
- "FILLED",
20
- "AVAILABLE",
21
- "NOT_AVAILABLE",
22
- "DRAFT",
18
+ 'CANCELED',
19
+ 'FILLED',
20
+ 'AVAILABLE',
21
+ 'NOT_AVAILABLE',
22
+ 'DRAFT',
23
23
  ]);
24
24
  /**
25
25
  * Job Sortable Fields Enum
26
26
  */
27
27
  exports.JobSortableFieldsSchema = zod_1.z
28
28
  .enum([
29
- "description",
30
- "numberOfPositions",
31
- "status",
32
- "createdAt",
33
- "updatedAt",
29
+ 'description',
30
+ 'numberOfPositions',
31
+ 'status',
32
+ 'createdAt',
33
+ 'updatedAt',
34
34
  ])
35
- .openapi({ title: "JobSortableFields" });
35
+ .openapi({ title: 'JobSortableFields' });
36
36
  /**
37
37
  * Pay Schema - Nested object for job payment details
38
38
  */
39
39
  exports.PaySchema = zod_1.z
40
40
  .object({
41
- rateUnit: common_schemas_1.RateUnitSchema.describe("The unit for the pay rate"),
41
+ rateUnit: common_schemas_1.RateUnitSchema.describe('The unit for the pay rate'),
42
42
  isNegotiable: zod_1.z
43
43
  .boolean()
44
44
  .default(false)
45
- .describe("Whether the rate is negotiable"),
45
+ .describe('Whether the rate is negotiable'),
46
46
  rate: zod_1.z.coerce
47
47
  .number()
48
48
  .min(1)
49
49
  .nullable()
50
50
  .optional()
51
- .describe("The pay rate"),
51
+ .describe('The pay rate'),
52
52
  rateMax: zod_1.z.coerce
53
53
  .number()
54
54
  .min(1)
55
55
  .nullable()
56
56
  .optional()
57
- .describe("The maximum pay rate (for a range)"),
57
+ .describe('The maximum pay rate (for a range)'),
58
58
  receivedRate: zod_1.z.coerce
59
59
  .number()
60
60
  .min(1)
61
61
  .nullable()
62
62
  .optional()
63
- .describe("The received pay rate"),
63
+ .describe('The received pay rate'),
64
64
  })
65
- .openapi({ title: "Pay" });
65
+ .openapi({ title: 'Pay' });
66
66
  exports.CreatePaySchema = zod_1.z
67
67
  .object({
68
- rateUnit: common_schemas_1.RateUnitSchema.default("HOURLY").describe("The unit for the pay rate"),
68
+ rateUnit: common_schemas_1.RateUnitSchema.default('HOURLY').describe('The unit for the pay rate'),
69
69
  isNegotiable: zod_1.z
70
70
  .boolean()
71
71
  .default(false)
72
- .describe("Whether the rate is negotiable"),
73
- rate: zod_1.z.number().min(1).nullable().optional().describe("The pay rate"),
72
+ .describe('Whether the rate is negotiable'),
73
+ rate: zod_1.z.number().min(1).nullable().optional().describe('The pay rate'),
74
74
  rateMax: zod_1.z
75
75
  .number()
76
76
  .min(1)
77
77
  .optional()
78
78
  .nullable()
79
- .describe("The maximum pay rate (for a range)"),
79
+ .describe('The maximum pay rate (for a range)'),
80
80
  receivedRate: zod_1.z
81
81
  .number()
82
82
  .min(1)
83
83
  .nullable()
84
84
  .optional()
85
- .describe("The received pay rate"),
85
+ .describe('The received pay rate'),
86
86
  })
87
87
  .superRefine((data, ctx) => {
88
88
  if (!data.isNegotiable) {
89
89
  if (!data.rate) {
90
90
  ctx.addIssue({
91
91
  code: zod_1.z.ZodIssueCode.custom,
92
- message: "Rate is required when not negotiable",
93
- path: ["rate"],
92
+ message: 'Rate is required when not negotiable',
93
+ path: ['rate'],
94
94
  });
95
95
  }
96
96
  if (!data.receivedRate) {
97
97
  ctx.addIssue({
98
98
  code: zod_1.z.ZodIssueCode.custom,
99
- message: "Received rate is required when not negotiable",
100
- path: ["receivedRate"],
99
+ message: 'Received rate is required when not negotiable',
100
+ path: ['receivedRate'],
101
101
  });
102
102
  }
103
103
  }
104
104
  if (data.rate && data.rateMax && data.rateMax < data.rate) {
105
105
  ctx.addIssue({
106
106
  code: zod_1.z.ZodIssueCode.custom,
107
- message: "Maximum rate must be greater than or equal to the rate",
108
- path: ["rateMax"],
107
+ message: 'Maximum rate must be greater than or equal to the rate',
108
+ path: ['rateMax'],
109
109
  });
110
110
  }
111
111
  })
112
- .openapi({ title: "CreatePay" });
112
+ .openapi({ title: 'CreatePay' });
113
113
  /**
114
114
  * Job Qualification Schemas
115
115
  */
116
116
  exports.JobQualificationSchema = zod_1.z
117
117
  .object({
118
- id: zod_1.z.string().uuid().describe("The ID of the job qualification"),
119
- qualificationId: zod_1.z.string().uuid().describe("The ID of the qualification"),
118
+ id: zod_1.z.string().uuid().describe('The ID of the job qualification'),
119
+ qualificationId: zod_1.z.string().uuid().describe('The ID of the qualification'),
120
120
  qualificationTypeId: zod_1.z
121
121
  .string()
122
122
  .uuid()
123
123
  .optional()
124
124
  .nullable()
125
- .describe("The ID of the qualification type"),
125
+ .describe('The ID of the qualification type'),
126
126
  })
127
- .openapi({ title: "JobQualification" });
127
+ .openapi({ title: 'JobQualification' });
128
128
  exports.CreateJobQualificationSchema = zod_1.z
129
129
  .object({
130
- qualificationId: zod_1.z.string().uuid().describe("The ID of the qualification"),
130
+ qualificationId: zod_1.z.string().uuid().describe('The ID of the qualification'),
131
131
  qualificationTypeId: zod_1.z
132
132
  .union([zod_1.z.string().uuid(), zod_1.z.null()])
133
133
  .optional()
134
- .describe("The ID of the qualification type"),
134
+ .describe('The ID of the qualification type'),
135
135
  })
136
- .openapi({ title: "CreateJobQualification" });
136
+ .openapi({ title: 'CreateJobQualification' });
137
137
  /**
138
138
  * Main Job Schema
139
139
  */
140
140
  exports.JobSchema = zod_1.z
141
141
  .object({
142
- id: zod_1.z.string().uuid().describe("Job ID"),
143
- description: zod_1.z.string().describe("Job Description"),
142
+ id: zod_1.z.string().uuid().describe('Job ID'),
143
+ description: zod_1.z.string().describe('Job Description'),
144
144
  numberOfPositions: zod_1.z
145
145
  .number()
146
146
  .int()
147
147
  .min(1)
148
- .describe("Number of Positions Available"),
148
+ .describe('Number of Positions Available'),
149
149
  workHours: zod_1.z.coerce
150
150
  .number()
151
151
  .min(0.01)
152
152
  .max(60)
153
153
  .optional()
154
154
  .nullable()
155
- .describe("Number of Work Hours"),
156
- status: exports.JobStatusSchema.describe("Job Status"),
157
- pay: exports.PaySchema.describe("Payment Details"),
155
+ .describe('Number of Work Hours'),
156
+ status: exports.JobStatusSchema.describe('Job Status'),
157
+ pay: exports.PaySchema.describe('Payment Details'),
158
158
  location: common_schemas_1.LocationDetailsSchema.optional()
159
159
  .nullable()
160
- .describe("Job Location"),
160
+ .describe('Job Location'),
161
161
  tradeId: zod_1.z
162
162
  .string()
163
- .min(1, { message: "Trade is required" })
163
+ .min(1, { message: 'Trade is required' })
164
164
  .pipe(zod_1.z.string().uuid())
165
- .describe("Trade ID"),
165
+ .describe('Trade ID'),
166
166
  jobQualifications: zod_1.z
167
167
  .array(exports.JobQualificationSchema)
168
168
  .optional()
169
169
  .default([])
170
- .describe("Job Qualifications"),
170
+ .describe('Job Qualifications'),
171
171
  currentCollaboration: collaborations_contract_1.CollaborationSchema.nullable()
172
172
  .optional()
173
- .describe("Current Collaboration"),
173
+ .describe('Current Collaboration'),
174
174
  createdAt: zod_1.z
175
175
  .union([zod_1.z.string().datetime(), zod_1.z.date()])
176
176
  .transform((val) => (val instanceof Date ? val.toISOString() : val))
177
- .describe("Creation Date"),
177
+ .describe('Creation Date'),
178
178
  updatedAt: zod_1.z
179
179
  .union([zod_1.z.string().datetime(), zod_1.z.date()])
180
180
  .transform((val) => (val instanceof Date ? val.toISOString() : val))
181
- .describe("Last Update Date"),
181
+ .describe('Last Update Date'),
182
182
  createdById: zod_1.z
183
183
  .string()
184
184
  .uuid()
185
185
  .nullable()
186
186
  .optional()
187
- .describe("User ID who created the job"),
187
+ .describe('User ID who created the job'),
188
188
  })
189
- .openapi({ title: "Job" });
189
+ .openapi({ title: 'Job' });
190
190
  /**
191
191
  * Create Job Schema
192
192
  */
193
193
  exports.CreateJobSchema = zod_1.z
194
194
  .object({
195
- description: zod_1.z.string().min(10).describe("Job Description"),
195
+ description: zod_1.z.string().min(10).describe('Job Description'),
196
196
  location: common_schemas_1.CreateLocationSchema.optional()
197
197
  .nullable()
198
- .describe("Job Location"),
198
+ .describe('Job Location'),
199
199
  numberOfPositions: zod_1.z
200
200
  .number()
201
201
  .int()
202
202
  .min(1)
203
203
  .max(100)
204
- .describe("Number of Positions"),
204
+ .describe('Number of Positions'),
205
205
  workHours: zod_1.z
206
206
  .number()
207
207
  .min(0.01)
208
208
  .max(60)
209
209
  .default(8)
210
- .describe("Number of Work Hours"),
211
- pay: exports.CreatePaySchema.describe("Payment Details"),
210
+ .describe('Number of Work Hours'),
211
+ pay: exports.CreatePaySchema.describe('Payment Details'),
212
212
  tradeId: zod_1.z
213
213
  .string()
214
- .min(1, { message: "Trade is required" })
214
+ .min(1, { message: 'Trade is required' })
215
215
  .pipe(zod_1.z.string().uuid())
216
- .describe("Trade"),
216
+ .describe('Trade'),
217
217
  currentCollaboration: zod_1.z
218
218
  .object({
219
219
  id: zod_1.z
220
220
  .string()
221
- .min(1, { message: "Collaboration is required" })
221
+ .min(1, { message: 'Collaboration is required' })
222
222
  .pipe(zod_1.z.string().uuid())
223
- .describe("Search Collaboration by Client"),
223
+ .describe('Search Collaboration by Client'),
224
224
  })
225
225
  .optional()
226
226
  .nullable()
227
- .describe("Current Collaboration"),
227
+ .describe('Current Collaboration'),
228
228
  jobQualifications: zod_1.z
229
229
  .array(exports.CreateJobQualificationSchema)
230
230
  .optional()
231
- .describe("Job Qualifications"),
232
- status: exports.JobStatusSchema.optional().describe("Job Status"),
231
+ .describe('Job Qualifications'),
232
+ status: exports.JobStatusSchema.optional().describe('Job Status'),
233
233
  })
234
234
  .superRefine((data, ctx) => {
235
235
  // If no collaboration is provided, status must be DRAFT (or will default to DRAFT)
236
236
  const hasCollaboration = data.currentCollaboration && data.currentCollaboration.id;
237
237
  if (!hasCollaboration) {
238
238
  // If status is explicitly set to non-DRAFT, fail validation
239
- if (data.status !== undefined && data.status !== "DRAFT") {
239
+ if (data.status !== undefined && data.status !== 'DRAFT') {
240
240
  ctx.addIssue({
241
241
  code: zod_1.z.ZodIssueCode.custom,
242
- message: "A collaboration is required when creating a job with non-draft status.",
243
- path: ["currentCollaboration"],
242
+ message: 'A collaboration is required when creating a job with non-draft status.',
243
+ path: ['currentCollaboration'],
244
244
  });
245
245
  }
246
246
  }
@@ -250,100 +250,100 @@ exports.CreateJobSchema = zod_1.z
250
250
  const hasCollaboration = data.currentCollaboration && data.currentCollaboration.id;
251
251
  return {
252
252
  ...data,
253
- status: hasCollaboration ? (data.status ?? "AVAILABLE") : "DRAFT",
253
+ status: hasCollaboration ? (data.status ?? 'AVAILABLE') : 'DRAFT',
254
254
  };
255
255
  })
256
- .openapi({ title: "CreateJob" });
256
+ .openapi({ title: 'CreateJob' });
257
257
  /**
258
258
  * Create Draft Job Schema - For bot-created jobs without collaboration
259
259
  */
260
260
  exports.CreateDraftJobSchema = zod_1.z
261
261
  .object({
262
- description: zod_1.z.string().min(10).describe("Job Description"),
262
+ description: zod_1.z.string().min(10).describe('Job Description'),
263
263
  location: common_schemas_1.CreateLocationSchema.optional()
264
264
  .nullable()
265
- .describe("Job Location"),
265
+ .describe('Job Location'),
266
266
  numberOfPositions: zod_1.z
267
267
  .number()
268
268
  .int()
269
269
  .min(1)
270
270
  .max(100)
271
- .describe("Number of Positions"),
271
+ .describe('Number of Positions'),
272
272
  workHours: zod_1.z
273
273
  .number()
274
274
  .min(0.01)
275
275
  .max(60)
276
276
  .default(8)
277
- .describe("Number of Work Hours"),
278
- pay: exports.CreatePaySchema.describe("Payment Details"),
277
+ .describe('Number of Work Hours'),
278
+ pay: exports.CreatePaySchema.describe('Payment Details'),
279
279
  tradeId: zod_1.z
280
280
  .string()
281
- .min(1, { message: "Trade is required" })
281
+ .min(1, { message: 'Trade is required' })
282
282
  .pipe(zod_1.z.string().uuid())
283
- .describe("Trade"),
283
+ .describe('Trade'),
284
284
  jobQualifications: zod_1.z
285
285
  .array(exports.CreateJobQualificationSchema)
286
286
  .optional()
287
- .describe("Job Qualifications"),
287
+ .describe('Job Qualifications'),
288
288
  })
289
- .openapi({ title: "CreateDraftJob" });
289
+ .openapi({ title: 'CreateDraftJob' });
290
290
  /**
291
291
  * Update Job Schema
292
292
  */
293
293
  exports.UpdateJobSchema = zod_1.z
294
294
  .object({
295
- description: zod_1.z.string().min(10).optional().describe("Job Description"),
295
+ description: zod_1.z.string().min(10).optional().describe('Job Description'),
296
296
  location: common_schemas_1.CreateLocationSchema.optional()
297
297
  .nullable()
298
- .describe("Job Location"),
298
+ .describe('Job Location'),
299
299
  numberOfPositions: zod_1.z
300
300
  .number()
301
301
  .int()
302
302
  .min(1)
303
303
  .max(100)
304
304
  .optional()
305
- .describe("Number of Positions"),
305
+ .describe('Number of Positions'),
306
306
  workHours: zod_1.z
307
307
  .number()
308
308
  .min(0.01)
309
309
  .max(60)
310
310
  .optional()
311
- .describe("Number of Work Hours"),
312
- pay: exports.CreatePaySchema.optional().describe("Payment Details"),
311
+ .describe('Number of Work Hours'),
312
+ pay: exports.CreatePaySchema.optional().describe('Payment Details'),
313
313
  tradeId: zod_1.z
314
314
  .string()
315
- .min(1, { message: "Trade is required" })
315
+ .min(1, { message: 'Trade is required' })
316
316
  .pipe(zod_1.z.string().uuid())
317
317
  .optional()
318
- .describe("Trade"),
318
+ .describe('Trade'),
319
319
  currentCollaboration: zod_1.z
320
- .preprocess((val) => (val === "" ? null : val), zod_1.z
320
+ .preprocess((val) => (val === '' ? null : val), zod_1.z
321
321
  .object({
322
322
  id: zod_1.z
323
- .preprocess((val) => (val === "" ? undefined : val), zod_1.z
323
+ .preprocess((val) => (val === '' ? undefined : val), zod_1.z
324
324
  .string()
325
- .min(1, { message: "Collaboration is required" })
325
+ .min(1, { message: 'Collaboration is required' })
326
326
  .pipe(zod_1.z.string().uuid())
327
327
  .optional())
328
- .describe("Search Collaboration by Client"),
328
+ .describe('Search Collaboration by Client'),
329
329
  })
330
330
  .optional()
331
331
  .nullable())
332
332
  .transform((val) => {
333
333
  // If val is an object (and not null) but has no keys or id is missing/undefined, return null
334
334
  if (val &&
335
- typeof val === "object" &&
335
+ typeof val === 'object' &&
336
336
  (Object.keys(val).length === 0 || !val.id)) {
337
337
  return null;
338
338
  }
339
339
  return val;
340
340
  })
341
- .describe("Current Collaboration"),
341
+ .describe('Current Collaboration'),
342
342
  jobQualifications: zod_1.z
343
343
  .array(exports.CreateJobQualificationSchema)
344
344
  .optional()
345
- .describe("Job Qualifications"),
346
- status: exports.JobStatusSchema.optional().describe("Job Status"),
345
+ .describe('Job Qualifications'),
346
+ status: exports.JobStatusSchema.optional().describe('Job Status'),
347
347
  })
348
348
  .superRefine((data, ctx) => {
349
349
  // If status is being set to something other than DRAFT,
@@ -356,58 +356,58 @@ exports.UpdateJobSchema = zod_1.z
356
356
  (data.currentCollaboration !== undefined &&
357
357
  !data.currentCollaboration.id);
358
358
  if (data.status !== undefined &&
359
- data.status !== "DRAFT" &&
359
+ data.status !== 'DRAFT' &&
360
360
  hasNoCollaboration) {
361
361
  ctx.addIssue({
362
362
  code: zod_1.z.ZodIssueCode.custom,
363
- message: "A collaboration is required when setting status to a non-draft value.",
364
- path: ["currentCollaboration"],
363
+ message: 'A collaboration is required when setting status to a non-draft value.',
364
+ path: ['currentCollaboration'],
365
365
  });
366
366
  }
367
367
  })
368
- .openapi({ title: "UpdateJob" });
368
+ .openapi({ title: 'UpdateJob' });
369
369
  /**
370
370
  * Filter Job Schema
371
371
  */
372
372
  exports.FilterJobSchema = pagination_query_schema_1.PaginationQuerySchema.extend({
373
- tradeId: zod_1.z.string().uuid().optional().nullable().describe("Filter by trade"),
373
+ tradeId: zod_1.z.string().uuid().optional().nullable().describe('Filter by trade'),
374
374
  createdAt: common_schemas_1.DateRangeSchema.optional()
375
375
  .nullable()
376
- .describe("Filter by created date range"),
376
+ .describe('Filter by created date range'),
377
377
  updatedAt: common_schemas_1.DateRangeSchema.optional()
378
378
  .nullable()
379
- .describe("Filter by updated date range"),
379
+ .describe('Filter by updated date range'),
380
380
  qualificationFilters: zod_1.z
381
381
  .array(curated_workers_contract_1.QualificationFilterSchema)
382
382
  .optional()
383
- .describe("Filter by qualifications"),
383
+ .describe('Filter by qualifications'),
384
384
  status: exports.JobStatusSchema.optional()
385
385
  .nullable()
386
- .describe("Filter by job status"),
386
+ .describe('Filter by job status'),
387
387
  userId: zod_1.z
388
388
  .string()
389
389
  .uuid()
390
390
  .optional()
391
391
  .nullable()
392
- .describe("Search First Agent"),
393
- clientId: zod_1.z.string().uuid().optional().nullable().describe("Search Client"),
394
- companyId: zod_1.z.string().uuid().optional().nullable().describe("Search Company"),
392
+ .describe('Search First Agent'),
393
+ clientId: zod_1.z.string().uuid().optional().nullable().describe('Search Client'),
394
+ companyId: zod_1.z.string().uuid().optional().nullable().describe('Search Company'),
395
395
  location: common_schemas_1.LocationFilterSchema.optional()
396
396
  .nullable()
397
- .describe("Filter by location"),
397
+ .describe('Filter by location'),
398
398
  pay: common_schemas_1.PayRangeSchema.optional()
399
399
  .nullable()
400
- .describe("Filter by pay rate range"),
400
+ .describe('Filter by pay rate range'),
401
401
  sortBy: exports.JobSortableFieldsSchema.optional()
402
402
  .nullable()
403
- .describe("The field to sort the results by"),
403
+ .describe('The field to sort the results by'),
404
404
  sortOrder: common_schemas_1.SortOrderSchema.optional()
405
405
  .nullable()
406
- .describe("The order to sort the results by"),
406
+ .describe('The order to sort the results by'),
407
407
  });
408
408
  exports.PaginatedJobResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.JobSchema)
409
- .describe("Jobs retrieved successfully")
410
- .openapi({ title: "JobsPaginatedResponse" });
409
+ .describe('Jobs retrieved successfully')
410
+ .openapi({ title: 'JobsPaginatedResponse' });
411
411
  /**
412
412
  * Search Job Schema - For trigram-based duplicate detection
413
413
  */
@@ -416,115 +416,115 @@ exports.SearchJobQuerySchema = zod_1.z
416
416
  description: zod_1.z
417
417
  .string()
418
418
  .min(10)
419
- .describe("Job description to search for similar jobs"),
419
+ .describe('Job description to search for similar jobs'),
420
420
  userId: zod_1.z
421
421
  .string()
422
422
  .uuid()
423
423
  .optional()
424
- .describe("Filter by user who created the job"),
424
+ .describe('Filter by user who created the job'),
425
425
  threshold: zod_1.z.coerce
426
426
  .number()
427
427
  .min(0.1)
428
428
  .max(1)
429
429
  .default(0.3)
430
- .describe("Similarity threshold (0.1-1.0, higher = stricter)"),
431
- limit: zod_1.z.coerce.number().min(1).max(10).default(5).describe("Max results"),
430
+ .describe('Similarity threshold (0.1-1.0, higher = stricter)'),
431
+ limit: zod_1.z.coerce.number().min(1).max(10).default(5).describe('Max results'),
432
432
  })
433
- .openapi({ title: "SearchJobQuery" });
433
+ .openapi({ title: 'SearchJobQuery' });
434
434
  exports.SearchJobResultSchema = zod_1.z
435
435
  .object({
436
- similarity: zod_1.z.number().describe("Similarity score (0-1)"),
437
- job: exports.JobSchema.describe("The matching job"),
436
+ similarity: zod_1.z.number().describe('Similarity score (0-1)'),
437
+ job: exports.JobSchema.describe('The matching job'),
438
438
  })
439
- .openapi({ title: "SearchJobResult" });
439
+ .openapi({ title: 'SearchJobResult' });
440
440
  exports.SearchJobResponseSchema = zod_1.z
441
441
  .array(exports.SearchJobResultSchema)
442
- .openapi({ title: "SearchJobResponse" });
442
+ .openapi({ title: 'SearchJobResponse' });
443
443
  const c = (0, core_1.initContract)();
444
444
  exports.jobsContractRouter = c.router({
445
445
  create: {
446
- method: "POST",
447
- path: "/v2/jobs",
446
+ method: 'POST',
447
+ path: '/v2/jobs',
448
448
  responses: {
449
449
  201: exports.JobSchema,
450
450
  409: error_schemas_1.ErrorResponseSchema,
451
451
  },
452
452
  body: exports.CreateJobSchema,
453
- summary: "Create a new job",
454
- metadata: { tags: ["Jobs"], openApi: { operationId: "createJob" } },
453
+ summary: 'Create a new job',
454
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'createJob' } },
455
455
  },
456
456
  createDraft: {
457
- method: "POST",
458
- path: "/v2/jobs/draft",
457
+ method: 'POST',
458
+ path: '/v2/jobs/draft',
459
459
  responses: {
460
460
  201: exports.JobSchema,
461
461
  409: error_schemas_1.ErrorResponseSchema,
462
462
  },
463
463
  body: exports.CreateDraftJobSchema,
464
- summary: "Create a draft job (without collaboration)",
465
- metadata: { tags: ["Jobs"], openApi: { operationId: "createDraftJob" } },
464
+ summary: 'Create a draft job (without collaboration)',
465
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'createDraftJob' } },
466
466
  },
467
467
  findAll: {
468
- method: "GET",
469
- path: "/v2/jobs",
468
+ method: 'GET',
469
+ path: '/v2/jobs',
470
470
  responses: {
471
471
  200: exports.PaginatedJobResponseSchema,
472
472
  },
473
473
  query: exports.FilterJobSchema,
474
- summary: "Get all jobs",
475
- metadata: { tags: ["Jobs"], openApi: { operationId: "findAllJobs" } },
474
+ summary: 'Get all jobs',
475
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'findAllJobs' } },
476
476
  },
477
477
  search: {
478
- method: "GET",
479
- path: "/v2/jobs/search",
478
+ method: 'GET',
479
+ path: '/v2/jobs/search',
480
480
  responses: {
481
481
  200: exports.SearchJobResponseSchema,
482
482
  },
483
483
  query: exports.SearchJobQuerySchema,
484
- summary: "Search for similar jobs using trigram similarity",
485
- metadata: { tags: ["Jobs"], openApi: { operationId: "searchJobs" } },
484
+ summary: 'Search for similar jobs using trigram similarity',
485
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'searchJobs' } },
486
486
  },
487
487
  findOne: {
488
- method: "GET",
489
- path: "/v2/jobs/:id",
488
+ method: 'GET',
489
+ path: '/v2/jobs/:id',
490
490
  responses: {
491
491
  200: exports.JobSchema,
492
492
  404: error_schemas_1.ErrorResponseSchema,
493
493
  },
494
494
  pathParams: zod_1.z.object({
495
- id: zod_1.z.string().uuid().describe("Job ID"),
495
+ id: zod_1.z.string().uuid().describe('Job ID'),
496
496
  }),
497
- summary: "Get a job by ID",
498
- metadata: { tags: ["Jobs"], openApi: { operationId: "findJobById" } },
497
+ summary: 'Get a job by ID',
498
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'findJobById' } },
499
499
  },
500
500
  update: {
501
- method: "PATCH",
502
- path: "/v2/jobs/:id",
501
+ method: 'PATCH',
502
+ path: '/v2/jobs/:id',
503
503
  responses: {
504
504
  200: exports.JobSchema,
505
505
  404: error_schemas_1.ErrorResponseSchema,
506
506
  409: error_schemas_1.ErrorResponseSchema,
507
507
  },
508
508
  pathParams: zod_1.z.object({
509
- id: zod_1.z.string().uuid().describe("Job ID"),
509
+ id: zod_1.z.string().uuid().describe('Job ID'),
510
510
  }),
511
511
  body: exports.UpdateJobSchema,
512
- summary: "Update a job",
513
- metadata: { tags: ["Jobs"], openApi: { operationId: "updateJob" } },
512
+ summary: 'Update a job',
513
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'updateJob' } },
514
514
  },
515
515
  remove: {
516
- method: "DELETE",
517
- path: "/v2/jobs/:id",
516
+ method: 'DELETE',
517
+ path: '/v2/jobs/:id',
518
518
  responses: {
519
519
  204: zod_1.z.undefined(),
520
520
  404: error_schemas_1.ErrorResponseSchema,
521
521
  },
522
522
  pathParams: zod_1.z.object({
523
- id: zod_1.z.string().uuid().describe("Job ID"),
523
+ id: zod_1.z.string().uuid().describe('Job ID'),
524
524
  }),
525
525
  body: c.noBody(),
526
- summary: "Delete a job",
527
- metadata: { tags: ["Jobs"], openApi: { operationId: "deleteJob" } },
526
+ summary: 'Delete a job',
527
+ metadata: { tags: ['Jobs'], openApi: { operationId: 'deleteJob' } },
528
528
  },
529
529
  }, {
530
530
  commonResponses: {