@dakkitor/api-contracts 1.1.125 → 1.1.126

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