@ductape/sdk 0.1.6 → 0.1.8

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 (973) hide show
  1. package/package.json +5 -9
  2. package/dist/agents/agent-context.d.ts +0 -100
  3. package/dist/agents/agent-context.js +0 -604
  4. package/dist/agents/agent-context.js.map +0 -1
  5. package/dist/agents/agent-executor.d.ts +0 -180
  6. package/dist/agents/agent-executor.js +0 -715
  7. package/dist/agents/agent-executor.js.map +0 -1
  8. package/dist/agents/agents.service.d.ts +0 -310
  9. package/dist/agents/agents.service.js +0 -1255
  10. package/dist/agents/agents.service.js.map +0 -1
  11. package/dist/agents/index.d.ts +0 -55
  12. package/dist/agents/index.js +0 -110
  13. package/dist/agents/index.js.map +0 -1
  14. package/dist/agents/memory-manager.d.ts +0 -182
  15. package/dist/agents/memory-manager.js +0 -383
  16. package/dist/agents/memory-manager.js.map +0 -1
  17. package/dist/agents/tool-registry.d.ts +0 -141
  18. package/dist/agents/tool-registry.js +0 -355
  19. package/dist/agents/tool-registry.js.map +0 -1
  20. package/dist/agents/types/agents.types.d.ts +0 -1240
  21. package/dist/agents/types/agents.types.js +0 -12
  22. package/dist/agents/types/agents.types.js.map +0 -1
  23. package/dist/agents/types/index.d.ts +0 -6
  24. package/dist/agents/types/index.js +0 -23
  25. package/dist/agents/types/index.js.map +0 -1
  26. package/dist/agents/vector-store-adapter.d.ts +0 -108
  27. package/dist/agents/vector-store-adapter.js +0 -213
  28. package/dist/agents/vector-store-adapter.js.map +0 -1
  29. package/dist/api/services/appApi.service.d.ts +0 -78
  30. package/dist/api/services/appApi.service.js +0 -303
  31. package/dist/api/services/appApi.service.js.map +0 -1
  32. package/dist/api/services/logsApi.service.d.ts +0 -62
  33. package/dist/api/services/logsApi.service.js +0 -67
  34. package/dist/api/services/logsApi.service.js.map +0 -1
  35. package/dist/api/services/pricingApi.service.d.ts +0 -10
  36. package/dist/api/services/pricingApi.service.js +0 -34
  37. package/dist/api/services/pricingApi.service.js.map +0 -1
  38. package/dist/api/services/processorApi.service.d.ts +0 -927
  39. package/dist/api/services/processorApi.service.js +0 -787
  40. package/dist/api/services/processorApi.service.js.map +0 -1
  41. package/dist/api/services/productsApi.service.d.ts +0 -150
  42. package/dist/api/services/productsApi.service.js +0 -279
  43. package/dist/api/services/productsApi.service.js.map +0 -1
  44. package/dist/api/services/resilienceApi.service.d.ts +0 -106
  45. package/dist/api/services/resilienceApi.service.js +0 -224
  46. package/dist/api/services/resilienceApi.service.js.map +0 -1
  47. package/dist/api/services/secretsApi.service.d.ts +0 -51
  48. package/dist/api/services/secretsApi.service.js +0 -126
  49. package/dist/api/services/secretsApi.service.js.map +0 -1
  50. package/dist/api/services/userApi.service.d.ts +0 -10
  51. package/dist/api/services/userApi.service.js +0 -20
  52. package/dist/api/services/userApi.service.js.map +0 -1
  53. package/dist/api/services/webhooksApi.service.d.ts +0 -14
  54. package/dist/api/services/webhooksApi.service.js +0 -65
  55. package/dist/api/services/webhooksApi.service.js.map +0 -1
  56. package/dist/api/services/workflowApi.service.d.ts +0 -199
  57. package/dist/api/services/workflowApi.service.js +0 -201
  58. package/dist/api/services/workflowApi.service.js.map +0 -1
  59. package/dist/api/services/workspaceApi.service.d.ts +0 -20
  60. package/dist/api/services/workspaceApi.service.js +0 -54
  61. package/dist/api/services/workspaceApi.service.js.map +0 -1
  62. package/dist/api/urls.d.ts +0 -136
  63. package/dist/api/urls.js +0 -185
  64. package/dist/api/urls.js.map +0 -1
  65. package/dist/api/utils/auth.utils.d.ts +0 -10
  66. package/dist/api/utils/auth.utils.js +0 -24
  67. package/dist/api/utils/auth.utils.js.map +0 -1
  68. package/dist/api/utils/cache.utils.d.ts +0 -3
  69. package/dist/api/utils/cache.utils.js +0 -18
  70. package/dist/api/utils/cache.utils.js.map +0 -1
  71. package/dist/api/utils/strings.utils.d.ts +0 -7
  72. package/dist/api/utils/strings.utils.js +0 -64
  73. package/dist/api/utils/strings.utils.js.map +0 -1
  74. package/dist/apps/services/app.service.d.ts +0 -126
  75. package/dist/apps/services/app.service.js +0 -1436
  76. package/dist/apps/services/app.service.js.map +0 -1
  77. package/dist/apps/utils/auth-context-manager.d.ts +0 -137
  78. package/dist/apps/utils/auth-context-manager.js +0 -248
  79. package/dist/apps/utils/auth-context-manager.js.map +0 -1
  80. package/dist/apps/utils/credential-manager.d.ts +0 -128
  81. package/dist/apps/utils/credential-manager.js +0 -199
  82. package/dist/apps/utils/credential-manager.js.map +0 -1
  83. package/dist/apps/utils/index.d.ts +0 -10
  84. package/dist/apps/utils/index.js +0 -54
  85. package/dist/apps/utils/index.js.map +0 -1
  86. package/dist/apps/utils/input-helpers.d.ts +0 -67
  87. package/dist/apps/utils/input-helpers.js +0 -185
  88. package/dist/apps/utils/input-helpers.js.map +0 -1
  89. package/dist/apps/utils/input-resolver.d.ts +0 -165
  90. package/dist/apps/utils/input-resolver.js +0 -477
  91. package/dist/apps/utils/input-resolver.js.map +0 -1
  92. package/dist/apps/utils/oauth-manager.d.ts +0 -196
  93. package/dist/apps/utils/oauth-manager.js +0 -429
  94. package/dist/apps/utils/oauth-manager.js.map +0 -1
  95. package/dist/apps/utils/objects.utils.d.ts +0 -4
  96. package/dist/apps/utils/objects.utils.js +0 -59
  97. package/dist/apps/utils/objects.utils.js.map +0 -1
  98. package/dist/apps/utils/string.utils.d.ts +0 -9
  99. package/dist/apps/utils/string.utils.js +0 -89
  100. package/dist/apps/utils/string.utils.js.map +0 -1
  101. package/dist/apps/validators/index.d.ts +0 -17
  102. package/dist/apps/validators/index.js +0 -39
  103. package/dist/apps/validators/index.js.map +0 -1
  104. package/dist/apps/validators/joi-validators/create.app.validator.d.ts +0 -3
  105. package/dist/apps/validators/joi-validators/create.app.validator.js +0 -43
  106. package/dist/apps/validators/joi-validators/create.app.validator.js.map +0 -1
  107. package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +0 -3
  108. package/dist/apps/validators/joi-validators/create.appAction.validator.js +0 -72
  109. package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +0 -1
  110. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
  111. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js +0 -81
  112. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
  113. package/dist/apps/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
  114. package/dist/apps/validators/joi-validators/create.appAuth.validator.js +0 -64
  115. package/dist/apps/validators/joi-validators/create.appAuth.validator.js.map +0 -1
  116. package/dist/apps/validators/joi-validators/create.appBody.validators.d.ts +0 -4
  117. package/dist/apps/validators/joi-validators/create.appBody.validators.js +0 -44
  118. package/dist/apps/validators/joi-validators/create.appBody.validators.js.map +0 -1
  119. package/dist/apps/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
  120. package/dist/apps/validators/joi-validators/create.appConstants.validator.js +0 -45
  121. package/dist/apps/validators/joi-validators/create.appConstants.validator.js.map +0 -1
  122. package/dist/apps/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
  123. package/dist/apps/validators/joi-validators/create.appEnv.validator.js +0 -50
  124. package/dist/apps/validators/joi-validators/create.appEnv.validator.js.map +0 -1
  125. package/dist/apps/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
  126. package/dist/apps/validators/joi-validators/create.appVariable.validator.js +0 -47
  127. package/dist/apps/validators/joi-validators/create.appVariable.validator.js.map +0 -1
  128. package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +0 -4
  129. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +0 -60
  130. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +0 -1
  131. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.d.ts +0 -3
  132. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js +0 -48
  133. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js.map +0 -1
  134. package/dist/apps/validators/joi-validators/sample.validator.d.ts +0 -6
  135. package/dist/apps/validators/joi-validators/sample.validator.js +0 -65
  136. package/dist/apps/validators/joi-validators/sample.validator.js.map +0 -1
  137. package/dist/apps/validators/joi-validators/update.app.validator.d.ts +0 -4
  138. package/dist/apps/validators/joi-validators/update.app.validator.js +0 -66
  139. package/dist/apps/validators/joi-validators/update.app.validator.js.map +0 -1
  140. package/dist/apps/validators/joi-validators/update.appAction.validator.d.ts +0 -4
  141. package/dist/apps/validators/joi-validators/update.appAction.validator.js +0 -76
  142. package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +0 -1
  143. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
  144. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +0 -57
  145. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
  146. package/dist/apps/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
  147. package/dist/apps/validators/joi-validators/update.appAuth.validator.js +0 -52
  148. package/dist/apps/validators/joi-validators/update.appAuth.validator.js.map +0 -1
  149. package/dist/apps/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
  150. package/dist/apps/validators/joi-validators/update.appConstants.validator.js +0 -45
  151. package/dist/apps/validators/joi-validators/update.appConstants.validator.js.map +0 -1
  152. package/dist/apps/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
  153. package/dist/apps/validators/joi-validators/update.appEnv.validator.js +0 -50
  154. package/dist/apps/validators/joi-validators/update.appEnv.validator.js.map +0 -1
  155. package/dist/apps/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
  156. package/dist/apps/validators/joi-validators/update.appVariables.validator.js +0 -47
  157. package/dist/apps/validators/joi-validators/update.appVariables.validator.js.map +0 -1
  158. package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +0 -4
  159. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +0 -59
  160. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +0 -1
  161. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.d.ts +0 -3
  162. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js +0 -48
  163. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js.map +0 -1
  164. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
  165. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js +0 -60
  166. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
  167. package/dist/bin.d.ts +0 -26
  168. package/dist/bin.js +0 -28
  169. package/dist/bin.js.map +0 -1
  170. package/dist/brokers/brokers.service.d.ts +0 -438
  171. package/dist/brokers/brokers.service.js +0 -1294
  172. package/dist/brokers/brokers.service.js.map +0 -1
  173. package/dist/brokers/index.d.ts +0 -46
  174. package/dist/brokers/index.js +0 -83
  175. package/dist/brokers/index.js.map +0 -1
  176. package/dist/brokers/types/index.d.ts +0 -569
  177. package/dist/brokers/types/index.js +0 -8
  178. package/dist/brokers/types/index.js.map +0 -1
  179. package/dist/brokers/utils/broker.util.d.ts +0 -33
  180. package/dist/brokers/utils/broker.util.js +0 -125
  181. package/dist/brokers/utils/broker.util.js.map +0 -1
  182. package/dist/brokers/utils/providers/aws-sqs.service.d.ts +0 -16
  183. package/dist/brokers/utils/providers/aws-sqs.service.js +0 -71
  184. package/dist/brokers/utils/providers/aws-sqs.service.js.map +0 -1
  185. package/dist/brokers/utils/providers/google-pubsub.service.d.ts +0 -16
  186. package/dist/brokers/utils/providers/google-pubsub.service.js +0 -43
  187. package/dist/brokers/utils/providers/google-pubsub.service.js.map +0 -1
  188. package/dist/brokers/utils/providers/index.d.ts +0 -6
  189. package/dist/brokers/utils/providers/index.js +0 -16
  190. package/dist/brokers/utils/providers/index.js.map +0 -1
  191. package/dist/brokers/utils/providers/kafka.service.d.ts +0 -23
  192. package/dist/brokers/utils/providers/kafka.service.js +0 -131
  193. package/dist/brokers/utils/providers/kafka.service.js.map +0 -1
  194. package/dist/brokers/utils/providers/nats.service.d.ts +0 -18
  195. package/dist/brokers/utils/providers/nats.service.js +0 -63
  196. package/dist/brokers/utils/providers/nats.service.js.map +0 -1
  197. package/dist/brokers/utils/providers/rabbitmq.service.d.ts +0 -25
  198. package/dist/brokers/utils/providers/rabbitmq.service.js +0 -138
  199. package/dist/brokers/utils/providers/rabbitmq.service.js.map +0 -1
  200. package/dist/brokers/utils/providers/redis.service.d.ts +0 -18
  201. package/dist/brokers/utils/providers/redis.service.js +0 -93
  202. package/dist/brokers/utils/providers/redis.service.js.map +0 -1
  203. package/dist/cache/cache.manager.d.ts +0 -308
  204. package/dist/cache/cache.manager.js +0 -900
  205. package/dist/cache/cache.manager.js.map +0 -1
  206. package/dist/cache/cache.service.d.ts +0 -192
  207. package/dist/cache/cache.service.js +0 -596
  208. package/dist/cache/cache.service.js.map +0 -1
  209. package/dist/cache/index.d.ts +0 -52
  210. package/dist/cache/index.js +0 -81
  211. package/dist/cache/index.js.map +0 -1
  212. package/dist/cache/types/index.d.ts +0 -112
  213. package/dist/cache/types/index.js +0 -6
  214. package/dist/cache/types/index.js.map +0 -1
  215. package/dist/clients/apps.client.d.ts +0 -4
  216. package/dist/clients/apps.client.js +0 -31
  217. package/dist/clients/apps.client.js.map +0 -1
  218. package/dist/clients/email.client.d.ts +0 -4
  219. package/dist/clients/email.client.js +0 -29
  220. package/dist/clients/email.client.js.map +0 -1
  221. package/dist/clients/expo.client.d.ts +0 -3
  222. package/dist/clients/expo.client.js +0 -28
  223. package/dist/clients/expo.client.js.map +0 -1
  224. package/dist/clients/function.client.d.ts +0 -3
  225. package/dist/clients/function.client.js +0 -27
  226. package/dist/clients/function.client.js.map +0 -1
  227. package/dist/clients/http.client.d.ts +0 -3
  228. package/dist/clients/http.client.js +0 -27
  229. package/dist/clients/http.client.js.map +0 -1
  230. package/dist/clients/logs.client.d.ts +0 -4
  231. package/dist/clients/logs.client.js +0 -34
  232. package/dist/clients/logs.client.js.map +0 -1
  233. package/dist/clients/pricing.client.d.ts +0 -4
  234. package/dist/clients/pricing.client.js +0 -34
  235. package/dist/clients/pricing.client.js.map +0 -1
  236. package/dist/clients/products.client.d.ts +0 -3
  237. package/dist/clients/products.client.js +0 -32
  238. package/dist/clients/products.client.js.map +0 -1
  239. package/dist/clients/users.client.d.ts +0 -4
  240. package/dist/clients/users.client.js +0 -34
  241. package/dist/clients/users.client.js.map +0 -1
  242. package/dist/clients/webhooks.client.d.ts +0 -4
  243. package/dist/clients/webhooks.client.js +0 -34
  244. package/dist/clients/webhooks.client.js.map +0 -1
  245. package/dist/clients/workspace.client.d.ts +0 -7
  246. package/dist/clients/workspace.client.js +0 -39
  247. package/dist/clients/workspace.client.js.map +0 -1
  248. package/dist/database/actions/action-manager.d.ts +0 -170
  249. package/dist/database/actions/action-manager.js +0 -465
  250. package/dist/database/actions/action-manager.js.map +0 -1
  251. package/dist/database/actions/index.d.ts +0 -6
  252. package/dist/database/actions/index.js +0 -13
  253. package/dist/database/actions/index.js.map +0 -1
  254. package/dist/database/adapters/adapter.factory.d.ts +0 -62
  255. package/dist/database/adapters/adapter.factory.js +0 -97
  256. package/dist/database/adapters/adapter.factory.js.map +0 -1
  257. package/dist/database/adapters/base.adapter.d.ts +0 -423
  258. package/dist/database/adapters/base.adapter.js +0 -260
  259. package/dist/database/adapters/base.adapter.js.map +0 -1
  260. package/dist/database/adapters/cassandra.adapter.d.ts +0 -92
  261. package/dist/database/adapters/cassandra.adapter.js +0 -1091
  262. package/dist/database/adapters/cassandra.adapter.js.map +0 -1
  263. package/dist/database/adapters/dynamodb.adapter.d.ts +0 -110
  264. package/dist/database/adapters/dynamodb.adapter.js +0 -1564
  265. package/dist/database/adapters/dynamodb.adapter.js.map +0 -1
  266. package/dist/database/adapters/index.d.ts +0 -11
  267. package/dist/database/adapters/index.js +0 -27
  268. package/dist/database/adapters/index.js.map +0 -1
  269. package/dist/database/adapters/mariadb.adapter.d.ts +0 -100
  270. package/dist/database/adapters/mariadb.adapter.js +0 -247
  271. package/dist/database/adapters/mariadb.adapter.js.map +0 -1
  272. package/dist/database/adapters/mongodb.adapter.d.ts +0 -121
  273. package/dist/database/adapters/mongodb.adapter.js +0 -1284
  274. package/dist/database/adapters/mongodb.adapter.js.map +0 -1
  275. package/dist/database/adapters/mysql.adapter.d.ts +0 -86
  276. package/dist/database/adapters/mysql.adapter.js +0 -1371
  277. package/dist/database/adapters/mysql.adapter.js.map +0 -1
  278. package/dist/database/adapters/postgresql.adapter.d.ts +0 -90
  279. package/dist/database/adapters/postgresql.adapter.js +0 -1487
  280. package/dist/database/adapters/postgresql.adapter.js.map +0 -1
  281. package/dist/database/databases.service.d.ts +0 -1496
  282. package/dist/database/databases.service.js +0 -3294
  283. package/dist/database/databases.service.js.map +0 -1
  284. package/dist/database/index.d.ts +0 -46
  285. package/dist/database/index.js +0 -109
  286. package/dist/database/index.js.map +0 -1
  287. package/dist/database/migrations/index.d.ts +0 -6
  288. package/dist/database/migrations/index.js +0 -12
  289. package/dist/database/migrations/index.js.map +0 -1
  290. package/dist/database/migrations/migration-engine.d.ts +0 -136
  291. package/dist/database/migrations/migration-engine.js +0 -1421
  292. package/dist/database/migrations/migration-engine.js.map +0 -1
  293. package/dist/database/operators/aggregation-builder.d.ts +0 -67
  294. package/dist/database/operators/aggregation-builder.js +0 -841
  295. package/dist/database/operators/aggregation-builder.js.map +0 -1
  296. package/dist/database/operators/index.d.ts +0 -7
  297. package/dist/database/operators/index.js +0 -15
  298. package/dist/database/operators/index.js.map +0 -1
  299. package/dist/database/operators/query-builder.d.ts +0 -69
  300. package/dist/database/operators/query-builder.js +0 -447
  301. package/dist/database/operators/query-builder.js.map +0 -1
  302. package/dist/database/presave/decrypt.d.ts +0 -25
  303. package/dist/database/presave/decrypt.js +0 -146
  304. package/dist/database/presave/decrypt.js.map +0 -1
  305. package/dist/database/presave/index.d.ts +0 -9
  306. package/dist/database/presave/index.js +0 -18
  307. package/dist/database/presave/index.js.map +0 -1
  308. package/dist/database/presave/presave-processor.d.ts +0 -148
  309. package/dist/database/presave/presave-processor.js +0 -702
  310. package/dist/database/presave/presave-processor.js.map +0 -1
  311. package/dist/database/schema/index.d.ts +0 -7
  312. package/dist/database/schema/index.js +0 -13
  313. package/dist/database/schema/index.js.map +0 -1
  314. package/dist/database/schema/schema-manager.d.ts +0 -258
  315. package/dist/database/schema/schema-manager.js +0 -638
  316. package/dist/database/schema/schema-manager.js.map +0 -1
  317. package/dist/database/transactions/index.d.ts +0 -6
  318. package/dist/database/transactions/index.js +0 -13
  319. package/dist/database/transactions/index.js.map +0 -1
  320. package/dist/database/transactions/transaction-manager.d.ts +0 -113
  321. package/dist/database/transactions/transaction-manager.js +0 -344
  322. package/dist/database/transactions/transaction-manager.js.map +0 -1
  323. package/dist/database/triggers/index.d.ts +0 -7
  324. package/dist/database/triggers/index.js +0 -14
  325. package/dist/database/triggers/index.js.map +0 -1
  326. package/dist/database/triggers/trigger-processor.d.ts +0 -239
  327. package/dist/database/triggers/trigger-processor.js +0 -1034
  328. package/dist/database/triggers/trigger-processor.js.map +0 -1
  329. package/dist/database/types/action.interface.d.ts +0 -148
  330. package/dist/database/types/action.interface.js +0 -6
  331. package/dist/database/types/action.interface.js.map +0 -1
  332. package/dist/database/types/aggregation.interface.d.ts +0 -185
  333. package/dist/database/types/aggregation.interface.js +0 -6
  334. package/dist/database/types/aggregation.interface.js.map +0 -1
  335. package/dist/database/types/connection.interface.d.ts +0 -137
  336. package/dist/database/types/connection.interface.js +0 -6
  337. package/dist/database/types/connection.interface.js.map +0 -1
  338. package/dist/database/types/dashboard.interface.d.ts +0 -74
  339. package/dist/database/types/dashboard.interface.js +0 -7
  340. package/dist/database/types/dashboard.interface.js.map +0 -1
  341. package/dist/database/types/enums.d.ts +0 -195
  342. package/dist/database/types/enums.js +0 -244
  343. package/dist/database/types/enums.js.map +0 -1
  344. package/dist/database/types/index.d.ts +0 -15
  345. package/dist/database/types/index.js +0 -31
  346. package/dist/database/types/index.js.map +0 -1
  347. package/dist/database/types/migration.interface.d.ts +0 -686
  348. package/dist/database/types/migration.interface.js +0 -9
  349. package/dist/database/types/migration.interface.js.map +0 -1
  350. package/dist/database/types/presave.interface.d.ts +0 -292
  351. package/dist/database/types/presave.interface.js +0 -60
  352. package/dist/database/types/presave.interface.js.map +0 -1
  353. package/dist/database/types/query.interface.d.ts +0 -205
  354. package/dist/database/types/query.interface.js +0 -6
  355. package/dist/database/types/query.interface.js.map +0 -1
  356. package/dist/database/types/schema.interface.d.ts +0 -412
  357. package/dist/database/types/schema.interface.js +0 -6
  358. package/dist/database/types/schema.interface.js.map +0 -1
  359. package/dist/database/types/transaction.interface.d.ts +0 -84
  360. package/dist/database/types/transaction.interface.js +0 -6
  361. package/dist/database/types/transaction.interface.js.map +0 -1
  362. package/dist/database/types/trigger.interface.d.ts +0 -612
  363. package/dist/database/types/trigger.interface.js +0 -121
  364. package/dist/database/types/trigger.interface.js.map +0 -1
  365. package/dist/database/types/write.interface.d.ts +0 -216
  366. package/dist/database/types/write.interface.js +0 -6
  367. package/dist/database/types/write.interface.js.map +0 -1
  368. package/dist/database/utils/database-error.d.ts +0 -96
  369. package/dist/database/utils/database-error.js +0 -221
  370. package/dist/database/utils/database-error.js.map +0 -1
  371. package/dist/database/utils/index.d.ts +0 -6
  372. package/dist/database/utils/index.js +0 -11
  373. package/dist/database/utils/index.js.map +0 -1
  374. package/dist/graph/adapters/adapter.factory.d.ts +0 -47
  375. package/dist/graph/adapters/adapter.factory.js +0 -77
  376. package/dist/graph/adapters/adapter.factory.js.map +0 -1
  377. package/dist/graph/adapters/arangodb.adapter.d.ts +0 -86
  378. package/dist/graph/adapters/arangodb.adapter.js +0 -1588
  379. package/dist/graph/adapters/arangodb.adapter.js.map +0 -1
  380. package/dist/graph/adapters/base.adapter.d.ts +0 -264
  381. package/dist/graph/adapters/base.adapter.js +0 -156
  382. package/dist/graph/adapters/base.adapter.js.map +0 -1
  383. package/dist/graph/adapters/index.d.ts +0 -11
  384. package/dist/graph/adapters/index.js +0 -21
  385. package/dist/graph/adapters/index.js.map +0 -1
  386. package/dist/graph/adapters/memgraph.adapter.d.ts +0 -110
  387. package/dist/graph/adapters/memgraph.adapter.js +0 -1452
  388. package/dist/graph/adapters/memgraph.adapter.js.map +0 -1
  389. package/dist/graph/adapters/neo4j.adapter.d.ts +0 -81
  390. package/dist/graph/adapters/neo4j.adapter.js +0 -1317
  391. package/dist/graph/adapters/neo4j.adapter.js.map +0 -1
  392. package/dist/graph/adapters/neptune.adapter.d.ts +0 -82
  393. package/dist/graph/adapters/neptune.adapter.js +0 -1369
  394. package/dist/graph/adapters/neptune.adapter.js.map +0 -1
  395. package/dist/graph/graphs.service.d.ts +0 -617
  396. package/dist/graph/graphs.service.js +0 -2594
  397. package/dist/graph/graphs.service.js.map +0 -1
  398. package/dist/graph/index.d.ts +0 -57
  399. package/dist/graph/index.js +0 -77
  400. package/dist/graph/index.js.map +0 -1
  401. package/dist/graph/transactions/index.d.ts +0 -4
  402. package/dist/graph/transactions/index.js +0 -9
  403. package/dist/graph/transactions/index.js.map +0 -1
  404. package/dist/graph/transactions/transaction-manager.d.ts +0 -61
  405. package/dist/graph/transactions/transaction-manager.js +0 -126
  406. package/dist/graph/transactions/transaction-manager.js.map +0 -1
  407. package/dist/graph/types/connection.interface.d.ts +0 -149
  408. package/dist/graph/types/connection.interface.js +0 -9
  409. package/dist/graph/types/connection.interface.js.map +0 -1
  410. package/dist/graph/types/enums.d.ts +0 -101
  411. package/dist/graph/types/enums.js +0 -114
  412. package/dist/graph/types/enums.js.map +0 -1
  413. package/dist/graph/types/index.d.ts +0 -13
  414. package/dist/graph/types/index.js +0 -20
  415. package/dist/graph/types/index.js.map +0 -1
  416. package/dist/graph/types/node.interface.d.ts +0 -248
  417. package/dist/graph/types/node.interface.js +0 -9
  418. package/dist/graph/types/node.interface.js.map +0 -1
  419. package/dist/graph/types/query.interface.d.ts +0 -175
  420. package/dist/graph/types/query.interface.js +0 -9
  421. package/dist/graph/types/query.interface.js.map +0 -1
  422. package/dist/graph/types/relationship.interface.d.ts +0 -207
  423. package/dist/graph/types/relationship.interface.js +0 -9
  424. package/dist/graph/types/relationship.interface.js.map +0 -1
  425. package/dist/graph/types/schema.interface.d.ts +0 -295
  426. package/dist/graph/types/schema.interface.js +0 -9
  427. package/dist/graph/types/schema.interface.js.map +0 -1
  428. package/dist/graph/types/transaction.interface.d.ts +0 -55
  429. package/dist/graph/types/transaction.interface.js +0 -9
  430. package/dist/graph/types/transaction.interface.js.map +0 -1
  431. package/dist/graph/types/traversal.interface.d.ts +0 -181
  432. package/dist/graph/types/traversal.interface.js +0 -9
  433. package/dist/graph/types/traversal.interface.js.map +0 -1
  434. package/dist/graph/utils/graph-error.d.ts +0 -71
  435. package/dist/graph/utils/graph-error.js +0 -142
  436. package/dist/graph/utils/graph-error.js.map +0 -1
  437. package/dist/graph/utils/index.d.ts +0 -4
  438. package/dist/graph/utils/index.js +0 -9
  439. package/dist/graph/utils/index.js.map +0 -1
  440. package/dist/imports/imports.repo.d.ts +0 -0
  441. package/dist/imports/imports.repo.js +0 -1
  442. package/dist/imports/imports.repo.js.map +0 -1
  443. package/dist/imports/imports.service.d.ts +0 -23
  444. package/dist/imports/imports.service.js +0 -71
  445. package/dist/imports/imports.service.js.map +0 -1
  446. package/dist/imports/imports.types.d.ts +0 -350
  447. package/dist/imports/imports.types.js +0 -33
  448. package/dist/imports/imports.types.js.map +0 -1
  449. package/dist/imports/openAPI3.0.types.d.ts +0 -52
  450. package/dist/imports/openAPI3.0.types.js +0 -3
  451. package/dist/imports/openAPI3.0.types.js.map +0 -1
  452. package/dist/imports/repos/openApi.repo.d.ts +0 -6
  453. package/dist/imports/repos/openApi.repo.js +0 -422
  454. package/dist/imports/repos/openApi.repo.js.map +0 -1
  455. package/dist/imports/repos/postmanV21.repo.d.ts +0 -14
  456. package/dist/imports/repos/postmanV21.repo.js +0 -257
  457. package/dist/imports/repos/postmanV21.repo.js.map +0 -1
  458. package/dist/imports/utils/imports.utils.d.ts +0 -80
  459. package/dist/imports/utils/imports.utils.js +0 -114
  460. package/dist/imports/utils/imports.utils.js.map +0 -1
  461. package/dist/imports/validators/index.d.ts +0 -0
  462. package/dist/imports/validators/index.js +0 -1
  463. package/dist/imports/validators/index.js.map +0 -1
  464. package/dist/imports/validators/joi-validators/postmanV21.validator.d.ts +0 -5
  465. package/dist/imports/validators/joi-validators/postmanV21.validator.js +0 -96
  466. package/dist/imports/validators/joi-validators/postmanV21.validator.js.map +0 -1
  467. package/dist/index.d.ts +0 -4021
  468. package/dist/index.js +0 -5895
  469. package/dist/index.js.map +0 -1
  470. package/dist/init.interface.d.ts +0 -407
  471. package/dist/init.interface.js +0 -3
  472. package/dist/init.interface.js.map +0 -1
  473. package/dist/inputs/inputs.repo.d.ts +0 -7
  474. package/dist/inputs/inputs.repo.js +0 -16
  475. package/dist/inputs/inputs.repo.js.map +0 -1
  476. package/dist/inputs/inputs.service.d.ts +0 -61
  477. package/dist/inputs/inputs.service.js +0 -468
  478. package/dist/inputs/inputs.service.js.map +0 -1
  479. package/dist/inputs/utils/inputs.utils.create.d.ts +0 -11
  480. package/dist/inputs/utils/inputs.utils.create.js +0 -273
  481. package/dist/inputs/utils/inputs.utils.create.js.map +0 -1
  482. package/dist/inputs/validators/inputs.validator.parse.d.ts +0 -4
  483. package/dist/inputs/validators/inputs.validator.parse.js +0 -53
  484. package/dist/inputs/validators/inputs.validator.parse.js.map +0 -1
  485. package/dist/jobs/index.d.ts +0 -38
  486. package/dist/jobs/index.js +0 -50
  487. package/dist/jobs/index.js.map +0 -1
  488. package/dist/jobs/jobs.service.d.ts +0 -154
  489. package/dist/jobs/jobs.service.js +0 -491
  490. package/dist/jobs/jobs.service.js.map +0 -1
  491. package/dist/jobs/jobs.state.d.ts +0 -113
  492. package/dist/jobs/jobs.state.js +0 -447
  493. package/dist/jobs/jobs.state.js.map +0 -1
  494. package/dist/jobs/types.d.ts +0 -449
  495. package/dist/jobs/types.js +0 -74
  496. package/dist/jobs/types.js.map +0 -1
  497. package/dist/logs/logs.repo.d.ts +0 -6
  498. package/dist/logs/logs.repo.js +0 -12
  499. package/dist/logs/logs.repo.js.map +0 -1
  500. package/dist/logs/logs.service.d.ts +0 -30
  501. package/dist/logs/logs.service.js +0 -89
  502. package/dist/logs/logs.service.js.map +0 -1
  503. package/dist/logs/logs.types.d.ts +0 -85
  504. package/dist/logs/logs.types.js +0 -52
  505. package/dist/logs/logs.types.js.map +0 -1
  506. package/dist/logs/utils/logs.utils.create.d.ts +0 -0
  507. package/dist/logs/utils/logs.utils.create.js +0 -1
  508. package/dist/logs/utils/logs.utils.create.js.map +0 -1
  509. package/dist/logs/utils/logs.utils.errors.d.ts +0 -2
  510. package/dist/logs/utils/logs.utils.errors.js +0 -8
  511. package/dist/logs/utils/logs.utils.errors.js.map +0 -1
  512. package/dist/models/index.d.ts +0 -6
  513. package/dist/models/index.js +0 -11
  514. package/dist/models/index.js.map +0 -1
  515. package/dist/models/models.service.d.ts +0 -137
  516. package/dist/models/models.service.js +0 -195
  517. package/dist/models/models.service.js.map +0 -1
  518. package/dist/notifications/index.d.ts +0 -13
  519. package/dist/notifications/index.js +0 -26
  520. package/dist/notifications/index.js.map +0 -1
  521. package/dist/notifications/notifications.service.d.ts +0 -268
  522. package/dist/notifications/notifications.service.js +0 -907
  523. package/dist/notifications/notifications.service.js.map +0 -1
  524. package/dist/notifications/types/index.d.ts +0 -4
  525. package/dist/notifications/types/index.js +0 -21
  526. package/dist/notifications/types/index.js.map +0 -1
  527. package/dist/notifications/types/notifications.types.d.ts +0 -454
  528. package/dist/notifications/types/notifications.types.js +0 -51
  529. package/dist/notifications/types/notifications.types.js.map +0 -1
  530. package/dist/parsers/index.d.ts +0 -3
  531. package/dist/parsers/index.js +0 -27
  532. package/dist/parsers/index.js.map +0 -1
  533. package/dist/parsers/pipelines/postman.pipelines.d.ts +0 -15
  534. package/dist/parsers/pipelines/postman.pipelines.js +0 -103
  535. package/dist/parsers/pipelines/postman.pipelines.js.map +0 -1
  536. package/dist/parsers/types/postman.types.d.ts +0 -200
  537. package/dist/parsers/types/postman.types.js +0 -3
  538. package/dist/parsers/types/postman.types.js.map +0 -1
  539. package/dist/parsers/utils/postman.utils.d.ts +0 -12
  540. package/dist/parsers/utils/postman.utils.js +0 -116
  541. package/dist/parsers/utils/postman.utils.js.map +0 -1
  542. package/dist/parsers/validators/postman-auth.validators.d.ts +0 -10
  543. package/dist/parsers/validators/postman-auth.validators.js +0 -127
  544. package/dist/parsers/validators/postman-auth.validators.js.map +0 -1
  545. package/dist/parsers/validators/postman-request.validators.d.ts +0 -13
  546. package/dist/parsers/validators/postman-request.validators.js +0 -139
  547. package/dist/parsers/validators/postman-request.validators.js.map +0 -1
  548. package/dist/parsers/validators/postman-response.validators.d.ts +0 -13
  549. package/dist/parsers/validators/postman-response.validators.js +0 -150
  550. package/dist/parsers/validators/postman-response.validators.js.map +0 -1
  551. package/dist/parsers/validators/postman-variable.validators.d.ts +0 -14
  552. package/dist/parsers/validators/postman-variable.validators.js +0 -163
  553. package/dist/parsers/validators/postman-variable.validators.js.map +0 -1
  554. package/dist/pricing/pricing.repo.d.ts +0 -0
  555. package/dist/pricing/pricing.repo.js +0 -1
  556. package/dist/pricing/pricing.repo.js.map +0 -1
  557. package/dist/pricing/pricing.service.d.ts +0 -24
  558. package/dist/pricing/pricing.service.js +0 -51
  559. package/dist/pricing/pricing.service.js.map +0 -1
  560. package/dist/pricing/pricing.types.d.ts +0 -76
  561. package/dist/pricing/pricing.types.js +0 -21
  562. package/dist/pricing/pricing.types.js.map +0 -1
  563. package/dist/pricing/utils/string.utils.d.ts +0 -1
  564. package/dist/pricing/utils/string.utils.js +0 -9
  565. package/dist/pricing/utils/string.utils.js.map +0 -1
  566. package/dist/processor/repos/mongo.repo.d.ts +0 -39
  567. package/dist/processor/repos/mongo.repo.js +0 -260
  568. package/dist/processor/repos/mongo.repo.js.map +0 -1
  569. package/dist/processor/repos/postgres.repo.d.ts +0 -31
  570. package/dist/processor/repos/postgres.repo.js +0 -185
  571. package/dist/processor/repos/postgres.repo.js.map +0 -1
  572. package/dist/processor/repos/sms.repo.d.ts +0 -39
  573. package/dist/processor/repos/sms.repo.js +0 -124
  574. package/dist/processor/repos/sms.repo.js.map +0 -1
  575. package/dist/processor/services/processor.service.d.ts +0 -465
  576. package/dist/processor/services/processor.service.js +0 -5343
  577. package/dist/processor/services/processor.service.js.map +0 -1
  578. package/dist/processor/services/request.service.d.ts +0 -36
  579. package/dist/processor/services/request.service.js +0 -304
  580. package/dist/processor/services/request.service.js.map +0 -1
  581. package/dist/processor/types/request.types.d.ts +0 -14
  582. package/dist/processor/types/request.types.js +0 -3
  583. package/dist/processor/types/request.types.js.map +0 -1
  584. package/dist/processor/utils/processor.utils.d.ts +0 -104
  585. package/dist/processor/utils/processor.utils.js +0 -1066
  586. package/dist/processor/utils/processor.utils.js.map +0 -1
  587. package/dist/processor/utils/request.utils.d.ts +0 -20
  588. package/dist/processor/utils/request.utils.js +0 -113
  589. package/dist/processor/utils/request.utils.js.map +0 -1
  590. package/dist/processor/utils/storage.util.d.ts +0 -8
  591. package/dist/processor/utils/storage.util.js +0 -106
  592. package/dist/processor/utils/storage.util.js.map +0 -1
  593. package/dist/products/services/products.service.d.ts +0 -577
  594. package/dist/products/services/products.service.js +0 -5845
  595. package/dist/products/services/products.service.js.map +0 -1
  596. package/dist/products/utils/crypt.utils.d.ts +0 -1
  597. package/dist/products/utils/crypt.utils.js +0 -17
  598. package/dist/products/utils/crypt.utils.js.map +0 -1
  599. package/dist/products/utils/functions.utils.d.ts +0 -13
  600. package/dist/products/utils/functions.utils.js +0 -294
  601. package/dist/products/utils/functions.utils.js.map +0 -1
  602. package/dist/products/utils/objects.utils.d.ts +0 -13
  603. package/dist/products/utils/objects.utils.js +0 -89
  604. package/dist/products/utils/objects.utils.js.map +0 -1
  605. package/dist/products/utils/string.utils.d.ts +0 -12
  606. package/dist/products/utils/string.utils.js +0 -168
  607. package/dist/products/utils/string.utils.js.map +0 -1
  608. package/dist/products/validators/index.d.ts +0 -33
  609. package/dist/products/validators/index.js +0 -75
  610. package/dist/products/validators/index.js.map +0 -1
  611. package/dist/products/validators/joi-validators/create.html.validator.d.ts +0 -2
  612. package/dist/products/validators/joi-validators/create.html.validator.js +0 -55
  613. package/dist/products/validators/joi-validators/create.html.validator.js.map +0 -1
  614. package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +0 -3
  615. package/dist/products/validators/joi-validators/create.productAgent.validator.js +0 -266
  616. package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +0 -1
  617. package/dist/products/validators/joi-validators/create.productApp.validator.d.ts +0 -4
  618. package/dist/products/validators/joi-validators/create.productApp.validator.js +0 -61
  619. package/dist/products/validators/joi-validators/create.productApp.validator.js.map +0 -1
  620. package/dist/products/validators/joi-validators/create.productCache.validator.d.ts +0 -3
  621. package/dist/products/validators/joi-validators/create.productCache.validator.js +0 -46
  622. package/dist/products/validators/joi-validators/create.productCache.validator.js.map +0 -1
  623. package/dist/products/validators/joi-validators/create.productDatabase.validator.d.ts +0 -3
  624. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +0 -77
  625. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +0 -1
  626. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +0 -7
  627. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +0 -194
  628. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +0 -1
  629. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.d.ts +0 -4
  630. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js +0 -63
  631. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js.map +0 -1
  632. package/dist/products/validators/joi-validators/create.productEnv.validator.d.ts +0 -3
  633. package/dist/products/validators/joi-validators/create.productEnv.validator.js +0 -45
  634. package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +0 -1
  635. package/dist/products/validators/joi-validators/create.productFallback.validator.d.ts +0 -3
  636. package/dist/products/validators/joi-validators/create.productFallback.validator.js +0 -64
  637. package/dist/products/validators/joi-validators/create.productFallback.validator.js.map +0 -1
  638. package/dist/products/validators/joi-validators/create.productFeature.validator.d.ts +0 -14
  639. package/dist/products/validators/joi-validators/create.productFeature.validator.js +0 -140
  640. package/dist/products/validators/joi-validators/create.productFeature.validator.js.map +0 -1
  641. package/dist/products/validators/joi-validators/create.productFunction.validator.d.ts +0 -3
  642. package/dist/products/validators/joi-validators/create.productFunction.validator.js +0 -57
  643. package/dist/products/validators/joi-validators/create.productFunction.validator.js.map +0 -1
  644. package/dist/products/validators/joi-validators/create.productGraph.validator.d.ts +0 -3
  645. package/dist/products/validators/joi-validators/create.productGraph.validator.js +0 -89
  646. package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +0 -1
  647. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +0 -4
  648. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +0 -58
  649. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +0 -1
  650. package/dist/products/validators/joi-validators/create.productJob.validator.d.ts +0 -12
  651. package/dist/products/validators/joi-validators/create.productJob.validator.js +0 -60
  652. package/dist/products/validators/joi-validators/create.productJob.validator.js.map +0 -1
  653. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.d.ts +0 -3
  654. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -52
  655. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +0 -1
  656. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.d.ts +0 -3
  657. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +0 -193
  658. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +0 -1
  659. package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +0 -3
  660. package/dist/products/validators/joi-validators/create.productModel.validator.js +0 -132
  661. package/dist/products/validators/joi-validators/create.productModel.validator.js.map +0 -1
  662. package/dist/products/validators/joi-validators/create.productNotification.validator.d.ts +0 -4
  663. package/dist/products/validators/joi-validators/create.productNotification.validator.js +0 -241
  664. package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +0 -1
  665. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.d.ts +0 -3
  666. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js +0 -57
  667. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js.map +0 -1
  668. package/dist/products/validators/joi-validators/create.productNotifications.validator.d.ts +0 -0
  669. package/dist/products/validators/joi-validators/create.productNotifications.validator.js +0 -1
  670. package/dist/products/validators/joi-validators/create.productNotifications.validator.js.map +0 -1
  671. package/dist/products/validators/joi-validators/create.productQuota.validator.d.ts +0 -3
  672. package/dist/products/validators/joi-validators/create.productQuota.validator.js +0 -67
  673. package/dist/products/validators/joi-validators/create.productQuota.validator.js.map +0 -1
  674. package/dist/products/validators/joi-validators/create.productStorage.validator.d.ts +0 -3
  675. package/dist/products/validators/joi-validators/create.productStorage.validator.js +0 -158
  676. package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +0 -1
  677. package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +0 -3
  678. package/dist/products/validators/joi-validators/create.productVector.validator.js +0 -136
  679. package/dist/products/validators/joi-validators/create.productVector.validator.js.map +0 -1
  680. package/dist/products/validators/joi-validators/create.products.validator.d.ts +0 -3
  681. package/dist/products/validators/joi-validators/create.products.validator.js +0 -43
  682. package/dist/products/validators/joi-validators/create.products.validator.js.map +0 -1
  683. package/dist/products/validators/joi-validators/create.requestAction.validator.d.ts +0 -2
  684. package/dist/products/validators/joi-validators/create.requestAction.validator.js +0 -45
  685. package/dist/products/validators/joi-validators/create.requestAction.validator.js.map +0 -1
  686. package/dist/products/validators/joi-validators/create.userAuth.validator.d.ts +0 -3
  687. package/dist/products/validators/joi-validators/create.userAuth.validator.js +0 -48
  688. package/dist/products/validators/joi-validators/create.userAuth.validator.js.map +0 -1
  689. package/dist/products/validators/joi-validators/register.productWebhooks.validator.d.ts +0 -3
  690. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js +0 -48
  691. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js.map +0 -1
  692. package/dist/products/validators/joi-validators/update.dataValue.validator.d.ts +0 -3
  693. package/dist/products/validators/joi-validators/update.dataValue.validator.js +0 -103
  694. package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +0 -1
  695. package/dist/products/validators/joi-validators/update.productApp.validator.d.ts +0 -3
  696. package/dist/products/validators/joi-validators/update.productApp.validator.js +0 -42
  697. package/dist/products/validators/joi-validators/update.productApp.validator.js.map +0 -1
  698. package/dist/products/validators/joi-validators/update.productCache.validator.d.ts +0 -3
  699. package/dist/products/validators/joi-validators/update.productCache.validator.js +0 -45
  700. package/dist/products/validators/joi-validators/update.productCache.validator.js.map +0 -1
  701. package/dist/products/validators/joi-validators/update.productDatabase.validator.d.ts +0 -3
  702. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +0 -76
  703. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +0 -1
  704. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -3
  705. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +0 -79
  706. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +0 -1
  707. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.d.ts +0 -4
  708. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js +0 -64
  709. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js.map +0 -1
  710. package/dist/products/validators/joi-validators/update.productEnv.validator.d.ts +0 -3
  711. package/dist/products/validators/joi-validators/update.productEnv.validator.js +0 -46
  712. package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +0 -1
  713. package/dist/products/validators/joi-validators/update.productFallback.validator.d.ts +0 -3
  714. package/dist/products/validators/joi-validators/update.productFallback.validator.js +0 -60
  715. package/dist/products/validators/joi-validators/update.productFallback.validator.js.map +0 -1
  716. package/dist/products/validators/joi-validators/update.productFeature.validator.d.ts +0 -3
  717. package/dist/products/validators/joi-validators/update.productFeature.validator.js +0 -53
  718. package/dist/products/validators/joi-validators/update.productFeature.validator.js.map +0 -1
  719. package/dist/products/validators/joi-validators/update.productFunction.validator.d.ts +0 -3
  720. package/dist/products/validators/joi-validators/update.productFunction.validator.js +0 -41
  721. package/dist/products/validators/joi-validators/update.productFunction.validator.js.map +0 -1
  722. package/dist/products/validators/joi-validators/update.productGraph.validator.d.ts +0 -3
  723. package/dist/products/validators/joi-validators/update.productGraph.validator.js +0 -88
  724. package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +0 -1
  725. package/dist/products/validators/joi-validators/update.productJob.validator.d.ts +0 -3
  726. package/dist/products/validators/joi-validators/update.productJob.validator.js +0 -50
  727. package/dist/products/validators/joi-validators/update.productJob.validator.js.map +0 -1
  728. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.d.ts +0 -3
  729. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -52
  730. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +0 -1
  731. package/dist/products/validators/joi-validators/update.productNotification.validator.d.ts +0 -3
  732. package/dist/products/validators/joi-validators/update.productNotification.validator.js +0 -47
  733. package/dist/products/validators/joi-validators/update.productNotification.validator.js.map +0 -1
  734. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.d.ts +0 -3
  735. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js +0 -58
  736. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js.map +0 -1
  737. package/dist/products/validators/joi-validators/update.productQuota.validator.d.ts +0 -3
  738. package/dist/products/validators/joi-validators/update.productQuota.validator.js +0 -64
  739. package/dist/products/validators/joi-validators/update.productQuota.validator.js.map +0 -1
  740. package/dist/products/validators/joi-validators/update.userAuth.validator.d.ts +0 -3
  741. package/dist/products/validators/joi-validators/update.userAuth.validator.js +0 -48
  742. package/dist/products/validators/joi-validators/update.userAuth.validator.js.map +0 -1
  743. package/dist/resilience/fallback.service.d.ts +0 -141
  744. package/dist/resilience/fallback.service.js +0 -766
  745. package/dist/resilience/fallback.service.js.map +0 -1
  746. package/dist/resilience/healthcheck.service.d.ts +0 -163
  747. package/dist/resilience/healthcheck.service.js +0 -1012
  748. package/dist/resilience/healthcheck.service.js.map +0 -1
  749. package/dist/resilience/index.d.ts +0 -104
  750. package/dist/resilience/index.js +0 -140
  751. package/dist/resilience/index.js.map +0 -1
  752. package/dist/resilience/quota.service.d.ts +0 -83
  753. package/dist/resilience/quota.service.js +0 -518
  754. package/dist/resilience/quota.service.js.map +0 -1
  755. package/dist/resilience/resilience.service.d.ts +0 -98
  756. package/dist/resilience/resilience.service.js +0 -560
  757. package/dist/resilience/resilience.service.js.map +0 -1
  758. package/dist/resilience/types/index.d.ts +0 -513
  759. package/dist/resilience/types/index.js +0 -29
  760. package/dist/resilience/types/index.js.map +0 -1
  761. package/dist/secrets/index.d.ts +0 -10
  762. package/dist/secrets/index.js +0 -33
  763. package/dist/secrets/index.js.map +0 -1
  764. package/dist/secrets/secrets.resolver.d.ts +0 -52
  765. package/dist/secrets/secrets.resolver.js +0 -236
  766. package/dist/secrets/secrets.resolver.js.map +0 -1
  767. package/dist/secrets/secrets.service.d.ts +0 -93
  768. package/dist/secrets/secrets.service.js +0 -246
  769. package/dist/secrets/secrets.service.js.map +0 -1
  770. package/dist/secrets/secrets.types.d.ts +0 -188
  771. package/dist/secrets/secrets.types.js +0 -87
  772. package/dist/secrets/secrets.types.js.map +0 -1
  773. package/dist/sessions/index.d.ts +0 -50
  774. package/dist/sessions/index.js +0 -96
  775. package/dist/sessions/index.js.map +0 -1
  776. package/dist/sessions/sessions.helper.d.ts +0 -88
  777. package/dist/sessions/sessions.helper.js +0 -190
  778. package/dist/sessions/sessions.helper.js.map +0 -1
  779. package/dist/sessions/sessions.resolver.d.ts +0 -188
  780. package/dist/sessions/sessions.resolver.js +0 -603
  781. package/dist/sessions/sessions.resolver.js.map +0 -1
  782. package/dist/sessions/sessions.service.d.ts +0 -194
  783. package/dist/sessions/sessions.service.js +0 -988
  784. package/dist/sessions/sessions.service.js.map +0 -1
  785. package/dist/sessions/types/index.d.ts +0 -344
  786. package/dist/sessions/types/index.js +0 -6
  787. package/dist/sessions/types/index.js.map +0 -1
  788. package/dist/storage/index.d.ts +0 -66
  789. package/dist/storage/index.js +0 -99
  790. package/dist/storage/index.js.map +0 -1
  791. package/dist/storage/storage.service.d.ts +0 -177
  792. package/dist/storage/storage.service.js +0 -905
  793. package/dist/storage/storage.service.js.map +0 -1
  794. package/dist/storage/types/index.d.ts +0 -270
  795. package/dist/storage/types/index.js +0 -6
  796. package/dist/storage/types/index.js.map +0 -1
  797. package/dist/storage/utils/storage.util.d.ts +0 -62
  798. package/dist/storage/utils/storage.util.js +0 -593
  799. package/dist/storage/utils/storage.util.js.map +0 -1
  800. package/dist/types/actions.types.d.ts +0 -0
  801. package/dist/types/actions.types.js +0 -1
  802. package/dist/types/actions.types.js.map +0 -1
  803. package/dist/types/appBuilder.types.d.ts +0 -316
  804. package/dist/types/appBuilder.types.js +0 -3
  805. package/dist/types/appBuilder.types.js.map +0 -1
  806. package/dist/types/database.types.d.ts +0 -9
  807. package/dist/types/database.types.js +0 -3
  808. package/dist/types/database.types.js.map +0 -1
  809. package/dist/types/enums.d.ts +0 -231
  810. package/dist/types/enums.js +0 -261
  811. package/dist/types/enums.js.map +0 -1
  812. package/dist/types/index.d.ts +0 -12
  813. package/dist/types/index.js +0 -29
  814. package/dist/types/index.js.map +0 -1
  815. package/dist/types/index.types.d.ts +0 -30
  816. package/dist/types/index.types.js +0 -9
  817. package/dist/types/index.types.js.map +0 -1
  818. package/dist/types/inputs.types.d.ts +0 -114
  819. package/dist/types/inputs.types.js +0 -44
  820. package/dist/types/inputs.types.js.map +0 -1
  821. package/dist/types/logs.types.d.ts +0 -19
  822. package/dist/types/logs.types.js +0 -8
  823. package/dist/types/logs.types.js.map +0 -1
  824. package/dist/types/pricing.types.d.ts +0 -4
  825. package/dist/types/pricing.types.js +0 -3
  826. package/dist/types/pricing.types.js.map +0 -1
  827. package/dist/types/processor.types.d.ts +0 -602
  828. package/dist/types/processor.types.js +0 -19
  829. package/dist/types/processor.types.js.map +0 -1
  830. package/dist/types/productsBuilder.types.d.ts +0 -1566
  831. package/dist/types/productsBuilder.types.js +0 -303
  832. package/dist/types/productsBuilder.types.js.map +0 -1
  833. package/dist/types/request-tracker.interface.d.ts +0 -0
  834. package/dist/types/request-tracker.interface.js +0 -1
  835. package/dist/types/request-tracker.interface.js.map +0 -1
  836. package/dist/types/requests.types.d.ts +0 -8
  837. package/dist/types/requests.types.js +0 -3
  838. package/dist/types/requests.types.js.map +0 -1
  839. package/dist/types/workspaces.types.d.ts +0 -28
  840. package/dist/types/workspaces.types.js +0 -4
  841. package/dist/types/workspaces.types.js.map +0 -1
  842. package/dist/utils/constants.d.ts +0 -1
  843. package/dist/utils/constants.js +0 -5
  844. package/dist/utils/constants.js.map +0 -1
  845. package/dist/utils/index.d.ts +0 -2
  846. package/dist/utils/index.js +0 -109
  847. package/dist/utils/index.js.map +0 -1
  848. package/dist/vector/actions/action-manager.d.ts +0 -140
  849. package/dist/vector/actions/action-manager.js +0 -356
  850. package/dist/vector/actions/action-manager.js.map +0 -1
  851. package/dist/vector/adapters/base.adapter.d.ts +0 -169
  852. package/dist/vector/adapters/base.adapter.js +0 -218
  853. package/dist/vector/adapters/base.adapter.js.map +0 -1
  854. package/dist/vector/adapters/index.d.ts +0 -10
  855. package/dist/vector/adapters/index.js +0 -19
  856. package/dist/vector/adapters/index.js.map +0 -1
  857. package/dist/vector/adapters/memory.adapter.d.ts +0 -85
  858. package/dist/vector/adapters/memory.adapter.js +0 -505
  859. package/dist/vector/adapters/memory.adapter.js.map +0 -1
  860. package/dist/vector/adapters/pinecone.adapter.d.ts +0 -52
  861. package/dist/vector/adapters/pinecone.adapter.js +0 -433
  862. package/dist/vector/adapters/pinecone.adapter.js.map +0 -1
  863. package/dist/vector/adapters/qdrant.adapter.d.ts +0 -56
  864. package/dist/vector/adapters/qdrant.adapter.js +0 -442
  865. package/dist/vector/adapters/qdrant.adapter.js.map +0 -1
  866. package/dist/vector/adapters/weaviate.adapter.d.ts +0 -68
  867. package/dist/vector/adapters/weaviate.adapter.js +0 -661
  868. package/dist/vector/adapters/weaviate.adapter.js.map +0 -1
  869. package/dist/vector/index.d.ts +0 -36
  870. package/dist/vector/index.js +0 -70
  871. package/dist/vector/index.js.map +0 -1
  872. package/dist/vector/types/action.interface.d.ts +0 -195
  873. package/dist/vector/types/action.interface.js +0 -100
  874. package/dist/vector/types/action.interface.js.map +0 -1
  875. package/dist/vector/types/connection.interface.d.ts +0 -151
  876. package/dist/vector/types/connection.interface.js +0 -8
  877. package/dist/vector/types/connection.interface.js.map +0 -1
  878. package/dist/vector/types/embedding.interface.d.ts +0 -144
  879. package/dist/vector/types/embedding.interface.js +0 -8
  880. package/dist/vector/types/embedding.interface.js.map +0 -1
  881. package/dist/vector/types/enums.d.ts +0 -104
  882. package/dist/vector/types/enums.js +0 -113
  883. package/dist/vector/types/enums.js.map +0 -1
  884. package/dist/vector/types/index.d.ts +0 -11
  885. package/dist/vector/types/index.js +0 -23
  886. package/dist/vector/types/index.js.map +0 -1
  887. package/dist/vector/types/vector.interface.d.ts +0 -315
  888. package/dist/vector/types/vector.interface.js +0 -8
  889. package/dist/vector/types/vector.interface.js.map +0 -1
  890. package/dist/vector/utils/index.d.ts +0 -6
  891. package/dist/vector/utils/index.js +0 -11
  892. package/dist/vector/utils/index.js.map +0 -1
  893. package/dist/vector/utils/vector-error.d.ts +0 -69
  894. package/dist/vector/utils/vector-error.js +0 -116
  895. package/dist/vector/utils/vector-error.js.map +0 -1
  896. package/dist/vector/vector-database.service.d.ts +0 -484
  897. package/dist/vector/vector-database.service.js +0 -1002
  898. package/dist/vector/vector-database.service.js.map +0 -1
  899. package/dist/vector/vector.service.d.ts +0 -283
  900. package/dist/vector/vector.service.js +0 -544
  901. package/dist/vector/vector.service.js.map +0 -1
  902. package/dist/warehouse/executor/index.d.ts +0 -5
  903. package/dist/warehouse/executor/index.js +0 -12
  904. package/dist/warehouse/executor/index.js.map +0 -1
  905. package/dist/warehouse/executor/joins/index.d.ts +0 -5
  906. package/dist/warehouse/executor/joins/index.js +0 -11
  907. package/dist/warehouse/executor/joins/index.js.map +0 -1
  908. package/dist/warehouse/executor/joins/join-executor.d.ts +0 -101
  909. package/dist/warehouse/executor/joins/join-executor.js +0 -493
  910. package/dist/warehouse/executor/joins/join-executor.js.map +0 -1
  911. package/dist/warehouse/executor/joins/semantic-join.d.ts +0 -64
  912. package/dist/warehouse/executor/joins/semantic-join.js +0 -241
  913. package/dist/warehouse/executor/joins/semantic-join.js.map +0 -1
  914. package/dist/warehouse/executor/single-source-executor.d.ts +0 -155
  915. package/dist/warehouse/executor/single-source-executor.js +0 -573
  916. package/dist/warehouse/executor/single-source-executor.js.map +0 -1
  917. package/dist/warehouse/index.d.ts +0 -79
  918. package/dist/warehouse/index.js +0 -111
  919. package/dist/warehouse/index.js.map +0 -1
  920. package/dist/warehouse/parser/index.d.ts +0 -4
  921. package/dist/warehouse/parser/index.js +0 -10
  922. package/dist/warehouse/parser/index.js.map +0 -1
  923. package/dist/warehouse/parser/query-parser.d.ts +0 -181
  924. package/dist/warehouse/parser/query-parser.js +0 -415
  925. package/dist/warehouse/parser/query-parser.js.map +0 -1
  926. package/dist/warehouse/registry/data-source-registry.d.ts +0 -207
  927. package/dist/warehouse/registry/data-source-registry.js +0 -396
  928. package/dist/warehouse/registry/data-source-registry.js.map +0 -1
  929. package/dist/warehouse/registry/index.d.ts +0 -4
  930. package/dist/warehouse/registry/index.js +0 -9
  931. package/dist/warehouse/registry/index.js.map +0 -1
  932. package/dist/warehouse/transactions/index.d.ts +0 -4
  933. package/dist/warehouse/transactions/index.js +0 -9
  934. package/dist/warehouse/transactions/index.js.map +0 -1
  935. package/dist/warehouse/transactions/saga-orchestrator.d.ts +0 -92
  936. package/dist/warehouse/transactions/saga-orchestrator.js +0 -383
  937. package/dist/warehouse/transactions/saga-orchestrator.js.map +0 -1
  938. package/dist/warehouse/types/index.d.ts +0 -9
  939. package/dist/warehouse/types/index.js +0 -33
  940. package/dist/warehouse/types/index.js.map +0 -1
  941. package/dist/warehouse/types/join.interface.d.ts +0 -225
  942. package/dist/warehouse/types/join.interface.js +0 -87
  943. package/dist/warehouse/types/join.interface.js.map +0 -1
  944. package/dist/warehouse/types/query.interface.d.ts +0 -232
  945. package/dist/warehouse/types/query.interface.js +0 -9
  946. package/dist/warehouse/types/query.interface.js.map +0 -1
  947. package/dist/warehouse/types/transaction.interface.d.ts +0 -236
  948. package/dist/warehouse/types/transaction.interface.js +0 -74
  949. package/dist/warehouse/types/transaction.interface.js.map +0 -1
  950. package/dist/warehouse/types/where.interface.d.ts +0 -208
  951. package/dist/warehouse/types/where.interface.js +0 -89
  952. package/dist/warehouse/types/where.interface.js.map +0 -1
  953. package/dist/warehouse/warehouse.service.d.ts +0 -200
  954. package/dist/warehouse/warehouse.service.js +0 -470
  955. package/dist/warehouse/warehouse.service.js.map +0 -1
  956. package/dist/workflows/index.d.ts +0 -30
  957. package/dist/workflows/index.js +0 -64
  958. package/dist/workflows/index.js.map +0 -1
  959. package/dist/workflows/types/index.d.ts +0 -6
  960. package/dist/workflows/types/index.js +0 -23
  961. package/dist/workflows/types/index.js.map +0 -1
  962. package/dist/workflows/types/workflows.types.d.ts +0 -1095
  963. package/dist/workflows/types/workflows.types.js +0 -13
  964. package/dist/workflows/types/workflows.types.js.map +0 -1
  965. package/dist/workflows/workflow-builder.d.ts +0 -70
  966. package/dist/workflows/workflow-builder.js +0 -353
  967. package/dist/workflows/workflow-builder.js.map +0 -1
  968. package/dist/workflows/workflow-executor.d.ts +0 -289
  969. package/dist/workflows/workflow-executor.js +0 -2467
  970. package/dist/workflows/workflow-executor.js.map +0 -1
  971. package/dist/workflows/workflows.service.d.ts +0 -412
  972. package/dist/workflows/workflows.service.js +0 -2233
  973. package/dist/workflows/workflows.service.js.map +0 -1
@@ -1,900 +0,0 @@
1
- "use strict";
2
- /**
3
- * CacheManager - Shared caching utility for all executor services
4
- *
5
- * Provides a three-tier caching strategy:
6
- * - Internal (in-memory): Fastest layer using Map with LRU eviction
7
- * - Redis (local/fast): Secondary cache layer for distributed reads
8
- * - Remote (persistent): Backing store synced on writes/deletes/cache misses
9
- *
10
- * Used by: StorageService, DatabaseService, GraphService, VectorService,
11
- * QuotaService, FallbackService, AgentsService, SessionsService, BrokersService,
12
- * NotificationsService, etc.
13
- */
14
- var __importDefault = (this && this.__importDefault) || function (mod) {
15
- return (mod && mod.__esModule) ? mod : { "default": mod };
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CacheManager = exports.cacheLogger = exports.CacheLogger = void 0;
19
- const crypto_js_1 = __importDefault(require("crypto-js"));
20
- const processorApi_service_1 = require("../api/services/processorApi.service");
21
- const processor_utils_1 = require("../processor/utils/processor.utils");
22
- /**
23
- * Cache logger for detailed operation tracking
24
- */
25
- class CacheLogger {
26
- constructor(config = {}) {
27
- var _a, _b, _c, _d;
28
- this.levelPriority = {
29
- debug: 0,
30
- info: 1,
31
- warn: 2,
32
- error: 3,
33
- };
34
- this.config = {
35
- enabled: (_a = config.enabled) !== null && _a !== void 0 ? _a : false,
36
- level: (_b = config.level) !== null && _b !== void 0 ? _b : 'info',
37
- timestamps: (_c = config.timestamps) !== null && _c !== void 0 ? _c : true,
38
- stackTraces: (_d = config.stackTraces) !== null && _d !== void 0 ? _d : false,
39
- };
40
- }
41
- setConfig(config) {
42
- this.config = Object.assign(Object.assign({}, this.config), config);
43
- }
44
- enable() {
45
- this.config.enabled = true;
46
- }
47
- disable() {
48
- this.config.enabled = false;
49
- }
50
- shouldLog(level) {
51
- return this.config.enabled && this.levelPriority[level] >= this.levelPriority[this.config.level];
52
- }
53
- formatMessage(level, component, message, data) {
54
- const parts = [];
55
- if (this.config.timestamps) {
56
- parts.push(`[${new Date().toISOString()}]`);
57
- }
58
- parts.push(`[CACHE:${level.toUpperCase()}]`);
59
- parts.push(`[${component}]`);
60
- parts.push(message);
61
- if (data && Object.keys(data).length > 0) {
62
- parts.push(JSON.stringify(data, null, 2));
63
- }
64
- return parts.join(' ');
65
- }
66
- debug(component, message, data) {
67
- if (this.shouldLog('debug')) {
68
- console.log(this.formatMessage('debug', component, message, data));
69
- }
70
- }
71
- info(component, message, data) {
72
- if (this.shouldLog('info')) {
73
- console.log(this.formatMessage('info', component, message, data));
74
- }
75
- }
76
- warn(component, message, data) {
77
- if (this.shouldLog('warn')) {
78
- console.warn(this.formatMessage('warn', component, message, data));
79
- }
80
- }
81
- error(component, message, error, data) {
82
- if (this.shouldLog('error')) {
83
- console.error(this.formatMessage('error', component, message, data));
84
- if (error && this.config.stackTraces) {
85
- console.error(error.stack);
86
- }
87
- }
88
- }
89
- /** Log cache operation with timing */
90
- operation(op, key, startTime, result, tier, data) {
91
- const duration = Date.now() - startTime;
92
- this.info('OPERATION', `${op} [${result}] from ${tier}`, Object.assign({ key: key.substring(0, 50) + (key.length > 50 ? '...' : ''), duration: `${duration}ms` }, data));
93
- }
94
- }
95
- exports.CacheLogger = CacheLogger;
96
- /** Global cache logger instance */
97
- exports.cacheLogger = new CacheLogger();
98
- /**
99
- * CacheManager provides shared caching functionality for all executor services
100
- *
101
- * @example
102
- * ```ts
103
- * const cacheManager = new CacheManager({
104
- * workspace_id: 'ws-123',
105
- * public_key: 'pk-123',
106
- * user_id: 'user-123',
107
- * token: 'token',
108
- * env_type: 'prd',
109
- * redis_client: redisClient,
110
- * });
111
- *
112
- * // Check cache before operation
113
- * const cached = await cacheManager.fetch<MyData>({
114
- * cache_tag: 'my-cache',
115
- * product_tag: 'my-product',
116
- * component_tag: 'my-storage',
117
- * component_type: 'storage',
118
- * input: { fileName: 'test.pdf' },
119
- * privateKey: 'private-key',
120
- * expiry: 3600000, // 1 hour
121
- * });
122
- *
123
- * if (cached.hit) {
124
- * return cached.data;
125
- * }
126
- *
127
- * // Execute operation...
128
- * const result = await doOperation();
129
- *
130
- * // Store in cache (fire-and-forget - no await needed)
131
- * cacheManager.store({
132
- * cache_tag: 'my-cache',
133
- * product_tag: 'my-product',
134
- * component_tag: 'my-storage',
135
- * component_type: 'storage',
136
- * input: { fileName: 'test.pdf' },
137
- * privateKey: 'private-key',
138
- * expiry: 3600000,
139
- * }, result);
140
- * ```
141
- */
142
- class CacheManager {
143
- constructor(config) {
144
- /** Internal in-memory cache (Tier 1 - fastest) */
145
- this.internalCache = new Map();
146
- /** Maximum number of entries in internal cache before LRU eviction */
147
- this.maxInternalCacheSize = 1000;
148
- this.config = config;
149
- this.redisClient = config.redis_client || null;
150
- this.processorApiService = new processorApi_service_1.ProcessorApiService(config.env_type);
151
- exports.cacheLogger.info('INIT', 'CacheManager initialized', {
152
- workspace_id: config.workspace_id,
153
- env_type: config.env_type,
154
- redis_available: !!config.redis_client,
155
- max_internal_cache_size: this.maxInternalCacheSize,
156
- });
157
- }
158
- /**
159
- * Enable cache logging
160
- */
161
- enableLogging(config) {
162
- exports.cacheLogger.setConfig(Object.assign({ enabled: true }, config));
163
- exports.cacheLogger.info('INIT', 'Cache logging enabled', config);
164
- }
165
- /**
166
- * Disable cache logging
167
- */
168
- disableLogging() {
169
- exports.cacheLogger.info('INIT', 'Cache logging disabled');
170
- exports.cacheLogger.disable();
171
- }
172
- /**
173
- * Set maximum size for internal cache
174
- */
175
- setMaxInternalCacheSize(size) {
176
- const oldSize = this.maxInternalCacheSize;
177
- this.maxInternalCacheSize = size;
178
- exports.cacheLogger.info('CONFIG', `Internal cache max size changed`, {
179
- old_size: oldSize,
180
- new_size: size,
181
- });
182
- }
183
- /**
184
- * Clear internal cache
185
- */
186
- clearInternalCache() {
187
- const clearedCount = this.internalCache.size;
188
- this.internalCache.clear();
189
- exports.cacheLogger.info('CLEAR', `Internal cache cleared`, {
190
- entries_cleared: clearedCount,
191
- });
192
- }
193
- /**
194
- * Set entry in internal cache with LRU eviction
195
- */
196
- setInternalCache(key, entry) {
197
- // Evict oldest entries if at capacity
198
- if (this.internalCache.size >= this.maxInternalCacheSize) {
199
- const oldestKey = this.internalCache.keys().next().value;
200
- if (oldestKey) {
201
- this.internalCache.delete(oldestKey);
202
- exports.cacheLogger.debug('LRU_EVICTION', `Evicted oldest entry to make room`, {
203
- evicted_key: oldestKey.substring(0, 40) + '...',
204
- cache_size: this.internalCache.size,
205
- max_size: this.maxInternalCacheSize,
206
- });
207
- }
208
- }
209
- this.internalCache.set(key, entry);
210
- }
211
- /**
212
- * Check if internal cache entry is still valid
213
- */
214
- isValidEntry(entry, expiry) {
215
- if (!expiry)
216
- return true;
217
- return Date.now() < entry.lastUpdated + expiry;
218
- }
219
- /**
220
- * Wrap value with type information for storage (auto-detect type)
221
- */
222
- wrapValue(data) {
223
- if (typeof data === 'string') {
224
- return { type: 'string', value: data };
225
- }
226
- return { type: 'json', value: JSON.stringify(data) };
227
- }
228
- /**
229
- * Unwrap value based on stored type
230
- */
231
- unwrapValue(wrapper) {
232
- if (wrapper.type === 'string') {
233
- return wrapper.value;
234
- }
235
- return JSON.parse(wrapper.value);
236
- }
237
- /**
238
- * Get user access credentials for API calls
239
- */
240
- getUserAccess() {
241
- return {
242
- workspace_id: this.config.workspace_id,
243
- public_key: this.config.public_key,
244
- user_id: this.config.user_id,
245
- token: this.config.token,
246
- };
247
- }
248
- /**
249
- * Generate cache key from cache tag and input (legacy format)
250
- */
251
- generateKey(cache_tag, input) {
252
- const inputStr = typeof input === 'string' ? input : JSON.stringify(input);
253
- return `${cache_tag}-${crypto_js_1.default.SHA512(inputStr).toString()}`;
254
- }
255
- /**
256
- * Generate cache key with new format: cache_tag:component_type:operation:sha256(input)
257
- * Includes cache_tag for isolation between different cache configurations
258
- */
259
- generateKeyV2(options) {
260
- const { cache_tag, component_type, operation, input } = options;
261
- const inputStr = typeof input === 'string' ? input : JSON.stringify(input);
262
- const hash = crypto_js_1.default.SHA256(inputStr).toString();
263
- return `${cache_tag}:${component_type}:${operation}:${hash}`;
264
- }
265
- /**
266
- * Generate cache key based on options (uses V2 format if operation provided)
267
- */
268
- generateCacheKey(options) {
269
- if (options.operation) {
270
- return this.generateKeyV2({
271
- cache_tag: options.cache_tag,
272
- component_type: options.component_type,
273
- operation: options.operation,
274
- input: options.input,
275
- });
276
- }
277
- return this.generateKey(options.cache_tag, options.input);
278
- }
279
- /**
280
- * Check if caching is available (Redis client connected)
281
- */
282
- isAvailable() {
283
- return this.redisClient !== null;
284
- }
285
- /**
286
- * Fetch data from cache (Internal first, then Redis, then remote on miss)
287
- *
288
- * @returns Cache result with hit status, data, and source
289
- */
290
- async fetch(options) {
291
- const { privateKey, expiry, cache_tag, component_type, operation } = options;
292
- const key = this.generateCacheKey(options);
293
- const startTime = Date.now();
294
- exports.cacheLogger.debug('FETCH', `Starting cache fetch`, {
295
- cache_tag,
296
- component_type,
297
- operation,
298
- key: key.substring(0, 60) + '...',
299
- expiry: expiry ? `${expiry}ms` : 'none',
300
- internal_cache_size: this.internalCache.size,
301
- redis_available: !!this.redisClient,
302
- });
303
- try {
304
- // TIER 1: Check internal (in-memory) cache first
305
- exports.cacheLogger.debug('TIER1:INTERNAL', `Checking internal cache...`);
306
- const internalEntry = this.internalCache.get(key);
307
- if (internalEntry) {
308
- if (this.isValidEntry(internalEntry, expiry)) {
309
- const decryptedData = (0, processor_utils_1.decrypt)(internalEntry.data, privateKey);
310
- const wrapper = JSON.parse(decryptedData);
311
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER1:INTERNAL', {
312
- cache_tag,
313
- component_type,
314
- age: `${Date.now() - internalEntry.lastUpdated}ms`,
315
- });
316
- return {
317
- hit: true,
318
- data: this.unwrapValue(wrapper),
319
- key,
320
- source: 'internal',
321
- };
322
- }
323
- else {
324
- // Expired - remove from internal cache
325
- exports.cacheLogger.debug('TIER1:INTERNAL', `Entry expired, removing`, {
326
- age: `${Date.now() - internalEntry.lastUpdated}ms`,
327
- expiry: `${expiry}ms`,
328
- });
329
- this.internalCache.delete(key);
330
- }
331
- }
332
- else {
333
- exports.cacheLogger.debug('TIER1:INTERNAL', `No entry found`);
334
- }
335
- // TIER 2: Check Redis cache
336
- if (this.redisClient) {
337
- exports.cacheLogger.debug('TIER2:REDIS', `Checking Redis cache...`);
338
- const redisRecord = await this.redisClient.hgetall(key);
339
- if (redisRecord && redisRecord.data && redisRecord.lastUpdated) {
340
- const lastUpdated = Number(redisRecord.lastUpdated);
341
- exports.cacheLogger.debug('TIER2:REDIS', `Found entry in Redis`, {
342
- age: `${Date.now() - lastUpdated}ms`,
343
- data_size: `${redisRecord.data.length} chars`,
344
- });
345
- if (expiry) {
346
- const expiryTime = lastUpdated + expiry;
347
- if (Date.now() > expiryTime) {
348
- // Expired - delete from Redis and continue to remote
349
- exports.cacheLogger.debug('TIER2:REDIS', `Entry expired, deleting`, {
350
- age: `${Date.now() - lastUpdated}ms`,
351
- expiry: `${expiry}ms`,
352
- });
353
- await this.redisClient.del(key);
354
- }
355
- else {
356
- // Valid cache hit from Redis - populate internal cache
357
- this.setInternalCache(key, {
358
- data: redisRecord.data,
359
- lastUpdated,
360
- expiry,
361
- });
362
- const decryptedData = (0, processor_utils_1.decrypt)(redisRecord.data, privateKey);
363
- // Try to parse as wrapper, fallback to direct parse for legacy data
364
- try {
365
- const wrapper = JSON.parse(decryptedData);
366
- if (wrapper.type && wrapper.value !== undefined) {
367
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER2:REDIS', {
368
- cache_tag,
369
- component_type,
370
- promoted_to_internal: true,
371
- });
372
- return {
373
- hit: true,
374
- data: this.unwrapValue(wrapper),
375
- key,
376
- source: 'redis',
377
- };
378
- }
379
- }
380
- catch (_a) {
381
- // Legacy format - parse directly
382
- }
383
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER2:REDIS', {
384
- cache_tag,
385
- component_type,
386
- legacy_format: true,
387
- promoted_to_internal: true,
388
- });
389
- return {
390
- hit: true,
391
- data: JSON.parse(decryptedData),
392
- key,
393
- source: 'redis',
394
- };
395
- }
396
- }
397
- else {
398
- // No expiry - valid cache hit, populate internal cache
399
- this.setInternalCache(key, {
400
- data: redisRecord.data,
401
- lastUpdated,
402
- expiry,
403
- });
404
- const decryptedData = (0, processor_utils_1.decrypt)(redisRecord.data, privateKey);
405
- try {
406
- const wrapper = JSON.parse(decryptedData);
407
- if (wrapper.type && wrapper.value !== undefined) {
408
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER2:REDIS', {
409
- cache_tag,
410
- component_type,
411
- no_expiry: true,
412
- promoted_to_internal: true,
413
- });
414
- return {
415
- hit: true,
416
- data: this.unwrapValue(wrapper),
417
- key,
418
- source: 'redis',
419
- };
420
- }
421
- }
422
- catch (_b) {
423
- // Legacy format
424
- }
425
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER2:REDIS', {
426
- cache_tag,
427
- component_type,
428
- no_expiry: true,
429
- legacy_format: true,
430
- promoted_to_internal: true,
431
- });
432
- return {
433
- hit: true,
434
- data: JSON.parse(decryptedData),
435
- key,
436
- source: 'redis',
437
- };
438
- }
439
- }
440
- else {
441
- exports.cacheLogger.debug('TIER2:REDIS', `No entry found in Redis`);
442
- }
443
- }
444
- else {
445
- exports.cacheLogger.debug('TIER2:REDIS', `Redis not available, skipping`);
446
- }
447
- // TIER 3: Check remote cache
448
- exports.cacheLogger.debug('TIER3:REMOTE', `Checking remote cache...`);
449
- const remoteRecord = await this.processorApiService.fetchRemoteCacheByKey(key, this.getUserAccess());
450
- if (remoteRecord) {
451
- exports.cacheLogger.debug('TIER3:REMOTE', `Found entry in remote cache`, {
452
- value_size: `${remoteRecord.value.length} chars`,
453
- });
454
- const timestamp = Date.now();
455
- // Populate internal cache
456
- this.setInternalCache(key, {
457
- data: remoteRecord.value,
458
- lastUpdated: timestamp,
459
- expiry,
460
- });
461
- exports.cacheLogger.debug('TIER3:REMOTE', `Promoted to internal cache`);
462
- // Populate Redis cache for next time
463
- if (this.redisClient) {
464
- await this.redisClient.hset(key, 'data', remoteRecord.value);
465
- await this.redisClient.hset(key, 'lastUpdated', timestamp.toString());
466
- exports.cacheLogger.debug('TIER3:REMOTE', `Promoted to Redis cache`);
467
- }
468
- const decryptedData = (0, processor_utils_1.decrypt)(remoteRecord.value, privateKey);
469
- try {
470
- const wrapper = JSON.parse(decryptedData);
471
- if (wrapper.type && wrapper.value !== undefined) {
472
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER3:REMOTE', {
473
- cache_tag,
474
- component_type,
475
- promoted_to_internal: true,
476
- promoted_to_redis: !!this.redisClient,
477
- });
478
- return {
479
- hit: true,
480
- data: this.unwrapValue(wrapper),
481
- key,
482
- source: 'remote',
483
- };
484
- }
485
- }
486
- catch (_c) {
487
- // Legacy format
488
- }
489
- exports.cacheLogger.operation('FETCH', key, startTime, 'hit', 'TIER3:REMOTE', {
490
- cache_tag,
491
- component_type,
492
- legacy_format: true,
493
- promoted_to_internal: true,
494
- promoted_to_redis: !!this.redisClient,
495
- });
496
- return {
497
- hit: true,
498
- data: JSON.parse(decryptedData),
499
- key,
500
- source: 'remote',
501
- };
502
- }
503
- else {
504
- exports.cacheLogger.debug('TIER3:REMOTE', `No entry found in remote cache`);
505
- }
506
- // Cache miss in all tiers
507
- exports.cacheLogger.operation('FETCH', key, startTime, 'miss', 'ALL_TIERS', {
508
- cache_tag,
509
- component_type,
510
- tiers_checked: ['internal', this.redisClient ? 'redis' : null, 'remote'].filter(Boolean),
511
- });
512
- return { hit: false, key, source: 'miss' };
513
- }
514
- catch (error) {
515
- // On error, return miss and let the operation proceed
516
- exports.cacheLogger.error('FETCH', `Cache fetch error`, error, {
517
- cache_tag,
518
- component_type,
519
- key: key.substring(0, 60) + '...',
520
- });
521
- return { hit: false, key, source: 'miss' };
522
- }
523
- }
524
- /**
525
- * Store data in cache (all three tiers: internal, Redis, and remote)
526
- */
527
- /**
528
- * Store data in cache - fire-and-forget pattern.
529
- * Internal cache is written synchronously for immediate availability.
530
- * Redis and remote cache writes happen asynchronously without blocking.
531
- */
532
- store(options, data) {
533
- const { cache_tag, product_tag, component_tag, component_type, privateKey, expiry, operation, } = options;
534
- const key = this.generateCacheKey(options);
535
- const timestamp = Date.now();
536
- const startTime = Date.now();
537
- console.log('[CacheManager] store() called - will write to remote cache', {
538
- cache_tag,
539
- product_tag,
540
- component_tag,
541
- component_type,
542
- operation,
543
- key: key.substring(0, 60) + '...',
544
- has_privateKey: !!privateKey,
545
- });
546
- exports.cacheLogger.info('STORE', `Starting cache store (fire-and-forget)`, {
547
- cache_tag,
548
- product_tag,
549
- component_tag,
550
- component_type,
551
- operation,
552
- key: key.substring(0, 60) + '...',
553
- expiry: expiry ? `${expiry}ms` : 'none',
554
- data_type: typeof data,
555
- });
556
- // Wrap value with type information and serialize
557
- const wrapper = this.wrapValue(data);
558
- const serializedData = JSON.stringify(wrapper);
559
- const encryptedData = (0, processor_utils_1.encrypt)(serializedData, privateKey);
560
- exports.cacheLogger.debug('STORE', `Data prepared for storage`, {
561
- original_size: `${serializedData.length} chars`,
562
- encrypted_size: `${encryptedData.length} chars`,
563
- value_type: wrapper.type,
564
- });
565
- // Calculate expiry date if provided
566
- let expiresAt;
567
- if (expiry) {
568
- expiresAt = new Date(timestamp + expiry);
569
- exports.cacheLogger.debug('STORE', `Cache will expire at ${expiresAt.toISOString()}`);
570
- }
571
- // TIER 1: Write to internal cache (synchronous - immediate availability)
572
- exports.cacheLogger.debug('TIER1:INTERNAL', `Writing to internal cache...`);
573
- this.setInternalCache(key, {
574
- data: encryptedData,
575
- lastUpdated: timestamp,
576
- expiry,
577
- });
578
- exports.cacheLogger.debug('TIER1:INTERNAL', `Written to internal cache`, {
579
- internal_cache_size: this.internalCache.size,
580
- max_size: this.maxInternalCacheSize,
581
- });
582
- // TIER 2 & 3: Write to Redis and remote cache (fire-and-forget)
583
- this.storeToExternalTiers(key, encryptedData, timestamp, expiresAt, {
584
- cache_tag,
585
- product_tag,
586
- component_tag,
587
- component_type,
588
- startTime,
589
- }).catch((error) => {
590
- // Log error but don't propagate - cache failure shouldn't break anything
591
- exports.cacheLogger.error('STORE', `External cache store error`, error, {
592
- cache_tag,
593
- component_type,
594
- key: key.substring(0, 60) + '...',
595
- });
596
- });
597
- }
598
- /**
599
- * Internal method to store to Redis and remote cache asynchronously
600
- */
601
- async storeToExternalTiers(key, encryptedData, timestamp, expiresAt, meta) {
602
- const { cache_tag, product_tag, component_tag, component_type, startTime } = meta;
603
- // TIER 2: Write to Redis cache (if available)
604
- if (this.redisClient) {
605
- exports.cacheLogger.debug('TIER2:REDIS', `Writing to Redis cache...`);
606
- await this.redisClient.hset(key, 'data', encryptedData);
607
- await this.redisClient.hset(key, 'lastUpdated', timestamp.toString());
608
- exports.cacheLogger.debug('TIER2:REDIS', `Written to Redis cache`);
609
- }
610
- else {
611
- exports.cacheLogger.debug('TIER2:REDIS', `Redis not available, skipping`);
612
- }
613
- // TIER 3: Write to remote cache (persistent store) - fire-and-forget
614
- console.log('[CacheManager] TIER3:REMOTE - Writing to remote cache (fire-and-forget)', {
615
- cache_tag,
616
- product_tag,
617
- component_tag,
618
- component_type,
619
- key: key.substring(0, 60) + '...',
620
- has_expiry: !!expiresAt,
621
- expiry: expiresAt === null || expiresAt === void 0 ? void 0 : expiresAt.toISOString(),
622
- });
623
- exports.cacheLogger.info('TIER3:REMOTE', `Writing to remote cache (fire-and-forget)...`, {
624
- cache_tag,
625
- product_tag,
626
- component_tag,
627
- component_type,
628
- key: key.substring(0, 60) + '...',
629
- has_expiry: !!expiresAt,
630
- expiry: expiresAt === null || expiresAt === void 0 ? void 0 : expiresAt.toISOString(),
631
- });
632
- const remotePayload = {
633
- key,
634
- value: encryptedData,
635
- cache_tag,
636
- product_tag,
637
- component_tag,
638
- component_type,
639
- expiry: expiresAt,
640
- };
641
- // Fire-and-forget: don't await to avoid blocking
642
- this.processorApiService.addToRemoteCache(remotePayload, this.getUserAccess()).then(() => {
643
- console.log('[CacheManager] TIER3:REMOTE - Successfully written to remote cache', {
644
- cache_tag,
645
- product_tag,
646
- component_tag,
647
- component_type,
648
- key: key.substring(0, 60) + '...',
649
- });
650
- exports.cacheLogger.info('TIER3:REMOTE', `Successfully written to remote cache`, {
651
- cache_tag,
652
- product_tag,
653
- component_tag,
654
- component_type,
655
- key: key.substring(0, 60) + '...',
656
- });
657
- }).catch((error) => {
658
- // Log error but don't propagate - cache failure shouldn't break anything
659
- console.error('[CacheManager] TIER3:REMOTE - Remote cache write failed (non-blocking)', {
660
- cache_tag,
661
- product_tag,
662
- component_tag,
663
- component_type,
664
- key: key.substring(0, 60) + '...',
665
- error: error instanceof Error ? error.message : String(error),
666
- stack: error instanceof Error ? error.stack : undefined,
667
- });
668
- exports.cacheLogger.error('TIER3:REMOTE', `Remote cache write failed (non-blocking)`, error, {
669
- cache_tag,
670
- product_tag,
671
- component_tag,
672
- component_type,
673
- key: key.substring(0, 60) + '...',
674
- error_message: error instanceof Error ? error.message : String(error),
675
- error_stack: error instanceof Error ? error.stack : undefined,
676
- });
677
- });
678
- exports.cacheLogger.operation('STORE', key, startTime, 'stored', 'ALL_TIERS', {
679
- cache_tag,
680
- component_type,
681
- tiers_written: ['internal', this.redisClient ? 'redis' : null, 'remote'].filter(Boolean),
682
- encrypted_size: `${encryptedData.length} chars`,
683
- expires_at: (expiresAt === null || expiresAt === void 0 ? void 0 : expiresAt.toISOString()) || 'never',
684
- });
685
- }
686
- /**
687
- * Invalidate/delete data from cache (all three tiers)
688
- */
689
- async invalidate(cache_tag, input) {
690
- const key = this.generateKey(cache_tag, input);
691
- const startTime = Date.now();
692
- exports.cacheLogger.debug('INVALIDATE', `Starting cache invalidation`, {
693
- cache_tag,
694
- key: key.substring(0, 60) + '...',
695
- });
696
- try {
697
- // TIER 1: Delete from internal cache
698
- const wasInInternal = this.internalCache.has(key);
699
- this.internalCache.delete(key);
700
- exports.cacheLogger.debug('TIER1:INTERNAL', `Deleted from internal cache`, {
701
- was_present: wasInInternal,
702
- });
703
- // TIER 2: Delete from Redis cache (if available)
704
- if (this.redisClient) {
705
- const redisDeleted = await this.redisClient.del(key);
706
- exports.cacheLogger.debug('TIER2:REDIS', `Deleted from Redis cache`, {
707
- keys_deleted: redisDeleted,
708
- });
709
- }
710
- else {
711
- exports.cacheLogger.debug('TIER2:REDIS', `Redis not available, skipping`);
712
- }
713
- // TIER 3: Delete from remote cache
714
- exports.cacheLogger.debug('TIER3:REMOTE', `Deleting from remote cache...`);
715
- await this.processorApiService.deleteCacheValue({ key }, this.getUserAccess());
716
- exports.cacheLogger.debug('TIER3:REMOTE', `Deleted from remote cache`);
717
- exports.cacheLogger.operation('INVALIDATE', key, startTime, 'deleted', 'ALL_TIERS', {
718
- cache_tag,
719
- tiers_deleted: ['internal', this.redisClient ? 'redis' : null, 'remote'].filter(Boolean),
720
- });
721
- }
722
- catch (error) {
723
- // Log error but don't throw
724
- exports.cacheLogger.error('INVALIDATE', `Cache invalidate error`, error, {
725
- cache_tag,
726
- key: key.substring(0, 60) + '...',
727
- });
728
- }
729
- }
730
- /**
731
- * Invalidate/delete data from cache using options (supports new key format)
732
- */
733
- async invalidateV2(options) {
734
- const key = this.generateCacheKey(options);
735
- const startTime = Date.now();
736
- const { cache_tag, component_type, operation } = options;
737
- exports.cacheLogger.debug('INVALIDATE_V2', `Starting cache invalidation (V2)`, {
738
- cache_tag,
739
- component_type,
740
- operation,
741
- key: key.substring(0, 60) + '...',
742
- });
743
- try {
744
- // TIER 1: Delete from internal cache
745
- const wasInInternal = this.internalCache.has(key);
746
- this.internalCache.delete(key);
747
- exports.cacheLogger.debug('TIER1:INTERNAL', `Deleted from internal cache`, {
748
- was_present: wasInInternal,
749
- });
750
- // TIER 2: Delete from Redis cache (if available)
751
- if (this.redisClient) {
752
- const redisDeleted = await this.redisClient.del(key);
753
- exports.cacheLogger.debug('TIER2:REDIS', `Deleted from Redis cache`, {
754
- keys_deleted: redisDeleted,
755
- });
756
- }
757
- else {
758
- exports.cacheLogger.debug('TIER2:REDIS', `Redis not available, skipping`);
759
- }
760
- // TIER 3: Delete from remote cache
761
- exports.cacheLogger.debug('TIER3:REMOTE', `Deleting from remote cache...`);
762
- await this.processorApiService.deleteCacheValue({ key }, this.getUserAccess());
763
- exports.cacheLogger.debug('TIER3:REMOTE', `Deleted from remote cache`);
764
- exports.cacheLogger.operation('INVALIDATE_V2', key, startTime, 'deleted', 'ALL_TIERS', {
765
- cache_tag,
766
- component_type,
767
- tiers_deleted: ['internal', this.redisClient ? 'redis' : null, 'remote'].filter(Boolean),
768
- });
769
- }
770
- catch (error) {
771
- // Log error but don't throw
772
- exports.cacheLogger.error('INVALIDATE_V2', `Cache invalidateV2 error`, error, {
773
- cache_tag,
774
- component_type,
775
- key: key.substring(0, 60) + '...',
776
- });
777
- }
778
- }
779
- /**
780
- * Helper method to wrap an async operation with caching
781
- *
782
- * @example
783
- * ```ts
784
- * const result = await cacheManager.withCache(
785
- * {
786
- * cache_tag: 'my-cache',
787
- * product_tag: 'my-product',
788
- * component_tag: 'my-storage',
789
- * component_type: 'storage',
790
- * input: { fileName: 'test.pdf' },
791
- * privateKey: 'private-key',
792
- * expiry: 3600000,
793
- * },
794
- * async () => {
795
- * // Execute the actual operation
796
- * return await downloadFile('test.pdf');
797
- * }
798
- * );
799
- * ```
800
- */
801
- async withCache(options, operation) {
802
- const { cache_tag, component_type } = options;
803
- const startTime = Date.now();
804
- exports.cacheLogger.debug('WITH_CACHE', `Starting withCache operation`, {
805
- cache_tag,
806
- component_type,
807
- });
808
- // Try to fetch from cache
809
- const cached = await this.fetch(options);
810
- if (cached.hit && cached.data !== undefined) {
811
- exports.cacheLogger.info('WITH_CACHE', `Cache hit - returning cached data`, {
812
- cache_tag,
813
- component_type,
814
- source: cached.source,
815
- total_duration: `${Date.now() - startTime}ms`,
816
- });
817
- return {
818
- data: cached.data,
819
- cached: true,
820
- source: cached.source,
821
- };
822
- }
823
- // Cache miss - execute the operation
824
- exports.cacheLogger.debug('WITH_CACHE', `Cache miss - executing operation...`, {
825
- cache_tag,
826
- component_type,
827
- });
828
- const operationStart = Date.now();
829
- const data = await operation();
830
- const operationDuration = Date.now() - operationStart;
831
- exports.cacheLogger.debug('WITH_CACHE', `Operation completed, storing result`, {
832
- cache_tag,
833
- component_type,
834
- operation_duration: `${operationDuration}ms`,
835
- });
836
- // Store result in cache
837
- await this.store(options, data);
838
- exports.cacheLogger.info('WITH_CACHE', `Cache miss - fresh data retrieved and cached`, {
839
- cache_tag,
840
- component_type,
841
- operation_duration: `${operationDuration}ms`,
842
- total_duration: `${Date.now() - startTime}ms`,
843
- });
844
- return {
845
- data,
846
- cached: false,
847
- source: 'fresh',
848
- };
849
- }
850
- /**
851
- * Get internal cache stats for debugging/monitoring
852
- */
853
- getInternalCacheStats() {
854
- const stats = {
855
- size: this.internalCache.size,
856
- maxSize: this.maxInternalCacheSize,
857
- utilizationPercent: Math.round((this.internalCache.size / this.maxInternalCacheSize) * 100),
858
- redisAvailable: !!this.redisClient,
859
- };
860
- exports.cacheLogger.debug('STATS', `Cache stats requested`, stats);
861
- return stats;
862
- }
863
- /**
864
- * Get detailed cache statistics including entry ages
865
- */
866
- getDetailedStats() {
867
- const now = Date.now();
868
- let oldestAge = null;
869
- let newestAge = null;
870
- for (const entry of this.internalCache.values()) {
871
- const age = now - entry.lastUpdated;
872
- if (oldestAge === null || age > oldestAge)
873
- oldestAge = age;
874
- if (newestAge === null || age < newestAge)
875
- newestAge = age;
876
- }
877
- const stats = {
878
- internal: {
879
- size: this.internalCache.size,
880
- maxSize: this.maxInternalCacheSize,
881
- utilizationPercent: Math.round((this.internalCache.size / this.maxInternalCacheSize) * 100),
882
- oldestEntryAge: oldestAge,
883
- newestEntryAge: newestAge,
884
- },
885
- redis: { available: !!this.redisClient },
886
- remote: { available: true }, // Always available
887
- };
888
- exports.cacheLogger.info('DETAILED_STATS', `Detailed cache stats`, {
889
- internal_size: stats.internal.size,
890
- internal_utilization: `${stats.internal.utilizationPercent}%`,
891
- oldest_entry: oldestAge ? `${Math.round(oldestAge / 1000)}s ago` : 'none',
892
- newest_entry: newestAge ? `${Math.round(newestAge / 1000)}s ago` : 'none',
893
- redis_available: stats.redis.available,
894
- });
895
- return stats;
896
- }
897
- }
898
- exports.CacheManager = CacheManager;
899
- exports.default = CacheManager;
900
- //# sourceMappingURL=cache.manager.js.map