@webiny/cognito 6.4.5-beta.0 → 6.6.0-alpha.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 (225) hide show
  1. package/Cognito.d.ts +0 -51
  2. package/Cognito.js +4 -78
  3. package/Cognito.js.map +1 -1
  4. package/admin/Cognito.d.ts +3 -1
  5. package/admin/Extension.js +21 -0
  6. package/admin/Extension.js.map +1 -1
  7. package/admin/features/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
  8. package/admin/features/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
  9. package/admin/features/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
  10. package/admin/features/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
  11. package/admin/features/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
  12. package/admin/features/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
  13. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
  14. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
  15. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
  16. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
  17. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
  18. package/admin/features/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
  19. package/admin/features/account/getCurrentUser/abstractions/index.d.ts +6 -0
  20. package/admin/features/account/getCurrentUser/abstractions/index.js +2 -0
  21. package/admin/features/account/getCurrentUser/feature.d.ts +3 -0
  22. package/admin/features/account/getCurrentUser/feature.js +19 -0
  23. package/admin/features/account/getCurrentUser/feature.js.map +1 -0
  24. package/admin/features/account/getCurrentUser/index.d.ts +1 -0
  25. package/admin/features/account/getCurrentUser/index.js +1 -0
  26. package/admin/features/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
  27. package/admin/features/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
  28. package/admin/features/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
  29. package/admin/features/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
  30. package/admin/features/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
  31. package/admin/features/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
  32. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
  33. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
  34. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
  35. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
  36. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
  37. package/admin/features/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
  38. package/admin/features/account/updateCurrentUser/abstractions/index.d.ts +8 -0
  39. package/admin/features/account/updateCurrentUser/abstractions/index.js +2 -0
  40. package/admin/features/account/updateCurrentUser/feature.d.ts +3 -0
  41. package/admin/features/account/updateCurrentUser/feature.js +19 -0
  42. package/admin/features/account/updateCurrentUser/feature.js.map +1 -0
  43. package/admin/features/account/updateCurrentUser/index.d.ts +1 -0
  44. package/admin/features/account/updateCurrentUser/index.js +1 -0
  45. package/admin/features/permissions/feature.d.ts +1 -1
  46. package/admin/features/users/createUser/CreateUserGateway.d.ts +11 -0
  47. package/admin/features/users/createUser/CreateUserGateway.js +49 -0
  48. package/admin/features/users/createUser/CreateUserGateway.js.map +1 -0
  49. package/admin/features/users/createUser/CreateUserUseCase.d.ts +10 -0
  50. package/admin/features/users/createUser/CreateUserUseCase.js +18 -0
  51. package/admin/features/users/createUser/CreateUserUseCase.js.map +1 -0
  52. package/admin/features/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
  53. package/admin/features/users/createUser/abstractions/CreateUserGateway.js +5 -0
  54. package/admin/features/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
  55. package/admin/features/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
  56. package/admin/features/users/createUser/abstractions/CreateUserUseCase.js +5 -0
  57. package/admin/features/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
  58. package/admin/features/users/createUser/abstractions/index.d.ts +2 -0
  59. package/admin/features/users/createUser/abstractions/index.js +2 -0
  60. package/admin/features/users/createUser/feature.d.ts +3 -0
  61. package/admin/features/users/createUser/feature.js +19 -0
  62. package/admin/features/users/createUser/feature.js.map +1 -0
  63. package/admin/features/users/createUser/index.d.ts +2 -0
  64. package/admin/features/users/createUser/index.js +2 -0
  65. package/admin/features/users/deleteUser/DeleteUserGateway.d.ts +11 -0
  66. package/admin/features/users/deleteUser/DeleteUserGateway.js +40 -0
  67. package/admin/features/users/deleteUser/DeleteUserGateway.js.map +1 -0
  68. package/admin/features/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
  69. package/admin/features/users/deleteUser/DeleteUserUseCase.js +18 -0
  70. package/admin/features/users/deleteUser/DeleteUserUseCase.js.map +1 -0
  71. package/admin/features/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
  72. package/admin/features/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
  73. package/admin/features/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
  74. package/admin/features/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
  75. package/admin/features/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
  76. package/admin/features/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
  77. package/admin/features/users/deleteUser/abstractions/index.d.ts +2 -0
  78. package/admin/features/users/deleteUser/abstractions/index.js +2 -0
  79. package/admin/features/users/deleteUser/feature.d.ts +3 -0
  80. package/admin/features/users/deleteUser/feature.js +19 -0
  81. package/admin/features/users/deleteUser/feature.js.map +1 -0
  82. package/admin/features/users/deleteUser/index.d.ts +2 -0
  83. package/admin/features/users/deleteUser/index.js +2 -0
  84. package/admin/features/users/getUser/GetUserGateway.d.ts +11 -0
  85. package/admin/features/users/getUser/GetUserGateway.js +57 -0
  86. package/admin/features/users/getUser/GetUserGateway.js.map +1 -0
  87. package/admin/features/users/getUser/GetUserUseCase.d.ts +10 -0
  88. package/admin/features/users/getUser/GetUserUseCase.js +18 -0
  89. package/admin/features/users/getUser/GetUserUseCase.js.map +1 -0
  90. package/admin/features/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
  91. package/admin/features/users/getUser/abstractions/GetUserGateway.js +5 -0
  92. package/admin/features/users/getUser/abstractions/GetUserGateway.js.map +1 -0
  93. package/admin/features/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
  94. package/admin/features/users/getUser/abstractions/GetUserUseCase.js +5 -0
  95. package/admin/features/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
  96. package/admin/features/users/getUser/abstractions/index.d.ts +2 -0
  97. package/admin/features/users/getUser/abstractions/index.js +2 -0
  98. package/admin/features/users/getUser/feature.d.ts +3 -0
  99. package/admin/features/users/getUser/feature.js +19 -0
  100. package/admin/features/users/getUser/feature.js.map +1 -0
  101. package/admin/features/users/getUser/index.d.ts +2 -0
  102. package/admin/features/users/getUser/index.js +2 -0
  103. package/admin/features/users/listUsers/ListUsersGateway.d.ts +11 -0
  104. package/admin/features/users/listUsers/ListUsersGateway.js +39 -0
  105. package/admin/features/users/listUsers/ListUsersGateway.js.map +1 -0
  106. package/admin/features/users/listUsers/ListUsersUseCase.d.ts +10 -0
  107. package/admin/features/users/listUsers/ListUsersUseCase.js +18 -0
  108. package/admin/features/users/listUsers/ListUsersUseCase.js.map +1 -0
  109. package/admin/features/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
  110. package/admin/features/users/listUsers/abstractions/ListUsersGateway.js +5 -0
  111. package/admin/features/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
  112. package/admin/features/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
  113. package/admin/features/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
  114. package/admin/features/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
  115. package/admin/features/users/listUsers/abstractions/index.d.ts +2 -0
  116. package/admin/features/users/listUsers/abstractions/index.js +2 -0
  117. package/admin/features/users/listUsers/feature.d.ts +3 -0
  118. package/admin/features/users/listUsers/feature.js +19 -0
  119. package/admin/features/users/listUsers/feature.js.map +1 -0
  120. package/admin/features/users/listUsers/index.d.ts +2 -0
  121. package/admin/features/users/listUsers/index.js +2 -0
  122. package/admin/features/users/updateUser/UpdateUserGateway.d.ts +11 -0
  123. package/admin/features/users/updateUser/UpdateUserGateway.js +59 -0
  124. package/admin/features/users/updateUser/UpdateUserGateway.js.map +1 -0
  125. package/admin/features/users/updateUser/UpdateUserUseCase.d.ts +10 -0
  126. package/admin/features/users/updateUser/UpdateUserUseCase.js +18 -0
  127. package/admin/features/users/updateUser/UpdateUserUseCase.js.map +1 -0
  128. package/admin/features/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
  129. package/admin/features/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
  130. package/admin/features/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
  131. package/admin/features/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
  132. package/admin/features/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
  133. package/admin/features/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
  134. package/admin/features/users/updateUser/abstractions/index.d.ts +2 -0
  135. package/admin/features/users/updateUser/abstractions/index.js +2 -0
  136. package/admin/features/users/updateUser/feature.d.ts +3 -0
  137. package/admin/features/users/updateUser/feature.js +19 -0
  138. package/admin/features/users/updateUser/feature.js.map +1 -0
  139. package/admin/features/users/updateUser/index.d.ts +2 -0
  140. package/admin/features/users/updateUser/index.js +2 -0
  141. package/admin/presentation/Cognito/CognitoLoginScreen.js +0 -9
  142. package/admin/presentation/Cognito/CognitoLoginScreen.js.map +1 -1
  143. package/admin/presentation/Cognito/CognitoPresenter.d.ts +1 -25
  144. package/admin/presentation/Cognito/CognitoPresenter.js +10 -122
  145. package/admin/presentation/Cognito/CognitoPresenter.js.map +1 -1
  146. package/admin/presentation/Cognito/abstractions.d.ts +1 -20
  147. package/admin/presentation/Cognito/abstractions.js.map +1 -1
  148. package/admin/presentation/Cognito/components/Divider.d.ts +1 -19
  149. package/admin/presentation/Cognito/components/Divider.js +2 -3
  150. package/admin/presentation/Cognito/components/Divider.js.map +1 -1
  151. package/admin/presentation/Cognito/components/FederatedLogin.d.ts +5 -22
  152. package/admin/presentation/Cognito/components/FederatedLogin.js +6 -19
  153. package/admin/presentation/Cognito/components/FederatedLogin.js.map +1 -1
  154. package/admin/presentation/Cognito/components/FooterSignIn.d.ts +3 -20
  155. package/admin/presentation/Cognito/components/FooterSignIn.js +2 -3
  156. package/admin/presentation/Cognito/components/FooterSignIn.js.map +1 -1
  157. package/admin/presentation/Cognito/components/PasswordResetCodeSent.d.ts +1 -19
  158. package/admin/presentation/Cognito/components/PasswordResetCodeSent.js +2 -3
  159. package/admin/presentation/Cognito/components/PasswordResetCodeSent.js.map +1 -1
  160. package/admin/presentation/Cognito/components/RequestPasswordResetCode.d.ts +1 -19
  161. package/admin/presentation/Cognito/components/RequestPasswordResetCode.js +2 -3
  162. package/admin/presentation/Cognito/components/RequestPasswordResetCode.js.map +1 -1
  163. package/admin/presentation/Cognito/components/RequireNewPassword.d.ts +1 -19
  164. package/admin/presentation/Cognito/components/RequireNewPassword.js +2 -3
  165. package/admin/presentation/Cognito/components/RequireNewPassword.js.map +1 -1
  166. package/admin/presentation/Cognito/components/SetNewPassword.d.ts +1 -19
  167. package/admin/presentation/Cognito/components/SetNewPassword.js +2 -3
  168. package/admin/presentation/Cognito/components/SetNewPassword.js.map +1 -1
  169. package/admin/presentation/Cognito/components/SignIn.d.ts +3 -19
  170. package/admin/presentation/Cognito/components/SignIn.js +7 -14
  171. package/admin/presentation/Cognito/components/SignIn.js.map +1 -1
  172. package/admin/presentation/Cognito/components/View.d.ts +1 -1
  173. package/admin/ui/views/Account/Account.js +42 -34
  174. package/admin/ui/views/Account/Account.js.map +1 -1
  175. package/admin/ui/views/Users/UsersDataList.js +44 -26
  176. package/admin/ui/views/Users/UsersDataList.js.map +1 -1
  177. package/admin/ui/views/Users/UsersForm.js +16 -22
  178. package/admin/ui/views/Users/UsersForm.js.map +1 -1
  179. package/admin/ui/views/Users/hooks/useUserForm.d.ts +2 -2
  180. package/admin/ui/views/Users/hooks/useUserForm.js +60 -78
  181. package/admin/ui/views/Users/hooks/useUserForm.js.map +1 -1
  182. package/api/features/CognitoIdp/CognitoIdentityProvider.js +11 -15
  183. package/api/features/CognitoIdp/CognitoIdentityProvider.js.map +1 -1
  184. package/api/features/CognitoIdp/abstractions.d.ts +1 -1
  185. package/api/features/CognitoIdp/abstractions.js.map +1 -1
  186. package/api/graphql/user.gql.d.ts +2 -2
  187. package/api/graphql/user.gql.js +2 -2
  188. package/api/graphql/user.gql.js.map +1 -1
  189. package/index.d.ts +1 -0
  190. package/index.js +1 -0
  191. package/package.json +18 -23
  192. package/admin/DefaultCognitoSignInConfig.d.ts +0 -23
  193. package/admin/DefaultCognitoSignInConfig.js +0 -51
  194. package/admin/DefaultCognitoSignInConfig.js.map +0 -1
  195. package/admin/SignInExtension.d.ts +0 -2
  196. package/admin/SignInExtension.js +0 -9
  197. package/admin/SignInExtension.js.map +0 -1
  198. package/admin/index.d.ts +0 -2
  199. package/admin/index.js +0 -2
  200. package/admin/presentation/Cognito/CognitoSignInConfig.d.ts +0 -31
  201. package/admin/presentation/Cognito/CognitoSignInConfig.js +0 -5
  202. package/admin/presentation/Cognito/CognitoSignInConfig.js.map +0 -1
  203. package/admin/presentation/Cognito/components/ConfirmTotpCode.d.ts +0 -26
  204. package/admin/presentation/Cognito/components/ConfirmTotpCode.js +0 -45
  205. package/admin/presentation/Cognito/components/ConfirmTotpCode.js.map +0 -1
  206. package/admin/presentation/Cognito/components/SetupTotp.d.ts +0 -25
  207. package/admin/presentation/Cognito/components/SetupTotp.js +0 -60
  208. package/admin/presentation/Cognito/components/SetupTotp.js.map +0 -1
  209. package/admin/presentation/Cognito/components/index.d.ts +0 -292
  210. package/admin/presentation/Cognito/components/index.js +0 -29
  211. package/admin/presentation/Cognito/components/index.js.map +0 -1
  212. package/admin/presentation/Cognito/signInFeature.d.ts +0 -1
  213. package/admin/presentation/Cognito/signInFeature.js +0 -11
  214. package/admin/presentation/Cognito/signInFeature.js.map +0 -1
  215. package/admin/ui/views/Account/graphql.d.ts +0 -2
  216. package/admin/ui/views/Account/graphql.js +0 -41
  217. package/admin/ui/views/Account/graphql.js.map +0 -1
  218. package/admin/ui/views/Users/graphql.d.ts +0 -5
  219. package/admin/ui/views/Users/graphql.js +0 -98
  220. package/admin/ui/views/Users/graphql.js.map +0 -1
  221. package/api/index.d.ts +0 -1
  222. package/api/index.js +0 -1
  223. package/infra/CognitoFederationPulumi.d.ts +0 -8
  224. package/infra/CognitoFederationPulumi.js +0 -17
  225. package/infra/CognitoFederationPulumi.js.map +0 -1
@@ -0,0 +1,32 @@
1
+ export interface IUserRoleRef {
2
+ id: string;
3
+ slug: string;
4
+ name: string;
5
+ }
6
+ export interface IUserTeamRef {
7
+ id: string;
8
+ slug: string;
9
+ name: string;
10
+ }
11
+ export interface IGetUserGatewayResult {
12
+ id: string;
13
+ email: string;
14
+ firstName: string;
15
+ lastName: string;
16
+ avatar: any;
17
+ external: boolean;
18
+ roles: IUserRoleRef[];
19
+ teams: IUserTeamRef[];
20
+ }
21
+ export interface IGetUserGateway {
22
+ execute(params: IGetUserGatewayParams): Promise<IGetUserGatewayResult>;
23
+ }
24
+ export interface IGetUserGatewayParams {
25
+ id: string;
26
+ }
27
+ export declare const GetUserGateway: import("@webiny/di").Abstraction<IGetUserGateway>;
28
+ export declare namespace GetUserGateway {
29
+ type Interface = IGetUserGateway;
30
+ type Params = IGetUserGatewayParams;
31
+ type Result = IGetUserGatewayResult;
32
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const GetUserGateway = createAbstraction("GetUserGateway");
3
+ export { GetUserGateway };
4
+
5
+ //# sourceMappingURL=GetUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/getUser/abstractions/GetUserGateway.js","sources":["../../../../../../src/admin/features/users/getUser/abstractions/GetUserGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IUserRoleRef {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IUserTeamRef {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IGetUserGatewayResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: any;\n external: boolean;\n roles: IUserRoleRef[];\n teams: IUserTeamRef[];\n}\n\nexport interface IGetUserGateway {\n execute(params: IGetUserGatewayParams): Promise<IGetUserGatewayResult>;\n}\n\nexport interface IGetUserGatewayParams {\n id: string;\n}\n\nexport const GetUserGateway = createAbstraction<IGetUserGateway>(\"GetUserGateway\");\n\nexport namespace GetUserGateway {\n export type Interface = IGetUserGateway;\n export type Params = IGetUserGatewayParams;\n export type Result = IGetUserGatewayResult;\n}\n"],"names":["GetUserGateway","createAbstraction"],"mappings":";AAiCO,MAAMA,iBAAiBC,kBAAmC"}
@@ -0,0 +1,14 @@
1
+ import type { IGetUserGatewayResult } from "./GetUserGateway.js";
2
+ export type IGetUserUseCaseResult = IGetUserGatewayResult;
3
+ export interface IGetUserUseCaseParams {
4
+ id: string;
5
+ }
6
+ export interface IGetUserUseCase {
7
+ execute(params: IGetUserUseCaseParams): Promise<IGetUserUseCaseResult>;
8
+ }
9
+ export declare const GetUserUseCase: import("@webiny/di").Abstraction<IGetUserUseCase>;
10
+ export declare namespace GetUserUseCase {
11
+ type Interface = IGetUserUseCase;
12
+ type Params = IGetUserUseCaseParams;
13
+ type Result = IGetUserUseCaseResult;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const GetUserUseCase = createAbstraction("GetUserUseCase");
3
+ export { GetUserUseCase };
4
+
5
+ //# sourceMappingURL=GetUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/getUser/abstractions/GetUserUseCase.js","sources":["../../../../../../src/admin/features/users/getUser/abstractions/GetUserUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IGetUserGatewayResult } from \"./GetUserGateway.js\";\n\nexport type IGetUserUseCaseResult = IGetUserGatewayResult;\n\nexport interface IGetUserUseCaseParams {\n id: string;\n}\n\nexport interface IGetUserUseCase {\n execute(params: IGetUserUseCaseParams): Promise<IGetUserUseCaseResult>;\n}\n\nexport const GetUserUseCase = createAbstraction<IGetUserUseCase>(\"GetUserUseCase\");\n\nexport namespace GetUserUseCase {\n export type Interface = IGetUserUseCase;\n export type Params = IGetUserUseCaseParams;\n export type Result = IGetUserUseCaseResult;\n}\n"],"names":["GetUserUseCase","createAbstraction"],"mappings":";AAaO,MAAMA,iBAAiBC,kBAAmC"}
@@ -0,0 +1,2 @@
1
+ export { GetUserGateway, type IGetUserGateway, type IGetUserGatewayParams, type IGetUserGatewayResult, type IUserRoleRef, type IUserTeamRef } from "./GetUserGateway.js";
2
+ export { GetUserUseCase, type IGetUserUseCase, type IGetUserUseCaseParams, type IGetUserUseCaseResult } from "./GetUserUseCase.js";
@@ -0,0 +1,2 @@
1
+ export { GetUserGateway } from "./GetUserGateway.js";
2
+ export { GetUserUseCase } from "./GetUserUseCase.js";
@@ -0,0 +1,3 @@
1
+ export declare const GetUserFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions/GetUserUseCase.js").IGetUserUseCase;
3
+ }, []>;
@@ -0,0 +1,19 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { GetUserUseCase } from "./abstractions/index.js";
3
+ import { GetUserUseCase as external_GetUserUseCase_js_GetUserUseCase } from "./GetUserUseCase.js";
4
+ import { GetUserGateway } from "./GetUserGateway.js";
5
+ const GetUserFeature = createFeature({
6
+ name: "Cognito/Users/GetUser",
7
+ register (container) {
8
+ container.register(external_GetUserUseCase_js_GetUserUseCase);
9
+ container.register(GetUserGateway).inSingletonScope();
10
+ },
11
+ resolve (container) {
12
+ return {
13
+ useCase: container.resolve(GetUserUseCase)
14
+ };
15
+ }
16
+ });
17
+ export { GetUserFeature };
18
+
19
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/getUser/feature.js","sources":["../../../../../src/admin/features/users/getUser/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { GetUserUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { GetUserUseCase } from \"./GetUserUseCase.js\";\nimport { GetUserGateway } from \"./GetUserGateway.js\";\n\nexport const GetUserFeature = createFeature({\n name: \"Cognito/Users/GetUser\",\n register(container) {\n container.register(GetUserUseCase);\n container.register(GetUserGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["GetUserFeature","createFeature","container","GetUserUseCase","GetUserGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,iBAAiBC,cAAc;IACxC,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,gBAAgB,gBAAgB;IACvD;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
@@ -0,0 +1,2 @@
1
+ export { GetUserUseCase } from "./abstractions/index.js";
2
+ export { GetUserFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { GetUserUseCase } from "./abstractions/index.js";
2
+ export { GetUserFeature } from "./feature.js";
@@ -0,0 +1,11 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { ListUsersGateway as GatewayAbstraction, type IListUsersGatewayResult } from "./abstractions/index.js";
3
+ declare class ListUsersGraphQLGateway implements GatewayAbstraction.Interface {
4
+ private readonly client;
5
+ constructor(client: MainGraphQLClient.Interface);
6
+ execute(): Promise<IListUsersGatewayResult[]>;
7
+ }
8
+ export declare const ListUsersGateway: typeof ListUsersGraphQLGateway & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/ListUsersGateway.js").IListUsersGateway>;
10
+ };
11
+ export {};
@@ -0,0 +1,39 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { ListUsersGateway } from "./abstractions/index.js";
3
+ const LIST_USERS = `
4
+ query ListUsers {
5
+ adminUsers {
6
+ users: listUsers {
7
+ data {
8
+ id
9
+ email
10
+ firstName
11
+ lastName
12
+ avatar
13
+ createdOn
14
+ external
15
+ }
16
+ }
17
+ }
18
+ }
19
+ `;
20
+ class ListUsersGraphQLGateway {
21
+ constructor(client){
22
+ this.client = client;
23
+ }
24
+ async execute() {
25
+ const response = await this.client.execute({
26
+ query: LIST_USERS
27
+ });
28
+ return response.adminUsers.users.data;
29
+ }
30
+ }
31
+ const ListUsersGateway_ListUsersGateway = ListUsersGateway.createImplementation({
32
+ implementation: ListUsersGraphQLGateway,
33
+ dependencies: [
34
+ MainGraphQLClient
35
+ ]
36
+ });
37
+ export { ListUsersGateway_ListUsersGateway as ListUsersGateway };
38
+
39
+ //# sourceMappingURL=ListUsersGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/listUsers/ListUsersGateway.js","sources":["../../../../../src/admin/features/users/listUsers/ListUsersGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n ListUsersGateway as GatewayAbstraction,\n type IListUsersGatewayResult\n} from \"./abstractions/index.js\";\n\nconst LIST_USERS = /* GraphQL */ `\n query ListUsers {\n adminUsers {\n users: listUsers {\n data {\n id\n email\n firstName\n lastName\n avatar\n createdOn\n external\n }\n }\n }\n }\n`;\n\ntype ListUsersResponse = {\n adminUsers: {\n users: {\n data: IListUsersGatewayResult[];\n };\n };\n};\n\nclass ListUsersGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(): Promise<IListUsersGatewayResult[]> {\n const response = await this.client.execute<ListUsersResponse>({\n query: LIST_USERS\n });\n\n return response.adminUsers.users.data;\n }\n}\n\nexport const ListUsersGateway = GatewayAbstraction.createImplementation({\n implementation: ListUsersGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["LIST_USERS","ListUsersGraphQLGateway","client","response","ListUsersGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAMA,MAAMA,aAA2B,CAAC;;;;;;;;;;;;;;;;AAgBlC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,UAA8C;QAChD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoB;YAC1D,OAAOH;QACX;QAEA,OAAOG,SAAS,UAAU,CAAC,KAAK,CAAC,IAAI;IACzC;AACJ;AAEO,MAAMC,oCAAmBC,iBAAAA,oBAAuC,CAAC;IACpE,gBAAgBJ;IAChB,cAAc;QAACK;KAAkB;AACrC"}
@@ -0,0 +1,10 @@
1
+ import { ListUsersGateway, ListUsersUseCase as UseCaseAbstraction, type IListUsersUseCaseResult } from "./abstractions/index.js";
2
+ declare class ListUsersUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private readonly gateway;
4
+ constructor(gateway: ListUsersGateway.Interface);
5
+ execute(): Promise<IListUsersUseCaseResult[]>;
6
+ }
7
+ export declare const ListUsersUseCase: typeof ListUsersUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/ListUsersUseCase.js").IListUsersUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ListUsersGateway, ListUsersUseCase } from "./abstractions/index.js";
2
+ class ListUsersUseCaseImpl {
3
+ constructor(gateway){
4
+ this.gateway = gateway;
5
+ }
6
+ async execute() {
7
+ return this.gateway.execute();
8
+ }
9
+ }
10
+ const ListUsersUseCase_ListUsersUseCase = ListUsersUseCase.createImplementation({
11
+ implementation: ListUsersUseCaseImpl,
12
+ dependencies: [
13
+ ListUsersGateway
14
+ ]
15
+ });
16
+ export { ListUsersUseCase_ListUsersUseCase as ListUsersUseCase };
17
+
18
+ //# sourceMappingURL=ListUsersUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/listUsers/ListUsersUseCase.js","sources":["../../../../../src/admin/features/users/listUsers/ListUsersUseCase.ts"],"sourcesContent":["import {\n ListUsersGateway,\n ListUsersUseCase as UseCaseAbstraction,\n type IListUsersUseCaseResult\n} from \"./abstractions/index.js\";\n\nclass ListUsersUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: ListUsersGateway.Interface) {}\n\n async execute(): Promise<IListUsersUseCaseResult[]> {\n return this.gateway.execute();\n }\n}\n\nexport const ListUsersUseCase = UseCaseAbstraction.createImplementation({\n implementation: ListUsersUseCaseImpl,\n dependencies: [ListUsersGateway]\n});\n"],"names":["ListUsersUseCaseImpl","gateway","ListUsersUseCase","UseCaseAbstraction","ListUsersGateway"],"mappings":";AAMA,MAAMA;IACF,YAA6BC,OAAmC,CAAE;aAArCA,OAAO,GAAPA;IAAsC;IAEnE,MAAM,UAA8C;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO;IAC/B;AACJ;AAEO,MAAMC,oCAAmBC,iBAAAA,oBAAuC,CAAC;IACpE,gBAAgBH;IAChB,cAAc;QAACI;KAAiB;AACpC"}
@@ -0,0 +1,17 @@
1
+ export interface IListUsersGatewayResult {
2
+ id: string;
3
+ email: string;
4
+ firstName: string;
5
+ lastName: string;
6
+ avatar: any;
7
+ createdOn: string;
8
+ external: boolean;
9
+ }
10
+ export interface IListUsersGateway {
11
+ execute(): Promise<IListUsersGatewayResult[]>;
12
+ }
13
+ export declare const ListUsersGateway: import("@webiny/di").Abstraction<IListUsersGateway>;
14
+ export declare namespace ListUsersGateway {
15
+ type Interface = IListUsersGateway;
16
+ type Result = IListUsersGatewayResult;
17
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const ListUsersGateway = createAbstraction("ListUsersGateway");
3
+ export { ListUsersGateway };
4
+
5
+ //# sourceMappingURL=ListUsersGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/listUsers/abstractions/ListUsersGateway.js","sources":["../../../../../../src/admin/features/users/listUsers/abstractions/ListUsersGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IListUsersGatewayResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: any;\n createdOn: string;\n external: boolean;\n}\n\nexport interface IListUsersGateway {\n execute(): Promise<IListUsersGatewayResult[]>;\n}\n\nexport const ListUsersGateway = createAbstraction<IListUsersGateway>(\"ListUsersGateway\");\n\nexport namespace ListUsersGateway {\n export type Interface = IListUsersGateway;\n export type Result = IListUsersGatewayResult;\n}\n"],"names":["ListUsersGateway","createAbstraction"],"mappings":";AAgBO,MAAMA,mBAAmBC,kBAAqC"}
@@ -0,0 +1,10 @@
1
+ import type { IListUsersGatewayResult } from "./ListUsersGateway.js";
2
+ export type IListUsersUseCaseResult = IListUsersGatewayResult;
3
+ export interface IListUsersUseCase {
4
+ execute(): Promise<IListUsersUseCaseResult[]>;
5
+ }
6
+ export declare const ListUsersUseCase: import("@webiny/di").Abstraction<IListUsersUseCase>;
7
+ export declare namespace ListUsersUseCase {
8
+ type Interface = IListUsersUseCase;
9
+ type Result = IListUsersUseCaseResult;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const ListUsersUseCase = createAbstraction("ListUsersUseCase");
3
+ export { ListUsersUseCase };
4
+
5
+ //# sourceMappingURL=ListUsersUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/listUsers/abstractions/ListUsersUseCase.js","sources":["../../../../../../src/admin/features/users/listUsers/abstractions/ListUsersUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IListUsersGatewayResult } from \"./ListUsersGateway.js\";\n\nexport type IListUsersUseCaseResult = IListUsersGatewayResult;\n\nexport interface IListUsersUseCase {\n execute(): Promise<IListUsersUseCaseResult[]>;\n}\n\nexport const ListUsersUseCase = createAbstraction<IListUsersUseCase>(\"ListUsersUseCase\");\n\nexport namespace ListUsersUseCase {\n export type Interface = IListUsersUseCase;\n export type Result = IListUsersUseCaseResult;\n}\n"],"names":["ListUsersUseCase","createAbstraction"],"mappings":";AASO,MAAMA,mBAAmBC,kBAAqC"}
@@ -0,0 +1,2 @@
1
+ export { ListUsersGateway, type IListUsersGateway, type IListUsersGatewayResult } from "./ListUsersGateway.js";
2
+ export { ListUsersUseCase, type IListUsersUseCase, type IListUsersUseCaseResult } from "./ListUsersUseCase.js";
@@ -0,0 +1,2 @@
1
+ export { ListUsersGateway } from "./ListUsersGateway.js";
2
+ export { ListUsersUseCase } from "./ListUsersUseCase.js";
@@ -0,0 +1,3 @@
1
+ export declare const ListUsersFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions/ListUsersUseCase.js").IListUsersUseCase;
3
+ }, []>;
@@ -0,0 +1,19 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { ListUsersUseCase } from "./abstractions/index.js";
3
+ import { ListUsersUseCase as external_ListUsersUseCase_js_ListUsersUseCase } from "./ListUsersUseCase.js";
4
+ import { ListUsersGateway } from "./ListUsersGateway.js";
5
+ const ListUsersFeature = createFeature({
6
+ name: "Cognito/Users/ListUsers",
7
+ register (container) {
8
+ container.register(external_ListUsersUseCase_js_ListUsersUseCase);
9
+ container.register(ListUsersGateway).inSingletonScope();
10
+ },
11
+ resolve (container) {
12
+ return {
13
+ useCase: container.resolve(ListUsersUseCase)
14
+ };
15
+ }
16
+ });
17
+ export { ListUsersFeature };
18
+
19
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/listUsers/feature.js","sources":["../../../../../src/admin/features/users/listUsers/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListUsersUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { ListUsersUseCase } from \"./ListUsersUseCase.js\";\nimport { ListUsersGateway } from \"./ListUsersGateway.js\";\n\nexport const ListUsersFeature = createFeature({\n name: \"Cognito/Users/ListUsers\",\n register(container) {\n container.register(ListUsersUseCase);\n container.register(ListUsersGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["ListUsersFeature","createFeature","container","ListUsersUseCase","ListUsersGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,mBAAmBC,cAAc;IAC1C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,kBAAkB,gBAAgB;IACzD;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
@@ -0,0 +1,2 @@
1
+ export { ListUsersUseCase } from "./abstractions/index.js";
2
+ export { ListUsersFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { ListUsersUseCase } from "./abstractions/index.js";
2
+ export { ListUsersFeature } from "./feature.js";
@@ -0,0 +1,11 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { UpdateUserGateway as GatewayAbstraction, type IUpdateUserGatewayParams, type IUpdateUserGatewayResult } from "./abstractions/index.js";
3
+ declare class UpdateUserGraphQLGateway implements GatewayAbstraction.Interface {
4
+ private readonly client;
5
+ constructor(client: MainGraphQLClient.Interface);
6
+ execute(params: IUpdateUserGatewayParams): Promise<IUpdateUserGatewayResult>;
7
+ }
8
+ export declare const UpdateUserGateway: typeof UpdateUserGraphQLGateway & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/UpdateUserGateway.js").IUpdateUserGateway>;
10
+ };
11
+ export {};
@@ -0,0 +1,59 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { UpdateUserGateway } from "./abstractions/index.js";
3
+ const UPDATE_USER = `
4
+ mutation UpdateUser($id: ID!, $data: AdminUsersUpdateInput!) {
5
+ adminUsers {
6
+ user: updateUser(id: $id, data: $data) {
7
+ data {
8
+ id
9
+ email
10
+ firstName
11
+ lastName
12
+ avatar
13
+ external
14
+ roles {
15
+ id
16
+ slug
17
+ name
18
+ }
19
+ teams {
20
+ id
21
+ slug
22
+ name
23
+ }
24
+ }
25
+ error {
26
+ code
27
+ message
28
+ data
29
+ }
30
+ }
31
+ }
32
+ }
33
+ `;
34
+ class UpdateUserGraphQLGateway {
35
+ constructor(client){
36
+ this.client = client;
37
+ }
38
+ async execute(params) {
39
+ const response = await this.client.execute({
40
+ query: UPDATE_USER,
41
+ variables: {
42
+ id: params.id,
43
+ data: params.data
44
+ }
45
+ });
46
+ const envelope = response.adminUsers.user;
47
+ if (envelope.error) throw new Error(envelope.error.message);
48
+ return envelope.data;
49
+ }
50
+ }
51
+ const UpdateUserGateway_UpdateUserGateway = UpdateUserGateway.createImplementation({
52
+ implementation: UpdateUserGraphQLGateway,
53
+ dependencies: [
54
+ MainGraphQLClient
55
+ ]
56
+ });
57
+ export { UpdateUserGateway_UpdateUserGateway as UpdateUserGateway };
58
+
59
+ //# sourceMappingURL=UpdateUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/updateUser/UpdateUserGateway.js","sources":["../../../../../src/admin/features/users/updateUser/UpdateUserGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n UpdateUserGateway as GatewayAbstraction,\n type IUpdateUserGatewayParams,\n type IUpdateUserGatewayResult\n} from \"./abstractions/index.js\";\n\nconst UPDATE_USER = /* GraphQL */ `\n mutation UpdateUser($id: ID!, $data: AdminUsersUpdateInput!) {\n adminUsers {\n user: updateUser(id: $id, data: $data) {\n data {\n id\n email\n firstName\n lastName\n avatar\n external\n roles {\n id\n slug\n name\n }\n teams {\n id\n slug\n name\n }\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\ntype UpdateUserResponse = {\n adminUsers: {\n user:\n | { data: IUpdateUserGatewayResult; error: null }\n | { data: null; error: { code: string; message: string; data: unknown } };\n };\n};\n\nclass UpdateUserGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(params: IUpdateUserGatewayParams): Promise<IUpdateUserGatewayResult> {\n const response = await this.client.execute<UpdateUserResponse>({\n query: UPDATE_USER,\n variables: { id: params.id, data: params.data }\n });\n\n const envelope = response.adminUsers.user;\n if (envelope.error) {\n throw new Error(envelope.error.message);\n }\n\n return envelope.data;\n }\n}\n\nexport const UpdateUserGateway = GatewayAbstraction.createImplementation({\n implementation: UpdateUserGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["UPDATE_USER","UpdateUserGraphQLGateway","client","params","response","envelope","Error","UpdateUserGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAOA,MAAMA,cAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BnC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,QAAQC,MAAgC,EAAqC;QAC/E,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC3D,OAAOJ;YACP,WAAW;gBAAE,IAAIG,OAAO,EAAE;gBAAE,MAAMA,OAAO,IAAI;YAAC;QAClD;QAEA,MAAME,WAAWD,SAAS,UAAU,CAAC,IAAI;QACzC,IAAIC,SAAS,KAAK,EACd,MAAM,IAAIC,MAAMD,SAAS,KAAK,CAAC,OAAO;QAG1C,OAAOA,SAAS,IAAI;IACxB;AACJ;AAEO,MAAME,sCAAoBC,kBAAAA,oBAAuC,CAAC;IACrE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
@@ -0,0 +1,10 @@
1
+ import { UpdateUserGateway, UpdateUserUseCase as UseCaseAbstraction, type IUpdateUserUseCaseParams, type IUpdateUserUseCaseResult } from "./abstractions/index.js";
2
+ declare class UpdateUserUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private readonly gateway;
4
+ constructor(gateway: UpdateUserGateway.Interface);
5
+ execute(params: IUpdateUserUseCaseParams): Promise<IUpdateUserUseCaseResult>;
6
+ }
7
+ export declare const UpdateUserUseCase: typeof UpdateUserUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/UpdateUserUseCase.js").IUpdateUserUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { UpdateUserGateway, UpdateUserUseCase } from "./abstractions/index.js";
2
+ class UpdateUserUseCaseImpl {
3
+ constructor(gateway){
4
+ this.gateway = gateway;
5
+ }
6
+ async execute(params) {
7
+ return this.gateway.execute(params);
8
+ }
9
+ }
10
+ const UpdateUserUseCase_UpdateUserUseCase = UpdateUserUseCase.createImplementation({
11
+ implementation: UpdateUserUseCaseImpl,
12
+ dependencies: [
13
+ UpdateUserGateway
14
+ ]
15
+ });
16
+ export { UpdateUserUseCase_UpdateUserUseCase as UpdateUserUseCase };
17
+
18
+ //# sourceMappingURL=UpdateUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/updateUser/UpdateUserUseCase.js","sources":["../../../../../src/admin/features/users/updateUser/UpdateUserUseCase.ts"],"sourcesContent":["import {\n UpdateUserGateway,\n UpdateUserUseCase as UseCaseAbstraction,\n type IUpdateUserUseCaseParams,\n type IUpdateUserUseCaseResult\n} from \"./abstractions/index.js\";\n\nclass UpdateUserUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: UpdateUserGateway.Interface) {}\n\n async execute(params: IUpdateUserUseCaseParams): Promise<IUpdateUserUseCaseResult> {\n return this.gateway.execute(params);\n }\n}\n\nexport const UpdateUserUseCase = UseCaseAbstraction.createImplementation({\n implementation: UpdateUserUseCaseImpl,\n dependencies: [UpdateUserGateway]\n});\n"],"names":["UpdateUserUseCaseImpl","gateway","params","UpdateUserUseCase","UseCaseAbstraction","UpdateUserGateway"],"mappings":";AAOA,MAAMA;IACF,YAA6BC,OAAoC,CAAE;aAAtCA,OAAO,GAAPA;IAAuC;IAEpE,MAAM,QAAQC,MAAgC,EAAqC;QAC/E,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAACA;IAChC;AACJ;AAEO,MAAMC,sCAAoBC,kBAAAA,oBAAuC,CAAC;IACrE,gBAAgBJ;IAChB,cAAc;QAACK;KAAkB;AACrC"}
@@ -0,0 +1,33 @@
1
+ export interface IUserRoleRef {
2
+ id: string;
3
+ slug: string;
4
+ name: string;
5
+ }
6
+ export interface IUserTeamRef {
7
+ id: string;
8
+ slug: string;
9
+ name: string;
10
+ }
11
+ export interface IUpdateUserGatewayResult {
12
+ id: string;
13
+ email: string;
14
+ firstName: string;
15
+ lastName: string;
16
+ avatar: any;
17
+ external: boolean;
18
+ roles: IUserRoleRef[];
19
+ teams: IUserTeamRef[];
20
+ }
21
+ export interface IUpdateUserGatewayParams {
22
+ id: string;
23
+ data: Record<string, any>;
24
+ }
25
+ export interface IUpdateUserGateway {
26
+ execute(params: IUpdateUserGatewayParams): Promise<IUpdateUserGatewayResult>;
27
+ }
28
+ export declare const UpdateUserGateway: import("@webiny/di").Abstraction<IUpdateUserGateway>;
29
+ export declare namespace UpdateUserGateway {
30
+ type Interface = IUpdateUserGateway;
31
+ type Params = IUpdateUserGatewayParams;
32
+ type Result = IUpdateUserGatewayResult;
33
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const UpdateUserGateway = createAbstraction("UpdateUserGateway");
3
+ export { UpdateUserGateway };
4
+
5
+ //# sourceMappingURL=UpdateUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/updateUser/abstractions/UpdateUserGateway.js","sources":["../../../../../../src/admin/features/users/updateUser/abstractions/UpdateUserGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IUserRoleRef {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IUserTeamRef {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IUpdateUserGatewayResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: any;\n external: boolean;\n roles: IUserRoleRef[];\n teams: IUserTeamRef[];\n}\n\nexport interface IUpdateUserGatewayParams {\n id: string;\n data: Record<string, any>;\n}\n\nexport interface IUpdateUserGateway {\n execute(params: IUpdateUserGatewayParams): Promise<IUpdateUserGatewayResult>;\n}\n\nexport const UpdateUserGateway = createAbstraction<IUpdateUserGateway>(\"UpdateUserGateway\");\n\nexport namespace UpdateUserGateway {\n export type Interface = IUpdateUserGateway;\n export type Params = IUpdateUserGatewayParams;\n export type Result = IUpdateUserGatewayResult;\n}\n"],"names":["UpdateUserGateway","createAbstraction"],"mappings":";AAkCO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,15 @@
1
+ import type { IUpdateUserGatewayResult } from "./UpdateUserGateway.js";
2
+ export type IUpdateUserUseCaseResult = IUpdateUserGatewayResult;
3
+ export interface IUpdateUserUseCaseParams {
4
+ id: string;
5
+ data: Record<string, any>;
6
+ }
7
+ export interface IUpdateUserUseCase {
8
+ execute(params: IUpdateUserUseCaseParams): Promise<IUpdateUserUseCaseResult>;
9
+ }
10
+ export declare const UpdateUserUseCase: import("@webiny/di").Abstraction<IUpdateUserUseCase>;
11
+ export declare namespace UpdateUserUseCase {
12
+ type Interface = IUpdateUserUseCase;
13
+ type Params = IUpdateUserUseCaseParams;
14
+ type Result = IUpdateUserUseCaseResult;
15
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const UpdateUserUseCase = createAbstraction("UpdateUserUseCase");
3
+ export { UpdateUserUseCase };
4
+
5
+ //# sourceMappingURL=UpdateUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/updateUser/abstractions/UpdateUserUseCase.js","sources":["../../../../../../src/admin/features/users/updateUser/abstractions/UpdateUserUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IUpdateUserGatewayResult } from \"./UpdateUserGateway.js\";\n\nexport type IUpdateUserUseCaseResult = IUpdateUserGatewayResult;\n\nexport interface IUpdateUserUseCaseParams {\n id: string;\n data: Record<string, any>;\n}\n\nexport interface IUpdateUserUseCase {\n execute(params: IUpdateUserUseCaseParams): Promise<IUpdateUserUseCaseResult>;\n}\n\nexport const UpdateUserUseCase = createAbstraction<IUpdateUserUseCase>(\"UpdateUserUseCase\");\n\nexport namespace UpdateUserUseCase {\n export type Interface = IUpdateUserUseCase;\n export type Params = IUpdateUserUseCaseParams;\n export type Result = IUpdateUserUseCaseResult;\n}\n"],"names":["UpdateUserUseCase","createAbstraction"],"mappings":";AAcO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,2 @@
1
+ export { UpdateUserGateway, type IUpdateUserGateway, type IUpdateUserGatewayParams, type IUpdateUserGatewayResult } from "./UpdateUserGateway.js";
2
+ export { UpdateUserUseCase, type IUpdateUserUseCase, type IUpdateUserUseCaseParams, type IUpdateUserUseCaseResult } from "./UpdateUserUseCase.js";
@@ -0,0 +1,2 @@
1
+ export { UpdateUserGateway } from "./UpdateUserGateway.js";
2
+ export { UpdateUserUseCase } from "./UpdateUserUseCase.js";
@@ -0,0 +1,3 @@
1
+ export declare const UpdateUserFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions/UpdateUserUseCase.js").IUpdateUserUseCase;
3
+ }, []>;
@@ -0,0 +1,19 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { UpdateUserUseCase } from "./abstractions/index.js";
3
+ import { UpdateUserUseCase as external_UpdateUserUseCase_js_UpdateUserUseCase } from "./UpdateUserUseCase.js";
4
+ import { UpdateUserGateway } from "./UpdateUserGateway.js";
5
+ const UpdateUserFeature = createFeature({
6
+ name: "Cognito/Users/UpdateUser",
7
+ register (container) {
8
+ container.register(external_UpdateUserUseCase_js_UpdateUserUseCase);
9
+ container.register(UpdateUserGateway).inSingletonScope();
10
+ },
11
+ resolve (container) {
12
+ return {
13
+ useCase: container.resolve(UpdateUserUseCase)
14
+ };
15
+ }
16
+ });
17
+ export { UpdateUserFeature };
18
+
19
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/updateUser/feature.js","sources":["../../../../../src/admin/features/users/updateUser/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { UpdateUserUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { UpdateUserUseCase } from \"./UpdateUserUseCase.js\";\nimport { UpdateUserGateway } from \"./UpdateUserGateway.js\";\n\nexport const UpdateUserFeature = createFeature({\n name: \"Cognito/Users/UpdateUser\",\n register(container) {\n container.register(UpdateUserUseCase);\n container.register(UpdateUserGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["UpdateUserFeature","createFeature","container","UpdateUserUseCase","UpdateUserGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,oBAAoBC,cAAc;IAC3C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,mBAAmB,gBAAgB;IAC1D;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
@@ -0,0 +1,2 @@
1
+ export { UpdateUserUseCase } from "./abstractions/index.js";
2
+ export { UpdateUserFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { UpdateUserUseCase } from "./abstractions/index.js";
2
+ export { UpdateUserFeature } from "./feature.js";
@@ -8,8 +8,6 @@ import { RequireNewPassword } from "./components/RequireNewPassword.js";
8
8
  import { RequestPasswordResetCode } from "./components/RequestPasswordResetCode.js";
9
9
  import { SetNewPassword } from "./components/SetNewPassword.js";
10
10
  import { PasswordResetCodeSent } from "./components/PasswordResetCodeSent.js";
11
- import { ConfirmTotpCode } from "./components/ConfirmTotpCode.js";
12
- import { SetupTotp } from "./components/SetupTotp.js";
13
11
  const CognitoLoginScreen = observer((props)=>{
14
12
  const { presenter } = useFeature(CognitoFeature);
15
13
  useEffect(()=>{
@@ -42,13 +40,6 @@ const CognitoLoginScreen = observer((props)=>{
42
40
  vm: vm.setNewPassword,
43
41
  onSetNewPassword: (code, password)=>presenter.confirmPasswordReset(code, password),
44
42
  onCancel: ()=>presenter.showSignIn()
45
- }), "confirmTotpCode" === vm.authState && /*#__PURE__*/ react.createElement(ConfirmTotpCode, {
46
- vm: vm.confirmTotpCode,
47
- onSubmit: (code)=>presenter.confirmTotpCode(code),
48
- onCancel: ()=>presenter.showSignIn()
49
- }), "setupTotp" === vm.authState && /*#__PURE__*/ react.createElement(SetupTotp, {
50
- vm: vm.setupTotp,
51
- onSubmit: (code)=>presenter.verifyTotpSetup(code)
52
43
  }), ("signIn" === vm.authState || "signedOut" === vm.authState) && /*#__PURE__*/ react.createElement(SignIn, {
53
44
  vm: vm.signIn,
54
45
  onSubmit: (username, password)=>presenter.signIn(username, password),