@webiny/api-core 6.0.0-rc.7 → 6.1.0-beta.0

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 (281) hide show
  1. package/domain/security/ApiToken.d.ts +1 -0
  2. package/domain/security/ApiToken.js +1 -0
  3. package/domain/security/ApiToken.js.map +1 -1
  4. package/exports/api/security.d.ts +2 -0
  5. package/exports/api/security.js +2 -0
  6. package/exports/api/security.js.map +1 -1
  7. package/features/buildParams/abstractions.d.ts +2 -0
  8. package/features/buildParams/abstractions.js +2 -0
  9. package/features/buildParams/abstractions.js.map +1 -1
  10. package/features/eventPublisher/abstractions.d.ts +2 -0
  11. package/features/eventPublisher/abstractions.js +3 -0
  12. package/features/eventPublisher/abstractions.js.map +1 -1
  13. package/features/keyValueStore/abstractions.d.ts +4 -0
  14. package/features/keyValueStore/abstractions.js +4 -0
  15. package/features/keyValueStore/abstractions.js.map +1 -1
  16. package/features/logger/abstractions.d.ts +1 -0
  17. package/features/logger/abstractions.js +1 -0
  18. package/features/logger/abstractions.js.map +1 -1
  19. package/features/security/IdentityContext/abstractions.d.ts +1 -0
  20. package/features/security/IdentityContext/abstractions.js +1 -0
  21. package/features/security/IdentityContext/abstractions.js.map +1 -1
  22. package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js +1 -1
  23. package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js.map +1 -1
  24. package/features/security/apiKeys/CreateApiKey/abstractions.d.ts +1 -0
  25. package/features/security/apiKeys/CreateApiKey/abstractions.js +1 -0
  26. package/features/security/apiKeys/CreateApiKey/abstractions.js.map +1 -1
  27. package/features/security/apiKeys/CreateApiKey/events.d.ts +2 -0
  28. package/features/security/apiKeys/CreateApiKey/events.js +4 -0
  29. package/features/security/apiKeys/CreateApiKey/events.js.map +1 -1
  30. package/features/security/apiKeys/DeleteApiKey/abstractions.d.ts +1 -0
  31. package/features/security/apiKeys/DeleteApiKey/abstractions.js +1 -0
  32. package/features/security/apiKeys/DeleteApiKey/abstractions.js.map +1 -1
  33. package/features/security/apiKeys/DeleteApiKey/events.d.ts +2 -0
  34. package/features/security/apiKeys/DeleteApiKey/events.js +4 -0
  35. package/features/security/apiKeys/DeleteApiKey/events.js.map +1 -1
  36. package/features/security/apiKeys/GetApiKey/abstractions.d.ts +1 -0
  37. package/features/security/apiKeys/GetApiKey/abstractions.js +1 -0
  38. package/features/security/apiKeys/GetApiKey/abstractions.js.map +1 -1
  39. package/features/security/apiKeys/GetApiKeyBySlug/abstractions.d.ts +1 -0
  40. package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js +1 -0
  41. package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js.map +1 -1
  42. package/features/security/apiKeys/GetApiKeyByToken/abstractions.d.ts +1 -0
  43. package/features/security/apiKeys/GetApiKeyByToken/abstractions.js +1 -0
  44. package/features/security/apiKeys/GetApiKeyByToken/abstractions.js.map +1 -1
  45. package/features/security/apiKeys/ListApiKeys/ListApiKeysUseCase.js +1 -1
  46. package/features/security/apiKeys/ListApiKeys/ListApiKeysUseCase.js.map +1 -1
  47. package/features/security/apiKeys/ListApiKeys/abstractions.d.ts +1 -0
  48. package/features/security/apiKeys/ListApiKeys/abstractions.js +1 -0
  49. package/features/security/apiKeys/ListApiKeys/abstractions.js.map +1 -1
  50. package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js +1 -1
  51. package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js.map +1 -1
  52. package/features/security/apiKeys/UpdateApiKey/abstractions.d.ts +1 -0
  53. package/features/security/apiKeys/UpdateApiKey/abstractions.js +1 -0
  54. package/features/security/apiKeys/UpdateApiKey/abstractions.js.map +1 -1
  55. package/features/security/apiKeys/UpdateApiKey/events.d.ts +2 -0
  56. package/features/security/apiKeys/UpdateApiKey/events.js +4 -0
  57. package/features/security/apiKeys/UpdateApiKey/events.js.map +1 -1
  58. package/features/security/apiKeys/shared/abstractions.d.ts +5 -2
  59. package/features/security/apiKeys/shared/abstractions.js +3 -0
  60. package/features/security/apiKeys/shared/abstractions.js.map +1 -1
  61. package/features/security/apiKeys/shared/schemas.d.ts +10 -71
  62. package/features/security/apiKeys/shared/schemas.js +4 -4
  63. package/features/security/apiKeys/shared/schemas.js.map +1 -1
  64. package/features/security/authentication/AuthenticationContext/abstractions.d.ts +1 -0
  65. package/features/security/authentication/AuthenticationContext/abstractions.js +1 -0
  66. package/features/security/authentication/AuthenticationContext/abstractions.js.map +1 -1
  67. package/features/security/authentication/AuthenticationContext/events.d.ts +2 -0
  68. package/features/security/authentication/AuthenticationContext/events.js +4 -0
  69. package/features/security/authentication/AuthenticationContext/events.js.map +1 -1
  70. package/features/security/authentication/Authenticator/abstractions.d.ts +1 -0
  71. package/features/security/authentication/Authenticator/abstractions.js +1 -0
  72. package/features/security/authentication/Authenticator/abstractions.js.map +1 -1
  73. package/features/security/authorization/AuthorizationContext/abstractions.d.ts +2 -0
  74. package/features/security/authorization/AuthorizationContext/abstractions.js +2 -0
  75. package/features/security/authorization/AuthorizationContext/abstractions.js.map +1 -1
  76. package/features/security/authorization/Authorizer/abstractions.d.ts +1 -0
  77. package/features/security/authorization/Authorizer/abstractions.js +1 -0
  78. package/features/security/authorization/Authorizer/abstractions.js.map +1 -1
  79. package/features/security/login/abstractions.d.ts +1 -0
  80. package/features/security/login/abstractions.js +2 -0
  81. package/features/security/login/abstractions.js.map +1 -1
  82. package/features/security/roles/CreateRole/CreateRoleUseCase.d.ts +1 -3
  83. package/features/security/roles/CreateRole/CreateRoleUseCase.js +3 -7
  84. package/features/security/roles/CreateRole/CreateRoleUseCase.js.map +1 -1
  85. package/features/security/roles/CreateRole/abstractions.d.ts +1 -0
  86. package/features/security/roles/CreateRole/abstractions.js +1 -0
  87. package/features/security/roles/CreateRole/abstractions.js.map +1 -1
  88. package/features/security/roles/CreateRole/events.d.ts +2 -0
  89. package/features/security/roles/CreateRole/events.js +4 -0
  90. package/features/security/roles/CreateRole/events.js.map +1 -1
  91. package/features/security/roles/CreateRole/schema.d.ts +2 -20
  92. package/features/security/roles/CreateRole/schema.js +2 -2
  93. package/features/security/roles/CreateRole/schema.js.map +1 -1
  94. package/features/security/roles/DeleteRole/abstractions.d.ts +1 -0
  95. package/features/security/roles/DeleteRole/abstractions.js +1 -0
  96. package/features/security/roles/DeleteRole/abstractions.js.map +1 -1
  97. package/features/security/roles/DeleteRole/events.d.ts +2 -0
  98. package/features/security/roles/DeleteRole/events.js +4 -0
  99. package/features/security/roles/DeleteRole/events.js.map +1 -1
  100. package/features/security/roles/GetRole/abstractions.d.ts +1 -0
  101. package/features/security/roles/GetRole/abstractions.js +1 -0
  102. package/features/security/roles/GetRole/abstractions.js.map +1 -1
  103. package/features/security/roles/ListRoles/abstractions.d.ts +1 -0
  104. package/features/security/roles/ListRoles/abstractions.js +1 -0
  105. package/features/security/roles/ListRoles/abstractions.js.map +1 -1
  106. package/features/security/roles/UpdateRole/UpdateRoleUseCase.js +1 -1
  107. package/features/security/roles/UpdateRole/UpdateRoleUseCase.js.map +1 -1
  108. package/features/security/roles/UpdateRole/abstractions.d.ts +1 -0
  109. package/features/security/roles/UpdateRole/abstractions.js +1 -0
  110. package/features/security/roles/UpdateRole/abstractions.js.map +1 -1
  111. package/features/security/roles/UpdateRole/events.d.ts +2 -0
  112. package/features/security/roles/UpdateRole/events.js +4 -0
  113. package/features/security/roles/UpdateRole/events.js.map +1 -1
  114. package/features/security/roles/UpdateRole/schema.d.ts +2 -18
  115. package/features/security/roles/UpdateRole/schema.js +2 -2
  116. package/features/security/roles/UpdateRole/schema.js.map +1 -1
  117. package/features/security/roles/feature.js +2 -0
  118. package/features/security/roles/feature.js.map +1 -1
  119. package/features/security/roles/shared/RoleProvider.d.ts +13 -0
  120. package/features/security/roles/shared/RoleProvider.js +29 -0
  121. package/features/security/roles/shared/RoleProvider.js.map +1 -0
  122. package/features/security/roles/shared/RolesRepository.d.ts +3 -1
  123. package/features/security/roles/shared/RolesRepository.js +19 -18
  124. package/features/security/roles/shared/RolesRepository.js.map +1 -1
  125. package/features/security/roles/shared/abstractions.d.ts +19 -0
  126. package/features/security/roles/shared/abstractions.js +3 -0
  127. package/features/security/roles/shared/abstractions.js.map +1 -1
  128. package/features/security/shared/abstractions.d.ts +5 -14
  129. package/features/security/shared/abstractions.js +3 -16
  130. package/features/security/shared/abstractions.js.map +1 -1
  131. package/features/security/teams/CreateTeam/CreateTeamUseCase.d.ts +1 -3
  132. package/features/security/teams/CreateTeam/CreateTeamUseCase.js +3 -7
  133. package/features/security/teams/CreateTeam/CreateTeamUseCase.js.map +1 -1
  134. package/features/security/teams/CreateTeam/abstractions.d.ts +1 -0
  135. package/features/security/teams/CreateTeam/abstractions.js +1 -0
  136. package/features/security/teams/CreateTeam/abstractions.js.map +1 -1
  137. package/features/security/teams/CreateTeam/events.d.ts +2 -0
  138. package/features/security/teams/CreateTeam/events.js +4 -0
  139. package/features/security/teams/CreateTeam/events.js.map +1 -1
  140. package/features/security/teams/CreateTeam/schema.d.ts +2 -12
  141. package/features/security/teams/DeleteTeam/abstractions.d.ts +1 -0
  142. package/features/security/teams/DeleteTeam/abstractions.js +1 -0
  143. package/features/security/teams/DeleteTeam/abstractions.js.map +1 -1
  144. package/features/security/teams/DeleteTeam/events.d.ts +2 -0
  145. package/features/security/teams/DeleteTeam/events.js +4 -0
  146. package/features/security/teams/DeleteTeam/events.js.map +1 -1
  147. package/features/security/teams/GetTeam/abstractions.d.ts +1 -0
  148. package/features/security/teams/GetTeam/abstractions.js +1 -0
  149. package/features/security/teams/GetTeam/abstractions.js.map +1 -1
  150. package/features/security/teams/ListTeams/abstractions.d.ts +1 -0
  151. package/features/security/teams/ListTeams/abstractions.js +1 -0
  152. package/features/security/teams/ListTeams/abstractions.js.map +1 -1
  153. package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js +1 -1
  154. package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js.map +1 -1
  155. package/features/security/teams/UpdateTeam/abstractions.d.ts +1 -0
  156. package/features/security/teams/UpdateTeam/abstractions.js +1 -0
  157. package/features/security/teams/UpdateTeam/abstractions.js.map +1 -1
  158. package/features/security/teams/UpdateTeam/events.d.ts +2 -0
  159. package/features/security/teams/UpdateTeam/events.js +4 -0
  160. package/features/security/teams/UpdateTeam/events.js.map +1 -1
  161. package/features/security/teams/UpdateTeam/schema.d.ts +2 -10
  162. package/features/security/teams/feature.js +6 -0
  163. package/features/security/teams/feature.js.map +1 -1
  164. package/features/security/teams/shared/TeamProvider.d.ts +13 -0
  165. package/features/security/teams/shared/TeamProvider.js +29 -0
  166. package/features/security/teams/shared/TeamProvider.js.map +1 -0
  167. package/features/security/teams/shared/TeamsRepository.js +20 -18
  168. package/features/security/teams/shared/TeamsRepository.js.map +1 -1
  169. package/features/security/teams/shared/abstractions.d.ts +18 -0
  170. package/features/security/teams/shared/abstractions.js +3 -0
  171. package/features/security/teams/shared/abstractions.js.map +1 -1
  172. package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.d.ts +17 -0
  173. package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js +76 -0
  174. package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js.map +1 -0
  175. package/features/security/utils/verifyJwtUsingJwk.d.ts +2 -4
  176. package/features/security/utils/verifyJwtUsingJwk.js +1 -1
  177. package/features/security/utils/verifyJwtUsingJwk.js.map +1 -1
  178. package/features/system/InstallSystem/abstractions.d.ts +2 -3
  179. package/features/system/InstallSystem/abstractions.js +2 -3
  180. package/features/system/InstallSystem/abstractions.js.map +1 -1
  181. package/features/task/TaskController/abstractions.d.ts +1 -0
  182. package/features/task/TaskController/abstractions.js +1 -0
  183. package/features/task/TaskController/abstractions.js.map +1 -1
  184. package/features/task/TaskDefinition/abstractions.d.ts +1 -0
  185. package/features/task/TaskDefinition/abstractions.js +1 -0
  186. package/features/task/TaskDefinition/abstractions.js.map +1 -1
  187. package/features/task/TaskService/abstractions.d.ts +1 -0
  188. package/features/task/TaskService/abstractions.js +1 -0
  189. package/features/task/TaskService/abstractions.js.map +1 -1
  190. package/features/tenancy/CreateTenant/abstractions.d.ts +5 -3
  191. package/features/tenancy/CreateTenant/abstractions.js +5 -3
  192. package/features/tenancy/CreateTenant/abstractions.js.map +1 -1
  193. package/features/tenancy/DeleteTenant/abstractions.d.ts +5 -0
  194. package/features/tenancy/DeleteTenant/abstractions.js +5 -0
  195. package/features/tenancy/DeleteTenant/abstractions.js.map +1 -1
  196. package/features/tenancy/GetTenantById/abstractions.d.ts +3 -0
  197. package/features/tenancy/GetTenantById/abstractions.js +3 -9
  198. package/features/tenancy/GetTenantById/abstractions.js.map +1 -1
  199. package/features/tenancy/InstallTenant/abstractions.d.ts +3 -9
  200. package/features/tenancy/InstallTenant/abstractions.js +3 -12
  201. package/features/tenancy/InstallTenant/abstractions.js.map +1 -1
  202. package/features/tenancy/TenantContext/abstractions.d.ts +1 -0
  203. package/features/tenancy/TenantContext/abstractions.js +1 -0
  204. package/features/tenancy/TenantContext/abstractions.js.map +1 -1
  205. package/features/tenancy/UpdateTenant/abstractions.d.ts +5 -0
  206. package/features/tenancy/UpdateTenant/abstractions.js +5 -0
  207. package/features/tenancy/UpdateTenant/abstractions.js.map +1 -1
  208. package/features/users/CreateUser/CreateUserUseCase.js +1 -1
  209. package/features/users/CreateUser/CreateUserUseCase.js.map +1 -1
  210. package/features/users/CreateUser/abstractions.d.ts +1 -0
  211. package/features/users/CreateUser/abstractions.js +1 -1
  212. package/features/users/CreateUser/abstractions.js.map +1 -1
  213. package/features/users/CreateUser/events.d.ts +2 -0
  214. package/features/users/CreateUser/events.js +4 -0
  215. package/features/users/CreateUser/events.js.map +1 -1
  216. package/features/users/CreateUser/schema.d.ts +4 -36
  217. package/features/users/DeleteUser/abstractions.d.ts +1 -0
  218. package/features/users/DeleteUser/abstractions.js +1 -1
  219. package/features/users/DeleteUser/abstractions.js.map +1 -1
  220. package/features/users/DeleteUser/events.d.ts +2 -0
  221. package/features/users/DeleteUser/events.js +4 -0
  222. package/features/users/DeleteUser/events.js.map +1 -1
  223. package/features/users/GetUser/abstractions.d.ts +1 -0
  224. package/features/users/GetUser/abstractions.js +1 -1
  225. package/features/users/GetUser/abstractions.js.map +1 -1
  226. package/features/users/ListUserTeams/abstractions.d.ts +1 -0
  227. package/features/users/ListUserTeams/abstractions.js +1 -1
  228. package/features/users/ListUserTeams/abstractions.js.map +1 -1
  229. package/features/users/ListUsers/abstractions.d.ts +1 -0
  230. package/features/users/ListUsers/abstractions.js +1 -1
  231. package/features/users/ListUsers/abstractions.js.map +1 -1
  232. package/features/users/UpdateUser/UpdateUserUseCase.js +1 -1
  233. package/features/users/UpdateUser/UpdateUserUseCase.js.map +1 -1
  234. package/features/users/UpdateUser/abstractions.d.ts +1 -0
  235. package/features/users/UpdateUser/abstractions.js +1 -1
  236. package/features/users/UpdateUser/abstractions.js.map +1 -1
  237. package/features/users/UpdateUser/events.d.ts +2 -0
  238. package/features/users/UpdateUser/events.js +4 -0
  239. package/features/users/UpdateUser/events.js.map +1 -1
  240. package/features/users/UpdateUser/schema.d.ts +4 -30
  241. package/features/users/shared/abstractions.d.ts +1 -0
  242. package/features/users/shared/abstractions.js +1 -1
  243. package/features/users/shared/abstractions.js.map +1 -1
  244. package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js +0 -1
  245. package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js.map +1 -1
  246. package/graphql/security/NotAuthorizedResponse.d.ts +1 -0
  247. package/graphql/security/NotAuthorizedResponse.js +1 -0
  248. package/graphql/security/NotAuthorizedResponse.js.map +1 -1
  249. package/idp/abstractions.d.ts +4 -0
  250. package/idp/abstractions.js +4 -0
  251. package/idp/abstractions.js.map +1 -1
  252. package/legacy/security/createSecurityContext.js +0 -11
  253. package/legacy/security/createSecurityContext.js.map +1 -1
  254. package/models/base/BaseModel.js +2 -2
  255. package/models/base/BaseModel.js.map +1 -1
  256. package/models/base/ModelBuilder.d.ts +2 -2
  257. package/models/base/ModelBuilder.js +21 -2
  258. package/models/base/ModelBuilder.js.map +1 -1
  259. package/models/cms/FieldBuilder.d.ts +3 -2
  260. package/models/cms/FieldBuilder.js +12 -17
  261. package/models/cms/FieldBuilder.js.map +1 -1
  262. package/models/cms/FieldBuilderRegistry.d.ts +1 -1
  263. package/models/cms/FieldBuilderRegistry.js.map +1 -1
  264. package/models/cms/FieldDefinitionsBuilder.d.ts +1 -0
  265. package/models/cms/FieldDefinitionsBuilder.js +13 -15
  266. package/models/cms/FieldDefinitionsBuilder.js.map +1 -1
  267. package/models/cms/PrivateCmsModelBuilder.js.map +1 -1
  268. package/models/cms/abstractions.d.ts +1 -1
  269. package/models/cms/abstractions.js.map +1 -1
  270. package/models/cms/fieldsBuilder.md +1 -1
  271. package/models/simple/Page/abstractions.d.ts +1 -11
  272. package/package.json +20 -20
  273. package/types/security.d.ts +13 -10
  274. package/types/security.js.map +1 -1
  275. package/features/security/shared/abstractions.ts.bak +0 -52
  276. package/legacy/security/plugins/SecurityRolePlugin.d.ts +0 -16
  277. package/legacy/security/plugins/SecurityRolePlugin.js +0 -33
  278. package/legacy/security/plugins/SecurityRolePlugin.js.map +0 -1
  279. package/legacy/security/plugins/SecurityTeamPlugin.d.ts +0 -16
  280. package/legacy/security/plugins/SecurityTeamPlugin.js +0 -33
  281. package/legacy/security/plugins/SecurityTeamPlugin.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ /** Represents an API token identity. */
1
2
  export declare class ApiToken {
2
3
  /**
3
4
  * Validate that the token is valid.
@@ -1,3 +1,4 @@
1
+ /** Represents an API token identity. */
1
2
  export class ApiToken {
2
3
  /**
3
4
  * Validate that the token is valid.
@@ -1 +1 @@
1
- {"version":3,"names":["ApiToken","validate","token","startsWith","Error"],"sources":["ApiToken.ts"],"sourcesContent":["export class ApiToken {\n /**\n * Validate that the token is valid.\n * @param token\n */\n static validate(token: string): `wat_${string}` {\n if (!token.startsWith(\"wat_\")) {\n throw Error(\"Invalid token! A valid token starts with 'wat_'.\");\n }\n\n return token as `wat_${string}`;\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,QAAQ,CAAC;EAClB;AACJ;AACA;AACA;EACI,OAAOC,QAAQA,CAACC,KAAa,EAAmB;IAC5C,IAAI,CAACA,KAAK,CAACC,UAAU,CAAC,MAAM,CAAC,EAAE;MAC3B,MAAMC,KAAK,CAAC,kDAAkD,CAAC;IACnE;IAEA,OAAOF,KAAK;EAChB;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["ApiToken","validate","token","startsWith","Error"],"sources":["ApiToken.ts"],"sourcesContent":["/** Represents an API token identity. */\nexport class ApiToken {\n /**\n * Validate that the token is valid.\n * @param token\n */\n static validate(token: string): `wat_${string}` {\n if (!token.startsWith(\"wat_\")) {\n throw Error(\"Invalid token! A valid token starts with 'wat_'.\");\n }\n\n return token as `wat_${string}`;\n }\n}\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,QAAQ,CAAC;EAClB;AACJ;AACA;AACA;EACI,OAAOC,QAAQA,CAACC,KAAa,EAAmB;IAC5C,IAAI,CAACA,KAAK,CAACC,UAAU,CAAC,MAAM,CAAC,EAAE;MAC3B,MAAMC,KAAK,CAAC,kDAAkD,CAAC;IACnE;IAEA,OAAOF,KAAK;EAChB;AACJ","ignoreList":[]}
@@ -1,5 +1,7 @@
1
1
  export { IdentityContext, Identity } from "../../features/security/IdentityContext/index.js";
2
2
  export { ApiKeyFactory } from "../../features/security/apiKeys/shared/abstractions.js";
3
+ export { RoleFactory } from "../../features/security/roles/shared/abstractions.js";
4
+ export { TeamFactory } from "../../features/security/teams/shared/abstractions.js";
3
5
  export { ApiToken } from "../../domain/security/ApiToken.js";
4
6
  export { IdentityProvider, OidcIdentityProvider, JwtIdentityProvider } from "../../idp/index.js";
5
7
  export { Authenticator } from "../../features/security/authentication/Authenticator/abstractions.js";
@@ -1,5 +1,7 @@
1
1
  export { IdentityContext, Identity } from "../../features/security/IdentityContext/index.js";
2
2
  export { ApiKeyFactory } from "../../features/security/apiKeys/shared/abstractions.js";
3
+ export { RoleFactory } from "../../features/security/roles/shared/abstractions.js";
4
+ export { TeamFactory } from "../../features/security/teams/shared/abstractions.js";
3
5
  export { ApiToken } from "../../domain/security/ApiToken.js";
4
6
  export { IdentityProvider, OidcIdentityProvider, JwtIdentityProvider } from "../../idp/index.js";
5
7
  export { Authenticator } from "../../features/security/authentication/Authenticator/abstractions.js";
@@ -1 +1 @@
1
- {"version":3,"names":["IdentityContext","Identity","ApiKeyFactory","ApiToken","IdentityProvider","OidcIdentityProvider","JwtIdentityProvider","Authenticator","Authorizer"],"sources":["security.ts"],"sourcesContent":["export { IdentityContext, Identity } from \"~/features/security/IdentityContext/index.js\";\nexport { ApiKeyFactory } from \"~/features/security/apiKeys/shared/abstractions.js\";\nexport { ApiToken } from \"~/domain/security/ApiToken.js\";\nexport { IdentityProvider, OidcIdentityProvider, JwtIdentityProvider } from \"~/idp/index.js\";\nexport { Authenticator } from \"~/features/security/authentication/Authenticator/abstractions.js\";\nexport { Authorizer } from \"~/features/security/authorization/Authorizer/index.js\";\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,QAAQ;AAClC,SAASC,aAAa;AACtB,SAASC,QAAQ;AACjB,SAASC,gBAAgB,EAAEC,oBAAoB,EAAEC,mBAAmB;AACpE,SAASC,aAAa;AACtB,SAASC,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["IdentityContext","Identity","ApiKeyFactory","RoleFactory","TeamFactory","ApiToken","IdentityProvider","OidcIdentityProvider","JwtIdentityProvider","Authenticator","Authorizer"],"sources":["security.ts"],"sourcesContent":["export { IdentityContext, Identity } from \"~/features/security/IdentityContext/index.js\";\nexport { ApiKeyFactory } from \"~/features/security/apiKeys/shared/abstractions.js\";\nexport { RoleFactory } from \"~/features/security/roles/shared/abstractions.js\";\nexport { TeamFactory } from \"~/features/security/teams/shared/abstractions.js\";\nexport { ApiToken } from \"~/domain/security/ApiToken.js\";\nexport { IdentityProvider, OidcIdentityProvider, JwtIdentityProvider } from \"~/idp/index.js\";\nexport { Authenticator } from \"~/features/security/authentication/Authenticator/abstractions.js\";\nexport { Authorizer } from \"~/features/security/authorization/Authorizer/index.js\";\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,QAAQ;AAClC,SAASC,aAAa;AACtB,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,QAAQ;AACjB,SAASC,gBAAgB,EAAEC,oBAAoB,EAAEC,mBAAmB;AACpE,SAASC,aAAa;AACtB,SAASC,UAAU","ignoreList":[]}
@@ -2,6 +2,7 @@ export interface IBuildParam {
2
2
  key: string;
3
3
  value: any;
4
4
  }
5
+ /** A single build-time configuration parameter. */
5
6
  export declare const BuildParam: import("@webiny/di").Abstraction<IBuildParam>;
6
7
  export declare namespace BuildParam {
7
8
  type Interface = IBuildParam;
@@ -9,6 +10,7 @@ export declare namespace BuildParam {
9
10
  export interface IBuildParams {
10
11
  get<T = any>(key: string): T | null;
11
12
  }
13
+ /** Access build-time configuration parameters. */
12
14
  export declare const BuildParams: import("@webiny/di").Abstraction<IBuildParams>;
13
15
  export declare namespace BuildParams {
14
16
  type Interface = IBuildParams;
@@ -1,5 +1,7 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** A single build-time configuration parameter. */
2
3
  export const BuildParam = createAbstraction("BuildParam");
4
+ /** Access build-time configuration parameters. */
3
5
  export const BuildParams = createAbstraction("BuildParams");
4
6
 
5
7
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","BuildParam","BuildParams"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\n\nexport interface IBuildParam {\n key: string;\n value: any;\n}\n\nexport const BuildParam = createAbstraction<IBuildParam>(\"BuildParam\");\n\nexport namespace BuildParam {\n export type Interface = IBuildParam;\n}\n\nexport interface IBuildParams {\n get<T = any>(key: string): T | null;\n}\n\nexport const BuildParams = createAbstraction<IBuildParams>(\"BuildParams\");\n\nexport namespace BuildParams {\n export type Interface = IBuildParams;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAOvD,OAAO,MAAMC,UAAU,GAAGD,iBAAiB,CAAc,YAAY,CAAC;AAUtE,OAAO,MAAME,WAAW,GAAGF,iBAAiB,CAAe,aAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","BuildParam","BuildParams"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\n\nexport interface IBuildParam {\n key: string;\n value: any;\n}\n\n/** A single build-time configuration parameter. */\nexport const BuildParam = createAbstraction<IBuildParam>(\"BuildParam\");\n\nexport namespace BuildParam {\n export type Interface = IBuildParam;\n}\n\nexport interface IBuildParams {\n get<T = any>(key: string): T | null;\n}\n\n/** Access build-time configuration parameters. */\nexport const BuildParams = createAbstraction<IBuildParams>(\"BuildParams\");\n\nexport namespace BuildParams {\n export type Interface = IBuildParams;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAOvD;AACA,OAAO,MAAMC,UAAU,GAAGD,iBAAiB,CAAc,YAAY,CAAC;AAUtE;AACA,OAAO,MAAME,WAAW,GAAGF,iBAAiB,CAAe,aAAa,CAAC","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  import { Abstraction } from "@webiny/di";
2
+ /** Base class for all domain events. */
2
3
  export declare abstract class DomainEvent<TPayload = void> {
3
4
  abstract readonly eventType: string;
4
5
  readonly occurredAt: Date;
@@ -12,6 +13,7 @@ export interface IEventHandler<TEvent extends DomainEvent<any> = DomainEvent<any
12
13
  export interface IEventPublisher {
13
14
  publish<TEvent extends DomainEvent<any>>(event: TEvent): Promise<void>;
14
15
  }
16
+ /** Publish domain events to registered handlers. */
15
17
  export declare const EventPublisher: Abstraction<IEventPublisher>;
16
18
  export declare namespace EventPublisher {
17
19
  type Interface = IEventPublisher;
@@ -1,4 +1,6 @@
1
1
  import { Abstraction } from "@webiny/di";
2
+
3
+ /** Base class for all domain events. */
2
4
  export class DomainEvent {
3
5
  constructor(payload) {
4
6
  this.occurredAt = new Date();
@@ -9,6 +11,7 @@ export class DomainEvent {
9
11
  }
10
12
  }
11
13
  }
14
+ /** Publish domain events to registered handlers. */
12
15
  export const EventPublisher = new Abstraction("EventPublisher");
13
16
 
14
17
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Abstraction","DomainEvent","constructor","payload","occurredAt","Date","undefined","EventPublisher"],"sources":["abstractions.ts"],"sourcesContent":["import { Abstraction } from \"@webiny/di\";\n\nexport abstract class DomainEvent<TPayload = void> {\n public abstract readonly eventType: string;\n public readonly occurredAt: Date;\n public readonly payload: TPayload extends void ? undefined : TPayload;\n\n constructor(payload: TPayload);\n constructor(payload?: never) {\n this.occurredAt = new Date();\n\n if (payload === undefined) {\n this.payload = undefined as any;\n } else {\n this.payload = payload;\n }\n }\n\n abstract getHandlerAbstraction(): Abstraction<IEventHandler<any>>;\n}\n\nexport interface IEventHandler<TEvent extends DomainEvent<any> = DomainEvent<any>> {\n handle(event: TEvent): Promise<void>;\n}\n\nexport interface IEventPublisher {\n publish<TEvent extends DomainEvent<any>>(event: TEvent): Promise<void>;\n}\n\nexport const EventPublisher = new Abstraction<IEventPublisher>(\"EventPublisher\");\n\nexport namespace EventPublisher {\n export type Interface = IEventPublisher;\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,YAAY;AAExC,OAAO,MAAeC,WAAW,CAAkB;EAM/CC,WAAWA,CAACC,OAAe,EAAE;IACzB,IAAI,CAACC,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;IAE5B,IAAIF,OAAO,KAAKG,SAAS,EAAE;MACvB,IAAI,CAACH,OAAO,GAAGG,SAAgB;IACnC,CAAC,MAAM;MACH,IAAI,CAACH,OAAO,GAAGA,OAAO;IAC1B;EACJ;AAGJ;AAUA,OAAO,MAAMI,cAAc,GAAG,IAAIP,WAAW,CAAkB,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Abstraction","DomainEvent","constructor","payload","occurredAt","Date","undefined","EventPublisher"],"sources":["abstractions.ts"],"sourcesContent":["import { Abstraction } from \"@webiny/di\";\n\n/** Base class for all domain events. */\nexport abstract class DomainEvent<TPayload = void> {\n public abstract readonly eventType: string;\n public readonly occurredAt: Date;\n public readonly payload: TPayload extends void ? undefined : TPayload;\n\n constructor(payload: TPayload);\n constructor(payload?: never) {\n this.occurredAt = new Date();\n\n if (payload === undefined) {\n this.payload = undefined as any;\n } else {\n this.payload = payload;\n }\n }\n\n abstract getHandlerAbstraction(): Abstraction<IEventHandler<any>>;\n}\n\nexport interface IEventHandler<TEvent extends DomainEvent<any> = DomainEvent<any>> {\n handle(event: TEvent): Promise<void>;\n}\n\nexport interface IEventPublisher {\n publish<TEvent extends DomainEvent<any>>(event: TEvent): Promise<void>;\n}\n\n/** Publish domain events to registered handlers. */\nexport const EventPublisher = new Abstraction<IEventPublisher>(\"EventPublisher\");\n\nexport namespace EventPublisher {\n export type Interface = IEventPublisher;\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,YAAY;;AAExC;AACA,OAAO,MAAeC,WAAW,CAAkB;EAM/CC,WAAWA,CAACC,OAAe,EAAE;IACzB,IAAI,CAACC,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;IAE5B,IAAIF,OAAO,KAAKG,SAAS,EAAE;MACvB,IAAI,CAACH,OAAO,GAAGG,SAAgB;IACnC,CAAC,MAAM;MACH,IAAI,CAACH,OAAO,GAAGA,OAAO;IAC1B;EACJ;AAGJ;AAUA;AACA,OAAO,MAAMI,cAAc,GAAG,IAAIP,WAAW,CAAkB,gBAAgB,CAAC","ignoreList":[]}
@@ -12,6 +12,7 @@ export interface IGlobalKeyValueStore {
12
12
  set(key: string, value: any, options?: IGlobalKeyValueStoreOptions): Promise<Result<void, KeyValueStoreRepository.Error>>;
13
13
  delete(key: string, options?: IGlobalKeyValueStoreOptions): Promise<Result<void, KeyValueStoreRepository.Error>>;
14
14
  }
15
+ /** Global (non-tenant-scoped) key-value store. */
15
16
  export declare const GlobalKeyValueStore: import("@webiny/di").Abstraction<IGlobalKeyValueStore>;
16
17
  export declare namespace GlobalKeyValueStore {
17
18
  type Interface = IGlobalKeyValueStore;
@@ -23,6 +24,7 @@ export interface IKeyValueStore {
23
24
  set(key: string, value: any): Promise<Result<void, KeyValueStoreRepository.Error>>;
24
25
  delete(key: string): Promise<Result<void, KeyValueStoreRepository.Error>>;
25
26
  }
27
+ /** Tenant-scoped key-value store. */
26
28
  export declare const KeyValueStore: import("@webiny/di").Abstraction<IKeyValueStore>;
27
29
  export declare namespace KeyValueStore {
28
30
  type Interface = IKeyValueStore;
@@ -38,6 +40,7 @@ export interface IKeyValueStoreRepository {
38
40
  set(key: string, value: any, scope: string): Promise<Result<void, RepositoryError>>;
39
41
  delete(key: string, scope: string): Promise<Result<void, RepositoryError>>;
40
42
  }
43
+ /** Persist and retrieve key-value pairs. */
41
44
  export declare const KeyValueStoreRepository: import("@webiny/di").Abstraction<IKeyValueStoreRepository>;
42
45
  export declare namespace KeyValueStoreRepository {
43
46
  type Interface = IKeyValueStoreRepository;
@@ -51,6 +54,7 @@ export interface IKeyValueStorageOperations {
51
54
  set(key: string, value: any, scope: string): Promise<void>;
52
55
  delete(key: string, scope: string): Promise<void>;
53
56
  }
57
+ /** Storage operations for key-value persistence. */
54
58
  export declare const KeyValueStorageOperations: import("@webiny/di").Abstraction<IKeyValueStorageOperations>;
55
59
  export declare namespace KeyValueStorageOperations {
56
60
  type Interface = IKeyValueStorageOperations;
@@ -2,18 +2,22 @@ import { createAbstraction } from "@webiny/feature/api";
2
2
 
3
3
  // GlobalKeyValueStore - Non-tenant-aware service
4
4
 
5
+ /** Global (non-tenant-scoped) key-value store. */
5
6
  export const GlobalKeyValueStore = createAbstraction("GlobalKeyValueStore");
6
7
 
7
8
  // KeyValueStore - Tenant-aware service
8
9
 
10
+ /** Tenant-scoped key-value store. */
9
11
  export const KeyValueStore = createAbstraction("KeyValueStore");
10
12
 
11
13
  // Repository
12
14
 
15
+ /** Persist and retrieve key-value pairs. */
13
16
  export const KeyValueStoreRepository = createAbstraction("KeyValueStoreRepository");
14
17
 
15
18
  // Storage Operations
16
19
 
20
+ /** Storage operations for key-value persistence. */
17
21
  export const KeyValueStorageOperations = createAbstraction("KeyValueStorageOperations");
18
22
 
19
23
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","GlobalKeyValueStore","KeyValueStore","KeyValueStoreRepository","KeyValueStorageOperations"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport { KeyNotFoundError, KeyValueStorageError } from \"./errors.js\";\n\nexport interface IKeyValueRecord {\n key: string;\n value: any;\n}\n\n// GlobalKeyValueStore - Non-tenant-aware service\nexport interface IGlobalKeyValueStoreOptions {\n scope?: string;\n}\n\nexport interface IGlobalKeyValueStore {\n get<T = unknown>(\n key: string,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<T, KeyValueStoreRepository.Error>>;\n set(\n key: string,\n value: any,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<void, KeyValueStoreRepository.Error>>;\n delete(\n key: string,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<void, KeyValueStoreRepository.Error>>;\n}\n\nexport const GlobalKeyValueStore = createAbstraction<IGlobalKeyValueStore>(\"GlobalKeyValueStore\");\n\nexport namespace GlobalKeyValueStore {\n export type Interface = IGlobalKeyValueStore;\n export type KeyValueRecord = IKeyValueRecord;\n export type Error = KeyValueStoreRepository.Error;\n}\n\n// KeyValueStore - Tenant-aware service\nexport interface IKeyValueStore {\n get<T = unknown>(key: string): Promise<Result<T, KeyValueStoreRepository.Error>>;\n set(key: string, value: any): Promise<Result<void, KeyValueStoreRepository.Error>>;\n delete(key: string): Promise<Result<void, KeyValueStoreRepository.Error>>;\n}\n\nexport const KeyValueStore = createAbstraction<IKeyValueStore>(\"KeyValueStore\");\n\nexport namespace KeyValueStore {\n export type Interface = IKeyValueStore;\n export type KeyValueRecord = IKeyValueRecord;\n export type Error = KeyValueStoreRepository.Error;\n}\n\n// Repository\n\nexport interface IKeyValueStoreRepositoryErrors {\n base: KeyNotFoundError | KeyValueStorageError;\n}\n\ntype RepositoryError = IKeyValueStoreRepositoryErrors[keyof IKeyValueStoreRepositoryErrors];\n\nexport interface IKeyValueStoreRepository {\n get<T = unknown>(key: string, scope: string): Promise<Result<T, RepositoryError>>;\n set(key: string, value: any, scope: string): Promise<Result<void, RepositoryError>>;\n delete(key: string, scope: string): Promise<Result<void, RepositoryError>>;\n}\n\nexport const KeyValueStoreRepository =\n createAbstraction<IKeyValueStoreRepository>(\"KeyValueStoreRepository\");\n\nexport namespace KeyValueStoreRepository {\n export type Interface = IKeyValueStoreRepository;\n export type Error = RepositoryError;\n}\n\n// Storage Operations\n\nexport interface IKeyValueStorageOperations {\n get(key: string, scope: string): Promise<{ key: string; value: any } | null>;\n set(key: string, value: any, scope: string): Promise<void>;\n delete(key: string, scope: string): Promise<void>;\n}\n\nexport const KeyValueStorageOperations = createAbstraction<IKeyValueStorageOperations>(\n \"KeyValueStorageOperations\"\n);\n\nexport namespace KeyValueStorageOperations {\n export type Interface = IKeyValueStorageOperations;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;;AASvD;;AAqBA,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAuB,qBAAqB,CAAC;;AAQjG;;AAOA,OAAO,MAAME,aAAa,GAAGF,iBAAiB,CAAiB,eAAe,CAAC;;AAQ/E;;AAcA,OAAO,MAAMG,uBAAuB,GAChCH,iBAAiB,CAA2B,yBAAyB,CAAC;;AAO1E;;AAQA,OAAO,MAAMI,yBAAyB,GAAGJ,iBAAiB,CACtD,2BACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","GlobalKeyValueStore","KeyValueStore","KeyValueStoreRepository","KeyValueStorageOperations"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport { KeyNotFoundError, KeyValueStorageError } from \"./errors.js\";\n\nexport interface IKeyValueRecord {\n key: string;\n value: any;\n}\n\n// GlobalKeyValueStore - Non-tenant-aware service\nexport interface IGlobalKeyValueStoreOptions {\n scope?: string;\n}\n\nexport interface IGlobalKeyValueStore {\n get<T = unknown>(\n key: string,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<T, KeyValueStoreRepository.Error>>;\n set(\n key: string,\n value: any,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<void, KeyValueStoreRepository.Error>>;\n delete(\n key: string,\n options?: IGlobalKeyValueStoreOptions\n ): Promise<Result<void, KeyValueStoreRepository.Error>>;\n}\n\n/** Global (non-tenant-scoped) key-value store. */\nexport const GlobalKeyValueStore = createAbstraction<IGlobalKeyValueStore>(\"GlobalKeyValueStore\");\n\nexport namespace GlobalKeyValueStore {\n export type Interface = IGlobalKeyValueStore;\n export type KeyValueRecord = IKeyValueRecord;\n export type Error = KeyValueStoreRepository.Error;\n}\n\n// KeyValueStore - Tenant-aware service\nexport interface IKeyValueStore {\n get<T = unknown>(key: string): Promise<Result<T, KeyValueStoreRepository.Error>>;\n set(key: string, value: any): Promise<Result<void, KeyValueStoreRepository.Error>>;\n delete(key: string): Promise<Result<void, KeyValueStoreRepository.Error>>;\n}\n\n/** Tenant-scoped key-value store. */\nexport const KeyValueStore = createAbstraction<IKeyValueStore>(\"KeyValueStore\");\n\nexport namespace KeyValueStore {\n export type Interface = IKeyValueStore;\n export type KeyValueRecord = IKeyValueRecord;\n export type Error = KeyValueStoreRepository.Error;\n}\n\n// Repository\n\nexport interface IKeyValueStoreRepositoryErrors {\n base: KeyNotFoundError | KeyValueStorageError;\n}\n\ntype RepositoryError = IKeyValueStoreRepositoryErrors[keyof IKeyValueStoreRepositoryErrors];\n\nexport interface IKeyValueStoreRepository {\n get<T = unknown>(key: string, scope: string): Promise<Result<T, RepositoryError>>;\n set(key: string, value: any, scope: string): Promise<Result<void, RepositoryError>>;\n delete(key: string, scope: string): Promise<Result<void, RepositoryError>>;\n}\n\n/** Persist and retrieve key-value pairs. */\nexport const KeyValueStoreRepository =\n createAbstraction<IKeyValueStoreRepository>(\"KeyValueStoreRepository\");\n\nexport namespace KeyValueStoreRepository {\n export type Interface = IKeyValueStoreRepository;\n export type Error = RepositoryError;\n}\n\n// Storage Operations\n\nexport interface IKeyValueStorageOperations {\n get(key: string, scope: string): Promise<{ key: string; value: any } | null>;\n set(key: string, value: any, scope: string): Promise<void>;\n delete(key: string, scope: string): Promise<void>;\n}\n\n/** Storage operations for key-value persistence. */\nexport const KeyValueStorageOperations = createAbstraction<IKeyValueStorageOperations>(\n \"KeyValueStorageOperations\"\n);\n\nexport namespace KeyValueStorageOperations {\n export type Interface = IKeyValueStorageOperations;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;;AASvD;;AAqBA;AACA,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAuB,qBAAqB,CAAC;;AAQjG;;AAOA;AACA,OAAO,MAAME,aAAa,GAAGF,iBAAiB,CAAiB,eAAe,CAAC;;AAQ/E;;AAcA;AACA,OAAO,MAAMG,uBAAuB,GAChCH,iBAAiB,CAA2B,yBAAyB,CAAC;;AAO1E;;AAQA;AACA,OAAO,MAAMI,yBAAyB,GAAGJ,iBAAiB,CACtD,2BACJ,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ export interface ILogger {
7
7
  fatal(objOrMsg: object | string, ...args: any[]): void;
8
8
  log(objOrMsg: object | string, ...args: any[]): void;
9
9
  }
10
+ /** Structured logging with multiple log levels. */
10
11
  export declare const Logger: import("@webiny/di").Abstraction<ILogger>;
11
12
  export declare namespace Logger {
12
13
  type Interface = ILogger;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Structured logging with multiple log levels. */
2
3
  export const Logger = createAbstraction("Logger");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","Logger"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\n\nexport interface ILogger {\n // Basic logging levels\n trace(objOrMsg: object | string, ...args: any[]): void;\n debug(objOrMsg: object | string, ...args: any[]): void;\n info(objOrMsg: object | string, ...args: any[]): void;\n warn(objOrMsg: object | string, ...args: any[]): void;\n error(objOrMsg: object | string, ...args: any[]): void;\n fatal(objOrMsg: object | string, ...args: any[]): void;\n\n // Generic log (defaults to 'info')\n log(objOrMsg: object | string, ...args: any[]): void;\n}\n\nexport const Logger = createAbstraction<ILogger>(\"Logger\");\n\nexport namespace Logger {\n export type Interface = ILogger;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAevD,OAAO,MAAMC,MAAM,GAAGD,iBAAiB,CAAU,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","Logger"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\n\nexport interface ILogger {\n // Basic logging levels\n trace(objOrMsg: object | string, ...args: any[]): void;\n debug(objOrMsg: object | string, ...args: any[]): void;\n info(objOrMsg: object | string, ...args: any[]): void;\n warn(objOrMsg: object | string, ...args: any[]): void;\n error(objOrMsg: object | string, ...args: any[]): void;\n fatal(objOrMsg: object | string, ...args: any[]): void;\n\n // Generic log (defaults to 'info')\n log(objOrMsg: object | string, ...args: any[]): void;\n}\n\n/** Structured logging with multiple log levels. */\nexport const Logger = createAbstraction<ILogger>(\"Logger\");\n\nexport namespace Logger {\n export type Interface = ILogger;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAevD;AACA,OAAO,MAAMC,MAAM,GAAGD,iBAAiB,CAAU,QAAQ,CAAC","ignoreList":[]}
@@ -11,6 +11,7 @@ export interface IIdentityContext {
11
11
  withoutAuthorization<T>(cb: () => Promise<T>): Promise<T>;
12
12
  isAuthorizationEnabled(): boolean;
13
13
  }
14
+ /** Provides access to the current identity and its permissions. */
14
15
  export declare const IdentityContext: import("@webiny/di").Abstraction<IIdentityContext>;
15
16
  export declare namespace IdentityContext {
16
17
  type Interface = IIdentityContext;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Provides access to the current identity and its permissions. */
2
3
  export const IdentityContext = createAbstraction("IdentityContext");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","IdentityContext"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { Identity } from \"./Identity.js\";\nimport type { SecurityPermission } from \"~/types/security.js\";\n\nexport interface IIdentityContext {\n // Identity methods\n getIdentity(): Identity;\n setIdentity(identity: Identity | undefined): void;\n withIdentity<T>(identity: Identity | undefined, cb: () => Promise<T>): Promise<T>;\n\n // Permission methods\n getPermission<TPermission extends SecurityPermission = SecurityPermission>(\n name: string\n ): Promise<TPermission | null>;\n\n getPermissions<TPermission extends SecurityPermission = SecurityPermission>(\n name: string\n ): Promise<TPermission[]>;\n\n listPermissions(): Promise<SecurityPermission[]>;\n\n hasFullAccess(): Promise<boolean>;\n\n // Authorization context methods\n withoutAuthorization<T>(cb: () => Promise<T>): Promise<T>;\n isAuthorizationEnabled(): boolean;\n}\n\nexport const IdentityContext = createAbstraction<IIdentityContext>(\"IdentityContext\");\n\nexport namespace IdentityContext {\n export type Interface = IIdentityContext;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AA4BvD,OAAO,MAAMC,eAAe,GAAGD,iBAAiB,CAAmB,iBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","IdentityContext"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { Identity } from \"./Identity.js\";\nimport type { SecurityPermission } from \"~/types/security.js\";\n\nexport interface IIdentityContext {\n // Identity methods\n getIdentity(): Identity;\n setIdentity(identity: Identity | undefined): void;\n withIdentity<T>(identity: Identity | undefined, cb: () => Promise<T>): Promise<T>;\n\n // Permission methods\n getPermission<TPermission extends SecurityPermission = SecurityPermission>(\n name: string\n ): Promise<TPermission | null>;\n\n getPermissions<TPermission extends SecurityPermission = SecurityPermission>(\n name: string\n ): Promise<TPermission[]>;\n\n listPermissions(): Promise<SecurityPermission[]>;\n\n hasFullAccess(): Promise<boolean>;\n\n // Authorization context methods\n withoutAuthorization<T>(cb: () => Promise<T>): Promise<T>;\n isAuthorizationEnabled(): boolean;\n}\n\n/** Provides access to the current identity and its permissions. */\nexport const IdentityContext = createAbstraction<IIdentityContext>(\"IdentityContext\");\n\nexport namespace IdentityContext {\n export type Interface = IIdentityContext;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AA4BvD;AACA,OAAO,MAAMC,eAAe,GAAGD,iBAAiB,CAAmB,iBAAiB,CAAC","ignoreList":[]}
@@ -21,7 +21,7 @@ class CreateApiKeyUseCaseImpl {
21
21
  }
22
22
  const validation = createApiKeyInputSchema.safeParse(input);
23
23
  if (!validation.success) {
24
- return Result.fail(new ApiKeyValidationError(validation.error.errors[0].message));
24
+ return Result.fail(new ApiKeyValidationError(validation.error.issues[0].message));
25
25
  }
26
26
  const token = generateToken();
27
27
  const identity = this.identityContext.getIdentity();
@@ -1 +1 @@
1
- {"version":3,"names":["mdbid","Result","EventPublisher","CreateApiKeyUseCase","CreateApiKeyUseCaseAbstraction","ApiKeysRepository","IdentityContext","createApiKeyInputSchema","ApiKeyBeforeCreateEvent","ApiKeyAfterCreateEvent","generateToken","ApiKeyValidationError","ApiKeyNotAuthorizedError","CreateApiKeyUseCaseImpl","constructor","identityContext","eventPublisher","repository","execute","input","hasPermission","getPermission","fail","validation","safeParse","success","error","errors","message","token","identity","getIdentity","data","apiKey","id","name","slug","description","permissions","createdOn","Date","toISOString","createdBy","displayName","type","publish","result","create","isFail","ok","createImplementation","implementation","dependencies"],"sources":["CreateApiKeyUseCase.ts"],"sourcesContent":["import { mdbid } from \"@webiny/utils\";\nimport { Result } from \"@webiny/feature/api\";\nimport { EventPublisher } from \"~/features/eventPublisher/index.js\";\nimport { CreateApiKeyUseCase as CreateApiKeyUseCaseAbstraction } from \"./abstractions.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { IdentityContext } from \"../../IdentityContext/abstractions.js\";\nimport { createApiKeyInputSchema } from \"../shared/schemas.js\";\nimport { ApiKeyBeforeCreateEvent, ApiKeyAfterCreateEvent } from \"./events.js\";\nimport type { ApiKey, CreateApiKeyInput } from \"../shared/types.js\";\nimport type { ApiKeyPermission } from \"~/types/security.js\";\nimport { generateToken } from \"../shared/generateToken.js\";\nimport { ApiKeyValidationError, ApiKeyNotAuthorizedError } from \"../shared/errors.js\";\n\nclass CreateApiKeyUseCaseImpl implements CreateApiKeyUseCaseAbstraction.Interface {\n constructor(\n private identityContext: IdentityContext.Interface,\n private eventPublisher: EventPublisher.Interface,\n private repository: ApiKeysRepository.Interface\n ) {}\n\n async execute(\n input: CreateApiKeyInput\n ): Promise<Result<ApiKey, CreateApiKeyUseCaseAbstraction.Error>> {\n const hasPermission =\n await this.identityContext.getPermission<ApiKeyPermission>(\"security.apiKey\");\n\n if (!hasPermission) {\n return Result.fail(new ApiKeyNotAuthorizedError());\n }\n\n const validation = createApiKeyInputSchema.safeParse(input);\n if (!validation.success) {\n return Result.fail(new ApiKeyValidationError(validation.error.errors[0].message));\n }\n\n const token = generateToken();\n const identity = this.identityContext.getIdentity();\n const data = validation.data;\n\n const apiKey: ApiKey = {\n id: mdbid(),\n name: data.name,\n slug: data.slug,\n description: data.description,\n token,\n permissions: data.permissions,\n createdOn: new Date().toISOString(),\n createdBy: {\n id: identity.id,\n displayName: identity.displayName,\n type: identity.type\n }\n };\n\n await this.eventPublisher.publish(\n new ApiKeyBeforeCreateEvent({ apiKey, input: validation.data })\n );\n\n const result = await this.repository.create(apiKey);\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n await this.eventPublisher.publish(\n new ApiKeyAfterCreateEvent({ apiKey, input: validation.data })\n );\n\n return Result.ok(apiKey);\n }\n}\n\nexport const CreateApiKeyUseCase = CreateApiKeyUseCaseAbstraction.createImplementation({\n implementation: CreateApiKeyUseCaseImpl,\n dependencies: [IdentityContext, EventPublisher, ApiKeysRepository]\n});\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["mdbid","Result","EventPublisher","CreateApiKeyUseCase","CreateApiKeyUseCaseAbstraction","ApiKeysRepository","IdentityContext","createApiKeyInputSchema","ApiKeyBeforeCreateEvent","ApiKeyAfterCreateEvent","generateToken","ApiKeyValidationError","ApiKeyNotAuthorizedError","CreateApiKeyUseCaseImpl","constructor","identityContext","eventPublisher","repository","execute","input","hasPermission","getPermission","fail","validation","safeParse","success","error","issues","message","token","identity","getIdentity","data","apiKey","id","name","slug","description","permissions","createdOn","Date","toISOString","createdBy","displayName","type","publish","result","create","isFail","ok","createImplementation","implementation","dependencies"],"sources":["CreateApiKeyUseCase.ts"],"sourcesContent":["import { mdbid } from \"@webiny/utils\";\nimport { Result } from \"@webiny/feature/api\";\nimport { EventPublisher } from \"~/features/eventPublisher/index.js\";\nimport { CreateApiKeyUseCase as CreateApiKeyUseCaseAbstraction } from \"./abstractions.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { IdentityContext } from \"../../IdentityContext/abstractions.js\";\nimport { createApiKeyInputSchema } from \"../shared/schemas.js\";\nimport { ApiKeyBeforeCreateEvent, ApiKeyAfterCreateEvent } from \"./events.js\";\nimport type { ApiKey, CreateApiKeyInput } from \"../shared/types.js\";\nimport type { ApiKeyPermission } from \"~/types/security.js\";\nimport { generateToken } from \"../shared/generateToken.js\";\nimport { ApiKeyValidationError, ApiKeyNotAuthorizedError } from \"../shared/errors.js\";\n\nclass CreateApiKeyUseCaseImpl implements CreateApiKeyUseCaseAbstraction.Interface {\n constructor(\n private identityContext: IdentityContext.Interface,\n private eventPublisher: EventPublisher.Interface,\n private repository: ApiKeysRepository.Interface\n ) {}\n\n async execute(\n input: CreateApiKeyInput\n ): Promise<Result<ApiKey, CreateApiKeyUseCaseAbstraction.Error>> {\n const hasPermission =\n await this.identityContext.getPermission<ApiKeyPermission>(\"security.apiKey\");\n\n if (!hasPermission) {\n return Result.fail(new ApiKeyNotAuthorizedError());\n }\n\n const validation = createApiKeyInputSchema.safeParse(input);\n if (!validation.success) {\n return Result.fail(new ApiKeyValidationError(validation.error.issues[0].message));\n }\n\n const token = generateToken();\n const identity = this.identityContext.getIdentity();\n const data = validation.data;\n\n const apiKey: ApiKey = {\n id: mdbid(),\n name: data.name,\n slug: data.slug,\n description: data.description,\n token,\n permissions: data.permissions,\n createdOn: new Date().toISOString(),\n createdBy: {\n id: identity.id,\n displayName: identity.displayName,\n type: identity.type\n }\n };\n\n await this.eventPublisher.publish(\n new ApiKeyBeforeCreateEvent({ apiKey, input: validation.data })\n );\n\n const result = await this.repository.create(apiKey);\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n await this.eventPublisher.publish(\n new ApiKeyAfterCreateEvent({ apiKey, input: validation.data })\n );\n\n return Result.ok(apiKey);\n }\n}\n\nexport const CreateApiKeyUseCase = CreateApiKeyUseCaseAbstraction.createImplementation({\n implementation: CreateApiKeyUseCaseImpl,\n dependencies: [IdentityContext, EventPublisher, ApiKeysRepository]\n});\n"],"mappings":"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","ignoreList":[]}
@@ -10,6 +10,7 @@ type CreateApiKeyError = ICreateApiKeyErrors[keyof ICreateApiKeyErrors] | ApiKey
10
10
  export interface ICreateApiKey {
11
11
  execute(input: CreateApiKeyInput): Promise<Result<ApiKey, CreateApiKeyError>>;
12
12
  }
13
+ /** Create a new API key. */
13
14
  export declare const CreateApiKeyUseCase: import("@webiny/di").Abstraction<ICreateApiKey>;
14
15
  export declare namespace CreateApiKeyUseCase {
15
16
  type Interface = ICreateApiKey;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Create a new API key. */
2
3
  export const CreateApiKeyUseCase = createAbstraction("CreateApiKeyUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","CreateApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey, CreateApiKeyInput } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nexport interface ICreateApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n validation: ApiKeyValidationError;\n}\n\ntype CreateApiKeyError = ICreateApiKeyErrors[keyof ICreateApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface ICreateApiKey {\n execute(input: CreateApiKeyInput): Promise<Result<ApiKey, CreateApiKeyError>>;\n}\n\nexport const CreateApiKeyUseCase = createAbstraction<ICreateApiKey>(\"CreateApiKeyUseCase\");\n\nexport namespace CreateApiKeyUseCase {\n export type Interface = ICreateApiKey;\n export type Error = CreateApiKeyError;\n}\n\nexport interface ApiKeyBeforeCreatePayload {\n apiKey: ApiKey;\n input: CreateApiKeyInput;\n}\n\nexport interface ApiKeyAfterCreatePayload {\n apiKey: ApiKey;\n input: CreateApiKeyInput;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAgB,qBAAqB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","CreateApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey, CreateApiKeyInput } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nexport interface ICreateApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n validation: ApiKeyValidationError;\n}\n\ntype CreateApiKeyError = ICreateApiKeyErrors[keyof ICreateApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface ICreateApiKey {\n execute(input: CreateApiKeyInput): Promise<Result<ApiKey, CreateApiKeyError>>;\n}\n\n/** Create a new API key. */\nexport const CreateApiKeyUseCase = createAbstraction<ICreateApiKey>(\"CreateApiKeyUseCase\");\n\nexport namespace CreateApiKeyUseCase {\n export type Interface = ICreateApiKey;\n export type Error = CreateApiKeyError;\n}\n\nexport interface ApiKeyBeforeCreatePayload {\n apiKey: ApiKey;\n input: CreateApiKeyInput;\n}\n\nexport interface ApiKeyAfterCreatePayload {\n apiKey: ApiKey;\n input: CreateApiKeyInput;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD;AACA,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAgB,qBAAqB,CAAC","ignoreList":[]}
@@ -5,6 +5,7 @@ export declare class ApiKeyBeforeCreateEvent extends DomainEvent<ApiKeyBeforeCre
5
5
  eventType: "apiKey.beforeCreate";
6
6
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<ApiKeyBeforeCreateEvent>>;
7
7
  }
8
+ /** Hook into API key lifecycle before an API key is created. */
8
9
  export declare const ApiKeyBeforeCreateEventHandler: import("@webiny/di").Abstraction<IEventHandler<ApiKeyBeforeCreateEvent>>;
9
10
  export declare namespace ApiKeyBeforeCreateEventHandler {
10
11
  type Interface = IEventHandler<ApiKeyBeforeCreateEvent>;
@@ -14,6 +15,7 @@ export declare class ApiKeyAfterCreateEvent extends DomainEvent<ApiKeyAfterCreat
14
15
  eventType: "apiKey.afterCreate";
15
16
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<ApiKeyAfterCreateEvent>>;
16
17
  }
18
+ /** Hook into API key lifecycle after an API key is created. */
17
19
  export declare const ApiKeyAfterCreateEventHandler: import("@webiny/di").Abstraction<IEventHandler<ApiKeyAfterCreateEvent>>;
18
20
  export declare namespace ApiKeyAfterCreateEventHandler {
19
21
  type Interface = IEventHandler<ApiKeyAfterCreateEvent>;
@@ -6,6 +6,8 @@ export class ApiKeyBeforeCreateEvent extends DomainEvent {
6
6
  return ApiKeyBeforeCreateEventHandler;
7
7
  }
8
8
  }
9
+
10
+ /** Hook into API key lifecycle before an API key is created. */
9
11
  export const ApiKeyBeforeCreateEventHandler = createAbstraction("ApiKeyBeforeCreateEventHandler");
10
12
  export class ApiKeyAfterCreateEvent extends DomainEvent {
11
13
  eventType = "apiKey.afterCreate";
@@ -13,6 +15,8 @@ export class ApiKeyAfterCreateEvent extends DomainEvent {
13
15
  return ApiKeyAfterCreateEventHandler;
14
16
  }
15
17
  }
18
+
19
+ /** Hook into API key lifecycle after an API key is created. */
16
20
  export const ApiKeyAfterCreateEventHandler = createAbstraction("ApiKeyAfterCreateEventHandler");
17
21
 
18
22
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DomainEvent","ApiKeyBeforeCreateEvent","eventType","getHandlerAbstraction","ApiKeyBeforeCreateEventHandler","ApiKeyAfterCreateEvent","ApiKeyAfterCreateEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport type { IEventHandler } from \"~/features/eventPublisher/index.js\";\nimport type { ApiKeyBeforeCreatePayload, ApiKeyAfterCreatePayload } from \"./abstractions.js\";\n\nexport class ApiKeyBeforeCreateEvent extends DomainEvent<ApiKeyBeforeCreatePayload> {\n eventType = \"apiKey.beforeCreate\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyBeforeCreateEventHandler;\n }\n}\n\nexport const ApiKeyBeforeCreateEventHandler = createAbstraction<\n IEventHandler<ApiKeyBeforeCreateEvent>\n>(\"ApiKeyBeforeCreateEventHandler\");\n\nexport namespace ApiKeyBeforeCreateEventHandler {\n export type Interface = IEventHandler<ApiKeyBeforeCreateEvent>;\n export type Event = ApiKeyBeforeCreateEvent;\n}\n\nexport class ApiKeyAfterCreateEvent extends DomainEvent<ApiKeyAfterCreatePayload> {\n eventType = \"apiKey.afterCreate\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyAfterCreateEventHandler;\n }\n}\n\nexport const ApiKeyAfterCreateEventHandler = createAbstraction<\n IEventHandler<ApiKeyAfterCreateEvent>\n>(\"ApiKeyAfterCreateEventHandler\");\n\nexport namespace ApiKeyAfterCreateEventHandler {\n export type Interface = IEventHandler<ApiKeyAfterCreateEvent>;\n export type Event = ApiKeyAfterCreateEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW;AAIpB,OAAO,MAAMC,uBAAuB,SAASD,WAAW,CAA4B;EAChFE,SAAS,GAAG,qBAAqB;EAEjCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,8BAA8B;EACzC;AACJ;AAEA,OAAO,MAAMA,8BAA8B,GAAGL,iBAAiB,CAE7D,gCAAgC,CAAC;AAOnC,OAAO,MAAMM,sBAAsB,SAASL,WAAW,CAA2B;EAC9EE,SAAS,GAAG,oBAAoB;EAEhCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,6BAA6B;EACxC;AACJ;AAEA,OAAO,MAAMA,6BAA6B,GAAGP,iBAAiB,CAE5D,+BAA+B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DomainEvent","ApiKeyBeforeCreateEvent","eventType","getHandlerAbstraction","ApiKeyBeforeCreateEventHandler","ApiKeyAfterCreateEvent","ApiKeyAfterCreateEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport type { IEventHandler } from \"~/features/eventPublisher/index.js\";\nimport type { ApiKeyBeforeCreatePayload, ApiKeyAfterCreatePayload } from \"./abstractions.js\";\n\nexport class ApiKeyBeforeCreateEvent extends DomainEvent<ApiKeyBeforeCreatePayload> {\n eventType = \"apiKey.beforeCreate\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyBeforeCreateEventHandler;\n }\n}\n\n/** Hook into API key lifecycle before an API key is created. */\nexport const ApiKeyBeforeCreateEventHandler = createAbstraction<\n IEventHandler<ApiKeyBeforeCreateEvent>\n>(\"ApiKeyBeforeCreateEventHandler\");\n\nexport namespace ApiKeyBeforeCreateEventHandler {\n export type Interface = IEventHandler<ApiKeyBeforeCreateEvent>;\n export type Event = ApiKeyBeforeCreateEvent;\n}\n\nexport class ApiKeyAfterCreateEvent extends DomainEvent<ApiKeyAfterCreatePayload> {\n eventType = \"apiKey.afterCreate\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyAfterCreateEventHandler;\n }\n}\n\n/** Hook into API key lifecycle after an API key is created. */\nexport const ApiKeyAfterCreateEventHandler = createAbstraction<\n IEventHandler<ApiKeyAfterCreateEvent>\n>(\"ApiKeyAfterCreateEventHandler\");\n\nexport namespace ApiKeyAfterCreateEventHandler {\n export type Interface = IEventHandler<ApiKeyAfterCreateEvent>;\n export type Event = ApiKeyAfterCreateEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW;AAIpB,OAAO,MAAMC,uBAAuB,SAASD,WAAW,CAA4B;EAChFE,SAAS,GAAG,qBAAqB;EAEjCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,8BAA8B;EACzC;AACJ;;AAEA;AACA,OAAO,MAAMA,8BAA8B,GAAGL,iBAAiB,CAE7D,gCAAgC,CAAC;AAOnC,OAAO,MAAMM,sBAAsB,SAASL,WAAW,CAA2B;EAC9EE,SAAS,GAAG,oBAAoB;EAEhCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,6BAA6B;EACxC;AACJ;;AAEA;AACA,OAAO,MAAMA,6BAA6B,GAAGP,iBAAiB,CAE5D,+BAA+B,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@ type DeleteApiKeyError = IDeleteApiKeyErrors[keyof IDeleteApiKeyErrors] | ApiKey
9
9
  export interface IDeleteApiKey {
10
10
  execute(id: string): Promise<Result<void, DeleteApiKeyError>>;
11
11
  }
12
+ /** Delete an API key. */
12
13
  export declare const DeleteApiKeyUseCase: import("@webiny/di").Abstraction<IDeleteApiKey>;
13
14
  export declare namespace DeleteApiKeyUseCase {
14
15
  type Interface = IDeleteApiKey;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Delete an API key. */
2
3
  export const DeleteApiKeyUseCase = createAbstraction("DeleteApiKeyUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DeleteApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError } from \"../shared/errors.js\";\nimport type { ApiKey } from \"../shared/types.js\";\n\nexport interface IDeleteApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n}\n\ntype DeleteApiKeyError = IDeleteApiKeyErrors[keyof IDeleteApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface IDeleteApiKey {\n execute(id: string): Promise<Result<void, DeleteApiKeyError>>;\n}\n\nexport const DeleteApiKeyUseCase = createAbstraction<IDeleteApiKey>(\"DeleteApiKeyUseCase\");\n\nexport namespace DeleteApiKeyUseCase {\n export type Interface = IDeleteApiKey;\n export type Error = DeleteApiKeyError;\n}\n\nexport interface ApiKeyBeforeDeletePayload {\n apiKey: ApiKey;\n}\n\nexport interface ApiKeyAfterDeletePayload {\n apiKey: ApiKey;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAgBvD,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAgB,qBAAqB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DeleteApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError } from \"../shared/errors.js\";\nimport type { ApiKey } from \"../shared/types.js\";\n\nexport interface IDeleteApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n}\n\ntype DeleteApiKeyError = IDeleteApiKeyErrors[keyof IDeleteApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface IDeleteApiKey {\n execute(id: string): Promise<Result<void, DeleteApiKeyError>>;\n}\n\n/** Delete an API key. */\nexport const DeleteApiKeyUseCase = createAbstraction<IDeleteApiKey>(\"DeleteApiKeyUseCase\");\n\nexport namespace DeleteApiKeyUseCase {\n export type Interface = IDeleteApiKey;\n export type Error = DeleteApiKeyError;\n}\n\nexport interface ApiKeyBeforeDeletePayload {\n apiKey: ApiKey;\n}\n\nexport interface ApiKeyAfterDeletePayload {\n apiKey: ApiKey;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAgBvD;AACA,OAAO,MAAMC,mBAAmB,GAAGD,iBAAiB,CAAgB,qBAAqB,CAAC","ignoreList":[]}
@@ -5,6 +5,7 @@ export declare class ApiKeyBeforeDeleteEvent extends DomainEvent<ApiKeyBeforeDel
5
5
  eventType: "apiKey.beforeDelete";
6
6
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<ApiKeyBeforeDeleteEvent>>;
7
7
  }
8
+ /** Hook into API key lifecycle before an API key is deleted. */
8
9
  export declare const ApiKeyBeforeDeleteEventHandler: import("@webiny/di").Abstraction<IEventHandler<ApiKeyBeforeDeleteEvent>>;
9
10
  export declare namespace ApiKeyBeforeDeleteEventHandler {
10
11
  type Interface = IEventHandler<ApiKeyBeforeDeleteEvent>;
@@ -14,6 +15,7 @@ export declare class ApiKeyAfterDeleteEvent extends DomainEvent<ApiKeyAfterDelet
14
15
  eventType: "apiKey.afterDelete";
15
16
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<ApiKeyAfterDeleteEvent>>;
16
17
  }
18
+ /** Hook into API key lifecycle after an API key is deleted. */
17
19
  export declare const ApiKeyAfterDeleteEventHandler: import("@webiny/di").Abstraction<IEventHandler<ApiKeyAfterDeleteEvent>>;
18
20
  export declare namespace ApiKeyAfterDeleteEventHandler {
19
21
  type Interface = IEventHandler<ApiKeyAfterDeleteEvent>;
@@ -6,6 +6,8 @@ export class ApiKeyBeforeDeleteEvent extends DomainEvent {
6
6
  return ApiKeyBeforeDeleteEventHandler;
7
7
  }
8
8
  }
9
+
10
+ /** Hook into API key lifecycle before an API key is deleted. */
9
11
  export const ApiKeyBeforeDeleteEventHandler = createAbstraction("ApiKeyBeforeDeleteEventHandler");
10
12
  export class ApiKeyAfterDeleteEvent extends DomainEvent {
11
13
  eventType = "apiKey.afterDelete";
@@ -13,6 +15,8 @@ export class ApiKeyAfterDeleteEvent extends DomainEvent {
13
15
  return ApiKeyAfterDeleteEventHandler;
14
16
  }
15
17
  }
18
+
19
+ /** Hook into API key lifecycle after an API key is deleted. */
16
20
  export const ApiKeyAfterDeleteEventHandler = createAbstraction("ApiKeyAfterDeleteEventHandler");
17
21
 
18
22
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DomainEvent","ApiKeyBeforeDeleteEvent","eventType","getHandlerAbstraction","ApiKeyBeforeDeleteEventHandler","ApiKeyAfterDeleteEvent","ApiKeyAfterDeleteEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport type { IEventHandler } from \"~/features/eventPublisher/index.js\";\nimport type { ApiKeyBeforeDeletePayload, ApiKeyAfterDeletePayload } from \"./abstractions.js\";\n\nexport class ApiKeyBeforeDeleteEvent extends DomainEvent<ApiKeyBeforeDeletePayload> {\n eventType = \"apiKey.beforeDelete\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyBeforeDeleteEventHandler;\n }\n}\n\nexport const ApiKeyBeforeDeleteEventHandler = createAbstraction<\n IEventHandler<ApiKeyBeforeDeleteEvent>\n>(\"ApiKeyBeforeDeleteEventHandler\");\n\nexport namespace ApiKeyBeforeDeleteEventHandler {\n export type Interface = IEventHandler<ApiKeyBeforeDeleteEvent>;\n export type Event = ApiKeyBeforeDeleteEvent;\n}\n\nexport class ApiKeyAfterDeleteEvent extends DomainEvent<ApiKeyAfterDeletePayload> {\n eventType = \"apiKey.afterDelete\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyAfterDeleteEventHandler;\n }\n}\n\nexport const ApiKeyAfterDeleteEventHandler = createAbstraction<\n IEventHandler<ApiKeyAfterDeleteEvent>\n>(\"ApiKeyAfterDeleteEventHandler\");\n\nexport namespace ApiKeyAfterDeleteEventHandler {\n export type Interface = IEventHandler<ApiKeyAfterDeleteEvent>;\n export type Event = ApiKeyAfterDeleteEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW;AAIpB,OAAO,MAAMC,uBAAuB,SAASD,WAAW,CAA4B;EAChFE,SAAS,GAAG,qBAAqB;EAEjCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,8BAA8B;EACzC;AACJ;AAEA,OAAO,MAAMA,8BAA8B,GAAGL,iBAAiB,CAE7D,gCAAgC,CAAC;AAOnC,OAAO,MAAMM,sBAAsB,SAASL,WAAW,CAA2B;EAC9EE,SAAS,GAAG,oBAAoB;EAEhCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,6BAA6B;EACxC;AACJ;AAEA,OAAO,MAAMA,6BAA6B,GAAGP,iBAAiB,CAE5D,+BAA+B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DomainEvent","ApiKeyBeforeDeleteEvent","eventType","getHandlerAbstraction","ApiKeyBeforeDeleteEventHandler","ApiKeyAfterDeleteEvent","ApiKeyAfterDeleteEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport type { IEventHandler } from \"~/features/eventPublisher/index.js\";\nimport type { ApiKeyBeforeDeletePayload, ApiKeyAfterDeletePayload } from \"./abstractions.js\";\n\nexport class ApiKeyBeforeDeleteEvent extends DomainEvent<ApiKeyBeforeDeletePayload> {\n eventType = \"apiKey.beforeDelete\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyBeforeDeleteEventHandler;\n }\n}\n\n/** Hook into API key lifecycle before an API key is deleted. */\nexport const ApiKeyBeforeDeleteEventHandler = createAbstraction<\n IEventHandler<ApiKeyBeforeDeleteEvent>\n>(\"ApiKeyBeforeDeleteEventHandler\");\n\nexport namespace ApiKeyBeforeDeleteEventHandler {\n export type Interface = IEventHandler<ApiKeyBeforeDeleteEvent>;\n export type Event = ApiKeyBeforeDeleteEvent;\n}\n\nexport class ApiKeyAfterDeleteEvent extends DomainEvent<ApiKeyAfterDeletePayload> {\n eventType = \"apiKey.afterDelete\" as const;\n\n getHandlerAbstraction() {\n return ApiKeyAfterDeleteEventHandler;\n }\n}\n\n/** Hook into API key lifecycle after an API key is deleted. */\nexport const ApiKeyAfterDeleteEventHandler = createAbstraction<\n IEventHandler<ApiKeyAfterDeleteEvent>\n>(\"ApiKeyAfterDeleteEventHandler\");\n\nexport namespace ApiKeyAfterDeleteEventHandler {\n export type Interface = IEventHandler<ApiKeyAfterDeleteEvent>;\n export type Event = ApiKeyAfterDeleteEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW;AAIpB,OAAO,MAAMC,uBAAuB,SAASD,WAAW,CAA4B;EAChFE,SAAS,GAAG,qBAAqB;EAEjCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,8BAA8B;EACzC;AACJ;;AAEA;AACA,OAAO,MAAMA,8BAA8B,GAAGL,iBAAiB,CAE7D,gCAAgC,CAAC;AAOnC,OAAO,MAAMM,sBAAsB,SAASL,WAAW,CAA2B;EAC9EE,SAAS,GAAG,oBAAoB;EAEhCC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,6BAA6B;EACxC;AACJ;;AAEA;AACA,OAAO,MAAMA,6BAA6B,GAAGP,iBAAiB,CAE5D,+BAA+B,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@ type GetApiKeyError = IGetApiKeyErrors[keyof IGetApiKeyErrors] | ApiKeysReposito
9
9
  export interface IGetApiKey {
10
10
  execute(id: string): Promise<Result<ApiKey | null, GetApiKeyError>>;
11
11
  }
12
+ /** Retrieve an API key by ID. */
12
13
  export declare const GetApiKeyUseCase: import("@webiny/di").Abstraction<IGetApiKey>;
13
14
  export declare namespace GetApiKeyUseCase {
14
15
  type Interface = IGetApiKey;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Retrieve an API key by ID. */
2
3
  export const GetApiKeyUseCase = createAbstraction("GetApiKeyUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","GetApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport type { ApiKeyNotAuthorizedError } from \"~/features/security/apiKeys/shared/errors.js\";\n\nexport interface IGetApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n}\n\ntype GetApiKeyError = IGetApiKeyErrors[keyof IGetApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface IGetApiKey {\n execute(id: string): Promise<Result<ApiKey | null, GetApiKeyError>>;\n}\n\nexport const GetApiKeyUseCase = createAbstraction<IGetApiKey>(\"GetApiKeyUseCase\");\n\nexport namespace GetApiKeyUseCase {\n export type Interface = IGetApiKey;\n export type Error = GetApiKeyError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAgBvD,OAAO,MAAMC,gBAAgB,GAAGD,iBAAiB,CAAa,kBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","GetApiKeyUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport type { ApiKeyNotAuthorizedError } from \"~/features/security/apiKeys/shared/errors.js\";\n\nexport interface IGetApiKeyErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n}\n\ntype GetApiKeyError = IGetApiKeyErrors[keyof IGetApiKeyErrors] | ApiKeysRepository.Error;\n\nexport interface IGetApiKey {\n execute(id: string): Promise<Result<ApiKey | null, GetApiKeyError>>;\n}\n\n/** Retrieve an API key by ID. */\nexport const GetApiKeyUseCase = createAbstraction<IGetApiKey>(\"GetApiKeyUseCase\");\n\nexport namespace GetApiKeyUseCase {\n export type Interface = IGetApiKey;\n export type Error = GetApiKeyError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAgBvD;AACA,OAAO,MAAMC,gBAAgB,GAAGD,iBAAiB,CAAa,kBAAkB,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ type GetApiKeyBySlugError = IGetApiKeyBySlugErrors[keyof IGetApiKeyBySlugErrors]
7
7
  export interface IGetApiKeyBySlug {
8
8
  execute(slug: string): Promise<Result<ApiKey | null, GetApiKeyBySlugError>>;
9
9
  }
10
+ /** Retrieve an API key by its slug. */
10
11
  export declare const GetApiKeyBySlugUseCase: import("@webiny/di").Abstraction<IGetApiKeyBySlug>;
11
12
  export declare namespace GetApiKeyBySlugUseCase {
12
13
  type Interface = IGetApiKeyBySlug;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Retrieve an API key by its slug. */
2
3
  export const GetApiKeyBySlugUseCase = createAbstraction("GetApiKeyBySlugUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","GetApiKeyBySlugUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\n\nexport interface IGetApiKeyBySlugErrors {\n // No use-case specific errors - only repository errors can occur\n}\n\ntype GetApiKeyBySlugError =\n | IGetApiKeyBySlugErrors[keyof IGetApiKeyBySlugErrors]\n | ApiKeysRepository.Error;\n\nexport interface IGetApiKeyBySlug {\n execute(slug: string): Promise<Result<ApiKey | null, GetApiKeyBySlugError>>;\n}\n\nexport const GetApiKeyBySlugUseCase = createAbstraction<IGetApiKeyBySlug>(\"GetApiKeyBySlugUseCase\");\n\nexport namespace GetApiKeyBySlugUseCase {\n export type Interface = IGetApiKeyBySlug;\n export type Error = GetApiKeyBySlugError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD,OAAO,MAAMC,sBAAsB,GAAGD,iBAAiB,CAAmB,wBAAwB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","GetApiKeyBySlugUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\n\nexport interface IGetApiKeyBySlugErrors {\n // No use-case specific errors - only repository errors can occur\n}\n\ntype GetApiKeyBySlugError =\n | IGetApiKeyBySlugErrors[keyof IGetApiKeyBySlugErrors]\n | ApiKeysRepository.Error;\n\nexport interface IGetApiKeyBySlug {\n execute(slug: string): Promise<Result<ApiKey | null, GetApiKeyBySlugError>>;\n}\n\n/** Retrieve an API key by its slug. */\nexport const GetApiKeyBySlugUseCase = createAbstraction<IGetApiKeyBySlug>(\"GetApiKeyBySlugUseCase\");\n\nexport namespace GetApiKeyBySlugUseCase {\n export type Interface = IGetApiKeyBySlug;\n export type Error = GetApiKeyBySlugError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD;AACA,OAAO,MAAMC,sBAAsB,GAAGD,iBAAiB,CAAmB,wBAAwB,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ type GetApiKeyByTokenError = IGetApiKeyByTokenErrors[keyof IGetApiKeyByTokenErro
7
7
  export interface IGetApiKeyByToken {
8
8
  execute(token: string): Promise<Result<ApiKey | null, GetApiKeyByTokenError>>;
9
9
  }
10
+ /** Retrieve an API key by its token value. */
10
11
  export declare const GetApiKeyByTokenUseCase: import("@webiny/di").Abstraction<IGetApiKeyByToken>;
11
12
  export declare namespace GetApiKeyByTokenUseCase {
12
13
  type Interface = IGetApiKeyByToken;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** Retrieve an API key by its token value. */
2
3
  export const GetApiKeyByTokenUseCase = createAbstraction("GetApiKeyByTokenUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","GetApiKeyByTokenUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\n\nexport interface IGetApiKeyByTokenErrors {\n // No use-case specific errors - only repository errors can occur\n}\n\ntype GetApiKeyByTokenError =\n | IGetApiKeyByTokenErrors[keyof IGetApiKeyByTokenErrors]\n | ApiKeysRepository.Error;\n\nexport interface IGetApiKeyByToken {\n execute(token: string): Promise<Result<ApiKey | null, GetApiKeyByTokenError>>;\n}\n\nexport const GetApiKeyByTokenUseCase =\n createAbstraction<IGetApiKeyByToken>(\"GetApiKeyByTokenUseCase\");\n\nexport namespace GetApiKeyByTokenUseCase {\n export type Interface = IGetApiKeyByToken;\n export type Error = GetApiKeyByTokenError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD,OAAO,MAAMC,uBAAuB,GAChCD,iBAAiB,CAAoB,yBAAyB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","GetApiKeyByTokenUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ApiKey } from \"../shared/types.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\n\nexport interface IGetApiKeyByTokenErrors {\n // No use-case specific errors - only repository errors can occur\n}\n\ntype GetApiKeyByTokenError =\n | IGetApiKeyByTokenErrors[keyof IGetApiKeyByTokenErrors]\n | ApiKeysRepository.Error;\n\nexport interface IGetApiKeyByToken {\n execute(token: string): Promise<Result<ApiKey | null, GetApiKeyByTokenError>>;\n}\n\n/** Retrieve an API key by its token value. */\nexport const GetApiKeyByTokenUseCase =\n createAbstraction<IGetApiKeyByToken>(\"GetApiKeyByTokenUseCase\");\n\nexport namespace GetApiKeyByTokenUseCase {\n export type Interface = IGetApiKeyByToken;\n export type Error = GetApiKeyByTokenError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAiBvD;AACA,OAAO,MAAMC,uBAAuB,GAChCD,iBAAiB,CAAoB,yBAAyB,CAAC","ignoreList":[]}
@@ -16,7 +16,7 @@ class ListApiKeysUseCaseImpl {
16
16
  }
17
17
  const validation = listApiKeysInputSchema.safeParse(params);
18
18
  if (!validation.success) {
19
- return Result.fail(new ApiKeyValidationError(validation.error.errors[0].message));
19
+ return Result.fail(new ApiKeyValidationError(validation.error.issues[0].message));
20
20
  }
21
21
  return this.repository.list(validation.data);
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"names":["Result","ListApiKeysUseCase","ListApiKeysUseCaseAbstraction","ApiKeysRepository","IdentityContext","listApiKeysInputSchema","ApiKeyNotAuthorizedError","ApiKeyValidationError","ListApiKeysUseCaseImpl","constructor","repository","identityContext","execute","params","hasPermission","getPermission","fail","validation","safeParse","success","error","errors","message","list","data","createImplementation","implementation","dependencies"],"sources":["ListApiKeysUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { ListApiKeysUseCase as ListApiKeysUseCaseAbstraction } from \"./abstractions.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { IdentityContext } from \"../../IdentityContext/abstractions.js\";\nimport { listApiKeysInputSchema } from \"../shared/schemas.js\";\nimport type { ApiKey, ListApiKeysInput } from \"../shared/types.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nclass ListApiKeysUseCaseImpl implements ListApiKeysUseCaseAbstraction.Interface {\n private repository: ApiKeysRepository.Interface;\n private identityContext: IdentityContext.Interface;\n\n constructor(\n repository: ApiKeysRepository.Interface,\n identityContext: IdentityContext.Interface\n ) {\n this.repository = repository;\n this.identityContext = identityContext;\n }\n\n async execute(\n params: ListApiKeysInput = {}\n ): Promise<Result<ApiKey[], ListApiKeysUseCaseAbstraction.Error>> {\n const hasPermission = await this.identityContext.getPermission(\"security.apiKey\");\n if (!hasPermission) {\n return Result.fail(new ApiKeyNotAuthorizedError());\n }\n\n const validation = listApiKeysInputSchema.safeParse(params);\n if (!validation.success) {\n return Result.fail(new ApiKeyValidationError(validation.error.errors[0].message));\n }\n\n return this.repository.list(validation.data);\n }\n}\n\nexport const ListApiKeysUseCase = ListApiKeysUseCaseAbstraction.createImplementation({\n implementation: ListApiKeysUseCaseImpl,\n dependencies: [ApiKeysRepository, IdentityContext]\n});\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,kBAAkB,IAAIC,6BAA6B;AAC5D,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,sBAAsB;AAE/B,SAASC,wBAAwB,EAAEC,qBAAqB;AAExD,MAAMC,sBAAsB,CAAoD;EAI5EC,WAAWA,CACPC,UAAuC,EACvCC,eAA0C,EAC5C;IACE,IAAI,CAACD,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,eAAe,GAAGA,eAAe;EAC1C;EAEA,MAAMC,OAAOA,CACTC,MAAwB,GAAG,CAAC,CAAC,EACiC;IAC9D,MAAMC,aAAa,GAAG,MAAM,IAAI,CAACH,eAAe,CAACI,aAAa,CAAC,iBAAiB,CAAC;IACjF,IAAI,CAACD,aAAa,EAAE;MAChB,OAAOd,MAAM,CAACgB,IAAI,CAAC,IAAIV,wBAAwB,CAAC,CAAC,CAAC;IACtD;IAEA,MAAMW,UAAU,GAAGZ,sBAAsB,CAACa,SAAS,CAACL,MAAM,CAAC;IAC3D,IAAI,CAACI,UAAU,CAACE,OAAO,EAAE;MACrB,OAAOnB,MAAM,CAACgB,IAAI,CAAC,IAAIT,qBAAqB,CAACU,UAAU,CAACG,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;IACrF;IAEA,OAAO,IAAI,CAACZ,UAAU,CAACa,IAAI,CAACN,UAAU,CAACO,IAAI,CAAC;EAChD;AACJ;AAEA,OAAO,MAAMvB,kBAAkB,GAAGC,6BAA6B,CAACuB,oBAAoB,CAAC;EACjFC,cAAc,EAAElB,sBAAsB;EACtCmB,YAAY,EAAE,CAACxB,iBAAiB,EAAEC,eAAe;AACrD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Result","ListApiKeysUseCase","ListApiKeysUseCaseAbstraction","ApiKeysRepository","IdentityContext","listApiKeysInputSchema","ApiKeyNotAuthorizedError","ApiKeyValidationError","ListApiKeysUseCaseImpl","constructor","repository","identityContext","execute","params","hasPermission","getPermission","fail","validation","safeParse","success","error","issues","message","list","data","createImplementation","implementation","dependencies"],"sources":["ListApiKeysUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { ListApiKeysUseCase as ListApiKeysUseCaseAbstraction } from \"./abstractions.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { IdentityContext } from \"../../IdentityContext/abstractions.js\";\nimport { listApiKeysInputSchema } from \"../shared/schemas.js\";\nimport type { ApiKey, ListApiKeysInput } from \"../shared/types.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nclass ListApiKeysUseCaseImpl implements ListApiKeysUseCaseAbstraction.Interface {\n private repository: ApiKeysRepository.Interface;\n private identityContext: IdentityContext.Interface;\n\n constructor(\n repository: ApiKeysRepository.Interface,\n identityContext: IdentityContext.Interface\n ) {\n this.repository = repository;\n this.identityContext = identityContext;\n }\n\n async execute(\n params: ListApiKeysInput = {}\n ): Promise<Result<ApiKey[], ListApiKeysUseCaseAbstraction.Error>> {\n const hasPermission = await this.identityContext.getPermission(\"security.apiKey\");\n if (!hasPermission) {\n return Result.fail(new ApiKeyNotAuthorizedError());\n }\n\n const validation = listApiKeysInputSchema.safeParse(params);\n if (!validation.success) {\n return Result.fail(new ApiKeyValidationError(validation.error.issues[0].message));\n }\n\n return this.repository.list(validation.data);\n }\n}\n\nexport const ListApiKeysUseCase = ListApiKeysUseCaseAbstraction.createImplementation({\n implementation: ListApiKeysUseCaseImpl,\n dependencies: [ApiKeysRepository, IdentityContext]\n});\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,kBAAkB,IAAIC,6BAA6B;AAC5D,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,sBAAsB;AAE/B,SAASC,wBAAwB,EAAEC,qBAAqB;AAExD,MAAMC,sBAAsB,CAAoD;EAI5EC,WAAWA,CACPC,UAAuC,EACvCC,eAA0C,EAC5C;IACE,IAAI,CAACD,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,eAAe,GAAGA,eAAe;EAC1C;EAEA,MAAMC,OAAOA,CACTC,MAAwB,GAAG,CAAC,CAAC,EACiC;IAC9D,MAAMC,aAAa,GAAG,MAAM,IAAI,CAACH,eAAe,CAACI,aAAa,CAAC,iBAAiB,CAAC;IACjF,IAAI,CAACD,aAAa,EAAE;MAChB,OAAOd,MAAM,CAACgB,IAAI,CAAC,IAAIV,wBAAwB,CAAC,CAAC,CAAC;IACtD;IAEA,MAAMW,UAAU,GAAGZ,sBAAsB,CAACa,SAAS,CAACL,MAAM,CAAC;IAC3D,IAAI,CAACI,UAAU,CAACE,OAAO,EAAE;MACrB,OAAOnB,MAAM,CAACgB,IAAI,CAAC,IAAIT,qBAAqB,CAACU,UAAU,CAACG,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;IACrF;IAEA,OAAO,IAAI,CAACZ,UAAU,CAACa,IAAI,CAACN,UAAU,CAACO,IAAI,CAAC;EAChD;AACJ;AAEA,OAAO,MAAMvB,kBAAkB,GAAGC,6BAA6B,CAACuB,oBAAoB,CAAC;EACjFC,cAAc,EAAElB,sBAAsB;EACtCmB,YAAY,EAAE,CAACxB,iBAAiB,EAAEC,eAAe;AACrD,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,7 @@ type ListApiKeysError = IListApiKeysErrors[keyof IListApiKeysErrors] | ApiKeysRe
11
11
  export interface IListApiKeys {
12
12
  execute(params?: ListApiKeysInput): Promise<Result<ApiKey[], ListApiKeysError>>;
13
13
  }
14
+ /** List all API keys. */
14
15
  export declare const ListApiKeysUseCase: import("@webiny/di").Abstraction<IListApiKeys>;
15
16
  export declare namespace ListApiKeysUseCase {
16
17
  type Interface = IListApiKeys;
@@ -1,4 +1,5 @@
1
1
  import { createAbstraction } from "@webiny/feature/api";
2
+ /** List all API keys. */
2
3
  export const ListApiKeysUseCase = createAbstraction("ListApiKeysUseCase");
3
4
 
4
5
  //# sourceMappingURL=abstractions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","ListApiKeysUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ListApiKeysInput } from \"../shared/types.js\";\nimport type { ApiKey } from \"~/types/security.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nexport interface IListApiKeysErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n validation: ApiKeyValidationError;\n}\n\ntype ListApiKeysError = IListApiKeysErrors[keyof IListApiKeysErrors] | ApiKeysRepository.Error;\n\nexport interface IListApiKeys {\n execute(params?: ListApiKeysInput): Promise<Result<ApiKey[], ListApiKeysError>>;\n}\n\nexport const ListApiKeysUseCase = createAbstraction<IListApiKeys>(\"ListApiKeysUseCase\");\n\nexport namespace ListApiKeysUseCase {\n export type Interface = IListApiKeys;\n export type Error = ListApiKeysError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAkBvD,OAAO,MAAMC,kBAAkB,GAAGD,iBAAiB,CAAe,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","ListApiKeysUseCase"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { Result } from \"@webiny/feature/api\";\nimport type { ListApiKeysInput } from \"../shared/types.js\";\nimport type { ApiKey } from \"~/types/security.js\";\nimport { ApiKeysRepository } from \"../shared/abstractions.js\";\nimport { ApiKeyNotAuthorizedError, ApiKeyValidationError } from \"../shared/errors.js\";\n\nexport interface IListApiKeysErrors {\n notAuthorized: ApiKeyNotAuthorizedError;\n validation: ApiKeyValidationError;\n}\n\ntype ListApiKeysError = IListApiKeysErrors[keyof IListApiKeysErrors] | ApiKeysRepository.Error;\n\nexport interface IListApiKeys {\n execute(params?: ListApiKeysInput): Promise<Result<ApiKey[], ListApiKeysError>>;\n}\n\n/** List all API keys. */\nexport const ListApiKeysUseCase = createAbstraction<IListApiKeys>(\"ListApiKeysUseCase\");\n\nexport namespace ListApiKeysUseCase {\n export type Interface = IListApiKeys;\n export type Error = ListApiKeysError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAkBvD;AACA,OAAO,MAAMC,kBAAkB,GAAGD,iBAAiB,CAAe,oBAAoB,CAAC","ignoreList":[]}