@kl1/contracts 1.0.70 → 1.0.72

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 (50) hide show
  1. package/dist/index.js +13 -19
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +13 -19
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/chat/index.d.ts +1110 -2579
  6. package/dist/src/chat/index.d.ts.map +1 -1
  7. package/dist/src/chat/schema.d.ts +222 -519
  8. package/dist/src/chat/schema.d.ts.map +1 -1
  9. package/dist/src/chat/validation.d.ts +228 -482
  10. package/dist/src/chat/validation.d.ts.map +1 -1
  11. package/dist/src/comment/index.d.ts +222 -547
  12. package/dist/src/comment/index.d.ts.map +1 -1
  13. package/dist/src/comment/schema.d.ts +66 -165
  14. package/dist/src/comment/schema.d.ts.map +1 -1
  15. package/dist/src/contact/index.d.ts +1496 -1003
  16. package/dist/src/contact/index.d.ts.map +1 -1
  17. package/dist/src/contact/schema.d.ts +72 -200
  18. package/dist/src/contact/schema.d.ts.map +1 -1
  19. package/dist/src/contact/validation.d.ts +317 -806
  20. package/dist/src/contact/validation.d.ts.map +1 -1
  21. package/dist/src/contract.d.ts +6029 -8827
  22. package/dist/src/contract.d.ts.map +1 -1
  23. package/dist/src/custom-field-upload/schema.d.ts +2 -2
  24. package/dist/src/cx-log/index.d.ts +234 -573
  25. package/dist/src/cx-log/index.d.ts.map +1 -1
  26. package/dist/src/cx-log/schema.d.ts +198 -495
  27. package/dist/src/cx-log/schema.d.ts.map +1 -1
  28. package/dist/src/instagram/index.d.ts +138 -265
  29. package/dist/src/instagram/index.d.ts.map +1 -1
  30. package/dist/src/line/index.d.ts +138 -265
  31. package/dist/src/line/index.d.ts.map +1 -1
  32. package/dist/src/mail/mail-contract.d.ts +1330 -1330
  33. package/dist/src/mail/message-contract.d.ts +56 -56
  34. package/dist/src/mail/room-contract.d.ts +1258 -1258
  35. package/dist/src/mail/schemas/message.schema.d.ts +33 -33
  36. package/dist/src/mail/schemas/room-validation.schema.d.ts +420 -420
  37. package/dist/src/mail/schemas/room.schema.d.ts +284 -284
  38. package/dist/src/messenger/index.d.ts +138 -265
  39. package/dist/src/messenger/index.d.ts.map +1 -1
  40. package/dist/src/telephony-cdr/index.d.ts +198 -495
  41. package/dist/src/telephony-cdr/index.d.ts.map +1 -1
  42. package/dist/src/telephony-cdr/schema.d.ts +54 -139
  43. package/dist/src/telephony-cdr/schema.d.ts.map +1 -1
  44. package/dist/src/ticket/index.d.ts +338 -818
  45. package/dist/src/ticket/index.d.ts.map +1 -1
  46. package/dist/src/ticket/schema.d.ts +54 -139
  47. package/dist/src/ticket/schema.d.ts.map +1 -1
  48. package/dist/src/viber/index.d.ts +138 -265
  49. package/dist/src/viber/index.d.ts.map +1 -1
  50. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -882,12 +882,7 @@ var ContactCustomFieldSchema = import_zod21.default.object({
882
882
  numberValue: import_zod21.default.number().nullable(),
883
883
  dateValue: import_zod21.default.date().nullable(),
884
884
  attribute: AttributeSchema.omit({ options: true, group: true }),
885
- uploads: import_zod21.default.array(
886
- DefaultEntitySchema.extend({
887
- customFieldId: import_zod21.default.string(),
888
- upload: UploadSchema
889
- })
890
- )
885
+ uploads: import_zod21.default.array(UploadSchema)
891
886
  });
892
887
  var ContactEntityTypesSchema = import_zod21.default.object({
893
888
  id: import_zod21.default.string().uuid(),
@@ -2559,15 +2554,17 @@ var ContactContractValidationSchema = {
2559
2554
  },
2560
2555
  addAttachments: {
2561
2556
  request: import_zod39.default.object({
2557
+ contactId: import_zod39.default.string(),
2562
2558
  attributeId: import_zod39.default.string().uuid(),
2563
- attachments: import_zod39.default.array(
2559
+ contactAttachmentRecords: import_zod39.default.array(
2564
2560
  import_zod39.default.object({
2565
2561
  bucketName: import_zod39.default.string(),
2566
2562
  fileKey: import_zod39.default.string(),
2567
2563
  fileName: import_zod39.default.string(),
2568
- fileSize: import_zod39.default.coerce.number()
2564
+ fileSize: import_zod39.default.coerce.number(),
2565
+ url: import_zod39.default.string()
2569
2566
  })
2570
- ).optional()
2567
+ )
2571
2568
  }),
2572
2569
  response: CustomFieldSchema
2573
2570
  }
@@ -2579,9 +2576,10 @@ var contactContract = (0, import_core10.initContract)().router(
2579
2576
  create: {
2580
2577
  method: "POST",
2581
2578
  path: "",
2579
+ body: ContactContractValidationSchema.create.request,
2582
2580
  responses: {
2583
2581
  201: DefaultSuccessResponseSchema.extend({
2584
- message: ContactContractValidationSchema.create.response
2582
+ data: ContactSchema
2585
2583
  }),
2586
2584
  400: import_zod40.default.object({
2587
2585
  message: import_zod40.default.string()
@@ -2596,7 +2594,6 @@ var contactContract = (0, import_core10.initContract)().router(
2596
2594
  404: DefaultNotFoundSchema,
2597
2595
  422: DefaultUnprocessibleSchema
2598
2596
  },
2599
- body: ContactContractValidationSchema.create.request,
2600
2597
  summary: "Create a new contact"
2601
2598
  },
2602
2599
  getAll: {
@@ -2808,15 +2805,13 @@ var contactContract = (0, import_core10.initContract)().router(
2808
2805
  body: ContactContractValidationSchema.checkContactEmail.request,
2809
2806
  summary: "Check whether a contact owns a email"
2810
2807
  },
2811
- addAttachments: {
2808
+ createContactAttachmentRecords: {
2812
2809
  method: "POST",
2813
- path: "/:id/attachments",
2814
- pathParams: import_zod40.default.object({
2815
- id: import_zod40.default.string().uuid()
2816
- }),
2810
+ path: "/attachments",
2811
+ body: ContactContractValidationSchema.addAttachments.request,
2817
2812
  responses: {
2818
2813
  201: DefaultSuccessResponseSchema.extend({
2819
- message: ContactContractValidationSchema.addAttachments.response
2814
+ message: ContactCustomFieldSchema
2820
2815
  }),
2821
2816
  400: import_zod40.default.object({
2822
2817
  message: import_zod40.default.string()
@@ -2831,8 +2826,7 @@ var contactContract = (0, import_core10.initContract)().router(
2831
2826
  404: DefaultNotFoundSchema,
2832
2827
  422: DefaultUnprocessibleSchema
2833
2828
  },
2834
- body: ContactContractValidationSchema.addAttachments.request,
2835
- summary: " attachment information from pre-uploaded files in AWS S3 to contacts."
2829
+ summary: "Create a new contact attachment"
2836
2830
  },
2837
2831
  getById: {
2838
2832
  method: "GET",