@pikku/addon-console 0.12.2 → 0.12.3

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 (293) hide show
  1. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +65 -0
  2. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -0
  3. package/dist/.pikku/addon/pikku-addon-types.gen.js +74 -0
  4. package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -0
  5. package/dist/.pikku/addon/pikku-package.gen.d.ts +2 -0
  6. package/dist/.pikku/addon/pikku-package.gen.d.ts.map +1 -0
  7. package/dist/.pikku/addon/pikku-package.gen.js +9 -0
  8. package/dist/.pikku/addon/pikku-package.gen.js.map +1 -0
  9. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +47 -0
  10. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -0
  11. package/dist/.pikku/agent/pikku-agent-types.gen.js +18 -0
  12. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -0
  13. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +2 -0
  14. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts.map +1 -0
  15. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +7 -0
  16. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js.map +1 -0
  17. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +3 -0
  18. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +5 -0
  19. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts.map +1 -0
  20. package/dist/.pikku/agent/pikku-agent-wirings.gen.js +5 -0
  21. package/dist/.pikku/agent/pikku-agent-wirings.gen.js.map +1 -0
  22. package/dist/.pikku/console/pikku-node-types.gen.d.ts +7 -0
  23. package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -0
  24. package/dist/.pikku/console/pikku-node-types.gen.js +2 -0
  25. package/dist/.pikku/console/pikku-node-types.gen.js.map +1 -0
  26. package/dist/.pikku/function/pikku-function-types.gen.d.ts +506 -0
  27. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -0
  28. package/dist/.pikku/function/pikku-function-types.gen.js +314 -0
  29. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -0
  30. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts +2 -0
  31. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts.map +1 -0
  32. package/dist/.pikku/function/pikku-functions-meta.gen.js +7 -0
  33. package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -0
  34. package/dist/.pikku/function/pikku-functions-meta.gen.json +538 -0
  35. package/dist/.pikku/function/pikku-functions.gen.d.ts +2 -0
  36. package/dist/.pikku/function/pikku-functions.gen.d.ts.map +1 -0
  37. package/dist/.pikku/function/pikku-functions.gen.js +64 -0
  38. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -0
  39. package/dist/.pikku/pikku-bootstrap.gen.d.ts +8 -0
  40. package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -0
  41. package/dist/.pikku/pikku-bootstrap.gen.js +18 -0
  42. package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -0
  43. package/dist/.pikku/pikku-services.gen.d.ts +32 -0
  44. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -0
  45. package/dist/.pikku/pikku-services.gen.js +27 -0
  46. package/dist/.pikku/pikku-services.gen.js.map +1 -0
  47. package/dist/.pikku/pikku-types.gen.d.ts +12 -0
  48. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -0
  49. package/dist/.pikku/pikku-types.gen.js +17 -0
  50. package/dist/.pikku/pikku-types.gen.js.map +1 -0
  51. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
  52. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
  53. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
  54. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
  55. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +31 -0
  56. package/dist/.pikku/schemas/register.gen.d.ts +2 -0
  57. package/dist/.pikku/schemas/register.gen.d.ts.map +1 -0
  58. package/dist/.pikku/schemas/register.gen.js +103 -0
  59. package/dist/.pikku/schemas/register.gen.js.map +1 -0
  60. package/dist/.pikku/schemas/schemas/AddonPackageInfo.schema.json +1 -0
  61. package/dist/.pikku/schemas/schemas/AllMeta.schema.json +1 -0
  62. package/dist/.pikku/schemas/schemas/ChannelSnippets.schema.json +1 -0
  63. package/dist/.pikku/schemas/schemas/DeleteAgentThreadInput.schema.json +1 -0
  64. package/dist/.pikku/schemas/schemas/DeleteAgentThreadOutput.schema.json +1 -0
  65. package/dist/.pikku/schemas/schemas/DeleteWorkflowRunInput.schema.json +1 -0
  66. package/dist/.pikku/schemas/schemas/DeleteWorkflowRunOutput.schema.json +1 -0
  67. package/dist/.pikku/schemas/schemas/GetAIWorkflowsInput.schema.json +1 -0
  68. package/dist/.pikku/schemas/schemas/GetAIWorkflowsOutput.schema.json +1 -0
  69. package/dist/.pikku/schemas/schemas/GetAddonCommunityPackageInput.schema.json +1 -0
  70. package/dist/.pikku/schemas/schemas/GetAddonIconInput.schema.json +1 -0
  71. package/dist/.pikku/schemas/schemas/GetAddonInstalledPackageInput.schema.json +1 -0
  72. package/dist/.pikku/schemas/schemas/GetAddonMetaOutput.schema.json +1 -0
  73. package/dist/.pikku/schemas/schemas/GetAgentThreadMessagesInput.schema.json +1 -0
  74. package/dist/.pikku/schemas/schemas/GetAgentThreadMessagesOutput.schema.json +1 -0
  75. package/dist/.pikku/schemas/schemas/GetAgentThreadRunsInput.schema.json +1 -0
  76. package/dist/.pikku/schemas/schemas/GetAgentThreadRunsOutput.schema.json +1 -0
  77. package/dist/.pikku/schemas/schemas/GetAgentThreadsInput.schema.json +1 -0
  78. package/dist/.pikku/schemas/schemas/GetAgentThreadsOutput.schema.json +1 -0
  79. package/dist/.pikku/schemas/schemas/GetChannelSnippetsInput.schema.json +1 -0
  80. package/dist/.pikku/schemas/schemas/GetFunctionsMetaOutput.schema.json +1 -0
  81. package/dist/.pikku/schemas/schemas/GetInstalledAddonsOutput.schema.json +1 -0
  82. package/dist/.pikku/schemas/schemas/GetSchemaInput.schema.json +1 -0
  83. package/dist/.pikku/schemas/schemas/GetWorkflowMetaByIdInput.schema.json +1 -0
  84. package/dist/.pikku/schemas/schemas/GetWorkflowMetaByIdOutput.schema.json +1 -0
  85. package/dist/.pikku/schemas/schemas/GetWorkflowRunHistoryInput.schema.json +1 -0
  86. package/dist/.pikku/schemas/schemas/GetWorkflowRunHistoryOutput.schema.json +1 -0
  87. package/dist/.pikku/schemas/schemas/GetWorkflowRunInput.schema.json +1 -0
  88. package/dist/.pikku/schemas/schemas/GetWorkflowRunNamesOutput.schema.json +1 -0
  89. package/dist/.pikku/schemas/schemas/GetWorkflowRunOutput.schema.json +1 -0
  90. package/dist/.pikku/schemas/schemas/GetWorkflowRunStepsInput.schema.json +1 -0
  91. package/dist/.pikku/schemas/schemas/GetWorkflowRunStepsOutput.schema.json +1 -0
  92. package/dist/.pikku/schemas/schemas/GetWorkflowRunsInput.schema.json +1 -0
  93. package/dist/.pikku/schemas/schemas/GetWorkflowRunsOutput.schema.json +1 -0
  94. package/dist/.pikku/schemas/schemas/GetWorkflowVersionInput.schema.json +1 -0
  95. package/dist/.pikku/schemas/schemas/GetWorkflowVersionOutput.schema.json +1 -0
  96. package/dist/.pikku/schemas/schemas/JSONSchema7.schema.json +1 -0
  97. package/dist/.pikku/schemas/schemas/OauthConnectInput.schema.json +1 -0
  98. package/dist/.pikku/schemas/schemas/OauthConnectOutput.schema.json +1 -0
  99. package/dist/.pikku/schemas/schemas/OauthDisconnectInput.schema.json +1 -0
  100. package/dist/.pikku/schemas/schemas/OauthExchangeTokensInput.schema.json +1 -0
  101. package/dist/.pikku/schemas/schemas/OauthExchangeTokensOutput.schema.json +1 -0
  102. package/dist/.pikku/schemas/schemas/OauthRefreshTokenInput.schema.json +1 -0
  103. package/dist/.pikku/schemas/schemas/OauthRefreshTokenOutput.schema.json +1 -0
  104. package/dist/.pikku/schemas/schemas/OauthStatusInput.schema.json +1 -0
  105. package/dist/.pikku/schemas/schemas/OauthStatusOutput.schema.json +1 -0
  106. package/dist/.pikku/schemas/schemas/OauthTestTokenInput.schema.json +1 -0
  107. package/dist/.pikku/schemas/schemas/OauthTestTokenOutput.schema.json +1 -0
  108. package/dist/.pikku/schemas/schemas/StreamWorkflowRunInput.schema.json +1 -0
  109. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +6 -0
  110. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -0
  111. package/dist/.pikku/secrets/pikku-secret-types.gen.js +5 -0
  112. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -0
  113. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +12 -0
  114. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -0
  115. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -0
  116. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -0
  117. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +114 -0
  118. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts.map +1 -0
  119. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +34 -0
  120. package/dist/.pikku/trigger/pikku-trigger-types.gen.js.map +1 -0
  121. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +6 -0
  122. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -0
  123. package/dist/.pikku/variables/pikku-variable-types.gen.js +5 -0
  124. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -0
  125. package/dist/.pikku/variables/pikku-variables.gen.d.ts +12 -0
  126. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -0
  127. package/dist/.pikku/variables/pikku-variables.gen.js +11 -0
  128. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -0
  129. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +81 -0
  130. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -0
  131. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +31 -0
  132. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -0
  133. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +2 -0
  134. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +1 -0
  135. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +7 -0
  136. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -0
  137. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +5 -0
  138. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts.map +1 -0
  139. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
  140. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js.map +1 -0
  141. package/dist/src/functions/delete-agent-thread.function.d.ts +14 -0
  142. package/dist/src/functions/delete-agent-thread.function.d.ts.map +1 -0
  143. package/dist/src/functions/delete-agent-thread.function.js +14 -0
  144. package/dist/src/functions/delete-agent-thread.function.js.map +1 -0
  145. package/dist/src/functions/delete-workflow-run.function.d.ts +14 -0
  146. package/dist/src/functions/delete-workflow-run.function.d.ts.map +1 -0
  147. package/dist/src/functions/delete-workflow-run.function.js +14 -0
  148. package/dist/src/functions/delete-workflow-run.function.js.map +1 -0
  149. package/dist/src/functions/get-addon-icon.function.d.ts +8 -0
  150. package/dist/src/functions/get-addon-icon.function.d.ts.map +1 -0
  151. package/dist/src/functions/get-addon-icon.function.js +12 -0
  152. package/dist/src/functions/get-addon-icon.function.js.map +1 -0
  153. package/dist/src/functions/get-addon-meta.function.d.ts +2 -0
  154. package/dist/src/functions/get-addon-meta.function.d.ts.map +1 -0
  155. package/dist/src/functions/get-addon-meta.function.js +11 -0
  156. package/dist/src/functions/get-addon-meta.function.js.map +1 -0
  157. package/dist/src/functions/get-addon-package.function.d.ts +9 -0
  158. package/dist/src/functions/get-addon-package.function.d.ts.map +1 -0
  159. package/dist/src/functions/get-addon-package.function.js +11 -0
  160. package/dist/src/functions/get-addon-package.function.js.map +1 -0
  161. package/dist/src/functions/get-agent-thread-messages.function.d.ts +8 -0
  162. package/dist/src/functions/get-agent-thread-messages.function.d.ts.map +1 -0
  163. package/dist/src/functions/get-agent-thread-messages.function.js +13 -0
  164. package/dist/src/functions/get-agent-thread-messages.function.js.map +1 -0
  165. package/dist/src/functions/get-agent-thread-runs.function.d.ts +8 -0
  166. package/dist/src/functions/get-agent-thread-runs.function.d.ts.map +1 -0
  167. package/dist/src/functions/get-agent-thread-runs.function.js +13 -0
  168. package/dist/src/functions/get-agent-thread-runs.function.js.map +1 -0
  169. package/dist/src/functions/get-agent-threads.function.d.ts +14 -0
  170. package/dist/src/functions/get-agent-threads.function.d.ts.map +1 -0
  171. package/dist/src/functions/get-agent-threads.function.js +17 -0
  172. package/dist/src/functions/get-agent-threads.function.js.map +1 -0
  173. package/dist/src/functions/get-ai-workflows.function.d.ts +20 -0
  174. package/dist/src/functions/get-ai-workflows.function.d.ts.map +1 -0
  175. package/dist/src/functions/get-ai-workflows.function.js +13 -0
  176. package/dist/src/functions/get-ai-workflows.function.js.map +1 -0
  177. package/dist/src/functions/get-all-meta.function.d.ts +3 -0
  178. package/dist/src/functions/get-all-meta.function.d.ts.map +1 -0
  179. package/dist/src/functions/get-all-meta.function.js +11 -0
  180. package/dist/src/functions/get-all-meta.function.js.map +1 -0
  181. package/dist/src/functions/get-channel-snippets.function.d.ts +9 -0
  182. package/dist/src/functions/get-channel-snippets.function.d.ts.map +1 -0
  183. package/dist/src/functions/get-channel-snippets.function.js +15 -0
  184. package/dist/src/functions/get-channel-snippets.function.js.map +1 -0
  185. package/dist/src/functions/get-functions-meta.function.d.ts +3 -0
  186. package/dist/src/functions/get-functions-meta.function.d.ts.map +1 -0
  187. package/dist/src/functions/get-functions-meta.function.js +12 -0
  188. package/dist/src/functions/get-functions-meta.function.js.map +1 -0
  189. package/dist/src/functions/get-installed-addons.function.d.ts +10 -0
  190. package/dist/src/functions/get-installed-addons.function.d.ts.map +1 -0
  191. package/dist/src/functions/get-installed-addons.function.js +41 -0
  192. package/dist/src/functions/get-installed-addons.function.js.map +1 -0
  193. package/dist/src/functions/get-installed-package.function.d.ts +9 -0
  194. package/dist/src/functions/get-installed-package.function.d.ts.map +1 -0
  195. package/dist/src/functions/get-installed-package.function.js +103 -0
  196. package/dist/src/functions/get-installed-package.function.js.map +1 -0
  197. package/dist/src/functions/get-schema.function.d.ts +9 -0
  198. package/dist/src/functions/get-schema.function.d.ts.map +1 -0
  199. package/dist/src/functions/get-schema.function.js +11 -0
  200. package/dist/src/functions/get-schema.function.js.map +1 -0
  201. package/dist/src/functions/get-workflow-meta-by-id.function.d.ts +23 -0
  202. package/dist/src/functions/get-workflow-meta-by-id.function.d.ts.map +1 -0
  203. package/dist/src/functions/get-workflow-meta-by-id.function.js +30 -0
  204. package/dist/src/functions/get-workflow-meta-by-id.function.js.map +1 -0
  205. package/dist/src/functions/get-workflow-run-history.function.d.ts +8 -0
  206. package/dist/src/functions/get-workflow-run-history.function.d.ts.map +1 -0
  207. package/dist/src/functions/get-workflow-run-history.function.js +13 -0
  208. package/dist/src/functions/get-workflow-run-history.function.js.map +1 -0
  209. package/dist/src/functions/get-workflow-run-names.function.d.ts +2 -0
  210. package/dist/src/functions/get-workflow-run-names.function.d.ts.map +1 -0
  211. package/dist/src/functions/get-workflow-run-names.function.js +13 -0
  212. package/dist/src/functions/get-workflow-run-names.function.js.map +1 -0
  213. package/dist/src/functions/get-workflow-run-steps.function.d.ts +8 -0
  214. package/dist/src/functions/get-workflow-run-steps.function.d.ts.map +1 -0
  215. package/dist/src/functions/get-workflow-run-steps.function.js +13 -0
  216. package/dist/src/functions/get-workflow-run-steps.function.js.map +1 -0
  217. package/dist/src/functions/get-workflow-run.function.d.ts +8 -0
  218. package/dist/src/functions/get-workflow-run.function.d.ts.map +1 -0
  219. package/dist/src/functions/get-workflow-run.function.js +17 -0
  220. package/dist/src/functions/get-workflow-run.function.js.map +1 -0
  221. package/dist/src/functions/get-workflow-runs.function.d.ts +17 -0
  222. package/dist/src/functions/get-workflow-runs.function.d.ts.map +1 -0
  223. package/dist/src/functions/get-workflow-runs.function.js +18 -0
  224. package/dist/src/functions/get-workflow-runs.function.js.map +1 -0
  225. package/dist/src/functions/get-workflow-version.function.d.ts +20 -0
  226. package/dist/src/functions/get-workflow-version.function.d.ts.map +1 -0
  227. package/dist/src/functions/get-workflow-version.function.js +13 -0
  228. package/dist/src/functions/get-workflow-version.function.js.map +1 -0
  229. package/dist/src/functions/oauth-connect.function.d.ts +17 -0
  230. package/dist/src/functions/oauth-connect.function.d.ts.map +1 -0
  231. package/dist/src/functions/oauth-connect.function.js +34 -0
  232. package/dist/src/functions/oauth-connect.function.js.map +1 -0
  233. package/dist/src/functions/oauth-disconnect.function.d.ts +8 -0
  234. package/dist/src/functions/oauth-disconnect.function.d.ts.map +1 -0
  235. package/dist/src/functions/oauth-disconnect.function.js +19 -0
  236. package/dist/src/functions/oauth-disconnect.function.js.map +1 -0
  237. package/dist/src/functions/oauth-exchange-tokens.function.d.ts +17 -0
  238. package/dist/src/functions/oauth-exchange-tokens.function.d.ts.map +1 -0
  239. package/dist/src/functions/oauth-exchange-tokens.function.js +20 -0
  240. package/dist/src/functions/oauth-exchange-tokens.function.js.map +1 -0
  241. package/dist/src/functions/oauth-refresh-token.function.d.ts +17 -0
  242. package/dist/src/functions/oauth-refresh-token.function.d.ts.map +1 -0
  243. package/dist/src/functions/oauth-refresh-token.function.js +27 -0
  244. package/dist/src/functions/oauth-refresh-token.function.js.map +1 -0
  245. package/dist/src/functions/oauth-status.function.d.ts +23 -0
  246. package/dist/src/functions/oauth-status.function.d.ts.map +1 -0
  247. package/dist/src/functions/oauth-status.function.js +34 -0
  248. package/dist/src/functions/oauth-status.function.js.map +1 -0
  249. package/dist/src/functions/oauth-test-token.function.d.ts +17 -0
  250. package/dist/src/functions/oauth-test-token.function.d.ts.map +1 -0
  251. package/dist/src/functions/oauth-test-token.function.js +26 -0
  252. package/dist/src/functions/oauth-test-token.function.js.map +1 -0
  253. package/dist/src/functions/stream-workflow-run.function.d.ts +8 -0
  254. package/dist/src/functions/stream-workflow-run.function.d.ts.map +1 -0
  255. package/dist/src/functions/stream-workflow-run.function.js +49 -0
  256. package/dist/src/functions/stream-workflow-run.function.js.map +1 -0
  257. package/dist/src/index.d.ts +16 -0
  258. package/dist/src/index.d.ts.map +1 -0
  259. package/dist/src/index.js +15 -0
  260. package/dist/src/index.js.map +1 -0
  261. package/dist/src/services/addon.service.d.ts +45 -0
  262. package/dist/src/services/addon.service.d.ts.map +1 -0
  263. package/dist/src/services/addon.service.js +24 -0
  264. package/dist/src/services/addon.service.js.map +1 -0
  265. package/dist/src/services/file-watcher.service.d.ts +13 -0
  266. package/dist/src/services/file-watcher.service.d.ts.map +1 -0
  267. package/dist/src/services/file-watcher.service.js +31 -0
  268. package/dist/src/services/file-watcher.service.js.map +1 -0
  269. package/dist/src/services/oauth.service.d.ts +16 -0
  270. package/dist/src/services/oauth.service.d.ts.map +1 -0
  271. package/dist/src/services/oauth.service.js +26 -0
  272. package/dist/src/services/oauth.service.js.map +1 -0
  273. package/dist/src/services/schema.service.d.ts +10 -0
  274. package/dist/src/services/schema.service.d.ts.map +1 -0
  275. package/dist/src/services/schema.service.js +35 -0
  276. package/dist/src/services/schema.service.js.map +1 -0
  277. package/dist/src/services/wiring.service.d.ts +427 -0
  278. package/dist/src/services/wiring.service.d.ts.map +1 -0
  279. package/dist/src/services/wiring.service.js +598 -0
  280. package/dist/src/services/wiring.service.js.map +1 -0
  281. package/dist/src/services.d.ts +2 -0
  282. package/dist/src/services.d.ts.map +1 -0
  283. package/dist/src/services.js +33 -0
  284. package/dist/src/services.js.map +1 -0
  285. package/dist/src/tests/test-oauth.d.ts +2 -0
  286. package/dist/src/tests/test-oauth.d.ts.map +1 -0
  287. package/dist/src/tests/test-oauth.js +32 -0
  288. package/dist/src/tests/test-oauth.js.map +1 -0
  289. package/dist/src/tests/test-oauth2-client.d.ts +6 -0
  290. package/dist/src/tests/test-oauth2-client.d.ts.map +1 -0
  291. package/dist/src/tests/test-oauth2-client.js +131 -0
  292. package/dist/src/tests/test-oauth2-client.js.map +1 -0
  293. package/package.json +6 -7
@@ -0,0 +1,506 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.12.3
3
+ */
4
+ /**
5
+ * Core function, middleware, and permission types for all wirings
6
+ */
7
+ import { CorePikkuFunctionConfig, CorePikkuAuth, CorePikkuAuthConfig, CorePikkuPermission, CorePikkuMiddleware, CorePermissionGroup, PikkuWire, PickRequired } from '@pikku/core';
8
+ import { CreateWireServices } from '@pikku/core/internal';
9
+ import { PikkuError } from '@pikku/core/errors';
10
+ import type { NodeType } from '@pikku/core/node';
11
+ import type { StandardSchemaV1 } from '@standard-schema/spec';
12
+ import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function';
13
+ import type { UserSession } from '../../types/application-types.d.js';
14
+ import type { SingletonServices } from '../../types/application-types.d.js';
15
+ import type { Services } from '../../types/application-types.d.js';
16
+ import type { Config } from '../../types/application-types.d.js';
17
+ import type { TypedPikkuRPC, FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
18
+ import type { RequiredSingletonServices, RequiredWireServices } from '../pikku-services.gen.js';
19
+ import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js';
20
+ export type { SingletonServices as SingletonServices };
21
+ export type { Services as Services };
22
+ export type Session = UserSession;
23
+ /**
24
+ * Inline node configuration for function definitions.
25
+ */
26
+ export type NodeConfig = {
27
+ displayName: string;
28
+ category: 'General';
29
+ type: NodeType;
30
+ errorOutput?: boolean;
31
+ };
32
+ /**
33
+ * Type-safe API permission definition that integrates with your application's session type.
34
+ * Use this to define authorization logic for your API endpoints.
35
+ *
36
+ * @template In - The input type that the permission check will receive
37
+ * @template RequiredServices - The services required for this permission check
38
+ */
39
+ export type PikkuPermission<In = unknown, RequiredServices extends Services = Services> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>;
40
+ /**
41
+ * Type-safe middleware definition that can access your application's services and session.
42
+ * Use this to define reusable middleware that can be applied to multiple wirings.
43
+ *
44
+ * @template RequiredServices - The services required for this middleware
45
+ */
46
+ export type PikkuMiddleware<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuMiddleware<RequiredServices>;
47
+ /**
48
+ * Configuration object for creating a permission with metadata
49
+ */
50
+ export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services = Services> = {
51
+ /** The permission function */
52
+ func: PikkuPermission<In, RequiredServices>;
53
+ /** Optional human-readable name for the permission */
54
+ name?: string;
55
+ /** Optional description of what the permission checks */
56
+ description?: string;
57
+ };
58
+ /**
59
+ * Factory function for creating permissions with tree-shaking support.
60
+ * Supports both direct function and configuration object syntax.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * // Direct function syntax
65
+ * const permission = pikkuPermission(async ({ logger }, data, { session }) => {
66
+ * const session = await session?.get()
67
+ * return session?.role === 'admin'
68
+ * })
69
+ *
70
+ * // Configuration object syntax with metadata
71
+ * const adminPermission = pikkuPermission({
72
+ * name: 'Admin Permission',
73
+ * description: 'Checks if user has admin role',
74
+ * func: async ({ logger }, data, { session }) => {
75
+ * const session = await session?.get()
76
+ * return session?.role === 'admin'
77
+ * }
78
+ * })
79
+ * ```
80
+ */
81
+ export declare const pikkuPermission: <In>(permission: PikkuPermission<In> | PikkuPermissionConfig<In>) => PikkuPermission<In>;
82
+ /**
83
+ * Type-safe auth-only permission that only needs services and session.
84
+ * Use this for upfront authorization gates (MCP tools, AI agents, workflows)
85
+ * where request data isn't available yet.
86
+ *
87
+ * @template RequiredServices - The services required for this auth check
88
+ */
89
+ export type PikkuAuth<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuth<RequiredServices, Session>;
90
+ /**
91
+ * Configuration object for creating an auth permission with metadata
92
+ */
93
+ export type PikkuAuthConfig<RequiredServices extends SingletonServices = SingletonServices> = CorePikkuAuthConfig<RequiredServices, Session>;
94
+ /**
95
+ * Factory function for creating auth-only permissions with tree-shaking support.
96
+ * Auth permissions only receive services and session (no request data),
97
+ * making them evaluable before request data is available.
98
+ *
99
+ * @example
100
+ * \`\`\`typescript
101
+ * const isAuthenticated = pikkuAuth(async ({ logger }, session) => {
102
+ * return !!session
103
+ * })
104
+ *
105
+ * const isAdmin = pikkuAuth({
106
+ * name: 'Admin Auth',
107
+ * description: 'Checks if user is an admin',
108
+ * func: async ({ logger }, session) => {
109
+ * return session?.role === 'admin'
110
+ * }
111
+ * })
112
+ * \`\`\`
113
+ */
114
+ export declare const pikkuAuth: <RequiredServices extends SingletonServices = SingletonServices>(auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>) => PikkuPermission<any, any>;
115
+ /**
116
+ * Configuration object for creating middleware with metadata
117
+ */
118
+ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = SingletonServices> = {
119
+ /** The middleware function */
120
+ func: PikkuMiddleware<RequiredServices>;
121
+ /** Optional human-readable name for the middleware */
122
+ name?: string;
123
+ /** Optional description of what the middleware does */
124
+ description?: string;
125
+ };
126
+ /**
127
+ * Factory function for creating middleware with tree-shaking support.
128
+ * Supports both direct function and configuration object syntax.
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * // Direct function syntax
133
+ * const middleware = pikkuMiddleware(({ logger }, wires, next) => {
134
+ * logger.info('Middleware executed')
135
+ * await next()
136
+ * })
137
+ *
138
+ * // Configuration object syntax with metadata
139
+ * const logMiddleware = pikkuMiddleware({
140
+ * name: 'Request Logger',
141
+ * description: 'Logs all incoming requests',
142
+ * func: async ({ logger }, wires, next) => {
143
+ * logger.info('Request started')
144
+ * await next()
145
+ * }
146
+ * })
147
+ * ```
148
+ */
149
+ export declare const pikkuMiddleware: <RequiredServices extends SingletonServices = SingletonServices>(middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>) => PikkuMiddleware<RequiredServices>;
150
+ /**
151
+ * Factory function for creating middleware factories
152
+ * Use this when your middleware needs configuration/input parameters
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * export const logMiddleware = pikkuMiddlewareFactory<LogOptions>(({
157
+ * message,
158
+ * level = 'info'
159
+ * }) => {
160
+ * return pikkuMiddleware(async ({ logger }, next) => {
161
+ * logger[level](message)
162
+ * await next()
163
+ * })
164
+ * })
165
+ * ```
166
+ */
167
+ export declare const pikkuMiddlewareFactory: <In = any>(factory: (input: In) => PikkuMiddleware) => ((input: In) => PikkuMiddleware);
168
+ /**
169
+ * Factory function for creating permission factories
170
+ * Use this when your permission needs configuration/input parameters
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * export const requireRole = pikkuPermissionFactory<{ role: string }>(({
175
+ * role
176
+ * }) => {
177
+ * return pikkuPermission(async ({ logger }, data, { session }) => {
178
+ * if (!session || session.role !== role) {
179
+ * logger.warn(`Permission denied: required role '${role}'`)
180
+ * return false
181
+ * }
182
+ * return true
183
+ * })
184
+ * })
185
+ * ```
186
+ */
187
+ export declare const pikkuPermissionFactory: <In = any>(factory: (input: In) => PikkuPermission<any>) => ((input: In) => PikkuPermission<any>);
188
+ /**
189
+ * A function that generates a human-readable description of a pending approval action.
190
+ * Used by AI agents to show meaningful approval prompts instead of raw tool arguments.
191
+ *
192
+ * @template In - The input type (same as the function it describes)
193
+ * @template RequiredServices - The services required for this description function
194
+ */
195
+ export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services = Services> = (services: RequiredServices, data: In) => Promise<string>;
196
+ /**
197
+ * Factory function for creating approval description functions with tree-shaking support.
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * export const deleteTodoApproval = pikkuApprovalDescription(
202
+ * async ({ todoStore }, { id }) => {
203
+ * const todo = await todoStore.get(id)
204
+ * return \`Delete todo: "${todo.title}"\`
205
+ * }
206
+ * )
207
+ * ```
208
+ */
209
+ export declare const pikkuApprovalDescription: <In = unknown, RequiredServices extends Services = Services>(fn: PikkuApprovalDescription<In, RequiredServices>) => PikkuApprovalDescription<In, RequiredServices>;
210
+ /**
211
+ * A sessionless API function that doesn't require user authentication.
212
+ * Use this for public endpoints, health checks, or operations that don't need user context.
213
+ *
214
+ * @template In - The input type
215
+ * @template Out - The output type that the function returns
216
+ * @template RequiredServices - Services required by this function
217
+ */
218
+ export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services = Services> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
219
+ /**
220
+ * A session-aware API function that requires user authentication.
221
+ * Use this for protected endpoints that need access to user session data.
222
+ *
223
+ * @template In - The input type
224
+ * @template Out - The output type that the function returns
225
+ * @template RequiredServices - Services required by this function
226
+ */
227
+ export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services = Services> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
228
+ /**
229
+ * Helper type to infer the output type from a Standard Schema
230
+ */
231
+ export type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output> ? Output : never;
232
+ /**
233
+ * Configuration object for Pikku functions with optional middleware, permissions, tags, and documentation.
234
+ * This type wraps CorePikkuFunctionConfig with the user's custom types.
235
+ *
236
+ * @template In - The input type
237
+ * @template Out - The output type
238
+ * @template PikkuFunc - The function type (can be narrowed to PikkuFunction or PikkuFunctionSessionless)
239
+ */
240
+ export type PikkuFunctionConfig<In = unknown, Out = unknown, RequiredWires extends keyof PikkuWire = never, PikkuFunc extends PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires> = PikkuFunction<In, Out, RequiredWires> | PikkuFunctionSessionless<In, Out, RequiredWires>, InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = CorePikkuFunctionConfig<PikkuFunc, PikkuPermission<In>, PikkuMiddleware, InputSchema, OutputSchema>;
241
+ /**
242
+ * Configuration object for Pikku functions with Zod schema validation.
243
+ * Use this when you want to define input/output schemas using Zod.
244
+ * Types are automatically inferred from the schemas.
245
+ */
246
+ export type PikkuFunctionConfigWithSchema<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never> = {
247
+ name?: string;
248
+ tags?: string[];
249
+ expose?: boolean;
250
+ mcp?: boolean;
251
+ internal?: boolean;
252
+ approvalRequired?: boolean;
253
+ approvalDescription?: PikkuApprovalDescription<InferSchemaOutput<InputSchema>>;
254
+ func: PikkuFunction<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, RequiredWires> | PikkuFunctionSessionless<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, RequiredWires>;
255
+ auth?: boolean;
256
+ permissions?: CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>>;
257
+ middleware?: PikkuMiddleware[];
258
+ input: InputSchema;
259
+ output?: OutputSchema;
260
+ node?: NodeConfig;
261
+ errors?: Array<typeof PikkuError>;
262
+ };
263
+ /**
264
+ * Creates a Pikku function that can be either session-aware or sessionless.
265
+ * This is the main function wrapper for creating API endpoints.
266
+ *
267
+ * Supports two patterns:
268
+ * 1. Generic types: `pikkuFunc<Input, Output>({ func: ... })`
269
+ * 2. Zod schemas: `pikkuFunc({ input: z.object(...), output: z.object(...), func: ... })`
270
+ *
271
+ * @template In - Input type for the function (inferred from schema if provided)
272
+ * @template Out - Output type for the function (inferred from schema if provided)
273
+ * @param func - Function definition, either direct function or configuration object
274
+ * @returns The normalized configuration object
275
+ *
276
+ * @example
277
+ * ```typescript
278
+ * // Pattern 1: Using generic types
279
+ * const createUser = pikkuFunc<{name: string, email: string}, {id: number}>({
280
+ * func: async ({db}, input) => {
281
+ * const user = await db.users.create(input)
282
+ * return { id: user.id }
283
+ * }
284
+ * })
285
+ *
286
+ * // Pattern 2: Using Zod schemas (types inferred automatically)
287
+ * const createUserInput = z.object({ name: z.string(), email: z.string() })
288
+ * const createUserOutput = z.object({ id: z.number() })
289
+ *
290
+ * const createUser = pikkuFunc({
291
+ * input: createUserInput,
292
+ * output: createUserOutput,
293
+ * func: async ({db}, input) => {
294
+ * // input is typed as { name: string, email: string }
295
+ * const user = await db.users.create(input)
296
+ * return { id: user.id } // must match output schema
297
+ * }
298
+ * })
299
+ * ```
300
+ */
301
+ export declare function pikkuFunc<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuFunctionConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>): PikkuFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>;
302
+ export declare function pikkuFunc<In, Out = unknown>(func: PikkuFunction<In, Out, 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>;
303
+ /**
304
+ * Configuration object for sessionless Pikku functions with Zod schema validation.
305
+ */
306
+ export type PikkuFunctionSessionlessConfigWithSchema<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined, RequiredWires extends keyof PikkuWire = never> = {
307
+ name?: string;
308
+ description?: string;
309
+ tags?: string[];
310
+ expose?: boolean;
311
+ mcp?: boolean;
312
+ internal?: boolean;
313
+ remote?: boolean;
314
+ approvalRequired?: boolean;
315
+ approvalDescription?: PikkuApprovalDescription<InferSchemaOutput<InputSchema>>;
316
+ func: PikkuFunctionSessionless<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, RequiredWires>;
317
+ auth?: boolean;
318
+ permissions?: CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>>;
319
+ middleware?: PikkuMiddleware[];
320
+ input: InputSchema;
321
+ output?: OutputSchema;
322
+ node?: NodeConfig;
323
+ errors?: Array<typeof PikkuError>;
324
+ };
325
+ /**
326
+ * Creates a sessionless Pikku function that doesn't require user authentication.
327
+ * Use this for public endpoints, webhooks, or background tasks.
328
+ *
329
+ * Supports two patterns:
330
+ * 1. Generic types: `pikkuSessionlessFunc<Input, Output>({ func: ... })`
331
+ * 2. Zod schemas: `pikkuSessionlessFunc({ input: z.object(...), func: ... })`
332
+ *
333
+ * @template In - Input type for the function (inferred from schema if provided)
334
+ * @template Out - Output type for the function (inferred from schema if provided)
335
+ * @param func - Function definition, either direct function or configuration object
336
+ * @returns The normalized configuration object
337
+ *
338
+ * @example
339
+ * ```typescript
340
+ * // Pattern 1: Using generic types
341
+ * const healthCheck = pikkuSessionlessFunc<void, {status: string}>({
342
+ * func: async ({logger}) => {
343
+ * return { status: 'healthy' }
344
+ * }
345
+ * })
346
+ *
347
+ * // Pattern 2: Using Zod schemas
348
+ * const greetInput = z.object({ name: z.string() })
349
+ * const greetOutput = z.object({ message: z.string() })
350
+ *
351
+ * const greet = pikkuSessionlessFunc({
352
+ * input: greetInput,
353
+ * output: greetOutput,
354
+ * func: async (_services, { name }) => {
355
+ * return { message: `Hello, ${name}!` }
356
+ * }
357
+ * })
358
+ * ```
359
+ */
360
+ export declare function pikkuSessionlessFunc<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>): PikkuFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>;
361
+ export declare function pikkuSessionlessFunc<In, Out = unknown>(func: PikkuFunctionSessionless<In, Out, 'session' | 'rpc'> | PikkuFunctionConfig<In, Out, 'session' | 'rpc'>): PikkuFunctionConfig<In, Out, 'session' | 'rpc'>;
362
+ /**
363
+ * Creates a function that takes no input and returns no output.
364
+ * Useful for health checks, triggers, or cleanup operations.
365
+ *
366
+ * @param func - Function definition, either direct function or configuration object
367
+ * @returns The normalized configuration object
368
+ *
369
+ * @example
370
+ * ```typescript
371
+ * const cleanupTempFiles = pikkuVoidFunc(async ({fileSystem, logger}) => {
372
+ * logger.info('Starting cleanup of temporary files')
373
+ * await fileSystem.deleteDirectory('/tmp/uploads')
374
+ * logger.info('Cleanup completed')
375
+ * })
376
+ * ```
377
+ */
378
+ export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "rpc" | "session", PikkuFunctionSessionless<void, void, "rpc" | "session", Services> | PikkuFunction<void, void, "rpc" | "session", Services>, undefined, undefined>;
379
+ /**
380
+ * Creates a wrapper function for addon package functions that are exposed via RPC.
381
+ * This allows you to wire addon functions to any wiring type (HTTP, queue, etc.)
382
+ * without type compatibility issues.
383
+ *
384
+ * @template Name - The RPC method name (must be a key in FlattenedRPCMap)
385
+ * @param rpcName - The name of the RPC method to invoke
386
+ * @returns A Pikku function that proxies calls to the addon RPC method
387
+ *
388
+ * @example
389
+ * ```typescript
390
+ * // Wire an addon function via HTTP
391
+ * wireHTTP({
392
+ * auth: false,
393
+ * method: 'get',
394
+ * route: '/addon/hello',
395
+ * func: addon('ext:hello'),
396
+ * tags: ['addon'],
397
+ * })
398
+ * ```
399
+ */
400
+ export declare const addon: <Name extends keyof FlattenedRPCMap>(rpcName: Name) => PikkuFunctionConfig<FlattenedRPCMap[Name]["input"], FlattenedRPCMap[Name]["output"], "session" | "rpc">;
401
+ /**
402
+ * Creates a Pikku config factory.
403
+ * Use this to define your application's configuration factory.
404
+ *
405
+ * @param func - Config factory function that returns your application's config
406
+ * @returns The config factory function
407
+ *
408
+ * @example
409
+ * ```typescript
410
+ * export const createConfig = pikkuConfig(async () => {
411
+ * return {
412
+ * apiUrl: process.env.API_URL || 'http://localhost:3000',
413
+ * dbUrl: process.env.DATABASE_URL
414
+ * }
415
+ * })
416
+ * ```
417
+ */
418
+ export declare const pikkuConfig: (func: (variables?: any, ...args: any[]) => Promise<Config>) => (variables?: any, ...args: any[]) => Promise<Config>;
419
+ /**
420
+ * Creates a Pikku singleton services factory.
421
+ * Use this to define services that are created once and shared across all requests.
422
+ *
423
+ * @param func - Singleton services factory function
424
+ * @returns The singleton services factory function
425
+ *
426
+ * @example
427
+ * ```typescript
428
+ * export const createSingletonServices = pikkuServices(async (config, existingServices) => {
429
+ * return {
430
+ * config,
431
+ * logger: new CustomLogger(),
432
+ * db: await createDatabaseConnection(config.dbUrl)
433
+ * }
434
+ * })
435
+ * ```
436
+ */
437
+ export declare const pikkuServices: (func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<RequiredSingletonServices>) => (config: Config, existingServices?: Partial<SingletonServices>) => Promise<RequiredSingletonServices>;
438
+ /**
439
+ * Creates a Pikku wire services factory.
440
+ * Use this to define services that are created per-request/session.
441
+ *
442
+ * @param func - Wire services factory function
443
+ * @returns The wire services factory function
444
+ *
445
+ * @example
446
+ * ```typescript
447
+ * export const createWireServices = pikkuWireServices(async (services, wire) => {
448
+ * const session = await wire.session?.get()
449
+ * return {
450
+ * userCache: new UserCache(session?.userId)
451
+ * }
452
+ * })
453
+ * ```
454
+ */
455
+ export declare const pikkuWireServices: (func: (services: SingletonServices, wire: any) => Promise<RequiredWireServices>) => CreateWireServices;
456
+ /**
457
+ * Adds global middleware for a specific tag.
458
+ *
459
+ * This function allows you to register middleware that will be applied to
460
+ * any wiring (HTTP, Channel, Queue, Scheduler, MCP) that includes the matching tag.
461
+ *
462
+ * @param tag - The tag that the middleware should apply to.
463
+ * @param middleware - The middleware array to apply for the specified tag.
464
+ *
465
+ * @throws Error if middleware for the tag already exists.
466
+ *
467
+ * @example
468
+ * ```typescript
469
+ * // Add admin middleware for admin endpoints
470
+ * addMiddleware('admin', [adminMiddleware])
471
+ *
472
+ * // Add authentication middleware for auth endpoints
473
+ * addMiddleware('auth', [authMiddleware])
474
+ *
475
+ * // Add logging middleware for all API endpoints
476
+ * addMiddleware('api', [loggingMiddleware])
477
+ * ```
478
+ */
479
+ export declare const addMiddleware: (tag: string, middleware: PikkuMiddleware[]) => void;
480
+ /**
481
+ * Adds global permissions for a specific tag.
482
+ *
483
+ * This function allows you to register permissions that will be applied to
484
+ * any wiring (HTTP, Channel, Queue, Scheduler, MCP) that includes the matching tag.
485
+ *
486
+ * @param tag - The tag that the permissions should apply to.
487
+ * @param permissions - The permissions array or object to apply for the specified tag.
488
+ *
489
+ * @throws Error if permissions for the tag already exist.
490
+ *
491
+ * @example
492
+ * ```typescript
493
+ * // Add admin permissions for admin endpoints
494
+ * addPermission('admin', [adminPermission])
495
+ *
496
+ * // Add authentication permissions for auth endpoints
497
+ * addPermission('auth', [authPermission])
498
+ *
499
+ * // Add read permissions for all API endpoints (as object)
500
+ * addPermission('api', { read: readPermission })
501
+ * ```
502
+ */
503
+ export declare const addPermission: <In = unknown>(tag: string, permissions: CorePermissionGroup<PikkuPermission<In>> | PikkuPermission<In>[]) => void;
504
+ export { wireAddon } from '@pikku/core';
505
+ export type { WireAddonConfig } from '@pikku/core';
506
+ //# sourceMappingURL=pikku-function-types.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pikku-function-types.gen.d.ts","sourceRoot":"","sources":["../../../.pikku/function/pikku-function-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EA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