@kl1/contracts 1.0.14 → 1.0.15

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/index.js CHANGED
@@ -1225,6 +1225,20 @@ var ContactContractValidationSchema = {
1225
1225
  total: import_zod25.default.number(),
1226
1226
  data: import_zod25.default.array(ContactSchema)
1227
1227
  }
1228
+ },
1229
+ createContactByPhone: {
1230
+ request: import_zod25.default.object({
1231
+ phoneNumber: import_zod25.default.string().refine(
1232
+ (value) => {
1233
+ const numericValue = value.replace(/\s/g, "");
1234
+ return /^\d+$/.test(numericValue);
1235
+ },
1236
+ {
1237
+ message: "Phone number must contain only numeric characters"
1238
+ }
1239
+ )
1240
+ }),
1241
+ response: ContactSchema
1228
1242
  }
1229
1243
  };
1230
1244
 
@@ -1347,6 +1361,29 @@ var contactContract = (0, import_core7.initContract)().router(
1347
1361
  },
1348
1362
  body: null,
1349
1363
  summary: "Delete a contact"
1364
+ },
1365
+ createContactByPhone: {
1366
+ method: "POST",
1367
+ path: "/phone",
1368
+ responses: {
1369
+ 201: DefaultSuccessResponseSchema.extend({
1370
+ data: ContactContractValidationSchema.createContactByPhone.response
1371
+ }),
1372
+ 400: import_zod26.default.object({
1373
+ message: import_zod26.default.string()
1374
+ }),
1375
+ 409: import_zod26.default.object({
1376
+ message: import_zod26.default.string()
1377
+ }),
1378
+ 500: import_zod26.default.object({
1379
+ message: import_zod26.default.string()
1380
+ }),
1381
+ 401: DefaultUnauthorizedSchema,
1382
+ 404: DefaultNotFoundSchema,
1383
+ 422: DefaultUnprocessibleSchema
1384
+ },
1385
+ body: ContactContractValidationSchema.createContactByPhone.request,
1386
+ summary: "Create a new contact using phone number"
1350
1387
  }
1351
1388
  },
1352
1389
  {