@kl1/contracts 1.0.76 → 1.0.78

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
@@ -616,7 +616,7 @@ var categoryContract = initContract5().router(
616
616
 
617
617
  // src/channel/index.ts
618
618
  import { initContract as initContract6 } from "@ts-rest/core";
619
- import z31 from "zod";
619
+ import z32 from "zod";
620
620
 
621
621
  // src/messenger/validation.ts
622
622
  import z16 from "zod";
@@ -1555,6 +1555,37 @@ var ConnectViberChannelSchema = z30.object({
1555
1555
  accessToken: z30.string()
1556
1556
  });
1557
1557
 
1558
+ // src/instagram/validation.ts
1559
+ import z31 from "zod";
1560
+ var GetInstagramPagesSchema = z31.object({
1561
+ data: z31.array(
1562
+ z31.object({
1563
+ // biome-ignore lint/style/useNamingConvention: <explanation>
1564
+ access_token: z31.string(),
1565
+ // biome-ignore lint/style/useNamingConvention: <explanation>
1566
+ instagram_business_account: z31.object({
1567
+ username: z31.string(),
1568
+ name: z31.string(),
1569
+ // biome-ignore lint/style/useNamingConvention: <explanation>
1570
+ ig_id: z31.number().describe("Instagram ID"),
1571
+ id: z31.string().describe("Connected IG User ID")
1572
+ }),
1573
+ id: z31.string().describe("Facebook Page ID"),
1574
+ name: z31.string()
1575
+ })
1576
+ ),
1577
+ paging: z31.object({
1578
+ cursors: z31.object({
1579
+ before: z31.string().optional(),
1580
+ after: z31.string().optional()
1581
+ })
1582
+ }).optional()
1583
+ });
1584
+ var GetInstagramPagesQuerySchema = z31.object({
1585
+ accessToken: z31.string(),
1586
+ userId: z31.string()
1587
+ });
1588
+
1558
1589
  // src/channel/index.ts
1559
1590
  var messenger = initContract6().router(
1560
1591
  {
@@ -1594,7 +1625,7 @@ var instagram = initContract6().router(
1594
1625
  query: GetFacebookPagesQuerySchema,
1595
1626
  responses: {
1596
1627
  200: DefaultSuccessResponseSchema.extend({
1597
- data: GetFacebookPagesSchema
1628
+ data: GetInstagramPagesSchema
1598
1629
  }),
1599
1630
  500: DefaultErrorResponseSchema
1600
1631
  }
@@ -1670,8 +1701,8 @@ var channelContract = initContract6().router(
1670
1701
  disconnect: {
1671
1702
  method: "POST",
1672
1703
  path: "/disconnect/:channelId",
1673
- pathParams: z31.object({
1674
- channelId: z31.string().uuid()
1704
+ pathParams: z32.object({
1705
+ channelId: z32.string().uuid()
1675
1706
  }),
1676
1707
  responses: {
1677
1708
  200: DefaultSuccessResponseSchema.extend({
@@ -1685,8 +1716,8 @@ var channelContract = initContract6().router(
1685
1716
  delete: {
1686
1717
  method: "DELETE",
1687
1718
  path: "/delete/:channelId",
1688
- pathParams: z31.object({
1689
- channelId: z31.string().uuid()
1719
+ pathParams: z32.object({
1720
+ channelId: z32.string().uuid()
1690
1721
  }),
1691
1722
  responses: {
1692
1723
  200: DefaultSuccessResponseSchema.extend({
@@ -1694,14 +1725,14 @@ var channelContract = initContract6().router(
1694
1725
  }),
1695
1726
  408: DefaultErrorResponseSchema
1696
1727
  },
1697
- body: z31.any().optional(),
1728
+ body: z32.any().optional(),
1698
1729
  summary: "Delete message channel"
1699
1730
  },
1700
1731
  rename: {
1701
1732
  method: "POST",
1702
1733
  path: "/rename/:channelId",
1703
- pathParams: z31.object({
1704
- channelId: z31.string().uuid()
1734
+ pathParams: z32.object({
1735
+ channelId: z32.string().uuid()
1705
1736
  }),
1706
1737
  responses: {
1707
1738
  200: DefaultSuccessResponseSchema.extend({
@@ -1709,16 +1740,16 @@ var channelContract = initContract6().router(
1709
1740
  }),
1710
1741
  408: DefaultErrorResponseSchema
1711
1742
  },
1712
- body: z31.object({
1713
- brandName: z31.string()
1743
+ body: z32.object({
1744
+ brandName: z32.string()
1714
1745
  }),
1715
1746
  summary: "Rename message channel"
1716
1747
  },
1717
1748
  reconnect: {
1718
1749
  method: "POST",
1719
1750
  path: "/reconnect/:channelId",
1720
- pathParams: z31.object({
1721
- channelId: z31.string().uuid()
1751
+ pathParams: z32.object({
1752
+ channelId: z32.string().uuid()
1722
1753
  }),
1723
1754
  responses: {
1724
1755
  200: DefaultSuccessResponseSchema.extend({
@@ -1754,7 +1785,7 @@ var channelContract = initContract6().router(
1754
1785
 
1755
1786
  // src/chat/index.ts
1756
1787
  import { initContract as initContract7 } from "@ts-rest/core";
1757
- import z32 from "zod";
1788
+ import z33 from "zod";
1758
1789
  var receiveMessageContract = initContract7().router(
1759
1790
  {
1760
1791
  receiveMessage: {
@@ -1769,9 +1800,9 @@ var receiveMessageContract = initContract7().router(
1769
1800
  }
1770
1801
  },
1771
1802
  {
1772
- baseHeaders: z32.object({
1773
- "x-code": z32.string().uuid(),
1774
- "x-tenant": z32.string().uuid()
1803
+ baseHeaders: z33.object({
1804
+ "x-code": z33.string().uuid(),
1805
+ "x-tenant": z33.string().uuid()
1775
1806
  }),
1776
1807
  pathPrefix: "message"
1777
1808
  }
@@ -1783,11 +1814,11 @@ var mainChatContract = initContract7().router(
1783
1814
  path: "/rooms",
1784
1815
  responses: {
1785
1816
  200: DefaultSuccessResponseSchema.extend({
1786
- total: z32.number(),
1787
- page: z32.number(),
1788
- pageSize: z32.number(),
1789
- data: z32.array(RoomSchema),
1790
- unreadCountsByAssignee: z32.array(UnreadCountsByAssigneeSchema)
1817
+ total: z33.number(),
1818
+ page: z33.number(),
1819
+ pageSize: z33.number(),
1820
+ data: z33.array(RoomSchema),
1821
+ unreadCountsByAssignee: z33.array(UnreadCountsByAssigneeSchema)
1791
1822
  }),
1792
1823
  401: DefaultUnauthorizedSchema
1793
1824
  },
@@ -1797,8 +1828,8 @@ var mainChatContract = initContract7().router(
1797
1828
  getRoomContact: {
1798
1829
  method: "GET",
1799
1830
  path: "/contact/:contactId",
1800
- pathParams: z32.object({
1801
- contactId: z32.string().uuid()
1831
+ pathParams: z33.object({
1832
+ contactId: z33.string().uuid()
1802
1833
  }),
1803
1834
  responses: {
1804
1835
  200: DefaultSuccessResponseSchema.extend({
@@ -1832,32 +1863,32 @@ var mainChatContract = initContract7().router(
1832
1863
  getRoomsByPlatformContactId: {
1833
1864
  method: "GET",
1834
1865
  path: "/rooms/:platformContactId",
1835
- pathParams: z32.object({
1836
- platformContactId: z32.string()
1866
+ pathParams: z33.object({
1867
+ platformContactId: z33.string()
1837
1868
  }),
1838
1869
  responses: {
1839
1870
  200: DefaultSuccessResponseSchema.extend({
1840
- data: z32.array(
1841
- z32.object({
1842
- id: z32.string().uuid()
1871
+ data: z33.array(
1872
+ z33.object({
1873
+ id: z33.string().uuid()
1843
1874
  })
1844
1875
  ),
1845
- total: z32.number()
1876
+ total: z33.number()
1846
1877
  })
1847
1878
  }
1848
1879
  },
1849
1880
  getMessages: {
1850
1881
  method: "GET",
1851
1882
  path: "/message/:roomId",
1852
- pathParams: z32.object({
1853
- roomId: z32.string().uuid()
1883
+ pathParams: z33.object({
1884
+ roomId: z33.string().uuid()
1854
1885
  }),
1855
1886
  responses: {
1856
1887
  200: DefaultSuccessResponseSchema.extend({
1857
- total: z32.number(),
1858
- page: z32.number(),
1859
- pageSize: z32.number(),
1860
- data: z32.array(MessageSchema)
1888
+ total: z33.number(),
1889
+ page: z33.number(),
1890
+ pageSize: z33.number(),
1891
+ data: z33.array(MessageSchema)
1861
1892
  })
1862
1893
  },
1863
1894
  query: DefaultQueryParamsSchema,
@@ -1870,7 +1901,7 @@ var mainChatContract = initContract7().router(
1870
1901
  responses: {
1871
1902
  200: DefaultSuccessResponseSchema.extend({
1872
1903
  data: RoomSchema.extend({
1873
- solveMessage: z32.string()
1904
+ solveMessage: z33.string()
1874
1905
  })
1875
1906
  }),
1876
1907
  409: DefaultErrorResponseSchema
@@ -1891,8 +1922,8 @@ var mainChatContract = initContract7().router(
1891
1922
  getRoom: {
1892
1923
  method: "GET",
1893
1924
  path: "/room/:roomId",
1894
- pathParams: z32.object({
1895
- roomId: z32.string().uuid()
1925
+ pathParams: z33.object({
1926
+ roomId: z33.string().uuid()
1896
1927
  }),
1897
1928
  responses: {
1898
1929
  200: DefaultSuccessResponseSchema.extend({
@@ -1905,14 +1936,14 @@ var mainChatContract = initContract7().router(
1905
1936
  createRoom: {
1906
1937
  method: "POST",
1907
1938
  path: "/room/create/:platformContactId",
1908
- pathParams: z32.object({
1909
- platformContactId: z32.string().uuid()
1939
+ pathParams: z33.object({
1940
+ platformContactId: z33.string().uuid()
1910
1941
  }),
1911
1942
  responses: {
1912
1943
  200: DefaultSuccessResponseSchema.extend({
1913
1944
  data: RoomSchema.extend({
1914
1945
  contact: ContactSchema,
1915
- openMessage: z32.string()
1946
+ openMessage: z33.string()
1916
1947
  })
1917
1948
  })
1918
1949
  },
@@ -1922,13 +1953,13 @@ var mainChatContract = initContract7().router(
1922
1953
  readRoom: {
1923
1954
  method: "POST",
1924
1955
  path: "/room/read/:roomId",
1925
- pathParams: z32.object({
1926
- roomId: z32.string().uuid()
1956
+ pathParams: z33.object({
1957
+ roomId: z33.string().uuid()
1927
1958
  }),
1928
1959
  responses: {
1929
1960
  200: DefaultSuccessResponseSchema.extend({
1930
1961
  data: RoomSchema.extend({
1931
- description: z32.string().nullable()
1962
+ description: z33.string().nullable()
1932
1963
  })
1933
1964
  })
1934
1965
  },
@@ -1940,10 +1971,10 @@ var mainChatContract = initContract7().router(
1940
1971
  path: "/search",
1941
1972
  responses: {
1942
1973
  200: DefaultSuccessResponseSchema.extend({
1943
- total: z32.number(),
1944
- page: z32.number(),
1945
- pageSize: z32.number(),
1946
- data: z32.array(RoomSchema)
1974
+ total: z33.number(),
1975
+ page: z33.number(),
1976
+ pageSize: z33.number(),
1977
+ data: z33.array(RoomSchema)
1947
1978
  })
1948
1979
  },
1949
1980
  query: SearchRoomsSchema,
@@ -1958,89 +1989,89 @@ var mainChatContract = initContract7().router(
1958
1989
 
1959
1990
  // src/comment/index.ts
1960
1991
  import { initContract as initContract8 } from "@ts-rest/core";
1961
- import z36 from "zod";
1992
+ import z37 from "zod";
1962
1993
 
1963
1994
  // src/comment/validation.ts
1964
- import { z as z33 } from "zod";
1965
- var CreateCommentSchema = z33.object({
1966
- ticketId: z33.string(),
1967
- comment: z33.string(),
1968
- mentions: z33.array(z33.string()).optional()
1995
+ import { z as z34 } from "zod";
1996
+ var CreateCommentSchema = z34.object({
1997
+ ticketId: z34.string(),
1998
+ comment: z34.string(),
1999
+ mentions: z34.array(z34.string()).optional()
1969
2000
  });
1970
2001
  var UpdateCommentSchema = CreateCommentSchema;
1971
- var GetCommentQuerySchema = z33.object({
1972
- ticketId: z33.string().optional(),
1973
- deleted: z33.enum(["true", "false"]).default("false").transform((v) => v === "true" ? true : false)
2002
+ var GetCommentQuerySchema = z34.object({
2003
+ ticketId: z34.string().optional(),
2004
+ deleted: z34.enum(["true", "false"]).default("false").transform((v) => v === "true" ? true : false)
1974
2005
  }).optional();
1975
2006
 
1976
2007
  // src/comment/schema.ts
1977
- import z35 from "zod";
2008
+ import z36 from "zod";
1978
2009
 
1979
2010
  // src/ticket/schema.ts
1980
- import z34 from "zod";
2011
+ import z35 from "zod";
1981
2012
  var TicketCustomFieldSchema = DefaultEntitySchema.extend({
1982
- textValue: z34.string().nullable(),
1983
- booleanValue: z34.boolean().nullable(),
1984
- numberValue: z34.coerce.number().nullable(),
1985
- dateValue: z34.date().nullable(),
2013
+ textValue: z35.string().nullable(),
2014
+ booleanValue: z35.boolean().nullable(),
2015
+ numberValue: z35.coerce.number().nullable(),
2016
+ dateValue: z35.date().nullable(),
1986
2017
  attribute: AttributeSchema.omit({ options: true, group: true }),
1987
- uploads: z34.array(UploadSchema)
1988
- });
1989
- var TicketEntityTypesSchema = z34.object({
1990
- id: z34.string().uuid(),
1991
- createdAt: z34.date(),
1992
- updatedAt: z34.date(),
1993
- deletedAt: z34.date().nullable(),
1994
- entity: z34.string(),
1995
- description: z34.string().nullable()
1996
- });
1997
- var TicketActivitySchema = z34.object({
1998
- id: z34.string().uuid(),
1999
- createdAt: z34.date(),
2000
- updatedAt: z34.date(),
2001
- deletedAt: z34.date().nullable(),
2002
- entityId: z34.string(),
2003
- description: z34.string(),
2018
+ uploads: z35.array(UploadSchema)
2019
+ });
2020
+ var TicketEntityTypesSchema = z35.object({
2021
+ id: z35.string().uuid(),
2022
+ createdAt: z35.date(),
2023
+ updatedAt: z35.date(),
2024
+ deletedAt: z35.date().nullable(),
2025
+ entity: z35.string(),
2026
+ description: z35.string().nullable()
2027
+ });
2028
+ var TicketActivitySchema = z35.object({
2029
+ id: z35.string().uuid(),
2030
+ createdAt: z35.date(),
2031
+ updatedAt: z35.date(),
2032
+ deletedAt: z35.date().nullable(),
2033
+ entityId: z35.string(),
2034
+ description: z35.string(),
2004
2035
  entityType: TicketEntityTypesSchema
2005
2036
  });
2006
2037
  var TicketSchema = DefaultEntitySchema.extend({
2007
- title: z34.string(),
2008
- description: z34.string().nullable(),
2009
- type: z34.string(),
2010
- channel: z34.string(),
2011
- priority: z34.string(),
2012
- status: z34.string(),
2013
- contactId: z34.string().uuid(),
2014
- creatorId: z34.string().uuid(),
2038
+ title: z35.string(),
2039
+ description: z35.string().nullable(),
2040
+ type: z35.string(),
2041
+ channel: z35.string(),
2042
+ priority: z35.string(),
2043
+ status: z35.string(),
2044
+ contactId: z35.string().uuid(),
2045
+ creatorId: z35.string().uuid(),
2015
2046
  creator: UserSchema.optional().nullable(),
2016
- assigneeId: z34.string().uuid(),
2047
+ assigneeId: z35.string().uuid(),
2017
2048
  assignee: UserSchema.optional().nullable(),
2018
2049
  //note: all user info is actually not included, check with reponse data
2019
- reasonToAssign: z34.string().nullable(),
2020
- ticketNumber: z34.coerce.number().optional(),
2021
- customFields: z34.array(TicketCustomFieldSchema),
2022
- tags: z34.array(TagSchema),
2023
- categories: z34.array(CategorySchema),
2050
+ reasonToAssign: z35.string().nullable(),
2051
+ ticketNumber: z35.coerce.number().optional(),
2052
+ customFields: z35.array(TicketCustomFieldSchema),
2053
+ tags: z35.array(TagSchema),
2054
+ categories: z35.array(CategorySchema),
2024
2055
  contact: ContactSchema,
2025
- activityLogs: z34.array(ActivityLogSchema)
2056
+ activityLogs: z35.array(ActivityLogSchema)
2026
2057
  });
2027
- var TicketCountByContactSchema = z34.object({
2028
- total: z34.coerce.number(),
2029
- open: z34.coerce.number(),
2030
- pending: z34.coerce.number(),
2031
- closed: z34.coerce.number(),
2032
- solved: z34.coerce.number()
2058
+ var TicketCountByContactSchema = z35.object({
2059
+ total: z35.coerce.number(),
2060
+ open: z35.coerce.number(),
2061
+ pending: z35.coerce.number(),
2062
+ closed: z35.coerce.number(),
2063
+ solved: z35.coerce.number()
2033
2064
  });
2034
2065
 
2035
2066
  // src/comment/schema.ts
2036
- var CommentSchema = z35.object({
2037
- id: z35.string().uuid(),
2038
- createdAt: z35.date(),
2039
- updatedAt: z35.date(),
2040
- deletedAt: z35.date().nullable(),
2041
- activityLogs: z35.array(ActivityLogSchema),
2042
- comment: z35.string(),
2043
- mentions: z35.array(z35.string()),
2067
+ var CommentSchema = z36.object({
2068
+ id: z36.string().uuid(),
2069
+ createdAt: z36.date(),
2070
+ updatedAt: z36.date(),
2071
+ deletedAt: z36.date().nullable(),
2072
+ activityLogs: z36.array(ActivityLogSchema),
2073
+ comment: z36.string(),
2074
+ mentions: z36.array(z36.string()),
2044
2075
  ticket: TicketSchema,
2045
2076
  agent: UserSchema
2046
2077
  });
@@ -2057,8 +2088,8 @@ var commentContract = initContract8().router(
2057
2088
  201: DefaultSuccessResponseSchema.extend({
2058
2089
  comment: CommentSchema
2059
2090
  }),
2060
- 400: z36.object({
2061
- message: z36.string()
2091
+ 400: z37.object({
2092
+ message: z37.string()
2062
2093
  }),
2063
2094
  401: DefaultUnauthorizedSchema,
2064
2095
  500: DefaultErrorResponseSchema
@@ -2071,9 +2102,9 @@ var commentContract = initContract8().router(
2071
2102
  headers: DefaultHeaderSchema,
2072
2103
  query: GetCommentQuerySchema,
2073
2104
  responses: {
2074
- 201: z36.array(CommentSchema),
2075
- 400: z36.object({
2076
- message: z36.string()
2105
+ 201: z37.array(CommentSchema),
2106
+ 400: z37.object({
2107
+ message: z37.string()
2077
2108
  }),
2078
2109
  401: DefaultUnauthorizedSchema,
2079
2110
  500: DefaultErrorResponseSchema
@@ -2083,7 +2114,7 @@ var commentContract = initContract8().router(
2083
2114
  updateComment: {
2084
2115
  method: "PATCH",
2085
2116
  path: "/:id",
2086
- pathParams: z36.object({ id: z36.string() }),
2117
+ pathParams: z37.object({ id: z37.string() }),
2087
2118
  headers: DefaultHeaderSchema,
2088
2119
  body: UpdateCommentSchema,
2089
2120
  responses: {
@@ -2097,11 +2128,11 @@ var commentContract = initContract8().router(
2097
2128
  deleteComment: {
2098
2129
  method: "DELETE",
2099
2130
  path: "/:id",
2100
- pathParams: z36.object({ id: z36.string() }),
2131
+ pathParams: z37.object({ id: z37.string() }),
2101
2132
  headers: DefaultHeaderSchema,
2102
2133
  body: null,
2103
2134
  responses: {
2104
- 200: DefaultSuccessResponseSchema.extend({ message: z36.string() }),
2135
+ 200: DefaultSuccessResponseSchema.extend({ message: z37.string() }),
2105
2136
  500: DefaultErrorResponseSchema
2106
2137
  },
2107
2138
  summary: "Delete a comment."
@@ -2112,61 +2143,61 @@ var commentContract = initContract8().router(
2112
2143
 
2113
2144
  // src/company/index.ts
2114
2145
  import { initContract as initContract9 } from "@ts-rest/core";
2115
- import z38 from "zod";
2146
+ import z39 from "zod";
2116
2147
 
2117
2148
  // src/company/validation.ts
2118
- import z37 from "zod";
2119
- var BaseSchema = z37.object({
2120
- isRequired: z37.boolean(),
2121
- attributeId: z37.string().uuid()
2149
+ import z38 from "zod";
2150
+ var BaseSchema = z38.object({
2151
+ isRequired: z38.boolean(),
2152
+ attributeId: z38.string().uuid()
2122
2153
  });
2123
2154
  var CompanyContractsValidationSchema = {
2124
2155
  create: {
2125
- request: z37.object({
2126
- name: z37.object({ value: z37.string() }),
2127
- phone: z37.object({ value: z37.string() }),
2128
- address: z37.object({ value: z37.string() }),
2129
- industry: z37.object({ value: z37.string() }),
2130
- customFields: z37.array(
2156
+ request: z38.object({
2157
+ name: z38.object({ value: z38.string() }),
2158
+ phone: z38.object({ value: z38.string() }),
2159
+ address: z38.object({ value: z38.string() }),
2160
+ industry: z38.object({ value: z38.string() }),
2161
+ customFields: z38.array(
2131
2162
  BaseSchema.extend({
2132
- value: z37.union([z37.string(), z37.array(z37.string())]),
2133
- type: z37.string(),
2134
- isDefaultAttribute: z37.boolean()
2163
+ value: z38.union([z38.string(), z38.array(z38.string())]),
2164
+ type: z38.string(),
2165
+ isDefaultAttribute: z38.boolean()
2135
2166
  })
2136
2167
  )
2137
2168
  }),
2138
2169
  response: CompanySchema
2139
2170
  },
2140
2171
  getById: {
2141
- request: z37.object({
2142
- id: z37.string().uuid()
2172
+ request: z38.object({
2173
+ id: z38.string().uuid()
2143
2174
  }),
2144
2175
  response: CompanySchema
2145
2176
  },
2146
2177
  getAll: {
2147
- request: z37.object({
2148
- page: z37.coerce.number().default(1),
2149
- pageSize: z37.coerce.number().default(10),
2150
- keyword: z37.string().optional(),
2151
- industry: z37.array(z37.string()),
2152
- name: z37.string(),
2153
- address: z37.string(),
2154
- phone: z37.string(),
2155
- selectedDate: z37.string(),
2156
- customFields: z37.array(
2157
- z37.object({
2158
- attributeId: z37.string().uuid(),
2159
- type: z37.string(),
2160
- value: z37.union([z37.string(), z37.array(z37.string())])
2178
+ request: z38.object({
2179
+ page: z38.coerce.number().default(1),
2180
+ pageSize: z38.coerce.number().default(10),
2181
+ keyword: z38.string().optional(),
2182
+ industry: z38.array(z38.string()),
2183
+ name: z38.string(),
2184
+ address: z38.string(),
2185
+ phone: z38.string(),
2186
+ selectedDate: z38.string(),
2187
+ customFields: z38.array(
2188
+ z38.object({
2189
+ attributeId: z38.string().uuid(),
2190
+ type: z38.string(),
2191
+ value: z38.union([z38.string(), z38.array(z38.string())])
2161
2192
  })
2162
2193
  )
2163
2194
  }).partial(),
2164
2195
  response: {
2165
- page: z37.number(),
2166
- pageSize: z37.number(),
2167
- total: z37.number(),
2168
- lastPage: z37.number(),
2169
- data: z37.array(CompanySchema)
2196
+ page: z38.number(),
2197
+ pageSize: z38.number(),
2198
+ total: z38.number(),
2199
+ lastPage: z38.number(),
2200
+ data: z38.array(CompanySchema)
2170
2201
  }
2171
2202
  }
2172
2203
  };
@@ -2181,14 +2212,14 @@ var companyContract = initContract9().router(
2181
2212
  201: DefaultSuccessResponseSchema.extend({
2182
2213
  data: CompanyContractsValidationSchema.create.response
2183
2214
  }),
2184
- 400: z38.object({
2185
- message: z38.string()
2215
+ 400: z39.object({
2216
+ message: z39.string()
2186
2217
  }),
2187
- 409: z38.object({
2188
- message: z38.string()
2218
+ 409: z39.object({
2219
+ message: z39.string()
2189
2220
  }),
2190
- 500: z38.object({
2191
- message: z38.string()
2221
+ 500: z39.object({
2222
+ message: z39.string()
2192
2223
  }),
2193
2224
  401: DefaultUnauthorizedSchema,
2194
2225
  404: DefaultNotFoundSchema,
@@ -2200,21 +2231,21 @@ var companyContract = initContract9().router(
2200
2231
  update: {
2201
2232
  method: "PATCH",
2202
2233
  path: "/:id",
2203
- pathParams: z38.object({
2204
- id: z38.string().uuid()
2234
+ pathParams: z39.object({
2235
+ id: z39.string().uuid()
2205
2236
  }),
2206
2237
  responses: {
2207
2238
  201: DefaultSuccessResponseSchema.extend({
2208
2239
  data: CompanyContractsValidationSchema.create.response
2209
2240
  }),
2210
- 400: z38.object({
2211
- message: z38.string()
2241
+ 400: z39.object({
2242
+ message: z39.string()
2212
2243
  }),
2213
- 409: z38.object({
2214
- message: z38.string()
2244
+ 409: z39.object({
2245
+ message: z39.string()
2215
2246
  }),
2216
- 500: z38.object({
2217
- message: z38.string()
2247
+ 500: z39.object({
2248
+ message: z39.string()
2218
2249
  }),
2219
2250
  401: DefaultUnauthorizedSchema,
2220
2251
  404: DefaultNotFoundSchema,
@@ -2226,21 +2257,21 @@ var companyContract = initContract9().router(
2226
2257
  delete: {
2227
2258
  method: "DELETE",
2228
2259
  path: "/:id",
2229
- pathParams: z38.object({
2230
- id: z38.string().uuid()
2260
+ pathParams: z39.object({
2261
+ id: z39.string().uuid()
2231
2262
  }),
2232
2263
  responses: {
2233
2264
  201: DefaultSuccessResponseSchema.extend({
2234
- message: z38.string()
2265
+ message: z39.string()
2235
2266
  }),
2236
- 400: z38.object({
2237
- message: z38.string()
2267
+ 400: z39.object({
2268
+ message: z39.string()
2238
2269
  }),
2239
- 409: z38.object({
2240
- message: z38.string()
2270
+ 409: z39.object({
2271
+ message: z39.string()
2241
2272
  }),
2242
- 500: z38.object({
2243
- message: z38.string()
2273
+ 500: z39.object({
2274
+ message: z39.string()
2244
2275
  }),
2245
2276
  401: DefaultUnauthorizedSchema,
2246
2277
  404: DefaultNotFoundSchema,
@@ -2257,14 +2288,14 @@ var companyContract = initContract9().router(
2257
2288
  200: DefaultSuccessResponseSchema.extend({
2258
2289
  data: CompanyContractsValidationSchema.create.response
2259
2290
  }),
2260
- 400: z38.object({
2261
- message: z38.string()
2291
+ 400: z39.object({
2292
+ message: z39.string()
2262
2293
  }),
2263
- 409: z38.object({
2264
- message: z38.string()
2294
+ 409: z39.object({
2295
+ message: z39.string()
2265
2296
  }),
2266
- 500: z38.object({
2267
- message: z38.string()
2297
+ 500: z39.object({
2298
+ message: z39.string()
2268
2299
  }),
2269
2300
  401: DefaultUnauthorizedSchema,
2270
2301
  404: DefaultNotFoundSchema,
@@ -2280,14 +2311,14 @@ var companyContract = initContract9().router(
2280
2311
  200: DefaultSuccessResponseSchema.extend({
2281
2312
  ...CompanyContractsValidationSchema.getAll.response
2282
2313
  }),
2283
- 400: z38.object({
2284
- message: z38.string()
2314
+ 400: z39.object({
2315
+ message: z39.string()
2285
2316
  }),
2286
- 409: z38.object({
2287
- message: z38.string()
2317
+ 409: z39.object({
2318
+ message: z39.string()
2288
2319
  }),
2289
- 500: z38.object({
2290
- message: z38.string()
2320
+ 500: z39.object({
2321
+ message: z39.string()
2291
2322
  }),
2292
2323
  401: DefaultUnauthorizedSchema,
2293
2324
  404: DefaultNotFoundSchema,
@@ -2303,10 +2334,10 @@ var companyContract = initContract9().router(
2303
2334
 
2304
2335
  // src/contact/index.ts
2305
2336
  import { initContract as initContract10 } from "@ts-rest/core";
2306
- import z40 from "zod";
2337
+ import z41 from "zod";
2307
2338
 
2308
2339
  // src/contact/validation.ts
2309
- import z39 from "zod";
2340
+ import z40 from "zod";
2310
2341
  var addErrorMessage = (field) => {
2311
2342
  return field.refine(
2312
2343
  ({ isRequired, value }) => {
@@ -2324,25 +2355,25 @@ var addErrorMessage = (field) => {
2324
2355
  }
2325
2356
  );
2326
2357
  };
2327
- var BaseSchema2 = z39.object({
2328
- isRequired: z39.boolean(),
2329
- attributeId: z39.string()
2358
+ var BaseSchema2 = z40.object({
2359
+ isRequired: z40.boolean(),
2360
+ attributeId: z40.string()
2330
2361
  });
2331
2362
  var SingleValue = addErrorMessage(
2332
2363
  BaseSchema2.extend({
2333
- value: z39.string()
2364
+ value: z40.string()
2334
2365
  })
2335
2366
  );
2336
2367
  var ContactContractValidationSchema = {
2337
2368
  create: {
2338
- request: z39.object({
2369
+ request: z40.object({
2339
2370
  name: SingleValue,
2340
2371
  email: addErrorMessage(
2341
2372
  BaseSchema2.extend({
2342
- value: z39.array(
2343
- z39.object({
2344
- email: z39.string().email(),
2345
- isPrimary: z39.boolean()
2373
+ value: z40.array(
2374
+ z40.object({
2375
+ email: z40.string().email(),
2376
+ isPrimary: z40.boolean()
2346
2377
  })
2347
2378
  )
2348
2379
  })
@@ -2351,10 +2382,10 @@ var ContactContractValidationSchema = {
2351
2382
  address: SingleValue,
2352
2383
  phone: addErrorMessage(
2353
2384
  BaseSchema2.extend({
2354
- value: z39.array(
2355
- z39.object({
2356
- phone: z39.string(),
2357
- isPrimary: z39.boolean()
2385
+ value: z40.array(
2386
+ z40.object({
2387
+ phone: z40.string(),
2388
+ isPrimary: z40.boolean()
2358
2389
  })
2359
2390
  )
2360
2391
  })
@@ -2362,67 +2393,67 @@ var ContactContractValidationSchema = {
2362
2393
  notes: SingleValue,
2363
2394
  tags: addErrorMessage(
2364
2395
  BaseSchema2.extend({
2365
- value: z39.array(z39.string())
2396
+ value: z40.array(z40.string())
2366
2397
  })
2367
2398
  ),
2368
2399
  company: SingleValue,
2369
- customFields: z39.array(
2400
+ customFields: z40.array(
2370
2401
  addErrorMessage(
2371
2402
  BaseSchema2.extend({
2372
- value: z39.union([z39.string(), z39.array(z39.string())]),
2373
- type: z39.string(),
2374
- isDefaultAttribute: z39.boolean()
2403
+ value: z40.union([z40.string(), z40.array(z40.string())]),
2404
+ type: z40.string(),
2405
+ isDefaultAttribute: z40.boolean()
2375
2406
  })
2376
2407
  )
2377
2408
  )
2378
2409
  }),
2379
- response: z39.string()
2410
+ response: z40.string()
2380
2411
  },
2381
2412
  getById: {
2382
- request: z39.object({
2383
- id: z39.string().uuid()
2413
+ request: z40.object({
2414
+ id: z40.string().uuid()
2384
2415
  }),
2385
2416
  response: ContactSchema
2386
2417
  },
2387
2418
  delete: {
2388
- request: z39.object({
2389
- id: z39.string().uuid()
2419
+ request: z40.object({
2420
+ id: z40.string().uuid()
2390
2421
  }),
2391
- response: z39.string()
2422
+ response: z40.string()
2392
2423
  },
2393
2424
  getAll: {
2394
- request: z39.object({
2395
- page: z39.coerce.number().default(1),
2396
- pageSize: z39.coerce.number().default(10),
2397
- keyword: z39.string().optional(),
2398
- company: z39.array(z39.string().uuid()),
2399
- name: z39.string(),
2400
- address: z39.string(),
2401
- channel: z39.array(z39.string()),
2402
- selectedDate: z39.string(),
2403
- customFields: z39.array(
2404
- z39.object({
2405
- attributeId: z39.string().uuid(),
2406
- type: z39.string(),
2407
- value: z39.union([z39.string(), z39.array(z39.string())])
2425
+ request: z40.object({
2426
+ page: z40.coerce.number().default(1),
2427
+ pageSize: z40.coerce.number().default(10),
2428
+ keyword: z40.string().optional(),
2429
+ company: z40.array(z40.string().uuid()),
2430
+ name: z40.string(),
2431
+ address: z40.string(),
2432
+ channel: z40.array(z40.string()),
2433
+ selectedDate: z40.string(),
2434
+ customFields: z40.array(
2435
+ z40.object({
2436
+ attributeId: z40.string().uuid(),
2437
+ type: z40.string(),
2438
+ value: z40.union([z40.string(), z40.array(z40.string())])
2408
2439
  })
2409
2440
  ),
2410
- tags: z39.array(z39.string().uuid()),
2411
- phone: z39.string(),
2412
- email: z39.string(),
2413
- notes: z39.string()
2441
+ tags: z40.array(z40.string().uuid()),
2442
+ phone: z40.string(),
2443
+ email: z40.string(),
2444
+ notes: z40.string()
2414
2445
  }).partial(),
2415
2446
  response: {
2416
- page: z39.number(),
2417
- pageSize: z39.number(),
2418
- total: z39.number(),
2419
- lastPage: z39.number(),
2420
- data: z39.array(ContactSchema)
2447
+ page: z40.number(),
2448
+ pageSize: z40.number(),
2449
+ total: z40.number(),
2450
+ lastPage: z40.number(),
2451
+ data: z40.array(ContactSchema)
2421
2452
  }
2422
2453
  },
2423
2454
  createContactByPhone: {
2424
- request: z39.object({
2425
- phoneNumber: z39.string().refine(
2455
+ request: z40.object({
2456
+ phoneNumber: z40.string().refine(
2426
2457
  (value) => {
2427
2458
  const numericValue = value.replace(/\s/g, "");
2428
2459
  return /^\d+$/.test(numericValue);
@@ -2435,8 +2466,8 @@ var ContactContractValidationSchema = {
2435
2466
  response: ContactSchema
2436
2467
  },
2437
2468
  updateContactByPhone: {
2438
- request: z39.object({
2439
- phoneNumber: z39.string().refine(
2469
+ request: z40.object({
2470
+ phoneNumber: z40.string().refine(
2440
2471
  (value) => {
2441
2472
  const numericValue = value.replace(/\s/g, "");
2442
2473
  return /^\d+$/.test(numericValue);
@@ -2449,72 +2480,72 @@ var ContactContractValidationSchema = {
2449
2480
  response: ContactSchema
2450
2481
  },
2451
2482
  updateFromOngoingCall: {
2452
- request: z39.object({
2453
- name: z39.string(),
2454
- companyId: z39.string().uuid()
2483
+ request: z40.object({
2484
+ name: z40.string(),
2485
+ companyId: z40.string().uuid()
2455
2486
  }).partial(),
2456
2487
  response: ContactSchema
2457
2488
  },
2458
2489
  merge: {
2459
- request: z39.object({
2460
- primaryContact: z39.object({
2461
- id: z39.string().uuid(),
2462
- emails: z39.array(
2463
- z39.object({
2464
- email: z39.string().email(),
2465
- isPrimary: z39.boolean()
2490
+ request: z40.object({
2491
+ primaryContact: z40.object({
2492
+ id: z40.string().uuid(),
2493
+ emails: z40.array(
2494
+ z40.object({
2495
+ email: z40.string().email(),
2496
+ isPrimary: z40.boolean()
2466
2497
  })
2467
2498
  ),
2468
- phones: z39.array(
2469
- z39.object({
2470
- phone: z39.string(),
2471
- isPrimary: z39.boolean()
2499
+ phones: z40.array(
2500
+ z40.object({
2501
+ phone: z40.string(),
2502
+ isPrimary: z40.boolean()
2472
2503
  })
2473
2504
  )
2474
2505
  }),
2475
- secondaryContacts: z39.array(z39.string().uuid())
2506
+ secondaryContacts: z40.array(z40.string().uuid())
2476
2507
  }),
2477
2508
  response: ContactSchema
2478
2509
  },
2479
2510
  checkContactPhone: {
2480
- request: z39.object({
2481
- contactId: z39.string().uuid().optional(),
2482
- phoneNumber: z39.string()
2511
+ request: z40.object({
2512
+ contactId: z40.string().uuid().optional(),
2513
+ phoneNumber: z40.string()
2483
2514
  }),
2484
- response: z39.boolean()
2515
+ response: z40.boolean()
2485
2516
  },
2486
2517
  checkContactEmail: {
2487
- request: z39.object({
2488
- contactId: z39.string().uuid().optional(),
2489
- email: z39.string()
2518
+ request: z40.object({
2519
+ contactId: z40.string().uuid().optional(),
2520
+ email: z40.string()
2490
2521
  }),
2491
- response: z39.boolean()
2522
+ response: z40.boolean()
2492
2523
  },
2493
2524
  filterContacts: {
2494
- request: z39.object({
2495
- page: z39.coerce.number().default(1),
2496
- pageSize: z39.coerce.number().default(10),
2497
- keyword: z39.string()
2525
+ request: z40.object({
2526
+ page: z40.coerce.number().default(1),
2527
+ pageSize: z40.coerce.number().default(10),
2528
+ keyword: z40.string()
2498
2529
  }).partial(),
2499
2530
  response: {
2500
- page: z39.number(),
2501
- pageSize: z39.number(),
2502
- total: z39.number(),
2503
- lastPage: z39.number(),
2504
- data: z39.array(ContactSchema)
2531
+ page: z40.number(),
2532
+ pageSize: z40.number(),
2533
+ total: z40.number(),
2534
+ lastPage: z40.number(),
2535
+ data: z40.array(ContactSchema)
2505
2536
  }
2506
2537
  },
2507
2538
  addAttachments: {
2508
- request: z39.object({
2509
- contactId: z39.string(),
2510
- attributeId: z39.string().uuid(),
2511
- contactAttachmentRecords: z39.array(
2512
- z39.object({
2513
- bucketName: z39.string(),
2514
- fileKey: z39.string(),
2515
- fileName: z39.string(),
2516
- fileSize: z39.coerce.number(),
2517
- url: z39.string()
2539
+ request: z40.object({
2540
+ contactId: z40.string(),
2541
+ attributeId: z40.string().uuid(),
2542
+ contactAttachmentRecords: z40.array(
2543
+ z40.object({
2544
+ bucketName: z40.string(),
2545
+ fileKey: z40.string(),
2546
+ fileName: z40.string(),
2547
+ fileSize: z40.coerce.number(),
2548
+ url: z40.string()
2518
2549
  })
2519
2550
  )
2520
2551
  }),
@@ -2533,14 +2564,14 @@ var contactContract = initContract10().router(
2533
2564
  201: DefaultSuccessResponseSchema.extend({
2534
2565
  data: ContactSchema
2535
2566
  }),
2536
- 400: z40.object({
2537
- message: z40.string()
2567
+ 400: z41.object({
2568
+ message: z41.string()
2538
2569
  }),
2539
- 409: z40.object({
2540
- message: z40.string()
2570
+ 409: z41.object({
2571
+ message: z41.string()
2541
2572
  }),
2542
- 500: z40.object({
2543
- message: z40.string()
2573
+ 500: z41.object({
2574
+ message: z41.string()
2544
2575
  }),
2545
2576
  401: DefaultUnauthorizedSchema,
2546
2577
  404: DefaultNotFoundSchema,
@@ -2556,14 +2587,14 @@ var contactContract = initContract10().router(
2556
2587
  200: DefaultSuccessResponseSchema.extend(
2557
2588
  ContactContractValidationSchema.getAll.response
2558
2589
  ),
2559
- 400: z40.object({
2560
- message: z40.string()
2590
+ 400: z41.object({
2591
+ message: z41.string()
2561
2592
  }),
2562
- 409: z40.object({
2563
- message: z40.string()
2593
+ 409: z41.object({
2594
+ message: z41.string()
2564
2595
  }),
2565
- 500: z40.object({
2566
- message: z40.string()
2596
+ 500: z41.object({
2597
+ message: z41.string()
2567
2598
  }),
2568
2599
  401: DefaultUnauthorizedSchema,
2569
2600
  404: DefaultNotFoundSchema,
@@ -2579,14 +2610,14 @@ var contactContract = initContract10().router(
2579
2610
  200: DefaultSuccessResponseSchema.extend(
2580
2611
  ContactContractValidationSchema.filterContacts.response
2581
2612
  ),
2582
- 400: z40.object({
2583
- message: z40.string()
2613
+ 400: z41.object({
2614
+ message: z41.string()
2584
2615
  }),
2585
- 409: z40.object({
2586
- message: z40.string()
2616
+ 409: z41.object({
2617
+ message: z41.string()
2587
2618
  }),
2588
- 500: z40.object({
2589
- message: z40.string()
2619
+ 500: z41.object({
2620
+ message: z41.string()
2590
2621
  }),
2591
2622
  401: DefaultUnauthorizedSchema,
2592
2623
  404: DefaultNotFoundSchema,
@@ -2602,14 +2633,14 @@ var contactContract = initContract10().router(
2602
2633
  200: DefaultSuccessResponseSchema.extend({
2603
2634
  data: ContactContractValidationSchema.getById.response
2604
2635
  }),
2605
- 400: z40.object({
2606
- message: z40.string()
2636
+ 400: z41.object({
2637
+ message: z41.string()
2607
2638
  }),
2608
- 409: z40.object({
2609
- message: z40.string()
2639
+ 409: z41.object({
2640
+ message: z41.string()
2610
2641
  }),
2611
- 500: z40.object({
2612
- message: z40.string()
2642
+ 500: z41.object({
2643
+ message: z41.string()
2613
2644
  }),
2614
2645
  401: DefaultUnauthorizedSchema,
2615
2646
  404: DefaultNotFoundSchema,
@@ -2626,14 +2657,14 @@ var contactContract = initContract10().router(
2626
2657
  200: DefaultSuccessResponseSchema.extend({
2627
2658
  message: ContactContractValidationSchema.delete.response
2628
2659
  }),
2629
- 400: z40.object({
2630
- message: z40.string()
2660
+ 400: z41.object({
2661
+ message: z41.string()
2631
2662
  }),
2632
- 409: z40.object({
2633
- message: z40.string()
2663
+ 409: z41.object({
2664
+ message: z41.string()
2634
2665
  }),
2635
- 500: z40.object({
2636
- message: z40.string()
2666
+ 500: z41.object({
2667
+ message: z41.string()
2637
2668
  }),
2638
2669
  401: DefaultUnauthorizedSchema,
2639
2670
  404: DefaultNotFoundSchema,
@@ -2649,14 +2680,14 @@ var contactContract = initContract10().router(
2649
2680
  201: DefaultSuccessResponseSchema.extend({
2650
2681
  data: ContactContractValidationSchema.createContactByPhone.response
2651
2682
  }),
2652
- 400: z40.object({
2653
- message: z40.string()
2683
+ 400: z41.object({
2684
+ message: z41.string()
2654
2685
  }),
2655
- 409: z40.object({
2656
- message: z40.string()
2686
+ 409: z41.object({
2687
+ message: z41.string()
2657
2688
  }),
2658
- 500: z40.object({
2659
- message: z40.string()
2689
+ 500: z41.object({
2690
+ message: z41.string()
2660
2691
  }),
2661
2692
  401: DefaultUnauthorizedSchema,
2662
2693
  404: DefaultNotFoundSchema,
@@ -2672,14 +2703,14 @@ var contactContract = initContract10().router(
2672
2703
  201: DefaultSuccessResponseSchema.extend({
2673
2704
  data: ContactContractValidationSchema.updateFromOngoingCall.response
2674
2705
  }),
2675
- 400: z40.object({
2676
- message: z40.string()
2706
+ 400: z41.object({
2707
+ message: z41.string()
2677
2708
  }),
2678
- 409: z40.object({
2679
- message: z40.string()
2709
+ 409: z41.object({
2710
+ message: z41.string()
2680
2711
  }),
2681
- 500: z40.object({
2682
- message: z40.string()
2712
+ 500: z41.object({
2713
+ message: z41.string()
2683
2714
  }),
2684
2715
  401: DefaultUnauthorizedSchema,
2685
2716
  404: DefaultNotFoundSchema,
@@ -2695,14 +2726,14 @@ var contactContract = initContract10().router(
2695
2726
  200: DefaultSuccessResponseSchema.extend({
2696
2727
  data: ContactContractValidationSchema.merge.response
2697
2728
  }),
2698
- 400: z40.object({
2699
- message: z40.string()
2729
+ 400: z41.object({
2730
+ message: z41.string()
2700
2731
  }),
2701
- 409: z40.object({
2702
- message: z40.string()
2732
+ 409: z41.object({
2733
+ message: z41.string()
2703
2734
  }),
2704
- 500: z40.object({
2705
- message: z40.string()
2735
+ 500: z41.object({
2736
+ message: z41.string()
2706
2737
  }),
2707
2738
  401: DefaultUnauthorizedSchema,
2708
2739
  404: DefaultNotFoundSchema,
@@ -2718,14 +2749,14 @@ var contactContract = initContract10().router(
2718
2749
  200: DefaultSuccessResponseSchema.extend({
2719
2750
  existed: ContactContractValidationSchema.checkContactPhone.response
2720
2751
  }),
2721
- 400: z40.object({
2722
- message: z40.string()
2752
+ 400: z41.object({
2753
+ message: z41.string()
2723
2754
  }),
2724
- 409: z40.object({
2725
- message: z40.string()
2755
+ 409: z41.object({
2756
+ message: z41.string()
2726
2757
  }),
2727
- 500: z40.object({
2728
- message: z40.string()
2758
+ 500: z41.object({
2759
+ message: z41.string()
2729
2760
  }),
2730
2761
  401: DefaultUnauthorizedSchema,
2731
2762
  404: DefaultNotFoundSchema,
@@ -2741,14 +2772,14 @@ var contactContract = initContract10().router(
2741
2772
  200: DefaultSuccessResponseSchema.extend({
2742
2773
  existed: ContactContractValidationSchema.checkContactEmail.response
2743
2774
  }),
2744
- 400: z40.object({
2745
- message: z40.string()
2775
+ 400: z41.object({
2776
+ message: z41.string()
2746
2777
  }),
2747
- 409: z40.object({
2748
- message: z40.string()
2778
+ 409: z41.object({
2779
+ message: z41.string()
2749
2780
  }),
2750
- 500: z40.object({
2751
- message: z40.string()
2781
+ 500: z41.object({
2782
+ message: z41.string()
2752
2783
  }),
2753
2784
  401: DefaultUnauthorizedSchema,
2754
2785
  404: DefaultNotFoundSchema,
@@ -2765,14 +2796,14 @@ var contactContract = initContract10().router(
2765
2796
  201: DefaultSuccessResponseSchema.extend({
2766
2797
  message: ContactCustomFieldSchema
2767
2798
  }),
2768
- 400: z40.object({
2769
- message: z40.string()
2799
+ 400: z41.object({
2800
+ message: z41.string()
2770
2801
  }),
2771
- 409: z40.object({
2772
- message: z40.string()
2802
+ 409: z41.object({
2803
+ message: z41.string()
2773
2804
  }),
2774
- 500: z40.object({
2775
- message: z40.string()
2805
+ 500: z41.object({
2806
+ message: z41.string()
2776
2807
  }),
2777
2808
  401: DefaultUnauthorizedSchema,
2778
2809
  404: DefaultNotFoundSchema,
@@ -2788,14 +2819,14 @@ var contactContract = initContract10().router(
2788
2819
  200: DefaultSuccessResponseSchema.extend({
2789
2820
  data: ContactContractValidationSchema.getById.response
2790
2821
  }),
2791
- 400: z40.object({
2792
- message: z40.string()
2822
+ 400: z41.object({
2823
+ message: z41.string()
2793
2824
  }),
2794
- 409: z40.object({
2795
- message: z40.string()
2825
+ 409: z41.object({
2826
+ message: z41.string()
2796
2827
  }),
2797
- 500: z40.object({
2798
- message: z40.string()
2828
+ 500: z41.object({
2829
+ message: z41.string()
2799
2830
  }),
2800
2831
  401: DefaultUnauthorizedSchema,
2801
2832
  404: DefaultNotFoundSchema,
@@ -2809,8 +2840,8 @@ var contactContract = initContract10().router(
2809
2840
  query: ContactContractValidationSchema.getAll.request,
2810
2841
  responses: {
2811
2842
  200: null,
2812
- 400: z40.object({
2813
- message: z40.string()
2843
+ 400: z41.object({
2844
+ message: z41.string()
2814
2845
  }),
2815
2846
  401: DefaultUnauthorizedSchema,
2816
2847
  404: DefaultNotFoundSchema
@@ -2825,46 +2856,46 @@ var contactContract = initContract10().router(
2825
2856
 
2826
2857
  // src/cx-log/index.ts
2827
2858
  import { initContract as initContract11 } from "@ts-rest/core";
2828
- import z42 from "zod";
2859
+ import z43 from "zod";
2829
2860
 
2830
2861
  // src/cx-log/validation.ts
2831
- import z41 from "zod";
2832
- var sentimentScoreSchema = z41.union([
2833
- z41.literal("positive"),
2834
- z41.literal("negative")
2862
+ import z42 from "zod";
2863
+ var sentimentScoreSchema = z42.union([
2864
+ z42.literal("positive"),
2865
+ z42.literal("negative")
2835
2866
  ]);
2836
- var CustomFieldQueryParamsSchema = z41.object({
2837
- attributeId: z41.string(),
2838
- value: z41.union([z41.string(), z41.array(z41.string())]),
2839
- type: z41.string().optional()
2867
+ var CustomFieldQueryParamsSchema = z42.object({
2868
+ attributeId: z42.string(),
2869
+ value: z42.union([z42.string(), z42.array(z42.string())]),
2870
+ type: z42.string().optional()
2840
2871
  });
2841
2872
  var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
2842
- contactId: z41.string().uuid(),
2843
- caseId: z41.string(),
2844
- channelIds: z41.array(z41.string().uuid()),
2845
- trunks: z41.array(z41.string()),
2846
- queueId: z41.array(z41.string()),
2847
- agentIds: z41.array(z41.string()),
2848
- direction: z41.array(z41.union([z41.literal("inbound"), z41.literal("outbound")])),
2849
- disposition: z41.array(z41.string()),
2850
- sentimentScore: z41.array(sentimentScoreSchema),
2851
- csatScore: z41.string(),
2852
- sla: z41.array(z41.union([z41.literal("meet"), z41.literal("unmeet")])),
2853
- tags: z41.array(z41.string()),
2873
+ contactId: z42.string().uuid(),
2874
+ caseId: z42.string(),
2875
+ channelIds: z42.array(z42.string().uuid()),
2876
+ trunks: z42.array(z42.string()),
2877
+ queueId: z42.array(z42.string()),
2878
+ agentIds: z42.array(z42.string()),
2879
+ direction: z42.array(z42.union([z42.literal("inbound"), z42.literal("outbound")])),
2880
+ disposition: z42.array(z42.string()),
2881
+ sentimentScore: z42.array(sentimentScoreSchema),
2882
+ csatScore: z42.string(),
2883
+ sla: z42.array(z42.union([z42.literal("meet"), z42.literal("unmeet")])),
2884
+ tags: z42.array(z42.string()),
2854
2885
  // General tags
2855
2886
  // Default contact attributes
2856
- name: z41.string(),
2857
- contactLabels: z41.array(z41.string()),
2858
- email: z41.string(),
2859
- channel: z41.array(z41.string()),
2860
- phone: z41.string(),
2861
- notes: z41.string(),
2862
- address: z41.string(),
2863
- company: z41.array(z41.string()),
2887
+ name: z42.string(),
2888
+ contactLabels: z42.array(z42.string()),
2889
+ email: z42.string(),
2890
+ channel: z42.array(z42.string()),
2891
+ phone: z42.string(),
2892
+ notes: z42.string(),
2893
+ address: z42.string(),
2894
+ company: z42.array(z42.string()),
2864
2895
  // Custom fields
2865
- customFields: z41.array(CustomFieldQueryParamsSchema),
2896
+ customFields: z42.array(CustomFieldQueryParamsSchema),
2866
2897
  // Date filter
2867
- selectedDate: z41.string()
2898
+ selectedDate: z42.string()
2868
2899
  }).partial().optional();
2869
2900
 
2870
2901
  // src/cx-log/index.ts
@@ -2875,10 +2906,10 @@ var cxLogContract = initContract11().router({
2875
2906
  headers: DefaultHeaderSchema,
2876
2907
  responses: {
2877
2908
  200: DefaultSuccessResponseSchema.extend({
2878
- total: z42.number(),
2879
- page: z42.number(),
2880
- pageSize: z42.number(),
2881
- cxLogs: z42.array(CxLogSchemaWithRelations)
2909
+ total: z43.number(),
2910
+ page: z43.number(),
2911
+ pageSize: z43.number(),
2912
+ cxLogs: z43.array(CxLogSchemaWithRelations)
2882
2913
  }),
2883
2914
  401: DefaultUnauthorizedSchema
2884
2915
  },
@@ -2902,210 +2933,210 @@ var cxLogContract = initContract11().router({
2902
2933
  import { initContract as initContract12 } from "@ts-rest/core";
2903
2934
 
2904
2935
  // src/dashboard/validation.ts
2905
- import z43 from "zod";
2906
- var GetDashboardQueryParamsSchema = z43.object({
2907
- selectedDate: z43.string()
2936
+ import z44 from "zod";
2937
+ var GetDashboardQueryParamsSchema = z44.object({
2938
+ selectedDate: z44.string()
2908
2939
  });
2909
2940
  var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
2910
- z43.object({
2911
- agentId: z43.string().uuid().optional()
2941
+ z44.object({
2942
+ agentId: z44.string().uuid().optional()
2912
2943
  })
2913
2944
  ).optional();
2914
2945
 
2915
2946
  // src/dashboard/index.ts
2916
- import z45 from "zod";
2947
+ import z46 from "zod";
2917
2948
 
2918
2949
  // src/dashboard/schema.ts
2919
- import z44 from "zod";
2920
- var InboundCountSchema = z44.object({
2921
- totalCallCount: z44.number(),
2922
- answeredCallCount: z44.number(),
2923
- missedCallCount: z44.number()
2924
- });
2925
- var OutboundCountSchema = z44.object({
2926
- totalCallCount: z44.number(),
2927
- answeredCallCount: z44.number(),
2928
- noAnsweredCallCount: z44.number()
2929
- });
2930
- var TwoAxiosCountSchema = z44.object({
2931
- x: z44.string(),
2932
- y: z44.string()
2933
- });
2934
- var ReceivedTicketCountDataSchema = z44.object({
2935
- name: z44.string(),
2936
- data: z44.array(TwoAxiosCountSchema)
2937
- });
2938
- var ResolvedTicketCountDataSchema = z44.object({
2939
- name: z44.string(),
2940
- data: z44.array(TwoAxiosCountSchema)
2941
- });
2942
- var TotalCallLogCountDataSchema = z44.object({
2943
- name: z44.string(),
2944
- data: z44.array(TwoAxiosCountSchema)
2945
- });
2946
- var AnsweredCallLogCountDataSchema = z44.object({
2947
- name: z44.string(),
2948
- data: z44.array(TwoAxiosCountSchema)
2949
- });
2950
- var CallLogCountByResultDaumSchema = z44.object({
2951
- result: z44.string(),
2952
- count: z44.string()
2953
- });
2954
- var DashboardDataSchema = z44.object({
2955
- receivedTicketCount: z44.number(),
2956
- pendingTicketCount: z44.number(),
2957
- openTicketCount: z44.number(),
2958
- resolvedTicketCount: z44.number(),
2959
- unResolvedTicketCount: z44.number(),
2960
- closedTicketCount: z44.number(),
2961
- unAssignedTicketCount: z44.number(),
2950
+ import z45 from "zod";
2951
+ var InboundCountSchema = z45.object({
2952
+ totalCallCount: z45.number(),
2953
+ answeredCallCount: z45.number(),
2954
+ missedCallCount: z45.number()
2955
+ });
2956
+ var OutboundCountSchema = z45.object({
2957
+ totalCallCount: z45.number(),
2958
+ answeredCallCount: z45.number(),
2959
+ noAnsweredCallCount: z45.number()
2960
+ });
2961
+ var TwoAxiosCountSchema = z45.object({
2962
+ x: z45.string(),
2963
+ y: z45.string()
2964
+ });
2965
+ var ReceivedTicketCountDataSchema = z45.object({
2966
+ name: z45.string(),
2967
+ data: z45.array(TwoAxiosCountSchema)
2968
+ });
2969
+ var ResolvedTicketCountDataSchema = z45.object({
2970
+ name: z45.string(),
2971
+ data: z45.array(TwoAxiosCountSchema)
2972
+ });
2973
+ var TotalCallLogCountDataSchema = z45.object({
2974
+ name: z45.string(),
2975
+ data: z45.array(TwoAxiosCountSchema)
2976
+ });
2977
+ var AnsweredCallLogCountDataSchema = z45.object({
2978
+ name: z45.string(),
2979
+ data: z45.array(TwoAxiosCountSchema)
2980
+ });
2981
+ var CallLogCountByResultDaumSchema = z45.object({
2982
+ result: z45.string(),
2983
+ count: z45.string()
2984
+ });
2985
+ var DashboardDataSchema = z45.object({
2986
+ receivedTicketCount: z45.number(),
2987
+ pendingTicketCount: z45.number(),
2988
+ openTicketCount: z45.number(),
2989
+ resolvedTicketCount: z45.number(),
2990
+ unResolvedTicketCount: z45.number(),
2991
+ closedTicketCount: z45.number(),
2992
+ unAssignedTicketCount: z45.number(),
2962
2993
  receivedTicketCountData: ReceivedTicketCountDataSchema,
2963
2994
  resolvedTicketCountData: ResolvedTicketCountDataSchema
2964
2995
  });
2965
2996
  var DashboardDataWithCallSchema = DashboardDataSchema.extend({
2966
- missedCallCount: z44.number(),
2967
- answeredCallCount: z44.number(),
2968
- noAnsweredCallCount: z44.number(),
2969
- totalCallCount: z44.number(),
2997
+ missedCallCount: z45.number(),
2998
+ answeredCallCount: z45.number(),
2999
+ noAnsweredCallCount: z45.number(),
3000
+ totalCallCount: z45.number(),
2970
3001
  inbound: InboundCountSchema,
2971
3002
  outbound: OutboundCountSchema,
2972
3003
  totalCallLogCountData: TotalCallLogCountDataSchema,
2973
3004
  answeredCallLogCountData: AnsweredCallLogCountDataSchema,
2974
- callLogCountByResultData: z44.array(CallLogCountByResultDaumSchema).optional()
2975
- });
2976
- var TotalTelephonyQueueCallCountListSchema = z44.object({
2977
- totalQueueCall: z44.string(),
2978
- totalMissedQueueCall: z44.string(),
2979
- totalAnsweredQueueCall: z44.string(),
2980
- totalAbandonedQueueCall: z44.string(),
2981
- totalAverageRingDuration: z44.string(),
2982
- totalAverageTalkDuration: z44.string(),
2983
- totalAverageCallDuration: z44.string(),
2984
- totalSla: z44.string(),
2985
- totalMissedCallPercent: z44.string(),
2986
- totalMaximumRingDuration: z44.string()
2987
- });
2988
- var TelephonyQueueCallCountListSchema = z44.object({
2989
- totalQueueCall: z44.string(),
2990
- totalMissedQueueCall: z44.string(),
2991
- totalAnsweredQueueCall: z44.string(),
2992
- totalAbandonedQueueCall: z44.string(),
2993
- totalAverageTalkDuration: z44.string(),
2994
- totalAverageCallDuration: z44.string(),
2995
- totalAverageRingDuration: z44.string(),
2996
- totalSla: z44.string(),
2997
- totalMissedCallPercent: z44.string(),
2998
- totalMaximumRingDuration: z44.string()
2999
- });
3000
- var TelephonyQueueCallCountListByQueueNumberSchema = z44.object({
3001
- queueNumber: z44.string(),
3002
- queueName: z44.string(),
3005
+ callLogCountByResultData: z45.array(CallLogCountByResultDaumSchema).optional()
3006
+ });
3007
+ var TotalTelephonyQueueCallCountListSchema = z45.object({
3008
+ totalQueueCall: z45.string(),
3009
+ totalMissedQueueCall: z45.string(),
3010
+ totalAnsweredQueueCall: z45.string(),
3011
+ totalAbandonedQueueCall: z45.string(),
3012
+ totalAverageRingDuration: z45.string(),
3013
+ totalAverageTalkDuration: z45.string(),
3014
+ totalAverageCallDuration: z45.string(),
3015
+ totalSla: z45.string(),
3016
+ totalMissedCallPercent: z45.string(),
3017
+ totalMaximumRingDuration: z45.string()
3018
+ });
3019
+ var TelephonyQueueCallCountListSchema = z45.object({
3020
+ totalQueueCall: z45.string(),
3021
+ totalMissedQueueCall: z45.string(),
3022
+ totalAnsweredQueueCall: z45.string(),
3023
+ totalAbandonedQueueCall: z45.string(),
3024
+ totalAverageTalkDuration: z45.string(),
3025
+ totalAverageCallDuration: z45.string(),
3026
+ totalAverageRingDuration: z45.string(),
3027
+ totalSla: z45.string(),
3028
+ totalMissedCallPercent: z45.string(),
3029
+ totalMaximumRingDuration: z45.string()
3030
+ });
3031
+ var TelephonyQueueCallCountListByQueueNumberSchema = z45.object({
3032
+ queueNumber: z45.string(),
3033
+ queueName: z45.string(),
3003
3034
  yeastarQueueCallCountList: TelephonyQueueCallCountListSchema
3004
3035
  });
3005
- var queueCallDashboardDataSchema = z44.object({
3036
+ var queueCallDashboardDataSchema = z45.object({
3006
3037
  totalTelephonyQueueCallCountList: TotalTelephonyQueueCallCountListSchema,
3007
- telephonyQueueCallCountListByQueueNumber: z44.array(
3038
+ telephonyQueueCallCountListByQueueNumber: z45.array(
3008
3039
  TelephonyQueueCallCountListByQueueNumberSchema
3009
3040
  )
3010
3041
  });
3011
- var TotalQueueLiveCallStatusSchema = z44.object({
3012
- activeCallCount: z44.number(),
3013
- waitingCallCount: z44.number()
3042
+ var TotalQueueLiveCallStatusSchema = z45.object({
3043
+ activeCallCount: z45.number(),
3044
+ waitingCallCount: z45.number()
3014
3045
  });
3015
- var QueueLiveCallListByQueueSchema = z44.object({
3016
- queueNumber: z44.string(),
3017
- activeCallCount: z44.number(),
3018
- waitingCallCount: z44.number()
3046
+ var QueueLiveCallListByQueueSchema = z45.object({
3047
+ queueNumber: z45.string(),
3048
+ activeCallCount: z45.number(),
3049
+ waitingCallCount: z45.number()
3019
3050
  });
3020
- var queueLiveCallCountListSchema = z44.object({
3051
+ var queueLiveCallCountListSchema = z45.object({
3021
3052
  totalQueueLiveCallStatus: TotalQueueLiveCallStatusSchema,
3022
- queueLiveCallListByQueue: z44.array(QueueLiveCallListByQueueSchema)
3023
- });
3024
- var TicketCountByStatusSchema = z44.object({
3025
- total: z44.number(),
3026
- open: z44.number(),
3027
- pending: z44.number(),
3028
- duration: z44.object({
3029
- day: z44.string().nullable(),
3030
- hour: z44.string().nullable()
3053
+ queueLiveCallListByQueue: z45.array(QueueLiveCallListByQueueSchema)
3054
+ });
3055
+ var TicketCountByStatusSchema = z45.object({
3056
+ total: z45.number(),
3057
+ open: z45.number(),
3058
+ pending: z45.number(),
3059
+ duration: z45.object({
3060
+ day: z45.string().nullable(),
3061
+ hour: z45.string().nullable()
3031
3062
  }),
3032
- solved: z44.number(),
3033
- others: z44.number(),
3034
- closed: z44.number(),
3035
- unassigneed: z44.number()
3036
- });
3037
- var ExpiredTicketSchema = z44.array(
3038
- z44.object({
3039
- id: z44.string(),
3040
- ticketNumber: z44.number(),
3041
- title: z44.string(),
3042
- priority: z44.string(),
3043
- expiredDays: z44.number()
3063
+ solved: z45.number(),
3064
+ others: z45.number(),
3065
+ closed: z45.number(),
3066
+ unassigneed: z45.number()
3067
+ });
3068
+ var ExpiredTicketSchema = z45.array(
3069
+ z45.object({
3070
+ id: z45.string(),
3071
+ ticketNumber: z45.number(),
3072
+ title: z45.string(),
3073
+ priority: z45.string(),
3074
+ expiredDays: z45.number()
3044
3075
  })
3045
3076
  );
3046
- var TagCountSchema = z44.object({
3047
- id: z44.string(),
3048
- name: z44.string(),
3049
- count: z44.number()
3050
- });
3051
- var TagCountObjSchema = z44.array(TagCountSchema);
3052
- var MessageCountsByChannelObjSchema = z44.record(
3053
- z44.array(
3054
- z44.object({
3055
- platform: z44.string(),
3056
- messageCount: z44.number()
3077
+ var TagCountSchema = z45.object({
3078
+ id: z45.string(),
3079
+ name: z45.string(),
3080
+ count: z45.number()
3081
+ });
3082
+ var TagCountObjSchema = z45.array(TagCountSchema);
3083
+ var MessageCountsByChannelObjSchema = z45.record(
3084
+ z45.array(
3085
+ z45.object({
3086
+ platform: z45.string(),
3087
+ messageCount: z45.number()
3057
3088
  })
3058
3089
  )
3059
3090
  );
3060
- var CallEndResultSchema = z44.array(
3061
- z44.object({ result: z44.string().nullable(), count: z44.string().nullable() }).optional()
3091
+ var CallEndResultSchema = z45.array(
3092
+ z45.object({ result: z45.string().nullable(), count: z45.string().nullable() }).optional()
3062
3093
  ).optional();
3063
- var ConversationCountStatusSchema = z44.object({
3064
- newContactCount: z44.number().nullable(),
3065
- oldContactCount: z44.number().nullable()
3066
- });
3067
- var MessageStatusSchema = z44.object({
3068
- total: z44.number().nullable(),
3069
- closed: z44.number().nullable(),
3070
- unassignedOpen: z44.number().nullable(),
3071
- assignedOpen: z44.number().nullable()
3072
- });
3073
- var MessageAverageSchema = z44.object({
3074
- selectedWeekAvgByDay: z44.array(
3075
- z44.object({
3076
- day: z44.string().nullable(),
3077
- avgResolutionTime: z44.string().nullable(),
3078
- avgResponseTime: z44.string().nullable()
3094
+ var ConversationCountStatusSchema = z45.object({
3095
+ newContactCount: z45.number().nullable(),
3096
+ oldContactCount: z45.number().nullable()
3097
+ });
3098
+ var MessageStatusSchema = z45.object({
3099
+ total: z45.number().nullable(),
3100
+ closed: z45.number().nullable(),
3101
+ unassignedOpen: z45.number().nullable(),
3102
+ assignedOpen: z45.number().nullable()
3103
+ });
3104
+ var MessageAverageSchema = z45.object({
3105
+ selectedWeekAvgByDay: z45.array(
3106
+ z45.object({
3107
+ day: z45.string().nullable(),
3108
+ avgResolutionTime: z45.string().nullable(),
3109
+ avgResponseTime: z45.string().nullable()
3079
3110
  })
3080
3111
  ).optional().nullable(),
3081
- previousWeekAvg: z44.object({
3082
- avgResolutionTime: z44.string().nullable(),
3083
- avgResponseTime: z44.string().nullable()
3112
+ previousWeekAvg: z45.object({
3113
+ avgResolutionTime: z45.string().nullable(),
3114
+ avgResponseTime: z45.string().nullable()
3084
3115
  }).nullable().optional(),
3085
- selectedWeekAvg: z44.object({
3086
- avgResolutionTime: z44.string().nullable(),
3087
- avgResponseTime: z44.string().nullable()
3116
+ selectedWeekAvg: z45.object({
3117
+ avgResolutionTime: z45.string().nullable(),
3118
+ avgResponseTime: z45.string().nullable()
3088
3119
  }).nullable().optional()
3089
3120
  });
3090
- var MessagePlatformDataSchema = z44.object({
3091
- messengerCount: z44.object({ count: z44.number().nullable() }).nullable(),
3092
- lineCount: z44.object({ count: z44.number() }).nullable(),
3093
- viberCount: z44.object({ count: z44.number() }).nullable(),
3094
- instagramCount: z44.object({ count: z44.number() }).nullable()
3095
- });
3096
- var MessageDispositionSchema = z44.object({
3097
- name: z44.string().optional().nullable(),
3098
- count: z44.number().optional().nullable()
3099
- });
3100
- var MessageIncomingDataSchema = z44.array(
3101
- z44.object({
3102
- platform: z44.string().nullable(),
3103
- hour: z44.string().nullable(),
3104
- messageCount: z44.string().nullable()
3121
+ var MessagePlatformDataSchema = z45.object({
3122
+ messengerCount: z45.object({ count: z45.number().nullable() }).nullable(),
3123
+ lineCount: z45.object({ count: z45.number() }).nullable(),
3124
+ viberCount: z45.object({ count: z45.number() }).nullable(),
3125
+ instagramCount: z45.object({ count: z45.number() }).nullable()
3126
+ });
3127
+ var MessageDispositionSchema = z45.object({
3128
+ name: z45.string().optional().nullable(),
3129
+ count: z45.number().optional().nullable()
3130
+ });
3131
+ var MessageIncomingDataSchema = z45.array(
3132
+ z45.object({
3133
+ platform: z45.string().nullable(),
3134
+ hour: z45.string().nullable(),
3135
+ messageCount: z45.string().nullable()
3105
3136
  })
3106
3137
  );
3107
- var MessageTotalIncomingDataSchema = z44.array(
3108
- z44.object({ name: z44.string(), data: z44.array(z44.number()) }).nullable()
3138
+ var MessageTotalIncomingDataSchema = z45.array(
3139
+ z45.object({ name: z45.string(), data: z45.array(z45.number()) }).nullable()
3109
3140
  );
3110
3141
 
3111
3142
  // src/dashboard/index.ts
@@ -3121,8 +3152,8 @@ var dashboardContract = initContract12().router(
3121
3152
  200: DefaultSuccessResponseSchema.extend({
3122
3153
  dashboard: DashboardDataSchema
3123
3154
  }),
3124
- 400: z45.object({
3125
- message: z45.string()
3155
+ 400: z46.object({
3156
+ message: z46.string()
3126
3157
  }),
3127
3158
  401: DefaultUnauthorizedSchema
3128
3159
  }
@@ -3137,8 +3168,8 @@ var dashboardContract = initContract12().router(
3137
3168
  200: DefaultSuccessResponseSchema.extend({
3138
3169
  queuecallDashboard: queueCallDashboardDataSchema
3139
3170
  }),
3140
- 400: z45.object({
3141
- message: z45.string()
3171
+ 400: z46.object({
3172
+ message: z46.string()
3142
3173
  }),
3143
3174
  401: DefaultUnauthorizedSchema
3144
3175
  }
@@ -3325,7 +3356,7 @@ var dashboardContract = initContract12().router(
3325
3356
  headers: DefaultHeaderSchema,
3326
3357
  responses: {
3327
3358
  200: DefaultSuccessResponseSchema.extend({
3328
- messageRoomStatusDispositionData: z45.array(MessageDispositionSchema).optional()
3359
+ messageRoomStatusDispositionData: z46.array(MessageDispositionSchema).optional()
3329
3360
  }),
3330
3361
  401: DefaultUnauthorizedSchema
3331
3362
  }
@@ -3363,14 +3394,14 @@ var dashboardContract = initContract12().router(
3363
3394
  );
3364
3395
 
3365
3396
  // src/evaluate-form/index.ts
3366
- import z47 from "zod";
3397
+ import z48 from "zod";
3367
3398
 
3368
3399
  // src/evaluate-form/validation.ts
3369
- import z46 from "zod";
3370
- var CreateEvaluateFormSchema = z46.object({
3371
- cxLogId: z46.string().uuid(),
3372
- sentimentScore: z46.string().nullable().optional(),
3373
- csatScore: z46.string().nullable().optional()
3400
+ import z47 from "zod";
3401
+ var CreateEvaluateFormSchema = z47.object({
3402
+ cxLogId: z47.string().uuid(),
3403
+ sentimentScore: z47.string().nullable().optional(),
3404
+ csatScore: z47.string().nullable().optional()
3374
3405
  });
3375
3406
  var UpdateEvaluateFormSchema = CreateEvaluateFormSchema.partial();
3376
3407
 
@@ -3384,7 +3415,7 @@ var evaluateFormContract = initContract13().router(
3384
3415
  body: CreateEvaluateFormSchema,
3385
3416
  responses: {
3386
3417
  201: DefaultSuccessResponseSchema.extend({
3387
- message: z47.string()
3418
+ message: z48.string()
3388
3419
  }),
3389
3420
  401: DefaultUnauthorizedSchema
3390
3421
  },
@@ -3396,18 +3427,18 @@ var evaluateFormContract = initContract13().router(
3396
3427
 
3397
3428
  // src/extension/index.ts
3398
3429
  import { initContract as initContract14 } from "@ts-rest/core";
3399
- import z49 from "zod";
3430
+ import z50 from "zod";
3400
3431
 
3401
3432
  // src/extension/validation.ts
3402
- import { z as z48 } from "zod";
3403
- var CreateExtensionSchema = z48.object({
3404
- userId: z48.string().nullable(),
3405
- sipUserName: z48.string(),
3406
- sipServerUrl: z48.string().optional(),
3407
- webphoneLoginUser: z48.string(),
3408
- extensionId: z48.string().nullable(),
3409
- extensionName: z48.string().nullable(),
3410
- telephonySignature: z48.string().nullable().optional()
3433
+ import { z as z49 } from "zod";
3434
+ var CreateExtensionSchema = z49.object({
3435
+ userId: z49.string().nullable(),
3436
+ sipUserName: z49.string(),
3437
+ sipServerUrl: z49.string().optional(),
3438
+ webphoneLoginUser: z49.string(),
3439
+ extensionId: z49.string().nullable(),
3440
+ extensionName: z49.string().nullable(),
3441
+ telephonySignature: z49.string().nullable().optional()
3411
3442
  });
3412
3443
  var UpdateExtensionSchema = CreateExtensionSchema;
3413
3444
 
@@ -3423,8 +3454,8 @@ var extensionContract = initContract14().router(
3423
3454
  201: DefaultSuccessResponseSchema.extend({
3424
3455
  extension: ExtensionSchema
3425
3456
  }),
3426
- 400: z49.object({
3427
- message: z49.string()
3457
+ 400: z50.object({
3458
+ message: z50.string()
3428
3459
  }),
3429
3460
  401: DefaultUnauthorizedSchema,
3430
3461
  404: DefaultNotFoundSchema,
@@ -3436,33 +3467,33 @@ var extensionContract = initContract14().router(
3436
3467
  getExtensions: {
3437
3468
  method: "GET",
3438
3469
  path: "",
3439
- query: z49.object({
3440
- page: z49.coerce.number().default(1),
3441
- pageSize: z49.coerce.number().default(10),
3442
- keyword: z49.string().optional()
3470
+ query: z50.object({
3471
+ page: z50.coerce.number().default(1),
3472
+ pageSize: z50.coerce.number().default(10),
3473
+ keyword: z50.string().optional()
3443
3474
  }).optional(),
3444
3475
  headers: DefaultHeaderSchema,
3445
3476
  responses: {
3446
3477
  200: WithPagination(
3447
3478
  // The response data should contain the user relation.
3448
3479
  ExtensionSchema.extend({
3449
- user: z49.object({
3450
- id: z49.string().uuid(),
3451
- createdAt: z49.date(),
3452
- updatedAt: z49.date(),
3453
- deletedAt: z49.date().nullable(),
3454
- name: z49.string(),
3455
- email: z49.string().email(),
3456
- emailVerifiedAt: z49.date().nullable(),
3457
- password: z49.string(),
3458
- address: z49.string().nullable(),
3459
- phone: z49.string().nullable(),
3460
- notificationCount: z49.number().nullable()
3480
+ user: z50.object({
3481
+ id: z50.string().uuid(),
3482
+ createdAt: z50.date(),
3483
+ updatedAt: z50.date(),
3484
+ deletedAt: z50.date().nullable(),
3485
+ name: z50.string(),
3486
+ email: z50.string().email(),
3487
+ emailVerifiedAt: z50.date().nullable(),
3488
+ password: z50.string(),
3489
+ address: z50.string().nullable(),
3490
+ phone: z50.string().nullable(),
3491
+ notificationCount: z50.number().nullable()
3461
3492
  })
3462
3493
  })
3463
3494
  ),
3464
- 400: z49.object({
3465
- message: z49.string()
3495
+ 400: z50.object({
3496
+ message: z50.string()
3466
3497
  }),
3467
3498
  401: DefaultUnauthorizedSchema,
3468
3499
  404: DefaultNotFoundSchema,
@@ -3474,12 +3505,12 @@ var extensionContract = initContract14().router(
3474
3505
  getExtensionByUserId: {
3475
3506
  method: "GET",
3476
3507
  path: "/user/:userId",
3477
- pathParams: z49.object({ userId: z49.string() }),
3508
+ pathParams: z50.object({ userId: z50.string() }),
3478
3509
  headers: DefaultHeaderSchema,
3479
3510
  responses: {
3480
3511
  200: ExtensionSchema,
3481
- 400: z49.object({
3482
- message: z49.string()
3512
+ 400: z50.object({
3513
+ message: z50.string()
3483
3514
  }),
3484
3515
  401: DefaultUnauthorizedSchema,
3485
3516
  404: DefaultNotFoundSchema,
@@ -3491,16 +3522,16 @@ var extensionContract = initContract14().router(
3491
3522
  getExtensionByDialpad: {
3492
3523
  method: "GET",
3493
3524
  path: "/dialpad",
3494
- query: z49.object({
3495
- page: z49.coerce.number().default(1),
3496
- pageSize: z49.coerce.number().default(10),
3497
- keyword: z49.string().optional()
3525
+ query: z50.object({
3526
+ page: z50.coerce.number().default(1),
3527
+ pageSize: z50.coerce.number().default(10),
3528
+ keyword: z50.string().optional()
3498
3529
  }).optional(),
3499
3530
  headers: DefaultHeaderSchema,
3500
3531
  responses: {
3501
3532
  200: WithPagination(ExtensionSchema),
3502
- 400: z49.object({
3503
- message: z49.string()
3533
+ 400: z50.object({
3534
+ message: z50.string()
3504
3535
  }),
3505
3536
  401: DefaultUnauthorizedSchema,
3506
3537
  404: DefaultNotFoundSchema,
@@ -3512,15 +3543,15 @@ var extensionContract = initContract14().router(
3512
3543
  updateExtension: {
3513
3544
  method: "PATCH",
3514
3545
  path: "/:id",
3515
- pathParams: z49.object({ id: z49.string() }),
3546
+ pathParams: z50.object({ id: z50.string() }),
3516
3547
  headers: DefaultHeaderSchema,
3517
3548
  body: UpdateExtensionSchema,
3518
3549
  responses: {
3519
3550
  200: DefaultSuccessResponseSchema.extend({
3520
3551
  extension: ExtensionSchema
3521
3552
  }),
3522
- 400: z49.object({
3523
- message: z49.string()
3553
+ 400: z50.object({
3554
+ message: z50.string()
3524
3555
  }),
3525
3556
  401: DefaultUnauthorizedSchema,
3526
3557
  404: DefaultNotFoundSchema,
@@ -3532,13 +3563,13 @@ var extensionContract = initContract14().router(
3532
3563
  deleteExtension: {
3533
3564
  method: "DELETE",
3534
3565
  path: "/:id",
3535
- pathParams: z49.object({ id: z49.string() }),
3566
+ pathParams: z50.object({ id: z50.string() }),
3536
3567
  headers: DefaultHeaderSchema,
3537
3568
  body: null,
3538
3569
  responses: {
3539
- 200: DefaultSuccessResponseSchema.extend({ message: z49.string() }),
3540
- 400: z49.object({
3541
- message: z49.string()
3570
+ 200: DefaultSuccessResponseSchema.extend({ message: z50.string() }),
3571
+ 400: z50.object({
3572
+ message: z50.string()
3542
3573
  }),
3543
3574
  401: DefaultUnauthorizedSchema,
3544
3575
  404: DefaultNotFoundSchema,
@@ -3553,40 +3584,6 @@ var extensionContract = initContract14().router(
3553
3584
 
3554
3585
  // src/instagram/index.ts
3555
3586
  import { initContract as initContract15 } from "@ts-rest/core";
3556
-
3557
- // src/instagram/validation.ts
3558
- import z50 from "zod";
3559
- var GetInstagramPagesSchema = z50.object({
3560
- data: z50.array(
3561
- z50.object({
3562
- // biome-ignore lint/style/useNamingConvention: <explanation>
3563
- access_token: z50.string(),
3564
- category: z50.string(),
3565
- // biome-ignore lint/style/useNamingConvention: <explanation>
3566
- category_list: z50.array(
3567
- z50.object({
3568
- id: z50.string(),
3569
- name: z50.string()
3570
- })
3571
- ),
3572
- id: z50.string(),
3573
- name: z50.string(),
3574
- tasks: z50.string().array()
3575
- })
3576
- ),
3577
- paging: z50.object({
3578
- cursors: z50.object({
3579
- before: z50.string().optional(),
3580
- after: z50.string().optional()
3581
- })
3582
- }).optional()
3583
- });
3584
- var GetInstagramPagesQuerySchema = z50.object({
3585
- accessToken: z50.string(),
3586
- userId: z50.string()
3587
- });
3588
-
3589
- // src/instagram/index.ts
3590
3587
  var instagramContract = initContract15().router({
3591
3588
  sendMessage: {
3592
3589
  method: "POST",
@@ -3640,20 +3637,27 @@ var instagramContract = initContract15().router({
3640
3637
 
3641
3638
  // src/line/index.ts
3642
3639
  import { initContract as initContract16 } from "@ts-rest/core";
3643
- import z52 from "zod";
3640
+ import z53 from "zod";
3644
3641
 
3645
3642
  // src/line/schema.ts
3643
+ import z51 from "zod";
3646
3644
  var ConnectLineService = ConnectLineChannelSchema.extend({
3647
- actor: UserSchema.optional()
3645
+ actor: z51.object({
3646
+ id: z51.string().uuid(),
3647
+ name: z51.string(),
3648
+ email: z51.string().email(),
3649
+ address: z51.string().nullable(),
3650
+ phone: z51.string().nullable()
3651
+ }).optional()
3648
3652
  });
3649
3653
 
3650
3654
  // src/line/validation.ts
3651
- import z51 from "zod";
3652
- var SendLineStickerSchema = z51.object({
3653
- userId: z51.string().uuid(),
3654
- packageId: z51.string(),
3655
- stickerId: z51.string(),
3656
- accessToken: z51.string()
3655
+ import z52 from "zod";
3656
+ var SendLineStickerSchema = z52.object({
3657
+ userId: z52.string().uuid(),
3658
+ packageId: z52.string(),
3659
+ stickerId: z52.string(),
3660
+ accessToken: z52.string()
3657
3661
  });
3658
3662
 
3659
3663
  // src/line/index.ts
@@ -3663,7 +3667,7 @@ var lineContract = initContract16().router({
3663
3667
  path: "sticker",
3664
3668
  responses: {
3665
3669
  200: DefaultSuccessResponseSchema.extend({
3666
- data: z52.any()
3670
+ data: z53.any()
3667
3671
  }),
3668
3672
  500: DefaultErrorResponseSchema
3669
3673
  },
@@ -3672,10 +3676,10 @@ var lineContract = initContract16().router({
3672
3676
  },
3673
3677
  connect: {
3674
3678
  method: "POST",
3675
- path: "connect",
3679
+ path: "/connect",
3676
3680
  responses: {
3677
3681
  200: DefaultSuccessResponseSchema.extend({
3678
- data: z52.any()
3682
+ data: z53.any()
3679
3683
  }),
3680
3684
  500: DefaultErrorResponseSchema
3681
3685
  },
@@ -3695,7 +3699,7 @@ var lineContract = initContract16().router({
3695
3699
 
3696
3700
  // src/mail/email-engine-webhooks-events.contract.ts
3697
3701
  import { initContract as initContract17 } from "@ts-rest/core";
3698
- import z53 from "zod";
3702
+ import z54 from "zod";
3699
3703
  var emailEngineWebhooksEventsContract = initContract17().router({
3700
3704
  handleWebhooksEvents: {
3701
3705
  method: "POST",
@@ -3703,7 +3707,7 @@ var emailEngineWebhooksEventsContract = initContract17().router({
3703
3707
  // we don't need to respone anything but added responses just for solving type error
3704
3708
  responses: {
3705
3709
  200: DefaultSuccessResponseSchema.extend({
3706
- message: z53.string()
3710
+ message: z54.string()
3707
3711
  })
3708
3712
  },
3709
3713
  body: null,
@@ -3716,173 +3720,173 @@ import { initContract as initContract22 } from "@ts-rest/core";
3716
3720
 
3717
3721
  // src/mail/room-contract.ts
3718
3722
  import { initContract as initContract18 } from "@ts-rest/core";
3719
- import z57 from "zod";
3723
+ import z58 from "zod";
3720
3724
 
3721
3725
  // src/mail/schemas/room.schema.ts
3722
- import z56 from "zod";
3726
+ import z57 from "zod";
3723
3727
 
3724
3728
  // src/mail/schemas/account.schema.ts
3725
- import z54 from "zod";
3726
- var MailServerSchema = z54.object({
3727
- id: z54.string(),
3728
- createdAt: z54.date(),
3729
- updatedAt: z54.date(),
3730
- deletedAt: z54.date().nullable(),
3731
- name: z54.string(),
3732
- smtpHost: z54.string(),
3733
- smtpPort: z54.string(),
3734
- smtpTlsPort: z54.string(),
3735
- useTlsForSmtp: z54.boolean(),
3736
- imapHost: z54.string(),
3737
- imapPort: z54.string(),
3738
- imapTlsPort: z54.string(),
3739
- useTlsForImap: z54.boolean()
3740
- });
3741
- var MailAccountSchema = z54.object({
3742
- id: z54.string(),
3743
- createdAt: z54.date(),
3744
- updatedAt: z54.date(),
3745
- deletedAt: z54.date().nullable(),
3746
- name: z54.string(),
3747
- address: z54.string(),
3748
- accountId: z54.string(),
3749
- mailServerId: z54.string(),
3750
- mailServer: MailServerSchema,
3751
- state: z54.union([
3752
- z54.literal("init"),
3753
- z54.literal("syncing"),
3754
- z54.literal("connecting"),
3755
- z54.literal("connected"),
3756
- z54.literal("disconnected"),
3757
- z54.literal("authenticationError"),
3758
- z54.literal("connectError"),
3759
- z54.literal("unset")
3760
- ])
3761
- });
3762
-
3763
- // src/mail/schemas/message.schema.ts
3764
3729
  import z55 from "zod";
3765
- var AttachmentSchema = z55.object({
3730
+ var MailServerSchema = z55.object({
3766
3731
  id: z55.string(),
3767
3732
  createdAt: z55.date(),
3768
3733
  updatedAt: z55.date(),
3769
- deletedAt: z55.nullable(z55.date()),
3770
- roomId: z55.string(),
3771
- messageId: z55.string(),
3772
- fileName: z55.string(),
3773
- fileType: z55.string(),
3774
- emailEngineAttachmentId: z55.string(),
3775
- uploadId: z55.string(),
3776
- upload: z55.object({
3777
- id: z55.string(),
3778
- createdAt: z55.date(),
3779
- updatedAt: z55.date(),
3780
- deletedAt: z55.nullable(z55.date()),
3781
- bucket_name: z55.string(),
3782
- file_name: z55.string(),
3783
- file_key: z55.string(),
3784
- file_size: z55.number(),
3785
- file_url: z55.string(),
3786
- extension_name: z55.string()
3787
- })
3788
- });
3789
- var MessageSchema2 = z55.object({
3734
+ deletedAt: z55.date().nullable(),
3735
+ name: z55.string(),
3736
+ smtpHost: z55.string(),
3737
+ smtpPort: z55.string(),
3738
+ smtpTlsPort: z55.string(),
3739
+ useTlsForSmtp: z55.boolean(),
3740
+ imapHost: z55.string(),
3741
+ imapPort: z55.string(),
3742
+ imapTlsPort: z55.string(),
3743
+ useTlsForImap: z55.boolean()
3744
+ });
3745
+ var MailAccountSchema = z55.object({
3790
3746
  id: z55.string(),
3791
3747
  createdAt: z55.date(),
3792
3748
  updatedAt: z55.date(),
3793
- deletedAt: z55.nullable(z55.date()),
3794
- roomId: z55.string(),
3795
- subject: z55.string(),
3796
- textPlain: z55.string(),
3797
- textHtml: z55.string(),
3798
- textId: z55.string(),
3799
- emailEngineEmailId: z55.string(),
3800
- emailEngineMessageId: z55.string(),
3801
- emailEngineReplyTo: z55.nullable(z55.string()),
3802
- direction: z55.string(),
3803
- date: z55.date(),
3804
- action: z55.string(),
3805
- unseen: z55.boolean(),
3806
- seemsLikeNew: z55.boolean(),
3807
- from: z55.array(MailUserSchema),
3808
- to: z55.array(MailUserSchema),
3809
- cc: z55.array(MailUserSchema),
3810
- bcc: z55.array(MailUserSchema),
3811
- attachments: z55.array(AttachmentSchema)
3749
+ deletedAt: z55.date().nullable(),
3750
+ name: z55.string(),
3751
+ address: z55.string(),
3752
+ accountId: z55.string(),
3753
+ mailServerId: z55.string(),
3754
+ mailServer: MailServerSchema,
3755
+ state: z55.union([
3756
+ z55.literal("init"),
3757
+ z55.literal("syncing"),
3758
+ z55.literal("connecting"),
3759
+ z55.literal("connected"),
3760
+ z55.literal("disconnected"),
3761
+ z55.literal("authenticationError"),
3762
+ z55.literal("connectError"),
3763
+ z55.literal("unset")
3764
+ ])
3812
3765
  });
3813
3766
 
3814
- // src/mail/schemas/room.schema.ts
3815
- var MailUserSchema = z56.object({
3816
- id: z56.string(),
3817
- createdAt: z56.date(),
3818
- updatedAt: z56.date(),
3819
- deletedAt: z56.date().nullable(),
3820
- name: z56.string(),
3821
- address: z56.string()
3822
- });
3823
- var TagSchema2 = z56.object({
3824
- color: z56.string(),
3825
- id: z56.string(),
3826
- createdAt: z56.date(),
3827
- updatedAt: z56.date(),
3828
- deletedAt: z56.date().nullable(),
3829
- name: z56.string()
3830
- });
3831
- var UserModel = z56.object({
3832
- id: z56.string().uuid(),
3833
- createdAt: z56.date(),
3834
- updatedAt: z56.date(),
3835
- deletedAt: z56.date().nullable(),
3836
- name: z56.string(),
3837
- email: z56.string(),
3838
- address: z56.string().nullable(),
3839
- phone: z56.string().nullable(),
3840
- notification_count: z56.number().nullable()
3841
- });
3842
- var ActivityLogModel = z56.object({
3767
+ // src/mail/schemas/message.schema.ts
3768
+ import z56 from "zod";
3769
+ var AttachmentSchema = z56.object({
3843
3770
  id: z56.string(),
3844
3771
  createdAt: z56.date(),
3845
3772
  updatedAt: z56.date(),
3846
- deletedAt: z56.nullable(z56.string()),
3847
- description: z56.string(),
3848
- actorId: z56.string(),
3773
+ deletedAt: z56.nullable(z56.date()),
3849
3774
  roomId: z56.string(),
3850
- actor: UserModel
3775
+ messageId: z56.string(),
3776
+ fileName: z56.string(),
3777
+ fileType: z56.string(),
3778
+ emailEngineAttachmentId: z56.string(),
3779
+ uploadId: z56.string(),
3780
+ upload: z56.object({
3781
+ id: z56.string(),
3782
+ createdAt: z56.date(),
3783
+ updatedAt: z56.date(),
3784
+ deletedAt: z56.nullable(z56.date()),
3785
+ bucket_name: z56.string(),
3786
+ file_name: z56.string(),
3787
+ file_key: z56.string(),
3788
+ file_size: z56.number(),
3789
+ file_url: z56.string(),
3790
+ extension_name: z56.string()
3791
+ })
3851
3792
  });
3852
- var MessagesAndLogs = z56.array(z56.union([MessageSchema2, ActivityLogModel]));
3853
- var MailRoomSchema = z56.object({
3793
+ var MessageSchema2 = z56.object({
3854
3794
  id: z56.string(),
3855
3795
  createdAt: z56.date(),
3856
3796
  updatedAt: z56.date(),
3857
- deletedAt: z56.date().nullable(),
3797
+ deletedAt: z56.nullable(z56.date()),
3798
+ roomId: z56.string(),
3858
3799
  subject: z56.string(),
3859
- resolved: z56.boolean(),
3860
- assigneeId: z56.string().nullable(),
3861
- note: z56.string(),
3862
- mailId: z56.string(),
3800
+ textPlain: z56.string(),
3801
+ textHtml: z56.string(),
3802
+ textId: z56.string(),
3803
+ emailEngineEmailId: z56.string(),
3804
+ emailEngineMessageId: z56.string(),
3805
+ emailEngineReplyTo: z56.nullable(z56.string()),
3863
3806
  direction: z56.string(),
3864
- lastMessageId: z56.string(),
3865
- firstMessageId: z56.string(),
3807
+ date: z56.date(),
3808
+ action: z56.string(),
3809
+ unseen: z56.boolean(),
3810
+ seemsLikeNew: z56.boolean(),
3866
3811
  from: z56.array(MailUserSchema),
3867
3812
  to: z56.array(MailUserSchema),
3868
3813
  cc: z56.array(MailUserSchema),
3869
3814
  bcc: z56.array(MailUserSchema),
3815
+ attachments: z56.array(AttachmentSchema)
3816
+ });
3817
+
3818
+ // src/mail/schemas/room.schema.ts
3819
+ var MailUserSchema = z57.object({
3820
+ id: z57.string(),
3821
+ createdAt: z57.date(),
3822
+ updatedAt: z57.date(),
3823
+ deletedAt: z57.date().nullable(),
3824
+ name: z57.string(),
3825
+ address: z57.string()
3826
+ });
3827
+ var TagSchema2 = z57.object({
3828
+ color: z57.string(),
3829
+ id: z57.string(),
3830
+ createdAt: z57.date(),
3831
+ updatedAt: z57.date(),
3832
+ deletedAt: z57.date().nullable(),
3833
+ name: z57.string()
3834
+ });
3835
+ var UserModel = z57.object({
3836
+ id: z57.string().uuid(),
3837
+ createdAt: z57.date(),
3838
+ updatedAt: z57.date(),
3839
+ deletedAt: z57.date().nullable(),
3840
+ name: z57.string(),
3841
+ email: z57.string(),
3842
+ address: z57.string().nullable(),
3843
+ phone: z57.string().nullable(),
3844
+ notification_count: z57.number().nullable()
3845
+ });
3846
+ var ActivityLogModel = z57.object({
3847
+ id: z57.string(),
3848
+ createdAt: z57.date(),
3849
+ updatedAt: z57.date(),
3850
+ deletedAt: z57.nullable(z57.string()),
3851
+ description: z57.string(),
3852
+ actorId: z57.string(),
3853
+ roomId: z57.string(),
3854
+ actor: UserModel
3855
+ });
3856
+ var MessagesAndLogs = z57.array(z57.union([MessageSchema2, ActivityLogModel]));
3857
+ var MailRoomSchema = z57.object({
3858
+ id: z57.string(),
3859
+ createdAt: z57.date(),
3860
+ updatedAt: z57.date(),
3861
+ deletedAt: z57.date().nullable(),
3862
+ subject: z57.string(),
3863
+ resolved: z57.boolean(),
3864
+ assigneeId: z57.string().nullable(),
3865
+ note: z57.string(),
3866
+ mailId: z57.string(),
3867
+ direction: z57.string(),
3868
+ lastMessageId: z57.string(),
3869
+ firstMessageId: z57.string(),
3870
+ from: z57.array(MailUserSchema),
3871
+ to: z57.array(MailUserSchema),
3872
+ cc: z57.array(MailUserSchema),
3873
+ bcc: z57.array(MailUserSchema),
3870
3874
  firstMessage: MessageSchema2,
3871
3875
  lastMessage: MessageSchema2,
3872
- tags: z56.array(TagSchema2),
3876
+ tags: z57.array(TagSchema2),
3873
3877
  assignee: UserModel,
3874
- messages: z56.array(MessageSchema2),
3878
+ messages: z57.array(MessageSchema2),
3875
3879
  messagesAndLogs: MessagesAndLogs,
3876
3880
  mail: MailAccountSchema,
3877
- unReadMessageCount: z56.number()
3878
- });
3879
- var AttachmentSchema2 = z56.object({
3880
- fileName: z56.string(),
3881
- fileType: z56.string(),
3882
- emailEngineAttachmentId: z56.string(),
3883
- uploadId: z56.string(),
3884
- messageId: z56.string(),
3885
- roomId: z56.string(),
3881
+ unReadMessageCount: z57.number()
3882
+ });
3883
+ var AttachmentSchema2 = z57.object({
3884
+ fileName: z57.string(),
3885
+ fileType: z57.string(),
3886
+ emailEngineAttachmentId: z57.string(),
3887
+ uploadId: z57.string(),
3888
+ messageId: z57.string(),
3889
+ roomId: z57.string(),
3886
3890
  upload: UploadSchema
3887
3891
  });
3888
3892
 
@@ -3894,7 +3898,7 @@ var roomContract = initContract18().router(
3894
3898
  path: "/",
3895
3899
  responses: {
3896
3900
  200: DefaultSuccessResponseSchema.extend({
3897
- message: z57.string()
3901
+ message: z58.string()
3898
3902
  }),
3899
3903
  ...DefaultResponses
3900
3904
  },
@@ -3904,19 +3908,19 @@ var roomContract = initContract18().router(
3904
3908
  getAll: {
3905
3909
  method: "GET",
3906
3910
  path: "",
3907
- query: z57.object({
3908
- page: z57.coerce.number().default(1),
3909
- pageSize: z57.coerce.number().default(10),
3910
- keyword: z57.string().optional(),
3911
- assigneeId: z57.string().uuid().optional().nullable(),
3912
- resolved: z57.boolean().or(z57.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
3911
+ query: z58.object({
3912
+ page: z58.coerce.number().default(1),
3913
+ pageSize: z58.coerce.number().default(10),
3914
+ keyword: z58.string().optional(),
3915
+ assigneeId: z58.string().uuid().optional().nullable(),
3916
+ resolved: z58.boolean().or(z58.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
3913
3917
  }),
3914
3918
  responses: {
3915
3919
  200: DefaultSuccessResponseSchema.extend({
3916
- data: z57.array(MailRoomSchema),
3917
- total: z57.number(),
3918
- page: z57.number(),
3919
- pageSize: z57.number()
3920
+ data: z58.array(MailRoomSchema),
3921
+ total: z58.number(),
3922
+ page: z58.number(),
3923
+ pageSize: z58.number()
3920
3924
  }),
3921
3925
  ...DefaultResponses
3922
3926
  },
@@ -3925,8 +3929,8 @@ var roomContract = initContract18().router(
3925
3929
  getById: {
3926
3930
  method: "GET",
3927
3931
  path: "/:id",
3928
- pathParams: z57.object({
3929
- id: z57.string().uuid()
3932
+ pathParams: z58.object({
3933
+ id: z58.string().uuid()
3930
3934
  }),
3931
3935
  responses: {
3932
3936
  200: DefaultSuccessResponseSchema.extend({
@@ -3939,12 +3943,12 @@ var roomContract = initContract18().router(
3939
3943
  getAttachments: {
3940
3944
  method: "GET",
3941
3945
  path: "/:id/attachments",
3942
- pathParams: z57.object({
3943
- id: z57.string().uuid()
3946
+ pathParams: z58.object({
3947
+ id: z58.string().uuid()
3944
3948
  }),
3945
3949
  responses: {
3946
3950
  200: DefaultSuccessResponseSchema.extend({
3947
- data: z57.array(AttachmentSchema2)
3951
+ data: z58.array(AttachmentSchema2)
3948
3952
  }),
3949
3953
  ...DefaultResponses
3950
3954
  },
@@ -3953,12 +3957,12 @@ var roomContract = initContract18().router(
3953
3957
  getParticipants: {
3954
3958
  method: "GET",
3955
3959
  path: "/:id/participants",
3956
- pathParams: z57.object({
3957
- id: z57.string().uuid()
3960
+ pathParams: z58.object({
3961
+ id: z58.string().uuid()
3958
3962
  }),
3959
3963
  responses: {
3960
3964
  200: DefaultSuccessResponseSchema.extend({
3961
- data: z57.array(MailUserSchema)
3965
+ data: z58.array(MailUserSchema)
3962
3966
  }),
3963
3967
  ...DefaultResponses
3964
3968
  },
@@ -3967,8 +3971,8 @@ var roomContract = initContract18().router(
3967
3971
  update: {
3968
3972
  method: "PATCH",
3969
3973
  path: "/:id",
3970
- pathParams: z57.object({
3971
- id: z57.string()
3974
+ pathParams: z58.object({
3975
+ id: z58.string()
3972
3976
  }),
3973
3977
  responses: {
3974
3978
  200: DefaultSuccessResponseSchema.extend({
@@ -3976,15 +3980,15 @@ var roomContract = initContract18().router(
3976
3980
  }),
3977
3981
  ...DefaultResponses
3978
3982
  },
3979
- body: z57.object({
3980
- resolved: z57.boolean().or(
3981
- z57.union([z57.literal("true"), z57.literal("false")]).transform((value) => value.toLowerCase() === "true")
3983
+ body: z58.object({
3984
+ resolved: z58.boolean().or(
3985
+ z58.union([z58.literal("true"), z58.literal("false")]).transform((value) => value.toLowerCase() === "true")
3982
3986
  ).optional().nullable(),
3983
- assigneeId: z57.string().uuid().optional().nullable(),
3984
- note: z57.string().optional(),
3985
- tags: z57.array(z57.string().uuid()).optional(),
3986
- handover: z57.boolean().or(
3987
- z57.union([z57.literal("true"), z57.literal("false")]).transform((value) => value.toLowerCase() === "true")
3987
+ assigneeId: z58.string().uuid().optional().nullable(),
3988
+ note: z58.string().optional(),
3989
+ tags: z58.array(z58.string().uuid()).optional(),
3990
+ handover: z58.boolean().or(
3991
+ z58.union([z58.literal("true"), z58.literal("false")]).transform((value) => value.toLowerCase() === "true")
3988
3992
  ).optional().nullable()
3989
3993
  }),
3990
3994
  summary: "Update a mail room by id"
@@ -3992,12 +3996,12 @@ var roomContract = initContract18().router(
3992
3996
  markAsRead: {
3993
3997
  method: "GET",
3994
3998
  path: "/:id",
3995
- pathParams: z57.object({
3996
- id: z57.string().uuid()
3999
+ pathParams: z58.object({
4000
+ id: z58.string().uuid()
3997
4001
  }),
3998
4002
  responses: {
3999
4003
  200: DefaultSuccessResponseSchema.extend({
4000
- message: z57.string()
4004
+ message: z58.string()
4001
4005
  }),
4002
4006
  ...DefaultResponses
4003
4007
  },
@@ -4011,47 +4015,47 @@ var roomContract = initContract18().router(
4011
4015
 
4012
4016
  // src/mail/account-contract.ts
4013
4017
  import { initContract as initContract19 } from "@ts-rest/core";
4014
- import z59 from "zod";
4018
+ import z60 from "zod";
4015
4019
 
4016
4020
  // src/mail/schemas/account-validation.schema.ts
4017
- import z58 from "zod";
4021
+ import z59 from "zod";
4018
4022
  var AccountContractsValidationSchemas = {
4019
4023
  create: {
4020
- input: z58.object({
4021
- address: z58.string().email("Email address must be valid email."),
4022
- name: z58.string().min(1, "Account name cannot be empty."),
4023
- password: z58.string().min(1, "Password cannot be empty."),
4024
- mailServerId: z58.string().uuid("Invalid mail_server_id")
4024
+ input: z59.object({
4025
+ address: z59.string().email("Email address must be valid email."),
4026
+ name: z59.string().min(1, "Account name cannot be empty."),
4027
+ password: z59.string().min(1, "Password cannot be empty."),
4028
+ mailServerId: z59.string().uuid("Invalid mail_server_id")
4025
4029
  })
4026
4030
  },
4027
4031
  getById: {
4028
- input: z58.object({
4029
- id: z58.string().uuid()
4032
+ input: z59.object({
4033
+ id: z59.string().uuid()
4030
4034
  }),
4031
4035
  output: MailAccountSchema
4032
4036
  },
4033
4037
  getAll: {
4034
- output: z58.array(MailAccountSchema)
4038
+ output: z59.array(MailAccountSchema)
4035
4039
  },
4036
4040
  update: {
4037
4041
  input: MailAccountSchema,
4038
4042
  output: MailAccountSchema
4039
4043
  },
4040
4044
  disconnect: {
4041
- input: z58.object({
4042
- id: z58.string().uuid()
4045
+ input: z59.object({
4046
+ id: z59.string().uuid()
4043
4047
  }),
4044
4048
  output: MailAccountSchema
4045
4049
  },
4046
4050
  reconnect: {
4047
- input: z58.object({
4048
- id: z58.string()
4051
+ input: z59.object({
4052
+ id: z59.string()
4049
4053
  }),
4050
4054
  output: MailAccountSchema
4051
4055
  },
4052
4056
  delete: {
4053
- input: z58.object({
4054
- id: z58.string()
4057
+ input: z59.object({
4058
+ id: z59.string()
4055
4059
  }),
4056
4060
  output: MailAccountSchema
4057
4061
  }
@@ -4067,16 +4071,16 @@ var accountContract = initContract19().router(
4067
4071
  responses: {
4068
4072
  201: DefaultSuccessResponseSchema.extend({
4069
4073
  // data: AccountContractsValidationSchemas.create.output,
4070
- message: z59.string()
4074
+ message: z60.string()
4071
4075
  }),
4072
- 400: z59.object({
4073
- message: z59.string()
4076
+ 400: z60.object({
4077
+ message: z60.string()
4074
4078
  }),
4075
- 409: z59.object({
4076
- message: z59.string()
4079
+ 409: z60.object({
4080
+ message: z60.string()
4077
4081
  }),
4078
- 500: z59.object({
4079
- message: z59.string()
4082
+ 500: z60.object({
4083
+ message: z60.string()
4080
4084
  }),
4081
4085
  ...DefaultResponses
4082
4086
  },
@@ -4105,7 +4109,7 @@ var accountContract = initContract19().router(
4105
4109
  path: "",
4106
4110
  responses: {
4107
4111
  200: DefaultSuccessResponseSchema.extend({
4108
- data: z59.any()
4112
+ data: z60.any()
4109
4113
  // data: AccountContractsValidationSchemas.getAll.output,
4110
4114
  }),
4111
4115
  ...DefaultResponses
@@ -4117,8 +4121,8 @@ var accountContract = initContract19().router(
4117
4121
  update: {
4118
4122
  method: "PATCH",
4119
4123
  path: "/:id",
4120
- pathParams: z59.object({
4121
- id: z59.string().uuid()
4124
+ pathParams: z60.object({
4125
+ id: z60.string().uuid()
4122
4126
  }),
4123
4127
  responses: {
4124
4128
  201: DefaultSuccessResponseSchema.extend({
@@ -4167,7 +4171,7 @@ var accountContract = initContract19().router(
4167
4171
  pathParams: AccountContractsValidationSchemas.delete.input,
4168
4172
  responses: {
4169
4173
  200: DefaultSuccessResponseSchema.extend({
4170
- message: z59.string()
4174
+ message: z60.string()
4171
4175
  }),
4172
4176
  ...DefaultResponses
4173
4177
  },
@@ -4184,7 +4188,7 @@ var accountContract = initContract19().router(
4184
4188
 
4185
4189
  // src/mail/mail-server-contract.ts
4186
4190
  import { initContract as initContract20 } from "@ts-rest/core";
4187
- import z60 from "zod";
4191
+ import z61 from "zod";
4188
4192
  var serverContract = initContract20().router(
4189
4193
  {
4190
4194
  create: {
@@ -4192,7 +4196,7 @@ var serverContract = initContract20().router(
4192
4196
  path: "/",
4193
4197
  responses: {
4194
4198
  200: DefaultSuccessResponseSchema.extend({
4195
- message: z60.string()
4199
+ message: z61.string()
4196
4200
  }),
4197
4201
  ...DefaultResponses
4198
4202
  },
@@ -4202,12 +4206,12 @@ var serverContract = initContract20().router(
4202
4206
  get: {
4203
4207
  method: "GET",
4204
4208
  path: "/:id",
4205
- pathParams: z60.object({
4206
- id: z60.string()
4209
+ pathParams: z61.object({
4210
+ id: z61.string()
4207
4211
  }),
4208
4212
  responses: {
4209
4213
  200: DefaultSuccessResponseSchema.extend({
4210
- message: z60.string()
4214
+ message: z61.string()
4211
4215
  }),
4212
4216
  ...DefaultResponses
4213
4217
  },
@@ -4216,12 +4220,12 @@ var serverContract = initContract20().router(
4216
4220
  update: {
4217
4221
  method: "PATCH",
4218
4222
  path: "/:id",
4219
- pathParams: z60.object({
4220
- id: z60.string()
4223
+ pathParams: z61.object({
4224
+ id: z61.string()
4221
4225
  }),
4222
4226
  responses: {
4223
4227
  200: DefaultSuccessResponseSchema.extend({
4224
- message: z60.string()
4228
+ message: z61.string()
4225
4229
  }),
4226
4230
  ...DefaultResponses
4227
4231
  },
@@ -4231,12 +4235,12 @@ var serverContract = initContract20().router(
4231
4235
  delete: {
4232
4236
  method: "PATCH",
4233
4237
  path: "/:id",
4234
- pathParams: z60.object({
4235
- id: z60.string()
4238
+ pathParams: z61.object({
4239
+ id: z61.string()
4236
4240
  }),
4237
4241
  responses: {
4238
4242
  200: DefaultSuccessResponseSchema.extend({
4239
- message: z60.string()
4243
+ message: z61.string()
4240
4244
  }),
4241
4245
  ...DefaultResponses
4242
4246
  },
@@ -4251,44 +4255,44 @@ var serverContract = initContract20().router(
4251
4255
 
4252
4256
  // src/mail/message-contract.ts
4253
4257
  import { initContract as initContract21 } from "@ts-rest/core";
4254
- import z62 from "zod";
4258
+ import z63 from "zod";
4255
4259
 
4256
4260
  // src/mail/schemas/message-validation.schema.ts
4257
- import z61 from "zod";
4258
- var MailParticipant = z61.object({
4259
- name: z61.string().optional(),
4260
- address: z61.string().email()
4261
+ import z62 from "zod";
4262
+ var MailParticipant = z62.object({
4263
+ name: z62.string().optional(),
4264
+ address: z62.string().email()
4261
4265
  });
4262
4266
  var MessageContractsValidationsSchema = {
4263
4267
  submit: {
4264
- input: z61.object({
4265
- subject: z61.string(),
4266
- text: z61.string(),
4267
- html: z61.string(),
4268
+ input: z62.object({
4269
+ subject: z62.string(),
4270
+ text: z62.string(),
4271
+ html: z62.string(),
4268
4272
  from: MailParticipant,
4269
- to: z61.array(MailParticipant),
4270
- cc: z61.array(MailParticipant).optional(),
4271
- bcc: z61.array(MailParticipant).optional(),
4272
- reference: z61.object({
4273
- messageId: z61.string(),
4274
- action: z61.union([z61.literal("reply"), z61.literal("forward")])
4273
+ to: z62.array(MailParticipant),
4274
+ cc: z62.array(MailParticipant).optional(),
4275
+ bcc: z62.array(MailParticipant).optional(),
4276
+ reference: z62.object({
4277
+ messageId: z62.string(),
4278
+ action: z62.union([z62.literal("reply"), z62.literal("forward")])
4275
4279
  }).optional(),
4276
- attachments: z61.array(
4277
- z61.object({
4278
- fileType: z61.string(),
4279
- fileName: z61.string(),
4280
- fileKey: z61.string(),
4281
- fileSize: z61.number(),
4282
- bucketName: z61.string(),
4283
- presignedUrl: z61.string()
4280
+ attachments: z62.array(
4281
+ z62.object({
4282
+ fileType: z62.string(),
4283
+ fileName: z62.string(),
4284
+ fileKey: z62.string(),
4285
+ fileSize: z62.number(),
4286
+ bucketName: z62.string(),
4287
+ presignedUrl: z62.string()
4284
4288
  })
4285
4289
  ).optional()
4286
4290
  }),
4287
- output: z61.object({
4288
- response: z61.string(),
4289
- messageId: z61.string(),
4290
- sendAt: z61.string(),
4291
- queueId: z61.string()
4291
+ output: z62.object({
4292
+ response: z62.string(),
4293
+ messageId: z62.string(),
4294
+ sendAt: z62.string(),
4295
+ queueId: z62.string()
4292
4296
  })
4293
4297
  }
4294
4298
  };
@@ -4313,8 +4317,8 @@ var messageContract = initContract21().router(
4313
4317
  getById: {
4314
4318
  method: "GET",
4315
4319
  path: "/:id",
4316
- pathParams: z62.object({
4317
- id: z62.string()
4320
+ pathParams: z63.object({
4321
+ id: z63.string()
4318
4322
  }),
4319
4323
  responses: {
4320
4324
  200: DefaultSuccessResponseSchema.extend({
@@ -4394,7 +4398,7 @@ var messengerContract = initContract23().router({
4394
4398
 
4395
4399
  // src/permission/index.ts
4396
4400
  import { initContract as initContract24 } from "@ts-rest/core";
4397
- import z63 from "zod";
4401
+ import z64 from "zod";
4398
4402
  var permissionContract = initContract24().router(
4399
4403
  {
4400
4404
  getPermissions: {
@@ -4402,9 +4406,9 @@ var permissionContract = initContract24().router(
4402
4406
  path: "",
4403
4407
  headers: DefaultHeaderSchema,
4404
4408
  responses: {
4405
- 200: z63.object({ permissions: PermissionSchema.array() }),
4406
- 400: z63.object({
4407
- message: z63.string()
4409
+ 200: z64.object({ permissions: PermissionSchema.array() }),
4410
+ 400: z64.object({
4411
+ message: z64.string()
4408
4412
  }),
4409
4413
  401: DefaultUnauthorizedSchema,
4410
4414
  500: DefaultErrorResponseSchema
@@ -4417,15 +4421,15 @@ var permissionContract = initContract24().router(
4417
4421
 
4418
4422
  // src/role/index.ts
4419
4423
  import { initContract as initContract25 } from "@ts-rest/core";
4420
- import z65 from "zod";
4424
+ import z66 from "zod";
4421
4425
 
4422
4426
  // src/role/validation.ts
4423
- import { z as z64 } from "zod";
4424
- var CreateRoleSchema = z64.object({
4425
- systemName: z64.string(),
4426
- displayName: z64.string(),
4427
- description: z64.string().nullable(),
4428
- permissions: z64.array(z64.string())
4427
+ import { z as z65 } from "zod";
4428
+ var CreateRoleSchema = z65.object({
4429
+ systemName: z65.string(),
4430
+ displayName: z65.string(),
4431
+ description: z65.string().nullable(),
4432
+ permissions: z65.array(z65.string())
4429
4433
  });
4430
4434
  var UpdateRoleSchema = CreateRoleSchema;
4431
4435
 
@@ -4441,8 +4445,8 @@ var roleContract = initContract25().router(
4441
4445
  201: DefaultSuccessResponseSchema.extend({
4442
4446
  role: RoleSchema
4443
4447
  }),
4444
- 400: z65.object({
4445
- message: z65.string()
4448
+ 400: z66.object({
4449
+ message: z66.string()
4446
4450
  }),
4447
4451
  401: DefaultUnauthorizedSchema,
4448
4452
  500: DefaultErrorResponseSchema
@@ -4452,15 +4456,15 @@ var roleContract = initContract25().router(
4452
4456
  getRoles: {
4453
4457
  method: "GET",
4454
4458
  path: "",
4455
- query: z65.object({
4456
- page: z65.coerce.number().default(1),
4457
- pageSize: z65.coerce.number().default(10)
4459
+ query: z66.object({
4460
+ page: z66.coerce.number().default(1),
4461
+ pageSize: z66.coerce.number().default(10)
4458
4462
  }).optional(),
4459
4463
  headers: DefaultHeaderSchema,
4460
4464
  responses: {
4461
4465
  200: WithPagination(RoleSchema),
4462
- 400: z65.object({
4463
- message: z65.string()
4466
+ 400: z66.object({
4467
+ message: z66.string()
4464
4468
  }),
4465
4469
  401: DefaultUnauthorizedSchema,
4466
4470
  500: DefaultErrorResponseSchema
@@ -4470,15 +4474,15 @@ var roleContract = initContract25().router(
4470
4474
  updateRole: {
4471
4475
  method: "PATCH",
4472
4476
  path: "/:id",
4473
- pathParams: z65.object({ id: z65.string() }),
4477
+ pathParams: z66.object({ id: z66.string() }),
4474
4478
  headers: DefaultHeaderSchema,
4475
4479
  body: UpdateRoleSchema,
4476
4480
  responses: {
4477
4481
  201: DefaultSuccessResponseSchema.extend({
4478
4482
  role: RoleSchema
4479
4483
  }),
4480
- 400: z65.object({
4481
- message: z65.string()
4484
+ 400: z66.object({
4485
+ message: z66.string()
4482
4486
  }),
4483
4487
  401: DefaultUnauthorizedSchema,
4484
4488
  500: DefaultErrorResponseSchema
@@ -4488,11 +4492,11 @@ var roleContract = initContract25().router(
4488
4492
  deleteRole: {
4489
4493
  method: "DELETE",
4490
4494
  path: "/:id",
4491
- pathParams: z65.object({ id: z65.string() }),
4495
+ pathParams: z66.object({ id: z66.string() }),
4492
4496
  headers: DefaultHeaderSchema,
4493
4497
  body: null,
4494
4498
  responses: {
4495
- 200: DefaultSuccessResponseSchema.extend({ message: z65.string() }),
4499
+ 200: DefaultSuccessResponseSchema.extend({ message: z66.string() }),
4496
4500
  500: DefaultErrorResponseSchema
4497
4501
  },
4498
4502
  summary: "Delete a role."
@@ -4503,19 +4507,19 @@ var roleContract = initContract25().router(
4503
4507
 
4504
4508
  // src/tag/index.ts
4505
4509
  import { initContract as initContract26 } from "@ts-rest/core";
4506
- import z67 from "zod";
4510
+ import z68 from "zod";
4507
4511
 
4508
4512
  // src/tag/validation.ts
4509
- import { z as z66 } from "zod";
4510
- var CreateTagSchema = z66.object({
4511
- name: z66.string(),
4513
+ import { z as z67 } from "zod";
4514
+ var CreateTagSchema = z67.object({
4515
+ name: z67.string(),
4512
4516
  group: TagGroupSchema
4513
4517
  });
4514
- var GetTagsSchema = z66.object({
4518
+ var GetTagsSchema = z67.object({
4515
4519
  group: TagGroupSchema.default("general"),
4516
- keyword: z66.string()
4520
+ keyword: z67.string()
4517
4521
  }).partial().optional();
4518
- var UpdateTagSchema = z66.object({ name: z66.string() });
4522
+ var UpdateTagSchema = z67.object({ name: z67.string() });
4519
4523
 
4520
4524
  // src/tag/index.ts
4521
4525
  var tagContract = initContract26().router(
@@ -4538,7 +4542,7 @@ var tagContract = initContract26().router(
4538
4542
  query: GetTagsSchema,
4539
4543
  responses: {
4540
4544
  200: DefaultSuccessResponseSchema.extend({
4541
- tags: z67.array(TagSchema)
4545
+ tags: z68.array(TagSchema)
4542
4546
  }),
4543
4547
  500: DefaultErrorResponseSchema
4544
4548
  },
@@ -4547,7 +4551,7 @@ var tagContract = initContract26().router(
4547
4551
  updateTag: {
4548
4552
  method: "PATCH",
4549
4553
  path: "/:id",
4550
- pathParams: z67.object({ id: z67.string() }),
4554
+ pathParams: z68.object({ id: z68.string() }),
4551
4555
  body: UpdateTagSchema,
4552
4556
  responses: {
4553
4557
  200: DefaultSuccessResponseSchema.extend({
@@ -4560,11 +4564,11 @@ var tagContract = initContract26().router(
4560
4564
  deleteTag: {
4561
4565
  method: "DELETE",
4562
4566
  path: "/:id",
4563
- pathParams: z67.object({ id: z67.string() }),
4564
- body: z67.any().optional(),
4567
+ pathParams: z68.object({ id: z68.string() }),
4568
+ body: z68.any().optional(),
4565
4569
  // We don't need the body.
4566
4570
  responses: {
4567
- 200: DefaultSuccessResponseSchema.extend({ message: z67.string() }),
4571
+ 200: DefaultSuccessResponseSchema.extend({ message: z68.string() }),
4568
4572
  500: DefaultErrorResponseSchema
4569
4573
  },
4570
4574
  headers: DefaultHeaderSchema
@@ -4577,27 +4581,27 @@ var tagContract = initContract26().router(
4577
4581
 
4578
4582
  // src/telephony-agent-presence-status/index.ts
4579
4583
  import { initContract as initContract27 } from "@ts-rest/core";
4580
- import z70 from "zod";
4584
+ import z71 from "zod";
4581
4585
 
4582
4586
  // src/telephony-agent-presence-status/schema.ts
4583
- import z68 from "zod";
4587
+ import z69 from "zod";
4584
4588
  var PresenceStatusSchema = DefaultEntitySchema.extend({
4585
- status: z68.string(),
4586
- description: z68.string()
4589
+ status: z69.string(),
4590
+ description: z69.string()
4587
4591
  });
4588
4592
  var UserPresenceStatusSchema = DefaultEntitySchema.extend({
4589
4593
  user: UserSchema,
4590
4594
  presenceStatus: PresenceStatusSchema,
4591
- customPresenceStatus: z68.string().nullable().optional()
4595
+ customPresenceStatus: z69.string().nullable().optional()
4592
4596
  });
4593
4597
 
4594
4598
  // src/telephony-agent-presence-status/validation.ts
4595
- import { z as z69 } from "zod";
4596
- var UpdateUserStatusSchema = z69.object({
4597
- userId: z69.string(),
4598
- presenceStatusId: z69.string().nullable().optional(),
4599
- customPreseneStatus: z69.string().nullable().optional(),
4600
- reason: z69.string()
4599
+ import { z as z70 } from "zod";
4600
+ var UpdateUserStatusSchema = z70.object({
4601
+ userId: z70.string(),
4602
+ presenceStatusId: z70.string().nullable().optional(),
4603
+ customPreseneStatus: z70.string().nullable().optional(),
4604
+ reason: z70.string()
4601
4605
  });
4602
4606
 
4603
4607
  // src/telephony-agent-presence-status/index.ts
@@ -4608,9 +4612,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4608
4612
  path: "/presence_status",
4609
4613
  headers: DefaultHeaderSchema,
4610
4614
  responses: {
4611
- 200: z70.array(PresenceStatusSchema),
4612
- 400: z70.object({
4613
- message: z70.string()
4615
+ 200: z71.array(PresenceStatusSchema),
4616
+ 400: z71.object({
4617
+ message: z71.string()
4614
4618
  }),
4615
4619
  401: DefaultUnauthorizedSchema,
4616
4620
  500: DefaultErrorResponseSchema
@@ -4622,9 +4626,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4622
4626
  path: "/agents/presence_status",
4623
4627
  headers: DefaultHeaderSchema,
4624
4628
  responses: {
4625
- 200: z70.array(UserPresenceStatusSchema),
4626
- 400: z70.object({
4627
- message: z70.string()
4629
+ 200: z71.array(UserPresenceStatusSchema),
4630
+ 400: z71.object({
4631
+ message: z71.string()
4628
4632
  }),
4629
4633
  401: DefaultUnauthorizedSchema,
4630
4634
  500: DefaultErrorResponseSchema
@@ -4634,12 +4638,12 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4634
4638
  getAgentStatus: {
4635
4639
  method: "GET",
4636
4640
  path: "/presence_status/check_update/:userId",
4637
- pathParams: z70.object({ userId: z70.string() }),
4641
+ pathParams: z71.object({ userId: z71.string() }),
4638
4642
  headers: DefaultHeaderSchema,
4639
4643
  responses: {
4640
4644
  200: UserPresenceStatusSchema,
4641
- 400: z70.object({
4642
- message: z70.string()
4645
+ 400: z71.object({
4646
+ message: z71.string()
4643
4647
  }),
4644
4648
  401: DefaultUnauthorizedSchema,
4645
4649
  500: DefaultErrorResponseSchema
@@ -4655,8 +4659,8 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4655
4659
  200: DefaultSuccessResponseSchema.extend({
4656
4660
  userPresenceStatu: UserPresenceStatusSchema
4657
4661
  }),
4658
- 400: z70.object({
4659
- message: z70.string()
4662
+ 400: z71.object({
4663
+ message: z71.string()
4660
4664
  }),
4661
4665
  401: DefaultUnauthorizedSchema,
4662
4666
  500: DefaultErrorResponseSchema
@@ -4668,58 +4672,58 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4668
4672
  );
4669
4673
 
4670
4674
  // src/telephony-cdr/index.ts
4671
- import z73 from "zod";
4675
+ import z74 from "zod";
4672
4676
 
4673
4677
  // src/telephony-cdr/validation.ts
4674
- import z71 from "zod";
4675
- var CreateTelephonyCdrSchema = z71.object({
4676
- uniqueCallId: z71.string({ required_error: "uniqueCallId is required" }),
4677
- timeStart: z71.string({ required_error: "timeStart is required" }),
4678
- callFrom: z71.string({ required_error: "callFrom is required" }),
4679
- callTo: z71.string({ required_error: "callTo is required" }),
4680
- callDuration: z71.number().nullable(),
4681
- talkDuration: z71.number().nullable(),
4682
- srcTrunkName: z71.string().nullable(),
4683
- dstTrunkName: z71.string().nullable(),
4684
- pinCode: z71.string().nullable(),
4685
- status: z71.string(),
4686
- type: z71.string(),
4687
- recording: z71.string().nullable(),
4688
- didNumber: z71.string().nullable(),
4689
- agentRingTime: z71.number().nullable()
4678
+ import z72 from "zod";
4679
+ var CreateTelephonyCdrSchema = z72.object({
4680
+ uniqueCallId: z72.string({ required_error: "uniqueCallId is required" }),
4681
+ timeStart: z72.string({ required_error: "timeStart is required" }),
4682
+ callFrom: z72.string({ required_error: "callFrom is required" }),
4683
+ callTo: z72.string({ required_error: "callTo is required" }),
4684
+ callDuration: z72.number().nullable(),
4685
+ talkDuration: z72.number().nullable(),
4686
+ srcTrunkName: z72.string().nullable(),
4687
+ dstTrunkName: z72.string().nullable(),
4688
+ pinCode: z72.string().nullable(),
4689
+ status: z72.string(),
4690
+ type: z72.string(),
4691
+ recording: z72.string().nullable(),
4692
+ didNumber: z72.string().nullable(),
4693
+ agentRingTime: z72.number().nullable()
4690
4694
  });
4691
4695
  var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
4692
- selectedDate: z71.string().optional(),
4693
- type: z71.array(z71.string()).optional(),
4694
- status: z71.array(z71.string()).optional(),
4695
- callFrom: z71.string().optional(),
4696
- callTo: z71.string().optional(),
4697
- trunk: z71.array(z71.string()).optional()
4696
+ selectedDate: z72.string().optional(),
4697
+ type: z72.array(z72.string()).optional(),
4698
+ status: z72.array(z72.string()).optional(),
4699
+ callFrom: z72.string().optional(),
4700
+ callTo: z72.string().optional(),
4701
+ trunk: z72.array(z72.string()).optional()
4698
4702
  });
4699
4703
  var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
4700
- type: z71.array(z71.string()).optional(),
4701
- status: z71.array(z71.string()).optional(),
4702
- callFrom: z71.string().optional(),
4703
- callTo: z71.string().optional(),
4704
- result: z71.array(z71.string()).optional(),
4705
- callTags: z71.array(z71.string()).optional(),
4706
- selectedDate: z71.string().optional(),
4707
- agentId: z71.string().optional(),
4708
- contact: z71.array(z71.string()).optional(),
4709
- callStatus: z71.array(z71.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
4710
- queueIds: z71.array(z71.string()).optional(),
4711
- notes: z71.string().optional()
4704
+ type: z72.array(z72.string()).optional(),
4705
+ status: z72.array(z72.string()).optional(),
4706
+ callFrom: z72.string().optional(),
4707
+ callTo: z72.string().optional(),
4708
+ result: z72.array(z72.string()).optional(),
4709
+ callTags: z72.array(z72.string()).optional(),
4710
+ selectedDate: z72.string().optional(),
4711
+ agentId: z72.string().optional(),
4712
+ contact: z72.array(z72.string()).optional(),
4713
+ callStatus: z72.array(z72.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
4714
+ queueIds: z72.array(z72.string()).optional(),
4715
+ notes: z72.string().optional()
4712
4716
  });
4713
4717
  var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
4714
- z71.object({
4715
- page: z71.coerce.number().positive().optional(),
4716
- pageSize: z71.coerce.number().positive().optional()
4718
+ z72.object({
4719
+ page: z72.coerce.number().positive().optional(),
4720
+ pageSize: z72.coerce.number().positive().optional()
4717
4721
  })
4718
4722
  );
4719
4723
  var NullEmptyStringUndefined = ["", null, void 0];
4720
4724
  var EmtptyArrayUndefined = [[], void 0];
4721
4725
  var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
4722
- reportType: z71.enum([
4726
+ reportType: z72.enum([
4723
4727
  "extcallstatistics",
4724
4728
  "extcallactivity",
4725
4729
  "trunkactivity",
@@ -4729,59 +4733,59 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
4729
4733
  "queueagentmisscalls",
4730
4734
  "queueagentinoutcalls"
4731
4735
  ]),
4732
- selectedDate: z71.string().optional(),
4733
- communicationType: z71.union([z71.literal("Inbound"), z71.literal("Outbound"), z71.literal("Internal")]).optional(),
4734
- time: z71.string().optional(),
4735
- queueList: z71.array(z71.string()).optional(),
4736
- queueId: z71.string().optional(),
4737
- trunkList: z71.array(z71.string()).optional(),
4738
- extensionList: z71.array(z71.string()).optional()
4736
+ selectedDate: z72.string().optional(),
4737
+ communicationType: z72.union([z72.literal("Inbound"), z72.literal("Outbound"), z72.literal("Internal")]).optional(),
4738
+ time: z72.string().optional(),
4739
+ queueList: z72.array(z72.string()).optional(),
4740
+ queueId: z72.string().optional(),
4741
+ trunkList: z72.array(z72.string()).optional(),
4742
+ extensionList: z72.array(z72.string()).optional()
4739
4743
  }).superRefine((input, ctx) => {
4740
4744
  if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
4741
4745
  ctx.addIssue({
4742
- code: z71.ZodIssueCode.custom,
4746
+ code: z72.ZodIssueCode.custom,
4743
4747
  path: ["selectedDate"],
4744
4748
  message: "selectedDate is required."
4745
4749
  });
4746
4750
  }
4747
4751
  if (input.reportType === "extcallstatistics" && !NullEmptyStringUndefined.includes(input.communicationType)) {
4748
4752
  ctx.addIssue({
4749
- code: z71.ZodIssueCode.custom,
4753
+ code: z72.ZodIssueCode.custom,
4750
4754
  path: ["communicationType"],
4751
4755
  message: "communicationType is required."
4752
4756
  });
4753
4757
  }
4754
4758
  if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
4755
4759
  ctx.addIssue({
4756
- code: z71.ZodIssueCode.custom,
4760
+ code: z72.ZodIssueCode.custom,
4757
4761
  path: ["time"],
4758
4762
  message: "time is required."
4759
4763
  });
4760
4764
  }
4761
4765
  if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
4762
4766
  ctx.addIssue({
4763
- code: z71.ZodIssueCode.custom,
4767
+ code: z72.ZodIssueCode.custom,
4764
4768
  path: ["queueList"],
4765
4769
  message: "queueList is required."
4766
4770
  });
4767
4771
  }
4768
4772
  if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
4769
4773
  ctx.addIssue({
4770
- code: z71.ZodIssueCode.custom,
4774
+ code: z72.ZodIssueCode.custom,
4771
4775
  path: ["queueId"],
4772
4776
  message: "queueId is required."
4773
4777
  });
4774
4778
  }
4775
4779
  if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
4776
4780
  ctx.addIssue({
4777
- code: z71.ZodIssueCode.custom,
4781
+ code: z72.ZodIssueCode.custom,
4778
4782
  path: ["trunkList"],
4779
4783
  message: "trunkList is required."
4780
4784
  });
4781
4785
  }
4782
4786
  if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
4783
4787
  ctx.addIssue({
4784
- code: z71.ZodIssueCode.custom,
4788
+ code: z72.ZodIssueCode.custom,
4785
4789
  path: ["extensionList"],
4786
4790
  message: "extensionList is required."
4787
4791
  });
@@ -4792,161 +4796,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
4792
4796
  import { initContract as initContract28 } from "@ts-rest/core";
4793
4797
 
4794
4798
  // src/telephony-cdr/call-report.schema.ts
4795
- import z72 from "zod";
4796
- var ExtCallStatisticsListSchema = z72.object({
4799
+ import z73 from "zod";
4800
+ var ExtCallStatisticsListSchema = z73.object({
4797
4801
  /** @example "ext_num" */
4798
- ext_num: z72.string(),
4802
+ ext_num: z73.string(),
4799
4803
  /** @example "ext_name" */
4800
- ext_name: z72.string(),
4804
+ ext_name: z73.string(),
4801
4805
  /** @example 0 */
4802
- answered_calls: z72.number(),
4806
+ answered_calls: z73.number(),
4803
4807
  /** @example 0 */
4804
- no_answer_calls: z72.number(),
4808
+ no_answer_calls: z73.number(),
4805
4809
  /** @example 0 */
4806
- busy_calls: z72.number(),
4810
+ busy_calls: z73.number(),
4807
4811
  /** @example 0 */
4808
- failed_calls: z72.number(),
4812
+ failed_calls: z73.number(),
4809
4813
  /** @example 0 */
4810
- voicemail_calls: z72.number(),
4814
+ voicemail_calls: z73.number(),
4811
4815
  /** @example 0 */
4812
- total_holding_time: z72.number(),
4816
+ total_holding_time: z73.number(),
4813
4817
  /** @example 0 */
4814
- total_talking_time: z72.number(),
4818
+ total_talking_time: z73.number(),
4815
4819
  /** @example "src_name" */
4816
- src_name: z72.string(),
4820
+ src_name: z73.string(),
4817
4821
  /** @example 0 */
4818
- total_call_count: z72.number(),
4822
+ total_call_count: z73.number(),
4819
4823
  /** @example "mobile" */
4820
- mobile: z72.string()
4821
- });
4822
- var ExtStatisticSchema = z72.object({
4823
- ext_num: z72.string(),
4824
- ext_name: z72.string(),
4825
- answered_calls: z72.number(),
4826
- no_answer_calls: z72.number(),
4827
- busy_calls: z72.number(),
4828
- failed_calls: z72.number(),
4829
- voicemail_calls: z72.number(),
4830
- total_holding_time: z72.number(),
4831
- total_talking_time: z72.number(),
4832
- time: z72.number(),
4833
- mobile: z72.string()
4834
- });
4835
- var ExtCallActivityListSchema = z72.object({
4836
- time: z72.number(),
4837
- answered_calls: z72.number(),
4838
- no_answer_calls: z72.number(),
4839
- busy_calls: z72.number(),
4840
- failed_calls: z72.number(),
4841
- voicemail_calls: z72.number(),
4842
- total_holding_time: z72.number(),
4843
- total_talking_time: z72.number(),
4844
- ext_statistics: z72.array(ExtStatisticSchema)
4845
- });
4846
- var TrunkList = z72.object({
4847
- trunk_name: z72.string(),
4848
- total_calls: z72.number()
4849
- });
4850
- var TrunkActivityListSchema = z72.object({
4851
- time: z72.number(),
4852
- trunk_list: z72.array(TrunkList)
4853
- });
4854
- var QueueAvgWaitTalkTimeListSchema = z72.object({
4855
- time: z72.number(),
4856
- avg_wait_time: z72.number(),
4857
- avg_talk_time: z72.number()
4858
- });
4859
- var SatisfactionListSchema = z72.object({
4860
- press_key: z72.string(),
4861
- total: z72.number(),
4862
- key_point: z72.number().optional()
4863
- });
4864
- var agentListSchema = z72.object({
4865
- agent_name: z72.string(),
4866
- agent_num: z72.string(),
4867
- satisfaction_list: z72.array(SatisfactionListSchema).optional(),
4868
- total_key: z72.number().optional(),
4869
- total_point: z72.number().optional(),
4870
- average_point: z72.number().optional()
4871
- });
4872
- var QueueSatisfactionSchema = z72.object({
4873
- queue_name: z72.string(),
4874
- queue_num: z72.string(),
4875
- satisfaction_list: z72.array(SatisfactionListSchema).optional(),
4876
- agent_list: z72.array(agentListSchema).optional(),
4877
- total_key: z72.number().optional(),
4878
- total_point: z72.number().optional(),
4879
- average_point: z72.number().optional()
4880
- });
4881
- var QueuePerformanceListSchema = z72.object({
4882
- queue: z72.string(),
4883
- total_calls: z72.number(),
4884
- answered_calls: z72.number(),
4885
- missed_calls: z72.number(),
4886
- abandoned_calls: z72.number(),
4887
- average_waiting_time: z72.number(),
4888
- average_talking_time: z72.number(),
4889
- max_waiting_time: z72.number(),
4890
- answered_rate: z72.number(),
4891
- missed_rate: z72.number(),
4892
- abandoned_rate: z72.number(),
4893
- sla: z72.number()
4894
- });
4895
- var QueueAgentMissCallsListSchema = z72.object({
4896
- agent_name: z72.string(),
4897
- agent_num: z72.string(),
4898
- time: z72.string(),
4899
- total_wait_time: z72.number(),
4900
- src_name: z72.string(),
4901
- src_num: z72.string(),
4902
- queue_status: z72.string(),
4903
- polling_attempts: z72.number(),
4904
- missed_reason: z72.string()
4905
- });
4906
- var QueueAgentInOutCallsListSchema = z72.object({
4907
- agent_name: z72.string(),
4908
- agent_num: z72.string(),
4909
- inbound_calls: z72.number(),
4910
- inbound_duration: z72.number(),
4911
- outbound_calls: z72.number(),
4912
- outbound_duration: z72.number(),
4913
- total_calls: z72.number(),
4914
- total_duration: z72.number(),
4915
- average_talk_duration: z72.number()
4916
- });
4917
- var CallReportModel = z72.object({
4918
- errcode: z72.number(),
4919
- errmsg: z72.string(),
4920
- total_number: z72.number(),
4921
- is_12hour: z72.number().optional(),
4922
- ext_call_statistics_list: z72.array(ExtCallStatisticsListSchema).optional(),
4923
- ext_call_activity_list: z72.array(ExtCallActivityListSchema).optional(),
4924
- trunk_activity_list: z72.array(TrunkActivityListSchema).optional(),
4925
- queue_avg_wait_talk_time_list: z72.array(QueueAvgWaitTalkTimeListSchema).optional(),
4824
+ mobile: z73.string()
4825
+ });
4826
+ var ExtStatisticSchema = z73.object({
4827
+ ext_num: z73.string(),
4828
+ ext_name: z73.string(),
4829
+ answered_calls: z73.number(),
4830
+ no_answer_calls: z73.number(),
4831
+ busy_calls: z73.number(),
4832
+ failed_calls: z73.number(),
4833
+ voicemail_calls: z73.number(),
4834
+ total_holding_time: z73.number(),
4835
+ total_talking_time: z73.number(),
4836
+ time: z73.number(),
4837
+ mobile: z73.string()
4838
+ });
4839
+ var ExtCallActivityListSchema = z73.object({
4840
+ time: z73.number(),
4841
+ answered_calls: z73.number(),
4842
+ no_answer_calls: z73.number(),
4843
+ busy_calls: z73.number(),
4844
+ failed_calls: z73.number(),
4845
+ voicemail_calls: z73.number(),
4846
+ total_holding_time: z73.number(),
4847
+ total_talking_time: z73.number(),
4848
+ ext_statistics: z73.array(ExtStatisticSchema)
4849
+ });
4850
+ var TrunkList = z73.object({
4851
+ trunk_name: z73.string(),
4852
+ total_calls: z73.number()
4853
+ });
4854
+ var TrunkActivityListSchema = z73.object({
4855
+ time: z73.number(),
4856
+ trunk_list: z73.array(TrunkList)
4857
+ });
4858
+ var QueueAvgWaitTalkTimeListSchema = z73.object({
4859
+ time: z73.number(),
4860
+ avg_wait_time: z73.number(),
4861
+ avg_talk_time: z73.number()
4862
+ });
4863
+ var SatisfactionListSchema = z73.object({
4864
+ press_key: z73.string(),
4865
+ total: z73.number(),
4866
+ key_point: z73.number().optional()
4867
+ });
4868
+ var agentListSchema = z73.object({
4869
+ agent_name: z73.string(),
4870
+ agent_num: z73.string(),
4871
+ satisfaction_list: z73.array(SatisfactionListSchema).optional(),
4872
+ total_key: z73.number().optional(),
4873
+ total_point: z73.number().optional(),
4874
+ average_point: z73.number().optional()
4875
+ });
4876
+ var QueueSatisfactionSchema = z73.object({
4877
+ queue_name: z73.string(),
4878
+ queue_num: z73.string(),
4879
+ satisfaction_list: z73.array(SatisfactionListSchema).optional(),
4880
+ agent_list: z73.array(agentListSchema).optional(),
4881
+ total_key: z73.number().optional(),
4882
+ total_point: z73.number().optional(),
4883
+ average_point: z73.number().optional()
4884
+ });
4885
+ var QueuePerformanceListSchema = z73.object({
4886
+ queue: z73.string(),
4887
+ total_calls: z73.number(),
4888
+ answered_calls: z73.number(),
4889
+ missed_calls: z73.number(),
4890
+ abandoned_calls: z73.number(),
4891
+ average_waiting_time: z73.number(),
4892
+ average_talking_time: z73.number(),
4893
+ max_waiting_time: z73.number(),
4894
+ answered_rate: z73.number(),
4895
+ missed_rate: z73.number(),
4896
+ abandoned_rate: z73.number(),
4897
+ sla: z73.number()
4898
+ });
4899
+ var QueueAgentMissCallsListSchema = z73.object({
4900
+ agent_name: z73.string(),
4901
+ agent_num: z73.string(),
4902
+ time: z73.string(),
4903
+ total_wait_time: z73.number(),
4904
+ src_name: z73.string(),
4905
+ src_num: z73.string(),
4906
+ queue_status: z73.string(),
4907
+ polling_attempts: z73.number(),
4908
+ missed_reason: z73.string()
4909
+ });
4910
+ var QueueAgentInOutCallsListSchema = z73.object({
4911
+ agent_name: z73.string(),
4912
+ agent_num: z73.string(),
4913
+ inbound_calls: z73.number(),
4914
+ inbound_duration: z73.number(),
4915
+ outbound_calls: z73.number(),
4916
+ outbound_duration: z73.number(),
4917
+ total_calls: z73.number(),
4918
+ total_duration: z73.number(),
4919
+ average_talk_duration: z73.number()
4920
+ });
4921
+ var CallReportModel = z73.object({
4922
+ errcode: z73.number(),
4923
+ errmsg: z73.string(),
4924
+ total_number: z73.number(),
4925
+ is_12hour: z73.number().optional(),
4926
+ ext_call_statistics_list: z73.array(ExtCallStatisticsListSchema).optional(),
4927
+ ext_call_activity_list: z73.array(ExtCallActivityListSchema).optional(),
4928
+ trunk_activity_list: z73.array(TrunkActivityListSchema).optional(),
4929
+ queue_avg_wait_talk_time_list: z73.array(QueueAvgWaitTalkTimeListSchema).optional(),
4926
4930
  queue_satisfaction: QueueSatisfactionSchema.optional(),
4927
- queue_performance_list: z72.array(QueuePerformanceListSchema).optional(),
4928
- queue_agent_miss_calls_list: z72.array(QueueAgentMissCallsListSchema).optional(),
4929
- queue_agent_in_out_calls_list: z72.array(QueueAgentInOutCallsListSchema).optional(),
4930
- callback_result: z72.string(),
4931
- page: z72.number().optional(),
4932
- pageSize: z72.number().optional()
4933
- });
4934
- var CallReportSchema = z72.object({
4935
- errcode: z72.number(),
4936
- errmsg: z72.string(),
4937
- total_number: z72.number(),
4938
- is_12hour: z72.number().optional(),
4939
- ext_call_statistics_list: z72.array(ExtCallStatisticsListSchema).optional(),
4940
- ext_call_activity_list: z72.array(ExtCallActivityListSchema).optional(),
4941
- trunk_activity_list: z72.array(TrunkActivityListSchema).optional(),
4942
- queue_avg_wait_talk_time_list: z72.array(QueueAvgWaitTalkTimeListSchema).optional(),
4931
+ queue_performance_list: z73.array(QueuePerformanceListSchema).optional(),
4932
+ queue_agent_miss_calls_list: z73.array(QueueAgentMissCallsListSchema).optional(),
4933
+ queue_agent_in_out_calls_list: z73.array(QueueAgentInOutCallsListSchema).optional(),
4934
+ callback_result: z73.string(),
4935
+ page: z73.number().optional(),
4936
+ pageSize: z73.number().optional()
4937
+ });
4938
+ var CallReportSchema = z73.object({
4939
+ errcode: z73.number(),
4940
+ errmsg: z73.string(),
4941
+ total_number: z73.number(),
4942
+ is_12hour: z73.number().optional(),
4943
+ ext_call_statistics_list: z73.array(ExtCallStatisticsListSchema).optional(),
4944
+ ext_call_activity_list: z73.array(ExtCallActivityListSchema).optional(),
4945
+ trunk_activity_list: z73.array(TrunkActivityListSchema).optional(),
4946
+ queue_avg_wait_talk_time_list: z73.array(QueueAvgWaitTalkTimeListSchema).optional(),
4943
4947
  queue_satisfaction: QueueSatisfactionSchema.optional(),
4944
- queue_performance_list: z72.array(QueuePerformanceListSchema).optional(),
4945
- queue_agent_miss_calls_list: z72.array(QueueAgentMissCallsListSchema).optional(),
4946
- queue_agent_in_out_calls_list: z72.array(QueueAgentInOutCallsListSchema).optional(),
4947
- callback_result: z72.string(),
4948
- page: z72.number().optional(),
4949
- pageSize: z72.number().optional()
4948
+ queue_performance_list: z73.array(QueuePerformanceListSchema).optional(),
4949
+ queue_agent_miss_calls_list: z73.array(QueueAgentMissCallsListSchema).optional(),
4950
+ queue_agent_in_out_calls_list: z73.array(QueueAgentInOutCallsListSchema).optional(),
4951
+ callback_result: z73.string(),
4952
+ page: z73.number().optional(),
4953
+ pageSize: z73.number().optional()
4950
4954
  });
4951
4955
 
4952
4956
  // src/telephony-cdr/index.ts
@@ -4959,10 +4963,10 @@ var telephonyCdrContract = initContract28().router(
4959
4963
  query: GetAllTelephonyCdrSchema,
4960
4964
  responses: {
4961
4965
  200: DefaultSuccessResponseSchema.extend({
4962
- total: z73.number(),
4963
- page: z73.number(),
4964
- pageSize: z73.number(),
4965
- telephonyCdrs: z73.array(TelephonyCdrSchema)
4966
+ total: z74.number(),
4967
+ page: z74.number(),
4968
+ pageSize: z74.number(),
4969
+ telephonyCdrs: z74.array(TelephonyCdrSchema)
4966
4970
  }),
4967
4971
  401: DefaultUnauthorizedSchema
4968
4972
  },
@@ -4975,10 +4979,10 @@ var telephonyCdrContract = initContract28().router(
4975
4979
  query: GetAllTelephonyCdrSchema,
4976
4980
  responses: {
4977
4981
  200: DefaultSuccessResponseSchema.extend({
4978
- total: z73.number(),
4979
- page: z73.number(),
4980
- pageSize: z73.number(),
4981
- telephonyCdrs: z73.array(TelephonyCdrSchema)
4982
+ total: z74.number(),
4983
+ page: z74.number(),
4984
+ pageSize: z74.number(),
4985
+ telephonyCdrs: z74.array(TelephonyCdrSchema)
4982
4986
  }),
4983
4987
  401: DefaultUnauthorizedSchema
4984
4988
  },
@@ -4991,10 +4995,10 @@ var telephonyCdrContract = initContract28().router(
4991
4995
  query: GetRecentTelephonyCdrSchema,
4992
4996
  responses: {
4993
4997
  200: DefaultSuccessResponseSchema.extend({
4994
- total: z73.number(),
4995
- page: z73.number(),
4996
- pageSize: z73.number(),
4997
- telephonyCdrs: z73.array(TelephonyCdrSchema)
4998
+ total: z74.number(),
4999
+ page: z74.number(),
5000
+ pageSize: z74.number(),
5001
+ telephonyCdrs: z74.array(TelephonyCdrSchema)
4998
5002
  }),
4999
5003
  401: DefaultUnauthorizedSchema
5000
5004
  },
@@ -5086,35 +5090,35 @@ var telephonyCdrContract = initContract28().router(
5086
5090
 
5087
5091
  // src/telephony-extension/index.ts
5088
5092
  import { initContract as initContract29 } from "@ts-rest/core";
5089
- import z75 from "zod";
5093
+ import z76 from "zod";
5090
5094
 
5091
5095
  // src/telephony-extension/schema.ts
5092
- import z74 from "zod";
5093
- var TelephonyExtensionSchema3 = z74.object({
5094
- errcode: z74.coerce.number(),
5095
- errmsg: z74.string(),
5096
- total_number: z74.coerce.number(),
5097
- data: z74.array(
5098
- z74.object({
5099
- id: z74.coerce.number(),
5100
- online_status: z74.object({
5101
- fx_phone: z74.object({ status: z74.coerce.number() }),
5102
- sip_phone: z74.object({
5103
- status: z74.coerce.number(),
5104
- ext_dev_type: z74.string().optional()
5105
- }),
5106
- linkus_desktop: z74.object({ status: z74.coerce.number() }),
5107
- linkus_mobile: z74.object({ status: z74.coerce.number() }),
5108
- linkus_web: z74.object({
5109
- status: z74.coerce.number(),
5110
- ext_dev_type: z74.string().optional()
5096
+ import z75 from "zod";
5097
+ var TelephonyExtensionSchema3 = z75.object({
5098
+ errcode: z75.coerce.number(),
5099
+ errmsg: z75.string(),
5100
+ total_number: z75.coerce.number(),
5101
+ data: z75.array(
5102
+ z75.object({
5103
+ id: z75.coerce.number(),
5104
+ online_status: z75.object({
5105
+ fx_phone: z75.object({ status: z75.coerce.number() }),
5106
+ sip_phone: z75.object({
5107
+ status: z75.coerce.number(),
5108
+ ext_dev_type: z75.string().optional()
5109
+ }),
5110
+ linkus_desktop: z75.object({ status: z75.coerce.number() }),
5111
+ linkus_mobile: z75.object({ status: z75.coerce.number() }),
5112
+ linkus_web: z75.object({
5113
+ status: z75.coerce.number(),
5114
+ ext_dev_type: z75.string().optional()
5111
5115
  })
5112
5116
  }).optional(),
5113
- presence_status: z74.string().optional(),
5114
- number: z74.string().optional(),
5115
- caller_id_name: z74.string().optional(),
5116
- role_name: z74.string().optional(),
5117
- email_addr: z74.string().optional()
5117
+ presence_status: z75.string().optional(),
5118
+ number: z75.string().optional(),
5119
+ caller_id_name: z75.string().optional(),
5120
+ role_name: z75.string().optional(),
5121
+ email_addr: z75.string().optional()
5118
5122
  })
5119
5123
  )
5120
5124
  });
@@ -5129,8 +5133,8 @@ var telephonyExtensionContract = initContract29().router(
5129
5133
  query: null,
5130
5134
  responses: {
5131
5135
  200: TelephonyExtensionSchema3,
5132
- 400: z75.object({
5133
- message: z75.string()
5136
+ 400: z76.object({
5137
+ message: z76.string()
5134
5138
  }),
5135
5139
  401: DefaultUnauthorizedSchema,
5136
5140
  500: DefaultErrorResponseSchema
@@ -5143,10 +5147,10 @@ var telephonyExtensionContract = initContract29().router(
5143
5147
 
5144
5148
  // src/ticket/index.ts
5145
5149
  import { initContract as initContract30 } from "@ts-rest/core";
5146
- import z77 from "zod";
5150
+ import z78 from "zod";
5147
5151
 
5148
5152
  // src/ticket/validation.ts
5149
- import z76 from "zod";
5153
+ import z77 from "zod";
5150
5154
  var addErrorMessage2 = (field) => {
5151
5155
  return field.refine(
5152
5156
  ({ isRequired, value }) => {
@@ -5164,106 +5168,106 @@ var addErrorMessage2 = (field) => {
5164
5168
  }
5165
5169
  );
5166
5170
  };
5167
- var BaseSchema3 = z76.object({
5168
- isRequired: z76.boolean(),
5169
- attributeId: z76.string()
5171
+ var BaseSchema3 = z77.object({
5172
+ isRequired: z77.boolean(),
5173
+ attributeId: z77.string()
5170
5174
  });
5171
5175
  var SingleValue2 = addErrorMessage2(
5172
5176
  BaseSchema3.extend({
5173
- value: z76.string()
5177
+ value: z77.string()
5174
5178
  })
5175
5179
  );
5176
- var CreateTicketValidationSchema = z76.object({
5180
+ var CreateTicketValidationSchema = z77.object({
5177
5181
  title: SingleValue2,
5178
5182
  description: SingleValue2,
5179
5183
  status: SingleValue2,
5180
5184
  type: SingleValue2,
5181
5185
  priority: SingleValue2,
5182
5186
  contact: SingleValue2,
5183
- assignee: z76.object({
5184
- isRequired: z76.boolean(),
5185
- attributeId: z76.string(),
5186
- value: z76.string()
5187
+ assignee: z77.object({
5188
+ isRequired: z77.boolean(),
5189
+ attributeId: z77.string(),
5190
+ value: z77.string()
5187
5191
  }),
5188
5192
  channel: SingleValue2,
5189
- tags: addErrorMessage2(BaseSchema3.extend({ value: z76.array(z76.string()) })),
5190
- categories: BaseSchema3.extend({ value: z76.array(z76.string()) }),
5191
- customFields: z76.array(
5193
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z77.array(z77.string()) })),
5194
+ categories: BaseSchema3.extend({ value: z77.array(z77.string()) }),
5195
+ customFields: z77.array(
5192
5196
  addErrorMessage2(
5193
5197
  BaseSchema3.extend({
5194
- value: z76.union([z76.string(), z76.array(z76.string())]),
5195
- type: z76.string(),
5196
- isDefaultAttribute: z76.boolean()
5198
+ value: z77.union([z77.string(), z77.array(z77.string())]),
5199
+ type: z77.string(),
5200
+ isDefaultAttribute: z77.boolean()
5197
5201
  })
5198
5202
  )
5199
5203
  ),
5200
- reasonToAssign: z76.object({ value: z76.string() }).optional()
5204
+ reasonToAssign: z77.object({ value: z77.string() }).optional()
5201
5205
  });
5202
5206
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5203
- var TicketAttachmentRecordSchema = z76.object({
5204
- bucketName: z76.string(),
5205
- fileKey: z76.string(),
5206
- fileName: z76.string(),
5207
- fileSize: z76.coerce.number(),
5208
- url: z76.string()
5209
- });
5210
- var CreateTicketAttachmentRecordsSchema = z76.object({
5211
- ticketId: z76.string(),
5212
- attributeId: z76.string(),
5213
- ticketAttachmentRecords: z76.array(TicketAttachmentRecordSchema)
5214
- });
5215
- var TicketParamsSchema = z76.object({
5216
- page: z76.coerce.number().default(1),
5217
- pageSize: z76.coerce.number().default(10)
5218
- });
5219
- var CustomFieldQuery = z76.object({
5220
- attributeId: z76.string(),
5221
- type: z76.string(),
5222
- value: z76.union([z76.string(), z76.array(z76.string())])
5223
- });
5224
- var GetAllTicketQuerySchema = z76.object({
5225
- page: z76.string().transform((value) => Number(value)),
5226
- pageSize: z76.string().transform((value) => Number(value)),
5227
- selectedDate: z76.string(),
5228
- keyword: z76.string(),
5229
- title: z76.string(),
5230
- description: z76.string(),
5231
- status: z76.array(z76.string()),
5232
- priority: z76.array(z76.string()),
5233
- channel: z76.array(z76.string()),
5234
- type: z76.array(z76.string()),
5235
- ticketType: z76.array(z76.string()),
5236
- contact: z76.array(z76.string()),
5237
- tags: z76.array(z76.string().uuid()),
5238
- categories: z76.array(z76.string().uuid()),
5239
- assignee: z76.array(z76.string().uuid()),
5240
- customFields: z76.array(
5241
- z76.object({
5242
- attributeId: z76.string().uuid(),
5243
- type: z76.string(),
5244
- value: z76.union([z76.string(), z76.array(z76.string())])
5207
+ var TicketAttachmentRecordSchema = z77.object({
5208
+ bucketName: z77.string(),
5209
+ fileKey: z77.string(),
5210
+ fileName: z77.string(),
5211
+ fileSize: z77.coerce.number(),
5212
+ url: z77.string()
5213
+ });
5214
+ var CreateTicketAttachmentRecordsSchema = z77.object({
5215
+ ticketId: z77.string(),
5216
+ attributeId: z77.string(),
5217
+ ticketAttachmentRecords: z77.array(TicketAttachmentRecordSchema)
5218
+ });
5219
+ var TicketParamsSchema = z77.object({
5220
+ page: z77.coerce.number().default(1),
5221
+ pageSize: z77.coerce.number().default(10)
5222
+ });
5223
+ var CustomFieldQuery = z77.object({
5224
+ attributeId: z77.string(),
5225
+ type: z77.string(),
5226
+ value: z77.union([z77.string(), z77.array(z77.string())])
5227
+ });
5228
+ var GetAllTicketQuerySchema = z77.object({
5229
+ page: z77.string().transform((value) => Number(value)),
5230
+ pageSize: z77.string().transform((value) => Number(value)),
5231
+ selectedDate: z77.string(),
5232
+ keyword: z77.string(),
5233
+ title: z77.string(),
5234
+ description: z77.string(),
5235
+ status: z77.array(z77.string()),
5236
+ priority: z77.array(z77.string()),
5237
+ channel: z77.array(z77.string()),
5238
+ type: z77.array(z77.string()),
5239
+ ticketType: z77.array(z77.string()),
5240
+ contact: z77.array(z77.string()),
5241
+ tags: z77.array(z77.string().uuid()),
5242
+ categories: z77.array(z77.string().uuid()),
5243
+ assignee: z77.array(z77.string().uuid()),
5244
+ customFields: z77.array(
5245
+ z77.object({
5246
+ attributeId: z77.string().uuid(),
5247
+ type: z77.string(),
5248
+ value: z77.union([z77.string(), z77.array(z77.string())])
5245
5249
  })
5246
5250
  )
5247
5251
  }).partial();
5248
- var ExportAllTicketQuerySchema = z76.object({
5249
- agent: z76.array(z76.string()),
5250
- selectedDate: z76.string(),
5251
- keyword: z76.string(),
5252
- title: z76.string(),
5253
- description: z76.string(),
5254
- status: z76.array(z76.string()),
5255
- priority: z76.array(z76.string()),
5256
- channel: z76.array(z76.string()),
5257
- type: z76.array(z76.string()),
5258
- ticketType: z76.array(z76.string()),
5259
- contact: z76.array(z76.string()),
5260
- tags: z76.array(z76.string()),
5261
- categories: z76.array(z76.string()),
5262
- customFields: z76.array(
5263
- z76.object({
5264
- attributeId: z76.string().uuid(),
5265
- type: z76.string(),
5266
- value: z76.union([z76.string(), z76.array(z76.string())])
5252
+ var ExportAllTicketQuerySchema = z77.object({
5253
+ agent: z77.array(z77.string()),
5254
+ selectedDate: z77.string(),
5255
+ keyword: z77.string(),
5256
+ title: z77.string(),
5257
+ description: z77.string(),
5258
+ status: z77.array(z77.string()),
5259
+ priority: z77.array(z77.string()),
5260
+ channel: z77.array(z77.string()),
5261
+ type: z77.array(z77.string()),
5262
+ ticketType: z77.array(z77.string()),
5263
+ contact: z77.array(z77.string()),
5264
+ tags: z77.array(z77.string()),
5265
+ categories: z77.array(z77.string()),
5266
+ customFields: z77.array(
5267
+ z77.object({
5268
+ attributeId: z77.string().uuid(),
5269
+ type: z77.string(),
5270
+ value: z77.union([z77.string(), z77.array(z77.string())])
5267
5271
  })
5268
5272
  )
5269
5273
  }).partial();
@@ -5279,14 +5283,14 @@ var ticketContract = initContract30().router(
5279
5283
  201: DefaultSuccessResponseSchema.extend({
5280
5284
  data: TicketSchema
5281
5285
  }),
5282
- 400: z77.object({
5283
- message: z77.string()
5286
+ 400: z78.object({
5287
+ message: z78.string()
5284
5288
  }),
5285
- 409: z77.object({
5286
- message: z77.string()
5289
+ 409: z78.object({
5290
+ message: z78.string()
5287
5291
  }),
5288
- 500: z77.object({
5289
- message: z77.string()
5292
+ 500: z78.object({
5293
+ message: z78.string()
5290
5294
  }),
5291
5295
  401: DefaultUnauthorizedSchema,
5292
5296
  404: DefaultNotFoundSchema,
@@ -5307,8 +5311,8 @@ var ticketContract = initContract30().router(
5307
5311
  TicketSchema
5308
5312
  )
5309
5313
  }),
5310
- 400: z77.object({
5311
- message: z77.string()
5314
+ 400: z78.object({
5315
+ message: z78.string()
5312
5316
  }),
5313
5317
  401: DefaultUnauthorizedSchema,
5314
5318
  500: DefaultErrorResponseSchema
@@ -5318,14 +5322,14 @@ var ticketContract = initContract30().router(
5318
5322
  getTicketById: {
5319
5323
  method: "GET",
5320
5324
  path: "/:id",
5321
- pathParams: z77.object({ id: z77.string() }),
5325
+ pathParams: z78.object({ id: z78.string() }),
5322
5326
  headers: DefaultHeaderSchema,
5323
5327
  responses: {
5324
5328
  200: DefaultSuccessResponseSchema.extend({
5325
5329
  data: TicketSchema
5326
5330
  }),
5327
- 400: z77.object({
5328
- message: z77.string()
5331
+ 400: z78.object({
5332
+ message: z78.string()
5329
5333
  }),
5330
5334
  401: DefaultUnauthorizedSchema,
5331
5335
  500: DefaultErrorResponseSchema
@@ -5335,15 +5339,15 @@ var ticketContract = initContract30().router(
5335
5339
  getTicketByContactId: {
5336
5340
  method: "GET",
5337
5341
  path: "/contact/:id",
5338
- pathParams: z77.object({ id: z77.string() }),
5342
+ pathParams: z78.object({ id: z78.string() }),
5339
5343
  query: TicketParamsSchema,
5340
5344
  headers: DefaultHeaderSchema,
5341
5345
  responses: {
5342
5346
  200: DefaultSuccessResponseSchema.extend({
5343
5347
  data: WithPagination(TicketSchema)
5344
5348
  }),
5345
- 400: z77.object({
5346
- message: z77.string()
5349
+ 400: z78.object({
5350
+ message: z78.string()
5347
5351
  }),
5348
5352
  401: DefaultUnauthorizedSchema,
5349
5353
  500: DefaultErrorResponseSchema
@@ -5353,21 +5357,21 @@ var ticketContract = initContract30().router(
5353
5357
  updateTicket: {
5354
5358
  method: "PATCH",
5355
5359
  path: "/:id",
5356
- pathParams: z77.object({ id: z77.string() }),
5360
+ pathParams: z78.object({ id: z78.string() }),
5357
5361
  body: UpdateTicketValidationSchema,
5358
5362
  headers: DefaultHeaderSchema,
5359
5363
  responses: {
5360
5364
  201: DefaultSuccessResponseSchema.extend({
5361
5365
  data: TicketSchema
5362
5366
  }),
5363
- 400: z77.object({
5364
- message: z77.string()
5367
+ 400: z78.object({
5368
+ message: z78.string()
5365
5369
  }),
5366
- 409: z77.object({
5367
- message: z77.string()
5370
+ 409: z78.object({
5371
+ message: z78.string()
5368
5372
  }),
5369
- 500: z77.object({
5370
- message: z77.string()
5373
+ 500: z78.object({
5374
+ message: z78.string()
5371
5375
  }),
5372
5376
  401: DefaultUnauthorizedSchema,
5373
5377
  404: DefaultNotFoundSchema,
@@ -5378,11 +5382,11 @@ var ticketContract = initContract30().router(
5378
5382
  deleteTicket: {
5379
5383
  method: "DELETE",
5380
5384
  path: "/:id",
5381
- pathParams: z77.object({ id: z77.string() }),
5385
+ pathParams: z78.object({ id: z78.string() }),
5382
5386
  headers: DefaultHeaderSchema,
5383
5387
  body: null,
5384
5388
  responses: {
5385
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5389
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5386
5390
  500: DefaultErrorResponseSchema
5387
5391
  },
5388
5392
  summary: "Delete a extension."
@@ -5390,19 +5394,19 @@ var ticketContract = initContract30().router(
5390
5394
  updateDescription: {
5391
5395
  method: "PATCH",
5392
5396
  path: "/description/update/:id",
5393
- pathParams: z77.object({ id: z77.string() }),
5394
- body: z77.object({ description: z77.string() }),
5397
+ pathParams: z78.object({ id: z78.string() }),
5398
+ body: z78.object({ description: z78.string() }),
5395
5399
  headers: DefaultHeaderSchema,
5396
5400
  responses: {
5397
- 201: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5398
- 400: z77.object({
5399
- message: z77.string()
5401
+ 201: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5402
+ 400: z78.object({
5403
+ message: z78.string()
5400
5404
  }),
5401
- 409: z77.object({
5402
- message: z77.string()
5405
+ 409: z78.object({
5406
+ message: z78.string()
5403
5407
  }),
5404
- 500: z77.object({
5405
- message: z77.string()
5408
+ 500: z78.object({
5409
+ message: z78.string()
5406
5410
  }),
5407
5411
  401: DefaultUnauthorizedSchema,
5408
5412
  404: DefaultNotFoundSchema,
@@ -5413,19 +5417,19 @@ var ticketContract = initContract30().router(
5413
5417
  updateTitle: {
5414
5418
  method: "PATCH",
5415
5419
  path: "/title/update/:id",
5416
- pathParams: z77.object({ id: z77.string() }),
5417
- body: z77.object({ title: z77.string() }),
5420
+ pathParams: z78.object({ id: z78.string() }),
5421
+ body: z78.object({ title: z78.string() }),
5418
5422
  headers: DefaultHeaderSchema,
5419
5423
  responses: {
5420
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5421
- 400: z77.object({
5422
- message: z77.string()
5424
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5425
+ 400: z78.object({
5426
+ message: z78.string()
5423
5427
  }),
5424
- 409: z77.object({
5425
- message: z77.string()
5428
+ 409: z78.object({
5429
+ message: z78.string()
5426
5430
  }),
5427
- 500: z77.object({
5428
- message: z77.string()
5431
+ 500: z78.object({
5432
+ message: z78.string()
5429
5433
  }),
5430
5434
  401: DefaultUnauthorizedSchema,
5431
5435
  404: DefaultNotFoundSchema,
@@ -5436,19 +5440,19 @@ var ticketContract = initContract30().router(
5436
5440
  updateType: {
5437
5441
  method: "PATCH",
5438
5442
  path: "/type/update/:id",
5439
- pathParams: z77.object({ id: z77.string() }),
5440
- body: z77.object({ type: z77.string() }),
5443
+ pathParams: z78.object({ id: z78.string() }),
5444
+ body: z78.object({ type: z78.string() }),
5441
5445
  headers: DefaultHeaderSchema,
5442
5446
  responses: {
5443
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5444
- 400: z77.object({
5445
- message: z77.string()
5447
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5448
+ 400: z78.object({
5449
+ message: z78.string()
5446
5450
  }),
5447
- 409: z77.object({
5448
- message: z77.string()
5451
+ 409: z78.object({
5452
+ message: z78.string()
5449
5453
  }),
5450
- 500: z77.object({
5451
- message: z77.string()
5454
+ 500: z78.object({
5455
+ message: z78.string()
5452
5456
  }),
5453
5457
  401: DefaultUnauthorizedSchema,
5454
5458
  404: DefaultNotFoundSchema,
@@ -5459,19 +5463,19 @@ var ticketContract = initContract30().router(
5459
5463
  updateStatus: {
5460
5464
  method: "PATCH",
5461
5465
  path: "/status/update/:id",
5462
- pathParams: z77.object({ id: z77.string() }),
5463
- body: z77.object({ status: z77.string() }),
5466
+ pathParams: z78.object({ id: z78.string() }),
5467
+ body: z78.object({ status: z78.string() }),
5464
5468
  headers: DefaultHeaderSchema,
5465
5469
  responses: {
5466
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5467
- 400: z77.object({
5468
- message: z77.string()
5470
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5471
+ 400: z78.object({
5472
+ message: z78.string()
5469
5473
  }),
5470
- 409: z77.object({
5471
- message: z77.string()
5474
+ 409: z78.object({
5475
+ message: z78.string()
5472
5476
  }),
5473
- 500: z77.object({
5474
- message: z77.string()
5477
+ 500: z78.object({
5478
+ message: z78.string()
5475
5479
  }),
5476
5480
  401: DefaultUnauthorizedSchema,
5477
5481
  404: DefaultNotFoundSchema,
@@ -5482,19 +5486,19 @@ var ticketContract = initContract30().router(
5482
5486
  updatePriority: {
5483
5487
  method: "PATCH",
5484
5488
  path: "/priority/update/:id",
5485
- pathParams: z77.object({ id: z77.string() }),
5486
- body: z77.object({ priority: z77.string() }),
5489
+ pathParams: z78.object({ id: z78.string() }),
5490
+ body: z78.object({ priority: z78.string() }),
5487
5491
  headers: DefaultHeaderSchema,
5488
5492
  responses: {
5489
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5490
- 400: z77.object({
5491
- message: z77.string()
5493
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5494
+ 400: z78.object({
5495
+ message: z78.string()
5492
5496
  }),
5493
- 409: z77.object({
5494
- message: z77.string()
5497
+ 409: z78.object({
5498
+ message: z78.string()
5495
5499
  }),
5496
- 500: z77.object({
5497
- message: z77.string()
5500
+ 500: z78.object({
5501
+ message: z78.string()
5498
5502
  }),
5499
5503
  401: DefaultUnauthorizedSchema,
5500
5504
  404: DefaultNotFoundSchema,
@@ -5505,19 +5509,19 @@ var ticketContract = initContract30().router(
5505
5509
  updateChannel: {
5506
5510
  method: "PATCH",
5507
5511
  path: "/channel/update/:id",
5508
- pathParams: z77.object({ id: z77.string() }),
5509
- body: z77.object({ channel: z77.string() }),
5512
+ pathParams: z78.object({ id: z78.string() }),
5513
+ body: z78.object({ channel: z78.string() }),
5510
5514
  headers: DefaultHeaderSchema,
5511
5515
  responses: {
5512
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5513
- 400: z77.object({
5514
- message: z77.string()
5516
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5517
+ 400: z78.object({
5518
+ message: z78.string()
5515
5519
  }),
5516
- 409: z77.object({
5517
- message: z77.string()
5520
+ 409: z78.object({
5521
+ message: z78.string()
5518
5522
  }),
5519
- 500: z77.object({
5520
- message: z77.string()
5523
+ 500: z78.object({
5524
+ message: z78.string()
5521
5525
  }),
5522
5526
  401: DefaultUnauthorizedSchema,
5523
5527
  404: DefaultNotFoundSchema,
@@ -5528,19 +5532,19 @@ var ticketContract = initContract30().router(
5528
5532
  updateTags: {
5529
5533
  method: "PATCH",
5530
5534
  path: "/tags/update/:id",
5531
- pathParams: z77.object({ id: z77.string() }),
5532
- body: z77.object({ tags: z77.array(z77.string()) }),
5535
+ pathParams: z78.object({ id: z78.string() }),
5536
+ body: z78.object({ tags: z78.array(z78.string()) }),
5533
5537
  headers: DefaultHeaderSchema,
5534
5538
  responses: {
5535
- 200: DefaultSuccessResponseSchema.extend({ message: z77.string() }),
5536
- 400: z77.object({
5537
- message: z77.string()
5539
+ 200: DefaultSuccessResponseSchema.extend({ message: z78.string() }),
5540
+ 400: z78.object({
5541
+ message: z78.string()
5538
5542
  }),
5539
- 409: z77.object({
5540
- message: z77.string()
5543
+ 409: z78.object({
5544
+ message: z78.string()
5541
5545
  }),
5542
- 500: z77.object({
5543
- message: z77.string()
5546
+ 500: z78.object({
5547
+ message: z78.string()
5544
5548
  }),
5545
5549
  401: DefaultUnauthorizedSchema,
5546
5550
  404: DefaultNotFoundSchema,
@@ -5551,25 +5555,25 @@ var ticketContract = initContract30().router(
5551
5555
  changeAssignee: {
5552
5556
  method: "PATCH",
5553
5557
  path: "/assignee/update/:id",
5554
- pathParams: z77.object({ id: z77.string() }),
5555
- body: z77.object({
5556
- ticketId: z77.string(),
5557
- assigneeId: z77.string(),
5558
- reason: z77.string().optional()
5558
+ pathParams: z78.object({ id: z78.string() }),
5559
+ body: z78.object({
5560
+ ticketId: z78.string(),
5561
+ assigneeId: z78.string(),
5562
+ reason: z78.string().optional()
5559
5563
  }),
5560
5564
  headers: DefaultHeaderSchema,
5561
5565
  responses: {
5562
5566
  200: DefaultSuccessResponseSchema.extend({
5563
5567
  data: TicketSchema
5564
5568
  }),
5565
- 400: z77.object({
5566
- message: z77.string()
5569
+ 400: z78.object({
5570
+ message: z78.string()
5567
5571
  }),
5568
- 409: z77.object({
5569
- message: z77.string()
5572
+ 409: z78.object({
5573
+ message: z78.string()
5570
5574
  }),
5571
- 500: z77.object({
5572
- message: z77.string()
5575
+ 500: z78.object({
5576
+ message: z78.string()
5573
5577
  }),
5574
5578
  401: DefaultUnauthorizedSchema,
5575
5579
  404: DefaultNotFoundSchema,
@@ -5580,14 +5584,14 @@ var ticketContract = initContract30().router(
5580
5584
  getTicketCountByContact: {
5581
5585
  method: "GET",
5582
5586
  path: "/ticket_count/contact/:id",
5583
- pathParams: z77.object({ id: z77.string() }),
5587
+ pathParams: z78.object({ id: z78.string() }),
5584
5588
  headers: DefaultHeaderSchema,
5585
5589
  responses: {
5586
5590
  200: DefaultSuccessResponseSchema.extend({
5587
5591
  data: TicketCountByContactSchema
5588
5592
  }),
5589
- 400: z77.object({
5590
- message: z77.string()
5593
+ 400: z78.object({
5594
+ message: z78.string()
5591
5595
  }),
5592
5596
  401: DefaultUnauthorizedSchema,
5593
5597
  500: DefaultErrorResponseSchema
@@ -5603,14 +5607,14 @@ var ticketContract = initContract30().router(
5603
5607
  201: DefaultSuccessResponseSchema.extend({
5604
5608
  data: TicketCustomFieldSchema
5605
5609
  }),
5606
- 400: z77.object({
5607
- message: z77.string()
5610
+ 400: z78.object({
5611
+ message: z78.string()
5608
5612
  }),
5609
- 409: z77.object({
5610
- message: z77.string()
5613
+ 409: z78.object({
5614
+ message: z78.string()
5611
5615
  }),
5612
- 500: z77.object({
5613
- message: z77.string()
5616
+ 500: z78.object({
5617
+ message: z78.string()
5614
5618
  }),
5615
5619
  401: DefaultUnauthorizedSchema,
5616
5620
  404: DefaultNotFoundSchema,
@@ -5635,21 +5639,21 @@ var ticketContract = initContract30().router(
5635
5639
 
5636
5640
  // src/user/index.ts
5637
5641
  import { initContract as initContract31 } from "@ts-rest/core";
5638
- import z79 from "zod";
5642
+ import z80 from "zod";
5639
5643
 
5640
5644
  // src/user/validation.ts
5641
- import { z as z78 } from "zod";
5642
- var CreateUserSchema = z78.object({
5643
- name: z78.string(),
5644
- email: z78.string().email(),
5645
- address: z78.string().nullable(),
5646
- phone: z78.string().nullable(),
5647
- password: z78.string(),
5648
- notificationCount: z78.number().nullable().optional(),
5649
- roles: z78.array(z78.string())
5645
+ import { z as z79 } from "zod";
5646
+ var CreateUserSchema = z79.object({
5647
+ name: z79.string(),
5648
+ email: z79.string().email(),
5649
+ address: z79.string().nullable(),
5650
+ phone: z79.string().nullable(),
5651
+ password: z79.string(),
5652
+ notificationCount: z79.number().nullable().optional(),
5653
+ roles: z79.array(z79.string())
5650
5654
  });
5651
5655
  var UpdateUserSchema = CreateUserSchema.extend({
5652
- newPassword: z78.string()
5656
+ newPassword: z79.string()
5653
5657
  });
5654
5658
 
5655
5659
  // src/user/index.ts
@@ -5664,8 +5668,8 @@ var userContract = initContract31().router(
5664
5668
  201: DefaultSuccessResponseSchema.extend({
5665
5669
  user: UserSchema
5666
5670
  }),
5667
- 400: z79.object({
5668
- message: z79.string()
5671
+ 400: z80.object({
5672
+ message: z80.string()
5669
5673
  }),
5670
5674
  401: DefaultUnauthorizedSchema
5671
5675
  },
@@ -5675,16 +5679,16 @@ var userContract = initContract31().router(
5675
5679
  method: "GET",
5676
5680
  path: "",
5677
5681
  headers: DefaultHeaderSchema,
5678
- query: z79.object({
5679
- page: z79.coerce.number().optional(),
5680
- pageSize: z79.coerce.number().optional(),
5682
+ query: z80.object({
5683
+ page: z80.coerce.number().optional(),
5684
+ pageSize: z80.coerce.number().optional(),
5681
5685
  // Don't add default 10. In some places, we need to fetch all users.
5682
- keyword: z79.string().optional()
5686
+ keyword: z80.string().optional()
5683
5687
  }).optional(),
5684
5688
  responses: {
5685
5689
  200: WithPagination(UserSchema),
5686
- 400: z79.object({
5687
- message: z79.string()
5690
+ 400: z80.object({
5691
+ message: z80.string()
5688
5692
  }),
5689
5693
  401: DefaultUnauthorizedSchema,
5690
5694
  500: DefaultErrorResponseSchema
@@ -5694,12 +5698,12 @@ var userContract = initContract31().router(
5694
5698
  getUserById: {
5695
5699
  method: "GET",
5696
5700
  path: "/:id",
5697
- pathParams: z79.object({ id: z79.string() }),
5701
+ pathParams: z80.object({ id: z80.string() }),
5698
5702
  headers: DefaultHeaderSchema,
5699
5703
  responses: {
5700
5704
  200: UserSchema,
5701
- 400: z79.object({
5702
- message: z79.string()
5705
+ 400: z80.object({
5706
+ message: z80.string()
5703
5707
  }),
5704
5708
  401: DefaultUnauthorizedSchema
5705
5709
  },
@@ -5708,15 +5712,15 @@ var userContract = initContract31().router(
5708
5712
  updateUser: {
5709
5713
  method: "PATCH",
5710
5714
  path: "/:id",
5711
- pathParams: z79.object({ id: z79.string() }),
5715
+ pathParams: z80.object({ id: z80.string() }),
5712
5716
  headers: DefaultHeaderSchema,
5713
5717
  body: UpdateUserSchema,
5714
5718
  responses: {
5715
5719
  201: DefaultSuccessResponseSchema.extend({
5716
5720
  role: UserSchema
5717
5721
  }),
5718
- 400: z79.object({
5719
- message: z79.string()
5722
+ 400: z80.object({
5723
+ message: z80.string()
5720
5724
  }),
5721
5725
  401: DefaultUnauthorizedSchema
5722
5726
  },
@@ -5725,11 +5729,11 @@ var userContract = initContract31().router(
5725
5729
  deleteUser: {
5726
5730
  method: "DELETE",
5727
5731
  path: "/:id",
5728
- pathParams: z79.object({ id: z79.string() }),
5732
+ pathParams: z80.object({ id: z80.string() }),
5729
5733
  headers: DefaultHeaderSchema,
5730
5734
  body: null,
5731
5735
  responses: {
5732
- 200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
5736
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5733
5737
  500: DefaultErrorResponseSchema
5734
5738
  },
5735
5739
  summary: "Delete a user."
@@ -5740,26 +5744,26 @@ var userContract = initContract31().router(
5740
5744
 
5741
5745
  // src/user-presence-status-log/index.ts
5742
5746
  import { initContract as initContract32 } from "@ts-rest/core";
5743
- import z82 from "zod";
5747
+ import z83 from "zod";
5744
5748
 
5745
5749
  // src/user-presence-status-log/schema.ts
5746
- import z80 from "zod";
5750
+ import z81 from "zod";
5747
5751
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
5748
5752
  user: UserSchema,
5749
5753
  previousPresenceStatus: PresenceStatusSchema,
5750
5754
  newPresenceStatus: PresenceStatusSchema,
5751
- reason: z80.string()
5755
+ reason: z81.string()
5752
5756
  });
5753
5757
 
5754
5758
  // src/user-presence-status-log/validation.ts
5755
- import z81 from "zod";
5756
- var UserPresenceStatusLogParamsSchema = z81.object({
5757
- page: z81.coerce.number().default(1),
5758
- pageSize: z81.coerce.number().default(10),
5759
- selectedDate: z81.string().optional()
5759
+ import z82 from "zod";
5760
+ var UserPresenceStatusLogParamsSchema = z82.object({
5761
+ page: z82.coerce.number().default(1),
5762
+ pageSize: z82.coerce.number().default(10),
5763
+ selectedDate: z82.string().optional()
5760
5764
  }).optional();
5761
- var UserPresenceStatusLogExportParamsSchema = z81.object({
5762
- selectedDate: z81.string().optional()
5765
+ var UserPresenceStatusLogExportParamsSchema = z82.object({
5766
+ selectedDate: z82.string().optional()
5763
5767
  });
5764
5768
 
5765
5769
  // src/user-presence-status-log/index.ts
@@ -5772,8 +5776,8 @@ var userPresenceStatusLogContract = initContract32().router(
5772
5776
  headers: DefaultHeaderSchema,
5773
5777
  responses: {
5774
5778
  200: WithPagination(UserPresenceStatusLogSchema),
5775
- 400: z82.object({
5776
- message: z82.string()
5779
+ 400: z83.object({
5780
+ message: z83.string()
5777
5781
  }),
5778
5782
  401: DefaultUnauthorizedSchema,
5779
5783
  500: DefaultErrorResponseSchema
@@ -5787,8 +5791,8 @@ var userPresenceStatusLogContract = initContract32().router(
5787
5791
  headers: DefaultHeaderSchema,
5788
5792
  responses: {
5789
5793
  200: null,
5790
- 400: z82.object({
5791
- message: z82.string()
5794
+ 400: z83.object({
5795
+ message: z83.string()
5792
5796
  }),
5793
5797
  401: DefaultUnauthorizedSchema,
5794
5798
  500: DefaultErrorResponseSchema
@@ -5800,44 +5804,44 @@ var userPresenceStatusLogContract = initContract32().router(
5800
5804
 
5801
5805
  // src/widget/index.ts
5802
5806
  import { initContract as initContract33 } from "@ts-rest/core";
5803
- import z85 from "zod";
5807
+ import z86 from "zod";
5804
5808
 
5805
5809
  // src/widget/schema.ts
5806
- import z83 from "zod";
5807
- var FieldsSchema = z83.object({ data: z83.array(z83.string()) });
5808
- var WidgetPositionSchema = z83.union([
5809
- z83.literal("menu"),
5810
- z83.literal("ticket_detail"),
5811
- z83.literal("contact_detail")
5810
+ import z84 from "zod";
5811
+ var FieldsSchema = z84.object({ data: z84.array(z84.string()) });
5812
+ var WidgetPositionSchema = z84.union([
5813
+ z84.literal("menu"),
5814
+ z84.literal("ticket_detail"),
5815
+ z84.literal("contact_detail")
5812
5816
  ]);
5813
5817
  var WidgetSchema = DefaultEntitySchema.extend({
5814
- name: z83.string(),
5815
- description: z83.string().nullable(),
5818
+ name: z84.string(),
5819
+ description: z84.string().nullable(),
5816
5820
  position: WidgetPositionSchema.nullable(),
5817
5821
  fields: FieldsSchema,
5818
- url: z83.string()
5822
+ url: z84.string()
5819
5823
  });
5820
5824
 
5821
5825
  // src/widget/validation.ts
5822
- import z84 from "zod";
5823
- var CreateWidgetSchema = z84.object({
5824
- name: z84.string(),
5825
- description: z84.string(),
5826
- url: z84.string(),
5826
+ import z85 from "zod";
5827
+ var CreateWidgetSchema = z85.object({
5828
+ name: z85.string(),
5829
+ description: z85.string(),
5830
+ url: z85.string(),
5827
5831
  position: WidgetPositionSchema,
5828
- fields: z84.object({
5832
+ fields: z85.object({
5829
5833
  data: (
5830
5834
  // Array of attribute system names
5831
- z84.array(z84.string())
5835
+ z85.array(z85.string())
5832
5836
  )
5833
5837
  }).optional()
5834
5838
  });
5835
5839
  var UpdateWidgetSchema = CreateWidgetSchema;
5836
- var GetWidgetUrlPathQuerySchema = z84.object({
5837
- widgetId: z84.string(),
5840
+ var GetWidgetUrlPathQuerySchema = z85.object({
5841
+ widgetId: z85.string(),
5838
5842
  // Position ID is ticket ID, contact ID, etc.
5839
5843
  // TODO: The name "Position ID" is confusing. Think of a better name.
5840
- positionId: z84.string()
5844
+ positionId: z85.string()
5841
5845
  });
5842
5846
 
5843
5847
  // src/widget/index.ts
@@ -5852,8 +5856,8 @@ var widgetContract = initContract33().router(
5852
5856
  201: DefaultSuccessResponseSchema.extend({
5853
5857
  widget: WidgetSchema
5854
5858
  }),
5855
- 400: z85.object({
5856
- message: z85.string()
5859
+ 400: z86.object({
5860
+ message: z86.string()
5857
5861
  }),
5858
5862
  401: DefaultUnauthorizedSchema,
5859
5863
  500: DefaultErrorResponseSchema
@@ -5863,17 +5867,17 @@ var widgetContract = initContract33().router(
5863
5867
  getWidgets: {
5864
5868
  method: "GET",
5865
5869
  path: "",
5866
- query: z85.object({
5867
- page: z85.coerce.number().default(1),
5868
- pageSize: z85.coerce.number().default(10),
5869
- keyword: z85.coerce.string().optional()
5870
+ query: z86.object({
5871
+ page: z86.coerce.number().default(1),
5872
+ pageSize: z86.coerce.number().default(10),
5873
+ keyword: z86.coerce.string().optional()
5870
5874
  }).optional(),
5871
5875
  headers: DefaultHeaderSchema,
5872
5876
  responses: {
5873
5877
  200: WithPagination(WidgetSchema),
5874
5878
  500: DefaultErrorResponseSchema,
5875
- 400: z85.object({
5876
- message: z85.string()
5879
+ 400: z86.object({
5880
+ message: z86.string()
5877
5881
  }),
5878
5882
  401: DefaultUnauthorizedSchema
5879
5883
  },
@@ -5884,9 +5888,9 @@ var widgetContract = initContract33().router(
5884
5888
  path: "/menu",
5885
5889
  headers: DefaultHeaderSchema,
5886
5890
  responses: {
5887
- 200: z85.array(WidgetSchema),
5888
- 400: z85.object({
5889
- message: z85.string()
5891
+ 200: z86.array(WidgetSchema),
5892
+ 400: z86.object({
5893
+ message: z86.string()
5890
5894
  }),
5891
5895
  401: DefaultUnauthorizedSchema,
5892
5896
  500: DefaultErrorResponseSchema
@@ -5898,9 +5902,9 @@ var widgetContract = initContract33().router(
5898
5902
  path: "/ticket_detail",
5899
5903
  headers: DefaultHeaderSchema,
5900
5904
  responses: {
5901
- 200: z85.array(WidgetSchema),
5902
- 400: z85.object({
5903
- message: z85.string()
5905
+ 200: z86.array(WidgetSchema),
5906
+ 400: z86.object({
5907
+ message: z86.string()
5904
5908
  }),
5905
5909
  401: DefaultUnauthorizedSchema,
5906
5910
  500: DefaultErrorResponseSchema
@@ -5912,9 +5916,9 @@ var widgetContract = initContract33().router(
5912
5916
  path: "/contact_detail",
5913
5917
  headers: DefaultHeaderSchema,
5914
5918
  responses: {
5915
- 200: z85.array(WidgetSchema),
5916
- 400: z85.object({
5917
- message: z85.string()
5919
+ 200: z86.array(WidgetSchema),
5920
+ 400: z86.object({
5921
+ message: z86.string()
5918
5922
  }),
5919
5923
  401: DefaultUnauthorizedSchema,
5920
5924
  500: DefaultErrorResponseSchema
@@ -5924,12 +5928,12 @@ var widgetContract = initContract33().router(
5924
5928
  getWidgetById: {
5925
5929
  method: "GET",
5926
5930
  path: "/:id",
5927
- pathParams: z85.object({ id: z85.string() }),
5931
+ pathParams: z86.object({ id: z86.string() }),
5928
5932
  headers: DefaultHeaderSchema,
5929
5933
  responses: {
5930
5934
  200: WidgetSchema,
5931
- 400: z85.object({
5932
- message: z85.string()
5935
+ 400: z86.object({
5936
+ message: z86.string()
5933
5937
  }),
5934
5938
  401: DefaultUnauthorizedSchema,
5935
5939
  500: DefaultErrorResponseSchema
@@ -5943,10 +5947,10 @@ var widgetContract = initContract33().router(
5943
5947
  headers: DefaultHeaderSchema,
5944
5948
  responses: {
5945
5949
  201: DefaultSuccessResponseSchema.extend({
5946
- url: z85.string()
5950
+ url: z86.string()
5947
5951
  }),
5948
- 400: z85.object({
5949
- message: z85.string()
5952
+ 400: z86.object({
5953
+ message: z86.string()
5950
5954
  }),
5951
5955
  401: DefaultUnauthorizedSchema
5952
5956
  },
@@ -5955,14 +5959,14 @@ var widgetContract = initContract33().router(
5955
5959
  updateWidget: {
5956
5960
  method: "PATCH",
5957
5961
  path: "/:id",
5958
- pathParams: z85.object({ id: z85.string() }),
5962
+ pathParams: z86.object({ id: z86.string() }),
5959
5963
  headers: DefaultHeaderSchema,
5960
5964
  responses: {
5961
5965
  201: DefaultSuccessResponseSchema.extend({
5962
5966
  widget: WidgetSchema
5963
5967
  }),
5964
- 400: z85.object({
5965
- message: z85.string()
5968
+ 400: z86.object({
5969
+ message: z86.string()
5966
5970
  }),
5967
5971
  401: DefaultUnauthorizedSchema
5968
5972
  },
@@ -5972,11 +5976,11 @@ var widgetContract = initContract33().router(
5972
5976
  deleteWidget: {
5973
5977
  method: "DELETE",
5974
5978
  path: "/:id",
5975
- pathParams: z85.object({ id: z85.string() }),
5979
+ pathParams: z86.object({ id: z86.string() }),
5976
5980
  headers: DefaultHeaderSchema,
5977
5981
  body: null,
5978
5982
  responses: {
5979
- 200: DefaultSuccessResponseSchema.extend({ message: z85.string() }),
5983
+ 200: DefaultSuccessResponseSchema.extend({ message: z86.string() }),
5980
5984
  500: DefaultErrorResponseSchema
5981
5985
  },
5982
5986
  summary: "Delete a widget."
@@ -5987,24 +5991,24 @@ var widgetContract = initContract33().router(
5987
5991
 
5988
5992
  // src/wrap-up-form/index.ts
5989
5993
  import { initContract as initContract34 } from "@ts-rest/core";
5990
- import z87 from "zod";
5994
+ import z88 from "zod";
5991
5995
 
5992
5996
  // src/wrap-up-form/validation.ts
5993
- import { z as z86 } from "zod";
5994
- var CreateWrapUpFormSchema = z86.object({
5995
- note: z86.string().nullable().optional(),
5996
- disposition: z86.string().nullable().optional(),
5997
- callFrom: z86.string().nullable().optional(),
5998
- callTo: z86.string().nullable().optional()
5997
+ import { z as z87 } from "zod";
5998
+ var CreateWrapUpFormSchema = z87.object({
5999
+ note: z87.string().nullable().optional(),
6000
+ disposition: z87.string().nullable().optional(),
6001
+ callFrom: z87.string().nullable().optional(),
6002
+ callTo: z87.string().nullable().optional()
5999
6003
  });
6000
6004
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6001
- tags: z86.array(z86.string()).optional()
6005
+ tags: z87.array(z87.string()).optional()
6002
6006
  });
6003
- var CreateCXLogWrapUpFormSchema = z86.object({
6004
- cxLogId: z86.string().uuid(),
6005
- disposition: z86.string().optional(),
6006
- tagIds: z86.array(z86.string().uuid()).optional(),
6007
- note: z86.string().optional()
6007
+ var CreateCXLogWrapUpFormSchema = z87.object({
6008
+ cxLogId: z87.string().uuid(),
6009
+ disposition: z87.string().optional(),
6010
+ tagIds: z87.array(z87.string().uuid()).optional(),
6011
+ note: z87.string().optional()
6008
6012
  });
6009
6013
 
6010
6014
  // src/wrap-up-form/index.ts
@@ -6019,8 +6023,8 @@ var wrapUpFormContract = initContract34().router(
6019
6023
  201: DefaultSuccessResponseSchema.extend({
6020
6024
  wrapUpForm: WrapUpFormSchema
6021
6025
  }),
6022
- 400: z87.object({
6023
- message: z87.string()
6026
+ 400: z88.object({
6027
+ message: z88.string()
6024
6028
  }),
6025
6029
  401: DefaultUnauthorizedSchema,
6026
6030
  500: DefaultErrorResponseSchema
@@ -6042,15 +6046,15 @@ var wrapUpFormContract = initContract34().router(
6042
6046
  getWrapUpForms: {
6043
6047
  method: "GET",
6044
6048
  path: "",
6045
- query: z87.object({
6046
- page: z87.coerce.number().default(1),
6047
- pageSize: z87.coerce.number().default(10)
6049
+ query: z88.object({
6050
+ page: z88.coerce.number().default(1),
6051
+ pageSize: z88.coerce.number().default(10)
6048
6052
  }).optional(),
6049
6053
  headers: DefaultHeaderSchema,
6050
6054
  responses: {
6051
6055
  200: WithPagination(WrapUpFormSchema),
6052
- 400: z87.object({
6053
- message: z87.string()
6056
+ 400: z88.object({
6057
+ message: z88.string()
6054
6058
  }),
6055
6059
  401: DefaultUnauthorizedSchema,
6056
6060
  500: DefaultErrorResponseSchema
@@ -6060,15 +6064,15 @@ var wrapUpFormContract = initContract34().router(
6060
6064
  updateWrapUpForm: {
6061
6065
  method: "PATCH",
6062
6066
  path: "/:id",
6063
- pathParams: z87.object({ id: z87.string() }),
6067
+ pathParams: z88.object({ id: z88.string() }),
6064
6068
  headers: DefaultHeaderSchema,
6065
6069
  body: UpdateWrapUpFormSchema,
6066
6070
  responses: {
6067
6071
  201: DefaultSuccessResponseSchema.extend({
6068
6072
  wrapUpForm: WrapUpFormSchema
6069
6073
  }),
6070
- 400: z87.object({
6071
- message: z87.string()
6074
+ 400: z88.object({
6075
+ message: z88.string()
6072
6076
  }),
6073
6077
  401: DefaultUnauthorizedSchema,
6074
6078
  500: DefaultErrorResponseSchema
@@ -6081,28 +6085,28 @@ var wrapUpFormContract = initContract34().router(
6081
6085
 
6082
6086
  // src/upload/index.ts
6083
6087
  import { initContract as initContract35 } from "@ts-rest/core";
6084
- import z88 from "zod";
6088
+ import z89 from "zod";
6085
6089
  var uploadContract = initContract35().router(
6086
6090
  {
6087
6091
  rename: {
6088
6092
  method: "POST",
6089
6093
  path: "/:id/rename",
6090
- pathParams: z88.object({
6091
- id: z88.string()
6094
+ pathParams: z89.object({
6095
+ id: z89.string()
6092
6096
  }),
6093
6097
  headers: DefaultHeaderSchema,
6094
6098
  responses: {
6095
6099
  201: DefaultSuccessResponseSchema.extend({
6096
- message: z88.string()
6100
+ message: z89.string()
6097
6101
  }),
6098
- 400: z88.object({
6099
- message: z88.string()
6102
+ 400: z89.object({
6103
+ message: z89.string()
6100
6104
  }),
6101
- 409: z88.object({
6102
- message: z88.string()
6105
+ 409: z89.object({
6106
+ message: z89.string()
6103
6107
  }),
6104
- 500: z88.object({
6105
- message: z88.string()
6108
+ 500: z89.object({
6109
+ message: z89.string()
6106
6110
  }),
6107
6111
  401: DefaultUnauthorizedSchema,
6108
6112
  404: DefaultNotFoundSchema,
@@ -6114,23 +6118,23 @@ var uploadContract = initContract35().router(
6114
6118
  delete: {
6115
6119
  method: "DELETE",
6116
6120
  path: "/:id",
6117
- pathParams: z88.object({
6118
- id: z88.string()
6121
+ pathParams: z89.object({
6122
+ id: z89.string()
6119
6123
  }),
6120
6124
  headers: DefaultHeaderSchema,
6121
6125
  body: null,
6122
6126
  responses: {
6123
6127
  201: DefaultSuccessResponseSchema.extend({
6124
- message: z88.string()
6128
+ message: z89.string()
6125
6129
  }),
6126
- 400: z88.object({
6127
- message: z88.string()
6130
+ 400: z89.object({
6131
+ message: z89.string()
6128
6132
  }),
6129
- 409: z88.object({
6130
- message: z88.string()
6133
+ 409: z89.object({
6134
+ message: z89.string()
6131
6135
  }),
6132
- 500: z88.object({
6133
- message: z88.string()
6136
+ 500: z89.object({
6137
+ message: z89.string()
6134
6138
  }),
6135
6139
  401: DefaultUnauthorizedSchema,
6136
6140
  404: DefaultNotFoundSchema,
@@ -6145,19 +6149,19 @@ var uploadContract = initContract35().router(
6145
6149
  );
6146
6150
 
6147
6151
  // src/viber/index.ts
6148
- import z90 from "zod";
6152
+ import z91 from "zod";
6149
6153
 
6150
6154
  // src/viber/validation.ts
6151
- import z89 from "zod";
6152
- var ViberChannelSchema = z89.object({
6153
- name: z89.string(),
6154
- accessToken: z89.string(),
6155
- actor: z89.object({
6156
- id: z89.string().uuid(),
6157
- name: z89.string(),
6158
- email: z89.string().email(),
6159
- address: z89.string().nullable(),
6160
- phone: z89.string().nullable()
6155
+ import z90 from "zod";
6156
+ var ViberChannelSchema = z90.object({
6157
+ name: z90.string(),
6158
+ accessToken: z90.string(),
6159
+ actor: z90.object({
6160
+ id: z90.string().uuid(),
6161
+ name: z90.string(),
6162
+ email: z90.string().email(),
6163
+ address: z90.string().nullable(),
6164
+ phone: z90.string().nullable()
6161
6165
  }).optional()
6162
6166
  });
6163
6167
 
@@ -6185,8 +6189,8 @@ var viberContract = initContract36().router({
6185
6189
  }),
6186
6190
  400: DefaultErrorResponseSchema
6187
6191
  },
6188
- body: z90.object({
6189
- id: z90.string().uuid()
6192
+ body: z91.object({
6193
+ id: z91.string().uuid()
6190
6194
  }),
6191
6195
  summary: "Connect message channel"
6192
6196
  },