@webiny/ai-powerups 0.0.0-unstable.e6f0dc8ca7

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 (316) hide show
  1. package/AiPowerups.d.ts +2 -0
  2. package/AiPowerups.js +12 -0
  3. package/AiPowerups.js.map +1 -0
  4. package/LICENSE +36 -0
  5. package/README.md +11 -0
  6. package/admin/Extension.d.ts +2 -0
  7. package/admin/Extension.js +39 -0
  8. package/admin/Extension.js.map +1 -0
  9. package/admin/domain/errors.d.ts +12 -0
  10. package/admin/domain/errors.js +22 -0
  11. package/admin/domain/errors.js.map +1 -0
  12. package/admin/features/feature.d.ts +1 -0
  13. package/admin/features/feature.js +21 -0
  14. package/admin/features/feature.js.map +1 -0
  15. package/admin/features/generatePageContent/GeneratePageContentGateway.d.ts +12 -0
  16. package/admin/features/generatePageContent/GeneratePageContentGateway.js +42 -0
  17. package/admin/features/generatePageContent/GeneratePageContentGateway.js.map +1 -0
  18. package/admin/features/generatePageContent/GeneratePageContentUseCase.d.ts +11 -0
  19. package/admin/features/generatePageContent/GeneratePageContentUseCase.js +15 -0
  20. package/admin/features/generatePageContent/GeneratePageContentUseCase.js.map +1 -0
  21. package/admin/features/generatePageContent/abstractions.d.ts +24 -0
  22. package/admin/features/generatePageContent/abstractions.js +5 -0
  23. package/admin/features/generatePageContent/abstractions.js.map +1 -0
  24. package/admin/features/generatePageContent/feature.d.ts +1 -0
  25. package/admin/features/generatePageContent/feature.js +12 -0
  26. package/admin/features/generatePageContent/feature.js.map +1 -0
  27. package/admin/features/generatePageContent/index.d.ts +3 -0
  28. package/admin/features/generatePageContent/index.js +4 -0
  29. package/admin/features/generatePageContent/index.js.map +1 -0
  30. package/admin/features/listModels/ListModelsGateway.d.ts +12 -0
  31. package/admin/features/listModels/ListModelsGateway.js +31 -0
  32. package/admin/features/listModels/ListModelsGateway.js.map +1 -0
  33. package/admin/features/listModels/ListModelsRepository.d.ts +13 -0
  34. package/admin/features/listModels/ListModelsRepository.js +24 -0
  35. package/admin/features/listModels/ListModelsRepository.js.map +1 -0
  36. package/admin/features/listModels/ListModelsUseCase.d.ts +10 -0
  37. package/admin/features/listModels/ListModelsUseCase.js +15 -0
  38. package/admin/features/listModels/ListModelsUseCase.js.map +1 -0
  39. package/admin/features/listModels/abstractions.d.ts +28 -0
  40. package/admin/features/listModels/abstractions.js +6 -0
  41. package/admin/features/listModels/abstractions.js.map +1 -0
  42. package/admin/features/listModels/feature.d.ts +3 -0
  43. package/admin/features/listModels/feature.js +20 -0
  44. package/admin/features/listModels/feature.js.map +1 -0
  45. package/admin/features/listModels/index.d.ts +2 -0
  46. package/admin/features/listModels/index.js +4 -0
  47. package/admin/features/listModels/index.js.map +1 -0
  48. package/admin/features/settings/getSettings/GetSettingsGateway.d.ts +12 -0
  49. package/admin/features/settings/getSettings/GetSettingsGateway.js +26 -0
  50. package/admin/features/settings/getSettings/GetSettingsGateway.js.map +1 -0
  51. package/admin/features/settings/getSettings/GetSettingsRepository.d.ts +14 -0
  52. package/admin/features/settings/getSettings/GetSettingsRepository.js +31 -0
  53. package/admin/features/settings/getSettings/GetSettingsRepository.js.map +1 -0
  54. package/admin/features/settings/getSettings/GetSettingsUseCase.d.ts +11 -0
  55. package/admin/features/settings/getSettings/GetSettingsUseCase.js +15 -0
  56. package/admin/features/settings/getSettings/GetSettingsUseCase.js.map +1 -0
  57. package/admin/features/settings/getSettings/abstractions.d.ts +22 -0
  58. package/admin/features/settings/getSettings/abstractions.js +6 -0
  59. package/admin/features/settings/getSettings/abstractions.js.map +1 -0
  60. package/admin/features/settings/getSettings/feature.d.ts +3 -0
  61. package/admin/features/settings/getSettings/feature.js +20 -0
  62. package/admin/features/settings/getSettings/feature.js.map +1 -0
  63. package/admin/features/settings/getSettings/index.d.ts +2 -0
  64. package/admin/features/settings/getSettings/index.js +4 -0
  65. package/admin/features/settings/getSettings/index.js.map +1 -0
  66. package/admin/features/settings/shared/SettingsCache.d.ts +10 -0
  67. package/admin/features/settings/shared/SettingsCache.js +18 -0
  68. package/admin/features/settings/shared/SettingsCache.js.map +1 -0
  69. package/admin/features/settings/shared/abstractions.d.ts +50 -0
  70. package/admin/features/settings/shared/abstractions.js +4 -0
  71. package/admin/features/settings/shared/abstractions.js.map +1 -0
  72. package/admin/features/settings/shared/feature.d.ts +3 -0
  73. package/admin/features/settings/shared/feature.js +16 -0
  74. package/admin/features/settings/shared/feature.js.map +1 -0
  75. package/admin/features/settings/shared/index.d.ts +2 -0
  76. package/admin/features/settings/shared/index.js +4 -0
  77. package/admin/features/settings/shared/index.js.map +1 -0
  78. package/admin/features/settings/updateSettings/UpdateSettingsGateway.d.ts +12 -0
  79. package/admin/features/settings/updateSettings/UpdateSettingsGateway.js +44 -0
  80. package/admin/features/settings/updateSettings/UpdateSettingsGateway.js.map +1 -0
  81. package/admin/features/settings/updateSettings/UpdateSettingsRepository.d.ts +13 -0
  82. package/admin/features/settings/updateSettings/UpdateSettingsRepository.js +19 -0
  83. package/admin/features/settings/updateSettings/UpdateSettingsRepository.js.map +1 -0
  84. package/admin/features/settings/updateSettings/UpdateSettingsUseCase.d.ts +11 -0
  85. package/admin/features/settings/updateSettings/UpdateSettingsUseCase.js +15 -0
  86. package/admin/features/settings/updateSettings/UpdateSettingsUseCase.js.map +1 -0
  87. package/admin/features/settings/updateSettings/abstractions.d.ts +22 -0
  88. package/admin/features/settings/updateSettings/abstractions.js +6 -0
  89. package/admin/features/settings/updateSettings/abstractions.js.map +1 -0
  90. package/admin/features/settings/updateSettings/feature.d.ts +3 -0
  91. package/admin/features/settings/updateSettings/feature.js +20 -0
  92. package/admin/features/settings/updateSettings/feature.js.map +1 -0
  93. package/admin/features/settings/updateSettings/index.d.ts +2 -0
  94. package/admin/features/settings/updateSettings/index.js +4 -0
  95. package/admin/features/settings/updateSettings/index.js.map +1 -0
  96. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPage.d.ts +4 -0
  97. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPage.js +53 -0
  98. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPage.js.map +1 -0
  99. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPresenter.d.ts +26 -0
  100. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPresenter.js +158 -0
  101. package/admin/presentation/AiPowerUpsSettings/AiPowerUpsSettingsPresenter.js.map +1 -0
  102. package/admin/presentation/AiPowerUpsSettings/abstractions.d.ts +18 -0
  103. package/admin/presentation/AiPowerUpsSettings/abstractions.js +4 -0
  104. package/admin/presentation/AiPowerUpsSettings/abstractions.js.map +1 -0
  105. package/admin/presentation/AiPowerUpsSettings/feature.d.ts +3 -0
  106. package/admin/presentation/AiPowerUpsSettings/feature.js +24 -0
  107. package/admin/presentation/AiPowerUpsSettings/feature.js.map +1 -0
  108. package/admin/presentation/AiPowerUpsSettings/index.d.ts +3 -0
  109. package/admin/presentation/AiPowerUpsSettings/index.js +5 -0
  110. package/admin/presentation/AiPowerUpsSettings/index.js.map +1 -0
  111. package/admin/presentation/AiPowerUpsSettings/settingsGroup.d.ts +17 -0
  112. package/admin/presentation/AiPowerUpsSettings/settingsGroup.js +4 -0
  113. package/admin/presentation/AiPowerUpsSettings/settingsGroup.js.map +1 -0
  114. package/admin/presentation/AiPowerUpsSettings/useAiPowerUpsSettings.d.ts +4 -0
  115. package/admin/presentation/AiPowerUpsSettings/useAiPowerUpsSettings.js +28 -0
  116. package/admin/presentation/AiPowerUpsSettings/useAiPowerUpsSettings.js.map +1 -0
  117. package/admin/presentation/ProjectsSettings.d.ts +11 -0
  118. package/admin/presentation/ProjectsSettings.js +55 -0
  119. package/admin/presentation/ProjectsSettings.js.map +1 -0
  120. package/admin/presentation/ProvidersSettings.d.ts +16 -0
  121. package/admin/presentation/ProvidersSettings.js +40 -0
  122. package/admin/presentation/ProvidersSettings.js.map +1 -0
  123. package/admin/presentation/ReaderPersonasSettings.d.ts +11 -0
  124. package/admin/presentation/ReaderPersonasSettings.js +32 -0
  125. package/admin/presentation/ReaderPersonasSettings.js.map +1 -0
  126. package/admin/presentation/WbContentGeneration/Extension.d.ts +2 -0
  127. package/admin/presentation/WbContentGeneration/Extension.js +23 -0
  128. package/admin/presentation/WbContentGeneration/Extension.js.map +1 -0
  129. package/admin/presentation/WbContentGeneration/GenerateContentButton.d.ts +2 -0
  130. package/admin/presentation/WbContentGeneration/GenerateContentButton.js +24 -0
  131. package/admin/presentation/WbContentGeneration/GenerateContentButton.js.map +1 -0
  132. package/admin/presentation/WbContentGeneration/GenerateContentDialog.d.ts +21 -0
  133. package/admin/presentation/WbContentGeneration/GenerateContentDialog.js +107 -0
  134. package/admin/presentation/WbContentGeneration/GenerateContentDialog.js.map +1 -0
  135. package/admin/presentation/WbContentGeneration/GenerateContentPresenter.d.ts +38 -0
  136. package/admin/presentation/WbContentGeneration/GenerateContentPresenter.js +231 -0
  137. package/admin/presentation/WbContentGeneration/GenerateContentPresenter.js.map +1 -0
  138. package/admin/presentation/WbContentGeneration/PROCESS_IDEA.md +190 -0
  139. package/admin/presentation/WbContentGeneration/abstractions.d.ts +30 -0
  140. package/admin/presentation/WbContentGeneration/abstractions.js +4 -0
  141. package/admin/presentation/WbContentGeneration/abstractions.js.map +1 -0
  142. package/admin/presentation/WbContentGeneration/decompressGzipBase64.d.ts +1 -0
  143. package/admin/presentation/WbContentGeneration/decompressGzipBase64.js +14 -0
  144. package/admin/presentation/WbContentGeneration/decompressGzipBase64.js.map +1 -0
  145. package/admin/presentation/WbContentGeneration/feature.d.ts +3 -0
  146. package/admin/presentation/WbContentGeneration/feature.js +16 -0
  147. package/admin/presentation/WbContentGeneration/feature.js.map +1 -0
  148. package/admin/presentation/WriterPersonasSettings.d.ts +11 -0
  149. package/admin/presentation/WriterPersonasSettings.js +32 -0
  150. package/admin/presentation/WriterPersonasSettings.js.map +1 -0
  151. package/admin/routes.d.ts +4 -0
  152. package/admin/routes.js +9 -0
  153. package/admin/routes.js.map +1 -0
  154. package/api/Extension.d.ts +4 -0
  155. package/api/Extension.js +36 -0
  156. package/api/Extension.js.map +1 -0
  157. package/api/constants.d.ts +1 -0
  158. package/api/constants.js +3 -0
  159. package/api/constants.js.map +1 -0
  160. package/api/features/AiImageEnrichment/AiImageEnrichmentAfterCreateHandler.d.ts +11 -0
  161. package/api/features/AiImageEnrichment/AiImageEnrichmentAfterCreateHandler.js +28 -0
  162. package/api/features/AiImageEnrichment/AiImageEnrichmentAfterCreateHandler.js.map +1 -0
  163. package/api/features/AiImageEnrichment/AiImageEnrichmentTask.d.ts +34 -0
  164. package/api/features/AiImageEnrichment/AiImageEnrichmentTask.js +132 -0
  165. package/api/features/AiImageEnrichment/AiImageEnrichmentTask.js.map +1 -0
  166. package/api/features/AiImageEnrichment/feature.d.ts +4 -0
  167. package/api/features/AiImageEnrichment/feature.js +12 -0
  168. package/api/features/AiImageEnrichment/feature.js.map +1 -0
  169. package/api/features/AiPromptContext/AiPromptContextBuilder.d.ts +19 -0
  170. package/api/features/AiPromptContext/AiPromptContextBuilder.js +154 -0
  171. package/api/features/AiPromptContext/AiPromptContextBuilder.js.map +1 -0
  172. package/api/features/AiPromptContext/ProjectSection.d.ts +4 -0
  173. package/api/features/AiPromptContext/ProjectSection.js +22 -0
  174. package/api/features/AiPromptContext/ProjectSection.js.map +1 -0
  175. package/api/features/AiPromptContext/ReaderPersonaSection.d.ts +4 -0
  176. package/api/features/AiPromptContext/ReaderPersonaSection.js +11 -0
  177. package/api/features/AiPromptContext/ReaderPersonaSection.js.map +1 -0
  178. package/api/features/AiPromptContext/WriterPersonaSection.d.ts +4 -0
  179. package/api/features/AiPromptContext/WriterPersonaSection.js +11 -0
  180. package/api/features/AiPromptContext/WriterPersonaSection.js.map +1 -0
  181. package/api/features/AiPromptContext/abstractions.d.ts +37 -0
  182. package/api/features/AiPromptContext/abstractions.js +4 -0
  183. package/api/features/AiPromptContext/abstractions.js.map +1 -0
  184. package/api/features/AiPromptContext/feature.d.ts +4 -0
  185. package/api/features/AiPromptContext/feature.js +10 -0
  186. package/api/features/AiPromptContext/feature.js.map +1 -0
  187. package/api/features/AiPromptContext/index.d.ts +1 -0
  188. package/api/features/AiPromptContext/index.js +3 -0
  189. package/api/features/AiPromptContext/index.js.map +1 -0
  190. package/api/features/GetSettings/GetSettingsRepository.d.ts +16 -0
  191. package/api/features/GetSettings/GetSettingsRepository.js +40 -0
  192. package/api/features/GetSettings/GetSettingsRepository.js.map +1 -0
  193. package/api/features/GetSettings/GetSettingsUseCase.d.ts +10 -0
  194. package/api/features/GetSettings/GetSettingsUseCase.js +15 -0
  195. package/api/features/GetSettings/GetSettingsUseCase.js.map +1 -0
  196. package/api/features/GetSettings/abstractions.d.ts +16 -0
  197. package/api/features/GetSettings/abstractions.js +5 -0
  198. package/api/features/GetSettings/abstractions.js.map +1 -0
  199. package/api/features/GetSettings/feature.d.ts +4 -0
  200. package/api/features/GetSettings/feature.js +12 -0
  201. package/api/features/GetSettings/feature.js.map +1 -0
  202. package/api/features/GetSettings/index.d.ts +1 -0
  203. package/api/features/GetSettings/index.js +3 -0
  204. package/api/features/GetSettings/index.js.map +1 -0
  205. package/api/features/Projects/ProjectsHandler.d.ts +31 -0
  206. package/api/features/Projects/ProjectsHandler.js +101 -0
  207. package/api/features/Projects/ProjectsHandler.js.map +1 -0
  208. package/api/features/Projects/feature.d.ts +4 -0
  209. package/api/features/Projects/feature.js +10 -0
  210. package/api/features/Projects/feature.js.map +1 -0
  211. package/api/features/Projects/types.d.ts +50 -0
  212. package/api/features/Projects/types.js +3 -0
  213. package/api/features/Projects/types.js.map +1 -0
  214. package/api/features/Providers/ProvidersGraphQLMapper.d.ts +21 -0
  215. package/api/features/Providers/ProvidersGraphQLMapper.js +36 -0
  216. package/api/features/Providers/ProvidersGraphQLMapper.js.map +1 -0
  217. package/api/features/Providers/ProvidersHandler.d.ts +26 -0
  218. package/api/features/Providers/ProvidersHandler.js +76 -0
  219. package/api/features/Providers/ProvidersHandler.js.map +1 -0
  220. package/api/features/Providers/feature.d.ts +4 -0
  221. package/api/features/Providers/feature.js +12 -0
  222. package/api/features/Providers/feature.js.map +1 -0
  223. package/api/features/Providers/index.d.ts +1 -0
  224. package/api/features/Providers/index.js +3 -0
  225. package/api/features/Providers/index.js.map +1 -0
  226. package/api/features/Providers/types.d.ts +29 -0
  227. package/api/features/Providers/types.js +3 -0
  228. package/api/features/Providers/types.js.map +1 -0
  229. package/api/features/ReaderPersonas/ReaderPersonasHandler.d.ts +20 -0
  230. package/api/features/ReaderPersonas/ReaderPersonasHandler.js +42 -0
  231. package/api/features/ReaderPersonas/ReaderPersonasHandler.js.map +1 -0
  232. package/api/features/ReaderPersonas/feature.d.ts +4 -0
  233. package/api/features/ReaderPersonas/feature.js +10 -0
  234. package/api/features/ReaderPersonas/feature.js.map +1 -0
  235. package/api/features/ReaderPersonas/index.d.ts +2 -0
  236. package/api/features/ReaderPersonas/index.js +3 -0
  237. package/api/features/ReaderPersonas/index.js.map +1 -0
  238. package/api/features/ReaderPersonas/types.d.ts +24 -0
  239. package/api/features/ReaderPersonas/types.js +3 -0
  240. package/api/features/ReaderPersonas/types.js.map +1 -0
  241. package/api/features/UpdateSettings/UpdateSettingsRepository.d.ts +16 -0
  242. package/api/features/UpdateSettings/UpdateSettingsRepository.js +77 -0
  243. package/api/features/UpdateSettings/UpdateSettingsRepository.js.map +1 -0
  244. package/api/features/UpdateSettings/UpdateSettingsUseCase.d.ts +13 -0
  245. package/api/features/UpdateSettings/UpdateSettingsUseCase.js +28 -0
  246. package/api/features/UpdateSettings/UpdateSettingsUseCase.js.map +1 -0
  247. package/api/features/UpdateSettings/abstractions.d.ts +36 -0
  248. package/api/features/UpdateSettings/abstractions.js +10 -0
  249. package/api/features/UpdateSettings/abstractions.js.map +1 -0
  250. package/api/features/UpdateSettings/errors.d.ts +10 -0
  251. package/api/features/UpdateSettings/errors.js +14 -0
  252. package/api/features/UpdateSettings/errors.js.map +1 -0
  253. package/api/features/UpdateSettings/events.d.ts +10 -0
  254. package/api/features/UpdateSettings/events.js +16 -0
  255. package/api/features/UpdateSettings/events.js.map +1 -0
  256. package/api/features/UpdateSettings/feature.d.ts +4 -0
  257. package/api/features/UpdateSettings/feature.js +12 -0
  258. package/api/features/UpdateSettings/feature.js.map +1 -0
  259. package/api/features/UpdateSettings/index.d.ts +1 -0
  260. package/api/features/UpdateSettings/index.js +3 -0
  261. package/api/features/UpdateSettings/index.js.map +1 -0
  262. package/api/features/WbGeneratePageContent/WbGeneratePageContentTask.d.ts +33 -0
  263. package/api/features/WbGeneratePageContent/WbGeneratePageContentTask.js +76 -0
  264. package/api/features/WbGeneratePageContent/WbGeneratePageContentTask.js.map +1 -0
  265. package/api/features/WbGeneratePageContent/WbGeneratePageContentUseCase.d.ts +21 -0
  266. package/api/features/WbGeneratePageContent/WbGeneratePageContentUseCase.js +79 -0
  267. package/api/features/WbGeneratePageContent/WbGeneratePageContentUseCase.js.map +1 -0
  268. package/api/features/WbGeneratePageContent/abstractions.d.ts +18 -0
  269. package/api/features/WbGeneratePageContent/abstractions.js +4 -0
  270. package/api/features/WbGeneratePageContent/abstractions.js.map +1 -0
  271. package/api/features/WbGeneratePageContent/buildPrompt.d.ts +1 -0
  272. package/api/features/WbGeneratePageContent/buildPrompt.js +142 -0
  273. package/api/features/WbGeneratePageContent/buildPrompt.js.map +1 -0
  274. package/api/features/WbGeneratePageContent/feature.d.ts +4 -0
  275. package/api/features/WbGeneratePageContent/feature.js +12 -0
  276. package/api/features/WbGeneratePageContent/feature.js.map +1 -0
  277. package/api/features/WbGeneratePageContent/index.d.ts +1 -0
  278. package/api/features/WbGeneratePageContent/index.js +3 -0
  279. package/api/features/WbGeneratePageContent/index.js.map +1 -0
  280. package/api/features/WriterPersonas/WriterPersonasHandler.d.ts +20 -0
  281. package/api/features/WriterPersonas/WriterPersonasHandler.js +42 -0
  282. package/api/features/WriterPersonas/WriterPersonasHandler.js.map +1 -0
  283. package/api/features/WriterPersonas/feature.d.ts +4 -0
  284. package/api/features/WriterPersonas/feature.js +10 -0
  285. package/api/features/WriterPersonas/feature.js.map +1 -0
  286. package/api/features/WriterPersonas/index.d.ts +2 -0
  287. package/api/features/WriterPersonas/index.js +3 -0
  288. package/api/features/WriterPersonas/index.js.map +1 -0
  289. package/api/features/WriterPersonas/types.d.ts +24 -0
  290. package/api/features/WriterPersonas/types.js +3 -0
  291. package/api/features/WriterPersonas/types.js.map +1 -0
  292. package/api/features/shared/SettingsCache.d.ts +12 -0
  293. package/api/features/shared/SettingsCache.js +19 -0
  294. package/api/features/shared/SettingsCache.js.map +1 -0
  295. package/api/features/shared/abstractions.d.ts +33 -0
  296. package/api/features/shared/abstractions.js +6 -0
  297. package/api/features/shared/abstractions.js.map +1 -0
  298. package/api/features/shared/index.d.ts +3 -0
  299. package/api/features/shared/index.js +5 -0
  300. package/api/features/shared/index.js.map +1 -0
  301. package/api/graphql/AiPowerUpsSettingsGraphQLMapper.d.ts +13 -0
  302. package/api/graphql/AiPowerUpsSettingsGraphQLMapper.js +35 -0
  303. package/api/graphql/AiPowerUpsSettingsGraphQLMapper.js.map +1 -0
  304. package/api/graphql/BaseGraphQLSchema.d.ts +8 -0
  305. package/api/graphql/BaseGraphQLSchema.js +141 -0
  306. package/api/graphql/BaseGraphQLSchema.js.map +1 -0
  307. package/api/graphql/abstractions.d.ts +9 -0
  308. package/api/graphql/abstractions.js +4 -0
  309. package/api/graphql/abstractions.js.map +1 -0
  310. package/api/types.d.ts +5 -0
  311. package/api/types.js +7 -0
  312. package/api/types.js.map +1 -0
  313. package/index.d.ts +1 -0
  314. package/index.js +3 -0
  315. package/index.js.map +1 -0
  316. package/package.json +58 -0
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const AiPowerups: () => React.JSX.Element;
package/AiPowerups.js ADDED
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { Api, Admin } from "@webiny/project-aws";
3
+ import { Wcp } from "@webiny/project";
4
+ export const AiPowerups = () => {
5
+ return /*#__PURE__*/React.createElement(Wcp.CanUseMultiTenancy, null, /*#__PURE__*/React.createElement(Api.Extension, {
6
+ src: import.meta.dirname + "/api/Extension.js"
7
+ }), /*#__PURE__*/React.createElement(Admin.Extension, {
8
+ src: import.meta.dirname + "/admin/Extension.js"
9
+ }));
10
+ };
11
+
12
+ //# sourceMappingURL=AiPowerups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Api","Admin","Wcp","AiPowerups","createElement","CanUseMultiTenancy","Extension","src","import","meta","dirname"],"sources":["AiPowerups.tsx"],"sourcesContent":["import React from \"react\";\nimport { Api, Admin } from \"@webiny/project-aws\";\nimport { Wcp } from \"@webiny/project\";\n\nexport const AiPowerups = () => {\n return (\n <Wcp.CanUseMultiTenancy>\n {/* Api extensions */}\n <Api.Extension src={import.meta.dirname + \"/api/Extension.js\"} />\n\n {/* Admin extensions */}\n <Admin.Extension src={import.meta.dirname + \"/admin/Extension.js\"} />\n </Wcp.CanUseMultiTenancy>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,GAAG,EAAEC,KAAK,QAAQ,qBAAqB;AAChD,SAASC,GAAG,QAAQ,iBAAiB;AAErC,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC5B,oBACIJ,KAAA,CAAAK,aAAA,CAACF,GAAG,CAACG,kBAAkB,qBAEnBN,KAAA,CAAAK,aAAA,CAACJ,GAAG,CAACM,SAAS;IAACC,GAAG,EAAEC,MAAM,CAACC,IAAI,CAACC,OAAO,GAAG;EAAoB,CAAE,CAAC,eAGjEX,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACK,SAAS;IAACC,GAAG,EAAEC,MAAM,CAACC,IAAI,CAACC,OAAO,GAAG;EAAsB,CAAE,CAChD,CAAC;AAEjC,CAAC","ignoreList":[]}
package/LICENSE ADDED
@@ -0,0 +1,36 @@
1
+ The Webiny Enterprise license (the “Enterprise License”)
2
+ Copyright (c) 2021 Webiny Ltd.
3
+
4
+ With regard to the Webiny Software:
5
+
6
+ This software and associated documentation files (the "Software") may only be
7
+ used in production, if you (and any entity that you represent) have agreed to,
8
+ and are in compliance with, the Webiny Subscription Terms of Service, available
9
+ at https://www.webiny.com/terms (the “Enterprise Terms”), or other
10
+ agreement governing the use of the Software, as agreed by you and Webiny,
11
+ and otherwise have a valid Webiny Enterprise license for the
12
+ correct number of user seats. Subject to the foregoing sentence, you are free to
13
+ modify this Software and publish patches to the Software. You agree that Webiny
14
+ and/or its licensors (as applicable) retain all right, title and interest in and
15
+ to all such modifications and/or patches, and all such modifications and/or
16
+ patches may only be used, copied, modified, displayed, distributed, or otherwise
17
+ exploited with a valid Webiny Enterprise license for the correct
18
+ number of user seats. Notwithstanding the foregoing, you may copy and modify
19
+ the Software for development and testing purposes, without requiring a
20
+ subscription. You agree that Webiny and/or its licensors (as applicable) retain
21
+ all right, title and interest in and to all such modifications. You are not
22
+ granted any other rights beyond what is expressly stated herein. Subject to the
23
+ foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
24
+ and/or sell the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
33
+
34
+ For all third party components incorporated into the Webiny Software, those
35
+ components are licensed under the original license provided by the owner of the
36
+ applicable component.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @webiny/ai-powerups
2
+
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
6
+
7
+ 📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
8
+
9
+ ---
10
+
11
+ _This README file is automatically generated during the publish process._
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Extension: () => React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { AdminConfig, AdminLayout, useRouter, RegisterFeature } from "@webiny/app-admin";
3
+ import { AiPowerUpsSettingsFeature } from "./presentation/AiPowerUpsSettings/index.js";
4
+ import { AiPowerUpsSettingsPage } from "./presentation/AiPowerUpsSettings/AiPowerUpsSettingsPage.js";
5
+ import { WbContentGeneration } from "./presentation/WbContentGeneration/Extension.js";
6
+ import { AiPowerUpsHeadlessFeatures } from "./features/feature.js";
7
+ import { Routes } from "./routes.js";
8
+ const {
9
+ Menu,
10
+ Route
11
+ } = AdminConfig;
12
+ const AiPowerUpsSettings = () => {
13
+ const {
14
+ getLink
15
+ } = useRouter();
16
+ return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Route, {
17
+ route: Routes.Settings,
18
+ element: /*#__PURE__*/React.createElement(AdminLayout, {
19
+ title: "AI Power-Ups"
20
+ }, /*#__PURE__*/React.createElement(AiPowerUpsSettingsPage, null))
21
+ }), /*#__PURE__*/React.createElement(Menu, {
22
+ parent: "settings.system",
23
+ name: "aiPowerUps",
24
+ element: /*#__PURE__*/React.createElement(Menu.Link, {
25
+ text: "AI Power-Ups",
26
+ to: getLink(Routes.Settings),
27
+ pinnable: true
28
+ })
29
+ }));
30
+ };
31
+ export const Extension = () => {
32
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RegisterFeature, {
33
+ feature: AiPowerUpsHeadlessFeatures
34
+ }), /*#__PURE__*/React.createElement(RegisterFeature, {
35
+ feature: AiPowerUpsSettingsFeature
36
+ }), /*#__PURE__*/React.createElement(AiPowerUpsSettings, null), /*#__PURE__*/React.createElement(WbContentGeneration, null));
37
+ };
38
+
39
+ //# sourceMappingURL=Extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","AdminConfig","AdminLayout","useRouter","RegisterFeature","AiPowerUpsSettingsFeature","AiPowerUpsSettingsPage","WbContentGeneration","AiPowerUpsHeadlessFeatures","Routes","Menu","Route","AiPowerUpsSettings","getLink","createElement","route","Settings","element","title","parent","name","Link","text","to","pinnable","Extension","Fragment","feature"],"sources":["Extension.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig, AdminLayout, useRouter, RegisterFeature } from \"@webiny/app-admin\";\nimport { AiPowerUpsSettingsFeature } from \"./presentation/AiPowerUpsSettings/index.js\";\nimport { AiPowerUpsSettingsPage } from \"./presentation/AiPowerUpsSettings/AiPowerUpsSettingsPage.js\";\nimport { WbContentGeneration } from \"~/admin/presentation/WbContentGeneration/Extension.js\";\nimport { AiPowerUpsHeadlessFeatures } from \"~/admin/features/feature.js\";\nimport { Routes } from \"./routes.js\";\n\nconst { Menu, Route } = AdminConfig;\n\nconst AiPowerUpsSettings = () => {\n const { getLink } = useRouter();\n\n return (\n <AdminConfig>\n <Route\n route={Routes.Settings}\n element={\n <AdminLayout title={\"AI Power-Ups\"}>\n <AiPowerUpsSettingsPage />\n </AdminLayout>\n }\n />\n <Menu\n parent={\"settings.system\"}\n name={\"aiPowerUps\"}\n element={\n <Menu.Link\n text={\"AI Power-Ups\"}\n to={getLink(Routes.Settings)}\n pinnable={true}\n />\n }\n />\n </AdminConfig>\n );\n};\n\nexport const Extension = () => {\n return (\n <>\n <RegisterFeature feature={AiPowerUpsHeadlessFeatures} />\n <RegisterFeature feature={AiPowerUpsSettingsFeature} />\n <AiPowerUpsSettings />\n {/* Website Builder Extension */}\n <WbContentGeneration />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,EAAEC,WAAW,EAAEC,SAAS,EAAEC,eAAe,QAAQ,mBAAmB;AACxF,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B;AACnC,SAASC,MAAM;AAEf,MAAM;EAAEC,IAAI;EAAEC;AAAM,CAAC,GAAGV,WAAW;AAEnC,MAAMW,kBAAkB,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAQ,CAAC,GAAGV,SAAS,CAAC,CAAC;EAE/B,oBACIH,KAAA,CAAAc,aAAA,CAACb,WAAW,qBACRD,KAAA,CAAAc,aAAA,CAACH,KAAK;IACFI,KAAK,EAAEN,MAAM,CAACO,QAAS;IACvBC,OAAO,eACHjB,KAAA,CAAAc,aAAA,CAACZ,WAAW;MAACgB,KAAK,EAAE;IAAe,gBAC/BlB,KAAA,CAAAc,aAAA,CAACR,sBAAsB,MAAE,CAChB;EAChB,CACJ,CAAC,eACFN,KAAA,CAAAc,aAAA,CAACJ,IAAI;IACDS,MAAM,EAAE,iBAAkB;IAC1BC,IAAI,EAAE,YAAa;IACnBH,OAAO,eACHjB,KAAA,CAAAc,aAAA,CAACJ,IAAI,CAACW,IAAI;MACNC,IAAI,EAAE,cAAe;MACrBC,EAAE,EAAEV,OAAO,CAACJ,MAAM,CAACO,QAAQ,CAAE;MAC7BQ,QAAQ,EAAE;IAAK,CAClB;EACJ,CACJ,CACQ,CAAC;AAEtB,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC3B,oBACIzB,KAAA,CAAAc,aAAA,CAAAd,KAAA,CAAA0B,QAAA,qBACI1B,KAAA,CAAAc,aAAA,CAACV,eAAe;IAACuB,OAAO,EAAEnB;EAA2B,CAAE,CAAC,eACxDR,KAAA,CAAAc,aAAA,CAACV,eAAe;IAACuB,OAAO,EAAEtB;EAA0B,CAAE,CAAC,eACvDL,KAAA,CAAAc,aAAA,CAACF,kBAAkB,MAAE,CAAC,eAEtBZ,KAAA,CAAAc,aAAA,CAACP,mBAAmB,MAAE,CACxB,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { BaseError } from "@webiny/feature/admin";
2
+ import type { OutputErrors } from "@webiny/utils/createZodError.js";
3
+ export declare class SettingsValidationError extends BaseError<{
4
+ invalidFields: OutputErrors;
5
+ }> {
6
+ readonly code: "AiPowerUps/Settings/ValidationError";
7
+ constructor(invalidFields: OutputErrors);
8
+ }
9
+ export declare class SettingsUpdateError extends BaseError {
10
+ readonly code: "AiPowerUps/Settings/UpdateError";
11
+ constructor(message: string);
12
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseError } from "@webiny/feature/admin";
2
+ export class SettingsValidationError extends BaseError {
3
+ code = "AiPowerUps/Settings/ValidationError";
4
+ constructor(invalidFields) {
5
+ super({
6
+ message: "Validation failed.",
7
+ data: {
8
+ invalidFields
9
+ }
10
+ });
11
+ }
12
+ }
13
+ export class SettingsUpdateError extends BaseError {
14
+ code = "AiPowerUps/Settings/UpdateError";
15
+ constructor(message) {
16
+ super({
17
+ message
18
+ });
19
+ }
20
+ }
21
+
22
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BaseError","SettingsValidationError","code","constructor","invalidFields","message","data","SettingsUpdateError"],"sources":["errors.ts"],"sourcesContent":["import { BaseError } from \"@webiny/feature/admin\";\nimport type { OutputErrors } from \"@webiny/utils/createZodError.js\";\n\nexport class SettingsValidationError extends BaseError<{ invalidFields: OutputErrors }> {\n override readonly code = \"AiPowerUps/Settings/ValidationError\" as const;\n\n constructor(invalidFields: OutputErrors) {\n super({\n message: \"Validation failed.\",\n data: { invalidFields }\n });\n }\n}\n\nexport class SettingsUpdateError extends BaseError {\n override readonly code = \"AiPowerUps/Settings/UpdateError\" as const;\n\n constructor(message: string) {\n super({ message });\n }\n}\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,uBAAuB;AAGjD,OAAO,MAAMC,uBAAuB,SAASD,SAAS,CAAkC;EAClEE,IAAI,GAAG,qCAAqC;EAE9DC,WAAWA,CAACC,aAA2B,EAAE;IACrC,KAAK,CAAC;MACFC,OAAO,EAAE,oBAAoB;MAC7BC,IAAI,EAAE;QAAEF;MAAc;IAC1B,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMG,mBAAmB,SAASP,SAAS,CAAC;EAC7BE,IAAI,GAAG,iCAAiC;EAE1DC,WAAWA,CAACE,OAAe,EAAE;IACzB,KAAK,CAAC;MAAEA;IAAQ,CAAC,CAAC;EACtB;AACJ","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const AiPowerUpsHeadlessFeatures: import("@webiny/feature/admin").FeatureDefinition<{}, []>;
@@ -0,0 +1,21 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { ListModelsFeature } from "./listModels/index.js";
3
+ import { SharedSettingsFeature } from "./settings/shared/index.js";
4
+ import { GetSettingsFeature } from "./settings/getSettings/index.js";
5
+ import { UpdateSettingsFeature } from "./settings/updateSettings/index.js";
6
+ import { GeneratePageContentFeature } from "./generatePageContent/index.js";
7
+ export const AiPowerUpsHeadlessFeatures = createFeature({
8
+ name: "AiPowerUps/HeadlessFeatures",
9
+ register(container) {
10
+ SharedSettingsFeature.register(container);
11
+ GetSettingsFeature.register(container);
12
+ UpdateSettingsFeature.register(container);
13
+ ListModelsFeature.register(container);
14
+ GeneratePageContentFeature.register(container);
15
+ },
16
+ resolve() {
17
+ return {};
18
+ }
19
+ });
20
+
21
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFeature","ListModelsFeature","SharedSettingsFeature","GetSettingsFeature","UpdateSettingsFeature","GeneratePageContentFeature","AiPowerUpsHeadlessFeatures","name","register","container","resolve"],"sources":["feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListModelsFeature } from \"~/admin/features/listModels/index.js\";\nimport { SharedSettingsFeature } from \"~/admin/features/settings/shared/index.js\";\nimport { GetSettingsFeature } from \"~/admin/features/settings/getSettings/index.js\";\nimport { UpdateSettingsFeature } from \"~/admin/features/settings/updateSettings/index.js\";\nimport { GeneratePageContentFeature } from \"~/admin/features/generatePageContent/index.js\";\n\nexport const AiPowerUpsHeadlessFeatures = createFeature({\n name: \"AiPowerUps/HeadlessFeatures\",\n register(container) {\n SharedSettingsFeature.register(container);\n GetSettingsFeature.register(container);\n UpdateSettingsFeature.register(container);\n ListModelsFeature.register(container);\n GeneratePageContentFeature.register(container);\n },\n resolve() {\n return {};\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;AAC3B,SAASC,qBAAqB;AAC9B,SAASC,0BAA0B;AAEnC,OAAO,MAAMC,0BAA0B,GAAGN,aAAa,CAAC;EACpDO,IAAI,EAAE,6BAA6B;EACnCC,QAAQA,CAACC,SAAS,EAAE;IAChBP,qBAAqB,CAACM,QAAQ,CAACC,SAAS,CAAC;IACzCN,kBAAkB,CAACK,QAAQ,CAACC,SAAS,CAAC;IACtCL,qBAAqB,CAACI,QAAQ,CAACC,SAAS,CAAC;IACzCR,iBAAiB,CAACO,QAAQ,CAACC,SAAS,CAAC;IACrCJ,0BAA0B,CAACG,QAAQ,CAACC,SAAS,CAAC;EAClD,CAAC;EACDC,OAAOA,CAAA,EAAG;IACN,OAAO,CAAC,CAAC;EACb;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { GeneratePageContentGateway as GatewayAbstraction } from "./abstractions.js";
2
+ import type { GeneratePageContentParams } from "./abstractions.js";
3
+ import { MainGraphQLClient } from "@webiny/app/exports/admin.js";
4
+ declare class GeneratePageContentGatewayImpl implements GatewayAbstraction.Interface {
5
+ private client;
6
+ constructor(client: MainGraphQLClient.Interface);
7
+ execute(params: GeneratePageContentParams): Promise<void>;
8
+ }
9
+ export declare const GeneratePageContentGateway: typeof GeneratePageContentGatewayImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGeneratePageContentGateway>;
11
+ };
12
+ export {};
@@ -0,0 +1,42 @@
1
+ import { GeneratePageContentGateway as GatewayAbstraction } from "./abstractions.js";
2
+ import { MainGraphQLClient } from "@webiny/app/exports/admin.js";
3
+ const GENERATE_PAGE_CONTENT = /* GraphQL */`
4
+ mutation GeneratePageContent(
5
+ $prompt: String!
6
+ $components: JSON!
7
+ $tools: JSON!
8
+ $projectId: String
9
+ $excludedFileIds: [String!]
10
+ $readerPersonaId: String
11
+ $writerPersonaId: String
12
+ ) {
13
+ aiPowerUps {
14
+ generatePageContent(
15
+ prompt: $prompt
16
+ components: $components
17
+ tools: $tools
18
+ projectId: $projectId
19
+ excludedFileIds: $excludedFileIds
20
+ readerPersonaId: $readerPersonaId
21
+ writerPersonaId: $writerPersonaId
22
+ )
23
+ }
24
+ }
25
+ `;
26
+ class GeneratePageContentGatewayImpl {
27
+ constructor(client) {
28
+ this.client = client;
29
+ }
30
+ async execute(params) {
31
+ await this.client.execute({
32
+ query: GENERATE_PAGE_CONTENT,
33
+ variables: params
34
+ });
35
+ }
36
+ }
37
+ export const GeneratePageContentGateway = GatewayAbstraction.createImplementation({
38
+ implementation: GeneratePageContentGatewayImpl,
39
+ dependencies: [MainGraphQLClient]
40
+ });
41
+
42
+ //# sourceMappingURL=GeneratePageContentGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GeneratePageContentGateway","GatewayAbstraction","MainGraphQLClient","GENERATE_PAGE_CONTENT","GeneratePageContentGatewayImpl","constructor","client","execute","params","query","variables","createImplementation","implementation","dependencies"],"sources":["GeneratePageContentGateway.ts"],"sourcesContent":["import { GeneratePageContentGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport type { GeneratePageContentParams } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/exports/admin.js\";\n\nconst GENERATE_PAGE_CONTENT = /* GraphQL */ `\n mutation GeneratePageContent(\n $prompt: String!\n $components: JSON!\n $tools: JSON!\n $projectId: String\n $excludedFileIds: [String!]\n $readerPersonaId: String\n $writerPersonaId: String\n ) {\n aiPowerUps {\n generatePageContent(\n prompt: $prompt\n components: $components\n tools: $tools\n projectId: $projectId\n excludedFileIds: $excludedFileIds\n readerPersonaId: $readerPersonaId\n writerPersonaId: $writerPersonaId\n )\n }\n }\n`;\n\ntype GeneratePageContentResponse = {\n aiPowerUps: {\n generatePageContent: { id: string };\n };\n};\n\nclass GeneratePageContentGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(params: GeneratePageContentParams): Promise<void> {\n await this.client.execute<GeneratePageContentResponse>({\n query: GENERATE_PAGE_CONTENT,\n variables: params\n });\n }\n}\n\nexport const GeneratePageContentGateway = GatewayAbstraction.createImplementation({\n implementation: GeneratePageContentGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"mappings":"AAAA,SAASA,0BAA0B,IAAIC,kBAAkB;AAEzD,SAASC,iBAAiB,QAAQ,8BAA8B;AAEhE,MAAMC,qBAAqB,GAAG,aAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAQD,MAAMC,8BAA8B,CAAyC;EACzEC,WAAWA,CAASC,MAAmC,EAAE;IAAA,KAArCA,MAAmC,GAAnCA,MAAmC;EAAG;EAE1D,MAAMC,OAAOA,CAACC,MAAiC,EAAiB;IAC5D,MAAM,IAAI,CAACF,MAAM,CAACC,OAAO,CAA8B;MACnDE,KAAK,EAAEN,qBAAqB;MAC5BO,SAAS,EAAEF;IACf,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMR,0BAA0B,GAAGC,kBAAkB,CAACU,oBAAoB,CAAC;EAC9EC,cAAc,EAAER,8BAA8B;EAC9CS,YAAY,EAAE,CAACX,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import { GeneratePageContentUseCase as UseCaseAbstraction, GeneratePageContentGateway } from "./abstractions.js";
2
+ import type { GeneratePageContentParams } from "./abstractions.js";
3
+ declare class GeneratePageContentUseCaseImpl implements UseCaseAbstraction.Interface {
4
+ private gateway;
5
+ constructor(gateway: GeneratePageContentGateway.Interface);
6
+ execute(params: GeneratePageContentParams): Promise<void>;
7
+ }
8
+ export declare const GeneratePageContentUseCase: typeof GeneratePageContentUseCaseImpl & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGeneratePageContentUseCase>;
10
+ };
11
+ export {};
@@ -0,0 +1,15 @@
1
+ import { GeneratePageContentUseCase as UseCaseAbstraction, GeneratePageContentGateway } from "./abstractions.js";
2
+ class GeneratePageContentUseCaseImpl {
3
+ constructor(gateway) {
4
+ this.gateway = gateway;
5
+ }
6
+ async execute(params) {
7
+ return this.gateway.execute(params);
8
+ }
9
+ }
10
+ export const GeneratePageContentUseCase = UseCaseAbstraction.createImplementation({
11
+ implementation: GeneratePageContentUseCaseImpl,
12
+ dependencies: [GeneratePageContentGateway]
13
+ });
14
+
15
+ //# sourceMappingURL=GeneratePageContentUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GeneratePageContentUseCase","UseCaseAbstraction","GeneratePageContentGateway","GeneratePageContentUseCaseImpl","constructor","gateway","execute","params","createImplementation","implementation","dependencies"],"sources":["GeneratePageContentUseCase.ts"],"sourcesContent":["import {\n GeneratePageContentUseCase as UseCaseAbstraction,\n GeneratePageContentGateway\n} from \"./abstractions.js\";\nimport type { GeneratePageContentParams } from \"./abstractions.js\";\n\nclass GeneratePageContentUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private gateway: GeneratePageContentGateway.Interface) {}\n\n async execute(params: GeneratePageContentParams): Promise<void> {\n return this.gateway.execute(params);\n }\n}\n\nexport const GeneratePageContentUseCase = UseCaseAbstraction.createImplementation({\n implementation: GeneratePageContentUseCaseImpl,\n dependencies: [GeneratePageContentGateway]\n});\n"],"mappings":"AAAA,SACIA,0BAA0B,IAAIC,kBAAkB,EAChDC,0BAA0B;AAI9B,MAAMC,8BAA8B,CAAyC;EACzEC,WAAWA,CAASC,OAA6C,EAAE;IAAA,KAA/CA,OAA6C,GAA7CA,OAA6C;EAAG;EAEpE,MAAMC,OAAOA,CAACC,MAAiC,EAAiB;IAC5D,OAAO,IAAI,CAACF,OAAO,CAACC,OAAO,CAACC,MAAM,CAAC;EACvC;AACJ;AAEA,OAAO,MAAMP,0BAA0B,GAAGC,kBAAkB,CAACO,oBAAoB,CAAC;EAC9EC,cAAc,EAAEN,8BAA8B;EAC9CO,YAAY,EAAE,CAACR,0BAA0B;AAC7C,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ export interface GeneratePageContentParams {
2
+ prompt: string;
3
+ components: unknown;
4
+ tools: unknown;
5
+ projectId?: string | null;
6
+ excludedFileIds?: string[] | null;
7
+ readerPersonaId?: string | null;
8
+ writerPersonaId?: string | null;
9
+ }
10
+ export interface IGeneratePageContentUseCase {
11
+ execute(params: GeneratePageContentParams): Promise<void>;
12
+ }
13
+ export declare const GeneratePageContentUseCase: import("@webiny/di").Abstraction<IGeneratePageContentUseCase>;
14
+ export declare namespace GeneratePageContentUseCase {
15
+ type Interface = IGeneratePageContentUseCase;
16
+ type Params = GeneratePageContentParams;
17
+ }
18
+ export interface IGeneratePageContentGateway {
19
+ execute(params: GeneratePageContentParams): Promise<void>;
20
+ }
21
+ export declare const GeneratePageContentGateway: import("@webiny/di").Abstraction<IGeneratePageContentGateway>;
22
+ export declare namespace GeneratePageContentGateway {
23
+ type Interface = IGeneratePageContentGateway;
24
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ export const GeneratePageContentUseCase = createAbstraction("AiPowerUps/GeneratePageContentUseCase");
3
+ export const GeneratePageContentGateway = createAbstraction("AiPowerUps/GeneratePageContentGateway");
4
+
5
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createAbstraction","GeneratePageContentUseCase","GeneratePageContentGateway"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface GeneratePageContentParams {\n prompt: string;\n components: unknown;\n tools: unknown;\n projectId?: string | null;\n excludedFileIds?: string[] | null;\n readerPersonaId?: string | null;\n writerPersonaId?: string | null;\n}\n\nexport interface IGeneratePageContentUseCase {\n execute(params: GeneratePageContentParams): Promise<void>;\n}\n\nexport const GeneratePageContentUseCase = createAbstraction<IGeneratePageContentUseCase>(\n \"AiPowerUps/GeneratePageContentUseCase\"\n);\n\nexport namespace GeneratePageContentUseCase {\n export type Interface = IGeneratePageContentUseCase;\n export type Params = GeneratePageContentParams;\n}\n\nexport interface IGeneratePageContentGateway {\n execute(params: GeneratePageContentParams): Promise<void>;\n}\n\nexport const GeneratePageContentGateway = createAbstraction<IGeneratePageContentGateway>(\n \"AiPowerUps/GeneratePageContentGateway\"\n);\n\nexport namespace GeneratePageContentGateway {\n export type Interface = IGeneratePageContentGateway;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uBAAuB;AAgBzD,OAAO,MAAMC,0BAA0B,GAAGD,iBAAiB,CACvD,uCACJ,CAAC;AAWD,OAAO,MAAME,0BAA0B,GAAGF,iBAAiB,CACvD,uCACJ,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const GeneratePageContentFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
@@ -0,0 +1,12 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { GeneratePageContentUseCase } from "./GeneratePageContentUseCase.js";
3
+ import { GeneratePageContentGateway } from "./GeneratePageContentGateway.js";
4
+ export const GeneratePageContentFeature = createFeature({
5
+ name: "AiPowerUps/GeneratePageContent",
6
+ register(container) {
7
+ container.register(GeneratePageContentUseCase);
8
+ container.register(GeneratePageContentGateway).inSingletonScope();
9
+ }
10
+ });
11
+
12
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFeature","GeneratePageContentUseCase","GeneratePageContentGateway","GeneratePageContentFeature","name","register","container","inSingletonScope"],"sources":["feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { GeneratePageContentUseCase } from \"./GeneratePageContentUseCase.js\";\nimport { GeneratePageContentGateway } from \"./GeneratePageContentGateway.js\";\n\nexport const GeneratePageContentFeature = createFeature({\n name: \"AiPowerUps/GeneratePageContent\",\n register(container) {\n container.register(GeneratePageContentUseCase);\n container.register(GeneratePageContentGateway).inSingletonScope();\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,0BAA0B;AACnC,SAASC,0BAA0B;AAEnC,OAAO,MAAMC,0BAA0B,GAAGH,aAAa,CAAC;EACpDI,IAAI,EAAE,gCAAgC;EACtCC,QAAQA,CAACC,SAAS,EAAE;IAChBA,SAAS,CAACD,QAAQ,CAACJ,0BAA0B,CAAC;IAC9CK,SAAS,CAACD,QAAQ,CAACH,0BAA0B,CAAC,CAACK,gBAAgB,CAAC,CAAC;EACrE;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export { GeneratePageContentFeature } from "./feature.js";
2
+ export { GeneratePageContentUseCase, GeneratePageContentGateway } from "./abstractions.js";
3
+ export type { GeneratePageContentParams } from "./abstractions.js";
@@ -0,0 +1,4 @@
1
+ export { GeneratePageContentFeature } from "./feature.js";
2
+ export { GeneratePageContentUseCase, GeneratePageContentGateway } from "./abstractions.js";
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GeneratePageContentFeature","GeneratePageContentUseCase","GeneratePageContentGateway"],"sources":["index.ts"],"sourcesContent":["export { GeneratePageContentFeature } from \"./feature.js\";\nexport { GeneratePageContentUseCase, GeneratePageContentGateway } from \"./abstractions.js\";\nexport type { GeneratePageContentParams } from \"./abstractions.js\";\n"],"mappings":"AAAA,SAASA,0BAA0B;AACnC,SAASC,0BAA0B,EAAEC,0BAA0B","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { ListModelsGateway as GatewayAbstraction } from "./abstractions.js";
2
+ import { MainGraphQLClient } from "@webiny/app/exports/admin.js";
3
+ import type { AiModel } from "./abstractions.js";
4
+ declare class ListModelsGatewayImpl implements GatewayAbstraction.Interface {
5
+ private client;
6
+ constructor(client: MainGraphQLClient.Interface);
7
+ execute(): Promise<AiModel[]>;
8
+ }
9
+ export declare const ListModelsGateway: typeof ListModelsGatewayImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListModelsGateway>;
11
+ };
12
+ export {};
@@ -0,0 +1,31 @@
1
+ import { ListModelsGateway as GatewayAbstraction } from "./abstractions.js";
2
+ import { MainGraphQLClient } from "@webiny/app/exports/admin.js";
3
+ const LIST_MODELS = /* GraphQL */`
4
+ query ListModels {
5
+ aiPowerUps {
6
+ listModels {
7
+ providerId
8
+ providerName
9
+ modelId
10
+ modelName
11
+ }
12
+ }
13
+ }
14
+ `;
15
+ class ListModelsGatewayImpl {
16
+ constructor(client) {
17
+ this.client = client;
18
+ }
19
+ async execute() {
20
+ const response = await this.client.execute({
21
+ query: LIST_MODELS
22
+ });
23
+ return response.aiPowerUps.listModels ?? [];
24
+ }
25
+ }
26
+ export const ListModelsGateway = GatewayAbstraction.createImplementation({
27
+ implementation: ListModelsGatewayImpl,
28
+ dependencies: [MainGraphQLClient]
29
+ });
30
+
31
+ //# sourceMappingURL=ListModelsGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ListModelsGateway","GatewayAbstraction","MainGraphQLClient","LIST_MODELS","ListModelsGatewayImpl","constructor","client","execute","response","query","aiPowerUps","listModels","createImplementation","implementation","dependencies"],"sources":["ListModelsGateway.ts"],"sourcesContent":["import { ListModelsGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/exports/admin.js\";\nimport type { AiModel } from \"./abstractions.js\";\n\nconst LIST_MODELS = /* GraphQL */ `\n query ListModels {\n aiPowerUps {\n listModels {\n providerId\n providerName\n modelId\n modelName\n }\n }\n }\n`;\n\ntype ListModelsResponse = {\n aiPowerUps: {\n listModels: AiModel[];\n };\n};\n\nclass ListModelsGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(): Promise<AiModel[]> {\n const response = await this.client.execute<ListModelsResponse>({\n query: LIST_MODELS\n });\n\n return response.aiPowerUps.listModels ?? [];\n }\n}\n\nexport const ListModelsGateway = GatewayAbstraction.createImplementation({\n implementation: ListModelsGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,IAAIC,kBAAkB;AAChD,SAASC,iBAAiB,QAAQ,8BAA8B;AAGhE,MAAMC,WAAW,GAAG,aAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAQD,MAAMC,qBAAqB,CAAyC;EAChEC,WAAWA,CAASC,MAAmC,EAAE;IAAA,KAArCA,MAAmC,GAAnCA,MAAmC;EAAG;EAE1D,MAAMC,OAAOA,CAAA,EAAuB;IAChC,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACF,MAAM,CAACC,OAAO,CAAqB;MAC3DE,KAAK,EAAEN;IACX,CAAC,CAAC;IAEF,OAAOK,QAAQ,CAACE,UAAU,CAACC,UAAU,IAAI,EAAE;EAC/C;AACJ;AAEA,OAAO,MAAMX,iBAAiB,GAAGC,kBAAkB,CAACW,oBAAoB,CAAC;EACrEC,cAAc,EAAET,qBAAqB;EACrCU,YAAY,EAAE,CAACZ,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import { ListModelsRepository as RepoAbstraction, ListModelsGateway } from "./abstractions.js";
2
+ import type { AiModel } from "./abstractions.js";
3
+ declare class ListModelsRepositoryImpl implements RepoAbstraction.Interface {
4
+ private gateway;
5
+ private models;
6
+ constructor(gateway: ListModelsGateway.Interface);
7
+ execute(): Promise<void>;
8
+ getModels(): AiModel[];
9
+ }
10
+ export declare const ListModelsRepository: typeof ListModelsRepositoryImpl & {
11
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListModelsRepository>;
12
+ };
13
+ export {};
@@ -0,0 +1,24 @@
1
+ import { makeAutoObservable, runInAction } from "mobx";
2
+ import { ListModelsRepository as RepoAbstraction, ListModelsGateway } from "./abstractions.js";
3
+ class ListModelsRepositoryImpl {
4
+ models = [];
5
+ constructor(gateway) {
6
+ this.gateway = gateway;
7
+ makeAutoObservable(this);
8
+ }
9
+ async execute() {
10
+ const models = await this.gateway.execute();
11
+ runInAction(() => {
12
+ this.models = models;
13
+ });
14
+ }
15
+ getModels() {
16
+ return this.models;
17
+ }
18
+ }
19
+ export const ListModelsRepository = RepoAbstraction.createImplementation({
20
+ implementation: ListModelsRepositoryImpl,
21
+ dependencies: [ListModelsGateway]
22
+ });
23
+
24
+ //# sourceMappingURL=ListModelsRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["makeAutoObservable","runInAction","ListModelsRepository","RepoAbstraction","ListModelsGateway","ListModelsRepositoryImpl","models","constructor","gateway","execute","getModels","createImplementation","implementation","dependencies"],"sources":["ListModelsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { ListModelsRepository as RepoAbstraction, ListModelsGateway } from \"./abstractions.js\";\nimport type { AiModel } from \"./abstractions.js\";\n\nclass ListModelsRepositoryImpl implements RepoAbstraction.Interface {\n private models: AiModel[] = [];\n\n constructor(private gateway: ListModelsGateway.Interface) {\n makeAutoObservable(this);\n }\n\n async execute(): Promise<void> {\n const models = await this.gateway.execute();\n runInAction(() => {\n this.models = models;\n });\n }\n\n getModels(): AiModel[] {\n return this.models;\n }\n}\n\nexport const ListModelsRepository = RepoAbstraction.createImplementation({\n implementation: ListModelsRepositoryImpl,\n dependencies: [ListModelsGateway]\n});\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,SAASC,oBAAoB,IAAIC,eAAe,EAAEC,iBAAiB;AAGnE,MAAMC,wBAAwB,CAAsC;EACxDC,MAAM,GAAc,EAAE;EAE9BC,WAAWA,CAASC,OAAoC,EAAE;IAAA,KAAtCA,OAAoC,GAApCA,OAAoC;IACpDR,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,MAAMS,OAAOA,CAAA,EAAkB;IAC3B,MAAMH,MAAM,GAAG,MAAM,IAAI,CAACE,OAAO,CAACC,OAAO,CAAC,CAAC;IAC3CR,WAAW,CAAC,MAAM;MACd,IAAI,CAACK,MAAM,GAAGA,MAAM;IACxB,CAAC,CAAC;EACN;EAEAI,SAASA,CAAA,EAAc;IACnB,OAAO,IAAI,CAACJ,MAAM;EACtB;AACJ;AAEA,OAAO,MAAMJ,oBAAoB,GAAGC,eAAe,CAACQ,oBAAoB,CAAC;EACrEC,cAAc,EAAEP,wBAAwB;EACxCQ,YAAY,EAAE,CAACT,iBAAiB;AACpC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import { ListModelsUseCase as UseCaseAbstraction, ListModelsRepository } from "./abstractions.js";
2
+ declare class ListModelsUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private repository;
4
+ constructor(repository: ListModelsRepository.Interface);
5
+ execute(): Promise<void>;
6
+ }
7
+ export declare const ListModelsUseCase: typeof ListModelsUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListModelsUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ListModelsUseCase as UseCaseAbstraction, ListModelsRepository } from "./abstractions.js";
2
+ class ListModelsUseCaseImpl {
3
+ constructor(repository) {
4
+ this.repository = repository;
5
+ }
6
+ async execute() {
7
+ return this.repository.execute();
8
+ }
9
+ }
10
+ export const ListModelsUseCase = UseCaseAbstraction.createImplementation({
11
+ implementation: ListModelsUseCaseImpl,
12
+ dependencies: [ListModelsRepository]
13
+ });
14
+
15
+ //# sourceMappingURL=ListModelsUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ListModelsUseCase","UseCaseAbstraction","ListModelsRepository","ListModelsUseCaseImpl","constructor","repository","execute","createImplementation","implementation","dependencies"],"sources":["ListModelsUseCase.ts"],"sourcesContent":["import { ListModelsUseCase as UseCaseAbstraction, ListModelsRepository } from \"./abstractions.js\";\n\nclass ListModelsUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private repository: ListModelsRepository.Interface) {}\n\n async execute(): Promise<void> {\n return this.repository.execute();\n }\n}\n\nexport const ListModelsUseCase = UseCaseAbstraction.createImplementation({\n implementation: ListModelsUseCaseImpl,\n dependencies: [ListModelsRepository]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,IAAIC,kBAAkB,EAAEC,oBAAoB;AAEtE,MAAMC,qBAAqB,CAAyC;EAChEC,WAAWA,CAASC,UAA0C,EAAE;IAAA,KAA5CA,UAA0C,GAA1CA,UAA0C;EAAG;EAEjE,MAAMC,OAAOA,CAAA,EAAkB;IAC3B,OAAO,IAAI,CAACD,UAAU,CAACC,OAAO,CAAC,CAAC;EACpC;AACJ;AAEA,OAAO,MAAMN,iBAAiB,GAAGC,kBAAkB,CAACM,oBAAoB,CAAC;EACrEC,cAAc,EAAEL,qBAAqB;EACrCM,YAAY,EAAE,CAACP,oBAAoB;AACvC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ export interface IListModelsUseCase {
2
+ execute(): Promise<void>;
3
+ }
4
+ export declare const ListModelsUseCase: import("@webiny/di").Abstraction<IListModelsUseCase>;
5
+ export declare namespace ListModelsUseCase {
6
+ type Interface = IListModelsUseCase;
7
+ }
8
+ export interface IListModelsRepository {
9
+ execute(): Promise<void>;
10
+ getModels(): AiModel[];
11
+ }
12
+ export declare const ListModelsRepository: import("@webiny/di").Abstraction<IListModelsRepository>;
13
+ export declare namespace ListModelsRepository {
14
+ type Interface = IListModelsRepository;
15
+ }
16
+ export type AiModel = {
17
+ providerId: string;
18
+ providerName: string;
19
+ modelId: string;
20
+ modelName: string;
21
+ };
22
+ export interface IListModelsGateway {
23
+ execute(): Promise<AiModel[]>;
24
+ }
25
+ export declare const ListModelsGateway: import("@webiny/di").Abstraction<IListModelsGateway>;
26
+ export declare namespace ListModelsGateway {
27
+ type Interface = IListModelsGateway;
28
+ }
@@ -0,0 +1,6 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ export const ListModelsUseCase = createAbstraction("AiPowerUps/ListModelsUseCase");
3
+ export const ListModelsRepository = createAbstraction("AiPowerUps/ListModelsRepository");
4
+ export const ListModelsGateway = createAbstraction("AiPowerUps/ListModelsGateway");
5
+
6
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createAbstraction","ListModelsUseCase","ListModelsRepository","ListModelsGateway"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IListModelsUseCase {\n execute(): Promise<void>;\n}\n\nexport const ListModelsUseCase = createAbstraction<IListModelsUseCase>(\n \"AiPowerUps/ListModelsUseCase\"\n);\nexport namespace ListModelsUseCase {\n export type Interface = IListModelsUseCase;\n}\n\nexport interface IListModelsRepository {\n execute(): Promise<void>;\n getModels(): AiModel[];\n}\n\nexport const ListModelsRepository = createAbstraction<IListModelsRepository>(\n \"AiPowerUps/ListModelsRepository\"\n);\nexport namespace ListModelsRepository {\n export type Interface = IListModelsRepository;\n}\n\nexport type AiModel = {\n providerId: string;\n providerName: string;\n modelId: string;\n modelName: string;\n};\n\nexport interface IListModelsGateway {\n execute(): Promise<AiModel[]>;\n}\n\nexport const ListModelsGateway = createAbstraction<IListModelsGateway>(\n \"AiPowerUps/ListModelsGateway\"\n);\nexport namespace ListModelsGateway {\n export type Interface = IListModelsGateway;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,uBAAuB;AAMzD,OAAO,MAAMC,iBAAiB,GAAGD,iBAAiB,CAC9C,8BACJ,CAAC;AAUD,OAAO,MAAME,oBAAoB,GAAGF,iBAAiB,CACjD,iCACJ,CAAC;AAgBD,OAAO,MAAMG,iBAAiB,GAAGH,iBAAiB,CAC9C,8BACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export declare const ListModelsFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions.js").IListModelsUseCase;
3
+ }, []>;
@@ -0,0 +1,20 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { ListModelsUseCase as UseCaseAbstraction } from "./abstractions.js";
3
+ import { ListModelsUseCase } from "./ListModelsUseCase.js";
4
+ import { ListModelsRepository } from "./ListModelsRepository.js";
5
+ import { ListModelsGateway } from "./ListModelsGateway.js";
6
+ export const ListModelsFeature = createFeature({
7
+ name: "AiPowerUps/ListModels",
8
+ register(container) {
9
+ container.register(ListModelsUseCase);
10
+ container.register(ListModelsRepository).inSingletonScope();
11
+ container.register(ListModelsGateway).inSingletonScope();
12
+ },
13
+ resolve(container) {
14
+ return {
15
+ useCase: container.resolve(UseCaseAbstraction)
16
+ };
17
+ }
18
+ });
19
+
20
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createFeature","ListModelsUseCase","UseCaseAbstraction","ListModelsRepository","ListModelsGateway","ListModelsFeature","name","register","container","inSingletonScope","resolve","useCase"],"sources":["feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListModelsUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { ListModelsUseCase } from \"./ListModelsUseCase.js\";\nimport { ListModelsRepository } from \"./ListModelsRepository.js\";\nimport { ListModelsGateway } from \"./ListModelsGateway.js\";\n\nexport const ListModelsFeature = createFeature({\n name: \"AiPowerUps/ListModels\",\n register(container) {\n container.register(ListModelsUseCase);\n container.register(ListModelsRepository).inSingletonScope();\n container.register(ListModelsGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,IAAIC,kBAAkB;AAChD,SAASD,iBAAiB;AAC1B,SAASE,oBAAoB;AAC7B,SAASC,iBAAiB;AAE1B,OAAO,MAAMC,iBAAiB,GAAGL,aAAa,CAAC;EAC3CM,IAAI,EAAE,uBAAuB;EAC7BC,QAAQA,CAACC,SAAS,EAAE;IAChBA,SAAS,CAACD,QAAQ,CAACN,iBAAiB,CAAC;IACrCO,SAAS,CAACD,QAAQ,CAACJ,oBAAoB,CAAC,CAACM,gBAAgB,CAAC,CAAC;IAC3DD,SAAS,CAACD,QAAQ,CAACH,iBAAiB,CAAC,CAACK,gBAAgB,CAAC,CAAC;EAC5D,CAAC;EACDC,OAAOA,CAACF,SAAS,EAAE;IACf,OAAO;MACHG,OAAO,EAAEH,SAAS,CAACE,OAAO,CAACR,kBAAkB;IACjD,CAAC;EACL;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export { ListModelsFeature } from "./feature.js";
2
+ export { ListModelsUseCase, ListModelsRepository, ListModelsGateway } from "./abstractions.js";
@@ -0,0 +1,4 @@
1
+ export { ListModelsFeature } from "./feature.js";
2
+ export { ListModelsUseCase, ListModelsRepository, ListModelsGateway } from "./abstractions.js";
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ListModelsFeature","ListModelsUseCase","ListModelsRepository","ListModelsGateway"],"sources":["index.ts"],"sourcesContent":["export { ListModelsFeature } from \"./feature.js\";\nexport { ListModelsUseCase, ListModelsRepository, ListModelsGateway } from \"./abstractions.js\";\n"],"mappings":"AAAA,SAASA,iBAAiB;AAC1B,SAASC,iBAAiB,EAAEC,oBAAoB,EAAEC,iBAAiB","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { GetSettingsGateway as GatewayAbstraction } from "./abstractions.js";
2
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient";
3
+ import type { IAiPowerUpsSettings } from "../../../../admin/features/settings/shared/abstractions.js";
4
+ declare class GetSettingsGatewayImpl implements GatewayAbstraction.Interface {
5
+ private client;
6
+ constructor(client: MainGraphQLClient.Interface);
7
+ execute(): Promise<IAiPowerUpsSettings>;
8
+ }
9
+ export declare const GetSettingsGateway: typeof GetSettingsGatewayImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetSettingsGateway>;
11
+ };
12
+ export {};