@webitel/api-services 0.0.24 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/package.json +15 -10
  2. package/src/api/axios/generateInstance.ts +35 -0
  3. package/src/api/axios/index.ts +2 -0
  4. package/src/api/clients/_shared/generatePermissionsApi.ts +97 -0
  5. package/src/api/clients/agents/agentChats.ts +71 -0
  6. package/src/api/clients/agents/agents.ts +263 -0
  7. package/src/api/clients/buckets/buckets.ts +110 -0
  8. package/src/api/clients/calendars/calendars.ts +208 -0
  9. package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.ts +126 -0
  10. package/src/api/clients/caseCloseReasons/caseCloseReasons.ts +122 -0
  11. package/src/api/clients/casePriorities/casePriorities.ts +137 -0
  12. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.ts +196 -0
  13. package/src/api/clients/caseServices/services.ts +179 -0
  14. package/src/api/clients/caseSources/caseSources.ts +116 -0
  15. package/src/api/clients/caseStatusConditions/caseStatusConditions.ts +163 -0
  16. package/src/api/clients/caseStatuses/caseStatuses.ts +117 -0
  17. package/src/api/clients/catalog/catalog.ts +39 -0
  18. package/src/api/clients/chatGateways/chatGateways.ts +303 -0
  19. package/src/api/clients/chatGateways/defaults/defaultChatGateway.ts +20 -0
  20. package/src/api/clients/chatGateways/defaults/webChatGateway.ts +75 -0
  21. package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.ts +12 -0
  22. package/src/api/clients/chatGateways/scripts/generateUri.ts +13 -0
  23. package/src/api/clients/communications/communications.ts +139 -0
  24. package/src/api/clients/configurations/configurations.ts +142 -0
  25. package/src/api/clients/contactGroups/contactGroups.ts +184 -0
  26. package/src/api/clients/flows/flow.ts +219 -0
  27. package/src/api/clients/gateways/defaults/defaultGateway.ts +9 -0
  28. package/src/api/clients/gateways/defaults/registerGateway.ts +12 -0
  29. package/src/api/clients/gateways/defaults/trunkingGateway.ts +16 -0
  30. package/src/api/clients/gateways/gateways.ts +173 -0
  31. package/src/api/clients/index.ts +68 -0
  32. package/src/api/clients/labels/labels.ts +53 -0
  33. package/src/api/clients/lists/blacklists.ts +116 -0
  34. package/src/api/clients/media/media.ts +114 -0
  35. package/src/api/clients/object/object.ts +112 -0
  36. package/src/api/clients/queues/defaults/processing.ts +14 -0
  37. package/src/api/clients/queues/queues.ts +232 -0
  38. package/src/api/clients/quickReplies/quickReplies.ts +108 -0
  39. package/src/api/clients/roles/roles.ts +200 -0
  40. package/src/api/clients/skills/skills.ts +110 -0
  41. package/src/api/clients/slaConditions/slaConditions.ts +163 -0
  42. package/src/api/clients/slas/slas.ts +116 -0
  43. package/src/api/clients/teams/teams.ts +142 -0
  44. package/src/api/clients/users/__tests__/users.spec.ts +265 -0
  45. package/src/api/clients/users/users.ts +228 -0
  46. package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +21 -0
  47. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +60 -0
  48. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +114 -0
  49. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.ts +98 -0
  50. package/src/api/clients//321/201ontacts/contacts.ts +337 -0
  51. package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.ts +9 -0
  52. package/src/api/clients//321/201ontacts/index.ts +5 -0
  53. package/src/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.ts +8 -0
  54. package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.ts +11 -0
  55. package/src/api/defaults/getDefaultInstance/getDefaultInstance.ts +21 -0
  56. package/src/api/defaults/getDefaultOpenAPIConfig/getDefaultOpenAPIConfig.ts +12 -0
  57. package/src/api/defaults/index.ts +11 -0
  58. package/src/api/index.ts +6 -0
  59. package/src/api/interceptors/index.ts +3 -0
  60. package/src/api/interceptors/request/index.ts +2 -0
  61. package/src/api/interceptors/request/updateToken.interceptor.ts +11 -0
  62. package/src/api/interceptors/response/handleUnauthorized.interceptor.ts +14 -0
  63. package/src/api/interceptors/response/index.ts +2 -0
  64. package/src/api/transformers/addQueryParamsToUrl/addQueryParamsToUrl.transformer.ts +19 -0
  65. package/src/api/transformers/applyTransform.ts +24 -0
  66. package/src/api/transformers/camelToSnake/camelToSnake.transformer.ts +5 -0
  67. package/src/api/transformers/generateUrl/generateUrl.transformer.ts +13 -0
  68. package/src/api/transformers/index.ts +27 -0
  69. package/src/api/transformers/log/log.transformer.ts +6 -0
  70. package/src/api/transformers/merge/merge.transformer.ts +8 -0
  71. package/src/api/transformers/mergeEach/mergeEach.transformer.ts +8 -0
  72. package/src/api/transformers/notify/notify.transformer.ts +39 -0
  73. package/src/api/transformers/sanitize/sanitize.transformer.ts +12 -0
  74. package/src/api/transformers/skipIf/skipIf.ts +11 -0
  75. package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.ts +5 -0
  76. package/src/api/transformers/starToSearch/starToSearch.transformer.ts +15 -0
  77. package/src/gen/_docs/html/assets/navigation.js +1 -1
  78. package/src/gen/_docs/html/assets/search.js +1 -1
  79. package/src/gen/_docs/html/interfaces/_models_webitelCasesInputSource.WebitelCasesInputSource.html +0 -1
  80. package/src/gen/_docs/html/interfaces/_models_webitelCasesSource.WebitelCasesSource.html +5 -6
  81. package/src/gen/_docs/html/modules/index.html +1 -1
  82. package/src/gen/_docs/html/modules/sources_sources.zod.gen.html +7 -7
  83. package/src/gen/_docs/html/types/_models_createCaseParams.CreateCaseParams.html +9 -3
  84. package/src/gen/_docs/html/types/_models_updateCase2Params.UpdateCase2Params.html +8 -3
  85. package/src/gen/_docs/html/types/_models_updateCaseParams.UpdateCaseParams.html +8 -3
  86. package/src/gen/_docs/html/variables/cases_cases.zod.gen.createCaseQueryParams.html +1 -1
  87. package/src/gen/_docs/html/variables/cases_cases.zod.gen.updateCase2QueryParams.html +1 -1
  88. package/src/gen/_docs/html/variables/cases_cases.zod.gen.updateCaseQueryParams.html +1 -1
  89. package/src/gen/_models/agentAbsenceServiceUpdateAgentAbsenceBodyItem.ts +2 -1
  90. package/src/gen/_models/agentWorkingScheduleServiceCreateAgentsWorkingScheduleShiftsBody.ts +3 -2
  91. package/src/gen/_models/apiAccessStoreToggleDefaultAccessBody.ts +2 -1
  92. package/src/gen/_models/apiCustomer.ts +3 -2
  93. package/src/gen/_models/apiDevice.ts +2 -1
  94. package/src/gen/_models/apiLDAPCatalog.ts +5 -4
  95. package/src/gen/_models/apiLDAPUpdateLDAPCatalogBodyCatalog.ts +5 -4
  96. package/src/gen/_models/apiLDAProcess.ts +3 -2
  97. package/src/gen/_models/apiLicenseV1.ts +2 -1
  98. package/src/gen/_models/apiRole.ts +4 -3
  99. package/src/gen/_models/apiRolesUpdateRoleBodyRole.ts +4 -3
  100. package/src/gen/_models/apiUser.ts +2 -1
  101. package/src/gen/_models/apiUsersUpdateUserBodyUser.ts +2 -1
  102. package/src/gen/_models/contactsUpdateContactBody.ts +2 -1
  103. package/src/gen/_models/createCaseParams.ts +8 -0
  104. package/src/gen/_models/engineActiveCall.ts +3 -2
  105. package/src/gen/_models/engineAgent.ts +2 -1
  106. package/src/gen/_models/engineAgentInQueueStatistics.ts +2 -1
  107. package/src/gen/_models/engineAggregateHistoryCallRequest.ts +2 -1
  108. package/src/gen/_models/engineAttempt.ts +2 -1
  109. package/src/gen/_models/engineAttemptHistory.ts +2 -1
  110. package/src/gen/_models/engineAuditFormServicePatchAuditFormBody.ts +2 -1
  111. package/src/gen/_models/engineAuditFormServiceUpdateAuditFormBody.ts +2 -1
  112. package/src/gen/_models/engineAuditRate.ts +3 -2
  113. package/src/gen/_models/engineCreateAuditFormRequest.ts +2 -1
  114. package/src/gen/_models/engineCreateCallRequest.ts +2 -1
  115. package/src/gen/_models/engineCreateMemberBulkItem.ts +2 -1
  116. package/src/gen/_models/engineCreateOutboundResourceRequest.ts +3 -2
  117. package/src/gen/_models/engineCreateQueueRequest.ts +3 -2
  118. package/src/gen/_models/engineCreateRoutingSchemaRequest.ts +2 -1
  119. package/src/gen/_models/engineCreateTriggerRequest.ts +3 -2
  120. package/src/gen/_models/engineDeleteAllMembersRequest.ts +2 -1
  121. package/src/gen/_models/engineHistoryCall.ts +7 -6
  122. package/src/gen/_models/engineListReportGeneral.ts +2 -1
  123. package/src/gen/_models/engineOutboundResource.ts +2 -1
  124. package/src/gen/_models/engineOutboundResourceServicePatchOutboundResourceBody.ts +2 -1
  125. package/src/gen/_models/engineOutboundResourceServiceUpdateOutboundResourceBody.ts +2 -1
  126. package/src/gen/_models/engineQuestion.ts +2 -1
  127. package/src/gen/_models/engineQueue.ts +3 -2
  128. package/src/gen/_models/engineQueueReportGeneral.ts +2 -1
  129. package/src/gen/_models/engineQueueServicePatchQueueBody.ts +3 -2
  130. package/src/gen/_models/engineQueueServiceUpdateQueueBody.ts +3 -2
  131. package/src/gen/_models/engineRoutingSchema.ts +3 -2
  132. package/src/gen/_models/engineRoutingSchemaServicePatchRoutingSchemaBody.ts +2 -1
  133. package/src/gen/_models/engineRoutingSchemaServiceUpdateRoutingSchemaBody.ts +2 -1
  134. package/src/gen/_models/engineTeamHook.ts +2 -1
  135. package/src/gen/_models/engineTeamHookServiceCreateTeamHookBody.ts +2 -1
  136. package/src/gen/_models/engineTeamHookServicePatchTeamHookBody.ts +2 -1
  137. package/src/gen/_models/engineTeamHookServiceUpdateTeamHookBody.ts +2 -1
  138. package/src/gen/_models/engineTrigger.ts +2 -1
  139. package/src/gen/_models/engineTriggerJob.ts +2 -1
  140. package/src/gen/_models/engineTriggerServicePatchTriggerBody.ts +2 -1
  141. package/src/gen/_models/engineTriggerServiceUpdateTriggerBody.ts +2 -1
  142. package/src/gen/_models/index.ts +26 -26
  143. package/src/gen/_models/pauseTemplateServiceUpdatePauseTemplateBodyItem.ts +2 -1
  144. package/src/gen/_models/storageCreateImportTemplateRequest.ts +2 -1
  145. package/src/gen/_models/storageFile.ts +3 -2
  146. package/src/gen/_models/storageFilePolicy.ts +2 -1
  147. package/src/gen/_models/storageImportTemplate.ts +3 -2
  148. package/src/gen/_models/storageSafeUploadFileResponseMetadata.ts +2 -1
  149. package/src/gen/_models/storageUpdateCognitiveProfileRequest.ts +3 -2
  150. package/src/gen/_models/storageUpdateImportTemplateRequest.ts +2 -1
  151. package/src/gen/_models/storageUploadFileResponse.ts +2 -1
  152. package/src/gen/_models/storageUploadFileUrlResponse.ts +2 -1
  153. package/src/gen/_models/updateCase2Params.ts +8 -0
  154. package/src/gen/_models/updateCaseParams.ts +8 -0
  155. package/src/gen/_models/updateRelatedCase2Body.ts +2 -1
  156. package/src/gen/_models/updateRelatedCaseBody.ts +2 -1
  157. package/src/gen/_models/updateRelatedCaseInputBody.ts +2 -1
  158. package/src/gen/_models/usersUpdateUser2Body.ts +2 -1
  159. package/src/gen/_models/usersUpdateUserBody.ts +2 -1
  160. package/src/gen/_models/usersUpdateUserUserBody.ts +2 -1
  161. package/src/gen/_models/webitelCasesCallEvent.ts +2 -1
  162. package/src/gen/_models/webitelCasesCase.ts +2 -1
  163. package/src/gen/_models/webitelCasesChatEvent.ts +2 -1
  164. package/src/gen/_models/webitelCasesEmailEvent.ts +2 -1
  165. package/src/gen/_models/webitelCasesInputCreateService.ts +2 -1
  166. package/src/gen/_models/webitelCasesInputService.ts +2 -1
  167. package/src/gen/_models/webitelCasesInputSource.ts +0 -1
  168. package/src/gen/_models/webitelCasesService.ts +2 -1
  169. package/src/gen/_models/webitelCasesSource.ts +5 -6
  170. package/src/gen/_models/webitelChatAgentChat.ts +2 -1
  171. package/src/gen/_models/webitelChatBroadcastMessageRequest.ts +2 -1
  172. package/src/gen/_models/webitelChatChatMessage.ts +3 -2
  173. package/src/gen/_models/webitelChatContactChat.ts +2 -1
  174. package/src/gen/_models/webitelChatDialog.ts +2 -1
  175. package/src/gen/_models/webitelChatGetContactChatHistoryResponse.ts +3 -2
  176. package/src/gen/_models/webitelContactsComment.ts +2 -1
  177. package/src/gen/_models/webitelProtoDataStruct.ts +2 -1
  178. package/src/gen/_models/wfmAbsence.ts +2 -1
  179. package/src/gen/_models/wfmAgentScheduleShift.ts +3 -2
  180. package/src/gen/_models/wfmAgentWorkingSchedule.ts +2 -1
  181. package/src/gen/_models/wfmPauseTemplate.ts +2 -1
  182. package/src/gen/_models/wfmSearchAgentsWorkingScheduleResponse.ts +2 -1
  183. package/src/gen/access-store/access-store.msw.api.gen.ts +1 -1
  184. package/src/gen/access-store/access-store.zod.gen.ts +2 -2
  185. package/src/gen/agent-absence-service/agent-absence-service.msw.api.gen.ts +2 -3
  186. package/src/gen/agent-chat-service/agent-chat-service.msw.api.gen.ts +2 -3
  187. package/src/gen/agent-pause-cause-service/agent-pause-cause-service.msw.api.gen.ts +1 -1
  188. package/src/gen/agent-service/agent-service.msw.api.gen.ts +1 -1
  189. package/src/gen/agent-skill-service/agent-skill-service.msw.api.gen.ts +1 -1
  190. package/src/gen/agent-team-service/agent-team-service.msw.api.gen.ts +1 -1
  191. package/src/gen/agent-working-conditions-service/agent-working-conditions-service.msw.api.gen.ts +1 -1
  192. package/src/gen/agent-working-schedule-service/agent-working-schedule-service.msw.api.gen.ts +2 -3
  193. package/src/gen/articles/articles.api.gen.ts +1 -1
  194. package/src/gen/articles/articles.msw.api.gen.ts +1 -1
  195. package/src/gen/audit-form-service/audit-form-service.msw.api.gen.ts +2 -3
  196. package/src/gen/auth/auth.msw.api.gen.ts +1 -1
  197. package/src/gen/auth/auth.zod.gen.ts +1 -1
  198. package/src/gen/backend-profile-service/backend-profile-service.msw.api.gen.ts +1 -1
  199. package/src/gen/bucket-service/bucket-service.msw.api.gen.ts +1 -1
  200. package/src/gen/calendar-service/calendar-service.msw.api.gen.ts +1 -1
  201. package/src/gen/call-service/call-service.msw.api.gen.ts +5 -6
  202. package/src/gen/call-service/call-service.zod.gen.ts +1 -1
  203. package/src/gen/case-comments/case-comments.msw.api.gen.ts +1 -1
  204. package/src/gen/case-communications/case-communications.msw.api.gen.ts +1 -1
  205. package/src/gen/case-files/case-files.msw.api.gen.ts +1 -1
  206. package/src/gen/case-links/case-links.msw.api.gen.ts +1 -1
  207. package/src/gen/case-timeline/case-timeline.msw.api.gen.ts +2 -3
  208. package/src/gen/cases/cases.msw.api.gen.ts +2 -3
  209. package/src/gen/cases/cases.zod.gen.ts +18 -0
  210. package/src/gen/cases-chat-catalog/cases-chat-catalog.msw.api.gen.ts +2 -3
  211. package/src/gen/cases-chat-catalog/cases-chat-catalog.zod.gen.ts +1 -1
  212. package/src/gen/catalog/catalog.msw.api.gen.ts +2 -3
  213. package/src/gen/catalog/catalog.zod.gen.ts +3 -3
  214. package/src/gen/catalogs/catalogs.msw.api.gen.ts +1 -1
  215. package/src/gen/catalogs/catalogs.zod.gen.ts +4 -4
  216. package/src/gen/classes/classes.msw.api.gen.ts +1 -1
  217. package/src/gen/classes/classes.zod.gen.ts +1 -1
  218. package/src/gen/close-reason-groups/close-reason-groups.msw.api.gen.ts +1 -1
  219. package/src/gen/close-reasons/close-reasons.msw.api.gen.ts +1 -1
  220. package/src/gen/cognitive-profile-service/cognitive-profile-service.msw.api.gen.ts +2 -3
  221. package/src/gen/communication-type-service/communication-type-service.msw.api.gen.ts +2 -3
  222. package/src/gen/config-service/config-service.msw.api.gen.ts +1 -1
  223. package/src/gen/contact-groups/contact-groups.msw.api.gen.ts +1 -1
  224. package/src/gen/contact-linking-service/contact-linking-service.msw.api.gen.ts +1 -1
  225. package/src/gen/contacts/contacts.msw.api.gen.ts +1 -1
  226. package/src/gen/contacts/contacts.zod.gen.ts +2 -2
  227. package/src/gen/contacts-chat-catalog/contacts-chat-catalog.msw.api.gen.ts +2 -3
  228. package/src/gen/contacts-chat-catalog/contacts-chat-catalog.zod.gen.ts +2 -2
  229. package/src/gen/customers/customers.msw.api.gen.ts +1 -1
  230. package/src/gen/customers/customers.zod.gen.ts +4 -4
  231. package/src/gen/devices/devices.msw.api.gen.ts +1 -1
  232. package/src/gen/devices/devices.zod.gen.ts +1 -1
  233. package/src/gen/dictionaries/dictionaries.msw.api.gen.ts +2 -3
  234. package/src/gen/dictionaries/dictionaries.zod.gen.ts +16 -16
  235. package/src/gen/domains/domains.msw.api.gen.ts +1 -1
  236. package/src/gen/dynamic-conditions/dynamic-conditions.msw.api.gen.ts +1 -1
  237. package/src/gen/dynamic-groups/dynamic-groups.msw.api.gen.ts +1 -1
  238. package/src/gen/email-profile-service/email-profile-service.msw.api.gen.ts +2 -3
  239. package/src/gen/emails/emails.msw.api.gen.ts +1 -1
  240. package/src/gen/extensions/extensions.msw.api.gen.ts +2 -3
  241. package/src/gen/extensions/extensions.zod.gen.ts +10 -10
  242. package/src/gen/file-policies-service/file-policies-service.msw.api.gen.ts +2 -3
  243. package/src/gen/file-service/file-service.msw.api.gen.ts +2 -3
  244. package/src/gen/file-transcript-service/file-transcript-service.msw.api.gen.ts +1 -1
  245. package/src/gen/forecast-calculation-service/forecast-calculation-service.msw.api.gen.ts +1 -1
  246. package/src/gen/ftsservice/ftsservice.msw.api.gen.ts +1 -1
  247. package/src/gen/groups/groups.msw.api.gen.ts +2 -3
  248. package/src/gen/imclients/imclients.msw.api.gen.ts +1 -1
  249. package/src/gen/import-template-service/import-template-service.msw.api.gen.ts +2 -3
  250. package/src/gen/index.ts +249 -249
  251. package/src/gen/knowledgebase-search/knowledgebase-search.msw.api.gen.ts +1 -1
  252. package/src/gen/labels/labels.msw.api.gen.ts +1 -1
  253. package/src/gen/ldap/ldap.api.gen.ts +4 -4
  254. package/src/gen/ldap/ldap.msw.api.gen.ts +3 -3
  255. package/src/gen/ldap/ldap.zod.gen.ts +6 -6
  256. package/src/gen/list-service/list-service.msw.api.gen.ts +1 -1
  257. package/src/gen/logger-service/logger-service.msw.api.gen.ts +1 -1
  258. package/src/gen/managers/managers.msw.api.gen.ts +1 -1
  259. package/src/gen/media-file-service/media-file-service.msw.api.gen.ts +1 -1
  260. package/src/gen/member-service/member-service.msw.api.gen.ts +1 -1
  261. package/src/gen/member-service/member-service.zod.gen.ts +1 -1
  262. package/src/gen/messages-service/messages-service.msw.api.gen.ts +1 -1
  263. package/src/gen/oauth2-federation/oauth2-federation.msw.api.gen.ts +1 -1
  264. package/src/gen/oauth2-federation/oauth2-federation.zod.gen.ts +2 -2
  265. package/src/gen/outbound-resource-group-service/outbound-resource-group-service.msw.api.gen.ts +1 -1
  266. package/src/gen/outbound-resource-service/outbound-resource-service.msw.api.gen.ts +1 -1
  267. package/src/gen/pause-template-service/pause-template-service.msw.api.gen.ts +1 -1
  268. package/src/gen/permissions/permissions.msw.api.gen.ts +1 -1
  269. package/src/gen/permissions/permissions.zod.gen.ts +1 -1
  270. package/src/gen/phones/phones.msw.api.gen.ts +1 -1
  271. package/src/gen/presence/presence.msw.api.gen.ts +1 -1
  272. package/src/gen/preset-query-service/preset-query-service.msw.api.gen.ts +1 -1
  273. package/src/gen/priorities/priorities.msw.api.gen.ts +1 -1
  274. package/src/gen/queue-bucket-service/queue-bucket-service.msw.api.gen.ts +1 -1
  275. package/src/gen/queue-hook-service/queue-hook-service.msw.api.gen.ts +1 -1
  276. package/src/gen/queue-resources-service/queue-resources-service.msw.api.gen.ts +1 -1
  277. package/src/gen/queue-service/queue-service.msw.api.gen.ts +1 -1
  278. package/src/gen/queue-skill-service/queue-skill-service.msw.api.gen.ts +1 -1
  279. package/src/gen/quick-replies-service/quick-replies-service.msw.api.gen.ts +1 -1
  280. package/src/gen/region-service/region-service.msw.api.gen.ts +1 -1
  281. package/src/gen/related-cases/related-cases.msw.api.gen.ts +2 -3
  282. package/src/gen/routing-chat-plan-service/routing-chat-plan-service.msw.api.gen.ts +1 -1
  283. package/src/gen/routing-outbound-call-service/routing-outbound-call-service.msw.api.gen.ts +1 -1
  284. package/src/gen/routing-schema-service/routing-schema-service.msw.api.gen.ts +2 -3
  285. package/src/gen/routing-variable-service/routing-variable-service.msw.api.gen.ts +1 -1
  286. package/src/gen/schema-variables-service/schema-variables-service.msw.api.gen.ts +1 -1
  287. package/src/gen/schema-version-service/schema-version-service.msw.api.gen.ts +1 -1
  288. package/src/gen/services/services.msw.api.gen.ts +1 -1
  289. package/src/gen/shift-template-service/shift-template-service.msw.api.gen.ts +1 -1
  290. package/src/gen/skill-service/skill-service.msw.api.gen.ts +1 -1
  291. package/src/gen/slaconditions/slaconditions.msw.api.gen.ts +1 -1
  292. package/src/gen/slas/slas.msw.api.gen.ts +1 -1
  293. package/src/gen/sources/sources.msw.api.gen.ts +8 -9
  294. package/src/gen/sources/sources.zod.gen.ts +0 -27
  295. package/src/gen/spaces/spaces.msw.api.gen.ts +1 -1
  296. package/src/gen/spaces/spaces.zod.gen.ts +1 -1
  297. package/src/gen/status-conditions/status-conditions.msw.api.gen.ts +1 -1
  298. package/src/gen/statuses/statuses.msw.api.gen.ts +1 -1
  299. package/src/gen/system-setting-service/system-setting-service.msw.api.gen.ts +2 -3
  300. package/src/gen/tags/tags.msw.api.gen.ts +1 -1
  301. package/src/gen/team-hook-service/team-hook-service.msw.api.gen.ts +2 -3
  302. package/src/gen/team-trigger-service/team-trigger-service.msw.api.gen.ts +1 -1
  303. package/src/gen/timeline/timeline.msw.api.gen.ts +2 -3
  304. package/src/gen/timezones/timezones.msw.api.gen.ts +1 -1
  305. package/src/gen/trigger-service/trigger-service.msw.api.gen.ts +7 -8
  306. package/src/gen/two-factor-authentication/two-factor-authentication.msw.api.gen.ts +1 -1
  307. package/src/gen/types/types.msw.api.gen.ts +2 -3
  308. package/src/gen/types/types.zod.gen.ts +4 -4
  309. package/src/gen/user-access-tokens/user-access-tokens.msw.api.gen.ts +1 -1
  310. package/src/gen/user-helper-service/user-helper-service.msw.api.gen.ts +1 -1
  311. package/src/gen/users/users.msw.api.gen.ts +1 -1
  312. package/src/gen/users/users.zod.gen.ts +12 -12
  313. package/src/gen/variables/variables.msw.api.gen.ts +1 -1
  314. package/src/gen/web-hook-service/web-hook-service.msw.api.gen.ts +1 -1
  315. package/src/gen/working-condition-service/working-condition-service.msw.api.gen.ts +1 -1
  316. package/src/gen/working-schedule-service/working-schedule-service.msw.api.gen.ts +2 -3
  317. package/src/utils/gen/index.ts +35 -33
  318. package/src/utils/index.ts +11 -6
  319. package/src/validations/caseSource/caseSource.validations.ts +3 -5
  320. package/types/api/axios/generateInstance.d.ts +9 -0
  321. package/types/api/axios/index.d.ts +1 -0
  322. package/types/api/clients/_shared/generatePermissionsApi.d.ts +13 -0
  323. package/types/api/clients/agents/agentChats.d.ts +7 -0
  324. package/types/api/clients/agents/agents.d.ts +43 -0
  325. package/types/api/clients/buckets/buckets.d.ts +23 -0
  326. package/types/api/clients/calendars/calendars.d.ts +27 -0
  327. package/types/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.d.ts +23 -0
  328. package/types/api/clients/caseCloseReasons/caseCloseReasons.d.ts +29 -0
  329. package/types/api/clients/casePriorities/casePriorities.d.ts +23 -0
  330. package/types/api/clients/caseServiceCatalogs/serviceCatalogs.d.ts +23 -0
  331. package/types/api/clients/caseServices/services.d.ts +34 -0
  332. package/types/api/clients/caseSources/caseSources.d.ts +23 -0
  333. package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +35 -0
  334. package/types/api/clients/caseStatuses/caseStatuses.d.ts +23 -0
  335. package/types/api/clients/catalog/catalog.d.ts +8 -0
  336. package/types/api/clients/chatGateways/chatGateways.d.ts +30 -0
  337. package/types/api/clients/chatGateways/defaults/defaultChatGateway.d.ts +18 -0
  338. package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +68 -0
  339. package/types/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.d.ts +12 -0
  340. package/types/api/clients/chatGateways/scripts/generateUri.d.ts +5 -0
  341. package/types/api/clients/communications/communications.d.ts +27 -0
  342. package/types/api/clients/configurations/configurations.d.ts +27 -0
  343. package/types/api/clients/contactGroups/contactGroups.d.ts +46 -0
  344. package/types/api/clients/flows/flow.d.ts +27 -0
  345. package/types/api/clients/gateways/defaults/defaultGateway.d.ts +8 -0
  346. package/types/api/clients/gateways/defaults/registerGateway.d.ts +13 -0
  347. package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +11 -0
  348. package/types/api/clients/gateways/gateways.d.ts +27 -0
  349. package/types/api/clients/index.d.ts +33 -0
  350. package/types/api/clients/labels/labels.d.ts +10 -0
  351. package/types/api/clients/lists/blacklists.d.ts +23 -0
  352. package/types/api/clients/media/media.d.ts +18 -0
  353. package/types/api/clients/object/object.d.ts +10 -0
  354. package/types/api/clients/queues/defaults/processing.d.ts +7 -0
  355. package/types/api/clients/queues/queues.d.ts +31 -0
  356. package/types/api/clients/quickReplies/quickReplies.d.ts +23 -0
  357. package/types/api/clients/roles/roles.d.ts +31 -0
  358. package/types/api/clients/skills/skills.d.ts +23 -0
  359. package/types/api/clients/slaConditions/slaConditions.d.ts +29 -0
  360. package/types/api/clients/slas/slas.d.ts +23 -0
  361. package/types/api/clients/teams/teams.d.ts +23 -0
  362. package/types/api/clients/users/users.d.ts +45 -0
  363. package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +2 -0
  364. package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +15 -0
  365. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +16 -0
  366. package/types/api/clients//321/201ontacts/contactChatMessagesHistory.d.ts +13 -0
  367. package/types/api/clients//321/201ontacts/contacts.d.ts +22 -0
  368. package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +8 -0
  369. package/types/api/clients//321/201ontacts/index.d.ts +4 -0
  370. package/types/api/defaults/getDefaultGetListResponse/getDefaultGetListResponse.d.ts +8 -0
  371. package/types/api/defaults/getDefaultGetParams/getDefaultGetParams.d.ts +14 -0
  372. package/types/api/defaults/getDefaultInstance/getDefaultInstance.d.ts +5 -0
  373. package/types/api/defaults/getDefaultOpenAPIConfig/getDefaultOpenAPIConfig.d.ts +6 -0
  374. package/types/api/defaults/index.d.ts +5 -0
  375. package/types/api/index.d.ts +5 -0
  376. package/types/api/interceptors/index.d.ts +2 -0
  377. package/types/api/interceptors/request/index.d.ts +1 -0
  378. package/types/api/interceptors/request/updateToken.interceptor.d.ts +4 -0
  379. package/types/api/interceptors/response/handleUnauthorized.interceptor.d.ts +5 -0
  380. package/types/api/interceptors/response/index.d.ts +1 -0
  381. package/types/api/transformers/addQueryParamsToUrl/addQueryParamsToUrl.transformer.d.ts +2 -0
  382. package/types/api/transformers/applyTransform.d.ts +13 -0
  383. package/types/api/transformers/camelToSnake/camelToSnake.transformer.d.ts +2 -0
  384. package/types/api/transformers/generateUrl/generateUrl.transformer.d.ts +2 -0
  385. package/types/api/transformers/index.d.ts +13 -0
  386. package/types/api/transformers/log/log.transformer.d.ts +2 -0
  387. package/types/api/transformers/merge/merge.transformer.d.ts +2 -0
  388. package/types/api/transformers/mergeEach/mergeEach.transformer.d.ts +2 -0
  389. package/types/api/transformers/notify/notify.transformer.d.ts +2 -0
  390. package/types/api/transformers/sanitize/sanitize.transformer.d.ts +2 -0
  391. package/types/api/transformers/skipIf/skipIf.d.ts +1 -0
  392. package/types/api/transformers/snakeToCamel/snakeToCamel.transformer.d.ts +2 -0
  393. package/types/api/transformers/starToSearch/starToSearch.transformer.d.ts +2 -0
  394. package/types/gen/_models/engineTriggerObjectType.d.ts +0 -1
  395. package/types/gen/_models/fileServiceSearchFilesChannelItem.d.ts +0 -2
  396. package/types/gen/_models/googleRpcStatus.d.ts +12 -0
  397. package/types/gen/_models/storageUploadFileChannel.d.ts +0 -2
  398. package/types/gen/_models/webitelCasesStatus.d.ts +16 -0
  399. package/types/gen/file-policies-service/file-policies-service.zod.gen.d.ts +0 -18
  400. package/types/gen/file-service/file-service.api.gen.d.ts +1 -3
  401. package/types/gen/file-service/file-service.msw.api.gen.d.ts +1 -3
  402. package/types/gen/file-service/file-service.zod.gen.d.ts +0 -18
  403. package/types/gen/trigger-service/trigger-service.zod.gen.d.ts +0 -9
  404. package/src/defaults/index.ts +0 -2
  405. package/src/gen/_docs/.nojekyll +0 -1
  406. package/src/gen/_docs/html/variables/sources_sources.zod.gen.createSourceBodyNameRegExp.html +0 -1
  407. package/src/gen/_docs/html/variables/sources_sources.zod.gen.createSourceResponseNameRegExp.html +0 -1
  408. package/src/gen/_docs/html/variables/sources_sources.zod.gen.deleteSourceResponseNameRegExp.html +0 -1
  409. package/src/gen/_docs/html/variables/sources_sources.zod.gen.listSourcesResponseItemsItemNameRegExp.html +0 -1
  410. package/src/gen/_docs/html/variables/sources_sources.zod.gen.locateSourceResponseSourceNameRegExp.html +0 -1
  411. package/src/gen/_docs/html/variables/sources_sources.zod.gen.updateSource2BodyNameRegExp.html +0 -1
  412. package/src/gen/_docs/html/variables/sources_sources.zod.gen.updateSource2ResponseNameRegExp.html +0 -1
  413. package/src/gen/_docs/html/variables/sources_sources.zod.gen.updateSourceBodyNameRegExp.html +0 -1
  414. package/src/gen/_docs/html/variables/sources_sources.zod.gen.updateSourceResponseNameRegExp.html +0 -1
  415. package/types/gen/_models/casesCaseCustom.d.ts +0 -12
  416. package/types/gen/_models/casesInputCaseCustom.d.ts +0 -12
  417. package/types/gen/_models/casesInputCreateCaseCustom.d.ts +0 -12
  418. package/types/gen/_models/protobufNullValue.d.ts +0 -18
@@ -55,8 +55,6 @@ export const listSourcesResponseItemsItemDescriptionMax = 500;
55
55
  export const listSourcesResponseItemsItemNameMin = 3;
56
56
 
57
57
  export const listSourcesResponseItemsItemNameMax = 100;
58
-
59
- export const listSourcesResponseItemsItemNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
60
58
  export const listSourcesResponseItemsItemTypeDefault = 'TYPE_UNSPECIFIED';
61
59
 
62
60
  export const listSourcesResponse = zod
@@ -90,7 +88,6 @@ export const listSourcesResponse = zod
90
88
  .string()
91
89
  .min(listSourcesResponseItemsItemNameMin)
92
90
  .max(listSourcesResponseItemsItemNameMax)
93
- .regex(listSourcesResponseItemsItemNameRegExp)
94
91
  .describe('A unique, descriptive name for the source.'),
95
92
  type: zod
96
93
  .enum([
@@ -146,8 +143,6 @@ export const createSourceBodyNameDefault = 'New Source';
146
143
  export const createSourceBodyNameMin = 2;
147
144
 
148
145
  export const createSourceBodyNameMax = 100;
149
-
150
- export const createSourceBodyNameRegExp = /^[a-zA-Z0-9_\- ]+$/;
151
146
  export const createSourceBodyTypeDefault = 'TYPE_UNSPECIFIED';
152
147
 
153
148
  export const createSourceBody = zod
@@ -161,7 +156,6 @@ export const createSourceBody = zod
161
156
  .string()
162
157
  .min(createSourceBodyNameMin)
163
158
  .max(createSourceBodyNameMax)
164
- .regex(createSourceBodyNameRegExp)
165
159
  .describe('The name of the source'),
166
160
  type: zod
167
161
  .enum([
@@ -183,8 +177,6 @@ export const createSourceResponseDescriptionMax = 500;
183
177
  export const createSourceResponseNameMin = 3;
184
178
 
185
179
  export const createSourceResponseNameMax = 100;
186
-
187
- export const createSourceResponseNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
188
180
  export const createSourceResponseTypeDefault = 'TYPE_UNSPECIFIED';
189
181
 
190
182
  export const createSourceResponse = zod
@@ -208,7 +200,6 @@ export const createSourceResponse = zod
208
200
  .string()
209
201
  .min(createSourceResponseNameMin)
210
202
  .max(createSourceResponseNameMax)
211
- .regex(createSourceResponseNameRegExp)
212
203
  .describe('A unique, descriptive name for the source.'),
213
204
  type: zod
214
205
  .enum([
@@ -244,8 +235,6 @@ export const deleteSourceResponseDescriptionMax = 500;
244
235
  export const deleteSourceResponseNameMin = 3;
245
236
 
246
237
  export const deleteSourceResponseNameMax = 100;
247
-
248
- export const deleteSourceResponseNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
249
238
  export const deleteSourceResponseTypeDefault = 'TYPE_UNSPECIFIED';
250
239
 
251
240
  export const deleteSourceResponse = zod
@@ -269,7 +258,6 @@ export const deleteSourceResponse = zod
269
258
  .string()
270
259
  .min(deleteSourceResponseNameMin)
271
260
  .max(deleteSourceResponseNameMax)
272
- .regex(deleteSourceResponseNameRegExp)
273
261
  .describe('A unique, descriptive name for the source.'),
274
262
  type: zod
275
263
  .enum([
@@ -312,8 +300,6 @@ export const locateSourceResponseSourceDescriptionMax = 500;
312
300
  export const locateSourceResponseSourceNameMin = 3;
313
301
 
314
302
  export const locateSourceResponseSourceNameMax = 100;
315
-
316
- export const locateSourceResponseSourceNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
317
303
  export const locateSourceResponseSourceTypeDefault = 'TYPE_UNSPECIFIED';
318
304
 
319
305
  export const locateSourceResponse = zod
@@ -341,7 +327,6 @@ export const locateSourceResponse = zod
341
327
  .string()
342
328
  .min(locateSourceResponseSourceNameMin)
343
329
  .max(locateSourceResponseSourceNameMax)
344
- .regex(locateSourceResponseSourceNameRegExp)
345
330
  .describe('A unique, descriptive name for the source.'),
346
331
  type: zod
347
332
  .enum([
@@ -390,8 +375,6 @@ export const updateSource2BodyNameDefault = 'New Source';
390
375
  export const updateSource2BodyNameMin = 2;
391
376
 
392
377
  export const updateSource2BodyNameMax = 100;
393
-
394
- export const updateSource2BodyNameRegExp = /^[a-zA-Z0-9_\- ]+$/;
395
378
  export const updateSource2BodyTypeDefault = 'TYPE_UNSPECIFIED';
396
379
 
397
380
  export const updateSource2Body = zod
@@ -405,7 +388,6 @@ export const updateSource2Body = zod
405
388
  .string()
406
389
  .min(updateSource2BodyNameMin)
407
390
  .max(updateSource2BodyNameMax)
408
- .regex(updateSource2BodyNameRegExp)
409
391
  .describe('The name of the source'),
410
392
  type: zod
411
393
  .enum([
@@ -427,8 +409,6 @@ export const updateSource2ResponseDescriptionMax = 500;
427
409
  export const updateSource2ResponseNameMin = 3;
428
410
 
429
411
  export const updateSource2ResponseNameMax = 100;
430
-
431
- export const updateSource2ResponseNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
432
412
  export const updateSource2ResponseTypeDefault = 'TYPE_UNSPECIFIED';
433
413
 
434
414
  export const updateSource2Response = zod
@@ -452,7 +432,6 @@ export const updateSource2Response = zod
452
432
  .string()
453
433
  .min(updateSource2ResponseNameMin)
454
434
  .max(updateSource2ResponseNameMax)
455
- .regex(updateSource2ResponseNameRegExp)
456
435
  .describe('A unique, descriptive name for the source.'),
457
436
  type: zod
458
437
  .enum([
@@ -495,8 +474,6 @@ export const updateSourceBodyNameDefault = 'New Source';
495
474
  export const updateSourceBodyNameMin = 2;
496
475
 
497
476
  export const updateSourceBodyNameMax = 100;
498
-
499
- export const updateSourceBodyNameRegExp = /^[a-zA-Z0-9_\- ]+$/;
500
477
  export const updateSourceBodyTypeDefault = 'TYPE_UNSPECIFIED';
501
478
 
502
479
  export const updateSourceBody = zod
@@ -510,7 +487,6 @@ export const updateSourceBody = zod
510
487
  .string()
511
488
  .min(updateSourceBodyNameMin)
512
489
  .max(updateSourceBodyNameMax)
513
- .regex(updateSourceBodyNameRegExp)
514
490
  .describe('The name of the source'),
515
491
  type: zod
516
492
  .enum([
@@ -532,8 +508,6 @@ export const updateSourceResponseDescriptionMax = 500;
532
508
  export const updateSourceResponseNameMin = 3;
533
509
 
534
510
  export const updateSourceResponseNameMax = 100;
535
-
536
- export const updateSourceResponseNameRegExp = /^[a-zA-Z0-9_\-\s]+$/;
537
511
  export const updateSourceResponseTypeDefault = 'TYPE_UNSPECIFIED';
538
512
 
539
513
  export const updateSourceResponse = zod
@@ -557,7 +531,6 @@ export const updateSourceResponse = zod
557
531
  .string()
558
532
  .min(updateSourceResponseNameMin)
559
533
  .max(updateSourceResponseNameMax)
560
- .regex(updateSourceResponseNameRegExp)
561
534
  .describe('A unique, descriptive name for the source.'),
562
535
  type: zod
563
536
  .enum([
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WebitelKnowledgebaseSpace,
@@ -47,7 +47,7 @@ export const spacesListSpacesQueryParams = zod.object({
47
47
  .array(zod.string().regex(spacesListSpacesQuerySortItemRegExp))
48
48
  .optional()
49
49
  .describe(
50
- 'Sort result dataset of records by fields.\n```\nsort ::= *( ORDER name )\n\nORDER = ASC / DESC\nDESC = "-" / "!"\nASC = [ "+" ] ; Default\n```\n\nFields available\n\n- `id`(seq)\n- `domain`{name}\n- `state`',
50
+ 'Sort result dataset of records by fields.\n```\nsort ::= *( ORDER name )\n\nORDER = ASC / DESC\nDESC = \"-\" / \"!\"\nASC = [ \"+\" ] ; Default\n```\n\nFields available\n\n- `id`(seq)\n- `domain`{name}\n- `state`',
51
51
  ),
52
52
  fields: zod.array(zod.string()).optional(),
53
53
  id: zod
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WebitelCasesLocateStatusConditionResponse,
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WebitelCasesLocateStatusResponse,
@@ -6,14 +6,13 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import { EngineSystemSettingName } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
12
10
  import type {
13
11
  EngineListAvailableSystemSetting,
14
12
  EngineListSystemSetting,
15
13
  EngineSystemSetting,
16
14
  } from '.././_models';
15
+ import { EngineSystemSettingName } from '.././_models';
17
16
 
18
17
  export const getSearchSystemSettingResponseMock = (
19
18
  overrideResponse: Partial<EngineListSystemSetting> = {},
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type { WebitelKnowledgebaseTagsList } from '.././_models';
12
12
 
@@ -6,10 +6,9 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import { EngineTeamHookEvent } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
12
10
  import type { EngineListTeamHook, EngineTeamHook } from '.././_models';
11
+ import { EngineTeamHookEvent } from '.././_models';
13
12
 
14
13
  export const getSearchTeamHookResponseMock = (
15
14
  overrideResponse: Partial<EngineListTeamHook> = {},
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  EngineListTeamTrigger,
@@ -6,13 +6,12 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import { WebitelContactsTimelineEventType } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
12
10
  import type {
13
11
  WebitelContactsGetTimelineCounterResponse,
14
12
  WebitelContactsGetTimelineResponse,
15
13
  } from '.././_models';
14
+ import { WebitelContactsTimelineEventType } from '.././_models';
16
15
 
17
16
  export const getTimelineGetTimelineResponseMock = (
18
17
  overrideResponse: Partial<WebitelContactsGetTimelineResponse> = {},
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WebitelContactsTimezone,
@@ -6,20 +6,19 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import {
12
- EngineTriggerEventType,
13
- EngineTriggerJobState,
14
- EngineTriggerObjectType,
15
- EngineTriggerType,
16
- } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
17
10
  import type {
18
11
  EngineListTrigger,
19
12
  EngineListTriggerJob,
20
13
  EngineTrigger,
21
14
  EngineTriggerJob,
22
15
  } from '.././_models';
16
+ import {
17
+ EngineTriggerEventType,
18
+ EngineTriggerJobState,
19
+ EngineTriggerObjectType,
20
+ EngineTriggerType,
21
+ } from '.././_models';
23
22
 
24
23
  export const getSearchTriggerResponseMock = (
25
24
  overrideResponse: Partial<EngineListTrigger> = {},
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  ApiGenerateUserTfaKeyResponse,
@@ -6,13 +6,12 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import { WebitelProtoDataTypeKind } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
12
10
  import type {
13
11
  WebitelProtoDataStruct,
14
12
  WebitelProtoDataStructList,
15
13
  } from '.././_models';
14
+ import { WebitelProtoDataTypeKind } from '.././_models';
16
15
 
17
16
  export const getTypesSearchResponseMock = (
18
17
  overrideResponse: Partial<WebitelProtoDataStructList> = {},
@@ -53,13 +53,13 @@ export const typesSearchQueryParams = zod.object({
53
53
  .array(zod.string().regex(typesSearchQuerySortItemRegExp))
54
54
  .optional()
55
55
  .describe(
56
- 'Sort result dataset of records by fields.\n```\nsort ::= *( ORDER name )\n\nORDER = ASC / DESC\nDESC = "-" / "!"\nASC = [ "+" ] ; Default\n```\n\nFields available\n\n- `id`(seq)\n- `domain`{name}\n- `created_at`\n- `created_by`{name}\n- `updated_at`\n- `updated_by`{name}\n\nUse ?fields=`field.sort()` option to sort Edge fields.',
56
+ 'Sort result dataset of records by fields.\n```\nsort ::= *( ORDER name )\n\nORDER = ASC / DESC\nDESC = \"-\" / \"!\"\nASC = [ \"+\" ] ; Default\n```\n\nFields available\n\n- `id`(seq)\n- `domain`{name}\n- `created_at`\n- `created_by`{name}\n- `updated_at`\n- `updated_by`{name}\n\nUse ?fields=`field.sort()` option to sort Edge fields.',
57
57
  ),
58
58
  fields: zod
59
59
  .array(zod.string())
60
60
  .optional()
61
61
  .describe(
62
- 'Fields [Q]uery to build result dataset record.\n```\nfields ::= field [ *( "," field ) ]\nfield ::= name [ *( func ) ] [ inner ]\ninner ::= "{" fields "}"\nfuncs ::= *( func )\nfunc ::= "." name "(" [ args ] ")"\nname ::= ALPHA / DIGIT / USCORE\n\nALPHA = %x41-5A / %x61-7A ; "A"-"Z" / "a"-"z"\nDIGIT = %x30-39 ; "0"-"9"\nUSCORE = %x5F ; underscore ; "_"\n```',
62
+ 'Fields [Q]uery to build result dataset record.\n```\nfields ::= field [ *( \",\" field ) ]\nfield ::= name [ *( func ) ] [ inner ]\ninner ::= \"{\" fields \"}\"\nfuncs ::= *( func )\nfunc ::= \".\" name \"(\" [ args ] \")\"\nname ::= ALPHA / DIGIT / USCORE\n\nALPHA = %x41-5A / %x61-7A ; \"A\"-\"Z\" / \"a\"-\"z\"\nDIGIT = %x30-39 ; \"0\"-\"9\"\nUSCORE = %x5F ; underscore ; \"_\"\n```',
63
63
  ),
64
64
  });
65
65
 
@@ -266,7 +266,7 @@ export const typesSearchResponse = zod
266
266
  .string()
267
267
  .optional()
268
268
  .describe(
269
- '[Required]. Reference dataset relative path\ne.g.: "contacts", "dictionaries/cities".\n(lookup).{`type`} value relation.',
269
+ '[Required]. Reference dataset relative path\ne.g.: \"contacts\", \"dictionaries/cities\".\n(lookup).{`type`} value relation.',
270
270
  ),
271
271
  primary: zod
272
272
  .string()
@@ -609,7 +609,7 @@ export const typesLocateResponse = zod
609
609
  .string()
610
610
  .optional()
611
611
  .describe(
612
- '[Required]. Reference dataset relative path\ne.g.: "contacts", "dictionaries/cities".\n(lookup).{`type`} value relation.',
612
+ '[Required]. Reference dataset relative path\ne.g.: \"contacts\", \"dictionaries/cities\".\n(lookup).{`type`} value relation.',
613
613
  ),
614
614
  primary: zod
615
615
  .string()
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type { ApiUserAccessToken, ApiUserAccessTokenList } from '.././_models';
12
12
 
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  EngineActivityWorkspaceWidgetResponse,
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  ApiCreateUserResponse,
@@ -18,7 +18,7 @@ export const usersReadUser2Response = zod.object({
18
18
  .string()
19
19
  .optional()
20
20
  .describe(
21
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
21
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
22
22
  ),
23
23
  contact: zod
24
24
  .object({
@@ -151,7 +151,7 @@ export const usersDeleteUsers2Response = zod.object({
151
151
  .string()
152
152
  .optional()
153
153
  .describe(
154
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
154
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
155
155
  ),
156
156
  contact: zod
157
157
  .object({
@@ -332,7 +332,7 @@ export const usersSearchUsersResponse = zod.object({
332
332
  .string()
333
333
  .optional()
334
334
  .describe(
335
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
335
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
336
336
  ),
337
337
  contact: zod
338
338
  .object({
@@ -462,7 +462,7 @@ export const usersCreateUserBody = zod.object({
462
462
  .string()
463
463
  .optional()
464
464
  .describe(
465
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
465
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
466
466
  ),
467
467
  contact: zod
468
468
  .object({
@@ -586,7 +586,7 @@ export const usersCreateUserResponse = zod.object({
586
586
  .string()
587
587
  .optional()
588
588
  .describe(
589
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
589
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
590
590
  ),
591
591
  contact: zod
592
592
  .object({
@@ -742,7 +742,7 @@ export const usersSearchUsers2Response = zod.object({
742
742
  .string()
743
743
  .optional()
744
744
  .describe(
745
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
745
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
746
746
  ),
747
747
  contact: zod
748
748
  .object({
@@ -885,7 +885,7 @@ export const usersDeleteUsersResponse = zod.object({
885
885
  .string()
886
886
  .optional()
887
887
  .describe(
888
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
888
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
889
889
  ),
890
890
  contact: zod
891
891
  .object({
@@ -1019,7 +1019,7 @@ export const usersReadUserResponse = zod.object({
1019
1019
  .string()
1020
1020
  .optional()
1021
1021
  .describe(
1022
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
1022
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
1023
1023
  ),
1024
1024
  contact: zod
1025
1025
  .object({
@@ -1156,7 +1156,7 @@ export const usersUpdateUser2Body = zod.object({
1156
1156
  .string()
1157
1157
  .optional()
1158
1158
  .describe(
1159
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
1159
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
1160
1160
  ),
1161
1161
  contact: zod
1162
1162
  .object({
@@ -1274,7 +1274,7 @@ export const usersUpdateUser2Response = zod
1274
1274
  .string()
1275
1275
  .optional()
1276
1276
  .describe(
1277
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
1277
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
1278
1278
  ),
1279
1279
  contact: zod
1280
1280
  .object({
@@ -1401,7 +1401,7 @@ export const usersUpdateUserBody = zod.object({
1401
1401
  .string()
1402
1402
  .optional()
1403
1403
  .describe(
1404
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
1404
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
1405
1405
  ),
1406
1406
  contact: zod
1407
1407
  .object({
@@ -1519,7 +1519,7 @@ export const usersUpdateUserResponse = zod
1519
1519
  .string()
1520
1520
  .optional()
1521
1521
  .describe(
1522
- 'The "chat_name" field is used to store the name displayed externally on the platform.\nFor example, "chat_name" is shown when an agent connects to chats with clients.',
1522
+ 'The \"chat_name\" field is used to store the name displayed externally on the platform.\nFor example, \"chat_name\" is shown when an agent connects to chats with clients.',
1523
1523
  ),
1524
1524
  contact: zod
1525
1525
  .object({
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WebitelContactsVariable,
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type { EngineListWebHook, EngineWebHook } from '.././_models';
12
12
 
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
9
+ import { delay, HttpResponse, http } from 'msw';
10
10
 
11
11
  import type {
12
12
  WfmCreateWorkingConditionResponse,
@@ -6,9 +6,7 @@
6
6
  */
7
7
  import { faker } from '@faker-js/faker';
8
8
 
9
- import { http, HttpResponse, delay } from 'msw';
10
-
11
- import { WfmWorkingScheduleState } from '.././_models';
9
+ import { delay, HttpResponse, http } from 'msw';
12
10
  import type {
13
11
  WfmCreateWorkingScheduleResponse,
14
12
  WfmDeleteWorkingScheduleResponse,
@@ -19,6 +17,7 @@ import type {
19
17
  WfmUpdateWorkingScheduleRemoveAgentResponse,
20
18
  WfmUpdateWorkingScheduleResponse,
21
19
  } from '.././_models';
20
+ import { WfmWorkingScheduleState } from '.././_models';
22
21
 
23
22
  export const getWorkingScheduleServiceSearchWorkingScheduleResponseMock = (
24
23
  overrideResponse: Partial<WfmSearchWorkingScheduleResponse> = {},
@@ -1,11 +1,13 @@
1
1
  import z from 'zod';
2
2
 
3
3
  /**
4
- * @description
5
- * only depth=1 fields will be returned
6
- * */
7
- export const getShallowFieldsToSendFromZodSchema = (schema: z.ZodTypeAny): string[] => {
8
- return schema.keyof().options;
4
+ * @description
5
+ * only depth=1 fields will be returned
6
+ * */
7
+ export const getShallowFieldsToSendFromZodSchema = (
8
+ schema: z.ZodTypeAny,
9
+ ): string[] => {
10
+ return schema.keyof().options;
9
11
  };
10
12
 
11
13
  /*
@@ -15,33 +17,33 @@ export const getShallowFieldsToSendFromZodSchema = (schema: z.ZodTypeAny): strin
15
17
 
16
18
  // get zod object keys recursively
17
19
  export const getFieldsToSendFromZodSchema = <T extends z.ZodTypeAny>(
18
- schema: T,
20
+ schema: T,
19
21
  ): string[] => {
20
- // make sure schema is not null or undefined
21
- if (schema === null || schema === undefined) return [];
22
- // check if schema is nullable or optional
23
- if (schema instanceof z.ZodNullable || schema instanceof z.ZodOptional)
24
- return getFieldsToSendFromZodSchema(schema.unwrap());
25
- // check if schema is an array
26
- if (schema instanceof z.ZodArray)
27
- return getFieldsToSendFromZodSchema(schema.element);
28
- // check if schema is an object
29
- if (schema instanceof z.ZodObject) {
30
- // get key/value pairs from schema
31
- const entries = Object.entries(schema.shape);
32
- // loop through key/value pairs
33
- return entries.flatMap(([key, value]) => {
34
- // get nested keys
35
- const nested =
36
- value instanceof z.ZodType
37
- ? getFieldsToSendFromZodSchema(value).map(
38
- (subKey) => `${key}.${subKey}`,
39
- )
40
- : [];
41
- // return nested keys
42
- return nested.length ? nested : key;
43
- });
44
- }
45
- // return empty array
46
- return [];
22
+ // make sure schema is not null or undefined
23
+ if (schema === null || schema === undefined) return [];
24
+ // check if schema is nullable or optional
25
+ if (schema instanceof z.ZodNullable || schema instanceof z.ZodOptional)
26
+ return getFieldsToSendFromZodSchema(schema.unwrap());
27
+ // check if schema is an array
28
+ if (schema instanceof z.ZodArray)
29
+ return getFieldsToSendFromZodSchema(schema.element);
30
+ // check if schema is an object
31
+ if (schema instanceof z.ZodObject) {
32
+ // get key/value pairs from schema
33
+ const entries = Object.entries(schema.shape);
34
+ // loop through key/value pairs
35
+ return entries.flatMap(([key, value]) => {
36
+ // get nested keys
37
+ const nested =
38
+ value instanceof z.ZodType
39
+ ? getFieldsToSendFromZodSchema(value).map(
40
+ (subKey) => `${key}.${subKey}`,
41
+ )
42
+ : [];
43
+ // return nested keys
44
+ return nested.length ? nested : key;
45
+ });
46
+ }
47
+ // return empty array
48
+ return [];
47
49
  };
@@ -7,10 +7,15 @@ export * from './gen';
7
7
  * @description
8
8
  * Get default value for schema. Could be anything: object with default fields values, or primitive.
9
9
  */
10
- export const getDefaultsFromZodSchema = (schema: z.ZodType, value?: unknown): unknown => {
11
- return schema
12
- /* zod validates passed value and throws err before returning defaults,
10
+ export const getDefaultsFromZodSchema = (
11
+ schema: z.ZodType,
12
+ value?: unknown,
13
+ ): unknown => {
14
+ return (
15
+ schema
16
+ /* zod validates passed value and throws err before returning defaults,
13
17
  so we should skip error throwing and return value instead */
14
- .catch(({ value: validatedValue }) => validatedValue)
15
- .parse(value);
16
- };
18
+ .catch(({ value: validatedValue }) => validatedValue)
19
+ .parse(value)
20
+ );
21
+ };