@kl1/contracts 1.0.30 → 1.0.32

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 (54) hide show
  1. package/dist/index.js +1649 -1713
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +1647 -1711
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/app/index.d.ts +17 -0
  6. package/dist/src/app/index.d.ts.map +1 -0
  7. package/dist/src/channel/index.d.ts +20 -200
  8. package/dist/src/channel/index.d.ts.map +1 -1
  9. package/dist/src/channel/validation.d.ts +12 -6
  10. package/dist/src/channel/validation.d.ts.map +1 -1
  11. package/dist/src/chat/index.d.ts +32 -32
  12. package/dist/src/chat/index.d.ts.map +1 -1
  13. package/dist/src/chat/schema.d.ts +4 -4
  14. package/dist/src/chat/schema.d.ts.map +1 -1
  15. package/dist/src/chat/validation.d.ts +57 -168
  16. package/dist/src/chat/validation.d.ts.map +1 -1
  17. package/dist/src/company/index.d.ts +5 -8
  18. package/dist/src/company/index.d.ts.map +1 -1
  19. package/dist/src/company/schema.d.ts +0 -137
  20. package/dist/src/company/schema.d.ts.map +1 -1
  21. package/dist/src/contact/index.d.ts +1103 -1103
  22. package/dist/src/contract.d.ts +1835 -2012
  23. package/dist/src/contract.d.ts.map +1 -1
  24. package/dist/src/dashboard/index.d.ts +7 -11
  25. package/dist/src/dashboard/index.d.ts.map +1 -1
  26. package/dist/src/dashboard/schema.d.ts +2 -127
  27. package/dist/src/dashboard/schema.d.ts.map +1 -1
  28. package/dist/src/index.d.ts +1 -3
  29. package/dist/src/index.d.ts.map +1 -1
  30. package/dist/src/mail/mail-contract.d.ts +42 -42
  31. package/dist/src/mail/mail-server.d.ts +216 -0
  32. package/dist/src/mail/mail-server.d.ts.map +1 -0
  33. package/dist/src/mail/room-contract.d.ts +42 -42
  34. package/dist/src/mail/schemas/room-validation.schema.d.ts +14 -14
  35. package/dist/src/mail/schemas/room.schema.d.ts +10 -10
  36. package/dist/src/messenger/index.d.ts +703 -1185
  37. package/dist/src/messenger/index.d.ts.map +1 -1
  38. package/dist/src/messenger/validation.d.ts +1 -108
  39. package/dist/src/messenger/validation.d.ts.map +1 -1
  40. package/dist/src/platform-contact/schema.d.ts +30 -0
  41. package/dist/src/platform-contact/schema.d.ts.map +1 -0
  42. package/dist/src/telephony-cdr/index.d.ts +458 -1
  43. package/dist/src/telephony-cdr/index.d.ts.map +1 -1
  44. package/dist/src/telephony-cdr/validation.d.ts +74 -0
  45. package/dist/src/telephony-cdr/validation.d.ts.map +1 -1
  46. package/dist/src/ticket/index.d.ts +342 -207
  47. package/dist/src/ticket/index.d.ts.map +1 -1
  48. package/dist/src/ticket/validation.d.ts +338 -168
  49. package/dist/src/ticket/validation.d.ts.map +1 -1
  50. package/dist/src/widget/index.d.ts +1 -72
  51. package/dist/src/widget/index.d.ts.map +1 -1
  52. package/dist/src/widget/validation.d.ts +0 -10
  53. package/dist/src/widget/validation.d.ts.map +1 -1
  54. package/package.json +1 -1
@@ -363,80 +363,20 @@ export declare const contactContract: {
363
363
  'x-client-timezone'?: string | undefined;
364
364
  }>>>;
365
365
  };
366
- getAll: {
367
- summary: "Get all contacts";
366
+ getById: {
367
+ summary: "Get a contact by id";
368
368
  method: "GET";
369
- query: z.ZodObject<{
370
- page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
371
- pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
372
- keyword: z.ZodOptional<z.ZodOptional<z.ZodString>>;
373
- company: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
- name: z.ZodOptional<z.ZodString>;
375
- address: z.ZodOptional<z.ZodString>;
376
- channel: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
377
- selectedDate: z.ZodOptional<z.ZodString>;
378
- customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
379
- attributeId: z.ZodString;
380
- type: z.ZodString;
381
- value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
382
- }, "strip", z.ZodTypeAny, {
383
- type: string;
384
- value: (string | string[]) & (string | string[] | undefined);
385
- attributeId: string;
386
- }, {
387
- type: string;
388
- value: (string | string[]) & (string | string[] | undefined);
389
- attributeId: string;
390
- }>, "many">>;
391
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
392
- phone: z.ZodOptional<z.ZodString>;
393
- email: z.ZodOptional<z.ZodString>;
394
- notes: z.ZodOptional<z.ZodString>;
369
+ pathParams: z.ZodObject<{
370
+ id: z.ZodString;
395
371
  }, "strip", z.ZodTypeAny, {
396
- page?: number | undefined;
397
- pageSize?: number | undefined;
398
- keyword?: string | undefined;
399
- company?: string[] | undefined;
400
- name?: string | undefined;
401
- address?: string | undefined;
402
- channel?: string[] | undefined;
403
- selectedDate?: string | undefined;
404
- customFields?: {
405
- type: string;
406
- value: (string | string[]) & (string | string[] | undefined);
407
- attributeId: string;
408
- }[] | undefined;
409
- tags?: string[] | undefined;
410
- phone?: string | undefined;
411
- email?: string | undefined;
412
- notes?: string | undefined;
372
+ id: string;
413
373
  }, {
414
- page?: number | undefined;
415
- pageSize?: number | undefined;
416
- keyword?: string | undefined;
417
- company?: string[] | undefined;
418
- name?: string | undefined;
419
- address?: string | undefined;
420
- channel?: string[] | undefined;
421
- selectedDate?: string | undefined;
422
- customFields?: {
423
- type: string;
424
- value: (string | string[]) & (string | string[] | undefined);
425
- attributeId: string;
426
- }[] | undefined;
427
- tags?: string[] | undefined;
428
- phone?: string | undefined;
429
- email?: string | undefined;
430
- notes?: string | undefined;
374
+ id: string;
431
375
  }>;
432
376
  responses: {
433
377
  200: z.ZodObject<{
434
378
  requestId: z.ZodString;
435
- page: z.ZodNumber;
436
- pageSize: z.ZodNumber;
437
- total: z.ZodNumber;
438
- lastPage: z.ZodNumber;
439
- data: z.ZodArray<z.ZodObject<{
379
+ data: z.ZodObject<{
440
380
  id: z.ZodString;
441
381
  createdAt: z.ZodDate;
442
382
  updatedAt: z.ZodDate;
@@ -1175,7 +1115,7 @@ export declare const contactContract: {
1175
1115
  entity: string;
1176
1116
  };
1177
1117
  }[] | undefined;
1178
- }>, "many">;
1118
+ }>;
1179
1119
  }, "strip", z.ZodTypeAny, {
1180
1120
  data: {
1181
1121
  id: string;
@@ -1278,11 +1218,7 @@ export declare const contactContract: {
1278
1218
  entity: string;
1279
1219
  };
1280
1220
  }[] | undefined;
1281
- }[];
1282
- total: number;
1283
- page: number;
1284
- pageSize: number;
1285
- lastPage: number;
1221
+ };
1286
1222
  requestId: string;
1287
1223
  }, {
1288
1224
  data: {
@@ -1386,11 +1322,7 @@ export declare const contactContract: {
1386
1322
  entity: string;
1387
1323
  };
1388
1324
  }[] | undefined;
1389
- }[];
1390
- total: number;
1391
- page: number;
1392
- pageSize: number;
1393
- lastPage: number;
1325
+ };
1394
1326
  requestId: string;
1395
1327
  }>;
1396
1328
  400: z.ZodObject<{
@@ -1445,7 +1377,7 @@ export declare const contactContract: {
1445
1377
  error?: any;
1446
1378
  }>;
1447
1379
  };
1448
- path: "contact";
1380
+ path: "contact/:id";
1449
1381
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1450
1382
  'x-tenant': z.ZodString;
1451
1383
  authorization: z.ZodString;
@@ -1463,21 +1395,71 @@ export declare const contactContract: {
1463
1395
  'x-client-timezone'?: string | undefined;
1464
1396
  }>>>;
1465
1397
  };
1466
- filterContacts: {
1467
- summary: "Get all contacts by filtering with only keyword";
1398
+ getAll: {
1399
+ summary: "Get all contacts";
1468
1400
  method: "GET";
1469
1401
  query: z.ZodObject<{
1470
1402
  page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1471
1403
  pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1472
- keyword: z.ZodOptional<z.ZodString>;
1404
+ keyword: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1405
+ company: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1406
+ name: z.ZodOptional<z.ZodString>;
1407
+ address: z.ZodOptional<z.ZodString>;
1408
+ channel: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1409
+ selectedDate: z.ZodOptional<z.ZodString>;
1410
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1411
+ attributeId: z.ZodString;
1412
+ type: z.ZodString;
1413
+ value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ type: string;
1416
+ value: (string | string[]) & (string | string[] | undefined);
1417
+ attributeId: string;
1418
+ }, {
1419
+ type: string;
1420
+ value: (string | string[]) & (string | string[] | undefined);
1421
+ attributeId: string;
1422
+ }>, "many">>;
1423
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1424
+ phone: z.ZodOptional<z.ZodString>;
1425
+ email: z.ZodOptional<z.ZodString>;
1426
+ notes: z.ZodOptional<z.ZodString>;
1473
1427
  }, "strip", z.ZodTypeAny, {
1474
1428
  page?: number | undefined;
1475
1429
  pageSize?: number | undefined;
1476
1430
  keyword?: string | undefined;
1431
+ company?: string[] | undefined;
1432
+ name?: string | undefined;
1433
+ address?: string | undefined;
1434
+ channel?: string[] | undefined;
1435
+ selectedDate?: string | undefined;
1436
+ customFields?: {
1437
+ type: string;
1438
+ value: (string | string[]) & (string | string[] | undefined);
1439
+ attributeId: string;
1440
+ }[] | undefined;
1441
+ tags?: string[] | undefined;
1442
+ phone?: string | undefined;
1443
+ email?: string | undefined;
1444
+ notes?: string | undefined;
1477
1445
  }, {
1478
1446
  page?: number | undefined;
1479
1447
  pageSize?: number | undefined;
1480
1448
  keyword?: string | undefined;
1449
+ company?: string[] | undefined;
1450
+ name?: string | undefined;
1451
+ address?: string | undefined;
1452
+ channel?: string[] | undefined;
1453
+ selectedDate?: string | undefined;
1454
+ customFields?: {
1455
+ type: string;
1456
+ value: (string | string[]) & (string | string[] | undefined);
1457
+ attributeId: string;
1458
+ }[] | undefined;
1459
+ tags?: string[] | undefined;
1460
+ phone?: string | undefined;
1461
+ email?: string | undefined;
1462
+ notes?: string | undefined;
1481
1463
  }>;
1482
1464
  responses: {
1483
1465
  200: z.ZodObject<{
@@ -2495,7 +2477,7 @@ export declare const contactContract: {
2495
2477
  error?: any;
2496
2478
  }>;
2497
2479
  };
2498
- path: "contact/filter/list";
2480
+ path: "contact";
2499
2481
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
2500
2482
  'x-tenant': z.ZodString;
2501
2483
  authorization: z.ZodString;
@@ -2513,283 +2495,30 @@ export declare const contactContract: {
2513
2495
  'x-client-timezone'?: string | undefined;
2514
2496
  }>>>;
2515
2497
  };
2516
- update: {
2517
- body: z.ZodObject<{
2518
- name: z.ZodOptional<z.ZodObject<{
2519
- isRequired: z.ZodBoolean;
2520
- attributeId: z.ZodString;
2521
- value: z.ZodString;
2522
- }, "strip", z.ZodTypeAny, {
2523
- value: string;
2524
- isRequired: boolean;
2525
- attributeId: string;
2526
- }, {
2527
- value: string;
2528
- isRequired: boolean;
2529
- attributeId: string;
2530
- }>>;
2531
- email: z.ZodOptional<z.ZodObject<{
2532
- isRequired: z.ZodBoolean;
2533
- attributeId: z.ZodString;
2534
- value: z.ZodArray<z.ZodObject<{
2535
- email: z.ZodString;
2536
- isPrimary: z.ZodBoolean;
2537
- }, "strip", z.ZodTypeAny, {
2538
- isPrimary: boolean;
2539
- email: string;
2540
- }, {
2541
- isPrimary: boolean;
2542
- email: string;
2543
- }>, "many">;
2544
- }, "strip", z.ZodTypeAny, {
2545
- value: {
2546
- isPrimary: boolean;
2547
- email: string;
2548
- }[];
2549
- isRequired: boolean;
2550
- attributeId: string;
2551
- }, {
2552
- value: {
2553
- isPrimary: boolean;
2554
- email: string;
2555
- }[];
2556
- isRequired: boolean;
2557
- attributeId: string;
2558
- }>>;
2559
- channel: z.ZodOptional<z.ZodObject<{
2560
- isRequired: z.ZodBoolean;
2561
- attributeId: z.ZodString;
2562
- value: z.ZodString;
2563
- }, "strip", z.ZodTypeAny, {
2564
- value: string;
2565
- isRequired: boolean;
2566
- attributeId: string;
2567
- }, {
2568
- value: string;
2569
- isRequired: boolean;
2570
- attributeId: string;
2571
- }>>;
2572
- address: z.ZodOptional<z.ZodObject<{
2573
- isRequired: z.ZodBoolean;
2574
- attributeId: z.ZodString;
2575
- value: z.ZodString;
2576
- }, "strip", z.ZodTypeAny, {
2577
- value: string;
2578
- isRequired: boolean;
2579
- attributeId: string;
2580
- }, {
2581
- value: string;
2582
- isRequired: boolean;
2583
- attributeId: string;
2584
- }>>;
2585
- phone: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2586
- isRequired: z.ZodBoolean;
2587
- attributeId: z.ZodString;
2588
- value: z.ZodArray<z.ZodObject<{
2589
- phone: z.ZodString;
2590
- isPrimary: z.ZodBoolean;
2591
- }, "strip", z.ZodTypeAny, {
2592
- isPrimary: boolean;
2593
- phone: string;
2594
- }, {
2595
- isPrimary: boolean;
2596
- phone: string;
2597
- }>, "many">;
2598
- }, "strip", z.ZodTypeAny, {
2599
- value: {
2600
- isPrimary: boolean;
2601
- phone: string;
2602
- }[];
2603
- isRequired: boolean;
2604
- attributeId: string;
2605
- }, {
2606
- value: {
2607
- isPrimary: boolean;
2608
- phone: string;
2609
- }[];
2610
- isRequired: boolean;
2611
- attributeId: string;
2612
- }>>>;
2613
- notes: z.ZodOptional<z.ZodObject<{
2614
- isRequired: z.ZodBoolean;
2615
- attributeId: z.ZodString;
2616
- value: z.ZodString;
2617
- }, "strip", z.ZodTypeAny, {
2618
- value: string;
2619
- isRequired: boolean;
2620
- attributeId: string;
2621
- }, {
2622
- value: string;
2623
- isRequired: boolean;
2624
- attributeId: string;
2625
- }>>;
2626
- tags: z.ZodOptional<z.ZodObject<{
2627
- isRequired: z.ZodBoolean;
2628
- attributeId: z.ZodString;
2629
- value: z.ZodArray<z.ZodString, "many">;
2630
- }, "strip", z.ZodTypeAny, {
2631
- value: string[];
2632
- isRequired: boolean;
2633
- attributeId: string;
2634
- }, {
2635
- value: string[];
2636
- isRequired: boolean;
2637
- attributeId: string;
2638
- }>>;
2639
- company: z.ZodOptional<z.ZodObject<{
2640
- isRequired: z.ZodBoolean;
2641
- attributeId: z.ZodString;
2642
- value: z.ZodString;
2643
- }, "strip", z.ZodTypeAny, {
2644
- value: string;
2645
- isRequired: boolean;
2646
- attributeId: string;
2647
- }, {
2648
- value: string;
2649
- isRequired: boolean;
2650
- attributeId: string;
2651
- }>>;
2652
- customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2653
- isRequired: z.ZodBoolean;
2654
- attributeId: z.ZodString;
2655
- value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
2656
- type: z.ZodString;
2657
- isDefaultAttribute: z.ZodBoolean;
2658
- }, "strip", z.ZodTypeAny, {
2659
- type: string;
2660
- value: (string | string[]) & (string | string[] | undefined);
2661
- isRequired: boolean;
2662
- attributeId: string;
2663
- isDefaultAttribute: boolean;
2664
- }, {
2665
- type: string;
2666
- value: (string | string[]) & (string | string[] | undefined);
2667
- isRequired: boolean;
2668
- attributeId: string;
2669
- isDefaultAttribute: boolean;
2670
- }>, "many">>;
2671
- }, "strip", z.ZodTypeAny, {
2672
- name?: {
2673
- value: string;
2674
- isRequired: boolean;
2675
- attributeId: string;
2676
- } | undefined;
2677
- email?: {
2678
- value: {
2679
- isPrimary: boolean;
2680
- email: string;
2681
- }[];
2682
- isRequired: boolean;
2683
- attributeId: string;
2684
- } | undefined;
2685
- channel?: {
2686
- value: string;
2687
- isRequired: boolean;
2688
- attributeId: string;
2689
- } | undefined;
2690
- address?: {
2691
- value: string;
2692
- isRequired: boolean;
2693
- attributeId: string;
2694
- } | undefined;
2695
- phone?: {
2696
- value: {
2697
- isPrimary: boolean;
2698
- phone: string;
2699
- }[];
2700
- isRequired: boolean;
2701
- attributeId: string;
2702
- } | undefined;
2703
- notes?: {
2704
- value: string;
2705
- isRequired: boolean;
2706
- attributeId: string;
2707
- } | undefined;
2708
- tags?: {
2709
- value: string[];
2710
- isRequired: boolean;
2711
- attributeId: string;
2712
- } | undefined;
2713
- company?: {
2714
- value: string;
2715
- isRequired: boolean;
2716
- attributeId: string;
2717
- } | undefined;
2718
- customFields?: {
2719
- type: string;
2720
- value: (string | string[]) & (string | string[] | undefined);
2721
- isRequired: boolean;
2722
- attributeId: string;
2723
- isDefaultAttribute: boolean;
2724
- }[] | undefined;
2725
- }, {
2726
- name?: {
2727
- value: string;
2728
- isRequired: boolean;
2729
- attributeId: string;
2730
- } | undefined;
2731
- email?: {
2732
- value: {
2733
- isPrimary: boolean;
2734
- email: string;
2735
- }[];
2736
- isRequired: boolean;
2737
- attributeId: string;
2738
- } | undefined;
2739
- channel?: {
2740
- value: string;
2741
- isRequired: boolean;
2742
- attributeId: string;
2743
- } | undefined;
2744
- address?: {
2745
- value: string;
2746
- isRequired: boolean;
2747
- attributeId: string;
2748
- } | undefined;
2749
- phone?: {
2750
- value: {
2751
- isPrimary: boolean;
2752
- phone: string;
2753
- }[];
2754
- isRequired: boolean;
2755
- attributeId: string;
2756
- } | undefined;
2757
- notes?: {
2758
- value: string;
2759
- isRequired: boolean;
2760
- attributeId: string;
2761
- } | undefined;
2762
- tags?: {
2763
- value: string[];
2764
- isRequired: boolean;
2765
- attributeId: string;
2766
- } | undefined;
2767
- company?: {
2768
- value: string;
2769
- isRequired: boolean;
2770
- attributeId: string;
2771
- } | undefined;
2772
- customFields?: {
2773
- type: string;
2774
- value: (string | string[]) & (string | string[] | undefined);
2775
- isRequired: boolean;
2776
- attributeId: string;
2777
- isDefaultAttribute: boolean;
2778
- }[] | undefined;
2779
- }>;
2780
- summary: "Update a contact";
2781
- method: "PATCH";
2782
- pathParams: z.ZodObject<{
2783
- id: z.ZodString;
2498
+ filterContacts: {
2499
+ summary: "Get all contacts by filtering with only keyword";
2500
+ method: "GET";
2501
+ query: z.ZodObject<{
2502
+ page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
2503
+ pageSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
2504
+ keyword: z.ZodOptional<z.ZodString>;
2784
2505
  }, "strip", z.ZodTypeAny, {
2785
- id: string;
2506
+ page?: number | undefined;
2507
+ pageSize?: number | undefined;
2508
+ keyword?: string | undefined;
2786
2509
  }, {
2787
- id: string;
2510
+ page?: number | undefined;
2511
+ pageSize?: number | undefined;
2512
+ keyword?: string | undefined;
2788
2513
  }>;
2789
2514
  responses: {
2790
2515
  200: z.ZodObject<{
2791
2516
  requestId: z.ZodString;
2792
- data: z.ZodObject<{
2517
+ page: z.ZodNumber;
2518
+ pageSize: z.ZodNumber;
2519
+ total: z.ZodNumber;
2520
+ lastPage: z.ZodNumber;
2521
+ data: z.ZodArray<z.ZodObject<{
2793
2522
  id: z.ZodString;
2794
2523
  createdAt: z.ZodDate;
2795
2524
  updatedAt: z.ZodDate;
@@ -3528,7 +3257,7 @@ export declare const contactContract: {
3528
3257
  entity: string;
3529
3258
  };
3530
3259
  }[] | undefined;
3531
- }>;
3260
+ }>, "many">;
3532
3261
  }, "strip", z.ZodTypeAny, {
3533
3262
  data: {
3534
3263
  id: string;
@@ -3631,7 +3360,11 @@ export declare const contactContract: {
3631
3360
  entity: string;
3632
3361
  };
3633
3362
  }[] | undefined;
3634
- };
3363
+ }[];
3364
+ total: number;
3365
+ page: number;
3366
+ pageSize: number;
3367
+ lastPage: number;
3635
3368
  requestId: string;
3636
3369
  }, {
3637
3370
  data: {
@@ -3735,7 +3468,11 @@ export declare const contactContract: {
3735
3468
  entity: string;
3736
3469
  };
3737
3470
  }[] | undefined;
3738
- };
3471
+ }[];
3472
+ total: number;
3473
+ page: number;
3474
+ pageSize: number;
3475
+ lastPage: number;
3739
3476
  requestId: string;
3740
3477
  }>;
3741
3478
  400: z.ZodObject<{
@@ -3790,7 +3527,7 @@ export declare const contactContract: {
3790
3527
  error?: any;
3791
3528
  }>;
3792
3529
  };
3793
- path: "contact/:id";
3530
+ path: "contact/filter";
3794
3531
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
3795
3532
  'x-tenant': z.ZodString;
3796
3533
  authorization: z.ZodString;
@@ -3808,143 +3545,314 @@ export declare const contactContract: {
3808
3545
  'x-client-timezone'?: string | undefined;
3809
3546
  }>>>;
3810
3547
  };
3811
- delete: {
3812
- body: null;
3813
- summary: "Delete a contact";
3814
- method: "DELETE";
3815
- pathParams: z.ZodObject<{
3816
- id: z.ZodString;
3817
- }, "strip", z.ZodTypeAny, {
3818
- id: string;
3819
- }, {
3820
- id: string;
3821
- }>;
3822
- responses: {
3823
- 200: z.ZodObject<{
3824
- requestId: z.ZodString;
3825
- message: z.ZodString;
3548
+ update: {
3549
+ body: z.ZodObject<{
3550
+ name: z.ZodOptional<z.ZodObject<{
3551
+ isRequired: z.ZodBoolean;
3552
+ attributeId: z.ZodString;
3553
+ value: z.ZodString;
3826
3554
  }, "strip", z.ZodTypeAny, {
3827
- message: string;
3828
- requestId: string;
3555
+ value: string;
3556
+ isRequired: boolean;
3557
+ attributeId: string;
3829
3558
  }, {
3830
- message: string;
3831
- requestId: string;
3832
- }>;
3833
- 400: z.ZodObject<{
3834
- message: z.ZodString;
3559
+ value: string;
3560
+ isRequired: boolean;
3561
+ attributeId: string;
3562
+ }>>;
3563
+ email: z.ZodOptional<z.ZodObject<{
3564
+ isRequired: z.ZodBoolean;
3565
+ attributeId: z.ZodString;
3566
+ value: z.ZodArray<z.ZodObject<{
3567
+ email: z.ZodString;
3568
+ isPrimary: z.ZodBoolean;
3569
+ }, "strip", z.ZodTypeAny, {
3570
+ isPrimary: boolean;
3571
+ email: string;
3572
+ }, {
3573
+ isPrimary: boolean;
3574
+ email: string;
3575
+ }>, "many">;
3835
3576
  }, "strip", z.ZodTypeAny, {
3836
- message: string;
3577
+ value: {
3578
+ isPrimary: boolean;
3579
+ email: string;
3580
+ }[];
3581
+ isRequired: boolean;
3582
+ attributeId: string;
3837
3583
  }, {
3838
- message: string;
3839
- }>;
3840
- 409: z.ZodObject<{
3841
- message: z.ZodString;
3842
- }, "strip", z.ZodTypeAny, {
3843
- message: string;
3584
+ value: {
3585
+ isPrimary: boolean;
3586
+ email: string;
3587
+ }[];
3588
+ isRequired: boolean;
3589
+ attributeId: string;
3590
+ }>>;
3591
+ channel: z.ZodOptional<z.ZodObject<{
3592
+ isRequired: z.ZodBoolean;
3593
+ attributeId: z.ZodString;
3594
+ value: z.ZodString;
3595
+ }, "strip", z.ZodTypeAny, {
3596
+ value: string;
3597
+ isRequired: boolean;
3598
+ attributeId: string;
3844
3599
  }, {
3845
- message: string;
3846
- }>;
3847
- 500: z.ZodObject<{
3848
- message: z.ZodString;
3600
+ value: string;
3601
+ isRequired: boolean;
3602
+ attributeId: string;
3603
+ }>>;
3604
+ address: z.ZodOptional<z.ZodObject<{
3605
+ isRequired: z.ZodBoolean;
3606
+ attributeId: z.ZodString;
3607
+ value: z.ZodString;
3849
3608
  }, "strip", z.ZodTypeAny, {
3850
- message: string;
3609
+ value: string;
3610
+ isRequired: boolean;
3611
+ attributeId: string;
3851
3612
  }, {
3852
- message: string;
3853
- }>;
3854
- 401: z.ZodObject<{
3855
- message: z.ZodString;
3856
- error: z.ZodAny;
3613
+ value: string;
3614
+ isRequired: boolean;
3615
+ attributeId: string;
3616
+ }>>;
3617
+ phone: z.ZodOptional<z.ZodOptional<z.ZodObject<{
3618
+ isRequired: z.ZodBoolean;
3619
+ attributeId: z.ZodString;
3620
+ value: z.ZodArray<z.ZodObject<{
3621
+ phone: z.ZodString;
3622
+ isPrimary: z.ZodBoolean;
3623
+ }, "strip", z.ZodTypeAny, {
3624
+ isPrimary: boolean;
3625
+ phone: string;
3626
+ }, {
3627
+ isPrimary: boolean;
3628
+ phone: string;
3629
+ }>, "many">;
3857
3630
  }, "strip", z.ZodTypeAny, {
3858
- message: string;
3859
- error?: any;
3631
+ value: {
3632
+ isPrimary: boolean;
3633
+ phone: string;
3634
+ }[];
3635
+ isRequired: boolean;
3636
+ attributeId: string;
3860
3637
  }, {
3861
- message: string;
3862
- error?: any;
3863
- }>;
3864
- 404: z.ZodObject<{
3865
- message: z.ZodString;
3866
- error: z.ZodAny;
3638
+ value: {
3639
+ isPrimary: boolean;
3640
+ phone: string;
3641
+ }[];
3642
+ isRequired: boolean;
3643
+ attributeId: string;
3644
+ }>>>;
3645
+ notes: z.ZodOptional<z.ZodObject<{
3646
+ isRequired: z.ZodBoolean;
3647
+ attributeId: z.ZodString;
3648
+ value: z.ZodString;
3867
3649
  }, "strip", z.ZodTypeAny, {
3868
- message: string;
3869
- error?: any;
3650
+ value: string;
3651
+ isRequired: boolean;
3652
+ attributeId: string;
3870
3653
  }, {
3871
- message: string;
3872
- error?: any;
3873
- }>;
3874
- 422: z.ZodObject<{
3875
- message: z.ZodString;
3876
- error: z.ZodAny;
3654
+ value: string;
3655
+ isRequired: boolean;
3656
+ attributeId: string;
3657
+ }>>;
3658
+ tags: z.ZodOptional<z.ZodObject<{
3659
+ isRequired: z.ZodBoolean;
3660
+ attributeId: z.ZodString;
3661
+ value: z.ZodArray<z.ZodString, "many">;
3877
3662
  }, "strip", z.ZodTypeAny, {
3878
- message: string;
3879
- error?: any;
3663
+ value: string[];
3664
+ isRequired: boolean;
3665
+ attributeId: string;
3880
3666
  }, {
3881
- message: string;
3882
- error?: any;
3883
- }>;
3884
- };
3885
- path: "contact/:id";
3886
- headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
3887
- 'x-tenant': z.ZodString;
3888
- authorization: z.ZodString;
3889
- 'x-code': z.ZodOptional<z.ZodString>;
3890
- 'x-client-timezone': z.ZodDefault<z.ZodString>;
3891
- }, "strip", z.ZodTypeAny, {
3892
- 'x-tenant': string;
3893
- authorization: string;
3894
- 'x-client-timezone': string;
3895
- 'x-code'?: string | undefined;
3896
- }, {
3897
- 'x-tenant': string;
3898
- authorization: string;
3899
- 'x-code'?: string | undefined;
3900
- 'x-client-timezone'?: string | undefined;
3901
- }>>>;
3902
- };
3903
- createContactByPhone: {
3904
- body: z.ZodObject<{
3905
- phoneNumber: z.ZodEffects<z.ZodString, string, string>;
3667
+ value: string[];
3668
+ isRequired: boolean;
3669
+ attributeId: string;
3670
+ }>>;
3671
+ company: z.ZodOptional<z.ZodObject<{
3672
+ isRequired: z.ZodBoolean;
3673
+ attributeId: z.ZodString;
3674
+ value: z.ZodString;
3675
+ }, "strip", z.ZodTypeAny, {
3676
+ value: string;
3677
+ isRequired: boolean;
3678
+ attributeId: string;
3679
+ }, {
3680
+ value: string;
3681
+ isRequired: boolean;
3682
+ attributeId: string;
3683
+ }>>;
3684
+ customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
3685
+ isRequired: z.ZodBoolean;
3686
+ attributeId: z.ZodString;
3687
+ value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
3688
+ type: z.ZodString;
3689
+ isDefaultAttribute: z.ZodBoolean;
3690
+ }, "strip", z.ZodTypeAny, {
3691
+ type: string;
3692
+ value: (string | string[]) & (string | string[] | undefined);
3693
+ isRequired: boolean;
3694
+ attributeId: string;
3695
+ isDefaultAttribute: boolean;
3696
+ }, {
3697
+ type: string;
3698
+ value: (string | string[]) & (string | string[] | undefined);
3699
+ isRequired: boolean;
3700
+ attributeId: string;
3701
+ isDefaultAttribute: boolean;
3702
+ }>, "many">>;
3906
3703
  }, "strip", z.ZodTypeAny, {
3907
- phoneNumber: string;
3704
+ name?: {
3705
+ value: string;
3706
+ isRequired: boolean;
3707
+ attributeId: string;
3708
+ } | undefined;
3709
+ email?: {
3710
+ value: {
3711
+ isPrimary: boolean;
3712
+ email: string;
3713
+ }[];
3714
+ isRequired: boolean;
3715
+ attributeId: string;
3716
+ } | undefined;
3717
+ channel?: {
3718
+ value: string;
3719
+ isRequired: boolean;
3720
+ attributeId: string;
3721
+ } | undefined;
3722
+ address?: {
3723
+ value: string;
3724
+ isRequired: boolean;
3725
+ attributeId: string;
3726
+ } | undefined;
3727
+ phone?: {
3728
+ value: {
3729
+ isPrimary: boolean;
3730
+ phone: string;
3731
+ }[];
3732
+ isRequired: boolean;
3733
+ attributeId: string;
3734
+ } | undefined;
3735
+ notes?: {
3736
+ value: string;
3737
+ isRequired: boolean;
3738
+ attributeId: string;
3739
+ } | undefined;
3740
+ tags?: {
3741
+ value: string[];
3742
+ isRequired: boolean;
3743
+ attributeId: string;
3744
+ } | undefined;
3745
+ company?: {
3746
+ value: string;
3747
+ isRequired: boolean;
3748
+ attributeId: string;
3749
+ } | undefined;
3750
+ customFields?: {
3751
+ type: string;
3752
+ value: (string | string[]) & (string | string[] | undefined);
3753
+ isRequired: boolean;
3754
+ attributeId: string;
3755
+ isDefaultAttribute: boolean;
3756
+ }[] | undefined;
3908
3757
  }, {
3909
- phoneNumber: string;
3910
- }>;
3911
- summary: "Create a new contact using phone number";
3912
- method: "POST";
3913
- responses: {
3914
- 201: z.ZodObject<{
3915
- requestId: z.ZodString;
3916
- data: z.ZodObject<{
3917
- id: z.ZodString;
3918
- createdAt: z.ZodDate;
3919
- updatedAt: z.ZodDate;
3920
- deletedAt: z.ZodNullable<z.ZodDate>;
3921
- name: z.ZodString;
3922
- address: z.ZodNullable<z.ZodString>;
3923
- channel: z.ZodNullable<z.ZodString>;
3924
- notes: z.ZodNullable<z.ZodString>;
3925
- contactProfile: z.ZodNullable<z.ZodString>;
3926
- socialProfileUrl: z.ZodNullable<z.ZodString>;
3927
- tags: z.ZodArray<z.ZodObject<{
3928
- id: z.ZodString;
3929
- createdAt: z.ZodDate;
3930
- updatedAt: z.ZodDate;
3931
- deletedAt: z.ZodNullable<z.ZodDate>;
3932
- name: z.ZodString;
3933
- }, "strip", z.ZodTypeAny, {
3934
- id: string;
3935
- name: string;
3936
- createdAt: Date;
3937
- updatedAt: Date;
3938
- deletedAt: Date | null;
3939
- }, {
3940
- id: string;
3941
- name: string;
3942
- createdAt: Date;
3943
- updatedAt: Date;
3944
- deletedAt: Date | null;
3945
- }>, "many">;
3946
- company: z.ZodNullable<z.ZodObject<Omit<{
3947
- id: z.ZodString;
3758
+ name?: {
3759
+ value: string;
3760
+ isRequired: boolean;
3761
+ attributeId: string;
3762
+ } | undefined;
3763
+ email?: {
3764
+ value: {
3765
+ isPrimary: boolean;
3766
+ email: string;
3767
+ }[];
3768
+ isRequired: boolean;
3769
+ attributeId: string;
3770
+ } | undefined;
3771
+ channel?: {
3772
+ value: string;
3773
+ isRequired: boolean;
3774
+ attributeId: string;
3775
+ } | undefined;
3776
+ address?: {
3777
+ value: string;
3778
+ isRequired: boolean;
3779
+ attributeId: string;
3780
+ } | undefined;
3781
+ phone?: {
3782
+ value: {
3783
+ isPrimary: boolean;
3784
+ phone: string;
3785
+ }[];
3786
+ isRequired: boolean;
3787
+ attributeId: string;
3788
+ } | undefined;
3789
+ notes?: {
3790
+ value: string;
3791
+ isRequired: boolean;
3792
+ attributeId: string;
3793
+ } | undefined;
3794
+ tags?: {
3795
+ value: string[];
3796
+ isRequired: boolean;
3797
+ attributeId: string;
3798
+ } | undefined;
3799
+ company?: {
3800
+ value: string;
3801
+ isRequired: boolean;
3802
+ attributeId: string;
3803
+ } | undefined;
3804
+ customFields?: {
3805
+ type: string;
3806
+ value: (string | string[]) & (string | string[] | undefined);
3807
+ isRequired: boolean;
3808
+ attributeId: string;
3809
+ isDefaultAttribute: boolean;
3810
+ }[] | undefined;
3811
+ }>;
3812
+ summary: "Update a contact";
3813
+ method: "PATCH";
3814
+ pathParams: z.ZodObject<{
3815
+ id: z.ZodString;
3816
+ }, "strip", z.ZodTypeAny, {
3817
+ id: string;
3818
+ }, {
3819
+ id: string;
3820
+ }>;
3821
+ responses: {
3822
+ 200: z.ZodObject<{
3823
+ requestId: z.ZodString;
3824
+ data: z.ZodObject<{
3825
+ id: z.ZodString;
3826
+ createdAt: z.ZodDate;
3827
+ updatedAt: z.ZodDate;
3828
+ deletedAt: z.ZodNullable<z.ZodDate>;
3829
+ name: z.ZodString;
3830
+ address: z.ZodNullable<z.ZodString>;
3831
+ channel: z.ZodNullable<z.ZodString>;
3832
+ notes: z.ZodNullable<z.ZodString>;
3833
+ contactProfile: z.ZodNullable<z.ZodString>;
3834
+ socialProfileUrl: z.ZodNullable<z.ZodString>;
3835
+ tags: z.ZodArray<z.ZodObject<{
3836
+ id: z.ZodString;
3837
+ createdAt: z.ZodDate;
3838
+ updatedAt: z.ZodDate;
3839
+ deletedAt: z.ZodNullable<z.ZodDate>;
3840
+ name: z.ZodString;
3841
+ }, "strip", z.ZodTypeAny, {
3842
+ id: string;
3843
+ name: string;
3844
+ createdAt: Date;
3845
+ updatedAt: Date;
3846
+ deletedAt: Date | null;
3847
+ }, {
3848
+ id: string;
3849
+ name: string;
3850
+ createdAt: Date;
3851
+ updatedAt: Date;
3852
+ deletedAt: Date | null;
3853
+ }>, "many">;
3854
+ company: z.ZodNullable<z.ZodObject<Omit<{
3855
+ id: z.ZodString;
3948
3856
  createdAt: z.ZodDate;
3949
3857
  updatedAt: z.ZodDate;
3950
3858
  deletedAt: z.ZodNullable<z.ZodDate>;
@@ -4914,7 +4822,7 @@ export declare const contactContract: {
4914
4822
  error?: any;
4915
4823
  }>;
4916
4824
  };
4917
- path: "contact/phone";
4825
+ path: "contact/:id";
4918
4826
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
4919
4827
  'x-tenant': z.ZodString;
4920
4828
  authorization: z.ZodString;
@@ -4932,19 +4840,108 @@ export declare const contactContract: {
4932
4840
  'x-client-timezone'?: string | undefined;
4933
4841
  }>>>;
4934
4842
  };
4935
- updateFromOngoingCall: {
4843
+ delete: {
4844
+ body: null;
4845
+ summary: "Delete a contact";
4846
+ method: "DELETE";
4847
+ pathParams: z.ZodObject<{
4848
+ id: z.ZodString;
4849
+ }, "strip", z.ZodTypeAny, {
4850
+ id: string;
4851
+ }, {
4852
+ id: string;
4853
+ }>;
4854
+ responses: {
4855
+ 200: z.ZodObject<{
4856
+ requestId: z.ZodString;
4857
+ message: z.ZodString;
4858
+ }, "strip", z.ZodTypeAny, {
4859
+ message: string;
4860
+ requestId: string;
4861
+ }, {
4862
+ message: string;
4863
+ requestId: string;
4864
+ }>;
4865
+ 400: z.ZodObject<{
4866
+ message: z.ZodString;
4867
+ }, "strip", z.ZodTypeAny, {
4868
+ message: string;
4869
+ }, {
4870
+ message: string;
4871
+ }>;
4872
+ 409: z.ZodObject<{
4873
+ message: z.ZodString;
4874
+ }, "strip", z.ZodTypeAny, {
4875
+ message: string;
4876
+ }, {
4877
+ message: string;
4878
+ }>;
4879
+ 500: z.ZodObject<{
4880
+ message: z.ZodString;
4881
+ }, "strip", z.ZodTypeAny, {
4882
+ message: string;
4883
+ }, {
4884
+ message: string;
4885
+ }>;
4886
+ 401: z.ZodObject<{
4887
+ message: z.ZodString;
4888
+ error: z.ZodAny;
4889
+ }, "strip", z.ZodTypeAny, {
4890
+ message: string;
4891
+ error?: any;
4892
+ }, {
4893
+ message: string;
4894
+ error?: any;
4895
+ }>;
4896
+ 404: z.ZodObject<{
4897
+ message: z.ZodString;
4898
+ error: z.ZodAny;
4899
+ }, "strip", z.ZodTypeAny, {
4900
+ message: string;
4901
+ error?: any;
4902
+ }, {
4903
+ message: string;
4904
+ error?: any;
4905
+ }>;
4906
+ 422: z.ZodObject<{
4907
+ message: z.ZodString;
4908
+ error: z.ZodAny;
4909
+ }, "strip", z.ZodTypeAny, {
4910
+ message: string;
4911
+ error?: any;
4912
+ }, {
4913
+ message: string;
4914
+ error?: any;
4915
+ }>;
4916
+ };
4917
+ path: "contact/:id";
4918
+ headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
4919
+ 'x-tenant': z.ZodString;
4920
+ authorization: z.ZodString;
4921
+ 'x-code': z.ZodOptional<z.ZodString>;
4922
+ 'x-client-timezone': z.ZodDefault<z.ZodString>;
4923
+ }, "strip", z.ZodTypeAny, {
4924
+ 'x-tenant': string;
4925
+ authorization: string;
4926
+ 'x-client-timezone': string;
4927
+ 'x-code'?: string | undefined;
4928
+ }, {
4929
+ 'x-tenant': string;
4930
+ authorization: string;
4931
+ 'x-code'?: string | undefined;
4932
+ 'x-client-timezone'?: string | undefined;
4933
+ }>>>;
4934
+ };
4935
+ createContactByPhone: {
4936
4936
  body: z.ZodObject<{
4937
- name: z.ZodOptional<z.ZodString>;
4938
- companyId: z.ZodOptional<z.ZodString>;
4937
+ phoneNumber: z.ZodEffects<z.ZodString, string, string>;
4939
4938
  }, "strip", z.ZodTypeAny, {
4940
- name?: string | undefined;
4941
- companyId?: string | undefined;
4939
+ phoneNumber: string;
4942
4940
  }, {
4943
- name?: string | undefined;
4944
- companyId?: string | undefined;
4941
+ phoneNumber: string;
4945
4942
  }>;
4946
- summary: "Update a contact with name and company while making ongoing call";
4947
- method: "PATCH";
4943
+ summary: "Create a new contact using phone number";
4944
+ method: "POST";
4948
4945
  responses: {
4949
4946
  201: z.ZodObject<{
4950
4947
  requestId: z.ZodString;
@@ -5949,7 +5946,7 @@ export declare const contactContract: {
5949
5946
  error?: any;
5950
5947
  }>;
5951
5948
  };
5952
- path: "contact/:id/ongoing";
5949
+ path: "contact/phone";
5953
5950
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
5954
5951
  'x-tenant': z.ZodString;
5955
5952
  authorization: z.ZodString;
@@ -5967,57 +5964,21 @@ export declare const contactContract: {
5967
5964
  'x-client-timezone'?: string | undefined;
5968
5965
  }>>>;
5969
5966
  };
5970
- merge: {
5967
+ updateFromOngoingCall: {
5971
5968
  body: z.ZodObject<{
5972
- primaryContactId: z.ZodString;
5973
- emails: z.ZodArray<z.ZodObject<{
5974
- email: z.ZodString;
5975
- isPrimary: z.ZodBoolean;
5976
- }, "strip", z.ZodTypeAny, {
5977
- isPrimary: boolean;
5978
- email: string;
5979
- }, {
5980
- isPrimary: boolean;
5981
- email: string;
5982
- }>, "many">;
5983
- phones: z.ZodArray<z.ZodObject<{
5984
- phone: z.ZodString;
5985
- isPrimary: z.ZodBoolean;
5986
- }, "strip", z.ZodTypeAny, {
5987
- isPrimary: boolean;
5988
- phone: string;
5989
- }, {
5990
- isPrimary: boolean;
5991
- phone: string;
5992
- }>, "many">;
5993
- otherContacts: z.ZodArray<z.ZodString, "many">;
5969
+ name: z.ZodOptional<z.ZodString>;
5970
+ companyId: z.ZodOptional<z.ZodString>;
5994
5971
  }, "strip", z.ZodTypeAny, {
5995
- primaryContactId: string;
5996
- emails: {
5997
- isPrimary: boolean;
5998
- email: string;
5999
- }[];
6000
- phones: {
6001
- isPrimary: boolean;
6002
- phone: string;
6003
- }[];
6004
- otherContacts: string[];
5972
+ name?: string | undefined;
5973
+ companyId?: string | undefined;
6005
5974
  }, {
6006
- primaryContactId: string;
6007
- emails: {
6008
- isPrimary: boolean;
6009
- email: string;
6010
- }[];
6011
- phones: {
6012
- isPrimary: boolean;
6013
- phone: string;
6014
- }[];
6015
- otherContacts: string[];
5975
+ name?: string | undefined;
5976
+ companyId?: string | undefined;
6016
5977
  }>;
6017
- summary: "Merge contacts into a single contact.";
6018
- method: "POST";
5978
+ summary: "Update a contact with name and company while making ongoing call";
5979
+ method: "PATCH";
6019
5980
  responses: {
6020
- 200: z.ZodObject<{
5981
+ 201: z.ZodObject<{
6021
5982
  requestId: z.ZodString;
6022
5983
  data: z.ZodObject<{
6023
5984
  id: z.ZodString;
@@ -7020,7 +6981,7 @@ export declare const contactContract: {
7020
6981
  error?: any;
7021
6982
  }>;
7022
6983
  };
7023
- path: "contact/merge";
6984
+ path: "contact/:id/ongoing";
7024
6985
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
7025
6986
  'x-tenant': z.ZodString;
7026
6987
  authorization: z.ZodString;
@@ -7038,385 +6999,55 @@ export declare const contactContract: {
7038
6999
  'x-client-timezone'?: string | undefined;
7039
7000
  }>>>;
7040
7001
  };
7041
- checkContactPhone: {
7002
+ merge: {
7042
7003
  body: z.ZodObject<{
7043
- contactId: z.ZodOptional<z.ZodString>;
7044
- phoneNumber: z.ZodString;
7045
- }, "strip", z.ZodTypeAny, {
7046
- phoneNumber: string;
7047
- contactId?: string | undefined;
7048
- }, {
7049
- phoneNumber: string;
7050
- contactId?: string | undefined;
7051
- }>;
7052
- summary: "Check whether a contact owns a phone number";
7053
- method: "POST";
7054
- responses: {
7055
- 200: z.ZodObject<{
7056
- requestId: z.ZodString;
7057
- existed: z.ZodBoolean;
7058
- }, "strip", z.ZodTypeAny, {
7059
- requestId: string;
7060
- existed: boolean;
7061
- }, {
7062
- requestId: string;
7063
- existed: boolean;
7064
- }>;
7065
- 400: z.ZodObject<{
7066
- message: z.ZodString;
7067
- }, "strip", z.ZodTypeAny, {
7068
- message: string;
7069
- }, {
7070
- message: string;
7071
- }>;
7072
- 409: z.ZodObject<{
7073
- message: z.ZodString;
7074
- }, "strip", z.ZodTypeAny, {
7075
- message: string;
7076
- }, {
7077
- message: string;
7078
- }>;
7079
- 500: z.ZodObject<{
7080
- message: z.ZodString;
7081
- }, "strip", z.ZodTypeAny, {
7082
- message: string;
7083
- }, {
7084
- message: string;
7085
- }>;
7086
- 401: z.ZodObject<{
7087
- message: z.ZodString;
7088
- error: z.ZodAny;
7089
- }, "strip", z.ZodTypeAny, {
7090
- message: string;
7091
- error?: any;
7092
- }, {
7093
- message: string;
7094
- error?: any;
7095
- }>;
7096
- 404: z.ZodObject<{
7097
- message: z.ZodString;
7098
- error: z.ZodAny;
7004
+ primaryContactId: z.ZodString;
7005
+ emails: z.ZodArray<z.ZodObject<{
7006
+ email: z.ZodString;
7007
+ isPrimary: z.ZodBoolean;
7099
7008
  }, "strip", z.ZodTypeAny, {
7100
- message: string;
7101
- error?: any;
7009
+ isPrimary: boolean;
7010
+ email: string;
7102
7011
  }, {
7103
- message: string;
7104
- error?: any;
7105
- }>;
7106
- 422: z.ZodObject<{
7107
- message: z.ZodString;
7108
- error: z.ZodAny;
7012
+ isPrimary: boolean;
7013
+ email: string;
7014
+ }>, "many">;
7015
+ phones: z.ZodArray<z.ZodObject<{
7016
+ phone: z.ZodString;
7017
+ isPrimary: z.ZodBoolean;
7109
7018
  }, "strip", z.ZodTypeAny, {
7110
- message: string;
7111
- error?: any;
7019
+ isPrimary: boolean;
7020
+ phone: string;
7112
7021
  }, {
7113
- message: string;
7114
- error?: any;
7115
- }>;
7116
- };
7117
- path: "contact/check/phone";
7118
- headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
7119
- 'x-tenant': z.ZodString;
7120
- authorization: z.ZodString;
7121
- 'x-code': z.ZodOptional<z.ZodString>;
7122
- 'x-client-timezone': z.ZodDefault<z.ZodString>;
7123
- }, "strip", z.ZodTypeAny, {
7124
- 'x-tenant': string;
7125
- authorization: string;
7126
- 'x-client-timezone': string;
7127
- 'x-code'?: string | undefined;
7128
- }, {
7129
- 'x-tenant': string;
7130
- authorization: string;
7131
- 'x-code'?: string | undefined;
7132
- 'x-client-timezone'?: string | undefined;
7133
- }>>>;
7134
- };
7135
- checkContactEmail: {
7136
- body: z.ZodObject<{
7137
- contactId: z.ZodOptional<z.ZodString>;
7138
- email: z.ZodString;
7022
+ isPrimary: boolean;
7023
+ phone: string;
7024
+ }>, "many">;
7025
+ otherContacts: z.ZodArray<z.ZodString, "many">;
7139
7026
  }, "strip", z.ZodTypeAny, {
7140
- email: string;
7141
- contactId?: string | undefined;
7027
+ primaryContactId: string;
7028
+ emails: {
7029
+ isPrimary: boolean;
7030
+ email: string;
7031
+ }[];
7032
+ phones: {
7033
+ isPrimary: boolean;
7034
+ phone: string;
7035
+ }[];
7036
+ otherContacts: string[];
7142
7037
  }, {
7143
- email: string;
7144
- contactId?: string | undefined;
7038
+ primaryContactId: string;
7039
+ emails: {
7040
+ isPrimary: boolean;
7041
+ email: string;
7042
+ }[];
7043
+ phones: {
7044
+ isPrimary: boolean;
7045
+ phone: string;
7046
+ }[];
7047
+ otherContacts: string[];
7145
7048
  }>;
7146
- summary: "Check whether a contact owns a email";
7049
+ summary: "Merge contacts into a single contact.";
7147
7050
  method: "POST";
7148
- responses: {
7149
- 200: z.ZodObject<{
7150
- requestId: z.ZodString;
7151
- existed: z.ZodBoolean;
7152
- }, "strip", z.ZodTypeAny, {
7153
- requestId: string;
7154
- existed: boolean;
7155
- }, {
7156
- requestId: string;
7157
- existed: boolean;
7158
- }>;
7159
- 400: z.ZodObject<{
7160
- message: z.ZodString;
7161
- }, "strip", z.ZodTypeAny, {
7162
- message: string;
7163
- }, {
7164
- message: string;
7165
- }>;
7166
- 409: z.ZodObject<{
7167
- message: z.ZodString;
7168
- }, "strip", z.ZodTypeAny, {
7169
- message: string;
7170
- }, {
7171
- message: string;
7172
- }>;
7173
- 500: z.ZodObject<{
7174
- message: z.ZodString;
7175
- }, "strip", z.ZodTypeAny, {
7176
- message: string;
7177
- }, {
7178
- message: string;
7179
- }>;
7180
- 401: z.ZodObject<{
7181
- message: z.ZodString;
7182
- error: z.ZodAny;
7183
- }, "strip", z.ZodTypeAny, {
7184
- message: string;
7185
- error?: any;
7186
- }, {
7187
- message: string;
7188
- error?: any;
7189
- }>;
7190
- 404: z.ZodObject<{
7191
- message: z.ZodString;
7192
- error: z.ZodAny;
7193
- }, "strip", z.ZodTypeAny, {
7194
- message: string;
7195
- error?: any;
7196
- }, {
7197
- message: string;
7198
- error?: any;
7199
- }>;
7200
- 422: z.ZodObject<{
7201
- message: z.ZodString;
7202
- error: z.ZodAny;
7203
- }, "strip", z.ZodTypeAny, {
7204
- message: string;
7205
- error?: any;
7206
- }, {
7207
- message: string;
7208
- error?: any;
7209
- }>;
7210
- };
7211
- path: "contact/check/email";
7212
- headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
7213
- 'x-tenant': z.ZodString;
7214
- authorization: z.ZodString;
7215
- 'x-code': z.ZodOptional<z.ZodString>;
7216
- 'x-client-timezone': z.ZodDefault<z.ZodString>;
7217
- }, "strip", z.ZodTypeAny, {
7218
- 'x-tenant': string;
7219
- authorization: string;
7220
- 'x-client-timezone': string;
7221
- 'x-code'?: string | undefined;
7222
- }, {
7223
- 'x-tenant': string;
7224
- authorization: string;
7225
- 'x-code'?: string | undefined;
7226
- 'x-client-timezone'?: string | undefined;
7227
- }>>>;
7228
- };
7229
- addAttachments: {
7230
- body: z.ZodObject<{
7231
- attributeId: z.ZodString;
7232
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
7233
- bucketName: z.ZodString;
7234
- fileKey: z.ZodString;
7235
- fileName: z.ZodString;
7236
- fileSize: z.ZodNumber;
7237
- }, "strip", z.ZodTypeAny, {
7238
- fileName: string;
7239
- fileKey: string;
7240
- bucketName: string;
7241
- fileSize: number;
7242
- }, {
7243
- fileName: string;
7244
- fileKey: string;
7245
- bucketName: string;
7246
- fileSize: number;
7247
- }>, "many">>;
7248
- }, "strip", z.ZodTypeAny, {
7249
- attributeId: string;
7250
- attachments?: {
7251
- fileName: string;
7252
- fileKey: string;
7253
- bucketName: string;
7254
- fileSize: number;
7255
- }[] | undefined;
7256
- }, {
7257
- attributeId: string;
7258
- attachments?: {
7259
- fileName: string;
7260
- fileKey: string;
7261
- bucketName: string;
7262
- fileSize: number;
7263
- }[] | undefined;
7264
- }>;
7265
- summary: " attachment information from pre-uploaded files in AWS S3 to contacts.";
7266
- method: "POST";
7267
- pathParams: z.ZodObject<{
7268
- id: z.ZodString;
7269
- }, "strip", z.ZodTypeAny, {
7270
- id: string;
7271
- }, {
7272
- id: string;
7273
- }>;
7274
- responses: {
7275
- 201: z.ZodObject<{
7276
- requestId: z.ZodString;
7277
- message: z.ZodObject<{
7278
- id: z.ZodString;
7279
- createdAt: z.ZodDate;
7280
- updatedAt: z.ZodDate;
7281
- deletedAt: z.ZodNullable<z.ZodDate>;
7282
- textValue: z.ZodNullable<z.ZodString>;
7283
- booleanValue: z.ZodNullable<z.ZodBoolean>;
7284
- numberValue: z.ZodNullable<z.ZodNumber>;
7285
- dateValue: z.ZodNullable<z.ZodDate>;
7286
- entityId: z.ZodString;
7287
- attributeId: z.ZodString;
7288
- }, "strip", z.ZodTypeAny, {
7289
- id: string;
7290
- createdAt: Date;
7291
- updatedAt: Date;
7292
- deletedAt: Date | null;
7293
- attributeId: string;
7294
- textValue: string | null;
7295
- booleanValue: boolean | null;
7296
- numberValue: number | null;
7297
- dateValue: Date | null;
7298
- entityId: string;
7299
- }, {
7300
- id: string;
7301
- createdAt: Date;
7302
- updatedAt: Date;
7303
- deletedAt: Date | null;
7304
- attributeId: string;
7305
- textValue: string | null;
7306
- booleanValue: boolean | null;
7307
- numberValue: number | null;
7308
- dateValue: Date | null;
7309
- entityId: string;
7310
- }>;
7311
- }, "strip", z.ZodTypeAny, {
7312
- message: {
7313
- id: string;
7314
- createdAt: Date;
7315
- updatedAt: Date;
7316
- deletedAt: Date | null;
7317
- attributeId: string;
7318
- textValue: string | null;
7319
- booleanValue: boolean | null;
7320
- numberValue: number | null;
7321
- dateValue: Date | null;
7322
- entityId: string;
7323
- };
7324
- requestId: string;
7325
- }, {
7326
- message: {
7327
- id: string;
7328
- createdAt: Date;
7329
- updatedAt: Date;
7330
- deletedAt: Date | null;
7331
- attributeId: string;
7332
- textValue: string | null;
7333
- booleanValue: boolean | null;
7334
- numberValue: number | null;
7335
- dateValue: Date | null;
7336
- entityId: string;
7337
- };
7338
- requestId: string;
7339
- }>;
7340
- 400: z.ZodObject<{
7341
- message: z.ZodString;
7342
- }, "strip", z.ZodTypeAny, {
7343
- message: string;
7344
- }, {
7345
- message: string;
7346
- }>;
7347
- 409: z.ZodObject<{
7348
- message: z.ZodString;
7349
- }, "strip", z.ZodTypeAny, {
7350
- message: string;
7351
- }, {
7352
- message: string;
7353
- }>;
7354
- 500: z.ZodObject<{
7355
- message: z.ZodString;
7356
- }, "strip", z.ZodTypeAny, {
7357
- message: string;
7358
- }, {
7359
- message: string;
7360
- }>;
7361
- 401: z.ZodObject<{
7362
- message: z.ZodString;
7363
- error: z.ZodAny;
7364
- }, "strip", z.ZodTypeAny, {
7365
- message: string;
7366
- error?: any;
7367
- }, {
7368
- message: string;
7369
- error?: any;
7370
- }>;
7371
- 404: z.ZodObject<{
7372
- message: z.ZodString;
7373
- error: z.ZodAny;
7374
- }, "strip", z.ZodTypeAny, {
7375
- message: string;
7376
- error?: any;
7377
- }, {
7378
- message: string;
7379
- error?: any;
7380
- }>;
7381
- 422: z.ZodObject<{
7382
- message: z.ZodString;
7383
- error: z.ZodAny;
7384
- }, "strip", z.ZodTypeAny, {
7385
- message: string;
7386
- error?: any;
7387
- }, {
7388
- message: string;
7389
- error?: any;
7390
- }>;
7391
- };
7392
- path: "contact/:id/attachments";
7393
- headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
7394
- 'x-tenant': z.ZodString;
7395
- authorization: z.ZodString;
7396
- 'x-code': z.ZodOptional<z.ZodString>;
7397
- 'x-client-timezone': z.ZodDefault<z.ZodString>;
7398
- }, "strip", z.ZodTypeAny, {
7399
- 'x-tenant': string;
7400
- authorization: string;
7401
- 'x-client-timezone': string;
7402
- 'x-code'?: string | undefined;
7403
- }, {
7404
- 'x-tenant': string;
7405
- authorization: string;
7406
- 'x-code'?: string | undefined;
7407
- 'x-client-timezone'?: string | undefined;
7408
- }>>>;
7409
- };
7410
- getById: {
7411
- summary: "Get a contact by id";
7412
- method: "GET";
7413
- pathParams: z.ZodObject<{
7414
- id: z.ZodString;
7415
- }, "strip", z.ZodTypeAny, {
7416
- id: string;
7417
- }, {
7418
- id: string;
7419
- }>;
7420
7051
  responses: {
7421
7052
  200: z.ZodObject<{
7422
7053
  requestId: z.ZodString;
@@ -8161,211 +7792,580 @@ export declare const contactContract: {
8161
7792
  }[] | undefined;
8162
7793
  }>;
8163
7794
  }, "strip", z.ZodTypeAny, {
8164
- data: {
7795
+ data: {
7796
+ id: string;
7797
+ channel: string | null;
7798
+ address: string | null;
7799
+ name: string;
7800
+ createdAt: Date;
7801
+ updatedAt: Date;
7802
+ deletedAt: Date | null;
7803
+ customFields: {
7804
+ id: string;
7805
+ createdAt: Date;
7806
+ updatedAt: Date;
7807
+ deletedAt: Date | null;
7808
+ attribute: {
7809
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
7810
+ id: string;
7811
+ position: number;
7812
+ createdAt: Date;
7813
+ updatedAt: Date;
7814
+ deletedAt: Date | null;
7815
+ isDefault: boolean;
7816
+ systemName: string;
7817
+ displayName: string;
7818
+ isArchived: boolean;
7819
+ isRequired: boolean;
7820
+ isUnique: boolean;
7821
+ };
7822
+ textValue: string | null;
7823
+ booleanValue: boolean | null;
7824
+ numberValue: number | null;
7825
+ dateValue: Date | null;
7826
+ uploads: {
7827
+ id: string;
7828
+ createdAt: Date;
7829
+ updatedAt: Date;
7830
+ deletedAt: Date | null;
7831
+ customFieldId: string;
7832
+ upload: {
7833
+ id: string;
7834
+ createdAt: Date;
7835
+ updatedAt: Date;
7836
+ deletedAt: Date | null;
7837
+ fileName: string;
7838
+ fileKey: string;
7839
+ bucketName: string;
7840
+ fileSize: number;
7841
+ };
7842
+ }[];
7843
+ }[];
7844
+ notes: string | null;
7845
+ contactProfile: string | null;
7846
+ socialProfileUrl: string | null;
7847
+ tags: {
7848
+ id: string;
7849
+ name: string;
7850
+ createdAt: Date;
7851
+ updatedAt: Date;
7852
+ deletedAt: Date | null;
7853
+ }[];
7854
+ company: {
7855
+ id: string;
7856
+ createdAt: Date;
7857
+ updatedAt: Date;
7858
+ deletedAt: Date | null;
7859
+ address?: string | null | undefined;
7860
+ name?: string | undefined;
7861
+ phone?: string | null | undefined;
7862
+ industry?: string | null | undefined;
7863
+ } | null;
7864
+ contactEmails: {
7865
+ id: string;
7866
+ isPrimary: boolean;
7867
+ email: string;
7868
+ createdAt: Date;
7869
+ updatedAt: Date;
7870
+ deletedAt: Date | null;
7871
+ }[];
7872
+ contactPhones: {
7873
+ id: string;
7874
+ isPrimary: boolean;
7875
+ createdAt: Date;
7876
+ updatedAt: Date;
7877
+ deletedAt: Date | null;
7878
+ phone: string;
7879
+ }[];
7880
+ activityLogs?: {
7881
+ id: string;
7882
+ description: string;
7883
+ createdAt: Date;
7884
+ updatedAt: Date;
7885
+ deletedAt: Date | null;
7886
+ entityId: string;
7887
+ entityType: {
7888
+ id: string;
7889
+ description: string | null;
7890
+ createdAt: Date;
7891
+ updatedAt: Date;
7892
+ deletedAt: Date | null;
7893
+ entity: string;
7894
+ };
7895
+ }[] | undefined;
7896
+ };
7897
+ requestId: string;
7898
+ }, {
7899
+ data: {
7900
+ id: string;
7901
+ channel: string | null;
7902
+ address: string | null;
7903
+ name: string;
7904
+ createdAt: Date;
7905
+ updatedAt: Date;
7906
+ deletedAt: Date | null;
7907
+ customFields: {
7908
+ id: string;
7909
+ createdAt: Date;
7910
+ updatedAt: Date;
7911
+ deletedAt: Date | null;
7912
+ attribute: {
7913
+ type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
7914
+ id: string;
7915
+ position: number;
7916
+ createdAt: Date;
7917
+ updatedAt: Date;
7918
+ deletedAt: Date | null;
7919
+ isDefault: boolean;
7920
+ systemName: string;
7921
+ displayName: string;
7922
+ isArchived: boolean;
7923
+ isRequired: boolean;
7924
+ isUnique: boolean;
7925
+ };
7926
+ textValue: string | null;
7927
+ booleanValue: boolean | null;
7928
+ numberValue: number | null;
7929
+ dateValue: Date | null;
7930
+ uploads: {
7931
+ id: string;
7932
+ createdAt: Date;
7933
+ updatedAt: Date;
7934
+ deletedAt: Date | null;
7935
+ customFieldId: string;
7936
+ upload: {
7937
+ id: string;
7938
+ createdAt: Date;
7939
+ updatedAt: Date;
7940
+ deletedAt: Date | null;
7941
+ fileName: string;
7942
+ fileKey: string;
7943
+ bucketName: string;
7944
+ fileSize: number;
7945
+ };
7946
+ }[];
7947
+ }[];
7948
+ notes: string | null;
7949
+ contactProfile: string | null;
7950
+ socialProfileUrl: string | null;
7951
+ tags: {
7952
+ id: string;
7953
+ name: string;
7954
+ createdAt: Date;
7955
+ updatedAt: Date;
7956
+ deletedAt: Date | null;
7957
+ }[];
7958
+ company: {
7959
+ id: string;
7960
+ createdAt: Date;
7961
+ updatedAt: Date;
7962
+ deletedAt: Date | null;
7963
+ address?: string | null | undefined;
7964
+ name?: string | undefined;
7965
+ phone?: string | null | undefined;
7966
+ industry?: string | null | undefined;
7967
+ } | null;
7968
+ contactEmails: {
7969
+ id: string;
7970
+ isPrimary: boolean;
7971
+ email: string;
7972
+ createdAt: Date;
7973
+ updatedAt: Date;
7974
+ deletedAt: Date | null;
7975
+ }[];
7976
+ contactPhones: {
7977
+ id: string;
7978
+ isPrimary: boolean;
7979
+ createdAt: Date;
7980
+ updatedAt: Date;
7981
+ deletedAt: Date | null;
7982
+ phone: string;
7983
+ }[];
7984
+ activityLogs?: {
7985
+ id: string;
7986
+ description: string;
7987
+ createdAt: Date;
7988
+ updatedAt: Date;
7989
+ deletedAt: Date | null;
7990
+ entityId: string;
7991
+ entityType: {
7992
+ id: string;
7993
+ description: string | null;
7994
+ createdAt: Date;
7995
+ updatedAt: Date;
7996
+ deletedAt: Date | null;
7997
+ entity: string;
7998
+ };
7999
+ }[] | undefined;
8000
+ };
8001
+ requestId: string;
8002
+ }>;
8003
+ 400: z.ZodObject<{
8004
+ message: z.ZodString;
8005
+ }, "strip", z.ZodTypeAny, {
8006
+ message: string;
8007
+ }, {
8008
+ message: string;
8009
+ }>;
8010
+ 409: z.ZodObject<{
8011
+ message: z.ZodString;
8012
+ }, "strip", z.ZodTypeAny, {
8013
+ message: string;
8014
+ }, {
8015
+ message: string;
8016
+ }>;
8017
+ 500: z.ZodObject<{
8018
+ message: z.ZodString;
8019
+ }, "strip", z.ZodTypeAny, {
8020
+ message: string;
8021
+ }, {
8022
+ message: string;
8023
+ }>;
8024
+ 401: z.ZodObject<{
8025
+ message: z.ZodString;
8026
+ error: z.ZodAny;
8027
+ }, "strip", z.ZodTypeAny, {
8028
+ message: string;
8029
+ error?: any;
8030
+ }, {
8031
+ message: string;
8032
+ error?: any;
8033
+ }>;
8034
+ 404: z.ZodObject<{
8035
+ message: z.ZodString;
8036
+ error: z.ZodAny;
8037
+ }, "strip", z.ZodTypeAny, {
8038
+ message: string;
8039
+ error?: any;
8040
+ }, {
8041
+ message: string;
8042
+ error?: any;
8043
+ }>;
8044
+ 422: z.ZodObject<{
8045
+ message: z.ZodString;
8046
+ error: z.ZodAny;
8047
+ }, "strip", z.ZodTypeAny, {
8048
+ message: string;
8049
+ error?: any;
8050
+ }, {
8051
+ message: string;
8052
+ error?: any;
8053
+ }>;
8054
+ };
8055
+ path: "contact/merge";
8056
+ headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8057
+ 'x-tenant': z.ZodString;
8058
+ authorization: z.ZodString;
8059
+ 'x-code': z.ZodOptional<z.ZodString>;
8060
+ 'x-client-timezone': z.ZodDefault<z.ZodString>;
8061
+ }, "strip", z.ZodTypeAny, {
8062
+ 'x-tenant': string;
8063
+ authorization: string;
8064
+ 'x-client-timezone': string;
8065
+ 'x-code'?: string | undefined;
8066
+ }, {
8067
+ 'x-tenant': string;
8068
+ authorization: string;
8069
+ 'x-code'?: string | undefined;
8070
+ 'x-client-timezone'?: string | undefined;
8071
+ }>>>;
8072
+ };
8073
+ checkContactPhone: {
8074
+ body: z.ZodObject<{
8075
+ contactId: z.ZodOptional<z.ZodString>;
8076
+ phoneNumber: z.ZodString;
8077
+ }, "strip", z.ZodTypeAny, {
8078
+ phoneNumber: string;
8079
+ contactId?: string | undefined;
8080
+ }, {
8081
+ phoneNumber: string;
8082
+ contactId?: string | undefined;
8083
+ }>;
8084
+ summary: "Check whether a contact owns a phone number";
8085
+ method: "POST";
8086
+ responses: {
8087
+ 200: z.ZodObject<{
8088
+ requestId: z.ZodString;
8089
+ existed: z.ZodBoolean;
8090
+ }, "strip", z.ZodTypeAny, {
8091
+ requestId: string;
8092
+ existed: boolean;
8093
+ }, {
8094
+ requestId: string;
8095
+ existed: boolean;
8096
+ }>;
8097
+ 400: z.ZodObject<{
8098
+ message: z.ZodString;
8099
+ }, "strip", z.ZodTypeAny, {
8100
+ message: string;
8101
+ }, {
8102
+ message: string;
8103
+ }>;
8104
+ 409: z.ZodObject<{
8105
+ message: z.ZodString;
8106
+ }, "strip", z.ZodTypeAny, {
8107
+ message: string;
8108
+ }, {
8109
+ message: string;
8110
+ }>;
8111
+ 500: z.ZodObject<{
8112
+ message: z.ZodString;
8113
+ }, "strip", z.ZodTypeAny, {
8114
+ message: string;
8115
+ }, {
8116
+ message: string;
8117
+ }>;
8118
+ 401: z.ZodObject<{
8119
+ message: z.ZodString;
8120
+ error: z.ZodAny;
8121
+ }, "strip", z.ZodTypeAny, {
8122
+ message: string;
8123
+ error?: any;
8124
+ }, {
8125
+ message: string;
8126
+ error?: any;
8127
+ }>;
8128
+ 404: z.ZodObject<{
8129
+ message: z.ZodString;
8130
+ error: z.ZodAny;
8131
+ }, "strip", z.ZodTypeAny, {
8132
+ message: string;
8133
+ error?: any;
8134
+ }, {
8135
+ message: string;
8136
+ error?: any;
8137
+ }>;
8138
+ 422: z.ZodObject<{
8139
+ message: z.ZodString;
8140
+ error: z.ZodAny;
8141
+ }, "strip", z.ZodTypeAny, {
8142
+ message: string;
8143
+ error?: any;
8144
+ }, {
8145
+ message: string;
8146
+ error?: any;
8147
+ }>;
8148
+ };
8149
+ path: "contact/check/phone";
8150
+ headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8151
+ 'x-tenant': z.ZodString;
8152
+ authorization: z.ZodString;
8153
+ 'x-code': z.ZodOptional<z.ZodString>;
8154
+ 'x-client-timezone': z.ZodDefault<z.ZodString>;
8155
+ }, "strip", z.ZodTypeAny, {
8156
+ 'x-tenant': string;
8157
+ authorization: string;
8158
+ 'x-client-timezone': string;
8159
+ 'x-code'?: string | undefined;
8160
+ }, {
8161
+ 'x-tenant': string;
8162
+ authorization: string;
8163
+ 'x-code'?: string | undefined;
8164
+ 'x-client-timezone'?: string | undefined;
8165
+ }>>>;
8166
+ };
8167
+ checkContactEmail: {
8168
+ body: z.ZodObject<{
8169
+ contactId: z.ZodOptional<z.ZodString>;
8170
+ email: z.ZodString;
8171
+ }, "strip", z.ZodTypeAny, {
8172
+ email: string;
8173
+ contactId?: string | undefined;
8174
+ }, {
8175
+ email: string;
8176
+ contactId?: string | undefined;
8177
+ }>;
8178
+ summary: "Check whether a contact owns a email";
8179
+ method: "POST";
8180
+ responses: {
8181
+ 200: z.ZodObject<{
8182
+ requestId: z.ZodString;
8183
+ existed: z.ZodBoolean;
8184
+ }, "strip", z.ZodTypeAny, {
8185
+ requestId: string;
8186
+ existed: boolean;
8187
+ }, {
8188
+ requestId: string;
8189
+ existed: boolean;
8190
+ }>;
8191
+ 400: z.ZodObject<{
8192
+ message: z.ZodString;
8193
+ }, "strip", z.ZodTypeAny, {
8194
+ message: string;
8195
+ }, {
8196
+ message: string;
8197
+ }>;
8198
+ 409: z.ZodObject<{
8199
+ message: z.ZodString;
8200
+ }, "strip", z.ZodTypeAny, {
8201
+ message: string;
8202
+ }, {
8203
+ message: string;
8204
+ }>;
8205
+ 500: z.ZodObject<{
8206
+ message: z.ZodString;
8207
+ }, "strip", z.ZodTypeAny, {
8208
+ message: string;
8209
+ }, {
8210
+ message: string;
8211
+ }>;
8212
+ 401: z.ZodObject<{
8213
+ message: z.ZodString;
8214
+ error: z.ZodAny;
8215
+ }, "strip", z.ZodTypeAny, {
8216
+ message: string;
8217
+ error?: any;
8218
+ }, {
8219
+ message: string;
8220
+ error?: any;
8221
+ }>;
8222
+ 404: z.ZodObject<{
8223
+ message: z.ZodString;
8224
+ error: z.ZodAny;
8225
+ }, "strip", z.ZodTypeAny, {
8226
+ message: string;
8227
+ error?: any;
8228
+ }, {
8229
+ message: string;
8230
+ error?: any;
8231
+ }>;
8232
+ 422: z.ZodObject<{
8233
+ message: z.ZodString;
8234
+ error: z.ZodAny;
8235
+ }, "strip", z.ZodTypeAny, {
8236
+ message: string;
8237
+ error?: any;
8238
+ }, {
8239
+ message: string;
8240
+ error?: any;
8241
+ }>;
8242
+ };
8243
+ path: "contact/check/email";
8244
+ headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8245
+ 'x-tenant': z.ZodString;
8246
+ authorization: z.ZodString;
8247
+ 'x-code': z.ZodOptional<z.ZodString>;
8248
+ 'x-client-timezone': z.ZodDefault<z.ZodString>;
8249
+ }, "strip", z.ZodTypeAny, {
8250
+ 'x-tenant': string;
8251
+ authorization: string;
8252
+ 'x-client-timezone': string;
8253
+ 'x-code'?: string | undefined;
8254
+ }, {
8255
+ 'x-tenant': string;
8256
+ authorization: string;
8257
+ 'x-code'?: string | undefined;
8258
+ 'x-client-timezone'?: string | undefined;
8259
+ }>>>;
8260
+ };
8261
+ addAttachments: {
8262
+ body: z.ZodObject<{
8263
+ attributeId: z.ZodString;
8264
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
8265
+ bucketName: z.ZodString;
8266
+ fileKey: z.ZodString;
8267
+ fileName: z.ZodString;
8268
+ fileSize: z.ZodNumber;
8269
+ }, "strip", z.ZodTypeAny, {
8270
+ fileName: string;
8271
+ fileKey: string;
8272
+ bucketName: string;
8273
+ fileSize: number;
8274
+ }, {
8275
+ fileName: string;
8276
+ fileKey: string;
8277
+ bucketName: string;
8278
+ fileSize: number;
8279
+ }>, "many">>;
8280
+ }, "strip", z.ZodTypeAny, {
8281
+ attributeId: string;
8282
+ attachments?: {
8283
+ fileName: string;
8284
+ fileKey: string;
8285
+ bucketName: string;
8286
+ fileSize: number;
8287
+ }[] | undefined;
8288
+ }, {
8289
+ attributeId: string;
8290
+ attachments?: {
8291
+ fileName: string;
8292
+ fileKey: string;
8293
+ bucketName: string;
8294
+ fileSize: number;
8295
+ }[] | undefined;
8296
+ }>;
8297
+ summary: " attachment information from pre-uploaded files in AWS S3 to contacts.";
8298
+ method: "POST";
8299
+ pathParams: z.ZodObject<{
8300
+ id: z.ZodString;
8301
+ }, "strip", z.ZodTypeAny, {
8302
+ id: string;
8303
+ }, {
8304
+ id: string;
8305
+ }>;
8306
+ responses: {
8307
+ 201: z.ZodObject<{
8308
+ requestId: z.ZodString;
8309
+ message: z.ZodObject<{
8310
+ id: z.ZodString;
8311
+ createdAt: z.ZodDate;
8312
+ updatedAt: z.ZodDate;
8313
+ deletedAt: z.ZodNullable<z.ZodDate>;
8314
+ textValue: z.ZodNullable<z.ZodString>;
8315
+ booleanValue: z.ZodNullable<z.ZodBoolean>;
8316
+ numberValue: z.ZodNullable<z.ZodNumber>;
8317
+ dateValue: z.ZodNullable<z.ZodDate>;
8318
+ entityId: z.ZodString;
8319
+ attributeId: z.ZodString;
8320
+ }, "strip", z.ZodTypeAny, {
8321
+ id: string;
8322
+ createdAt: Date;
8323
+ updatedAt: Date;
8324
+ deletedAt: Date | null;
8325
+ attributeId: string;
8326
+ textValue: string | null;
8327
+ booleanValue: boolean | null;
8328
+ numberValue: number | null;
8329
+ dateValue: Date | null;
8330
+ entityId: string;
8331
+ }, {
8332
+ id: string;
8333
+ createdAt: Date;
8334
+ updatedAt: Date;
8335
+ deletedAt: Date | null;
8336
+ attributeId: string;
8337
+ textValue: string | null;
8338
+ booleanValue: boolean | null;
8339
+ numberValue: number | null;
8340
+ dateValue: Date | null;
8341
+ entityId: string;
8342
+ }>;
8343
+ }, "strip", z.ZodTypeAny, {
8344
+ message: {
8165
8345
  id: string;
8166
- channel: string | null;
8167
- address: string | null;
8168
- name: string;
8169
8346
  createdAt: Date;
8170
8347
  updatedAt: Date;
8171
8348
  deletedAt: Date | null;
8172
- customFields: {
8173
- id: string;
8174
- createdAt: Date;
8175
- updatedAt: Date;
8176
- deletedAt: Date | null;
8177
- attribute: {
8178
- type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
8179
- id: string;
8180
- position: number;
8181
- createdAt: Date;
8182
- updatedAt: Date;
8183
- deletedAt: Date | null;
8184
- isDefault: boolean;
8185
- systemName: string;
8186
- displayName: string;
8187
- isArchived: boolean;
8188
- isRequired: boolean;
8189
- isUnique: boolean;
8190
- };
8191
- textValue: string | null;
8192
- booleanValue: boolean | null;
8193
- numberValue: number | null;
8194
- dateValue: Date | null;
8195
- uploads: {
8196
- id: string;
8197
- createdAt: Date;
8198
- updatedAt: Date;
8199
- deletedAt: Date | null;
8200
- customFieldId: string;
8201
- upload: {
8202
- id: string;
8203
- createdAt: Date;
8204
- updatedAt: Date;
8205
- deletedAt: Date | null;
8206
- fileName: string;
8207
- fileKey: string;
8208
- bucketName: string;
8209
- fileSize: number;
8210
- };
8211
- }[];
8212
- }[];
8213
- notes: string | null;
8214
- contactProfile: string | null;
8215
- socialProfileUrl: string | null;
8216
- tags: {
8217
- id: string;
8218
- name: string;
8219
- createdAt: Date;
8220
- updatedAt: Date;
8221
- deletedAt: Date | null;
8222
- }[];
8223
- company: {
8224
- id: string;
8225
- createdAt: Date;
8226
- updatedAt: Date;
8227
- deletedAt: Date | null;
8228
- address?: string | null | undefined;
8229
- name?: string | undefined;
8230
- phone?: string | null | undefined;
8231
- industry?: string | null | undefined;
8232
- } | null;
8233
- contactEmails: {
8234
- id: string;
8235
- isPrimary: boolean;
8236
- email: string;
8237
- createdAt: Date;
8238
- updatedAt: Date;
8239
- deletedAt: Date | null;
8240
- }[];
8241
- contactPhones: {
8242
- id: string;
8243
- isPrimary: boolean;
8244
- createdAt: Date;
8245
- updatedAt: Date;
8246
- deletedAt: Date | null;
8247
- phone: string;
8248
- }[];
8249
- activityLogs?: {
8250
- id: string;
8251
- description: string;
8252
- createdAt: Date;
8253
- updatedAt: Date;
8254
- deletedAt: Date | null;
8255
- entityId: string;
8256
- entityType: {
8257
- id: string;
8258
- description: string | null;
8259
- createdAt: Date;
8260
- updatedAt: Date;
8261
- deletedAt: Date | null;
8262
- entity: string;
8263
- };
8264
- }[] | undefined;
8349
+ attributeId: string;
8350
+ textValue: string | null;
8351
+ booleanValue: boolean | null;
8352
+ numberValue: number | null;
8353
+ dateValue: Date | null;
8354
+ entityId: string;
8265
8355
  };
8266
8356
  requestId: string;
8267
8357
  }, {
8268
- data: {
8358
+ message: {
8269
8359
  id: string;
8270
- channel: string | null;
8271
- address: string | null;
8272
- name: string;
8273
8360
  createdAt: Date;
8274
8361
  updatedAt: Date;
8275
8362
  deletedAt: Date | null;
8276
- customFields: {
8277
- id: string;
8278
- createdAt: Date;
8279
- updatedAt: Date;
8280
- deletedAt: Date | null;
8281
- attribute: {
8282
- type: "link" | "attachment" | "select" | "textarea" | "text" | "date";
8283
- id: string;
8284
- position: number;
8285
- createdAt: Date;
8286
- updatedAt: Date;
8287
- deletedAt: Date | null;
8288
- isDefault: boolean;
8289
- systemName: string;
8290
- displayName: string;
8291
- isArchived: boolean;
8292
- isRequired: boolean;
8293
- isUnique: boolean;
8294
- };
8295
- textValue: string | null;
8296
- booleanValue: boolean | null;
8297
- numberValue: number | null;
8298
- dateValue: Date | null;
8299
- uploads: {
8300
- id: string;
8301
- createdAt: Date;
8302
- updatedAt: Date;
8303
- deletedAt: Date | null;
8304
- customFieldId: string;
8305
- upload: {
8306
- id: string;
8307
- createdAt: Date;
8308
- updatedAt: Date;
8309
- deletedAt: Date | null;
8310
- fileName: string;
8311
- fileKey: string;
8312
- bucketName: string;
8313
- fileSize: number;
8314
- };
8315
- }[];
8316
- }[];
8317
- notes: string | null;
8318
- contactProfile: string | null;
8319
- socialProfileUrl: string | null;
8320
- tags: {
8321
- id: string;
8322
- name: string;
8323
- createdAt: Date;
8324
- updatedAt: Date;
8325
- deletedAt: Date | null;
8326
- }[];
8327
- company: {
8328
- id: string;
8329
- createdAt: Date;
8330
- updatedAt: Date;
8331
- deletedAt: Date | null;
8332
- address?: string | null | undefined;
8333
- name?: string | undefined;
8334
- phone?: string | null | undefined;
8335
- industry?: string | null | undefined;
8336
- } | null;
8337
- contactEmails: {
8338
- id: string;
8339
- isPrimary: boolean;
8340
- email: string;
8341
- createdAt: Date;
8342
- updatedAt: Date;
8343
- deletedAt: Date | null;
8344
- }[];
8345
- contactPhones: {
8346
- id: string;
8347
- isPrimary: boolean;
8348
- createdAt: Date;
8349
- updatedAt: Date;
8350
- deletedAt: Date | null;
8351
- phone: string;
8352
- }[];
8353
- activityLogs?: {
8354
- id: string;
8355
- description: string;
8356
- createdAt: Date;
8357
- updatedAt: Date;
8358
- deletedAt: Date | null;
8359
- entityId: string;
8360
- entityType: {
8361
- id: string;
8362
- description: string | null;
8363
- createdAt: Date;
8364
- updatedAt: Date;
8365
- deletedAt: Date | null;
8366
- entity: string;
8367
- };
8368
- }[] | undefined;
8363
+ attributeId: string;
8364
+ textValue: string | null;
8365
+ booleanValue: boolean | null;
8366
+ numberValue: number | null;
8367
+ dateValue: Date | null;
8368
+ entityId: string;
8369
8369
  };
8370
8370
  requestId: string;
8371
8371
  }>;
@@ -8421,7 +8421,7 @@ export declare const contactContract: {
8421
8421
  error?: any;
8422
8422
  }>;
8423
8423
  };
8424
- path: "contact/:id";
8424
+ path: "contact/:id/attachments";
8425
8425
  headers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8426
8426
  'x-tenant': z.ZodString;
8427
8427
  authorization: z.ZodString;