@kl1/contracts 1.4.72 → 1.4.75

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.mjs CHANGED
@@ -8588,7 +8588,7 @@ var ContactContractValidationSchema2 = {
8588
8588
  var SendMessageSchema2 = z109.object({
8589
8589
  channelId: z109.string(),
8590
8590
  message: z109.string(),
8591
- contactId: z109.string().optional(),
8591
+ contactId: z109.union([z109.string(), z109.array(z109.string())]).optional(),
8592
8592
  platformUserId: z109.string().optional()
8593
8593
  });
8594
8594
  var GetCxLogsSchema = z109.object({
@@ -9670,7 +9670,35 @@ var platformKlinkChatContract = initContract45().router({
9670
9670
 
9671
9671
  // src/general-setting/index.ts
9672
9672
  import { initContract as initContract46 } from "@ts-rest/core";
9673
- import z119 from "zod";
9673
+ import z121 from "zod";
9674
+
9675
+ // src/general-setting/validation.ts
9676
+ import { z as z119 } from "zod";
9677
+ var CreateUpdateAiTranslateRequestSetting = z119.object({
9678
+ languageList: z119.array(
9679
+ z119.object({
9680
+ languageName: z119.string(),
9681
+ languageCode: z119.string()
9682
+ })
9683
+ ).nullable(),
9684
+ aiTranslationInstructions: z119.string().nullable(),
9685
+ displayAiTranslationNotice: z119.string().nullable()
9686
+ });
9687
+
9688
+ // src/general-setting/schema.ts
9689
+ import z120 from "zod";
9690
+ var AiTranslateSettingSchema = z120.object({
9691
+ languageList: z120.array(
9692
+ z120.object({
9693
+ languageName: z120.string(),
9694
+ languageCode: z120.string()
9695
+ })
9696
+ ).nullable(),
9697
+ aiTranslationInstructions: z120.string().nullable(),
9698
+ displayAiTranslationNotice: z120.string().nullable()
9699
+ });
9700
+
9701
+ // src/general-setting/index.ts
9674
9702
  var generalSettingContract = initContract46().router(
9675
9703
  {
9676
9704
  autoOpenedContactWidgetId: {
@@ -9678,23 +9706,62 @@ var generalSettingContract = initContract46().router(
9678
9706
  method: "GET",
9679
9707
  path: "/auto-opened-contact-widget-id",
9680
9708
  responses: {
9681
- 200: z119.object({
9682
- autoOpenedContactWidgetId: z119.string().nullable()
9709
+ 200: z121.object({
9710
+ autoOpenedContactWidgetId: z121.string().nullable()
9683
9711
  })
9684
9712
  }
9685
9713
  },
9686
9714
  updateAutoOpenedContactWidgetId: {
9687
9715
  method: "PATCH",
9688
9716
  path: "/auto-opened-contact-widget-id",
9689
- body: z119.object({
9690
- autoOpenedContactWidgetId: z119.string().nullable()
9717
+ body: z121.object({
9718
+ autoOpenedContactWidgetId: z121.string().nullable()
9691
9719
  }),
9692
9720
  responses: {
9693
- 200: z119.object({
9694
- autoOpenedContactWidgetId: z119.string().nullable()
9721
+ 200: z121.object({
9722
+ autoOpenedContactWidgetId: z121.string().nullable()
9695
9723
  })
9696
9724
  }
9697
9725
  }
9726
+ },
9727
+ aiTranslateSetting: {
9728
+ getAiTranslateSetting: {
9729
+ method: "GET",
9730
+ path: "/ai-translate-setting",
9731
+ responses: {
9732
+ 200: z121.object({
9733
+ requestId: z121.string().uuid(),
9734
+ aiTranslateSetting: AiTranslateSettingSchema
9735
+ }),
9736
+ 400: z121.object({
9737
+ message: z121.string()
9738
+ }),
9739
+ 401: DefaultUnauthorizedSchema,
9740
+ 404: DefaultNotFoundSchema,
9741
+ 422: DefaultUnprocessibleSchema,
9742
+ 500: DefaultErrorResponseSchema
9743
+ },
9744
+ summary: "Get ai translate setting"
9745
+ },
9746
+ updateAiTranslateSetting: {
9747
+ method: "PATCH",
9748
+ path: "/ai-translate-setting",
9749
+ body: CreateUpdateAiTranslateRequestSetting,
9750
+ responses: {
9751
+ 200: z121.object({
9752
+ requestId: z121.string().uuid(),
9753
+ aiTranslateSetting: AiTranslateSettingSchema
9754
+ }),
9755
+ 400: z121.object({
9756
+ message: z121.string()
9757
+ }),
9758
+ 401: DefaultUnauthorizedSchema,
9759
+ 404: DefaultNotFoundSchema,
9760
+ 422: DefaultUnprocessibleSchema,
9761
+ 500: DefaultErrorResponseSchema
9762
+ },
9763
+ summary: "Update ai translate setting"
9764
+ }
9698
9765
  }
9699
9766
  },
9700
9767
  {
@@ -9704,51 +9771,51 @@ var generalSettingContract = initContract46().router(
9704
9771
 
9705
9772
  // src/automation-queue/index.ts
9706
9773
  import { initContract as initContract47 } from "@ts-rest/core";
9707
- import { z as z122 } from "zod";
9774
+ import { z as z124 } from "zod";
9708
9775
 
9709
9776
  // src/automation-queue/validation.ts
9710
- import { z as z120 } from "zod";
9711
- var QueueDistributionStrategySchema = z120.union([
9712
- z120.literal("round-robin"),
9713
- z120.literal("fewest-assignments"),
9714
- z120.literal("random"),
9715
- z120.literal("notify-all")
9777
+ import { z as z122 } from "zod";
9778
+ var QueueDistributionStrategySchema = z122.union([
9779
+ z122.literal("round-robin"),
9780
+ z122.literal("fewest-assignments"),
9781
+ z122.literal("random"),
9782
+ z122.literal("notify-all")
9716
9783
  ]);
9717
- var CreateAutomationQueueSchema = z120.object({
9718
- emoji: z120.string().emoji(),
9719
- name: z120.string(),
9720
- description: z120.string().nullable(),
9721
- managerIds: z120.array(z120.string().uuid()).min(1),
9722
- agentIds: z120.array(z120.string().uuid()).min(1),
9784
+ var CreateAutomationQueueSchema = z122.object({
9785
+ emoji: z122.string().emoji(),
9786
+ name: z122.string(),
9787
+ description: z122.string().nullable(),
9788
+ managerIds: z122.array(z122.string().uuid()).min(1),
9789
+ agentIds: z122.array(z122.string().uuid()).min(1),
9723
9790
  distributionStrategy: QueueDistributionStrategySchema.nullable(),
9724
- maximumAssignPerAgent: z120.number().positive().nullable(),
9725
- autoAssign: z120.boolean().nullable()
9791
+ maximumAssignPerAgent: z122.number().positive().nullable(),
9792
+ autoAssign: z122.boolean().nullable()
9726
9793
  // ringTimeOut: z.number().positive(),
9727
9794
  // retryInterval: z.number().positive(),
9728
9795
  // queueTimeOut: z.number().positive(),
9729
9796
  // isAssignmentDeniable: z.coerce.boolean(),
9730
9797
  });
9731
9798
  var UpdateAutomationQueueSchema = CreateAutomationQueueSchema;
9732
- var CheckHasAssignedRoomSchema = z120.object({
9733
- userId: z120.string().uuid().optional(),
9734
- queueId: z120.string().uuid().optional()
9799
+ var CheckHasAssignedRoomSchema = z122.object({
9800
+ userId: z122.string().uuid().optional(),
9801
+ queueId: z122.string().uuid().optional()
9735
9802
  });
9736
9803
 
9737
9804
  // src/automation-queue/schema.ts
9738
- import { z as z121 } from "zod";
9805
+ import { z as z123 } from "zod";
9739
9806
  var AutomationQueueSchema = DefaultEntitySchema.extend({
9740
- emoji: z121.string(),
9741
- name: z121.string(),
9742
- description: z121.string().nullable(),
9807
+ emoji: z123.string(),
9808
+ name: z123.string(),
9809
+ description: z123.string().nullable(),
9743
9810
  distributionStrategy: QueueDistributionStrategySchema,
9744
- maximumAssignPerAgent: z121.number().positive(),
9811
+ maximumAssignPerAgent: z123.number().positive(),
9745
9812
  // ringTimeOut: z.number(),
9746
9813
  // retryInterval: z.number(),
9747
9814
  // queueTimeOut: z.number(),
9748
9815
  // isAssignmentDeniable: z.boolean(),
9749
- autoAssign: z121.boolean(),
9750
- managers: z121.array(UserSchema),
9751
- agents: z121.array(UserSchema)
9816
+ autoAssign: z123.boolean(),
9817
+ managers: z123.array(UserSchema),
9818
+ agents: z123.array(UserSchema)
9752
9819
  });
9753
9820
 
9754
9821
  // src/automation-queue/index.ts
@@ -9767,8 +9834,8 @@ var automationQueueContract = initContract47().router(
9767
9834
  duplicateAutomationQueue: {
9768
9835
  method: "POST",
9769
9836
  path: "/:id/duplicate",
9770
- pathParams: z122.object({
9771
- id: z122.string().uuid()
9837
+ pathParams: z124.object({
9838
+ id: z124.string().uuid()
9772
9839
  }),
9773
9840
  body: null,
9774
9841
  responses: {
@@ -9780,21 +9847,21 @@ var automationQueueContract = initContract47().router(
9780
9847
  getAutomationQueues: {
9781
9848
  method: "GET",
9782
9849
  path: "",
9783
- query: z122.object({
9784
- userId: z122.string().uuid().optional(),
9785
- withRelations: z122.coerce.boolean().default(true).optional()
9850
+ query: z124.object({
9851
+ userId: z124.string().uuid().optional(),
9852
+ withRelations: z124.coerce.boolean().default(true).optional()
9786
9853
  }).optional(),
9787
9854
  responses: {
9788
9855
  200: DefaultSuccessResponseSchema.extend({
9789
- data: z122.array(AutomationQueueSchema)
9856
+ data: z124.array(AutomationQueueSchema)
9790
9857
  })
9791
9858
  }
9792
9859
  },
9793
9860
  getAutomationQueueById: {
9794
9861
  method: "GET",
9795
9862
  path: "/:id",
9796
- pathParams: z122.object({
9797
- id: z122.string().uuid()
9863
+ pathParams: z124.object({
9864
+ id: z124.string().uuid()
9798
9865
  }),
9799
9866
  responses: {
9800
9867
  200: DefaultSuccessResponseSchema.extend({
@@ -9805,8 +9872,8 @@ var automationQueueContract = initContract47().router(
9805
9872
  updateAutomationQueue: {
9806
9873
  method: "PATCH",
9807
9874
  path: "/:id",
9808
- pathParams: z122.object({
9809
- id: z122.string().uuid()
9875
+ pathParams: z124.object({
9876
+ id: z124.string().uuid()
9810
9877
  }),
9811
9878
  body: UpdateAutomationQueueSchema,
9812
9879
  responses: {
@@ -9818,13 +9885,13 @@ var automationQueueContract = initContract47().router(
9818
9885
  deleteAutomationQueue: {
9819
9886
  method: "DELETE",
9820
9887
  path: "/:id",
9821
- pathParams: z122.object({
9822
- id: z122.string().uuid()
9888
+ pathParams: z124.object({
9889
+ id: z124.string().uuid()
9823
9890
  }),
9824
9891
  body: null,
9825
9892
  responses: {
9826
9893
  200: DefaultSuccessResponseSchema.extend({
9827
- message: z122.string()
9894
+ message: z124.string()
9828
9895
  })
9829
9896
  }
9830
9897
  },
@@ -9834,8 +9901,8 @@ var automationQueueContract = initContract47().router(
9834
9901
  body: CheckHasAssignedRoomSchema,
9835
9902
  responses: {
9836
9903
  200: DefaultSuccessResponseSchema.extend({
9837
- data: z122.object({
9838
- hasAssignedRoom: z122.boolean()
9904
+ data: z124.object({
9905
+ hasAssignedRoom: z124.boolean()
9839
9906
  })
9840
9907
  })
9841
9908
  }
@@ -9852,276 +9919,276 @@ import { initContract as initContract52 } from "@ts-rest/core";
9852
9919
 
9853
9920
  // src/mail/room-contract.ts
9854
9921
  import { initContract as initContract48 } from "@ts-rest/core";
9855
- import z127 from "zod";
9922
+ import z129 from "zod";
9856
9923
 
9857
9924
  // src/mail/schemas/room.schema.ts
9858
- import z125 from "zod";
9925
+ import z127 from "zod";
9859
9926
 
9860
9927
  // src/mail/schemas/account.schema.ts
9861
- import z123 from "zod";
9862
- var MailServerSchema = z123.object({
9863
- id: z123.string(),
9864
- createdAt: z123.date(),
9865
- updatedAt: z123.date(),
9866
- deletedAt: z123.date().nullable(),
9867
- name: z123.string(),
9868
- smtpHost: z123.string(),
9869
- smtpPort: z123.number(),
9870
- smtpTlsPort: z123.number(),
9871
- useTlsForSmtp: z123.boolean(),
9872
- imapHost: z123.string(),
9873
- imapPort: z123.number(),
9874
- imapTlsPort: z123.number(),
9875
- useTlsForImap: z123.boolean()
9876
- });
9877
- var MailAccountSchema = z123.object({
9878
- id: z123.string(),
9879
- name: z123.string(),
9880
- address: z123.string(),
9881
- signature: z123.string().nullable(),
9882
- accountId: z123.string(),
9883
- mailServerId: z123.string(),
9928
+ import z125 from "zod";
9929
+ var MailServerSchema = z125.object({
9930
+ id: z125.string(),
9931
+ createdAt: z125.date(),
9932
+ updatedAt: z125.date(),
9933
+ deletedAt: z125.date().nullable(),
9934
+ name: z125.string(),
9935
+ smtpHost: z125.string(),
9936
+ smtpPort: z125.number(),
9937
+ smtpTlsPort: z125.number(),
9938
+ useTlsForSmtp: z125.boolean(),
9939
+ imapHost: z125.string(),
9940
+ imapPort: z125.number(),
9941
+ imapTlsPort: z125.number(),
9942
+ useTlsForImap: z125.boolean()
9943
+ });
9944
+ var MailAccountSchema = z125.object({
9945
+ id: z125.string(),
9946
+ name: z125.string(),
9947
+ address: z125.string(),
9948
+ signature: z125.string().nullable(),
9949
+ accountId: z125.string(),
9950
+ mailServerId: z125.string(),
9884
9951
  mailServer: MailServerSchema,
9885
- state: z123.union([
9886
- z123.literal("init"),
9887
- z123.literal("syncing"),
9888
- z123.literal("connecting"),
9889
- z123.literal("connected"),
9890
- z123.literal("disconnected"),
9891
- z123.literal("authenticationError"),
9892
- z123.literal("connectError"),
9893
- z123.literal("unset")
9952
+ state: z125.union([
9953
+ z125.literal("init"),
9954
+ z125.literal("syncing"),
9955
+ z125.literal("connecting"),
9956
+ z125.literal("connected"),
9957
+ z125.literal("disconnected"),
9958
+ z125.literal("authenticationError"),
9959
+ z125.literal("connectError"),
9960
+ z125.literal("unset")
9894
9961
  ]),
9895
- createdAt: z123.date(),
9896
- updatedAt: z123.date(),
9897
- deletedAt: z123.date().nullable()
9962
+ createdAt: z125.date(),
9963
+ updatedAt: z125.date(),
9964
+ deletedAt: z125.date().nullable()
9898
9965
  });
9899
- var OAuth2AppSchema = z123.object({
9900
- id: z123.string(),
9901
- name: z123.string(),
9902
- description: z123.string(),
9903
- title: z123.string(),
9904
- provider: z123.string(),
9905
- enabled: z123.boolean(),
9906
- legacy: z123.boolean(),
9907
- created: z123.string(),
9908
- updated: z123.string(),
9909
- includeInListing: z123.boolean(),
9910
- clientId: z123.string(),
9911
- clientSecret: z123.string(),
9912
- authority: z123.string(),
9913
- redirectUrl: z123.string(),
9914
- serviceClient: z123.string(),
9915
- googleProjectId: z123.string(),
9916
- serviceClientEmail: z123.string(),
9917
- serviceKey: z123.string()
9966
+ var OAuth2AppSchema = z125.object({
9967
+ id: z125.string(),
9968
+ name: z125.string(),
9969
+ description: z125.string(),
9970
+ title: z125.string(),
9971
+ provider: z125.string(),
9972
+ enabled: z125.boolean(),
9973
+ legacy: z125.boolean(),
9974
+ created: z125.string(),
9975
+ updated: z125.string(),
9976
+ includeInListing: z125.boolean(),
9977
+ clientId: z125.string(),
9978
+ clientSecret: z125.string(),
9979
+ authority: z125.string(),
9980
+ redirectUrl: z125.string(),
9981
+ serviceClient: z125.string(),
9982
+ googleProjectId: z125.string(),
9983
+ serviceClientEmail: z125.string(),
9984
+ serviceKey: z125.string()
9918
9985
  });
9919
9986
 
9920
9987
  // src/mail/schemas/message.schema.ts
9921
- import z124 from "zod";
9922
- var AttachmentSchema = z124.object({
9923
- id: z124.string(),
9924
- createdAt: z124.date(),
9925
- updatedAt: z124.date(),
9926
- deletedAt: z124.nullable(z124.date()),
9927
- roomId: z124.string(),
9928
- messageId: z124.string(),
9929
- fileName: z124.string(),
9930
- fileType: z124.string(),
9931
- emailEngineAttachmentId: z124.string(),
9932
- uploadId: z124.string(),
9933
- upload: z124.object({
9934
- id: z124.string(),
9935
- createdAt: z124.date(),
9936
- updatedAt: z124.date(),
9937
- deletedAt: z124.nullable(z124.date()),
9938
- bucketName: z124.string(),
9939
- fileName: z124.string(),
9940
- fileKey: z124.string(),
9941
- fileSize: z124.number(),
9942
- fileUrl: z124.string(),
9943
- extensionName: z124.string()
9988
+ import z126 from "zod";
9989
+ var AttachmentSchema = z126.object({
9990
+ id: z126.string(),
9991
+ createdAt: z126.date(),
9992
+ updatedAt: z126.date(),
9993
+ deletedAt: z126.nullable(z126.date()),
9994
+ roomId: z126.string(),
9995
+ messageId: z126.string(),
9996
+ fileName: z126.string(),
9997
+ fileType: z126.string(),
9998
+ emailEngineAttachmentId: z126.string(),
9999
+ uploadId: z126.string(),
10000
+ upload: z126.object({
10001
+ id: z126.string(),
10002
+ createdAt: z126.date(),
10003
+ updatedAt: z126.date(),
10004
+ deletedAt: z126.nullable(z126.date()),
10005
+ bucketName: z126.string(),
10006
+ fileName: z126.string(),
10007
+ fileKey: z126.string(),
10008
+ fileSize: z126.number(),
10009
+ fileUrl: z126.string(),
10010
+ extensionName: z126.string()
9944
10011
  })
9945
10012
  });
9946
- var MessageSchema2 = z124.object({
9947
- id: z124.string(),
9948
- createdAt: z124.date(),
9949
- updatedAt: z124.date(),
9950
- deletedAt: z124.nullable(z124.date()),
9951
- roomId: z124.string(),
9952
- subject: z124.string(),
9953
- textPlain: z124.string(),
9954
- textHtml: z124.string(),
9955
- textId: z124.string(),
9956
- emailEngineEmailId: z124.string(),
9957
- emailEngineMessageId: z124.string(),
9958
- emailEngineReplyTo: z124.nullable(z124.string()),
9959
- direction: z124.string(),
9960
- date: z124.date(),
9961
- action: z124.string(),
9962
- unseen: z124.boolean(),
9963
- sendAt: z124.date(),
9964
- starred: z124.boolean(),
9965
- seemsLikeNew: z124.boolean(),
9966
- from: z124.array(MailParticipant),
9967
- to: z124.array(MailParticipant),
9968
- cc: z124.array(MailParticipant),
9969
- bcc: z124.array(MailParticipant),
9970
- attachments: z124.array(AttachmentSchema)
10013
+ var MessageSchema2 = z126.object({
10014
+ id: z126.string(),
10015
+ createdAt: z126.date(),
10016
+ updatedAt: z126.date(),
10017
+ deletedAt: z126.nullable(z126.date()),
10018
+ roomId: z126.string(),
10019
+ subject: z126.string(),
10020
+ textPlain: z126.string(),
10021
+ textHtml: z126.string(),
10022
+ textId: z126.string(),
10023
+ emailEngineEmailId: z126.string(),
10024
+ emailEngineMessageId: z126.string(),
10025
+ emailEngineReplyTo: z126.nullable(z126.string()),
10026
+ direction: z126.string(),
10027
+ date: z126.date(),
10028
+ action: z126.string(),
10029
+ unseen: z126.boolean(),
10030
+ sendAt: z126.date(),
10031
+ starred: z126.boolean(),
10032
+ seemsLikeNew: z126.boolean(),
10033
+ from: z126.array(MailParticipant),
10034
+ to: z126.array(MailParticipant),
10035
+ cc: z126.array(MailParticipant),
10036
+ bcc: z126.array(MailParticipant),
10037
+ attachments: z126.array(AttachmentSchema)
9971
10038
  });
9972
10039
 
9973
10040
  // src/mail/schemas/room.schema.ts
9974
- var ContactSchema3 = z125.object({
9975
- id: z125.string().uuid(),
9976
- createdAt: z125.date(),
9977
- updatedAt: z125.date(),
9978
- deletedAt: z125.date().nullable(),
9979
- name: z125.string(),
9980
- address: z125.string().nullable(),
9981
- channel: z125.string().nullable(),
9982
- notes: z125.string().nullable(),
9983
- contactProfile: z125.string().nullable(),
9984
- socialProfileUrl: z125.string().nullable()
9985
- });
9986
- var MailUserSchema = z125.object({
9987
- id: z125.string(),
9988
- createdAt: z125.date(),
9989
- updatedAt: z125.date(),
9990
- deletedAt: z125.date().nullable(),
9991
- name: z125.string(),
9992
- address: z125.string(),
9993
- contactId: z125.string(),
10041
+ var ContactSchema3 = z127.object({
10042
+ id: z127.string().uuid(),
10043
+ createdAt: z127.date(),
10044
+ updatedAt: z127.date(),
10045
+ deletedAt: z127.date().nullable(),
10046
+ name: z127.string(),
10047
+ address: z127.string().nullable(),
10048
+ channel: z127.string().nullable(),
10049
+ notes: z127.string().nullable(),
10050
+ contactProfile: z127.string().nullable(),
10051
+ socialProfileUrl: z127.string().nullable()
10052
+ });
10053
+ var MailUserSchema = z127.object({
10054
+ id: z127.string(),
10055
+ createdAt: z127.date(),
10056
+ updatedAt: z127.date(),
10057
+ deletedAt: z127.date().nullable(),
10058
+ name: z127.string(),
10059
+ address: z127.string(),
10060
+ contactId: z127.string(),
9994
10061
  contact: ContactSchema3,
9995
- isNewContact: z125.boolean()
9996
- });
9997
- var MailParticipant = z125.object({
9998
- id: z125.string(),
9999
- createdAt: z125.date(),
10000
- updatedAt: z125.date(),
10001
- deletedAt: z125.date().nullable(),
10002
- roomId: z125.string(),
10003
- messageId: z125.string(),
10004
- mailUserId: z125.string(),
10062
+ isNewContact: z127.boolean()
10063
+ });
10064
+ var MailParticipant = z127.object({
10065
+ id: z127.string(),
10066
+ createdAt: z127.date(),
10067
+ updatedAt: z127.date(),
10068
+ deletedAt: z127.date().nullable(),
10069
+ roomId: z127.string(),
10070
+ messageId: z127.string(),
10071
+ mailUserId: z127.string(),
10005
10072
  mailUser: MailUserSchema
10006
10073
  });
10007
- var TagSchema2 = z125.object({
10008
- color: z125.string(),
10009
- id: z125.string(),
10010
- createdAt: z125.date(),
10011
- updatedAt: z125.date(),
10012
- deletedAt: z125.date().nullable(),
10013
- name: z125.string()
10014
- });
10015
- var UserModel = z125.object({
10016
- id: z125.string().uuid(),
10017
- createdAt: z125.date(),
10018
- updatedAt: z125.date(),
10019
- deletedAt: z125.date().nullable(),
10020
- name: z125.string(),
10021
- email: z125.string(),
10022
- address: z125.string().nullable(),
10023
- phone: z125.string().nullable(),
10024
- notificationCount: z125.number().nullable()
10025
- });
10026
- var ActivityLogModel = z125.object({
10027
- id: z125.string(),
10028
- createdAt: z125.date(),
10029
- updatedAt: z125.date(),
10030
- deletedAt: z125.nullable(z125.string()),
10031
- description: z125.string(),
10032
- actorId: z125.string(),
10033
- roomId: z125.string(),
10074
+ var TagSchema2 = z127.object({
10075
+ color: z127.string(),
10076
+ id: z127.string(),
10077
+ createdAt: z127.date(),
10078
+ updatedAt: z127.date(),
10079
+ deletedAt: z127.date().nullable(),
10080
+ name: z127.string()
10081
+ });
10082
+ var UserModel = z127.object({
10083
+ id: z127.string().uuid(),
10084
+ createdAt: z127.date(),
10085
+ updatedAt: z127.date(),
10086
+ deletedAt: z127.date().nullable(),
10087
+ name: z127.string(),
10088
+ email: z127.string(),
10089
+ address: z127.string().nullable(),
10090
+ phone: z127.string().nullable(),
10091
+ notificationCount: z127.number().nullable()
10092
+ });
10093
+ var ActivityLogModel = z127.object({
10094
+ id: z127.string(),
10095
+ createdAt: z127.date(),
10096
+ updatedAt: z127.date(),
10097
+ deletedAt: z127.nullable(z127.string()),
10098
+ description: z127.string(),
10099
+ actorId: z127.string(),
10100
+ roomId: z127.string(),
10034
10101
  actor: UserModel
10035
10102
  });
10036
- var MessagesAndLogsSchema = z125.array(
10037
- z125.union([MessageSchema2, ActivityLogModel])
10103
+ var MessagesAndLogsSchema = z127.array(
10104
+ z127.union([MessageSchema2, ActivityLogModel])
10038
10105
  );
10039
- var MailRoomSchema = z125.object({
10040
- id: z125.string(),
10041
- createdAt: z125.date(),
10042
- updatedAt: z125.date(),
10043
- deletedAt: z125.date().nullable(),
10044
- subject: z125.string(),
10045
- resolved: z125.boolean(),
10046
- assigneeId: z125.string().nullable(),
10047
- note: z125.string(),
10048
- mailId: z125.string(),
10049
- direction: z125.string(),
10050
- lastMessageId: z125.string(),
10051
- firstMessageId: z125.string(),
10052
- from: z125.array(MailParticipant),
10053
- to: z125.array(MailParticipant),
10054
- cc: z125.array(MailParticipant),
10055
- bcc: z125.array(MailParticipant),
10106
+ var MailRoomSchema = z127.object({
10107
+ id: z127.string(),
10108
+ createdAt: z127.date(),
10109
+ updatedAt: z127.date(),
10110
+ deletedAt: z127.date().nullable(),
10111
+ subject: z127.string(),
10112
+ resolved: z127.boolean(),
10113
+ assigneeId: z127.string().nullable(),
10114
+ note: z127.string(),
10115
+ mailId: z127.string(),
10116
+ direction: z127.string(),
10117
+ lastMessageId: z127.string(),
10118
+ firstMessageId: z127.string(),
10119
+ from: z127.array(MailParticipant),
10120
+ to: z127.array(MailParticipant),
10121
+ cc: z127.array(MailParticipant),
10122
+ bcc: z127.array(MailParticipant),
10056
10123
  firstMessage: MessageSchema2,
10057
10124
  lastMessage: MessageSchema2,
10058
- tags: z125.array(TagSchema2),
10125
+ tags: z127.array(TagSchema2),
10059
10126
  assignee: UserModel,
10060
- messages: z125.array(MessageSchema2),
10127
+ messages: z127.array(MessageSchema2),
10061
10128
  messagesAndLogs: MessagesAndLogsSchema,
10062
10129
  mail: MailAccountSchema,
10063
- unReadMessageCount: z125.number(),
10130
+ unReadMessageCount: z127.number(),
10064
10131
  cxlog: CxLogSchema
10065
10132
  });
10066
- var AttachmentSchema2 = z125.object({
10067
- fileName: z125.string(),
10068
- fileType: z125.string(),
10069
- emailEngineAttachmentId: z125.string(),
10070
- uploadId: z125.string(),
10071
- messageId: z125.string(),
10072
- roomId: z125.string(),
10133
+ var AttachmentSchema2 = z127.object({
10134
+ fileName: z127.string(),
10135
+ fileType: z127.string(),
10136
+ emailEngineAttachmentId: z127.string(),
10137
+ uploadId: z127.string(),
10138
+ messageId: z127.string(),
10139
+ roomId: z127.string(),
10073
10140
  upload: UploadSchema
10074
10141
  });
10075
10142
 
10076
10143
  // src/mail/schemas/room-validation.schema.ts
10077
- import z126 from "zod";
10144
+ import z128 from "zod";
10078
10145
  var RoomContractsValidationSchema = {
10079
10146
  getAll: {
10080
- input: z126.object({
10081
- page: z126.coerce.number().default(1),
10082
- pageSize: z126.coerce.number().default(10),
10083
- keyword: z126.object({
10084
- value: z126.string(),
10085
- category: z126.union([z126.literal("contact"), z126.literal("message")])
10147
+ input: z128.object({
10148
+ page: z128.coerce.number().default(1),
10149
+ pageSize: z128.coerce.number().default(10),
10150
+ keyword: z128.object({
10151
+ value: z128.string(),
10152
+ category: z128.union([z128.literal("contact"), z128.literal("message")])
10086
10153
  }).optional(),
10087
- contactLabels: z126.array(z126.string()).optional(),
10088
- channels: z126.array(z126.string().email()).optional(),
10089
- date: z126.string().optional(),
10090
- contacts: z126.array(z126.string()).optional(),
10091
- assignees: z126.array(z126.string()).optional(),
10092
- level1: z126.union([
10093
- z126.literal("open"),
10094
- z126.literal("close"),
10095
- z126.literal("inbox"),
10096
- z126.literal("sent"),
10097
- z126.literal("scheduled"),
10098
- z126.literal("starred")
10154
+ contactLabels: z128.array(z128.string()).optional(),
10155
+ channels: z128.array(z128.string().email()).optional(),
10156
+ date: z128.string().optional(),
10157
+ contacts: z128.array(z128.string()).optional(),
10158
+ assignees: z128.array(z128.string()).optional(),
10159
+ level1: z128.union([
10160
+ z128.literal("open"),
10161
+ z128.literal("close"),
10162
+ z128.literal("inbox"),
10163
+ z128.literal("sent"),
10164
+ z128.literal("scheduled"),
10165
+ z128.literal("starred")
10099
10166
  ]).optional(),
10100
- level2: z126.union([
10101
- z126.literal("all"),
10102
- z126.literal("unassign"),
10103
- z126.literal("mine"),
10104
- z126.literal("other")
10167
+ level2: z128.union([
10168
+ z128.literal("all"),
10169
+ z128.literal("unassign"),
10170
+ z128.literal("mine"),
10171
+ z128.literal("other")
10105
10172
  ]).optional()
10106
10173
  }),
10107
- output: z126.object({
10108
- data: z126.array(MailRoomSchema),
10109
- total: z126.number(),
10110
- page: z126.number(),
10111
- pageSize: z126.number()
10174
+ output: z128.object({
10175
+ data: z128.array(MailRoomSchema),
10176
+ total: z128.number(),
10177
+ page: z128.number(),
10178
+ pageSize: z128.number()
10112
10179
  })
10113
10180
  },
10114
10181
  update: {
10115
- input: z126.object({
10116
- disposition: z126.string().optional().nullable(),
10117
- assigneeId: z126.string().uuid().optional().nullable(),
10118
- note: z126.string().optional(),
10119
- tags: z126.array(z126.string().uuid()).optional(),
10120
- handover: z126.boolean().or(
10121
- z126.union([z126.literal("true"), z126.literal("false")]).transform((value) => value.toLowerCase() === "true")
10182
+ input: z128.object({
10183
+ disposition: z128.string().optional().nullable(),
10184
+ assigneeId: z128.string().uuid().optional().nullable(),
10185
+ note: z128.string().optional(),
10186
+ tags: z128.array(z128.string().uuid()).optional(),
10187
+ handover: z128.boolean().or(
10188
+ z128.union([z128.literal("true"), z128.literal("false")]).transform((value) => value.toLowerCase() === "true")
10122
10189
  ).optional().nullable(),
10123
- selfAssign: z126.boolean().or(
10124
- z126.union([z126.literal("true"), z126.literal("false")]).transform((value) => value.toLowerCase() === "true")
10190
+ selfAssign: z128.boolean().or(
10191
+ z128.union([z128.literal("true"), z128.literal("false")]).transform((value) => value.toLowerCase() === "true")
10125
10192
  ).optional().nullable()
10126
10193
  })
10127
10194
  }
@@ -10135,7 +10202,7 @@ var roomContract = initContract48().router(
10135
10202
  path: "/",
10136
10203
  responses: {
10137
10204
  200: DefaultSuccessResponseSchema.extend({
10138
- message: z127.string()
10205
+ message: z129.string()
10139
10206
  }),
10140
10207
  ...DefaultResponses
10141
10208
  },
@@ -10148,10 +10215,10 @@ var roomContract = initContract48().router(
10148
10215
  query: RoomContractsValidationSchema.getAll.input,
10149
10216
  responses: {
10150
10217
  200: DefaultSuccessResponseSchema.extend({
10151
- data: z127.array(MailRoomSchema),
10152
- total: z127.number(),
10153
- page: z127.number(),
10154
- pageSize: z127.number()
10218
+ data: z129.array(MailRoomSchema),
10219
+ total: z129.number(),
10220
+ page: z129.number(),
10221
+ pageSize: z129.number()
10155
10222
  }),
10156
10223
  ...DefaultResponses
10157
10224
  },
@@ -10163,24 +10230,24 @@ var roomContract = initContract48().router(
10163
10230
  path: "/count_rooms/all",
10164
10231
  responses: {
10165
10232
  200: DefaultSuccessResponseSchema.extend({
10166
- data: z127.object({
10167
- general: z127.array(
10168
- z127.object({
10169
- name: z127.string(),
10170
- count: z127.number(),
10171
- unReadMessagesCount: z127.number()
10233
+ data: z129.object({
10234
+ general: z129.array(
10235
+ z129.object({
10236
+ name: z129.string(),
10237
+ count: z129.number(),
10238
+ unReadMessagesCount: z129.number()
10172
10239
  })
10173
10240
  ),
10174
- channels: z127.array(
10175
- z127.object({
10241
+ channels: z129.array(
10242
+ z129.object({
10176
10243
  channel: MailAccountSchema,
10177
- count: z127.number()
10244
+ count: z129.number()
10178
10245
  })
10179
10246
  ),
10180
- contactLabels: z127.array(
10181
- z127.object({
10247
+ contactLabels: z129.array(
10248
+ z129.object({
10182
10249
  label: TagSchema,
10183
- count: z127.number()
10250
+ count: z129.number()
10184
10251
  })
10185
10252
  )
10186
10253
  })
@@ -10192,12 +10259,12 @@ var roomContract = initContract48().router(
10192
10259
  getAttachments: {
10193
10260
  method: "GET",
10194
10261
  path: "/:id/attachments",
10195
- pathParams: z127.object({
10196
- id: z127.string().uuid()
10262
+ pathParams: z129.object({
10263
+ id: z129.string().uuid()
10197
10264
  }),
10198
10265
  responses: {
10199
10266
  200: DefaultSuccessResponseSchema.extend({
10200
- data: z127.array(AttachmentSchema2)
10267
+ data: z129.array(AttachmentSchema2)
10201
10268
  }),
10202
10269
  ...DefaultResponses
10203
10270
  },
@@ -10206,12 +10273,12 @@ var roomContract = initContract48().router(
10206
10273
  getParticipants: {
10207
10274
  method: "GET",
10208
10275
  path: "/:id/participants",
10209
- pathParams: z127.object({
10210
- id: z127.string().uuid()
10276
+ pathParams: z129.object({
10277
+ id: z129.string().uuid()
10211
10278
  }),
10212
10279
  responses: {
10213
10280
  200: DefaultSuccessResponseSchema.extend({
10214
- data: z127.array(MailParticipant)
10281
+ data: z129.array(MailParticipant)
10215
10282
  }),
10216
10283
  ...DefaultResponses
10217
10284
  },
@@ -10222,22 +10289,22 @@ var roomContract = initContract48().router(
10222
10289
  path: "/add_email_to_contact",
10223
10290
  responses: {
10224
10291
  200: DefaultSuccessResponseSchema.extend({
10225
- data: z127.string()
10292
+ data: z129.string()
10226
10293
  }),
10227
10294
  ...DefaultResponses
10228
10295
  },
10229
- body: z127.object({
10230
- email: z127.string(),
10231
- contactId: z127.string(),
10232
- mailUserId: z127.string()
10296
+ body: z129.object({
10297
+ email: z129.string(),
10298
+ contactId: z129.string(),
10299
+ mailUserId: z129.string()
10233
10300
  }),
10234
10301
  summary: "Add a new email of a mail room participant to an existing contact"
10235
10302
  },
10236
10303
  update: {
10237
10304
  method: "PATCH",
10238
10305
  path: "/:id",
10239
- pathParams: z127.object({
10240
- id: z127.string()
10306
+ pathParams: z129.object({
10307
+ id: z129.string()
10241
10308
  }),
10242
10309
  responses: {
10243
10310
  200: DefaultSuccessResponseSchema.extend({
@@ -10251,12 +10318,12 @@ var roomContract = initContract48().router(
10251
10318
  markAsRead: {
10252
10319
  method: "POST",
10253
10320
  path: "/mark_as_read",
10254
- body: z127.object({
10255
- id: z127.string()
10321
+ body: z129.object({
10322
+ id: z129.string()
10256
10323
  }),
10257
10324
  responses: {
10258
10325
  200: DefaultSuccessResponseSchema.extend({
10259
- message: z127.string()
10326
+ message: z129.string()
10260
10327
  }),
10261
10328
  ...DefaultResponses
10262
10329
  },
@@ -10265,8 +10332,8 @@ var roomContract = initContract48().router(
10265
10332
  getById: {
10266
10333
  method: "GET",
10267
10334
  path: "/:id",
10268
- pathParams: z127.object({
10269
- id: z127.string().uuid()
10335
+ pathParams: z129.object({
10336
+ id: z129.string().uuid()
10270
10337
  }),
10271
10338
  responses: {
10272
10339
  200: DefaultSuccessResponseSchema.extend({
@@ -10284,90 +10351,90 @@ var roomContract = initContract48().router(
10284
10351
 
10285
10352
  // src/mail/account-contract.ts
10286
10353
  import { initContract as initContract49 } from "@ts-rest/core";
10287
- import z129 from "zod";
10354
+ import z131 from "zod";
10288
10355
 
10289
10356
  // src/mail/schemas/account-validation.schema.ts
10290
- import z128 from "zod";
10357
+ import z130 from "zod";
10291
10358
  var AccountContractsValidationSchemas = {
10292
10359
  create: {
10293
- input: z128.object({
10294
- address: z128.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
10295
- name: z128.string().min(1, "Account name cannot be empty."),
10296
- password: z128.string().min(1, "Password cannot be empty."),
10297
- mailServerId: z128.string().uuid("Invalid mail_server_id"),
10298
- signature: z128.string().optional().default("")
10360
+ input: z130.object({
10361
+ address: z130.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
10362
+ name: z130.string().min(1, "Account name cannot be empty."),
10363
+ password: z130.string().min(1, "Password cannot be empty."),
10364
+ mailServerId: z130.string().uuid("Invalid mail_server_id"),
10365
+ signature: z130.string().optional().default("")
10299
10366
  })
10300
10367
  },
10301
10368
  createWithCustomSmtpAndImap: {
10302
- input: z128.object({
10303
- email: z128.string(),
10304
- name: z128.string(),
10305
- password: z128.string(),
10306
- imap: z128.object({
10307
- host: z128.string(),
10308
- port: z128.number(),
10309
- secure: z128.boolean().default(false)
10369
+ input: z130.object({
10370
+ email: z130.string(),
10371
+ name: z130.string(),
10372
+ password: z130.string(),
10373
+ imap: z130.object({
10374
+ host: z130.string(),
10375
+ port: z130.number(),
10376
+ secure: z130.boolean().default(false)
10310
10377
  //Whether to use TLS for the connection (usually true for port 993)
10311
10378
  }),
10312
- smtp: z128.object({
10313
- host: z128.string(),
10314
- port: z128.number(),
10315
- secure: z128.boolean().default(false)
10379
+ smtp: z130.object({
10380
+ host: z130.string(),
10381
+ port: z130.number(),
10382
+ secure: z130.boolean().default(false)
10316
10383
  //Whether to use TLS for the connection (usually true for port 993)
10317
10384
  })
10318
10385
  })
10319
10386
  },
10320
10387
  getById: {
10321
- input: z128.object({
10322
- id: z128.string().uuid()
10388
+ input: z130.object({
10389
+ id: z130.string().uuid()
10323
10390
  }),
10324
10391
  output: MailAccountSchema
10325
10392
  },
10326
10393
  getAll: {
10327
- output: z128.array(MailAccountSchema)
10394
+ output: z130.array(MailAccountSchema)
10328
10395
  },
10329
10396
  update: {
10330
10397
  input: MailAccountSchema,
10331
10398
  output: MailAccountSchema
10332
10399
  },
10333
10400
  disconnect: {
10334
- input: z128.object({
10335
- id: z128.string().uuid()
10401
+ input: z130.object({
10402
+ id: z130.string().uuid()
10336
10403
  }),
10337
10404
  output: MailAccountSchema
10338
10405
  },
10339
10406
  reconnect: {
10340
- input: z128.object({
10341
- id: z128.string()
10407
+ input: z130.object({
10408
+ id: z130.string()
10342
10409
  }),
10343
10410
  output: MailAccountSchema
10344
10411
  },
10345
10412
  delete: {
10346
- input: z128.object({
10347
- id: z128.string()
10413
+ input: z130.object({
10414
+ id: z130.string()
10348
10415
  }),
10349
- output: z128.string()
10416
+ output: z130.string()
10350
10417
  },
10351
10418
  deleteEmailEngineAcc: {
10352
- input: z128.object({
10353
- account: z128.string()
10419
+ input: z130.object({
10420
+ account: z130.string()
10354
10421
  }),
10355
10422
  output: MailAccountSchema
10356
10423
  },
10357
10424
  generateOAuth2AuthenticationLink: {
10358
- body: z128.object({
10359
- oAuth2AppId: z128.string(),
10360
- mailServerId: z128.string()
10425
+ body: z130.object({
10426
+ oAuth2AppId: z130.string(),
10427
+ mailServerId: z130.string()
10361
10428
  }),
10362
- response: z128.object({
10363
- url: z128.string(),
10364
- account: z128.string()
10429
+ response: z130.object({
10430
+ url: z130.string(),
10431
+ account: z130.string()
10365
10432
  })
10366
10433
  },
10367
10434
  createOAuth2Acc: {
10368
- body: z128.object({
10369
- account: z128.string(),
10370
- name: z128.string()
10435
+ body: z130.object({
10436
+ account: z130.string(),
10437
+ name: z130.string()
10371
10438
  }),
10372
10439
  response: MailAccountSchema
10373
10440
  }
@@ -10385,14 +10452,14 @@ var accountContract = initContract49().router(
10385
10452
  // data: AccountContractsValidationSchemas.create.output,
10386
10453
  data: MailAccountSchema
10387
10454
  }),
10388
- 400: z129.object({
10389
- message: z129.string()
10455
+ 400: z131.object({
10456
+ message: z131.string()
10390
10457
  }),
10391
- 409: z129.object({
10392
- message: z129.string()
10458
+ 409: z131.object({
10459
+ message: z131.string()
10393
10460
  }),
10394
- 500: z129.object({
10395
- message: z129.string()
10461
+ 500: z131.object({
10462
+ message: z131.string()
10396
10463
  }),
10397
10464
  ...DefaultResponses
10398
10465
  },
@@ -10407,14 +10474,14 @@ var accountContract = initContract49().router(
10407
10474
  // data: AccountContractsValidationSchemas.create.output,
10408
10475
  // data: MailAccountSchema,
10409
10476
  }),
10410
- 400: z129.object({
10411
- message: z129.string()
10477
+ 400: z131.object({
10478
+ message: z131.string()
10412
10479
  }),
10413
- 409: z129.object({
10414
- message: z129.string()
10480
+ 409: z131.object({
10481
+ message: z131.string()
10415
10482
  }),
10416
- 500: z129.object({
10417
- message: z129.string()
10483
+ 500: z131.object({
10484
+ message: z131.string()
10418
10485
  }),
10419
10486
  ...DefaultResponses
10420
10487
  },
@@ -10430,14 +10497,14 @@ var accountContract = initContract49().router(
10430
10497
  201: DefaultSuccessResponseSchema.extend({
10431
10498
  data: AccountContractsValidationSchemas.generateOAuth2AuthenticationLink.response
10432
10499
  }),
10433
- 400: z129.object({
10434
- message: z129.string()
10500
+ 400: z131.object({
10501
+ message: z131.string()
10435
10502
  }),
10436
- 409: z129.object({
10437
- message: z129.string()
10503
+ 409: z131.object({
10504
+ message: z131.string()
10438
10505
  }),
10439
- 500: z129.object({
10440
- message: z129.string()
10506
+ 500: z131.object({
10507
+ message: z131.string()
10441
10508
  }),
10442
10509
  ...DefaultResponses
10443
10510
  },
@@ -10451,7 +10518,7 @@ var accountContract = initContract49().router(
10451
10518
  path: "/sync",
10452
10519
  responses: {
10453
10520
  200: DefaultSuccessResponseSchema.extend({
10454
- message: z129.string()
10521
+ message: z131.string()
10455
10522
  }),
10456
10523
  ...DefaultResponses
10457
10524
  },
@@ -10476,13 +10543,13 @@ var accountContract = initContract49().router(
10476
10543
  getAll: {
10477
10544
  method: "GET",
10478
10545
  path: "",
10479
- query: z129.object({
10480
- state: z129.union([z129.literal("connected"), z129.literal("disconnected")]).optional(),
10481
- withDeleted: z129.boolean().default(false)
10546
+ query: z131.object({
10547
+ state: z131.union([z131.literal("connected"), z131.literal("disconnected")]).optional(),
10548
+ withDeleted: z131.boolean().default(false)
10482
10549
  }).optional(),
10483
10550
  responses: {
10484
10551
  200: DefaultSuccessResponseSchema.extend({
10485
- data: z129.array(MailAccountSchema)
10552
+ data: z131.array(MailAccountSchema)
10486
10553
  }),
10487
10554
  ...DefaultResponses
10488
10555
  },
@@ -10493,8 +10560,8 @@ var accountContract = initContract49().router(
10493
10560
  update: {
10494
10561
  method: "PATCH",
10495
10562
  path: "/:id",
10496
- pathParams: z129.object({
10497
- id: z129.string().uuid()
10563
+ pathParams: z131.object({
10564
+ id: z131.string().uuid()
10498
10565
  }),
10499
10566
  responses: {
10500
10567
  201: DefaultSuccessResponseSchema.extend({
@@ -10543,7 +10610,7 @@ var accountContract = initContract49().router(
10543
10610
  pathParams: AccountContractsValidationSchemas.delete.input,
10544
10611
  responses: {
10545
10612
  200: DefaultSuccessResponseSchema.extend({
10546
- message: z129.string()
10613
+ message: z131.string()
10547
10614
  }),
10548
10615
  ...DefaultResponses
10549
10616
  },
@@ -10558,7 +10625,7 @@ var accountContract = initContract49().router(
10558
10625
  pathParams: AccountContractsValidationSchemas.deleteEmailEngineAcc.input,
10559
10626
  responses: {
10560
10627
  200: DefaultSuccessResponseSchema.extend({
10561
- message: z129.string()
10628
+ message: z131.string()
10562
10629
  }),
10563
10630
  ...DefaultResponses
10564
10631
  },
@@ -10587,20 +10654,20 @@ var accountContract = initContract49().router(
10587
10654
 
10588
10655
  // src/mail/mail-server-contract.ts
10589
10656
  import { initContract as initContract50 } from "@ts-rest/core";
10590
- import z131 from "zod";
10657
+ import z133 from "zod";
10591
10658
 
10592
10659
  // src/mail/schemas/servers-validation.schema.ts
10593
- import z130 from "zod";
10594
- var CreateMailServerSchema = z130.object({
10595
- name: z130.string(),
10596
- smtpHost: z130.string(),
10597
- smtpPort: z130.number(),
10598
- smtpTlsPort: z130.number(),
10599
- useTlsForSmtp: z130.boolean(),
10600
- imapHost: z130.string(),
10601
- imapPort: z130.number(),
10602
- imapTlsPort: z130.number(),
10603
- useTlsForImap: z130.boolean()
10660
+ import z132 from "zod";
10661
+ var CreateMailServerSchema = z132.object({
10662
+ name: z132.string(),
10663
+ smtpHost: z132.string(),
10664
+ smtpPort: z132.number(),
10665
+ smtpTlsPort: z132.number(),
10666
+ useTlsForSmtp: z132.boolean(),
10667
+ imapHost: z132.string(),
10668
+ imapPort: z132.number(),
10669
+ imapTlsPort: z132.number(),
10670
+ useTlsForImap: z132.boolean()
10604
10671
  });
10605
10672
 
10606
10673
  // src/mail/mail-server-contract.ts
@@ -10623,11 +10690,11 @@ var serverContract = initContract50().router(
10623
10690
  path: "/oauth2/apps",
10624
10691
  responses: {
10625
10692
  200: DefaultSuccessResponseSchema.extend({
10626
- data: z131.object({
10627
- total: z131.number(),
10628
- pages: z131.number(),
10629
- page: z131.number(),
10630
- apps: z131.array(OAuth2AppSchema)
10693
+ data: z133.object({
10694
+ total: z133.number(),
10695
+ pages: z133.number(),
10696
+ page: z133.number(),
10697
+ apps: z133.array(OAuth2AppSchema)
10631
10698
  })
10632
10699
  }),
10633
10700
  ...DefaultResponses
@@ -10637,8 +10704,8 @@ var serverContract = initContract50().router(
10637
10704
  getById: {
10638
10705
  method: "GET",
10639
10706
  path: "/:id",
10640
- pathParams: z131.object({
10641
- id: z131.string().uuid()
10707
+ pathParams: z133.object({
10708
+ id: z133.string().uuid()
10642
10709
  }),
10643
10710
  responses: {
10644
10711
  200: DefaultSuccessResponseSchema.extend({
@@ -10653,7 +10720,7 @@ var serverContract = initContract50().router(
10653
10720
  path: "/",
10654
10721
  responses: {
10655
10722
  200: DefaultSuccessResponseSchema.extend({
10656
- data: z131.array(MailServerSchema)
10723
+ data: z133.array(MailServerSchema)
10657
10724
  }),
10658
10725
  ...DefaultResponses
10659
10726
  },
@@ -10662,8 +10729,8 @@ var serverContract = initContract50().router(
10662
10729
  update: {
10663
10730
  method: "PATCH",
10664
10731
  path: "/:id",
10665
- pathParams: z131.object({
10666
- id: z131.string().uuid()
10732
+ pathParams: z133.object({
10733
+ id: z133.string().uuid()
10667
10734
  }),
10668
10735
  responses: {
10669
10736
  200: DefaultSuccessResponseSchema.extend({
@@ -10677,8 +10744,8 @@ var serverContract = initContract50().router(
10677
10744
  delete: {
10678
10745
  method: "DELETE",
10679
10746
  path: "/:id",
10680
- pathParams: z131.object({
10681
- id: z131.string().uuid()
10747
+ pathParams: z133.object({
10748
+ id: z133.string().uuid()
10682
10749
  }),
10683
10750
  responses: {
10684
10751
  200: DefaultSuccessResponseSchema.extend({
@@ -10697,45 +10764,45 @@ var serverContract = initContract50().router(
10697
10764
 
10698
10765
  // src/mail/message-contract.ts
10699
10766
  import { initContract as initContract51 } from "@ts-rest/core";
10700
- import z133 from "zod";
10767
+ import z135 from "zod";
10701
10768
 
10702
10769
  // src/mail/schemas/message-validation.schema.ts
10703
- import z132 from "zod";
10704
- var MailParticipant2 = z132.object({
10705
- name: z132.string().optional(),
10706
- address: z132.string().email()
10770
+ import z134 from "zod";
10771
+ var MailParticipant2 = z134.object({
10772
+ name: z134.string().optional(),
10773
+ address: z134.string().email()
10707
10774
  });
10708
10775
  var MessageContractsValidationsSchema = {
10709
10776
  submit: {
10710
- input: z132.object({
10711
- subject: z132.string(),
10712
- text: z132.string(),
10713
- html: z132.string(),
10777
+ input: z134.object({
10778
+ subject: z134.string(),
10779
+ text: z134.string(),
10780
+ html: z134.string(),
10714
10781
  from: MailParticipant2,
10715
10782
  to: MailParticipant2,
10716
- cc: z132.array(MailParticipant2).optional(),
10717
- bcc: z132.array(MailParticipant2).optional(),
10718
- sendAt: z132.string().optional(),
10719
- reference: z132.object({
10720
- messageId: z132.string(),
10721
- action: z132.union([z132.literal("reply"), z132.literal("forward")])
10783
+ cc: z134.array(MailParticipant2).optional(),
10784
+ bcc: z134.array(MailParticipant2).optional(),
10785
+ sendAt: z134.string().optional(),
10786
+ reference: z134.object({
10787
+ messageId: z134.string(),
10788
+ action: z134.union([z134.literal("reply"), z134.literal("forward")])
10722
10789
  }).optional(),
10723
- attachments: z132.array(
10724
- z132.object({
10725
- fileType: z132.string(),
10726
- fileName: z132.string(),
10727
- fileKey: z132.string(),
10728
- fileSize: z132.number(),
10729
- bucketName: z132.string(),
10730
- presignedUrl: z132.string()
10790
+ attachments: z134.array(
10791
+ z134.object({
10792
+ fileType: z134.string(),
10793
+ fileName: z134.string(),
10794
+ fileKey: z134.string(),
10795
+ fileSize: z134.number(),
10796
+ bucketName: z134.string(),
10797
+ presignedUrl: z134.string()
10731
10798
  })
10732
10799
  ).optional()
10733
10800
  }),
10734
- output: z132.object({
10735
- response: z132.string(),
10736
- messageId: z132.string(),
10737
- sendAt: z132.string(),
10738
- queueId: z132.string()
10801
+ output: z134.object({
10802
+ response: z134.string(),
10803
+ messageId: z134.string(),
10804
+ sendAt: z134.string(),
10805
+ queueId: z134.string()
10739
10806
  })
10740
10807
  }
10741
10808
  };
@@ -10764,8 +10831,8 @@ var messageContract = initContract51().router(
10764
10831
  path: "/new_message_count",
10765
10832
  responses: {
10766
10833
  200: DefaultSuccessResponseSchema.extend({
10767
- data: z133.object({
10768
- count: z133.number()
10834
+ data: z135.object({
10835
+ count: z135.number()
10769
10836
  })
10770
10837
  }),
10771
10838
  ...DefaultResponses
@@ -10777,8 +10844,8 @@ var messageContract = initContract51().router(
10777
10844
  getById: {
10778
10845
  method: "GET",
10779
10846
  path: "/:id",
10780
- pathParams: z133.object({
10781
- id: z133.string()
10847
+ pathParams: z135.object({
10848
+ id: z135.string()
10782
10849
  }),
10783
10850
  responses: {
10784
10851
  200: DefaultSuccessResponseSchema.extend({
@@ -10793,8 +10860,8 @@ var messageContract = initContract51().router(
10793
10860
  update: {
10794
10861
  method: "PATCH",
10795
10862
  path: "/:id",
10796
- pathParams: z133.object({
10797
- id: z133.string()
10863
+ pathParams: z135.object({
10864
+ id: z135.string()
10798
10865
  }),
10799
10866
  responses: {
10800
10867
  200: DefaultSuccessResponseSchema.extend({
@@ -10810,8 +10877,8 @@ var messageContract = initContract51().router(
10810
10877
  delete: {
10811
10878
  method: "DELETE",
10812
10879
  path: "/:id",
10813
- pathParams: z133.object({
10814
- id: z133.string()
10880
+ pathParams: z135.object({
10881
+ id: z135.string()
10815
10882
  }),
10816
10883
  responses: {
10817
10884
  200: DefaultSuccessResponseSchema.extend({
@@ -10827,13 +10894,13 @@ var messageContract = initContract51().router(
10827
10894
  cancelScheduledMessage: {
10828
10895
  method: "DELETE",
10829
10896
  path: "/scheduled_message/:id",
10830
- pathParams: z133.object({
10831
- id: z133.string()
10897
+ pathParams: z135.object({
10898
+ id: z135.string()
10832
10899
  }),
10833
10900
  responses: {
10834
10901
  200: DefaultSuccessResponseSchema.extend({
10835
- data: z133.object({
10836
- totalMessagesCount: z133.number()
10902
+ data: z135.object({
10903
+ totalMessagesCount: z135.number()
10837
10904
  })
10838
10905
  }),
10839
10906
  ...DefaultResponses
@@ -10858,38 +10925,38 @@ var mailContract = initContract52().router({
10858
10925
 
10859
10926
  // src/webchat/index.ts
10860
10927
  import { initContract as initContract53 } from "@ts-rest/core";
10861
- import z136 from "zod";
10928
+ import z138 from "zod";
10862
10929
 
10863
10930
  // src/webchat/schema.ts
10864
- import z135 from "zod";
10931
+ import z137 from "zod";
10865
10932
 
10866
10933
  // src/webchat/validation.ts
10867
- import z134 from "zod";
10934
+ import z136 from "zod";
10868
10935
  var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
10869
10936
  ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
10870
10937
  return ChatwootChannelType3;
10871
10938
  })(ChatwootChannelType2 || {});
10872
- var WebChatChannelSchema = z134.object({
10873
- avatar: z134.string().optional(),
10874
- name: z134.string(),
10875
- type: z134.nativeEnum(ChatwootChannelType2),
10876
- websiteName: z134.string(),
10877
- welcomeTitle: z134.string(),
10878
- websiteUrl: z134.string().url(),
10879
- welcomeTagline: z134.string().optional(),
10880
- agentAwayMessage: z134.string().optional(),
10881
- widgetColor: z134.string().optional()
10939
+ var WebChatChannelSchema = z136.object({
10940
+ avatar: z136.string().optional(),
10941
+ name: z136.string(),
10942
+ type: z136.nativeEnum(ChatwootChannelType2),
10943
+ websiteName: z136.string(),
10944
+ welcomeTitle: z136.string(),
10945
+ websiteUrl: z136.string().url(),
10946
+ welcomeTagline: z136.string().optional(),
10947
+ agentAwayMessage: z136.string().optional(),
10948
+ widgetColor: z136.string().optional()
10882
10949
  });
10883
10950
 
10884
10951
  // src/webchat/schema.ts
10885
- var ConnectWebChatChannelSchema = z135.object({
10886
- name: z135.string(),
10887
- actor: z135.object({
10888
- id: z135.string().uuid(),
10889
- name: z135.string(),
10890
- email: z135.string().email(),
10891
- address: z135.string().nullable(),
10892
- phone: z135.string().nullable()
10952
+ var ConnectWebChatChannelSchema = z137.object({
10953
+ name: z137.string(),
10954
+ actor: z137.object({
10955
+ id: z137.string().uuid(),
10956
+ name: z137.string(),
10957
+ email: z137.string().email(),
10958
+ address: z137.string().nullable(),
10959
+ phone: z137.string().nullable()
10893
10960
  }),
10894
10961
  channel: WebChatChannelSchema
10895
10962
  });
@@ -10923,8 +10990,8 @@ var platformWebchatContract = initContract53().router(
10923
10990
  disconnectToService: {
10924
10991
  method: "POST",
10925
10992
  path: "/disconnect",
10926
- body: z136.object({
10927
- id: z136.string().uuid()
10993
+ body: z138.object({
10994
+ id: z138.string().uuid()
10928
10995
  }),
10929
10996
  responses: {
10930
10997
  200: ChannelServiceResponseSchema,
@@ -10935,8 +11002,8 @@ var platformWebchatContract = initContract53().router(
10935
11002
  reconnect: {
10936
11003
  method: "POST",
10937
11004
  path: "/reconnect/:channelId",
10938
- pathParams: z136.object({
10939
- channelId: z136.string().uuid()
11005
+ pathParams: z138.object({
11006
+ channelId: z138.string().uuid()
10940
11007
  }),
10941
11008
  body: null,
10942
11009
  responses: {
@@ -10948,8 +11015,8 @@ var platformWebchatContract = initContract53().router(
10948
11015
  delete: {
10949
11016
  method: "DELETE",
10950
11017
  path: "/delete/:channelId",
10951
- pathParams: z136.object({
10952
- channelId: z136.string().uuid()
11018
+ pathParams: z138.object({
11019
+ channelId: z138.string().uuid()
10953
11020
  }),
10954
11021
  body: null,
10955
11022
  responses: {
@@ -10966,18 +11033,18 @@ var platformWebchatContract = initContract53().router(
10966
11033
 
10967
11034
  // src/hold-label/index.ts
10968
11035
  import { initContract as initContract54 } from "@ts-rest/core";
10969
- import z138 from "zod";
11036
+ import z140 from "zod";
10970
11037
 
10971
11038
  // src/hold-label/validation.ts
10972
- import z137 from "zod";
10973
- var UpdatePositionSchema2 = z137.object({
10974
- holdLabels: z137.array(
10975
- z137.object({ id: z137.string().uuid(), position: z137.number() })
11039
+ import z139 from "zod";
11040
+ var UpdatePositionSchema2 = z139.object({
11041
+ holdLabels: z139.array(
11042
+ z139.object({ id: z139.string().uuid(), position: z139.number() })
10976
11043
  )
10977
11044
  });
10978
- var HoldRoomSchema = z137.object({
10979
- roomId: z137.string().uuid(),
10980
- holdLabelId: z137.string().uuid()
11045
+ var HoldRoomSchema = z139.object({
11046
+ roomId: z139.string().uuid(),
11047
+ holdLabelId: z139.string().uuid()
10981
11048
  });
10982
11049
 
10983
11050
  // src/hold-label/index.ts
@@ -10985,7 +11052,7 @@ var holdLabelContract = initContract54().router({
10985
11052
  createHoldLabel: {
10986
11053
  method: "POST",
10987
11054
  path: "ms/hold-label",
10988
- body: z138.object({ name: z138.string() }),
11055
+ body: z140.object({ name: z140.string() }),
10989
11056
  responses: {
10990
11057
  201: DefaultSuccessResponseSchema.extend({
10991
11058
  holdLabel: HoldLabelSchema
@@ -10997,7 +11064,7 @@ var holdLabelContract = initContract54().router({
10997
11064
  path: "chs/api/v1/hold-label",
10998
11065
  responses: {
10999
11066
  200: DefaultSuccessResponseSchema.extend({
11000
- holdLabels: z138.array(HoldLabelSchema)
11067
+ holdLabels: z140.array(HoldLabelSchema)
11001
11068
  })
11002
11069
  }
11003
11070
  },
@@ -11015,8 +11082,8 @@ var holdLabelContract = initContract54().router({
11015
11082
  updateHoldLabel: {
11016
11083
  method: "PATCH",
11017
11084
  path: "ms/hold-label/:id",
11018
- pathParams: z138.object({ id: z138.string().uuid() }),
11019
- body: z138.object({ name: z138.string() }),
11085
+ pathParams: z140.object({ id: z140.string().uuid() }),
11086
+ body: z140.object({ name: z140.string() }),
11020
11087
  responses: {
11021
11088
  200: DefaultSuccessResponseSchema.extend({
11022
11089
  holdLabel: HoldLabelSchema
@@ -11026,7 +11093,7 @@ var holdLabelContract = initContract54().router({
11026
11093
  deleteHoldLabel: {
11027
11094
  method: "DELETE",
11028
11095
  path: "ms/hold-label/:id",
11029
- pathParams: z138.object({ id: z138.string().uuid() }),
11096
+ pathParams: z140.object({ id: z140.string().uuid() }),
11030
11097
  body: null,
11031
11098
  responses: {
11032
11099
  200: DefaultSuccessResponseSchema
@@ -11037,10 +11104,10 @@ var holdLabelContract = initContract54().router({
11037
11104
  path: "ms/hold-label/auto-unhold",
11038
11105
  responses: {
11039
11106
  200: DefaultSuccessResponseSchema.extend({
11040
- autoUnhold: z138.boolean(),
11041
- resumeLabel: z138.object({
11042
- show: z138.boolean(),
11043
- name: z138.string()
11107
+ autoUnhold: z140.boolean(),
11108
+ resumeLabel: z140.object({
11109
+ show: z140.boolean(),
11110
+ name: z140.string()
11044
11111
  })
11045
11112
  })
11046
11113
  }
@@ -11048,19 +11115,19 @@ var holdLabelContract = initContract54().router({
11048
11115
  updateAutoUnhold: {
11049
11116
  method: "POST",
11050
11117
  path: "ms/hold-label/auto-unhold",
11051
- body: z138.object({
11052
- autoUnhold: z138.boolean().optional(),
11053
- resumeLabel: z138.object({
11054
- show: z138.boolean().optional(),
11055
- name: z138.string().optional()
11118
+ body: z140.object({
11119
+ autoUnhold: z140.boolean().optional(),
11120
+ resumeLabel: z140.object({
11121
+ show: z140.boolean().optional(),
11122
+ name: z140.string().optional()
11056
11123
  }).optional()
11057
11124
  }),
11058
11125
  responses: {
11059
11126
  200: DefaultSuccessResponseSchema.extend({
11060
- autoUnhold: z138.boolean(),
11061
- resumeLabel: z138.object({
11062
- show: z138.boolean(),
11063
- name: z138.string()
11127
+ autoUnhold: z140.boolean(),
11128
+ resumeLabel: z140.object({
11129
+ show: z140.boolean(),
11130
+ name: z140.string()
11064
11131
  })
11065
11132
  })
11066
11133
  }
@@ -11068,10 +11135,10 @@ var holdLabelContract = initContract54().router({
11068
11135
  getHoldLogs: {
11069
11136
  method: "GET",
11070
11137
  path: "ms/hold-label/hold-logs",
11071
- query: z138.object({ cxLogId: z138.string().uuid() }),
11138
+ query: z140.object({ cxLogId: z140.string().uuid() }),
11072
11139
  responses: {
11073
- 200: z138.object({
11074
- holdLogs: z138.array(FormattedHoldLogSchema)
11140
+ 200: z140.object({
11141
+ holdLogs: z140.array(FormattedHoldLogSchema)
11075
11142
  })
11076
11143
  }
11077
11144
  },
@@ -11088,7 +11155,7 @@ var holdLabelContract = initContract54().router({
11088
11155
  unholdRoom: {
11089
11156
  method: "POST",
11090
11157
  path: "ms/hold-label/unhold-room",
11091
- body: z138.object({ roomId: z138.string().uuid() }),
11158
+ body: z140.object({ roomId: z140.string().uuid() }),
11092
11159
  responses: {
11093
11160
  200: DefaultSuccessResponseSchema.extend({
11094
11161
  holdLog: HoldLogSchema.optional()
@@ -11099,89 +11166,89 @@ var holdLabelContract = initContract54().router({
11099
11166
 
11100
11167
  // src/subscription/index.ts
11101
11168
  import { initContract as initContract55 } from "@ts-rest/core";
11102
- import { z as z141 } from "zod";
11169
+ import { z as z143 } from "zod";
11103
11170
 
11104
11171
  // src/subscription/schema.ts
11105
- import z139 from "zod";
11172
+ import z141 from "zod";
11106
11173
  var ProductPriceSchema = DefaultEntitySchema.extend({
11107
- priceId: z139.string(),
11108
- name: z139.string().nullable(),
11109
- perUnit: z139.number(),
11110
- price: z139.number(),
11111
- currency: z139.string().nullable()
11174
+ priceId: z141.string(),
11175
+ name: z141.string().nullable(),
11176
+ perUnit: z141.number(),
11177
+ price: z141.number(),
11178
+ currency: z141.string().nullable()
11112
11179
  });
11113
11180
  var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
11114
- provider: z139.string(),
11115
- productId: z139.string(),
11116
- name: z139.string(),
11117
- type: z139.string(),
11118
- omnichannel: z139.string(),
11119
- usageType: z139.string().nullable(),
11181
+ provider: z141.string(),
11182
+ productId: z141.string(),
11183
+ name: z141.string(),
11184
+ type: z141.string(),
11185
+ omnichannel: z141.string(),
11186
+ usageType: z141.string().nullable(),
11120
11187
  productPrice: ProductPriceSchema
11121
11188
  });
11122
11189
  var RelatedProductSchema = DefaultEntitySchema.extend({
11123
- includedQuantity: z139.number(),
11190
+ includedQuantity: z141.number(),
11124
11191
  product: ProductWithoutRelatedSchema
11125
11192
  });
11126
11193
  var ProductSchema = DefaultEntitySchema.extend({
11127
- provider: z139.string(),
11128
- productId: z139.string(),
11129
- name: z139.string(),
11130
- type: z139.string(),
11131
- omnichannel: z139.string(),
11132
- usageType: z139.string().nullable(),
11194
+ provider: z141.string(),
11195
+ productId: z141.string(),
11196
+ name: z141.string(),
11197
+ type: z141.string(),
11198
+ omnichannel: z141.string(),
11199
+ usageType: z141.string().nullable(),
11133
11200
  productPrice: ProductPriceSchema,
11134
- relatedProducts: z139.array(RelatedProductSchema)
11201
+ relatedProducts: z141.array(RelatedProductSchema)
11135
11202
  });
11136
11203
  var CustomerSchema = DefaultEntitySchema.extend({
11137
- provider: z139.string(),
11138
- customerId: z139.string(),
11139
- email: z139.string(),
11140
- name: z139.string(),
11141
- balance: z139.number()
11204
+ provider: z141.string(),
11205
+ customerId: z141.string(),
11206
+ email: z141.string(),
11207
+ name: z141.string(),
11208
+ balance: z141.number()
11142
11209
  });
11143
11210
  var SubscriptionProuctSchema = DefaultEntitySchema.extend({
11144
- limit: z139.number(),
11145
- subscriptionItemId: z139.string(),
11146
- usage: z139.number().nullable(),
11211
+ limit: z141.number(),
11212
+ subscriptionItemId: z141.string(),
11213
+ usage: z141.number().nullable(),
11147
11214
  product: ProductSchema
11148
11215
  });
11149
11216
  var SubscriptionSchema = DefaultEntitySchema.extend({
11150
- provider: z139.string(),
11151
- type: z139.string(),
11152
- subscriptionId: z139.string(),
11153
- interval: z139.string(),
11154
- quantity: z139.number(),
11155
- amount: z139.number(),
11156
- startAt: z139.date().nullable(),
11157
- expireAt: z139.date(),
11158
- status: z139.string(),
11159
- name: z139.string().nullable(),
11160
- subscriptionProducts: z139.array(SubscriptionProuctSchema),
11217
+ provider: z141.string(),
11218
+ type: z141.string(),
11219
+ subscriptionId: z141.string(),
11220
+ interval: z141.string(),
11221
+ quantity: z141.number(),
11222
+ amount: z141.number(),
11223
+ startAt: z141.date().nullable(),
11224
+ expireAt: z141.date(),
11225
+ status: z141.string(),
11226
+ name: z141.string().nullable(),
11227
+ subscriptionProducts: z141.array(SubscriptionProuctSchema),
11161
11228
  productPrice: ProductPriceSchema,
11162
11229
  product: ProductSchema
11163
11230
  });
11164
11231
 
11165
11232
  // src/subscription/validation.ts
11166
- import { z as z140 } from "zod";
11167
- var GetAvailablePlanSchema = z140.object({
11168
- type: z140.string(),
11169
- currency: z140.string()
11170
- });
11171
- var UpdateSubscriptionSchema = z140.object({
11172
- planProductId: z140.string(),
11173
- planProductPriceId: z140.string(),
11174
- subscriptionId: z140.string(),
11175
- subscriptionProducts: z140.array(
11176
- z140.object({
11177
- productId: z140.string(),
11178
- productPriceId: z140.string(),
11179
- quantity: z140.number()
11233
+ import { z as z142 } from "zod";
11234
+ var GetAvailablePlanSchema = z142.object({
11235
+ type: z142.string(),
11236
+ currency: z142.string()
11237
+ });
11238
+ var UpdateSubscriptionSchema = z142.object({
11239
+ planProductId: z142.string(),
11240
+ planProductPriceId: z142.string(),
11241
+ subscriptionId: z142.string(),
11242
+ subscriptionProducts: z142.array(
11243
+ z142.object({
11244
+ productId: z142.string(),
11245
+ productPriceId: z142.string(),
11246
+ quantity: z142.number()
11180
11247
  })
11181
11248
  )
11182
11249
  });
11183
- var TopUpBalanceSchema = z140.object({
11184
- quantity: z140.number()
11250
+ var TopUpBalanceSchema = z142.object({
11251
+ quantity: z142.number()
11185
11252
  });
11186
11253
 
11187
11254
  // src/subscription/index.ts
@@ -11205,9 +11272,9 @@ var subscriptionContract = initContract55().router(
11205
11272
  body: UpdateSubscriptionSchema,
11206
11273
  responses: {
11207
11274
  200: DefaultSuccessResponseSchema.extend({
11208
- message: z141.string(),
11209
- requireCheckout: z141.boolean(),
11210
- checkoutUrl: z141.string().nullable()
11275
+ message: z143.string(),
11276
+ requireCheckout: z143.boolean(),
11277
+ checkoutUrl: z143.string().nullable()
11211
11278
  }),
11212
11279
  402: DefaultErrorResponseSchema,
11213
11280
  500: DefaultErrorResponseSchema
@@ -11219,7 +11286,7 @@ var subscriptionContract = initContract55().router(
11219
11286
  body: TopUpBalanceSchema,
11220
11287
  responses: {
11221
11288
  200: DefaultSuccessResponseSchema.extend({
11222
- checkoutUrl: z141.string()
11289
+ checkoutUrl: z143.string()
11223
11290
  }),
11224
11291
  500: DefaultErrorResponseSchema
11225
11292
  }
@@ -11230,7 +11297,7 @@ var subscriptionContract = initContract55().router(
11230
11297
  query: null,
11231
11298
  responses: {
11232
11299
  200: DefaultSuccessResponseSchema.extend({
11233
- balance: z141.number()
11300
+ balance: z143.number()
11234
11301
  }),
11235
11302
  500: DefaultErrorResponseSchema
11236
11303
  }
@@ -11241,7 +11308,7 @@ var subscriptionContract = initContract55().router(
11241
11308
  query: GetAvailablePlanSchema,
11242
11309
  responses: {
11243
11310
  200: DefaultSuccessResponseSchema.extend({
11244
- data: z141.array(ProductSchema)
11311
+ data: z143.array(ProductSchema)
11245
11312
  }),
11246
11313
  500: DefaultErrorResponseSchema
11247
11314
  }
@@ -11252,7 +11319,7 @@ var subscriptionContract = initContract55().router(
11252
11319
  query: GetAvailablePlanSchema,
11253
11320
  responses: {
11254
11321
  200: DefaultSuccessResponseSchema.extend({
11255
- data: z141.array(ProductSchema)
11322
+ data: z143.array(ProductSchema)
11256
11323
  }),
11257
11324
  500: DefaultErrorResponseSchema
11258
11325
  }
@@ -11275,19 +11342,19 @@ var subscriptionContract = initContract55().router(
11275
11342
 
11276
11343
  // src/cx-intelligence/index.ts
11277
11344
  import { initContract as initContract56 } from "@ts-rest/core";
11278
- import z142 from "zod";
11345
+ import z144 from "zod";
11279
11346
  var cxIntelligenceContract = initContract56().router(
11280
11347
  {
11281
11348
  toggle: {
11282
11349
  method: "POST",
11283
11350
  path: "/toggle",
11284
11351
  headers: DefaultHeaderSchema,
11285
- body: z142.object({
11286
- enabled: z142.union([z142.literal(true), z142.literal(false)])
11352
+ body: z144.object({
11353
+ enabled: z144.union([z144.literal(true), z144.literal(false)])
11287
11354
  }),
11288
11355
  responses: {
11289
11356
  200: DefaultSuccessResponseSchema.extend({
11290
- message: z142.string()
11357
+ message: z144.string()
11291
11358
  }),
11292
11359
  500: DefaultErrorResponseSchema
11293
11360
  },
@@ -11297,15 +11364,15 @@ var cxIntelligenceContract = initContract56().router(
11297
11364
  method: "POST",
11298
11365
  path: "/cx-logs/:id/transcribe",
11299
11366
  headers: DefaultHeaderSchema,
11300
- pathParams: z142.object({
11301
- id: z142.string().uuid()
11367
+ pathParams: z144.object({
11368
+ id: z144.string().uuid()
11302
11369
  }),
11303
- body: z142.object({
11304
- fileUrl: z142.string()
11370
+ body: z144.object({
11371
+ fileUrl: z144.string()
11305
11372
  }),
11306
11373
  responses: {
11307
11374
  200: DefaultSuccessResponseSchema.extend({
11308
- message: z142.string()
11375
+ message: z144.string()
11309
11376
  }),
11310
11377
  403: DefaultErrorResponseSchema,
11311
11378
  404: DefaultErrorResponseSchema,
@@ -11325,13 +11392,13 @@ var settingCxIntelligenceContract = initContract56().router(
11325
11392
  headers: DefaultHeaderSchema,
11326
11393
  responses: {
11327
11394
  200: DefaultSuccessResponseSchema.extend({
11328
- message: z142.string(),
11329
- status: z142.boolean()
11395
+ message: z144.string(),
11396
+ status: z144.boolean()
11330
11397
  }),
11331
- 422: z142.object({
11332
- requestId: z142.string(),
11333
- message: z142.string(),
11334
- status: z142.boolean()
11398
+ 422: z144.object({
11399
+ requestId: z144.string(),
11400
+ message: z144.string(),
11401
+ status: z144.boolean()
11335
11402
  }),
11336
11403
  500: DefaultErrorResponseSchema
11337
11404
  },
@@ -11343,20 +11410,20 @@ var settingCxIntelligenceContract = initContract56().router(
11343
11410
 
11344
11411
  // src/export/index.ts
11345
11412
  import { initContract as initContract57 } from "@ts-rest/core";
11346
- import z143 from "zod";
11413
+ import z145 from "zod";
11347
11414
  var exportContract = initContract57().router(
11348
11415
  {
11349
11416
  notifyExport: {
11350
11417
  method: "POST",
11351
11418
  path: "notify",
11352
- body: z143.object({
11353
- userId: z143.string().uuid(),
11354
- module: z143.string(),
11355
- fileUrl: z143.string()
11419
+ body: z145.object({
11420
+ userId: z145.string().uuid(),
11421
+ module: z145.string(),
11422
+ fileUrl: z145.string()
11356
11423
  }),
11357
11424
  responses: {
11358
11425
  200: DefaultSuccessResponseSchema.extend({
11359
- success: z143.boolean()
11426
+ success: z145.boolean()
11360
11427
  }),
11361
11428
  500: DefaultErrorResponseSchema
11362
11429
  }