@dakkitor/api-contracts 1.1.82 → 1.1.84

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.
@@ -115,7 +115,7 @@ exports.TradeFilterSchema = zod_1.z
115
115
  exports.WorkerUserSchema = zod_1.z.object({
116
116
  id: zod_1.z.string().uuid(),
117
117
  firstName: zod_1.z.string(),
118
- lastName: zod_1.z.string(),
118
+ lastName: zod_1.z.string().optional().nullable(),
119
119
  email: zod_1.z.string().email(),
120
120
  });
121
121
  // --- Main Schemas ---
@@ -123,7 +123,7 @@ exports.WorkerSchema = zod_1.z
123
123
  .object({
124
124
  id: zod_1.z.string().uuid().describe('Worker ID'),
125
125
  firstName: zod_1.z.string().describe('First Name'),
126
- lastName: zod_1.z.string().describe('Last Name'),
126
+ lastName: zod_1.z.string().optional().nullable().describe('Last Name'),
127
127
  email: zod_1.z.string().email().nullable().optional().describe('Email'),
128
128
  phoneNumbers: zod_1.z
129
129
  .array(exports.WorkerPhoneNumberSchema)
@@ -179,7 +179,13 @@ exports.WorkerSchema = zod_1.z
179
179
  exports.CreateWorkerSchema = zod_1.z
180
180
  .object({
181
181
  firstName: zod_1.z.string().min(3).max(100).describe('First Name'),
182
- lastName: zod_1.z.string().min(3).max(100).describe('Last Name'),
182
+ lastName: zod_1.z
183
+ .string()
184
+ .min(3)
185
+ .max(100)
186
+ .optional()
187
+ .nullable()
188
+ .describe('Last Name'),
183
189
  email: zod_1.z
184
190
  .string()
185
191
  .email()
@@ -237,7 +243,13 @@ exports.CreateWorkerSchema = zod_1.z
237
243
  exports.UpdateWorkerSchema = zod_1.z
238
244
  .object({
239
245
  firstName: zod_1.z.string().min(3).max(100).optional().describe('First Name'),
240
- lastName: zod_1.z.string().min(3).max(100).optional().describe('Last Name'),
246
+ lastName: zod_1.z
247
+ .string()
248
+ .min(3)
249
+ .max(100)
250
+ .optional()
251
+ .nullable()
252
+ .describe('Last Name'),
241
253
  email: zod_1.z
242
254
  .string()
243
255
  .email()
@@ -305,8 +317,7 @@ exports.FilterWorkerSchema = pagination_query_schema_1.PaginationQuerySchema.ext
305
317
  nationality: common_schemas_1.NationalitySchema.optional()
306
318
  .nullable()
307
319
  .describe('Filter by nationality'),
308
- postcode: zod_1.z.string().optional().describe('Postcode'),
309
- distance: zod_1.z.coerce.number().min(0).optional().describe('Search radius in km'),
320
+ location: common_schemas_1.LocationFilterSchema.optional().describe('Filter by location'),
310
321
  hasTools: exports.BooleanFilterSchema.optional().describe('Has Tools (default All)'),
311
322
  hasPpe: exports.BooleanFilterSchema.optional().describe('Has PPE (default All)'),
312
323
  tradeFilters: zod_1.z.array(exports.TradeFilterSchema).optional().describe('Trades'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dakkitor/api-contracts",
3
- "version": "1.1.82",
3
+ "version": "1.1.84",
4
4
  "description": "TypeScript API contracts using ts-rest and Zod",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",