@djangocfg/api 2.1.10 → 2.1.14

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 (547) hide show
  1. package/README.md +424 -55
  2. package/dist/auth-server.cjs +47 -0
  3. package/dist/auth-server.cjs.map +1 -0
  4. package/dist/auth-server.d.cts +16 -0
  5. package/dist/auth-server.d.ts +16 -0
  6. package/dist/auth-server.mjs +27 -0
  7. package/dist/auth-server.mjs.map +1 -0
  8. package/dist/auth.cjs +6081 -0
  9. package/dist/auth.cjs.map +1 -0
  10. package/dist/auth.d.cts +525 -0
  11. package/dist/auth.d.ts +525 -0
  12. package/dist/auth.mjs +6063 -0
  13. package/dist/auth.mjs.map +1 -0
  14. package/dist/hooks.cjs +1 -0
  15. package/dist/hooks.cjs.map +1 -0
  16. package/dist/hooks.d.cts +2 -0
  17. package/dist/hooks.d.ts +2 -0
  18. package/dist/hooks.mjs +1 -0
  19. package/dist/hooks.mjs.map +1 -0
  20. package/dist/index.cjs +7253 -16058
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +7615 -16642
  23. package/dist/index.d.ts +7615 -16642
  24. package/dist/index.mjs +5819 -14624
  25. package/dist/index.mjs.map +1 -1
  26. package/package.json +21 -25
  27. package/src/auth/context/AccountsContext.tsx +245 -0
  28. package/src/auth/context/AuthContext.tsx +604 -0
  29. package/src/auth/context/index.ts +4 -0
  30. package/src/auth/context/types.ts +68 -0
  31. package/src/auth/hooks/index.ts +17 -0
  32. package/src/auth/hooks/useAuthForm.ts +332 -0
  33. package/src/auth/hooks/useAuthGuard.ts +25 -0
  34. package/src/auth/hooks/useAuthRedirect.ts +51 -0
  35. package/src/auth/hooks/useAutoAuth.ts +49 -0
  36. package/src/auth/hooks/useGithubAuth.ts +184 -0
  37. package/src/auth/hooks/useLocalStorage.ts +214 -0
  38. package/src/auth/hooks/useProfileCache.ts +146 -0
  39. package/src/auth/hooks/useSessionStorage.ts +189 -0
  40. package/src/auth/index.ts +34 -0
  41. package/src/auth/middlewares/index.ts +1 -0
  42. package/src/auth/middlewares/proxy.ts +32 -0
  43. package/src/auth/server.ts +19 -0
  44. package/src/auth/utils/analytics.ts +62 -0
  45. package/src/auth/utils/errors.ts +22 -0
  46. package/src/auth/utils/index.ts +10 -0
  47. package/src/auth/utils/logger.ts +28 -0
  48. package/src/auth/utils/validation.ts +7 -0
  49. package/src/{cfg/generated/_utils/fetchers/cfg__accounts.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__accounts.ts} +2 -2
  50. package/src/{cfg/generated/_utils/fetchers/cfg__accounts__auth.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__accounts__auth.ts} +1 -1
  51. package/src/{cfg/generated/_utils/fetchers/cfg__accounts__oauth.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__accounts__oauth.ts} +5 -5
  52. package/src/{cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__accounts__user_profile.ts} +6 -6
  53. package/src/{cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_admin_api.ts} +6 -6
  54. package/src/{cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_auth.ts} +1 -1
  55. package/src/{cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_monitoring.ts} +5 -5
  56. package/src/{cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_testing.ts} +3 -3
  57. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_activity.ts} +2 -2
  58. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_api_zones.ts} +2 -2
  59. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_charts.ts} +4 -4
  60. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_commands.ts} +4 -4
  61. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_config.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_config.ts} +1 -1
  62. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_overview.ts} +1 -1
  63. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_statistics.ts} +3 -3
  64. package/src/{cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_system.ts} +2 -2
  65. package/src/{cfg/generated/_utils/fetchers/cfg__endpoints.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__endpoints.ts} +3 -3
  66. package/src/{cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_api_keys.ts} +3 -3
  67. package/src/{cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_configuration.ts} +2 -2
  68. package/src/{cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_monitoring.ts} +5 -5
  69. package/src/{cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_services.ts} +3 -3
  70. package/src/{cfg/generated/_utils/fetchers/cfg__health.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__health.ts} +2 -2
  71. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_jobs.ts} +5 -5
  72. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_monitoring.ts} +3 -3
  73. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_queues.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_queues.ts} +4 -4
  74. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_registries.ts} +7 -7
  75. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_schedules.ts} +4 -4
  76. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_testing.ts} +6 -6
  77. package/src/{cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts → generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_workers.ts} +2 -2
  78. package/src/generated/cfg_accounts/_utils/fetchers/index.ts +56 -0
  79. package/src/{cfg/generated/_utils/hooks/cfg__accounts.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__accounts.ts} +1 -1
  80. package/src/{cfg/generated/_utils/hooks/cfg__accounts__auth.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__accounts__auth.ts} +1 -1
  81. package/src/{cfg/generated/_utils/hooks/cfg__accounts__oauth.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__accounts__oauth.ts} +1 -1
  82. package/src/{cfg/generated/_utils/hooks/cfg__accounts__user_profile.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__accounts__user_profile.ts} +1 -1
  83. package/src/{cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_admin_api.ts} +1 -1
  84. package/src/{cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_auth.ts} +1 -1
  85. package/src/{cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_monitoring.ts} +1 -1
  86. package/src/{cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_testing.ts} +1 -1
  87. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_activity.ts} +1 -1
  88. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_api_zones.ts} +1 -1
  89. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_charts.ts} +1 -1
  90. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_commands.ts} +1 -1
  91. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_config.ts} +1 -1
  92. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_overview.ts} +1 -1
  93. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_statistics.ts} +1 -1
  94. package/src/{cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_system.ts} +1 -1
  95. package/src/{cfg/generated/_utils/hooks/cfg__endpoints.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__endpoints.ts} +1 -1
  96. package/src/{cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_api_keys.ts} +1 -1
  97. package/src/{cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_configuration.ts} +1 -1
  98. package/src/{cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_monitoring.ts} +1 -1
  99. package/src/{cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_services.ts} +1 -1
  100. package/src/{cfg/generated/_utils/hooks/cfg__health.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__health.ts} +1 -1
  101. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_jobs.ts} +1 -1
  102. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_monitoring.ts} +1 -1
  103. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_queues.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_queues.ts} +1 -1
  104. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_registries.ts} +1 -1
  105. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_schedules.ts} +1 -1
  106. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_testing.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_testing.ts} +1 -1
  107. package/src/{cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts → generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_workers.ts} +1 -1
  108. package/src/generated/cfg_accounts/_utils/hooks/index.ts +56 -0
  109. package/src/generated/cfg_accounts/_utils/schemas/CentrifugoConfig.schema.ts +35 -0
  110. package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DjangoConfig.schema.ts +5 -8
  111. package/src/generated/cfg_accounts/_utils/schemas/GRPCConfigDashboard.schema.ts +33 -0
  112. package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/index.ts +0 -102
  113. package/src/{cfg/generated/cfg__accounts → generated/cfg_accounts/cfg_accounts__accounts}/client.ts +1 -1
  114. package/src/{cfg/generated/cfg__accounts__auth → generated/cfg_accounts/cfg_accounts__accounts__auth}/client.ts +1 -1
  115. package/src/{cfg/generated/cfg__accounts__oauth → generated/cfg_accounts/cfg_accounts__accounts__oauth}/client.ts +1 -1
  116. package/src/{cfg/generated/cfg__accounts__user_profile → generated/cfg_accounts/cfg_accounts__accounts__user_profile}/client.ts +1 -1
  117. package/src/{cfg/generated/cfg__centrifugo__centrifugo_admin_api → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api}/client.ts +1 -1
  118. package/src/{cfg/generated/cfg__centrifugo__centrifugo_auth → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth}/client.ts +1 -1
  119. package/src/{cfg/generated/cfg__centrifugo__centrifugo_monitoring → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring}/client.ts +1 -1
  120. package/src/{cfg/generated/cfg__centrifugo__centrifugo_testing → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing}/client.ts +1 -1
  121. package/src/{cfg/generated/cfg__dashboard__dashboard_activity → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity}/client.ts +1 -1
  122. package/src/{cfg/generated/cfg__dashboard__dashboard_api_zones → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones}/client.ts +1 -1
  123. package/src/{cfg/generated/cfg__dashboard__dashboard_charts → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts}/client.ts +1 -1
  124. package/src/{cfg/generated/cfg__dashboard__dashboard_commands → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands}/client.ts +1 -1
  125. package/src/{cfg/generated/cfg__dashboard__dashboard_config → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config}/client.ts +1 -1
  126. package/src/{cfg/generated/cfg__dashboard__dashboard_config → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config}/models.ts +33 -16
  127. package/src/{cfg/generated/cfg__dashboard__dashboard_overview → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview}/client.ts +1 -1
  128. package/src/{cfg/generated/cfg__dashboard__dashboard_statistics → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics}/client.ts +1 -1
  129. package/src/{cfg/generated/cfg__dashboard__dashboard_system → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system}/client.ts +1 -1
  130. package/src/{cfg/generated/cfg__endpoints → generated/cfg_accounts/cfg_accounts__endpoints}/client.ts +1 -1
  131. package/src/{cfg/generated/cfg__grpc__grpc_api_keys → generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys}/client.ts +1 -1
  132. package/src/{cfg/generated/cfg__grpc__grpc_configuration → generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration}/client.ts +1 -1
  133. package/src/{cfg/generated/cfg__grpc__grpc_monitoring → generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring}/client.ts +1 -1
  134. package/src/{cfg/generated/cfg__grpc__grpc_services → generated/cfg_accounts/cfg_accounts__grpc__grpc_services}/client.ts +1 -1
  135. package/src/{cfg/generated/cfg__health → generated/cfg_accounts/cfg_accounts__health}/client.ts +1 -1
  136. package/src/{cfg/generated/cfg__rq__rq_jobs → generated/cfg_accounts/cfg_accounts__rq__rq_jobs}/client.ts +1 -1
  137. package/src/{cfg/generated/cfg__rq__rq_monitoring → generated/cfg_accounts/cfg_accounts__rq__rq_monitoring}/client.ts +1 -1
  138. package/src/{cfg/generated/cfg__rq__rq_queues → generated/cfg_accounts/cfg_accounts__rq__rq_queues}/client.ts +1 -1
  139. package/src/{cfg/generated/cfg__rq__rq_registries → generated/cfg_accounts/cfg_accounts__rq__rq_registries}/client.ts +1 -1
  140. package/src/{cfg/generated/cfg__rq__rq_schedules → generated/cfg_accounts/cfg_accounts__rq__rq_schedules}/client.ts +1 -1
  141. package/src/{cfg/generated/cfg__rq__rq_testing → generated/cfg_accounts/cfg_accounts__rq__rq_testing}/client.ts +1 -1
  142. package/src/{cfg/generated/cfg__rq__rq_workers → generated/cfg_accounts/cfg_accounts__rq__rq_workers}/client.ts +1 -1
  143. package/src/{cfg/generated → generated/cfg_accounts}/client.ts +87 -126
  144. package/src/generated/cfg_accounts/enums.ts +132 -0
  145. package/src/generated/cfg_accounts/index.ts +469 -0
  146. package/src/{cfg/generated → generated/cfg_accounts}/schema.json +3793 -14481
  147. package/src/hooks/index.ts +0 -0
  148. package/src/index.ts +52 -30
  149. package/src/server.ts +9 -18
  150. package/dist/server-Drl03IjJ.d.cts +0 -17993
  151. package/dist/server-Drl03IjJ.d.ts +0 -17993
  152. package/dist/server.cjs +0 -13808
  153. package/dist/server.cjs.map +0 -1
  154. package/dist/server.d.cts +0 -16786
  155. package/dist/server.d.ts +0 -16786
  156. package/dist/server.mjs +0 -13797
  157. package/dist/server.mjs.map +0 -1
  158. package/src/cfg/BaseClient.ts +0 -57
  159. package/src/cfg/generated/_utils/fetchers/cfg__db.ts +0 -494
  160. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +0 -2983
  161. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +0 -337
  162. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +0 -93
  163. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +0 -210
  164. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +0 -93
  165. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +0 -338
  166. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +0 -92
  167. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +0 -150
  168. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +0 -210
  169. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +0 -93
  170. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +0 -408
  171. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +0 -642
  172. package/src/cfg/generated/_utils/fetchers/index.ts +0 -69
  173. package/src/cfg/generated/_utils/hooks/cfg__db.ts +0 -151
  174. package/src/cfg/generated/_utils/hooks/cfg__knowbase.ts +0 -999
  175. package/src/cfg/generated/_utils/hooks/cfg__leads.ts +0 -129
  176. package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -42
  177. package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -81
  178. package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -42
  179. package/src/cfg/generated/_utils/hooks/cfg__newsletter__campaigns.ts +0 -130
  180. package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -37
  181. package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -52
  182. package/src/cfg/generated/_utils/hooks/cfg__newsletter__subscriptions.ts +0 -78
  183. package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -42
  184. package/src/cfg/generated/_utils/hooks/cfg__payments.ts +0 -147
  185. package/src/cfg/generated/_utils/hooks/cfg__support.ts +0 -237
  186. package/src/cfg/generated/_utils/hooks/index.ts +0 -69
  187. package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +0 -33
  188. package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +0 -29
  189. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +0 -30
  190. package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +0 -22
  191. package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +0 -35
  192. package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +0 -22
  193. package/src/cfg/generated/_utils/schemas/ArchiveProcessingResult.schema.ts +0 -26
  194. package/src/cfg/generated/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +0 -25
  195. package/src/cfg/generated/_utils/schemas/ArchiveSearchResult.schema.ts +0 -24
  196. package/src/cfg/generated/_utils/schemas/ArchiveStatistics.schema.ts +0 -28
  197. package/src/cfg/generated/_utils/schemas/BackupRecord.schema.ts +0 -43
  198. package/src/cfg/generated/_utils/schemas/BackupRecordList.schema.ts +0 -28
  199. package/src/cfg/generated/_utils/schemas/Balance.schema.ts +0 -23
  200. package/src/cfg/generated/_utils/schemas/BulkEmailRequest.schema.ts +0 -26
  201. package/src/cfg/generated/_utils/schemas/BulkEmailResponse.schema.ts +0 -23
  202. package/src/cfg/generated/_utils/schemas/CentrifugoConfig.schema.ts +0 -23
  203. package/src/cfg/generated/_utils/schemas/ChatHistory.schema.ts +0 -22
  204. package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +0 -27
  205. package/src/cfg/generated/_utils/schemas/ChatQueryRequest.schema.ts +0 -22
  206. package/src/cfg/generated/_utils/schemas/ChatResponse.schema.ts +0 -26
  207. package/src/cfg/generated/_utils/schemas/ChatResponseRequest.schema.ts +0 -26
  208. package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +0 -29
  209. package/src/cfg/generated/_utils/schemas/ChatSessionCreateRequest.schema.ts +0 -22
  210. package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +0 -25
  211. package/src/cfg/generated/_utils/schemas/ChatSource.schema.ts +0 -21
  212. package/src/cfg/generated/_utils/schemas/ChatSourceRequest.schema.ts +0 -21
  213. package/src/cfg/generated/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +0 -20
  214. package/src/cfg/generated/_utils/schemas/Currency.schema.ts +0 -28
  215. package/src/cfg/generated/_utils/schemas/Document.schema.ts +0 -32
  216. package/src/cfg/generated/_utils/schemas/DocumentArchive.schema.ts +0 -44
  217. package/src/cfg/generated/_utils/schemas/DocumentArchiveDetail.schema.ts +0 -48
  218. package/src/cfg/generated/_utils/schemas/DocumentArchiveList.schema.ts +0 -35
  219. package/src/cfg/generated/_utils/schemas/DocumentArchiveRequest.schema.ts +0 -21
  220. package/src/cfg/generated/_utils/schemas/DocumentCategory.schema.ts +0 -23
  221. package/src/cfg/generated/_utils/schemas/DocumentCategoryRequest.schema.ts +0 -21
  222. package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +0 -22
  223. package/src/cfg/generated/_utils/schemas/DocumentProcessingStatus.schema.ts +0 -23
  224. package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +0 -22
  225. package/src/cfg/generated/_utils/schemas/DocumentStats.schema.ts +0 -25
  226. package/src/cfg/generated/_utils/schemas/EmailLog.schema.ts +0 -31
  227. package/src/cfg/generated/_utils/schemas/ErrorResponse.schema.ts +0 -20
  228. package/src/cfg/generated/_utils/schemas/GRPCConfigDashboard.schema.ts +0 -25
  229. package/src/cfg/generated/_utils/schemas/LeadSubmission.schema.ts +0 -29
  230. package/src/cfg/generated/_utils/schemas/LeadSubmissionError.schema.ts +0 -21
  231. package/src/cfg/generated/_utils/schemas/LeadSubmissionRequest.schema.ts +0 -29
  232. package/src/cfg/generated/_utils/schemas/LeadSubmissionResponse.schema.ts +0 -21
  233. package/src/cfg/generated/_utils/schemas/Message.schema.ts +0 -21
  234. package/src/cfg/generated/_utils/schemas/MessageCreate.schema.ts +0 -15
  235. package/src/cfg/generated/_utils/schemas/MessageCreateRequest.schema.ts +0 -15
  236. package/src/cfg/generated/_utils/schemas/MessageRequest.schema.ts +0 -15
  237. package/src/cfg/generated/_utils/schemas/Newsletter.schema.ts +0 -26
  238. package/src/cfg/generated/_utils/schemas/NewsletterCampaign.schema.ts +0 -33
  239. package/src/cfg/generated/_utils/schemas/NewsletterCampaignRequest.schema.ts +0 -26
  240. package/src/cfg/generated/_utils/schemas/NewsletterSubscription.schema.ts +0 -27
  241. package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +0 -24
  242. package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemList.schema.ts +0 -24
  243. package/src/cfg/generated/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +0 -24
  244. package/src/cfg/generated/_utils/schemas/PaginatedBackupRecordListList.schema.ts +0 -24
  245. package/src/cfg/generated/_utils/schemas/PaginatedChatResponseList.schema.ts +0 -24
  246. package/src/cfg/generated/_utils/schemas/PaginatedChatSessionList.schema.ts +0 -24
  247. package/src/cfg/generated/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +0 -24
  248. package/src/cfg/generated/_utils/schemas/PaginatedDocumentList.schema.ts +0 -24
  249. package/src/cfg/generated/_utils/schemas/PaginatedEmailLogList.schema.ts +0 -24
  250. package/src/cfg/generated/_utils/schemas/PaginatedLeadSubmissionList.schema.ts +0 -24
  251. package/src/cfg/generated/_utils/schemas/PaginatedMessageList.schema.ts +0 -24
  252. package/src/cfg/generated/_utils/schemas/PaginatedNewsletterCampaignList.schema.ts +0 -24
  253. package/src/cfg/generated/_utils/schemas/PaginatedNewsletterList.schema.ts +0 -24
  254. package/src/cfg/generated/_utils/schemas/PaginatedNewsletterSubscriptionList.schema.ts +0 -24
  255. package/src/cfg/generated/_utils/schemas/PaginatedPaymentListList.schema.ts +0 -24
  256. package/src/cfg/generated/_utils/schemas/PaginatedPublicCategoryList.schema.ts +0 -24
  257. package/src/cfg/generated/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +0 -24
  258. package/src/cfg/generated/_utils/schemas/PaginatedRestoreRecordList.schema.ts +0 -24
  259. package/src/cfg/generated/_utils/schemas/PaginatedTicketList.schema.ts +0 -24
  260. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +0 -22
  261. package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +0 -22
  262. package/src/cfg/generated/_utils/schemas/PatchedChatResponseRequest.schema.ts +0 -26
  263. package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +0 -25
  264. package/src/cfg/generated/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +0 -21
  265. package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +0 -22
  266. package/src/cfg/generated/_utils/schemas/PatchedLeadSubmissionRequest.schema.ts +0 -29
  267. package/src/cfg/generated/_utils/schemas/PatchedMessageRequest.schema.ts +0 -15
  268. package/src/cfg/generated/_utils/schemas/PatchedNewsletterCampaignRequest.schema.ts +0 -26
  269. package/src/cfg/generated/_utils/schemas/PatchedTicketRequest.schema.ts +0 -18
  270. package/src/cfg/generated/_utils/schemas/PatchedUnsubscribeRequest.schema.ts +0 -19
  271. package/src/cfg/generated/_utils/schemas/PaymentDetail.schema.ts +0 -44
  272. package/src/cfg/generated/_utils/schemas/PaymentList.schema.ts +0 -28
  273. package/src/cfg/generated/_utils/schemas/PublicCategory.schema.ts +0 -21
  274. package/src/cfg/generated/_utils/schemas/PublicDocument.schema.ts +0 -25
  275. package/src/cfg/generated/_utils/schemas/PublicDocumentList.schema.ts +0 -24
  276. package/src/cfg/generated/_utils/schemas/RestoreRecord.schema.ts +0 -30
  277. package/src/cfg/generated/_utils/schemas/SendCampaignRequest.schema.ts +0 -19
  278. package/src/cfg/generated/_utils/schemas/SendCampaignResponse.schema.ts +0 -22
  279. package/src/cfg/generated/_utils/schemas/Sender.schema.ts +0 -21
  280. package/src/cfg/generated/_utils/schemas/SubscribeRequest.schema.ts +0 -20
  281. package/src/cfg/generated/_utils/schemas/SubscribeResponse.schema.ts +0 -21
  282. package/src/cfg/generated/_utils/schemas/SuccessResponse.schema.ts +0 -20
  283. package/src/cfg/generated/_utils/schemas/TestEmailRequest.schema.ts +0 -21
  284. package/src/cfg/generated/_utils/schemas/Ticket.schema.ts +0 -21
  285. package/src/cfg/generated/_utils/schemas/TicketRequest.schema.ts +0 -18
  286. package/src/cfg/generated/_utils/schemas/Transaction.schema.ts +0 -28
  287. package/src/cfg/generated/_utils/schemas/Unsubscribe.schema.ts +0 -19
  288. package/src/cfg/generated/_utils/schemas/UnsubscribeRequest.schema.ts +0 -19
  289. package/src/cfg/generated/_utils/schemas/VectorizationResult.schema.ts +0 -24
  290. package/src/cfg/generated/_utils/schemas/VectorizationStatistics.schema.ts +0 -26
  291. package/src/cfg/generated/cfg__db/client.ts +0 -117
  292. package/src/cfg/generated/cfg__db/models.ts +0 -181
  293. package/src/cfg/generated/cfg__knowbase/client.ts +0 -666
  294. package/src/cfg/generated/cfg__knowbase/models.ts +0 -1120
  295. package/src/cfg/generated/cfg__leads/client.ts +0 -85
  296. package/src/cfg/generated/cfg__leads/models.ts +0 -99
  297. package/src/cfg/generated/cfg__leads__lead_submission/client.ts +0 -25
  298. package/src/cfg/generated/cfg__leads__lead_submission/models.ts +0 -48
  299. package/src/cfg/generated/cfg__newsletter/client.ts +0 -38
  300. package/src/cfg/generated/cfg__newsletter/models.ts +0 -71
  301. package/src/cfg/generated/cfg__newsletter__bulk_email/client.ts +0 -24
  302. package/src/cfg/generated/cfg__newsletter__bulk_email/models.ts +0 -29
  303. package/src/cfg/generated/cfg__newsletter__campaigns/client.ts +0 -85
  304. package/src/cfg/generated/cfg__newsletter__campaigns/models.ts +0 -100
  305. package/src/cfg/generated/cfg__newsletter__logs/client.ts +0 -35
  306. package/src/cfg/generated/cfg__newsletter__logs/index.ts +0 -2
  307. package/src/cfg/generated/cfg__newsletter__logs/models.ts +0 -51
  308. package/src/cfg/generated/cfg__newsletter__newsletters/client.ts +0 -45
  309. package/src/cfg/generated/cfg__newsletter__newsletters/index.ts +0 -2
  310. package/src/cfg/generated/cfg__newsletter__newsletters/models.ts +0 -42
  311. package/src/cfg/generated/cfg__newsletter__subscriptions/client.ts +0 -55
  312. package/src/cfg/generated/cfg__newsletter__subscriptions/index.ts +0 -2
  313. package/src/cfg/generated/cfg__newsletter__subscriptions/models.ts +0 -92
  314. package/src/cfg/generated/cfg__newsletter__testing/client.ts +0 -24
  315. package/src/cfg/generated/cfg__newsletter__testing/index.ts +0 -2
  316. package/src/cfg/generated/cfg__newsletter__testing/models.ts +0 -24
  317. package/src/cfg/generated/cfg__payments/client.ts +0 -118
  318. package/src/cfg/generated/cfg__payments/index.ts +0 -2
  319. package/src/cfg/generated/cfg__payments/models.ts +0 -135
  320. package/src/cfg/generated/cfg__rq__rq_jobs/index.ts +0 -2
  321. package/src/cfg/generated/cfg__rq__rq_monitoring/index.ts +0 -2
  322. package/src/cfg/generated/cfg__rq__rq_queues/index.ts +0 -2
  323. package/src/cfg/generated/cfg__rq__rq_registries/index.ts +0 -2
  324. package/src/cfg/generated/cfg__rq__rq_schedules/index.ts +0 -2
  325. package/src/cfg/generated/cfg__rq__rq_testing/index.ts +0 -2
  326. package/src/cfg/generated/cfg__rq__rq_workers/index.ts +0 -2
  327. package/src/cfg/generated/cfg__support/client.ts +0 -151
  328. package/src/cfg/generated/cfg__support/index.ts +0 -2
  329. package/src/cfg/generated/cfg__support/models.ts +0 -165
  330. package/src/cfg/generated/enums.ts +0 -634
  331. package/src/cfg/generated/index.ts +0 -561
  332. package/src/cfg/generated/package.json +0 -39
  333. package/src/cfg/generated/tsconfig.json +0 -20
  334. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/APIZone.schema.ts +0 -0
  335. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/APIZonesSummary.schema.ts +0 -0
  336. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ActivityEntry.schema.ts +0 -0
  337. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ActivityTrackerDay.schema.ts +0 -0
  338. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ApiKey.schema.ts +0 -0
  339. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ApiKeyStats.schema.ts +0 -0
  340. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/AppStatistics.schema.ts +0 -0
  341. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/AppStatisticsData.schema.ts +0 -0
  342. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/AxesConfig.schema.ts +0 -0
  343. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -0
  344. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -0
  345. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -0
  346. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -0
  347. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -0
  348. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoError.schema.ts +0 -0
  349. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -0
  350. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -0
  351. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -0
  352. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -0
  353. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -0
  354. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -0
  355. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoMetrics.schema.ts +0 -0
  356. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -0
  357. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -0
  358. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -0
  359. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -0
  360. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -0
  361. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -0
  362. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -0
  363. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -0
  364. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoProcess.schema.ts +0 -0
  365. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoPublication.schema.ts +0 -0
  366. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -0
  367. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CentrifugoToken.schema.ts +0 -0
  368. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ChannelList.schema.ts +0 -0
  369. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ChannelStats.schema.ts +0 -0
  370. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ChartData.schema.ts +0 -0
  371. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ChartDataset.schema.ts +0 -0
  372. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/Command.schema.ts +0 -0
  373. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CommandCategory.schema.ts +0 -0
  374. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CommandExecuteRequestRequest.schema.ts +0 -0
  375. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CommandHelpResponse.schema.ts +0 -0
  376. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/CommandsSummary.schema.ts +0 -0
  377. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ConfigData.schema.ts +0 -0
  378. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ConfigMeta.schema.ts +0 -0
  379. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ConfigValidation.schema.ts +0 -0
  380. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -0
  381. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ConstanceConfig.schema.ts +0 -0
  382. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DRFConfig.schema.ts +0 -0
  383. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DRFHealthCheck.schema.ts +0 -0
  384. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DashboardOverview.schema.ts +0 -0
  385. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DatabaseConfig.schema.ts +0 -0
  386. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/DjangoRQConfig.schema.ts +0 -0
  387. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/EmailConfig.schema.ts +0 -0
  388. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/Endpoint.schema.ts +0 -0
  389. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/EndpointsStatus.schema.ts +0 -0
  390. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCConfig.schema.ts +0 -0
  391. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCFeatures.schema.ts +0 -0
  392. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCFrameworkConfig.schema.ts +0 -0
  393. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCHealthCheck.schema.ts +0 -0
  394. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCInterceptorInfo.schema.ts +0 -0
  395. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCOverviewStats.schema.ts +0 -0
  396. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCRegisteredService.schema.ts +0 -0
  397. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCServerConfig.schema.ts +0 -0
  398. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCServerInfo.schema.ts +0 -0
  399. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCServerStatus.schema.ts +0 -0
  400. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCServiceInfo.schema.ts +0 -0
  401. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCServiceRegistryMethodStats.schema.ts +0 -0
  402. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GRPCStats.schema.ts +0 -0
  403. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/GitHubOAuthConfig.schema.ts +0 -0
  404. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/JWTConfig.schema.ts +0 -0
  405. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/JobActionResponse.schema.ts +0 -0
  406. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/JobDetail.schema.ts +0 -0
  407. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/JobList.schema.ts +0 -0
  408. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/JobListRequest.schema.ts +0 -0
  409. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -0
  410. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ManualAckResponse.schema.ts +0 -0
  411. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/MethodInfo.schema.ts +0 -0
  412. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/MethodList.schema.ts +0 -0
  413. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/MethodSummary.schema.ts +0 -0
  414. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ModelStatistics.schema.ts +0 -0
  415. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/NextJSAdminConfig.schema.ts +0 -0
  416. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/NgrokConfig.schema.ts +0 -0
  417. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +0 -0
  418. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthAuthorizeResponse.schema.ts +0 -0
  419. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +0 -0
  420. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthConnection.schema.ts +0 -0
  421. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts +0 -0
  422. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthError.schema.ts +0 -0
  423. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthProvidersResponse.schema.ts +0 -0
  424. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OAuthTokenResponse.schema.ts +0 -0
  425. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OTPErrorResponse.schema.ts +0 -0
  426. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OTPRequestRequest.schema.ts +0 -0
  427. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OTPRequestResponse.schema.ts +0 -0
  428. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OTPVerifyRequest.schema.ts +0 -0
  429. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OTPVerifyResponse.schema.ts +0 -0
  430. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/OpenAPIClientConfig.schema.ts +0 -0
  431. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedApiKeyList.schema.ts +0 -0
  432. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedJobListList.schema.ts +0 -0
  433. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedPublishList.schema.ts +0 -0
  434. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedRecentRequestList.schema.ts +0 -0
  435. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedScheduledJobList.schema.ts +0 -0
  436. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaginatedServiceSummaryList.schema.ts +0 -0
  437. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +0 -0
  438. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaymentsConfig.schema.ts +0 -0
  439. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PaymentsNowPayments.schema.ts +0 -0
  440. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/Publish.schema.ts +0 -0
  441. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -0
  442. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/PublishTestResponse.schema.ts +0 -0
  443. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/QueueDetail.schema.ts +0 -0
  444. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/QueueStats.schema.ts +0 -0
  445. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/QuickAction.schema.ts +0 -0
  446. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/QuickHealth.schema.ts +0 -0
  447. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RQConfig.schema.ts +0 -0
  448. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RQHealthCheck.schema.ts +0 -0
  449. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RQSchedule.schema.ts +0 -0
  450. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RecentError.schema.ts +0 -0
  451. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RecentRequest.schema.ts +0 -0
  452. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RecentUser.schema.ts +0 -0
  453. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RedisQueueConfig.schema.ts +0 -0
  454. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/RunDemoRequestRequest.schema.ts +0 -0
  455. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ScheduleActionResponse.schema.ts +0 -0
  456. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ScheduleCreateRequest.schema.ts +0 -0
  457. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ScheduleInfo.schema.ts +0 -0
  458. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ScheduledJob.schema.ts +0 -0
  459. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ServiceDetail.schema.ts +0 -0
  460. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ServiceMethods.schema.ts +0 -0
  461. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ServiceStats.schema.ts +0 -0
  462. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ServiceSummary.schema.ts +0 -0
  463. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/SpectacularConfig.schema.ts +0 -0
  464. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/StatCard.schema.ts +0 -0
  465. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/StressTestRequestRequest.schema.ts +0 -0
  466. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/SystemHealth.schema.ts +0 -0
  467. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/SystemHealthItem.schema.ts +0 -0
  468. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/SystemMetrics.schema.ts +0 -0
  469. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TelegramConfig.schema.ts +0 -0
  470. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TestScenario.schema.ts +0 -0
  471. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TestingActionResponse.schema.ts +0 -0
  472. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TimelineItem.schema.ts +0 -0
  473. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TimelineResponse.schema.ts +0 -0
  474. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TokenRefresh.schema.ts +0 -0
  475. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/TokenRefreshRequest.schema.ts +0 -0
  476. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/URLPattern.schema.ts +0 -0
  477. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/URLsList.schema.ts +0 -0
  478. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/User.schema.ts +0 -0
  479. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/UserProfileUpdateRequest.schema.ts +0 -0
  480. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/UserStatistics.schema.ts +0 -0
  481. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/Worker.schema.ts +0 -0
  482. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/WorkerStats.schema.ts +0 -0
  483. /package/src/{cfg/generated → generated/cfg_accounts}/_utils/schemas/ZonesSummaryStats.schema.ts +0 -0
  484. /package/src/{cfg/generated → generated/cfg_accounts}/api-instance.ts +0 -0
  485. /package/src/{cfg/generated/cfg__accounts → generated/cfg_accounts/cfg_accounts__accounts}/index.ts +0 -0
  486. /package/src/{cfg/generated/cfg__accounts → generated/cfg_accounts/cfg_accounts__accounts}/models.ts +0 -0
  487. /package/src/{cfg/generated/cfg__accounts__auth → generated/cfg_accounts/cfg_accounts__accounts__auth}/index.ts +0 -0
  488. /package/src/{cfg/generated/cfg__accounts__auth → generated/cfg_accounts/cfg_accounts__accounts__auth}/models.ts +0 -0
  489. /package/src/{cfg/generated/cfg__accounts__oauth → generated/cfg_accounts/cfg_accounts__accounts__oauth}/index.ts +0 -0
  490. /package/src/{cfg/generated/cfg__accounts__oauth → generated/cfg_accounts/cfg_accounts__accounts__oauth}/models.ts +0 -0
  491. /package/src/{cfg/generated/cfg__accounts__user_profile → generated/cfg_accounts/cfg_accounts__accounts__user_profile}/index.ts +0 -0
  492. /package/src/{cfg/generated/cfg__accounts__user_profile → generated/cfg_accounts/cfg_accounts__accounts__user_profile}/models.ts +0 -0
  493. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_admin_api → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api}/index.ts +0 -0
  494. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_admin_api → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api}/models.ts +0 -0
  495. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_auth → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth}/index.ts +0 -0
  496. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_auth → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth}/models.ts +0 -0
  497. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_monitoring → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring}/index.ts +0 -0
  498. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_monitoring → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring}/models.ts +0 -0
  499. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_testing → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing}/index.ts +0 -0
  500. /package/src/{cfg/generated/cfg__centrifugo__centrifugo_testing → generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing}/models.ts +0 -0
  501. /package/src/{cfg/generated/cfg__dashboard__dashboard_activity → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity}/index.ts +0 -0
  502. /package/src/{cfg/generated/cfg__dashboard__dashboard_activity → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity}/models.ts +0 -0
  503. /package/src/{cfg/generated/cfg__dashboard__dashboard_api_zones → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones}/index.ts +0 -0
  504. /package/src/{cfg/generated/cfg__dashboard__dashboard_api_zones → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones}/models.ts +0 -0
  505. /package/src/{cfg/generated/cfg__dashboard__dashboard_charts → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts}/index.ts +0 -0
  506. /package/src/{cfg/generated/cfg__dashboard__dashboard_charts → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts}/models.ts +0 -0
  507. /package/src/{cfg/generated/cfg__dashboard__dashboard_commands → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands}/index.ts +0 -0
  508. /package/src/{cfg/generated/cfg__dashboard__dashboard_commands → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands}/models.ts +0 -0
  509. /package/src/{cfg/generated/cfg__dashboard__dashboard_config → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config}/index.ts +0 -0
  510. /package/src/{cfg/generated/cfg__dashboard__dashboard_overview → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview}/index.ts +0 -0
  511. /package/src/{cfg/generated/cfg__dashboard__dashboard_overview → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview}/models.ts +0 -0
  512. /package/src/{cfg/generated/cfg__dashboard__dashboard_statistics → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics}/index.ts +0 -0
  513. /package/src/{cfg/generated/cfg__dashboard__dashboard_statistics → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics}/models.ts +0 -0
  514. /package/src/{cfg/generated/cfg__dashboard__dashboard_system → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system}/index.ts +0 -0
  515. /package/src/{cfg/generated/cfg__dashboard__dashboard_system → generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system}/models.ts +0 -0
  516. /package/src/{cfg/generated/cfg__db → generated/cfg_accounts/cfg_accounts__endpoints}/index.ts +0 -0
  517. /package/src/{cfg/generated/cfg__endpoints → generated/cfg_accounts/cfg_accounts__endpoints}/models.ts +0 -0
  518. /package/src/{cfg/generated/cfg__endpoints → generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys}/index.ts +0 -0
  519. /package/src/{cfg/generated/cfg__grpc__grpc_api_keys → generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys}/models.ts +0 -0
  520. /package/src/{cfg/generated/cfg__grpc__grpc_api_keys → generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration}/index.ts +0 -0
  521. /package/src/{cfg/generated/cfg__grpc__grpc_configuration → generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration}/models.ts +0 -0
  522. /package/src/{cfg/generated/cfg__grpc__grpc_configuration → generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring}/index.ts +0 -0
  523. /package/src/{cfg/generated/cfg__grpc__grpc_monitoring → generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring}/models.ts +0 -0
  524. /package/src/{cfg/generated/cfg__grpc__grpc_monitoring → generated/cfg_accounts/cfg_accounts__grpc__grpc_services}/index.ts +0 -0
  525. /package/src/{cfg/generated/cfg__grpc__grpc_services → generated/cfg_accounts/cfg_accounts__grpc__grpc_services}/models.ts +0 -0
  526. /package/src/{cfg/generated/cfg__grpc__grpc_services → generated/cfg_accounts/cfg_accounts__health}/index.ts +0 -0
  527. /package/src/{cfg/generated/cfg__health → generated/cfg_accounts/cfg_accounts__health}/models.ts +0 -0
  528. /package/src/{cfg/generated/cfg__health → generated/cfg_accounts/cfg_accounts__rq__rq_jobs}/index.ts +0 -0
  529. /package/src/{cfg/generated/cfg__rq__rq_jobs → generated/cfg_accounts/cfg_accounts__rq__rq_jobs}/models.ts +0 -0
  530. /package/src/{cfg/generated/cfg__knowbase → generated/cfg_accounts/cfg_accounts__rq__rq_monitoring}/index.ts +0 -0
  531. /package/src/{cfg/generated/cfg__rq__rq_monitoring → generated/cfg_accounts/cfg_accounts__rq__rq_monitoring}/models.ts +0 -0
  532. /package/src/{cfg/generated/cfg__leads → generated/cfg_accounts/cfg_accounts__rq__rq_queues}/index.ts +0 -0
  533. /package/src/{cfg/generated/cfg__rq__rq_queues → generated/cfg_accounts/cfg_accounts__rq__rq_queues}/models.ts +0 -0
  534. /package/src/{cfg/generated/cfg__leads__lead_submission → generated/cfg_accounts/cfg_accounts__rq__rq_registries}/index.ts +0 -0
  535. /package/src/{cfg/generated/cfg__rq__rq_registries → generated/cfg_accounts/cfg_accounts__rq__rq_registries}/models.ts +0 -0
  536. /package/src/{cfg/generated/cfg__newsletter → generated/cfg_accounts/cfg_accounts__rq__rq_schedules}/index.ts +0 -0
  537. /package/src/{cfg/generated/cfg__rq__rq_schedules → generated/cfg_accounts/cfg_accounts__rq__rq_schedules}/models.ts +0 -0
  538. /package/src/{cfg/generated/cfg__newsletter__bulk_email → generated/cfg_accounts/cfg_accounts__rq__rq_testing}/index.ts +0 -0
  539. /package/src/{cfg/generated/cfg__rq__rq_testing → generated/cfg_accounts/cfg_accounts__rq__rq_testing}/models.ts +0 -0
  540. /package/src/{cfg/generated/cfg__newsletter__campaigns → generated/cfg_accounts/cfg_accounts__rq__rq_workers}/index.ts +0 -0
  541. /package/src/{cfg/generated/cfg__rq__rq_workers → generated/cfg_accounts/cfg_accounts__rq__rq_workers}/models.ts +0 -0
  542. /package/src/{cfg/generated → generated/cfg_accounts}/errors.ts +0 -0
  543. /package/src/{cfg/generated → generated/cfg_accounts}/http.ts +0 -0
  544. /package/src/{cfg/generated → generated/cfg_accounts}/logger.ts +0 -0
  545. /package/src/{cfg/generated → generated/cfg_accounts}/retry.ts +0 -0
  546. /package/src/{cfg/generated → generated/cfg_accounts}/storage.ts +0 -0
  547. /package/src/{cfg/generated → generated/cfg_accounts}/validation-events.ts +0 -0
@@ -1,2983 +0,0 @@
1
- /**
2
- * Typed fetchers for Knowbase
3
- *
4
- * Universal functions that work in any environment:
5
- * - Next.js (App Router / Pages Router / Server Components)
6
- * - React Native
7
- * - Node.js backend
8
- *
9
- * These fetchers use Zod schemas for runtime validation.
10
- *
11
- * Usage:
12
- * ```typescript
13
- * // Configure API once (in your app entry point)
14
- * import { configureAPI } from '../../api-instance'
15
- * configureAPI({ baseUrl: 'https://api.example.com' })
16
- *
17
- * // Then use fetchers anywhere
18
- * const users = await getUsers({ page: 1 })
19
- *
20
- * // With SWR
21
- * const { data } = useSWR(['users', params], () => getUsers(params))
22
- *
23
- * // With React Query
24
- * const { data } = useQuery(['users', params], () => getUsers(params))
25
- *
26
- * // In Server Component or SSR (pass custom client)
27
- * import { API } from '../../index'
28
- * const api = new API('https://api.example.com')
29
- * const users = await getUsers({ page: 1 }, api)
30
- * ```
31
- */
32
- import { consola } from 'consola'
33
- import { ArchiveItemSchema, type ArchiveItem } from '../schemas/ArchiveItem.schema'
34
- import { ArchiveItemChunkSchema, type ArchiveItemChunk } from '../schemas/ArchiveItemChunk.schema'
35
- import { ArchiveItemChunkDetailSchema, type ArchiveItemChunkDetail } from '../schemas/ArchiveItemChunkDetail.schema'
36
- import { ArchiveItemChunkRequestSchema, type ArchiveItemChunkRequest } from '../schemas/ArchiveItemChunkRequest.schema'
37
- import { ArchiveItemDetailSchema, type ArchiveItemDetail } from '../schemas/ArchiveItemDetail.schema'
38
- import { ArchiveItemRequestSchema, type ArchiveItemRequest } from '../schemas/ArchiveItemRequest.schema'
39
- import { ArchiveProcessingResultSchema, type ArchiveProcessingResult } from '../schemas/ArchiveProcessingResult.schema'
40
- import { ArchiveSearchRequestRequestSchema, type ArchiveSearchRequestRequest } from '../schemas/ArchiveSearchRequestRequest.schema'
41
- import { ArchiveStatisticsSchema, type ArchiveStatistics } from '../schemas/ArchiveStatistics.schema'
42
- import { ChatHistorySchema, type ChatHistory } from '../schemas/ChatHistory.schema'
43
- import { ChatQueryRequestSchema, type ChatQueryRequest } from '../schemas/ChatQueryRequest.schema'
44
- import { ChatResponseSchema, type ChatResponse } from '../schemas/ChatResponse.schema'
45
- import { ChatResponseRequestSchema, type ChatResponseRequest } from '../schemas/ChatResponseRequest.schema'
46
- import { ChatSessionSchema, type ChatSession } from '../schemas/ChatSession.schema'
47
- import { ChatSessionCreateRequestSchema, type ChatSessionCreateRequest } from '../schemas/ChatSessionCreateRequest.schema'
48
- import { ChatSessionRequestSchema, type ChatSessionRequest } from '../schemas/ChatSessionRequest.schema'
49
- import { ChunkRevectorizationRequestRequestSchema, type ChunkRevectorizationRequestRequest } from '../schemas/ChunkRevectorizationRequestRequest.schema'
50
- import { DocumentSchema, type Document } from '../schemas/Document.schema'
51
- import { DocumentArchiveSchema, type DocumentArchive } from '../schemas/DocumentArchive.schema'
52
- import { DocumentArchiveDetailSchema, type DocumentArchiveDetail } from '../schemas/DocumentArchiveDetail.schema'
53
- import { DocumentArchiveRequestSchema, type DocumentArchiveRequest } from '../schemas/DocumentArchiveRequest.schema'
54
- import { DocumentCreateRequestSchema, type DocumentCreateRequest } from '../schemas/DocumentCreateRequest.schema'
55
- import { DocumentProcessingStatusSchema, type DocumentProcessingStatus } from '../schemas/DocumentProcessingStatus.schema'
56
- import { DocumentRequestSchema, type DocumentRequest } from '../schemas/DocumentRequest.schema'
57
- import { DocumentStatsSchema, type DocumentStats } from '../schemas/DocumentStats.schema'
58
- import { PaginatedArchiveItemChunkListSchema, type PaginatedArchiveItemChunkList } from '../schemas/PaginatedArchiveItemChunkList.schema'
59
- import { PaginatedArchiveItemListSchema, type PaginatedArchiveItemList } from '../schemas/PaginatedArchiveItemList.schema'
60
- import { PaginatedArchiveSearchResultListSchema, type PaginatedArchiveSearchResultList } from '../schemas/PaginatedArchiveSearchResultList.schema'
61
- import { PaginatedChatResponseListSchema, type PaginatedChatResponseList } from '../schemas/PaginatedChatResponseList.schema'
62
- import { PaginatedChatSessionListSchema, type PaginatedChatSessionList } from '../schemas/PaginatedChatSessionList.schema'
63
- import { PaginatedDocumentArchiveListListSchema, type PaginatedDocumentArchiveListList } from '../schemas/PaginatedDocumentArchiveListList.schema'
64
- import { PaginatedDocumentListSchema, type PaginatedDocumentList } from '../schemas/PaginatedDocumentList.schema'
65
- import { PaginatedPublicCategoryListSchema, type PaginatedPublicCategoryList } from '../schemas/PaginatedPublicCategoryList.schema'
66
- import { PaginatedPublicDocumentListListSchema, type PaginatedPublicDocumentListList } from '../schemas/PaginatedPublicDocumentListList.schema'
67
- import { PatchedArchiveItemChunkRequestSchema, type PatchedArchiveItemChunkRequest } from '../schemas/PatchedArchiveItemChunkRequest.schema'
68
- import { PatchedArchiveItemRequestSchema, type PatchedArchiveItemRequest } from '../schemas/PatchedArchiveItemRequest.schema'
69
- import { PatchedChatResponseRequestSchema, type PatchedChatResponseRequest } from '../schemas/PatchedChatResponseRequest.schema'
70
- import { PatchedChatSessionRequestSchema, type PatchedChatSessionRequest } from '../schemas/PatchedChatSessionRequest.schema'
71
- import { PatchedDocumentArchiveRequestSchema, type PatchedDocumentArchiveRequest } from '../schemas/PatchedDocumentArchiveRequest.schema'
72
- import { PatchedDocumentRequestSchema, type PatchedDocumentRequest } from '../schemas/PatchedDocumentRequest.schema'
73
- import { PublicCategorySchema, type PublicCategory } from '../schemas/PublicCategory.schema'
74
- import { PublicDocumentSchema, type PublicDocument } from '../schemas/PublicDocument.schema'
75
- import { VectorizationResultSchema, type VectorizationResult } from '../schemas/VectorizationResult.schema'
76
- import { VectorizationStatisticsSchema, type VectorizationStatistics } from '../schemas/VectorizationStatistics.schema'
77
- import { getAPIInstance } from '../../api-instance'
78
-
79
- /**
80
- * API operation
81
- *
82
- * @method GET
83
- * @path /cfg/knowbase/admin/chat/
84
- */
85
- export async function getKnowbaseAdminChatList( params?: { page?: number; page_size?: number }, client?: any
86
- ): Promise<PaginatedChatResponseList> {
87
- const api = client || getAPIInstance()
88
- const response = await api.cfg_knowbase.adminChatList(params?.page, params?.page_size)
89
- try {
90
- return PaginatedChatResponseListSchema.parse(response)
91
- } catch (error) {
92
- // Zod validation error - log detailed information
93
- consola.error('❌ Zod Validation Failed');
94
- consola.box(`getKnowbaseAdminChatList\nPath: /cfg/knowbase/admin/chat/\nMethod: GET`);
95
-
96
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
97
- consola.error('Validation Issues:');
98
- (error as any).issues.forEach((issue: any, index: number) => {
99
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
100
- consola.error(` ├─ Message: ${issue.message}`);
101
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
102
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
103
- });
104
- }
105
-
106
- consola.error('Response data:', response);
107
-
108
- // Dispatch browser CustomEvent (only if window is defined)
109
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
110
- try {
111
- const event = new CustomEvent('zod-validation-error', {
112
- detail: {
113
- operation: 'getKnowbaseAdminChatList',
114
- path: '/cfg/knowbase/admin/chat/',
115
- method: 'GET',
116
- error: error,
117
- response: response,
118
- timestamp: new Date(),
119
- },
120
- bubbles: true,
121
- cancelable: false,
122
- });
123
- window.dispatchEvent(event);
124
- } catch (eventError) {
125
- // Silently fail - event dispatch should never crash the app
126
- consola.warn('Failed to dispatch validation error event:', eventError);
127
- }
128
- }
129
-
130
- // Re-throw the error
131
- throw error;
132
- }
133
- }
134
-
135
-
136
- /**
137
- * API operation
138
- *
139
- * @method POST
140
- * @path /cfg/knowbase/admin/chat/
141
- */
142
- export async function createKnowbaseAdminChatCreate( data: ChatResponseRequest, client?: any
143
- ): Promise<ChatResponse> {
144
- const api = client || getAPIInstance()
145
- const response = await api.cfg_knowbase.adminChatCreate(data)
146
- try {
147
- return ChatResponseSchema.parse(response)
148
- } catch (error) {
149
- // Zod validation error - log detailed information
150
- consola.error('❌ Zod Validation Failed');
151
- consola.box(`createKnowbaseAdminChatCreate\nPath: /cfg/knowbase/admin/chat/\nMethod: POST`);
152
-
153
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
154
- consola.error('Validation Issues:');
155
- (error as any).issues.forEach((issue: any, index: number) => {
156
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
157
- consola.error(` ├─ Message: ${issue.message}`);
158
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
159
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
160
- });
161
- }
162
-
163
- consola.error('Response data:', response);
164
-
165
- // Dispatch browser CustomEvent (only if window is defined)
166
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
167
- try {
168
- const event = new CustomEvent('zod-validation-error', {
169
- detail: {
170
- operation: 'createKnowbaseAdminChatCreate',
171
- path: '/cfg/knowbase/admin/chat/',
172
- method: 'POST',
173
- error: error,
174
- response: response,
175
- timestamp: new Date(),
176
- },
177
- bubbles: true,
178
- cancelable: false,
179
- });
180
- window.dispatchEvent(event);
181
- } catch (eventError) {
182
- // Silently fail - event dispatch should never crash the app
183
- consola.warn('Failed to dispatch validation error event:', eventError);
184
- }
185
- }
186
-
187
- // Re-throw the error
188
- throw error;
189
- }
190
- }
191
-
192
-
193
- /**
194
- * API operation
195
- *
196
- * @method GET
197
- * @path /cfg/knowbase/admin/chat/{id}/
198
- */
199
- export async function getKnowbaseAdminChatRetrieve( id: string, client?: any
200
- ): Promise<ChatResponse> {
201
- const api = client || getAPIInstance()
202
- const response = await api.cfg_knowbase.adminChatRetrieve(id)
203
- try {
204
- return ChatResponseSchema.parse(response)
205
- } catch (error) {
206
- // Zod validation error - log detailed information
207
- consola.error('❌ Zod Validation Failed');
208
- consola.box(`getKnowbaseAdminChatRetrieve\nPath: /cfg/knowbase/admin/chat/{id}/\nMethod: GET`);
209
-
210
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
211
- consola.error('Validation Issues:');
212
- (error as any).issues.forEach((issue: any, index: number) => {
213
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
214
- consola.error(` ├─ Message: ${issue.message}`);
215
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
216
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
217
- });
218
- }
219
-
220
- consola.error('Response data:', response);
221
-
222
- // Dispatch browser CustomEvent (only if window is defined)
223
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
224
- try {
225
- const event = new CustomEvent('zod-validation-error', {
226
- detail: {
227
- operation: 'getKnowbaseAdminChatRetrieve',
228
- path: '/cfg/knowbase/admin/chat/{id}/',
229
- method: 'GET',
230
- error: error,
231
- response: response,
232
- timestamp: new Date(),
233
- },
234
- bubbles: true,
235
- cancelable: false,
236
- });
237
- window.dispatchEvent(event);
238
- } catch (eventError) {
239
- // Silently fail - event dispatch should never crash the app
240
- consola.warn('Failed to dispatch validation error event:', eventError);
241
- }
242
- }
243
-
244
- // Re-throw the error
245
- throw error;
246
- }
247
- }
248
-
249
-
250
- /**
251
- * API operation
252
- *
253
- * @method PUT
254
- * @path /cfg/knowbase/admin/chat/{id}/
255
- */
256
- export async function updateKnowbaseAdminChatUpdate( id: string, data: ChatResponseRequest, client?: any
257
- ): Promise<ChatResponse> {
258
- const api = client || getAPIInstance()
259
- const response = await api.cfg_knowbase.adminChatUpdate(id, data)
260
- try {
261
- return ChatResponseSchema.parse(response)
262
- } catch (error) {
263
- // Zod validation error - log detailed information
264
- consola.error('❌ Zod Validation Failed');
265
- consola.box(`updateKnowbaseAdminChatUpdate\nPath: /cfg/knowbase/admin/chat/{id}/\nMethod: PUT`);
266
-
267
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
268
- consola.error('Validation Issues:');
269
- (error as any).issues.forEach((issue: any, index: number) => {
270
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
271
- consola.error(` ├─ Message: ${issue.message}`);
272
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
273
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
274
- });
275
- }
276
-
277
- consola.error('Response data:', response);
278
-
279
- // Dispatch browser CustomEvent (only if window is defined)
280
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
281
- try {
282
- const event = new CustomEvent('zod-validation-error', {
283
- detail: {
284
- operation: 'updateKnowbaseAdminChatUpdate',
285
- path: '/cfg/knowbase/admin/chat/{id}/',
286
- method: 'PUT',
287
- error: error,
288
- response: response,
289
- timestamp: new Date(),
290
- },
291
- bubbles: true,
292
- cancelable: false,
293
- });
294
- window.dispatchEvent(event);
295
- } catch (eventError) {
296
- // Silently fail - event dispatch should never crash the app
297
- consola.warn('Failed to dispatch validation error event:', eventError);
298
- }
299
- }
300
-
301
- // Re-throw the error
302
- throw error;
303
- }
304
- }
305
-
306
-
307
- /**
308
- * API operation
309
- *
310
- * @method PATCH
311
- * @path /cfg/knowbase/admin/chat/{id}/
312
- */
313
- export async function partialUpdateKnowbaseAdminChatPartialUpdate( id: string, data?: PatchedChatResponseRequest, client?: any
314
- ): Promise<ChatResponse> {
315
- const api = client || getAPIInstance()
316
- const response = await api.cfg_knowbase.adminChatPartialUpdate(id, data)
317
- try {
318
- return ChatResponseSchema.parse(response)
319
- } catch (error) {
320
- // Zod validation error - log detailed information
321
- consola.error('❌ Zod Validation Failed');
322
- consola.box(`partialUpdateKnowbaseAdminChatPartialUpdate\nPath: /cfg/knowbase/admin/chat/{id}/\nMethod: PATCH`);
323
-
324
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
325
- consola.error('Validation Issues:');
326
- (error as any).issues.forEach((issue: any, index: number) => {
327
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
328
- consola.error(` ├─ Message: ${issue.message}`);
329
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
330
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
331
- });
332
- }
333
-
334
- consola.error('Response data:', response);
335
-
336
- // Dispatch browser CustomEvent (only if window is defined)
337
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
338
- try {
339
- const event = new CustomEvent('zod-validation-error', {
340
- detail: {
341
- operation: 'partialUpdateKnowbaseAdminChatPartialUpdate',
342
- path: '/cfg/knowbase/admin/chat/{id}/',
343
- method: 'PATCH',
344
- error: error,
345
- response: response,
346
- timestamp: new Date(),
347
- },
348
- bubbles: true,
349
- cancelable: false,
350
- });
351
- window.dispatchEvent(event);
352
- } catch (eventError) {
353
- // Silently fail - event dispatch should never crash the app
354
- consola.warn('Failed to dispatch validation error event:', eventError);
355
- }
356
- }
357
-
358
- // Re-throw the error
359
- throw error;
360
- }
361
- }
362
-
363
-
364
- /**
365
- * API operation
366
- *
367
- * @method DELETE
368
- * @path /cfg/knowbase/admin/chat/{id}/
369
- */
370
- export async function deleteKnowbaseAdminChatDestroy( id: string, client?: any
371
- ): Promise<void> {
372
- const api = client || getAPIInstance()
373
- const response = await api.cfg_knowbase.adminChatDestroy(id)
374
- return response
375
- }
376
-
377
-
378
- /**
379
- * Get chat history
380
- *
381
- * @method GET
382
- * @path /cfg/knowbase/admin/chat/{id}/history/
383
- */
384
- export async function getKnowbaseAdminChatHistoryRetrieve( id: string, client?: any
385
- ): Promise<ChatHistory> {
386
- const api = client || getAPIInstance()
387
- const response = await api.cfg_knowbase.adminChatHistoryRetrieve(id)
388
- try {
389
- return ChatHistorySchema.parse(response)
390
- } catch (error) {
391
- // Zod validation error - log detailed information
392
- consola.error('❌ Zod Validation Failed');
393
- consola.box(`getKnowbaseAdminChatHistoryRetrieve\nPath: /cfg/knowbase/admin/chat/{id}/history/\nMethod: GET`);
394
-
395
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
396
- consola.error('Validation Issues:');
397
- (error as any).issues.forEach((issue: any, index: number) => {
398
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
399
- consola.error(` ├─ Message: ${issue.message}`);
400
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
401
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
402
- });
403
- }
404
-
405
- consola.error('Response data:', response);
406
-
407
- // Dispatch browser CustomEvent (only if window is defined)
408
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
409
- try {
410
- const event = new CustomEvent('zod-validation-error', {
411
- detail: {
412
- operation: 'getKnowbaseAdminChatHistoryRetrieve',
413
- path: '/cfg/knowbase/admin/chat/{id}/history/',
414
- method: 'GET',
415
- error: error,
416
- response: response,
417
- timestamp: new Date(),
418
- },
419
- bubbles: true,
420
- cancelable: false,
421
- });
422
- window.dispatchEvent(event);
423
- } catch (eventError) {
424
- // Silently fail - event dispatch should never crash the app
425
- consola.warn('Failed to dispatch validation error event:', eventError);
426
- }
427
- }
428
-
429
- // Re-throw the error
430
- throw error;
431
- }
432
- }
433
-
434
-
435
- /**
436
- * Process chat query with RAG
437
- *
438
- * @method POST
439
- * @path /cfg/knowbase/admin/chat/query/
440
- */
441
- export async function createKnowbaseAdminChatQueryCreate( data: ChatQueryRequest, client?: any
442
- ): Promise<ChatResponse> {
443
- const api = client || getAPIInstance()
444
- const response = await api.cfg_knowbase.adminChatQueryCreate(data)
445
- try {
446
- return ChatResponseSchema.parse(response)
447
- } catch (error) {
448
- // Zod validation error - log detailed information
449
- consola.error('❌ Zod Validation Failed');
450
- consola.box(`createKnowbaseAdminChatQueryCreate\nPath: /cfg/knowbase/admin/chat/query/\nMethod: POST`);
451
-
452
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
453
- consola.error('Validation Issues:');
454
- (error as any).issues.forEach((issue: any, index: number) => {
455
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
456
- consola.error(` ├─ Message: ${issue.message}`);
457
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
458
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
459
- });
460
- }
461
-
462
- consola.error('Response data:', response);
463
-
464
- // Dispatch browser CustomEvent (only if window is defined)
465
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
466
- try {
467
- const event = new CustomEvent('zod-validation-error', {
468
- detail: {
469
- operation: 'createKnowbaseAdminChatQueryCreate',
470
- path: '/cfg/knowbase/admin/chat/query/',
471
- method: 'POST',
472
- error: error,
473
- response: response,
474
- timestamp: new Date(),
475
- },
476
- bubbles: true,
477
- cancelable: false,
478
- });
479
- window.dispatchEvent(event);
480
- } catch (eventError) {
481
- // Silently fail - event dispatch should never crash the app
482
- consola.warn('Failed to dispatch validation error event:', eventError);
483
- }
484
- }
485
-
486
- // Re-throw the error
487
- throw error;
488
- }
489
- }
490
-
491
-
492
- /**
493
- * List user documents
494
- *
495
- * @method GET
496
- * @path /cfg/knowbase/admin/documents/
497
- */
498
- export async function getKnowbaseAdminDocumentsList( params?: { page?: number; page_size?: number; status?: string }, client?: any
499
- ): Promise<PaginatedDocumentList> {
500
- const api = client || getAPIInstance()
501
- const response = await api.cfg_knowbase.adminDocumentsList(params?.page, params?.page_size, params?.status)
502
- try {
503
- return PaginatedDocumentListSchema.parse(response)
504
- } catch (error) {
505
- // Zod validation error - log detailed information
506
- consola.error('❌ Zod Validation Failed');
507
- consola.box(`getKnowbaseAdminDocumentsList\nPath: /cfg/knowbase/admin/documents/\nMethod: GET`);
508
-
509
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
510
- consola.error('Validation Issues:');
511
- (error as any).issues.forEach((issue: any, index: number) => {
512
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
513
- consola.error(` ├─ Message: ${issue.message}`);
514
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
515
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
516
- });
517
- }
518
-
519
- consola.error('Response data:', response);
520
-
521
- // Dispatch browser CustomEvent (only if window is defined)
522
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
523
- try {
524
- const event = new CustomEvent('zod-validation-error', {
525
- detail: {
526
- operation: 'getKnowbaseAdminDocumentsList',
527
- path: '/cfg/knowbase/admin/documents/',
528
- method: 'GET',
529
- error: error,
530
- response: response,
531
- timestamp: new Date(),
532
- },
533
- bubbles: true,
534
- cancelable: false,
535
- });
536
- window.dispatchEvent(event);
537
- } catch (eventError) {
538
- // Silently fail - event dispatch should never crash the app
539
- consola.warn('Failed to dispatch validation error event:', eventError);
540
- }
541
- }
542
-
543
- // Re-throw the error
544
- throw error;
545
- }
546
- }
547
-
548
-
549
- /**
550
- * Upload new document
551
- *
552
- * @method POST
553
- * @path /cfg/knowbase/admin/documents/
554
- */
555
- export async function createKnowbaseAdminDocumentsCreate( data: DocumentCreateRequest, client?: any
556
- ): Promise<Document> {
557
- const api = client || getAPIInstance()
558
- const response = await api.cfg_knowbase.adminDocumentsCreate(data)
559
- try {
560
- return DocumentSchema.parse(response)
561
- } catch (error) {
562
- // Zod validation error - log detailed information
563
- consola.error('❌ Zod Validation Failed');
564
- consola.box(`createKnowbaseAdminDocumentsCreate\nPath: /cfg/knowbase/admin/documents/\nMethod: POST`);
565
-
566
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
567
- consola.error('Validation Issues:');
568
- (error as any).issues.forEach((issue: any, index: number) => {
569
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
570
- consola.error(` ├─ Message: ${issue.message}`);
571
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
572
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
573
- });
574
- }
575
-
576
- consola.error('Response data:', response);
577
-
578
- // Dispatch browser CustomEvent (only if window is defined)
579
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
580
- try {
581
- const event = new CustomEvent('zod-validation-error', {
582
- detail: {
583
- operation: 'createKnowbaseAdminDocumentsCreate',
584
- path: '/cfg/knowbase/admin/documents/',
585
- method: 'POST',
586
- error: error,
587
- response: response,
588
- timestamp: new Date(),
589
- },
590
- bubbles: true,
591
- cancelable: false,
592
- });
593
- window.dispatchEvent(event);
594
- } catch (eventError) {
595
- // Silently fail - event dispatch should never crash the app
596
- consola.warn('Failed to dispatch validation error event:', eventError);
597
- }
598
- }
599
-
600
- // Re-throw the error
601
- throw error;
602
- }
603
- }
604
-
605
-
606
- /**
607
- * Get document details
608
- *
609
- * @method GET
610
- * @path /cfg/knowbase/admin/documents/{id}/
611
- */
612
- export async function getKnowbaseAdminDocumentsRetrieve( id: string, client?: any
613
- ): Promise<Document> {
614
- const api = client || getAPIInstance()
615
- const response = await api.cfg_knowbase.adminDocumentsRetrieve(id)
616
- try {
617
- return DocumentSchema.parse(response)
618
- } catch (error) {
619
- // Zod validation error - log detailed information
620
- consola.error('❌ Zod Validation Failed');
621
- consola.box(`getKnowbaseAdminDocumentsRetrieve\nPath: /cfg/knowbase/admin/documents/{id}/\nMethod: GET`);
622
-
623
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
624
- consola.error('Validation Issues:');
625
- (error as any).issues.forEach((issue: any, index: number) => {
626
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
627
- consola.error(` ├─ Message: ${issue.message}`);
628
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
629
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
630
- });
631
- }
632
-
633
- consola.error('Response data:', response);
634
-
635
- // Dispatch browser CustomEvent (only if window is defined)
636
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
637
- try {
638
- const event = new CustomEvent('zod-validation-error', {
639
- detail: {
640
- operation: 'getKnowbaseAdminDocumentsRetrieve',
641
- path: '/cfg/knowbase/admin/documents/{id}/',
642
- method: 'GET',
643
- error: error,
644
- response: response,
645
- timestamp: new Date(),
646
- },
647
- bubbles: true,
648
- cancelable: false,
649
- });
650
- window.dispatchEvent(event);
651
- } catch (eventError) {
652
- // Silently fail - event dispatch should never crash the app
653
- consola.warn('Failed to dispatch validation error event:', eventError);
654
- }
655
- }
656
-
657
- // Re-throw the error
658
- throw error;
659
- }
660
- }
661
-
662
-
663
- /**
664
- * API operation
665
- *
666
- * @method PUT
667
- * @path /cfg/knowbase/admin/documents/{id}/
668
- */
669
- export async function updateKnowbaseAdminDocumentsUpdate( id: string, data: DocumentRequest, client?: any
670
- ): Promise<Document> {
671
- const api = client || getAPIInstance()
672
- const response = await api.cfg_knowbase.adminDocumentsUpdate(id, data)
673
- try {
674
- return DocumentSchema.parse(response)
675
- } catch (error) {
676
- // Zod validation error - log detailed information
677
- consola.error('❌ Zod Validation Failed');
678
- consola.box(`updateKnowbaseAdminDocumentsUpdate\nPath: /cfg/knowbase/admin/documents/{id}/\nMethod: PUT`);
679
-
680
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
681
- consola.error('Validation Issues:');
682
- (error as any).issues.forEach((issue: any, index: number) => {
683
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
684
- consola.error(` ├─ Message: ${issue.message}`);
685
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
686
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
687
- });
688
- }
689
-
690
- consola.error('Response data:', response);
691
-
692
- // Dispatch browser CustomEvent (only if window is defined)
693
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
694
- try {
695
- const event = new CustomEvent('zod-validation-error', {
696
- detail: {
697
- operation: 'updateKnowbaseAdminDocumentsUpdate',
698
- path: '/cfg/knowbase/admin/documents/{id}/',
699
- method: 'PUT',
700
- error: error,
701
- response: response,
702
- timestamp: new Date(),
703
- },
704
- bubbles: true,
705
- cancelable: false,
706
- });
707
- window.dispatchEvent(event);
708
- } catch (eventError) {
709
- // Silently fail - event dispatch should never crash the app
710
- consola.warn('Failed to dispatch validation error event:', eventError);
711
- }
712
- }
713
-
714
- // Re-throw the error
715
- throw error;
716
- }
717
- }
718
-
719
-
720
- /**
721
- * API operation
722
- *
723
- * @method PATCH
724
- * @path /cfg/knowbase/admin/documents/{id}/
725
- */
726
- export async function partialUpdateKnowbaseAdminDocumentsPartialUpdate( id: string, data?: PatchedDocumentRequest, client?: any
727
- ): Promise<Document> {
728
- const api = client || getAPIInstance()
729
- const response = await api.cfg_knowbase.adminDocumentsPartialUpdate(id, data)
730
- try {
731
- return DocumentSchema.parse(response)
732
- } catch (error) {
733
- // Zod validation error - log detailed information
734
- consola.error('❌ Zod Validation Failed');
735
- consola.box(`partialUpdateKnowbaseAdminDocumentsPartialUpdate\nPath: /cfg/knowbase/admin/documents/{id}/\nMethod: PATCH`);
736
-
737
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
738
- consola.error('Validation Issues:');
739
- (error as any).issues.forEach((issue: any, index: number) => {
740
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
741
- consola.error(` ├─ Message: ${issue.message}`);
742
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
743
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
744
- });
745
- }
746
-
747
- consola.error('Response data:', response);
748
-
749
- // Dispatch browser CustomEvent (only if window is defined)
750
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
751
- try {
752
- const event = new CustomEvent('zod-validation-error', {
753
- detail: {
754
- operation: 'partialUpdateKnowbaseAdminDocumentsPartialUpdate',
755
- path: '/cfg/knowbase/admin/documents/{id}/',
756
- method: 'PATCH',
757
- error: error,
758
- response: response,
759
- timestamp: new Date(),
760
- },
761
- bubbles: true,
762
- cancelable: false,
763
- });
764
- window.dispatchEvent(event);
765
- } catch (eventError) {
766
- // Silently fail - event dispatch should never crash the app
767
- consola.warn('Failed to dispatch validation error event:', eventError);
768
- }
769
- }
770
-
771
- // Re-throw the error
772
- throw error;
773
- }
774
- }
775
-
776
-
777
- /**
778
- * Delete document
779
- *
780
- * @method DELETE
781
- * @path /cfg/knowbase/admin/documents/{id}/
782
- */
783
- export async function deleteKnowbaseAdminDocumentsDestroy( id: string, client?: any
784
- ): Promise<void> {
785
- const api = client || getAPIInstance()
786
- const response = await api.cfg_knowbase.adminDocumentsDestroy(id)
787
- return response
788
- }
789
-
790
-
791
- /**
792
- * Reprocess document
793
- *
794
- * @method POST
795
- * @path /cfg/knowbase/admin/documents/{id}/reprocess/
796
- */
797
- export async function createKnowbaseAdminDocumentsReprocessCreate( id: string, data: DocumentRequest, client?: any
798
- ): Promise<Document> {
799
- const api = client || getAPIInstance()
800
- const response = await api.cfg_knowbase.adminDocumentsReprocessCreate(id, data)
801
- try {
802
- return DocumentSchema.parse(response)
803
- } catch (error) {
804
- // Zod validation error - log detailed information
805
- consola.error('❌ Zod Validation Failed');
806
- consola.box(`createKnowbaseAdminDocumentsReprocessCreate\nPath: /cfg/knowbase/admin/documents/{id}/reprocess/\nMethod: POST`);
807
-
808
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
809
- consola.error('Validation Issues:');
810
- (error as any).issues.forEach((issue: any, index: number) => {
811
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
812
- consola.error(` ├─ Message: ${issue.message}`);
813
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
814
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
815
- });
816
- }
817
-
818
- consola.error('Response data:', response);
819
-
820
- // Dispatch browser CustomEvent (only if window is defined)
821
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
822
- try {
823
- const event = new CustomEvent('zod-validation-error', {
824
- detail: {
825
- operation: 'createKnowbaseAdminDocumentsReprocessCreate',
826
- path: '/cfg/knowbase/admin/documents/{id}/reprocess/',
827
- method: 'POST',
828
- error: error,
829
- response: response,
830
- timestamp: new Date(),
831
- },
832
- bubbles: true,
833
- cancelable: false,
834
- });
835
- window.dispatchEvent(event);
836
- } catch (eventError) {
837
- // Silently fail - event dispatch should never crash the app
838
- consola.warn('Failed to dispatch validation error event:', eventError);
839
- }
840
- }
841
-
842
- // Re-throw the error
843
- throw error;
844
- }
845
- }
846
-
847
-
848
- /**
849
- * Get document processing status
850
- *
851
- * @method GET
852
- * @path /cfg/knowbase/admin/documents/{id}/status/
853
- */
854
- export async function getKnowbaseAdminDocumentsStatusRetrieve( id: string, client?: any
855
- ): Promise<DocumentProcessingStatus> {
856
- const api = client || getAPIInstance()
857
- const response = await api.cfg_knowbase.adminDocumentsStatusRetrieve(id)
858
- try {
859
- return DocumentProcessingStatusSchema.parse(response)
860
- } catch (error) {
861
- // Zod validation error - log detailed information
862
- consola.error('❌ Zod Validation Failed');
863
- consola.box(`getKnowbaseAdminDocumentsStatusRetrieve\nPath: /cfg/knowbase/admin/documents/{id}/status/\nMethod: GET`);
864
-
865
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
866
- consola.error('Validation Issues:');
867
- (error as any).issues.forEach((issue: any, index: number) => {
868
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
869
- consola.error(` ├─ Message: ${issue.message}`);
870
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
871
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
872
- });
873
- }
874
-
875
- consola.error('Response data:', response);
876
-
877
- // Dispatch browser CustomEvent (only if window is defined)
878
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
879
- try {
880
- const event = new CustomEvent('zod-validation-error', {
881
- detail: {
882
- operation: 'getKnowbaseAdminDocumentsStatusRetrieve',
883
- path: '/cfg/knowbase/admin/documents/{id}/status/',
884
- method: 'GET',
885
- error: error,
886
- response: response,
887
- timestamp: new Date(),
888
- },
889
- bubbles: true,
890
- cancelable: false,
891
- });
892
- window.dispatchEvent(event);
893
- } catch (eventError) {
894
- // Silently fail - event dispatch should never crash the app
895
- consola.warn('Failed to dispatch validation error event:', eventError);
896
- }
897
- }
898
-
899
- // Re-throw the error
900
- throw error;
901
- }
902
- }
903
-
904
-
905
- /**
906
- * Get processing statistics
907
- *
908
- * @method GET
909
- * @path /cfg/knowbase/admin/documents/stats/
910
- */
911
- export async function getKnowbaseAdminDocumentsStatsRetrieve( client?: any
912
- ): Promise<DocumentStats> {
913
- const api = client || getAPIInstance()
914
- const response = await api.cfg_knowbase.adminDocumentsStatsRetrieve()
915
- try {
916
- return DocumentStatsSchema.parse(response)
917
- } catch (error) {
918
- // Zod validation error - log detailed information
919
- consola.error('❌ Zod Validation Failed');
920
- consola.box(`getKnowbaseAdminDocumentsStatsRetrieve\nPath: /cfg/knowbase/admin/documents/stats/\nMethod: GET`);
921
-
922
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
923
- consola.error('Validation Issues:');
924
- (error as any).issues.forEach((issue: any, index: number) => {
925
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
926
- consola.error(` ├─ Message: ${issue.message}`);
927
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
928
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
929
- });
930
- }
931
-
932
- consola.error('Response data:', response);
933
-
934
- // Dispatch browser CustomEvent (only if window is defined)
935
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
936
- try {
937
- const event = new CustomEvent('zod-validation-error', {
938
- detail: {
939
- operation: 'getKnowbaseAdminDocumentsStatsRetrieve',
940
- path: '/cfg/knowbase/admin/documents/stats/',
941
- method: 'GET',
942
- error: error,
943
- response: response,
944
- timestamp: new Date(),
945
- },
946
- bubbles: true,
947
- cancelable: false,
948
- });
949
- window.dispatchEvent(event);
950
- } catch (eventError) {
951
- // Silently fail - event dispatch should never crash the app
952
- consola.warn('Failed to dispatch validation error event:', eventError);
953
- }
954
- }
955
-
956
- // Re-throw the error
957
- throw error;
958
- }
959
- }
960
-
961
-
962
- /**
963
- * List user chat sessions
964
- *
965
- * @method GET
966
- * @path /cfg/knowbase/admin/sessions/
967
- */
968
- export async function getKnowbaseAdminSessionsList( params?: { page?: number; page_size?: number }, client?: any
969
- ): Promise<PaginatedChatSessionList> {
970
- const api = client || getAPIInstance()
971
- const response = await api.cfg_knowbase.adminSessionsList(params?.page, params?.page_size)
972
- try {
973
- return PaginatedChatSessionListSchema.parse(response)
974
- } catch (error) {
975
- // Zod validation error - log detailed information
976
- consola.error('❌ Zod Validation Failed');
977
- consola.box(`getKnowbaseAdminSessionsList\nPath: /cfg/knowbase/admin/sessions/\nMethod: GET`);
978
-
979
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
980
- consola.error('Validation Issues:');
981
- (error as any).issues.forEach((issue: any, index: number) => {
982
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
983
- consola.error(` ├─ Message: ${issue.message}`);
984
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
985
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
986
- });
987
- }
988
-
989
- consola.error('Response data:', response);
990
-
991
- // Dispatch browser CustomEvent (only if window is defined)
992
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
993
- try {
994
- const event = new CustomEvent('zod-validation-error', {
995
- detail: {
996
- operation: 'getKnowbaseAdminSessionsList',
997
- path: '/cfg/knowbase/admin/sessions/',
998
- method: 'GET',
999
- error: error,
1000
- response: response,
1001
- timestamp: new Date(),
1002
- },
1003
- bubbles: true,
1004
- cancelable: false,
1005
- });
1006
- window.dispatchEvent(event);
1007
- } catch (eventError) {
1008
- // Silently fail - event dispatch should never crash the app
1009
- consola.warn('Failed to dispatch validation error event:', eventError);
1010
- }
1011
- }
1012
-
1013
- // Re-throw the error
1014
- throw error;
1015
- }
1016
- }
1017
-
1018
-
1019
- /**
1020
- * Create new chat session
1021
- *
1022
- * @method POST
1023
- * @path /cfg/knowbase/admin/sessions/
1024
- */
1025
- export async function createKnowbaseAdminSessionsCreate( data: ChatSessionCreateRequest, client?: any
1026
- ): Promise<ChatSession> {
1027
- const api = client || getAPIInstance()
1028
- const response = await api.cfg_knowbase.adminSessionsCreate(data)
1029
- try {
1030
- return ChatSessionSchema.parse(response)
1031
- } catch (error) {
1032
- // Zod validation error - log detailed information
1033
- consola.error('❌ Zod Validation Failed');
1034
- consola.box(`createKnowbaseAdminSessionsCreate\nPath: /cfg/knowbase/admin/sessions/\nMethod: POST`);
1035
-
1036
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1037
- consola.error('Validation Issues:');
1038
- (error as any).issues.forEach((issue: any, index: number) => {
1039
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1040
- consola.error(` ├─ Message: ${issue.message}`);
1041
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1042
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1043
- });
1044
- }
1045
-
1046
- consola.error('Response data:', response);
1047
-
1048
- // Dispatch browser CustomEvent (only if window is defined)
1049
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1050
- try {
1051
- const event = new CustomEvent('zod-validation-error', {
1052
- detail: {
1053
- operation: 'createKnowbaseAdminSessionsCreate',
1054
- path: '/cfg/knowbase/admin/sessions/',
1055
- method: 'POST',
1056
- error: error,
1057
- response: response,
1058
- timestamp: new Date(),
1059
- },
1060
- bubbles: true,
1061
- cancelable: false,
1062
- });
1063
- window.dispatchEvent(event);
1064
- } catch (eventError) {
1065
- // Silently fail - event dispatch should never crash the app
1066
- consola.warn('Failed to dispatch validation error event:', eventError);
1067
- }
1068
- }
1069
-
1070
- // Re-throw the error
1071
- throw error;
1072
- }
1073
- }
1074
-
1075
-
1076
- /**
1077
- * API operation
1078
- *
1079
- * @method GET
1080
- * @path /cfg/knowbase/admin/sessions/{id}/
1081
- */
1082
- export async function getKnowbaseAdminSessionsRetrieve( id: string, client?: any
1083
- ): Promise<ChatSession> {
1084
- const api = client || getAPIInstance()
1085
- const response = await api.cfg_knowbase.adminSessionsRetrieve(id)
1086
- try {
1087
- return ChatSessionSchema.parse(response)
1088
- } catch (error) {
1089
- // Zod validation error - log detailed information
1090
- consola.error('❌ Zod Validation Failed');
1091
- consola.box(`getKnowbaseAdminSessionsRetrieve\nPath: /cfg/knowbase/admin/sessions/{id}/\nMethod: GET`);
1092
-
1093
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1094
- consola.error('Validation Issues:');
1095
- (error as any).issues.forEach((issue: any, index: number) => {
1096
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1097
- consola.error(` ├─ Message: ${issue.message}`);
1098
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1099
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1100
- });
1101
- }
1102
-
1103
- consola.error('Response data:', response);
1104
-
1105
- // Dispatch browser CustomEvent (only if window is defined)
1106
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1107
- try {
1108
- const event = new CustomEvent('zod-validation-error', {
1109
- detail: {
1110
- operation: 'getKnowbaseAdminSessionsRetrieve',
1111
- path: '/cfg/knowbase/admin/sessions/{id}/',
1112
- method: 'GET',
1113
- error: error,
1114
- response: response,
1115
- timestamp: new Date(),
1116
- },
1117
- bubbles: true,
1118
- cancelable: false,
1119
- });
1120
- window.dispatchEvent(event);
1121
- } catch (eventError) {
1122
- // Silently fail - event dispatch should never crash the app
1123
- consola.warn('Failed to dispatch validation error event:', eventError);
1124
- }
1125
- }
1126
-
1127
- // Re-throw the error
1128
- throw error;
1129
- }
1130
- }
1131
-
1132
-
1133
- /**
1134
- * API operation
1135
- *
1136
- * @method PUT
1137
- * @path /cfg/knowbase/admin/sessions/{id}/
1138
- */
1139
- export async function updateKnowbaseAdminSessionsUpdate( id: string, data: ChatSessionRequest, client?: any
1140
- ): Promise<ChatSession> {
1141
- const api = client || getAPIInstance()
1142
- const response = await api.cfg_knowbase.adminSessionsUpdate(id, data)
1143
- try {
1144
- return ChatSessionSchema.parse(response)
1145
- } catch (error) {
1146
- // Zod validation error - log detailed information
1147
- consola.error('❌ Zod Validation Failed');
1148
- consola.box(`updateKnowbaseAdminSessionsUpdate\nPath: /cfg/knowbase/admin/sessions/{id}/\nMethod: PUT`);
1149
-
1150
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1151
- consola.error('Validation Issues:');
1152
- (error as any).issues.forEach((issue: any, index: number) => {
1153
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1154
- consola.error(` ├─ Message: ${issue.message}`);
1155
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1156
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1157
- });
1158
- }
1159
-
1160
- consola.error('Response data:', response);
1161
-
1162
- // Dispatch browser CustomEvent (only if window is defined)
1163
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1164
- try {
1165
- const event = new CustomEvent('zod-validation-error', {
1166
- detail: {
1167
- operation: 'updateKnowbaseAdminSessionsUpdate',
1168
- path: '/cfg/knowbase/admin/sessions/{id}/',
1169
- method: 'PUT',
1170
- error: error,
1171
- response: response,
1172
- timestamp: new Date(),
1173
- },
1174
- bubbles: true,
1175
- cancelable: false,
1176
- });
1177
- window.dispatchEvent(event);
1178
- } catch (eventError) {
1179
- // Silently fail - event dispatch should never crash the app
1180
- consola.warn('Failed to dispatch validation error event:', eventError);
1181
- }
1182
- }
1183
-
1184
- // Re-throw the error
1185
- throw error;
1186
- }
1187
- }
1188
-
1189
-
1190
- /**
1191
- * API operation
1192
- *
1193
- * @method PATCH
1194
- * @path /cfg/knowbase/admin/sessions/{id}/
1195
- */
1196
- export async function partialUpdateKnowbaseAdminSessionsPartialUpdate( id: string, data?: PatchedChatSessionRequest, client?: any
1197
- ): Promise<ChatSession> {
1198
- const api = client || getAPIInstance()
1199
- const response = await api.cfg_knowbase.adminSessionsPartialUpdate(id, data)
1200
- try {
1201
- return ChatSessionSchema.parse(response)
1202
- } catch (error) {
1203
- // Zod validation error - log detailed information
1204
- consola.error('❌ Zod Validation Failed');
1205
- consola.box(`partialUpdateKnowbaseAdminSessionsPartialUpdate\nPath: /cfg/knowbase/admin/sessions/{id}/\nMethod: PATCH`);
1206
-
1207
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1208
- consola.error('Validation Issues:');
1209
- (error as any).issues.forEach((issue: any, index: number) => {
1210
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1211
- consola.error(` ├─ Message: ${issue.message}`);
1212
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1213
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1214
- });
1215
- }
1216
-
1217
- consola.error('Response data:', response);
1218
-
1219
- // Dispatch browser CustomEvent (only if window is defined)
1220
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1221
- try {
1222
- const event = new CustomEvent('zod-validation-error', {
1223
- detail: {
1224
- operation: 'partialUpdateKnowbaseAdminSessionsPartialUpdate',
1225
- path: '/cfg/knowbase/admin/sessions/{id}/',
1226
- method: 'PATCH',
1227
- error: error,
1228
- response: response,
1229
- timestamp: new Date(),
1230
- },
1231
- bubbles: true,
1232
- cancelable: false,
1233
- });
1234
- window.dispatchEvent(event);
1235
- } catch (eventError) {
1236
- // Silently fail - event dispatch should never crash the app
1237
- consola.warn('Failed to dispatch validation error event:', eventError);
1238
- }
1239
- }
1240
-
1241
- // Re-throw the error
1242
- throw error;
1243
- }
1244
- }
1245
-
1246
-
1247
- /**
1248
- * API operation
1249
- *
1250
- * @method DELETE
1251
- * @path /cfg/knowbase/admin/sessions/{id}/
1252
- */
1253
- export async function deleteKnowbaseAdminSessionsDestroy( id: string, client?: any
1254
- ): Promise<void> {
1255
- const api = client || getAPIInstance()
1256
- const response = await api.cfg_knowbase.adminSessionsDestroy(id)
1257
- return response
1258
- }
1259
-
1260
-
1261
- /**
1262
- * Activate chat session
1263
- *
1264
- * @method POST
1265
- * @path /cfg/knowbase/admin/sessions/{id}/activate/
1266
- */
1267
- export async function createKnowbaseAdminSessionsActivateCreate( id: string, data: ChatSessionRequest, client?: any
1268
- ): Promise<ChatSession> {
1269
- const api = client || getAPIInstance()
1270
- const response = await api.cfg_knowbase.adminSessionsActivateCreate(id, data)
1271
- try {
1272
- return ChatSessionSchema.parse(response)
1273
- } catch (error) {
1274
- // Zod validation error - log detailed information
1275
- consola.error('❌ Zod Validation Failed');
1276
- consola.box(`createKnowbaseAdminSessionsActivateCreate\nPath: /cfg/knowbase/admin/sessions/{id}/activate/\nMethod: POST`);
1277
-
1278
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1279
- consola.error('Validation Issues:');
1280
- (error as any).issues.forEach((issue: any, index: number) => {
1281
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1282
- consola.error(` ├─ Message: ${issue.message}`);
1283
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1284
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1285
- });
1286
- }
1287
-
1288
- consola.error('Response data:', response);
1289
-
1290
- // Dispatch browser CustomEvent (only if window is defined)
1291
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1292
- try {
1293
- const event = new CustomEvent('zod-validation-error', {
1294
- detail: {
1295
- operation: 'createKnowbaseAdminSessionsActivateCreate',
1296
- path: '/cfg/knowbase/admin/sessions/{id}/activate/',
1297
- method: 'POST',
1298
- error: error,
1299
- response: response,
1300
- timestamp: new Date(),
1301
- },
1302
- bubbles: true,
1303
- cancelable: false,
1304
- });
1305
- window.dispatchEvent(event);
1306
- } catch (eventError) {
1307
- // Silently fail - event dispatch should never crash the app
1308
- consola.warn('Failed to dispatch validation error event:', eventError);
1309
- }
1310
- }
1311
-
1312
- // Re-throw the error
1313
- throw error;
1314
- }
1315
- }
1316
-
1317
-
1318
- /**
1319
- * Archive chat session
1320
- *
1321
- * @method POST
1322
- * @path /cfg/knowbase/admin/sessions/{id}/archive/
1323
- */
1324
- export async function createKnowbaseAdminSessionsArchiveCreate( id: string, data: ChatSessionRequest, client?: any
1325
- ): Promise<ChatSession> {
1326
- const api = client || getAPIInstance()
1327
- const response = await api.cfg_knowbase.adminSessionsArchiveCreate(id, data)
1328
- try {
1329
- return ChatSessionSchema.parse(response)
1330
- } catch (error) {
1331
- // Zod validation error - log detailed information
1332
- consola.error('❌ Zod Validation Failed');
1333
- consola.box(`createKnowbaseAdminSessionsArchiveCreate\nPath: /cfg/knowbase/admin/sessions/{id}/archive/\nMethod: POST`);
1334
-
1335
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1336
- consola.error('Validation Issues:');
1337
- (error as any).issues.forEach((issue: any, index: number) => {
1338
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1339
- consola.error(` ├─ Message: ${issue.message}`);
1340
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1341
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1342
- });
1343
- }
1344
-
1345
- consola.error('Response data:', response);
1346
-
1347
- // Dispatch browser CustomEvent (only if window is defined)
1348
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1349
- try {
1350
- const event = new CustomEvent('zod-validation-error', {
1351
- detail: {
1352
- operation: 'createKnowbaseAdminSessionsArchiveCreate',
1353
- path: '/cfg/knowbase/admin/sessions/{id}/archive/',
1354
- method: 'POST',
1355
- error: error,
1356
- response: response,
1357
- timestamp: new Date(),
1358
- },
1359
- bubbles: true,
1360
- cancelable: false,
1361
- });
1362
- window.dispatchEvent(event);
1363
- } catch (eventError) {
1364
- // Silently fail - event dispatch should never crash the app
1365
- consola.warn('Failed to dispatch validation error event:', eventError);
1366
- }
1367
- }
1368
-
1369
- // Re-throw the error
1370
- throw error;
1371
- }
1372
- }
1373
-
1374
-
1375
- /**
1376
- * List public categories
1377
- *
1378
- * @method GET
1379
- * @path /cfg/knowbase/categories/
1380
- */
1381
- export async function getKnowbaseCategoriesList( params?: { page?: number; page_size?: number }, client?: any
1382
- ): Promise<PaginatedPublicCategoryList> {
1383
- const api = client || getAPIInstance()
1384
- const response = await api.cfg_knowbase.categoriesList(params?.page, params?.page_size)
1385
- try {
1386
- return PaginatedPublicCategoryListSchema.parse(response)
1387
- } catch (error) {
1388
- // Zod validation error - log detailed information
1389
- consola.error('❌ Zod Validation Failed');
1390
- consola.box(`getKnowbaseCategoriesList\nPath: /cfg/knowbase/categories/\nMethod: GET`);
1391
-
1392
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1393
- consola.error('Validation Issues:');
1394
- (error as any).issues.forEach((issue: any, index: number) => {
1395
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1396
- consola.error(` ├─ Message: ${issue.message}`);
1397
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1398
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1399
- });
1400
- }
1401
-
1402
- consola.error('Response data:', response);
1403
-
1404
- // Dispatch browser CustomEvent (only if window is defined)
1405
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1406
- try {
1407
- const event = new CustomEvent('zod-validation-error', {
1408
- detail: {
1409
- operation: 'getKnowbaseCategoriesList',
1410
- path: '/cfg/knowbase/categories/',
1411
- method: 'GET',
1412
- error: error,
1413
- response: response,
1414
- timestamp: new Date(),
1415
- },
1416
- bubbles: true,
1417
- cancelable: false,
1418
- });
1419
- window.dispatchEvent(event);
1420
- } catch (eventError) {
1421
- // Silently fail - event dispatch should never crash the app
1422
- consola.warn('Failed to dispatch validation error event:', eventError);
1423
- }
1424
- }
1425
-
1426
- // Re-throw the error
1427
- throw error;
1428
- }
1429
- }
1430
-
1431
-
1432
- /**
1433
- * Get public category details
1434
- *
1435
- * @method GET
1436
- * @path /cfg/knowbase/categories/{id}/
1437
- */
1438
- export async function getKnowbaseCategoriesRetrieve( id: string, client?: any
1439
- ): Promise<PublicCategory> {
1440
- const api = client || getAPIInstance()
1441
- const response = await api.cfg_knowbase.categoriesRetrieve(id)
1442
- try {
1443
- return PublicCategorySchema.parse(response)
1444
- } catch (error) {
1445
- // Zod validation error - log detailed information
1446
- consola.error('❌ Zod Validation Failed');
1447
- consola.box(`getKnowbaseCategoriesRetrieve\nPath: /cfg/knowbase/categories/{id}/\nMethod: GET`);
1448
-
1449
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1450
- consola.error('Validation Issues:');
1451
- (error as any).issues.forEach((issue: any, index: number) => {
1452
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1453
- consola.error(` ├─ Message: ${issue.message}`);
1454
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1455
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1456
- });
1457
- }
1458
-
1459
- consola.error('Response data:', response);
1460
-
1461
- // Dispatch browser CustomEvent (only if window is defined)
1462
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1463
- try {
1464
- const event = new CustomEvent('zod-validation-error', {
1465
- detail: {
1466
- operation: 'getKnowbaseCategoriesRetrieve',
1467
- path: '/cfg/knowbase/categories/{id}/',
1468
- method: 'GET',
1469
- error: error,
1470
- response: response,
1471
- timestamp: new Date(),
1472
- },
1473
- bubbles: true,
1474
- cancelable: false,
1475
- });
1476
- window.dispatchEvent(event);
1477
- } catch (eventError) {
1478
- // Silently fail - event dispatch should never crash the app
1479
- consola.warn('Failed to dispatch validation error event:', eventError);
1480
- }
1481
- }
1482
-
1483
- // Re-throw the error
1484
- throw error;
1485
- }
1486
- }
1487
-
1488
-
1489
- /**
1490
- * List public documents
1491
- *
1492
- * @method GET
1493
- * @path /cfg/knowbase/documents/
1494
- */
1495
- export async function getKnowbaseDocumentsList( params?: { category?: string; page?: number; page_size?: number; search?: string }, client?: any
1496
- ): Promise<PaginatedPublicDocumentListList> {
1497
- const api = client || getAPIInstance()
1498
- const response = await api.cfg_knowbase.documentsList(params?.category, params?.page, params?.page_size, params?.search)
1499
- try {
1500
- return PaginatedPublicDocumentListListSchema.parse(response)
1501
- } catch (error) {
1502
- // Zod validation error - log detailed information
1503
- consola.error('❌ Zod Validation Failed');
1504
- consola.box(`getKnowbaseDocumentsList\nPath: /cfg/knowbase/documents/\nMethod: GET`);
1505
-
1506
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1507
- consola.error('Validation Issues:');
1508
- (error as any).issues.forEach((issue: any, index: number) => {
1509
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1510
- consola.error(` ├─ Message: ${issue.message}`);
1511
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1512
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1513
- });
1514
- }
1515
-
1516
- consola.error('Response data:', response);
1517
-
1518
- // Dispatch browser CustomEvent (only if window is defined)
1519
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1520
- try {
1521
- const event = new CustomEvent('zod-validation-error', {
1522
- detail: {
1523
- operation: 'getKnowbaseDocumentsList',
1524
- path: '/cfg/knowbase/documents/',
1525
- method: 'GET',
1526
- error: error,
1527
- response: response,
1528
- timestamp: new Date(),
1529
- },
1530
- bubbles: true,
1531
- cancelable: false,
1532
- });
1533
- window.dispatchEvent(event);
1534
- } catch (eventError) {
1535
- // Silently fail - event dispatch should never crash the app
1536
- consola.warn('Failed to dispatch validation error event:', eventError);
1537
- }
1538
- }
1539
-
1540
- // Re-throw the error
1541
- throw error;
1542
- }
1543
- }
1544
-
1545
-
1546
- /**
1547
- * Get public document details
1548
- *
1549
- * @method GET
1550
- * @path /cfg/knowbase/documents/{id}/
1551
- */
1552
- export async function getKnowbaseDocumentsRetrieve( id: string, client?: any
1553
- ): Promise<PublicDocument> {
1554
- const api = client || getAPIInstance()
1555
- const response = await api.cfg_knowbase.documentsRetrieve(id)
1556
- try {
1557
- return PublicDocumentSchema.parse(response)
1558
- } catch (error) {
1559
- // Zod validation error - log detailed information
1560
- consola.error('❌ Zod Validation Failed');
1561
- consola.box(`getKnowbaseDocumentsRetrieve\nPath: /cfg/knowbase/documents/{id}/\nMethod: GET`);
1562
-
1563
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1564
- consola.error('Validation Issues:');
1565
- (error as any).issues.forEach((issue: any, index: number) => {
1566
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1567
- consola.error(` ├─ Message: ${issue.message}`);
1568
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1569
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1570
- });
1571
- }
1572
-
1573
- consola.error('Response data:', response);
1574
-
1575
- // Dispatch browser CustomEvent (only if window is defined)
1576
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1577
- try {
1578
- const event = new CustomEvent('zod-validation-error', {
1579
- detail: {
1580
- operation: 'getKnowbaseDocumentsRetrieve',
1581
- path: '/cfg/knowbase/documents/{id}/',
1582
- method: 'GET',
1583
- error: error,
1584
- response: response,
1585
- timestamp: new Date(),
1586
- },
1587
- bubbles: true,
1588
- cancelable: false,
1589
- });
1590
- window.dispatchEvent(event);
1591
- } catch (eventError) {
1592
- // Silently fail - event dispatch should never crash the app
1593
- consola.warn('Failed to dispatch validation error event:', eventError);
1594
- }
1595
- }
1596
-
1597
- // Re-throw the error
1598
- throw error;
1599
- }
1600
- }
1601
-
1602
-
1603
- /**
1604
- * API operation
1605
- *
1606
- * @method GET
1607
- * @path /cfg/knowbase/system/archives/
1608
- */
1609
- export async function getKnowbaseSystemArchivesList( params?: { page?: number; page_size?: number }, client?: any
1610
- ): Promise<PaginatedDocumentArchiveListList> {
1611
- const api = client || getAPIInstance()
1612
- const response = await api.cfg_knowbase.systemArchivesList(params?.page, params?.page_size)
1613
- try {
1614
- return PaginatedDocumentArchiveListListSchema.parse(response)
1615
- } catch (error) {
1616
- // Zod validation error - log detailed information
1617
- consola.error('❌ Zod Validation Failed');
1618
- consola.box(`getKnowbaseSystemArchivesList\nPath: /cfg/knowbase/system/archives/\nMethod: GET`);
1619
-
1620
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1621
- consola.error('Validation Issues:');
1622
- (error as any).issues.forEach((issue: any, index: number) => {
1623
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1624
- consola.error(` ├─ Message: ${issue.message}`);
1625
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1626
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1627
- });
1628
- }
1629
-
1630
- consola.error('Response data:', response);
1631
-
1632
- // Dispatch browser CustomEvent (only if window is defined)
1633
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1634
- try {
1635
- const event = new CustomEvent('zod-validation-error', {
1636
- detail: {
1637
- operation: 'getKnowbaseSystemArchivesList',
1638
- path: '/cfg/knowbase/system/archives/',
1639
- method: 'GET',
1640
- error: error,
1641
- response: response,
1642
- timestamp: new Date(),
1643
- },
1644
- bubbles: true,
1645
- cancelable: false,
1646
- });
1647
- window.dispatchEvent(event);
1648
- } catch (eventError) {
1649
- // Silently fail - event dispatch should never crash the app
1650
- consola.warn('Failed to dispatch validation error event:', eventError);
1651
- }
1652
- }
1653
-
1654
- // Re-throw the error
1655
- throw error;
1656
- }
1657
- }
1658
-
1659
-
1660
- /**
1661
- * Upload and process archive
1662
- *
1663
- * @method POST
1664
- * @path /cfg/knowbase/system/archives/
1665
- */
1666
- export async function createKnowbaseSystemArchivesCreate( data: any, client?: any
1667
- ): Promise<ArchiveProcessingResult> {
1668
- const api = client || getAPIInstance()
1669
- const response = await api.cfg_knowbase.systemArchivesCreate(data)
1670
- try {
1671
- return ArchiveProcessingResultSchema.parse(response)
1672
- } catch (error) {
1673
- // Zod validation error - log detailed information
1674
- consola.error('❌ Zod Validation Failed');
1675
- consola.box(`createKnowbaseSystemArchivesCreate\nPath: /cfg/knowbase/system/archives/\nMethod: POST`);
1676
-
1677
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1678
- consola.error('Validation Issues:');
1679
- (error as any).issues.forEach((issue: any, index: number) => {
1680
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1681
- consola.error(` ├─ Message: ${issue.message}`);
1682
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1683
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1684
- });
1685
- }
1686
-
1687
- consola.error('Response data:', response);
1688
-
1689
- // Dispatch browser CustomEvent (only if window is defined)
1690
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1691
- try {
1692
- const event = new CustomEvent('zod-validation-error', {
1693
- detail: {
1694
- operation: 'createKnowbaseSystemArchivesCreate',
1695
- path: '/cfg/knowbase/system/archives/',
1696
- method: 'POST',
1697
- error: error,
1698
- response: response,
1699
- timestamp: new Date(),
1700
- },
1701
- bubbles: true,
1702
- cancelable: false,
1703
- });
1704
- window.dispatchEvent(event);
1705
- } catch (eventError) {
1706
- // Silently fail - event dispatch should never crash the app
1707
- consola.warn('Failed to dispatch validation error event:', eventError);
1708
- }
1709
- }
1710
-
1711
- // Re-throw the error
1712
- throw error;
1713
- }
1714
- }
1715
-
1716
-
1717
- /**
1718
- * API operation
1719
- *
1720
- * @method GET
1721
- * @path /cfg/knowbase/system/archives/{id}/
1722
- */
1723
- export async function getKnowbaseSystemArchivesRetrieve( id: string, client?: any
1724
- ): Promise<DocumentArchiveDetail> {
1725
- const api = client || getAPIInstance()
1726
- const response = await api.cfg_knowbase.systemArchivesRetrieve(id)
1727
- try {
1728
- return DocumentArchiveDetailSchema.parse(response)
1729
- } catch (error) {
1730
- // Zod validation error - log detailed information
1731
- consola.error('❌ Zod Validation Failed');
1732
- consola.box(`getKnowbaseSystemArchivesRetrieve\nPath: /cfg/knowbase/system/archives/{id}/\nMethod: GET`);
1733
-
1734
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1735
- consola.error('Validation Issues:');
1736
- (error as any).issues.forEach((issue: any, index: number) => {
1737
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1738
- consola.error(` ├─ Message: ${issue.message}`);
1739
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1740
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1741
- });
1742
- }
1743
-
1744
- consola.error('Response data:', response);
1745
-
1746
- // Dispatch browser CustomEvent (only if window is defined)
1747
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1748
- try {
1749
- const event = new CustomEvent('zod-validation-error', {
1750
- detail: {
1751
- operation: 'getKnowbaseSystemArchivesRetrieve',
1752
- path: '/cfg/knowbase/system/archives/{id}/',
1753
- method: 'GET',
1754
- error: error,
1755
- response: response,
1756
- timestamp: new Date(),
1757
- },
1758
- bubbles: true,
1759
- cancelable: false,
1760
- });
1761
- window.dispatchEvent(event);
1762
- } catch (eventError) {
1763
- // Silently fail - event dispatch should never crash the app
1764
- consola.warn('Failed to dispatch validation error event:', eventError);
1765
- }
1766
- }
1767
-
1768
- // Re-throw the error
1769
- throw error;
1770
- }
1771
- }
1772
-
1773
-
1774
- /**
1775
- * API operation
1776
- *
1777
- * @method PUT
1778
- * @path /cfg/knowbase/system/archives/{id}/
1779
- */
1780
- export async function updateKnowbaseSystemArchivesUpdate( id: string, data: DocumentArchiveRequest, client?: any
1781
- ): Promise<DocumentArchive> {
1782
- const api = client || getAPIInstance()
1783
- const response = await api.cfg_knowbase.systemArchivesUpdate(id, data)
1784
- try {
1785
- return DocumentArchiveSchema.parse(response)
1786
- } catch (error) {
1787
- // Zod validation error - log detailed information
1788
- consola.error('❌ Zod Validation Failed');
1789
- consola.box(`updateKnowbaseSystemArchivesUpdate\nPath: /cfg/knowbase/system/archives/{id}/\nMethod: PUT`);
1790
-
1791
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1792
- consola.error('Validation Issues:');
1793
- (error as any).issues.forEach((issue: any, index: number) => {
1794
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1795
- consola.error(` ├─ Message: ${issue.message}`);
1796
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1797
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1798
- });
1799
- }
1800
-
1801
- consola.error('Response data:', response);
1802
-
1803
- // Dispatch browser CustomEvent (only if window is defined)
1804
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1805
- try {
1806
- const event = new CustomEvent('zod-validation-error', {
1807
- detail: {
1808
- operation: 'updateKnowbaseSystemArchivesUpdate',
1809
- path: '/cfg/knowbase/system/archives/{id}/',
1810
- method: 'PUT',
1811
- error: error,
1812
- response: response,
1813
- timestamp: new Date(),
1814
- },
1815
- bubbles: true,
1816
- cancelable: false,
1817
- });
1818
- window.dispatchEvent(event);
1819
- } catch (eventError) {
1820
- // Silently fail - event dispatch should never crash the app
1821
- consola.warn('Failed to dispatch validation error event:', eventError);
1822
- }
1823
- }
1824
-
1825
- // Re-throw the error
1826
- throw error;
1827
- }
1828
- }
1829
-
1830
-
1831
- /**
1832
- * API operation
1833
- *
1834
- * @method PATCH
1835
- * @path /cfg/knowbase/system/archives/{id}/
1836
- */
1837
- export async function partialUpdateKnowbaseSystemArchivesPartialUpdate( id: string, data?: PatchedDocumentArchiveRequest, client?: any
1838
- ): Promise<DocumentArchive> {
1839
- const api = client || getAPIInstance()
1840
- const response = await api.cfg_knowbase.systemArchivesPartialUpdate(id, data)
1841
- try {
1842
- return DocumentArchiveSchema.parse(response)
1843
- } catch (error) {
1844
- // Zod validation error - log detailed information
1845
- consola.error('❌ Zod Validation Failed');
1846
- consola.box(`partialUpdateKnowbaseSystemArchivesPartialUpdate\nPath: /cfg/knowbase/system/archives/{id}/\nMethod: PATCH`);
1847
-
1848
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1849
- consola.error('Validation Issues:');
1850
- (error as any).issues.forEach((issue: any, index: number) => {
1851
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1852
- consola.error(` ├─ Message: ${issue.message}`);
1853
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1854
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1855
- });
1856
- }
1857
-
1858
- consola.error('Response data:', response);
1859
-
1860
- // Dispatch browser CustomEvent (only if window is defined)
1861
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1862
- try {
1863
- const event = new CustomEvent('zod-validation-error', {
1864
- detail: {
1865
- operation: 'partialUpdateKnowbaseSystemArchivesPartialUpdate',
1866
- path: '/cfg/knowbase/system/archives/{id}/',
1867
- method: 'PATCH',
1868
- error: error,
1869
- response: response,
1870
- timestamp: new Date(),
1871
- },
1872
- bubbles: true,
1873
- cancelable: false,
1874
- });
1875
- window.dispatchEvent(event);
1876
- } catch (eventError) {
1877
- // Silently fail - event dispatch should never crash the app
1878
- consola.warn('Failed to dispatch validation error event:', eventError);
1879
- }
1880
- }
1881
-
1882
- // Re-throw the error
1883
- throw error;
1884
- }
1885
- }
1886
-
1887
-
1888
- /**
1889
- * API operation
1890
- *
1891
- * @method DELETE
1892
- * @path /cfg/knowbase/system/archives/{id}/
1893
- */
1894
- export async function deleteKnowbaseSystemArchivesDestroy( id: string, client?: any
1895
- ): Promise<void> {
1896
- const api = client || getAPIInstance()
1897
- const response = await api.cfg_knowbase.systemArchivesDestroy(id)
1898
- return response
1899
- }
1900
-
1901
-
1902
- /**
1903
- * Get archive file tree
1904
- *
1905
- * @method GET
1906
- * @path /cfg/knowbase/system/archives/{id}/file_tree/
1907
- */
1908
- export async function getKnowbaseSystemArchivesFileTreeRetrieve( id: string, client?: any
1909
- ): Promise<any> {
1910
- const api = client || getAPIInstance()
1911
- const response = await api.cfg_knowbase.systemArchivesFileTreeRetrieve(id)
1912
- return response
1913
- }
1914
-
1915
-
1916
- /**
1917
- * Get archive items
1918
- *
1919
- * @method GET
1920
- * @path /cfg/knowbase/system/archives/{id}/items/
1921
- */
1922
- export async function getKnowbaseSystemArchivesItemsList( id: string, params?: { page?: number; page_size?: number }, client?: any
1923
- ): Promise<PaginatedArchiveItemList> {
1924
- const api = client || getAPIInstance()
1925
- const response = await api.cfg_knowbase.systemArchivesItemsList(id, params?.page, params?.page_size)
1926
- try {
1927
- return PaginatedArchiveItemListSchema.parse(response)
1928
- } catch (error) {
1929
- // Zod validation error - log detailed information
1930
- consola.error('❌ Zod Validation Failed');
1931
- consola.box(`getKnowbaseSystemArchivesItemsList\nPath: /cfg/knowbase/system/archives/{id}/items/\nMethod: GET`);
1932
-
1933
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1934
- consola.error('Validation Issues:');
1935
- (error as any).issues.forEach((issue: any, index: number) => {
1936
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1937
- consola.error(` ├─ Message: ${issue.message}`);
1938
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1939
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1940
- });
1941
- }
1942
-
1943
- consola.error('Response data:', response);
1944
-
1945
- // Dispatch browser CustomEvent (only if window is defined)
1946
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
1947
- try {
1948
- const event = new CustomEvent('zod-validation-error', {
1949
- detail: {
1950
- operation: 'getKnowbaseSystemArchivesItemsList',
1951
- path: '/cfg/knowbase/system/archives/{id}/items/',
1952
- method: 'GET',
1953
- error: error,
1954
- response: response,
1955
- timestamp: new Date(),
1956
- },
1957
- bubbles: true,
1958
- cancelable: false,
1959
- });
1960
- window.dispatchEvent(event);
1961
- } catch (eventError) {
1962
- // Silently fail - event dispatch should never crash the app
1963
- consola.warn('Failed to dispatch validation error event:', eventError);
1964
- }
1965
- }
1966
-
1967
- // Re-throw the error
1968
- throw error;
1969
- }
1970
- }
1971
-
1972
-
1973
- /**
1974
- * Search archive chunks
1975
- *
1976
- * @method POST
1977
- * @path /cfg/knowbase/system/archives/{id}/search/
1978
- */
1979
- export async function createKnowbaseSystemArchivesSearchCreate( id: string, data: ArchiveSearchRequestRequest, params?: { page?: number; page_size?: number }, client?: any
1980
- ): Promise<PaginatedArchiveSearchResultList> {
1981
- const api = client || getAPIInstance()
1982
- const response = await api.cfg_knowbase.systemArchivesSearchCreate(id, data, params?.page, params?.page_size)
1983
- try {
1984
- return PaginatedArchiveSearchResultListSchema.parse(response)
1985
- } catch (error) {
1986
- // Zod validation error - log detailed information
1987
- consola.error('❌ Zod Validation Failed');
1988
- consola.box(`createKnowbaseSystemArchivesSearchCreate\nPath: /cfg/knowbase/system/archives/{id}/search/\nMethod: POST`);
1989
-
1990
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
1991
- consola.error('Validation Issues:');
1992
- (error as any).issues.forEach((issue: any, index: number) => {
1993
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
1994
- consola.error(` ├─ Message: ${issue.message}`);
1995
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
1996
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
1997
- });
1998
- }
1999
-
2000
- consola.error('Response data:', response);
2001
-
2002
- // Dispatch browser CustomEvent (only if window is defined)
2003
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2004
- try {
2005
- const event = new CustomEvent('zod-validation-error', {
2006
- detail: {
2007
- operation: 'createKnowbaseSystemArchivesSearchCreate',
2008
- path: '/cfg/knowbase/system/archives/{id}/search/',
2009
- method: 'POST',
2010
- error: error,
2011
- response: response,
2012
- timestamp: new Date(),
2013
- },
2014
- bubbles: true,
2015
- cancelable: false,
2016
- });
2017
- window.dispatchEvent(event);
2018
- } catch (eventError) {
2019
- // Silently fail - event dispatch should never crash the app
2020
- consola.warn('Failed to dispatch validation error event:', eventError);
2021
- }
2022
- }
2023
-
2024
- // Re-throw the error
2025
- throw error;
2026
- }
2027
- }
2028
-
2029
-
2030
- /**
2031
- * Re-vectorize chunks
2032
- *
2033
- * @method POST
2034
- * @path /cfg/knowbase/system/archives/revectorize/
2035
- */
2036
- export async function createKnowbaseSystemArchivesRevectorizeCreate( data: ChunkRevectorizationRequestRequest, client?: any
2037
- ): Promise<VectorizationResult> {
2038
- const api = client || getAPIInstance()
2039
- const response = await api.cfg_knowbase.systemArchivesRevectorizeCreate(data)
2040
- try {
2041
- return VectorizationResultSchema.parse(response)
2042
- } catch (error) {
2043
- // Zod validation error - log detailed information
2044
- consola.error('❌ Zod Validation Failed');
2045
- consola.box(`createKnowbaseSystemArchivesRevectorizeCreate\nPath: /cfg/knowbase/system/archives/revectorize/\nMethod: POST`);
2046
-
2047
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2048
- consola.error('Validation Issues:');
2049
- (error as any).issues.forEach((issue: any, index: number) => {
2050
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2051
- consola.error(` ├─ Message: ${issue.message}`);
2052
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2053
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2054
- });
2055
- }
2056
-
2057
- consola.error('Response data:', response);
2058
-
2059
- // Dispatch browser CustomEvent (only if window is defined)
2060
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2061
- try {
2062
- const event = new CustomEvent('zod-validation-error', {
2063
- detail: {
2064
- operation: 'createKnowbaseSystemArchivesRevectorizeCreate',
2065
- path: '/cfg/knowbase/system/archives/revectorize/',
2066
- method: 'POST',
2067
- error: error,
2068
- response: response,
2069
- timestamp: new Date(),
2070
- },
2071
- bubbles: true,
2072
- cancelable: false,
2073
- });
2074
- window.dispatchEvent(event);
2075
- } catch (eventError) {
2076
- // Silently fail - event dispatch should never crash the app
2077
- consola.warn('Failed to dispatch validation error event:', eventError);
2078
- }
2079
- }
2080
-
2081
- // Re-throw the error
2082
- throw error;
2083
- }
2084
- }
2085
-
2086
-
2087
- /**
2088
- * Get archive statistics
2089
- *
2090
- * @method GET
2091
- * @path /cfg/knowbase/system/archives/statistics/
2092
- */
2093
- export async function getKnowbaseSystemArchivesStatisticsRetrieve( client?: any
2094
- ): Promise<ArchiveStatistics> {
2095
- const api = client || getAPIInstance()
2096
- const response = await api.cfg_knowbase.systemArchivesStatisticsRetrieve()
2097
- try {
2098
- return ArchiveStatisticsSchema.parse(response)
2099
- } catch (error) {
2100
- // Zod validation error - log detailed information
2101
- consola.error('❌ Zod Validation Failed');
2102
- consola.box(`getKnowbaseSystemArchivesStatisticsRetrieve\nPath: /cfg/knowbase/system/archives/statistics/\nMethod: GET`);
2103
-
2104
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2105
- consola.error('Validation Issues:');
2106
- (error as any).issues.forEach((issue: any, index: number) => {
2107
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2108
- consola.error(` ├─ Message: ${issue.message}`);
2109
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2110
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2111
- });
2112
- }
2113
-
2114
- consola.error('Response data:', response);
2115
-
2116
- // Dispatch browser CustomEvent (only if window is defined)
2117
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2118
- try {
2119
- const event = new CustomEvent('zod-validation-error', {
2120
- detail: {
2121
- operation: 'getKnowbaseSystemArchivesStatisticsRetrieve',
2122
- path: '/cfg/knowbase/system/archives/statistics/',
2123
- method: 'GET',
2124
- error: error,
2125
- response: response,
2126
- timestamp: new Date(),
2127
- },
2128
- bubbles: true,
2129
- cancelable: false,
2130
- });
2131
- window.dispatchEvent(event);
2132
- } catch (eventError) {
2133
- // Silently fail - event dispatch should never crash the app
2134
- consola.warn('Failed to dispatch validation error event:', eventError);
2135
- }
2136
- }
2137
-
2138
- // Re-throw the error
2139
- throw error;
2140
- }
2141
- }
2142
-
2143
-
2144
- /**
2145
- * Get vectorization statistics
2146
- *
2147
- * @method GET
2148
- * @path /cfg/knowbase/system/archives/vectorization_stats/
2149
- */
2150
- export async function getKnowbaseSystemArchivesVectorizationStatsRetrieve( client?: any
2151
- ): Promise<VectorizationStatistics> {
2152
- const api = client || getAPIInstance()
2153
- const response = await api.cfg_knowbase.systemArchivesVectorizationStatsRetrieve()
2154
- try {
2155
- return VectorizationStatisticsSchema.parse(response)
2156
- } catch (error) {
2157
- // Zod validation error - log detailed information
2158
- consola.error('❌ Zod Validation Failed');
2159
- consola.box(`getKnowbaseSystemArchivesVectorizationStatsRetrieve\nPath: /cfg/knowbase/system/archives/vectorization_stats/\nMethod: GET`);
2160
-
2161
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2162
- consola.error('Validation Issues:');
2163
- (error as any).issues.forEach((issue: any, index: number) => {
2164
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2165
- consola.error(` ├─ Message: ${issue.message}`);
2166
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2167
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2168
- });
2169
- }
2170
-
2171
- consola.error('Response data:', response);
2172
-
2173
- // Dispatch browser CustomEvent (only if window is defined)
2174
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2175
- try {
2176
- const event = new CustomEvent('zod-validation-error', {
2177
- detail: {
2178
- operation: 'getKnowbaseSystemArchivesVectorizationStatsRetrieve',
2179
- path: '/cfg/knowbase/system/archives/vectorization_stats/',
2180
- method: 'GET',
2181
- error: error,
2182
- response: response,
2183
- timestamp: new Date(),
2184
- },
2185
- bubbles: true,
2186
- cancelable: false,
2187
- });
2188
- window.dispatchEvent(event);
2189
- } catch (eventError) {
2190
- // Silently fail - event dispatch should never crash the app
2191
- consola.warn('Failed to dispatch validation error event:', eventError);
2192
- }
2193
- }
2194
-
2195
- // Re-throw the error
2196
- throw error;
2197
- }
2198
- }
2199
-
2200
-
2201
- /**
2202
- * API operation
2203
- *
2204
- * @method GET
2205
- * @path /cfg/knowbase/system/chunks/
2206
- */
2207
- export async function getKnowbaseSystemChunksList( params?: { page?: number; page_size?: number }, client?: any
2208
- ): Promise<PaginatedArchiveItemChunkList> {
2209
- const api = client || getAPIInstance()
2210
- const response = await api.cfg_knowbase.systemChunksList(params?.page, params?.page_size)
2211
- try {
2212
- return PaginatedArchiveItemChunkListSchema.parse(response)
2213
- } catch (error) {
2214
- // Zod validation error - log detailed information
2215
- consola.error('❌ Zod Validation Failed');
2216
- consola.box(`getKnowbaseSystemChunksList\nPath: /cfg/knowbase/system/chunks/\nMethod: GET`);
2217
-
2218
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2219
- consola.error('Validation Issues:');
2220
- (error as any).issues.forEach((issue: any, index: number) => {
2221
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2222
- consola.error(` ├─ Message: ${issue.message}`);
2223
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2224
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2225
- });
2226
- }
2227
-
2228
- consola.error('Response data:', response);
2229
-
2230
- // Dispatch browser CustomEvent (only if window is defined)
2231
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2232
- try {
2233
- const event = new CustomEvent('zod-validation-error', {
2234
- detail: {
2235
- operation: 'getKnowbaseSystemChunksList',
2236
- path: '/cfg/knowbase/system/chunks/',
2237
- method: 'GET',
2238
- error: error,
2239
- response: response,
2240
- timestamp: new Date(),
2241
- },
2242
- bubbles: true,
2243
- cancelable: false,
2244
- });
2245
- window.dispatchEvent(event);
2246
- } catch (eventError) {
2247
- // Silently fail - event dispatch should never crash the app
2248
- consola.warn('Failed to dispatch validation error event:', eventError);
2249
- }
2250
- }
2251
-
2252
- // Re-throw the error
2253
- throw error;
2254
- }
2255
- }
2256
-
2257
-
2258
- /**
2259
- * API operation
2260
- *
2261
- * @method POST
2262
- * @path /cfg/knowbase/system/chunks/
2263
- */
2264
- export async function createKnowbaseSystemChunksCreate( data: ArchiveItemChunkRequest, client?: any
2265
- ): Promise<ArchiveItemChunk> {
2266
- const api = client || getAPIInstance()
2267
- const response = await api.cfg_knowbase.systemChunksCreate(data)
2268
- try {
2269
- return ArchiveItemChunkSchema.parse(response)
2270
- } catch (error) {
2271
- // Zod validation error - log detailed information
2272
- consola.error('❌ Zod Validation Failed');
2273
- consola.box(`createKnowbaseSystemChunksCreate\nPath: /cfg/knowbase/system/chunks/\nMethod: POST`);
2274
-
2275
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2276
- consola.error('Validation Issues:');
2277
- (error as any).issues.forEach((issue: any, index: number) => {
2278
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2279
- consola.error(` ├─ Message: ${issue.message}`);
2280
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2281
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2282
- });
2283
- }
2284
-
2285
- consola.error('Response data:', response);
2286
-
2287
- // Dispatch browser CustomEvent (only if window is defined)
2288
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2289
- try {
2290
- const event = new CustomEvent('zod-validation-error', {
2291
- detail: {
2292
- operation: 'createKnowbaseSystemChunksCreate',
2293
- path: '/cfg/knowbase/system/chunks/',
2294
- method: 'POST',
2295
- error: error,
2296
- response: response,
2297
- timestamp: new Date(),
2298
- },
2299
- bubbles: true,
2300
- cancelable: false,
2301
- });
2302
- window.dispatchEvent(event);
2303
- } catch (eventError) {
2304
- // Silently fail - event dispatch should never crash the app
2305
- consola.warn('Failed to dispatch validation error event:', eventError);
2306
- }
2307
- }
2308
-
2309
- // Re-throw the error
2310
- throw error;
2311
- }
2312
- }
2313
-
2314
-
2315
- /**
2316
- * API operation
2317
- *
2318
- * @method GET
2319
- * @path /cfg/knowbase/system/chunks/{id}/
2320
- */
2321
- export async function getKnowbaseSystemChunksRetrieve( id: string, client?: any
2322
- ): Promise<ArchiveItemChunkDetail> {
2323
- const api = client || getAPIInstance()
2324
- const response = await api.cfg_knowbase.systemChunksRetrieve(id)
2325
- try {
2326
- return ArchiveItemChunkDetailSchema.parse(response)
2327
- } catch (error) {
2328
- // Zod validation error - log detailed information
2329
- consola.error('❌ Zod Validation Failed');
2330
- consola.box(`getKnowbaseSystemChunksRetrieve\nPath: /cfg/knowbase/system/chunks/{id}/\nMethod: GET`);
2331
-
2332
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2333
- consola.error('Validation Issues:');
2334
- (error as any).issues.forEach((issue: any, index: number) => {
2335
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2336
- consola.error(` ├─ Message: ${issue.message}`);
2337
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2338
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2339
- });
2340
- }
2341
-
2342
- consola.error('Response data:', response);
2343
-
2344
- // Dispatch browser CustomEvent (only if window is defined)
2345
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2346
- try {
2347
- const event = new CustomEvent('zod-validation-error', {
2348
- detail: {
2349
- operation: 'getKnowbaseSystemChunksRetrieve',
2350
- path: '/cfg/knowbase/system/chunks/{id}/',
2351
- method: 'GET',
2352
- error: error,
2353
- response: response,
2354
- timestamp: new Date(),
2355
- },
2356
- bubbles: true,
2357
- cancelable: false,
2358
- });
2359
- window.dispatchEvent(event);
2360
- } catch (eventError) {
2361
- // Silently fail - event dispatch should never crash the app
2362
- consola.warn('Failed to dispatch validation error event:', eventError);
2363
- }
2364
- }
2365
-
2366
- // Re-throw the error
2367
- throw error;
2368
- }
2369
- }
2370
-
2371
-
2372
- /**
2373
- * API operation
2374
- *
2375
- * @method PUT
2376
- * @path /cfg/knowbase/system/chunks/{id}/
2377
- */
2378
- export async function updateKnowbaseSystemChunksUpdate( id: string, data: ArchiveItemChunkRequest, client?: any
2379
- ): Promise<ArchiveItemChunk> {
2380
- const api = client || getAPIInstance()
2381
- const response = await api.cfg_knowbase.systemChunksUpdate(id, data)
2382
- try {
2383
- return ArchiveItemChunkSchema.parse(response)
2384
- } catch (error) {
2385
- // Zod validation error - log detailed information
2386
- consola.error('❌ Zod Validation Failed');
2387
- consola.box(`updateKnowbaseSystemChunksUpdate\nPath: /cfg/knowbase/system/chunks/{id}/\nMethod: PUT`);
2388
-
2389
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2390
- consola.error('Validation Issues:');
2391
- (error as any).issues.forEach((issue: any, index: number) => {
2392
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2393
- consola.error(` ├─ Message: ${issue.message}`);
2394
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2395
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2396
- });
2397
- }
2398
-
2399
- consola.error('Response data:', response);
2400
-
2401
- // Dispatch browser CustomEvent (only if window is defined)
2402
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2403
- try {
2404
- const event = new CustomEvent('zod-validation-error', {
2405
- detail: {
2406
- operation: 'updateKnowbaseSystemChunksUpdate',
2407
- path: '/cfg/knowbase/system/chunks/{id}/',
2408
- method: 'PUT',
2409
- error: error,
2410
- response: response,
2411
- timestamp: new Date(),
2412
- },
2413
- bubbles: true,
2414
- cancelable: false,
2415
- });
2416
- window.dispatchEvent(event);
2417
- } catch (eventError) {
2418
- // Silently fail - event dispatch should never crash the app
2419
- consola.warn('Failed to dispatch validation error event:', eventError);
2420
- }
2421
- }
2422
-
2423
- // Re-throw the error
2424
- throw error;
2425
- }
2426
- }
2427
-
2428
-
2429
- /**
2430
- * API operation
2431
- *
2432
- * @method PATCH
2433
- * @path /cfg/knowbase/system/chunks/{id}/
2434
- */
2435
- export async function partialUpdateKnowbaseSystemChunksPartialUpdate( id: string, data?: PatchedArchiveItemChunkRequest, client?: any
2436
- ): Promise<ArchiveItemChunk> {
2437
- const api = client || getAPIInstance()
2438
- const response = await api.cfg_knowbase.systemChunksPartialUpdate(id, data)
2439
- try {
2440
- return ArchiveItemChunkSchema.parse(response)
2441
- } catch (error) {
2442
- // Zod validation error - log detailed information
2443
- consola.error('❌ Zod Validation Failed');
2444
- consola.box(`partialUpdateKnowbaseSystemChunksPartialUpdate\nPath: /cfg/knowbase/system/chunks/{id}/\nMethod: PATCH`);
2445
-
2446
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2447
- consola.error('Validation Issues:');
2448
- (error as any).issues.forEach((issue: any, index: number) => {
2449
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2450
- consola.error(` ├─ Message: ${issue.message}`);
2451
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2452
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2453
- });
2454
- }
2455
-
2456
- consola.error('Response data:', response);
2457
-
2458
- // Dispatch browser CustomEvent (only if window is defined)
2459
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2460
- try {
2461
- const event = new CustomEvent('zod-validation-error', {
2462
- detail: {
2463
- operation: 'partialUpdateKnowbaseSystemChunksPartialUpdate',
2464
- path: '/cfg/knowbase/system/chunks/{id}/',
2465
- method: 'PATCH',
2466
- error: error,
2467
- response: response,
2468
- timestamp: new Date(),
2469
- },
2470
- bubbles: true,
2471
- cancelable: false,
2472
- });
2473
- window.dispatchEvent(event);
2474
- } catch (eventError) {
2475
- // Silently fail - event dispatch should never crash the app
2476
- consola.warn('Failed to dispatch validation error event:', eventError);
2477
- }
2478
- }
2479
-
2480
- // Re-throw the error
2481
- throw error;
2482
- }
2483
- }
2484
-
2485
-
2486
- /**
2487
- * API operation
2488
- *
2489
- * @method DELETE
2490
- * @path /cfg/knowbase/system/chunks/{id}/
2491
- */
2492
- export async function deleteKnowbaseSystemChunksDestroy( id: string, client?: any
2493
- ): Promise<void> {
2494
- const api = client || getAPIInstance()
2495
- const response = await api.cfg_knowbase.systemChunksDestroy(id)
2496
- return response
2497
- }
2498
-
2499
-
2500
- /**
2501
- * Get chunk context
2502
- *
2503
- * @method GET
2504
- * @path /cfg/knowbase/system/chunks/{id}/context/
2505
- */
2506
- export async function getKnowbaseSystemChunksContextRetrieve( id: string, client?: any
2507
- ): Promise<ArchiveItemChunkDetail> {
2508
- const api = client || getAPIInstance()
2509
- const response = await api.cfg_knowbase.systemChunksContextRetrieve(id)
2510
- try {
2511
- return ArchiveItemChunkDetailSchema.parse(response)
2512
- } catch (error) {
2513
- // Zod validation error - log detailed information
2514
- consola.error('❌ Zod Validation Failed');
2515
- consola.box(`getKnowbaseSystemChunksContextRetrieve\nPath: /cfg/knowbase/system/chunks/{id}/context/\nMethod: GET`);
2516
-
2517
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2518
- consola.error('Validation Issues:');
2519
- (error as any).issues.forEach((issue: any, index: number) => {
2520
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2521
- consola.error(` ├─ Message: ${issue.message}`);
2522
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2523
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2524
- });
2525
- }
2526
-
2527
- consola.error('Response data:', response);
2528
-
2529
- // Dispatch browser CustomEvent (only if window is defined)
2530
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2531
- try {
2532
- const event = new CustomEvent('zod-validation-error', {
2533
- detail: {
2534
- operation: 'getKnowbaseSystemChunksContextRetrieve',
2535
- path: '/cfg/knowbase/system/chunks/{id}/context/',
2536
- method: 'GET',
2537
- error: error,
2538
- response: response,
2539
- timestamp: new Date(),
2540
- },
2541
- bubbles: true,
2542
- cancelable: false,
2543
- });
2544
- window.dispatchEvent(event);
2545
- } catch (eventError) {
2546
- // Silently fail - event dispatch should never crash the app
2547
- consola.warn('Failed to dispatch validation error event:', eventError);
2548
- }
2549
- }
2550
-
2551
- // Re-throw the error
2552
- throw error;
2553
- }
2554
- }
2555
-
2556
-
2557
- /**
2558
- * Vectorize chunk
2559
- *
2560
- * @method POST
2561
- * @path /cfg/knowbase/system/chunks/{id}/vectorize/
2562
- */
2563
- export async function createKnowbaseSystemChunksVectorizeCreate( id: string, data: ArchiveItemChunkRequest, client?: any
2564
- ): Promise<any> {
2565
- const api = client || getAPIInstance()
2566
- const response = await api.cfg_knowbase.systemChunksVectorizeCreate(id, data)
2567
- return response
2568
- }
2569
-
2570
-
2571
- /**
2572
- * API operation
2573
- *
2574
- * @method GET
2575
- * @path /cfg/knowbase/system/items/
2576
- */
2577
- export async function getKnowbaseSystemItemsList( params?: { page?: number; page_size?: number }, client?: any
2578
- ): Promise<PaginatedArchiveItemList> {
2579
- const api = client || getAPIInstance()
2580
- const response = await api.cfg_knowbase.systemItemsList(params?.page, params?.page_size)
2581
- try {
2582
- return PaginatedArchiveItemListSchema.parse(response)
2583
- } catch (error) {
2584
- // Zod validation error - log detailed information
2585
- consola.error('❌ Zod Validation Failed');
2586
- consola.box(`getKnowbaseSystemItemsList\nPath: /cfg/knowbase/system/items/\nMethod: GET`);
2587
-
2588
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2589
- consola.error('Validation Issues:');
2590
- (error as any).issues.forEach((issue: any, index: number) => {
2591
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2592
- consola.error(` ├─ Message: ${issue.message}`);
2593
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2594
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2595
- });
2596
- }
2597
-
2598
- consola.error('Response data:', response);
2599
-
2600
- // Dispatch browser CustomEvent (only if window is defined)
2601
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2602
- try {
2603
- const event = new CustomEvent('zod-validation-error', {
2604
- detail: {
2605
- operation: 'getKnowbaseSystemItemsList',
2606
- path: '/cfg/knowbase/system/items/',
2607
- method: 'GET',
2608
- error: error,
2609
- response: response,
2610
- timestamp: new Date(),
2611
- },
2612
- bubbles: true,
2613
- cancelable: false,
2614
- });
2615
- window.dispatchEvent(event);
2616
- } catch (eventError) {
2617
- // Silently fail - event dispatch should never crash the app
2618
- consola.warn('Failed to dispatch validation error event:', eventError);
2619
- }
2620
- }
2621
-
2622
- // Re-throw the error
2623
- throw error;
2624
- }
2625
- }
2626
-
2627
-
2628
- /**
2629
- * API operation
2630
- *
2631
- * @method POST
2632
- * @path /cfg/knowbase/system/items/
2633
- */
2634
- export async function createKnowbaseSystemItemsCreate( data: ArchiveItemRequest, client?: any
2635
- ): Promise<ArchiveItem> {
2636
- const api = client || getAPIInstance()
2637
- const response = await api.cfg_knowbase.systemItemsCreate(data)
2638
- try {
2639
- return ArchiveItemSchema.parse(response)
2640
- } catch (error) {
2641
- // Zod validation error - log detailed information
2642
- consola.error('❌ Zod Validation Failed');
2643
- consola.box(`createKnowbaseSystemItemsCreate\nPath: /cfg/knowbase/system/items/\nMethod: POST`);
2644
-
2645
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2646
- consola.error('Validation Issues:');
2647
- (error as any).issues.forEach((issue: any, index: number) => {
2648
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2649
- consola.error(` ├─ Message: ${issue.message}`);
2650
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2651
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2652
- });
2653
- }
2654
-
2655
- consola.error('Response data:', response);
2656
-
2657
- // Dispatch browser CustomEvent (only if window is defined)
2658
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2659
- try {
2660
- const event = new CustomEvent('zod-validation-error', {
2661
- detail: {
2662
- operation: 'createKnowbaseSystemItemsCreate',
2663
- path: '/cfg/knowbase/system/items/',
2664
- method: 'POST',
2665
- error: error,
2666
- response: response,
2667
- timestamp: new Date(),
2668
- },
2669
- bubbles: true,
2670
- cancelable: false,
2671
- });
2672
- window.dispatchEvent(event);
2673
- } catch (eventError) {
2674
- // Silently fail - event dispatch should never crash the app
2675
- consola.warn('Failed to dispatch validation error event:', eventError);
2676
- }
2677
- }
2678
-
2679
- // Re-throw the error
2680
- throw error;
2681
- }
2682
- }
2683
-
2684
-
2685
- /**
2686
- * API operation
2687
- *
2688
- * @method GET
2689
- * @path /cfg/knowbase/system/items/{id}/
2690
- */
2691
- export async function getKnowbaseSystemItemsRetrieve( id: string, client?: any
2692
- ): Promise<ArchiveItemDetail> {
2693
- const api = client || getAPIInstance()
2694
- const response = await api.cfg_knowbase.systemItemsRetrieve(id)
2695
- try {
2696
- return ArchiveItemDetailSchema.parse(response)
2697
- } catch (error) {
2698
- // Zod validation error - log detailed information
2699
- consola.error('❌ Zod Validation Failed');
2700
- consola.box(`getKnowbaseSystemItemsRetrieve\nPath: /cfg/knowbase/system/items/{id}/\nMethod: GET`);
2701
-
2702
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2703
- consola.error('Validation Issues:');
2704
- (error as any).issues.forEach((issue: any, index: number) => {
2705
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2706
- consola.error(` ├─ Message: ${issue.message}`);
2707
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2708
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2709
- });
2710
- }
2711
-
2712
- consola.error('Response data:', response);
2713
-
2714
- // Dispatch browser CustomEvent (only if window is defined)
2715
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2716
- try {
2717
- const event = new CustomEvent('zod-validation-error', {
2718
- detail: {
2719
- operation: 'getKnowbaseSystemItemsRetrieve',
2720
- path: '/cfg/knowbase/system/items/{id}/',
2721
- method: 'GET',
2722
- error: error,
2723
- response: response,
2724
- timestamp: new Date(),
2725
- },
2726
- bubbles: true,
2727
- cancelable: false,
2728
- });
2729
- window.dispatchEvent(event);
2730
- } catch (eventError) {
2731
- // Silently fail - event dispatch should never crash the app
2732
- consola.warn('Failed to dispatch validation error event:', eventError);
2733
- }
2734
- }
2735
-
2736
- // Re-throw the error
2737
- throw error;
2738
- }
2739
- }
2740
-
2741
-
2742
- /**
2743
- * API operation
2744
- *
2745
- * @method PUT
2746
- * @path /cfg/knowbase/system/items/{id}/
2747
- */
2748
- export async function updateKnowbaseSystemItemsUpdate( id: string, data: ArchiveItemRequest, client?: any
2749
- ): Promise<ArchiveItem> {
2750
- const api = client || getAPIInstance()
2751
- const response = await api.cfg_knowbase.systemItemsUpdate(id, data)
2752
- try {
2753
- return ArchiveItemSchema.parse(response)
2754
- } catch (error) {
2755
- // Zod validation error - log detailed information
2756
- consola.error('❌ Zod Validation Failed');
2757
- consola.box(`updateKnowbaseSystemItemsUpdate\nPath: /cfg/knowbase/system/items/{id}/\nMethod: PUT`);
2758
-
2759
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2760
- consola.error('Validation Issues:');
2761
- (error as any).issues.forEach((issue: any, index: number) => {
2762
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2763
- consola.error(` ├─ Message: ${issue.message}`);
2764
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2765
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2766
- });
2767
- }
2768
-
2769
- consola.error('Response data:', response);
2770
-
2771
- // Dispatch browser CustomEvent (only if window is defined)
2772
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2773
- try {
2774
- const event = new CustomEvent('zod-validation-error', {
2775
- detail: {
2776
- operation: 'updateKnowbaseSystemItemsUpdate',
2777
- path: '/cfg/knowbase/system/items/{id}/',
2778
- method: 'PUT',
2779
- error: error,
2780
- response: response,
2781
- timestamp: new Date(),
2782
- },
2783
- bubbles: true,
2784
- cancelable: false,
2785
- });
2786
- window.dispatchEvent(event);
2787
- } catch (eventError) {
2788
- // Silently fail - event dispatch should never crash the app
2789
- consola.warn('Failed to dispatch validation error event:', eventError);
2790
- }
2791
- }
2792
-
2793
- // Re-throw the error
2794
- throw error;
2795
- }
2796
- }
2797
-
2798
-
2799
- /**
2800
- * API operation
2801
- *
2802
- * @method PATCH
2803
- * @path /cfg/knowbase/system/items/{id}/
2804
- */
2805
- export async function partialUpdateKnowbaseSystemItemsPartialUpdate( id: string, data?: PatchedArchiveItemRequest, client?: any
2806
- ): Promise<ArchiveItem> {
2807
- const api = client || getAPIInstance()
2808
- const response = await api.cfg_knowbase.systemItemsPartialUpdate(id, data)
2809
- try {
2810
- return ArchiveItemSchema.parse(response)
2811
- } catch (error) {
2812
- // Zod validation error - log detailed information
2813
- consola.error('❌ Zod Validation Failed');
2814
- consola.box(`partialUpdateKnowbaseSystemItemsPartialUpdate\nPath: /cfg/knowbase/system/items/{id}/\nMethod: PATCH`);
2815
-
2816
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2817
- consola.error('Validation Issues:');
2818
- (error as any).issues.forEach((issue: any, index: number) => {
2819
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2820
- consola.error(` ├─ Message: ${issue.message}`);
2821
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2822
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2823
- });
2824
- }
2825
-
2826
- consola.error('Response data:', response);
2827
-
2828
- // Dispatch browser CustomEvent (only if window is defined)
2829
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2830
- try {
2831
- const event = new CustomEvent('zod-validation-error', {
2832
- detail: {
2833
- operation: 'partialUpdateKnowbaseSystemItemsPartialUpdate',
2834
- path: '/cfg/knowbase/system/items/{id}/',
2835
- method: 'PATCH',
2836
- error: error,
2837
- response: response,
2838
- timestamp: new Date(),
2839
- },
2840
- bubbles: true,
2841
- cancelable: false,
2842
- });
2843
- window.dispatchEvent(event);
2844
- } catch (eventError) {
2845
- // Silently fail - event dispatch should never crash the app
2846
- consola.warn('Failed to dispatch validation error event:', eventError);
2847
- }
2848
- }
2849
-
2850
- // Re-throw the error
2851
- throw error;
2852
- }
2853
- }
2854
-
2855
-
2856
- /**
2857
- * API operation
2858
- *
2859
- * @method DELETE
2860
- * @path /cfg/knowbase/system/items/{id}/
2861
- */
2862
- export async function deleteKnowbaseSystemItemsDestroy( id: string, client?: any
2863
- ): Promise<void> {
2864
- const api = client || getAPIInstance()
2865
- const response = await api.cfg_knowbase.systemItemsDestroy(id)
2866
- return response
2867
- }
2868
-
2869
-
2870
- /**
2871
- * Get item chunks
2872
- *
2873
- * @method GET
2874
- * @path /cfg/knowbase/system/items/{id}/chunks/
2875
- */
2876
- export async function getKnowbaseSystemItemsChunksList( id: string, params?: { page?: number; page_size?: number }, client?: any
2877
- ): Promise<PaginatedArchiveItemChunkList> {
2878
- const api = client || getAPIInstance()
2879
- const response = await api.cfg_knowbase.systemItemsChunksList(id, params?.page, params?.page_size)
2880
- try {
2881
- return PaginatedArchiveItemChunkListSchema.parse(response)
2882
- } catch (error) {
2883
- // Zod validation error - log detailed information
2884
- consola.error('❌ Zod Validation Failed');
2885
- consola.box(`getKnowbaseSystemItemsChunksList\nPath: /cfg/knowbase/system/items/{id}/chunks/\nMethod: GET`);
2886
-
2887
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2888
- consola.error('Validation Issues:');
2889
- (error as any).issues.forEach((issue: any, index: number) => {
2890
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2891
- consola.error(` ├─ Message: ${issue.message}`);
2892
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2893
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2894
- });
2895
- }
2896
-
2897
- consola.error('Response data:', response);
2898
-
2899
- // Dispatch browser CustomEvent (only if window is defined)
2900
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2901
- try {
2902
- const event = new CustomEvent('zod-validation-error', {
2903
- detail: {
2904
- operation: 'getKnowbaseSystemItemsChunksList',
2905
- path: '/cfg/knowbase/system/items/{id}/chunks/',
2906
- method: 'GET',
2907
- error: error,
2908
- response: response,
2909
- timestamp: new Date(),
2910
- },
2911
- bubbles: true,
2912
- cancelable: false,
2913
- });
2914
- window.dispatchEvent(event);
2915
- } catch (eventError) {
2916
- // Silently fail - event dispatch should never crash the app
2917
- consola.warn('Failed to dispatch validation error event:', eventError);
2918
- }
2919
- }
2920
-
2921
- // Re-throw the error
2922
- throw error;
2923
- }
2924
- }
2925
-
2926
-
2927
- /**
2928
- * Get item content
2929
- *
2930
- * @method GET
2931
- * @path /cfg/knowbase/system/items/{id}/content/
2932
- */
2933
- export async function getKnowbaseSystemItemsContentRetrieve( id: string, client?: any
2934
- ): Promise<ArchiveItemDetail> {
2935
- const api = client || getAPIInstance()
2936
- const response = await api.cfg_knowbase.systemItemsContentRetrieve(id)
2937
- try {
2938
- return ArchiveItemDetailSchema.parse(response)
2939
- } catch (error) {
2940
- // Zod validation error - log detailed information
2941
- consola.error('❌ Zod Validation Failed');
2942
- consola.box(`getKnowbaseSystemItemsContentRetrieve\nPath: /cfg/knowbase/system/items/{id}/content/\nMethod: GET`);
2943
-
2944
- if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
2945
- consola.error('Validation Issues:');
2946
- (error as any).issues.forEach((issue: any, index: number) => {
2947
- consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
2948
- consola.error(` ├─ Message: ${issue.message}`);
2949
- if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
2950
- if (issue.received) consola.error(` └─ Received: ${issue.received}`);
2951
- });
2952
- }
2953
-
2954
- consola.error('Response data:', response);
2955
-
2956
- // Dispatch browser CustomEvent (only if window is defined)
2957
- if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
2958
- try {
2959
- const event = new CustomEvent('zod-validation-error', {
2960
- detail: {
2961
- operation: 'getKnowbaseSystemItemsContentRetrieve',
2962
- path: '/cfg/knowbase/system/items/{id}/content/',
2963
- method: 'GET',
2964
- error: error,
2965
- response: response,
2966
- timestamp: new Date(),
2967
- },
2968
- bubbles: true,
2969
- cancelable: false,
2970
- });
2971
- window.dispatchEvent(event);
2972
- } catch (eventError) {
2973
- // Silently fail - event dispatch should never crash the app
2974
- consola.warn('Failed to dispatch validation error event:', eventError);
2975
- }
2976
- }
2977
-
2978
- // Re-throw the error
2979
- throw error;
2980
- }
2981
- }
2982
-
2983
-