@webiny/cognito 6.4.11 → 6.6.0-alpha.1

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 (164) hide show
  1. package/Cognito.d.ts +4 -4
  2. package/admin/Cognito.d.ts +3 -1
  3. package/admin/Cognito.js +8 -2
  4. package/admin/Cognito.js.map +1 -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.d.ts +2 -2
  142. package/admin/presentation/Cognito/components/View.d.ts +1 -1
  143. package/admin/presentation/Cognito/components/index.d.ts +1 -1
  144. package/admin/ui/views/Account/Account.js +42 -34
  145. package/admin/ui/views/Account/Account.js.map +1 -1
  146. package/admin/ui/views/Users/UsersDataList.js +44 -26
  147. package/admin/ui/views/Users/UsersDataList.js.map +1 -1
  148. package/admin/ui/views/Users/UsersForm.js +1 -1
  149. package/admin/ui/views/Users/UsersForm.js.map +1 -1
  150. package/admin/ui/views/Users/UsersView.js +3 -3
  151. package/admin/ui/views/Users/UsersView.js.map +1 -1
  152. package/admin/ui/views/Users/hooks/useUserForm.d.ts +2 -2
  153. package/admin/ui/views/Users/hooks/useUserForm.js +60 -78
  154. package/admin/ui/views/Users/hooks/useUserForm.js.map +1 -1
  155. package/api/graphql/user.gql.d.ts +2 -2
  156. package/api/graphql/user.gql.js +2 -2
  157. package/api/graphql/user.gql.js.map +1 -1
  158. package/package.json +21 -24
  159. package/admin/ui/views/Account/graphql.d.ts +0 -2
  160. package/admin/ui/views/Account/graphql.js +0 -41
  161. package/admin/ui/views/Account/graphql.js.map +0 -1
  162. package/admin/ui/views/Users/graphql.d.ts +0 -5
  163. package/admin/ui/views/Users/graphql.js +0 -98
  164. package/admin/ui/views/Users/graphql.js.map +0 -1
@@ -0,0 +1,49 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { CreateUserGateway } from "./abstractions/index.js";
3
+ const CREATE_USER = `
4
+ mutation CreateUser($data: AdminUsersCreateInput!) {
5
+ adminUsers {
6
+ user: createUser(data: $data) {
7
+ data {
8
+ id
9
+ email
10
+ firstName
11
+ lastName
12
+ avatar
13
+ createdOn
14
+ external
15
+ }
16
+ error {
17
+ code
18
+ message
19
+ data
20
+ }
21
+ }
22
+ }
23
+ }
24
+ `;
25
+ class CreateUserGraphQLGateway {
26
+ constructor(client){
27
+ this.client = client;
28
+ }
29
+ async execute(params) {
30
+ const response = await this.client.execute({
31
+ query: CREATE_USER,
32
+ variables: {
33
+ data: params.data
34
+ }
35
+ });
36
+ const envelope = response.adminUsers.user;
37
+ if (envelope.error) throw new Error(envelope.error.message);
38
+ return envelope.data;
39
+ }
40
+ }
41
+ const CreateUserGateway_CreateUserGateway = CreateUserGateway.createImplementation({
42
+ implementation: CreateUserGraphQLGateway,
43
+ dependencies: [
44
+ MainGraphQLClient
45
+ ]
46
+ });
47
+ export { CreateUserGateway_CreateUserGateway as CreateUserGateway };
48
+
49
+ //# sourceMappingURL=CreateUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/createUser/CreateUserGateway.js","sources":["../../../../../src/admin/features/users/createUser/CreateUserGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n CreateUserGateway as GatewayAbstraction,\n type ICreateUserGatewayParams,\n type ICreateUserGatewayResult\n} from \"./abstractions/index.js\";\n\nconst CREATE_USER = /* GraphQL */ `\n mutation CreateUser($data: AdminUsersCreateInput!) {\n adminUsers {\n user: createUser(data: $data) {\n data {\n id\n email\n firstName\n lastName\n avatar\n createdOn\n external\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\ntype CreateUserResponse = {\n adminUsers: {\n user:\n | { data: ICreateUserGatewayResult; error: null }\n | { data: null; error: { code: string; message: string; data: unknown } };\n };\n};\n\nclass CreateUserGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(params: ICreateUserGatewayParams): Promise<ICreateUserGatewayResult> {\n const response = await this.client.execute<CreateUserResponse>({\n query: CREATE_USER,\n variables: { 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 CreateUserGateway = GatewayAbstraction.createImplementation({\n implementation: CreateUserGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["CREATE_USER","CreateUserGraphQLGateway","client","params","response","envelope","Error","CreateUserGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAOA,MAAMA,cAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;AAqBnC,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,MAAMG,OAAO,IAAI;YAAC;QACnC;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 { CreateUserGateway, CreateUserUseCase as UseCaseAbstraction, type ICreateUserUseCaseParams, type ICreateUserUseCaseResult } from "./abstractions/index.js";
2
+ declare class CreateUserUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private readonly gateway;
4
+ constructor(gateway: CreateUserGateway.Interface);
5
+ execute(params: ICreateUserUseCaseParams): Promise<ICreateUserUseCaseResult>;
6
+ }
7
+ export declare const CreateUserUseCase: typeof CreateUserUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/CreateUserUseCase.js").ICreateUserUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CreateUserGateway, CreateUserUseCase } from "./abstractions/index.js";
2
+ class CreateUserUseCaseImpl {
3
+ constructor(gateway){
4
+ this.gateway = gateway;
5
+ }
6
+ async execute(params) {
7
+ return this.gateway.execute(params);
8
+ }
9
+ }
10
+ const CreateUserUseCase_CreateUserUseCase = CreateUserUseCase.createImplementation({
11
+ implementation: CreateUserUseCaseImpl,
12
+ dependencies: [
13
+ CreateUserGateway
14
+ ]
15
+ });
16
+ export { CreateUserUseCase_CreateUserUseCase as CreateUserUseCase };
17
+
18
+ //# sourceMappingURL=CreateUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/createUser/CreateUserUseCase.js","sources":["../../../../../src/admin/features/users/createUser/CreateUserUseCase.ts"],"sourcesContent":["import {\n CreateUserGateway,\n CreateUserUseCase as UseCaseAbstraction,\n type ICreateUserUseCaseParams,\n type ICreateUserUseCaseResult\n} from \"./abstractions/index.js\";\n\nclass CreateUserUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: CreateUserGateway.Interface) {}\n\n async execute(params: ICreateUserUseCaseParams): Promise<ICreateUserUseCaseResult> {\n return this.gateway.execute(params);\n }\n}\n\nexport const CreateUserUseCase = UseCaseAbstraction.createImplementation({\n implementation: CreateUserUseCaseImpl,\n dependencies: [CreateUserGateway]\n});\n"],"names":["CreateUserUseCaseImpl","gateway","params","CreateUserUseCase","UseCaseAbstraction","CreateUserGateway"],"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,21 @@
1
+ export interface ICreateUserGatewayResult {
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 ICreateUserGatewayParams {
11
+ data: Record<string, any>;
12
+ }
13
+ export interface ICreateUserGateway {
14
+ execute(params: ICreateUserGatewayParams): Promise<ICreateUserGatewayResult>;
15
+ }
16
+ export declare const CreateUserGateway: import("@webiny/di").Abstraction<ICreateUserGateway>;
17
+ export declare namespace CreateUserGateway {
18
+ type Interface = ICreateUserGateway;
19
+ type Params = ICreateUserGatewayParams;
20
+ type Result = ICreateUserGatewayResult;
21
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const CreateUserGateway = createAbstraction("CreateUserGateway");
3
+ export { CreateUserGateway };
4
+
5
+ //# sourceMappingURL=CreateUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/createUser/abstractions/CreateUserGateway.js","sources":["../../../../../../src/admin/features/users/createUser/abstractions/CreateUserGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface ICreateUserGatewayResult {\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 ICreateUserGatewayParams {\n data: Record<string, any>;\n}\n\nexport interface ICreateUserGateway {\n execute(params: ICreateUserGatewayParams): Promise<ICreateUserGatewayResult>;\n}\n\nexport const CreateUserGateway = createAbstraction<ICreateUserGateway>(\"CreateUserGateway\");\n\nexport namespace CreateUserGateway {\n export type Interface = ICreateUserGateway;\n export type Params = ICreateUserGatewayParams;\n export type Result = ICreateUserGatewayResult;\n}\n"],"names":["CreateUserGateway","createAbstraction"],"mappings":";AAoBO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,14 @@
1
+ import type { ICreateUserGatewayResult } from "./CreateUserGateway.js";
2
+ export type ICreateUserUseCaseResult = ICreateUserGatewayResult;
3
+ export interface ICreateUserUseCaseParams {
4
+ data: Record<string, any>;
5
+ }
6
+ export interface ICreateUserUseCase {
7
+ execute(params: ICreateUserUseCaseParams): Promise<ICreateUserUseCaseResult>;
8
+ }
9
+ export declare const CreateUserUseCase: import("@webiny/di").Abstraction<ICreateUserUseCase>;
10
+ export declare namespace CreateUserUseCase {
11
+ type Interface = ICreateUserUseCase;
12
+ type Params = ICreateUserUseCaseParams;
13
+ type Result = ICreateUserUseCaseResult;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const CreateUserUseCase = createAbstraction("CreateUserUseCase");
3
+ export { CreateUserUseCase };
4
+
5
+ //# sourceMappingURL=CreateUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/createUser/abstractions/CreateUserUseCase.js","sources":["../../../../../../src/admin/features/users/createUser/abstractions/CreateUserUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { ICreateUserGatewayResult } from \"./CreateUserGateway.js\";\n\nexport type ICreateUserUseCaseResult = ICreateUserGatewayResult;\n\nexport interface ICreateUserUseCaseParams {\n data: Record<string, any>;\n}\n\nexport interface ICreateUserUseCase {\n execute(params: ICreateUserUseCaseParams): Promise<ICreateUserUseCaseResult>;\n}\n\nexport const CreateUserUseCase = createAbstraction<ICreateUserUseCase>(\"CreateUserUseCase\");\n\nexport namespace CreateUserUseCase {\n export type Interface = ICreateUserUseCase;\n export type Params = ICreateUserUseCaseParams;\n export type Result = ICreateUserUseCaseResult;\n}\n"],"names":["CreateUserUseCase","createAbstraction"],"mappings":";AAaO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,2 @@
1
+ export { CreateUserGateway, type ICreateUserGateway, type ICreateUserGatewayParams, type ICreateUserGatewayResult } from "./CreateUserGateway.js";
2
+ export { CreateUserUseCase, type ICreateUserUseCase, type ICreateUserUseCaseParams, type ICreateUserUseCaseResult } from "./CreateUserUseCase.js";
@@ -0,0 +1,2 @@
1
+ export { CreateUserGateway } from "./CreateUserGateway.js";
2
+ export { CreateUserUseCase } from "./CreateUserUseCase.js";
@@ -0,0 +1,3 @@
1
+ export declare const CreateUserFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions/CreateUserUseCase.js").ICreateUserUseCase;
3
+ }, []>;
@@ -0,0 +1,19 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { CreateUserUseCase } from "./abstractions/index.js";
3
+ import { CreateUserUseCase as external_CreateUserUseCase_js_CreateUserUseCase } from "./CreateUserUseCase.js";
4
+ import { CreateUserGateway } from "./CreateUserGateway.js";
5
+ const CreateUserFeature = createFeature({
6
+ name: "Cognito/Users/CreateUser",
7
+ register (container) {
8
+ container.register(external_CreateUserUseCase_js_CreateUserUseCase);
9
+ container.register(CreateUserGateway).inSingletonScope();
10
+ },
11
+ resolve (container) {
12
+ return {
13
+ useCase: container.resolve(CreateUserUseCase)
14
+ };
15
+ }
16
+ });
17
+ export { CreateUserFeature };
18
+
19
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/createUser/feature.js","sources":["../../../../../src/admin/features/users/createUser/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { CreateUserUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { CreateUserUseCase } from \"./CreateUserUseCase.js\";\nimport { CreateUserGateway } from \"./CreateUserGateway.js\";\n\nexport const CreateUserFeature = createFeature({\n name: \"Cognito/Users/CreateUser\",\n register(container) {\n container.register(CreateUserUseCase);\n container.register(CreateUserGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["CreateUserFeature","createFeature","container","CreateUserUseCase","CreateUserGateway","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 { CreateUserUseCase } from "./abstractions/index.js";
2
+ export { CreateUserFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { CreateUserUseCase } from "./abstractions/index.js";
2
+ export { CreateUserFeature } from "./feature.js";
@@ -0,0 +1,11 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { DeleteUserGateway as GatewayAbstraction, type IDeleteUserGatewayParams } from "./abstractions/index.js";
3
+ declare class DeleteUserGraphQLGateway implements GatewayAbstraction.Interface {
4
+ private readonly client;
5
+ constructor(client: MainGraphQLClient.Interface);
6
+ execute(params: IDeleteUserGatewayParams): Promise<boolean>;
7
+ }
8
+ export declare const DeleteUserGateway: typeof DeleteUserGraphQLGateway & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/DeleteUserGateway.js").IDeleteUserGateway>;
10
+ };
11
+ export {};
@@ -0,0 +1,40 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { DeleteUserGateway } from "./abstractions/index.js";
3
+ const DELETE_USER = `
4
+ mutation DeleteUser($id: ID!) {
5
+ adminUsers {
6
+ deleteUser(id: $id) {
7
+ data
8
+ error {
9
+ code
10
+ message
11
+ }
12
+ }
13
+ }
14
+ }
15
+ `;
16
+ class DeleteUserGraphQLGateway {
17
+ constructor(client){
18
+ this.client = client;
19
+ }
20
+ async execute(params) {
21
+ const response = await this.client.execute({
22
+ query: DELETE_USER,
23
+ variables: {
24
+ id: params.id
25
+ }
26
+ });
27
+ const envelope = response.adminUsers.deleteUser;
28
+ if (envelope.error) throw new Error(envelope.error.message);
29
+ return envelope.data;
30
+ }
31
+ }
32
+ const DeleteUserGateway_DeleteUserGateway = DeleteUserGateway.createImplementation({
33
+ implementation: DeleteUserGraphQLGateway,
34
+ dependencies: [
35
+ MainGraphQLClient
36
+ ]
37
+ });
38
+ export { DeleteUserGateway_DeleteUserGateway as DeleteUserGateway };
39
+
40
+ //# sourceMappingURL=DeleteUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/deleteUser/DeleteUserGateway.js","sources":["../../../../../src/admin/features/users/deleteUser/DeleteUserGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n DeleteUserGateway as GatewayAbstraction,\n type IDeleteUserGatewayParams\n} from \"./abstractions/index.js\";\n\nconst DELETE_USER = /* GraphQL */ `\n mutation DeleteUser($id: ID!) {\n adminUsers {\n deleteUser(id: $id) {\n data\n error {\n code\n message\n }\n }\n }\n }\n`;\n\ntype DeleteUserResponse = {\n adminUsers: {\n deleteUser:\n | { data: boolean; error: null }\n | { data: null; error: { code: string; message: string } };\n };\n};\n\nclass DeleteUserGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(params: IDeleteUserGatewayParams): Promise<boolean> {\n const response = await this.client.execute<DeleteUserResponse>({\n query: DELETE_USER,\n variables: { id: params.id }\n });\n\n const envelope = response.adminUsers.deleteUser;\n if (envelope.error) {\n throw new Error(envelope.error.message);\n }\n\n return envelope.data;\n }\n}\n\nexport const DeleteUserGateway = GatewayAbstraction.createImplementation({\n implementation: DeleteUserGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["DELETE_USER","DeleteUserGraphQLGateway","client","params","response","envelope","Error","DeleteUserGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAMA,MAAMA,cAA4B,CAAC;;;;;;;;;;;;AAYnC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,QAAQC,MAAgC,EAAoB;QAC9D,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC3D,OAAOJ;YACP,WAAW;gBAAE,IAAIG,OAAO,EAAE;YAAC;QAC/B;QAEA,MAAME,WAAWD,SAAS,UAAU,CAAC,UAAU;QAC/C,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 { DeleteUserGateway, DeleteUserUseCase as UseCaseAbstraction, type IDeleteUserUseCaseParams } from "./abstractions/index.js";
2
+ declare class DeleteUserUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private readonly gateway;
4
+ constructor(gateway: DeleteUserGateway.Interface);
5
+ execute(params: IDeleteUserUseCaseParams): Promise<boolean>;
6
+ }
7
+ export declare const DeleteUserUseCase: typeof DeleteUserUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/DeleteUserUseCase.js").IDeleteUserUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { DeleteUserGateway, DeleteUserUseCase } from "./abstractions/index.js";
2
+ class DeleteUserUseCaseImpl {
3
+ constructor(gateway){
4
+ this.gateway = gateway;
5
+ }
6
+ async execute(params) {
7
+ return this.gateway.execute(params);
8
+ }
9
+ }
10
+ const DeleteUserUseCase_DeleteUserUseCase = DeleteUserUseCase.createImplementation({
11
+ implementation: DeleteUserUseCaseImpl,
12
+ dependencies: [
13
+ DeleteUserGateway
14
+ ]
15
+ });
16
+ export { DeleteUserUseCase_DeleteUserUseCase as DeleteUserUseCase };
17
+
18
+ //# sourceMappingURL=DeleteUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/deleteUser/DeleteUserUseCase.js","sources":["../../../../../src/admin/features/users/deleteUser/DeleteUserUseCase.ts"],"sourcesContent":["import {\n DeleteUserGateway,\n DeleteUserUseCase as UseCaseAbstraction,\n type IDeleteUserUseCaseParams\n} from \"./abstractions/index.js\";\n\nclass DeleteUserUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: DeleteUserGateway.Interface) {}\n\n async execute(params: IDeleteUserUseCaseParams): Promise<boolean> {\n return this.gateway.execute(params);\n }\n}\n\nexport const DeleteUserUseCase = UseCaseAbstraction.createImplementation({\n implementation: DeleteUserUseCaseImpl,\n dependencies: [DeleteUserGateway]\n});\n"],"names":["DeleteUserUseCaseImpl","gateway","params","DeleteUserUseCase","UseCaseAbstraction","DeleteUserGateway"],"mappings":";AAMA,MAAMA;IACF,YAA6BC,OAAoC,CAAE;aAAtCA,OAAO,GAAPA;IAAuC;IAEpE,MAAM,QAAQC,MAAgC,EAAoB;QAC9D,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,11 @@
1
+ export interface IDeleteUserGatewayParams {
2
+ id: string;
3
+ }
4
+ export interface IDeleteUserGateway {
5
+ execute(params: IDeleteUserGatewayParams): Promise<boolean>;
6
+ }
7
+ export declare const DeleteUserGateway: import("@webiny/di").Abstraction<IDeleteUserGateway>;
8
+ export declare namespace DeleteUserGateway {
9
+ type Interface = IDeleteUserGateway;
10
+ type Params = IDeleteUserGatewayParams;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const DeleteUserGateway = createAbstraction("DeleteUserGateway");
3
+ export { DeleteUserGateway };
4
+
5
+ //# sourceMappingURL=DeleteUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/deleteUser/abstractions/DeleteUserGateway.js","sources":["../../../../../../src/admin/features/users/deleteUser/abstractions/DeleteUserGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IDeleteUserGatewayParams {\n id: string;\n}\n\nexport interface IDeleteUserGateway {\n execute(params: IDeleteUserGatewayParams): Promise<boolean>;\n}\n\nexport const DeleteUserGateway = createAbstraction<IDeleteUserGateway>(\"DeleteUserGateway\");\n\nexport namespace DeleteUserGateway {\n export type Interface = IDeleteUserGateway;\n export type Params = IDeleteUserGatewayParams;\n}\n"],"names":["DeleteUserGateway","createAbstraction"],"mappings":";AAUO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,11 @@
1
+ export interface IDeleteUserUseCaseParams {
2
+ id: string;
3
+ }
4
+ export interface IDeleteUserUseCase {
5
+ execute(params: IDeleteUserUseCaseParams): Promise<boolean>;
6
+ }
7
+ export declare const DeleteUserUseCase: import("@webiny/di").Abstraction<IDeleteUserUseCase>;
8
+ export declare namespace DeleteUserUseCase {
9
+ type Interface = IDeleteUserUseCase;
10
+ type Params = IDeleteUserUseCaseParams;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const DeleteUserUseCase = createAbstraction("DeleteUserUseCase");
3
+ export { DeleteUserUseCase };
4
+
5
+ //# sourceMappingURL=DeleteUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/deleteUser/abstractions/DeleteUserUseCase.js","sources":["../../../../../../src/admin/features/users/deleteUser/abstractions/DeleteUserUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IDeleteUserUseCaseParams {\n id: string;\n}\n\nexport interface IDeleteUserUseCase {\n execute(params: IDeleteUserUseCaseParams): Promise<boolean>;\n}\n\nexport const DeleteUserUseCase = createAbstraction<IDeleteUserUseCase>(\"DeleteUserUseCase\");\n\nexport namespace DeleteUserUseCase {\n export type Interface = IDeleteUserUseCase;\n export type Params = IDeleteUserUseCaseParams;\n}\n"],"names":["DeleteUserUseCase","createAbstraction"],"mappings":";AAUO,MAAMA,oBAAoBC,kBAAsC"}
@@ -0,0 +1,2 @@
1
+ export { DeleteUserGateway, type IDeleteUserGateway, type IDeleteUserGatewayParams } from "./DeleteUserGateway.js";
2
+ export { DeleteUserUseCase, type IDeleteUserUseCase, type IDeleteUserUseCaseParams } from "./DeleteUserUseCase.js";
@@ -0,0 +1,2 @@
1
+ export { DeleteUserGateway } from "./DeleteUserGateway.js";
2
+ export { DeleteUserUseCase } from "./DeleteUserUseCase.js";
@@ -0,0 +1,3 @@
1
+ export declare const DeleteUserFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions/DeleteUserUseCase.js").IDeleteUserUseCase;
3
+ }, []>;
@@ -0,0 +1,19 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { DeleteUserUseCase } from "./abstractions/index.js";
3
+ import { DeleteUserUseCase as external_DeleteUserUseCase_js_DeleteUserUseCase } from "./DeleteUserUseCase.js";
4
+ import { DeleteUserGateway } from "./DeleteUserGateway.js";
5
+ const DeleteUserFeature = createFeature({
6
+ name: "Cognito/Users/DeleteUser",
7
+ register (container) {
8
+ container.register(external_DeleteUserUseCase_js_DeleteUserUseCase);
9
+ container.register(DeleteUserGateway).inSingletonScope();
10
+ },
11
+ resolve (container) {
12
+ return {
13
+ useCase: container.resolve(DeleteUserUseCase)
14
+ };
15
+ }
16
+ });
17
+ export { DeleteUserFeature };
18
+
19
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/deleteUser/feature.js","sources":["../../../../../src/admin/features/users/deleteUser/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { DeleteUserUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { DeleteUserUseCase } from \"./DeleteUserUseCase.js\";\nimport { DeleteUserGateway } from \"./DeleteUserGateway.js\";\n\nexport const DeleteUserFeature = createFeature({\n name: \"Cognito/Users/DeleteUser\",\n register(container) {\n container.register(DeleteUserUseCase);\n container.register(DeleteUserGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["DeleteUserFeature","createFeature","container","DeleteUserUseCase","DeleteUserGateway","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 { DeleteUserUseCase } from "./abstractions/index.js";
2
+ export { DeleteUserFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { DeleteUserUseCase } from "./abstractions/index.js";
2
+ export { DeleteUserFeature } from "./feature.js";
@@ -0,0 +1,11 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { GetUserGateway as GatewayAbstraction, type IGetUserGatewayParams, type IGetUserGatewayResult } from "./abstractions/index.js";
3
+ declare class GetUserGraphQLGateway implements GatewayAbstraction.Interface {
4
+ private readonly client;
5
+ constructor(client: MainGraphQLClient.Interface);
6
+ execute(params: IGetUserGatewayParams): Promise<IGetUserGatewayResult>;
7
+ }
8
+ export declare const GetUserGateway: typeof GetUserGraphQLGateway & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/GetUserGateway.js").IGetUserGateway>;
10
+ };
11
+ export {};
@@ -0,0 +1,57 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { GetUserGateway } from "./abstractions/index.js";
3
+ const GET_USER = `
4
+ query GetUser($id: ID!) {
5
+ adminUsers {
6
+ user: getUser(where: { id: $id }) {
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
+ }
29
+ }
30
+ }
31
+ }
32
+ `;
33
+ class GetUserGraphQLGateway {
34
+ constructor(client){
35
+ this.client = client;
36
+ }
37
+ async execute(params) {
38
+ const response = await this.client.execute({
39
+ query: GET_USER,
40
+ variables: {
41
+ id: params.id
42
+ }
43
+ });
44
+ const envelope = response.adminUsers.user;
45
+ if (envelope.error) throw new Error(envelope.error.message);
46
+ return envelope.data;
47
+ }
48
+ }
49
+ const GetUserGateway_GetUserGateway = GetUserGateway.createImplementation({
50
+ implementation: GetUserGraphQLGateway,
51
+ dependencies: [
52
+ MainGraphQLClient
53
+ ]
54
+ });
55
+ export { GetUserGateway_GetUserGateway as GetUserGateway };
56
+
57
+ //# sourceMappingURL=GetUserGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/getUser/GetUserGateway.js","sources":["../../../../../src/admin/features/users/getUser/GetUserGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport {\n GetUserGateway as GatewayAbstraction,\n type IGetUserGatewayParams,\n type IGetUserGatewayResult\n} from \"./abstractions/index.js\";\n\nconst GET_USER = /* GraphQL */ `\n query GetUser($id: ID!) {\n adminUsers {\n user: getUser(where: { id: $id }) {\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 }\n }\n }\n }\n`;\n\ntype GetUserResponse = {\n adminUsers: {\n user:\n | { data: IGetUserGatewayResult; error: null }\n | { data: null; error: { code: string; message: string } };\n };\n};\n\nclass GetUserGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(params: IGetUserGatewayParams): Promise<IGetUserGatewayResult> {\n const response = await this.client.execute<GetUserResponse>({\n query: GET_USER,\n variables: { id: params.id }\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 GetUserGateway = GatewayAbstraction.createImplementation({\n implementation: GetUserGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_USER","GetUserGraphQLGateway","client","params","response","envelope","Error","GetUserGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAOA,MAAMA,WAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BhC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,QAAQC,MAA6B,EAAkC;QACzE,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAkB;YACxD,OAAOJ;YACP,WAAW;gBAAE,IAAIG,OAAO,EAAE;YAAC;QAC/B;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,gCAAiBC,eAAAA,oBAAuC,CAAC;IAClE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
@@ -0,0 +1,10 @@
1
+ import { GetUserGateway, GetUserUseCase as UseCaseAbstraction, type IGetUserUseCaseParams, type IGetUserUseCaseResult } from "./abstractions/index.js";
2
+ declare class GetUserUseCaseImpl implements UseCaseAbstraction.Interface {
3
+ private readonly gateway;
4
+ constructor(gateway: GetUserGateway.Interface);
5
+ execute(params: IGetUserUseCaseParams): Promise<IGetUserUseCaseResult>;
6
+ }
7
+ export declare const GetUserUseCase: typeof GetUserUseCaseImpl & {
8
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/GetUserUseCase.js").IGetUserUseCase>;
9
+ };
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { GetUserGateway, GetUserUseCase } from "./abstractions/index.js";
2
+ class GetUserUseCaseImpl {
3
+ constructor(gateway){
4
+ this.gateway = gateway;
5
+ }
6
+ async execute(params) {
7
+ return this.gateway.execute(params);
8
+ }
9
+ }
10
+ const GetUserUseCase_GetUserUseCase = GetUserUseCase.createImplementation({
11
+ implementation: GetUserUseCaseImpl,
12
+ dependencies: [
13
+ GetUserGateway
14
+ ]
15
+ });
16
+ export { GetUserUseCase_GetUserUseCase as GetUserUseCase };
17
+
18
+ //# sourceMappingURL=GetUserUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin/features/users/getUser/GetUserUseCase.js","sources":["../../../../../src/admin/features/users/getUser/GetUserUseCase.ts"],"sourcesContent":["import {\n GetUserGateway,\n GetUserUseCase as UseCaseAbstraction,\n type IGetUserUseCaseParams,\n type IGetUserUseCaseResult\n} from \"./abstractions/index.js\";\n\nclass GetUserUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: GetUserGateway.Interface) {}\n\n async execute(params: IGetUserUseCaseParams): Promise<IGetUserUseCaseResult> {\n return this.gateway.execute(params);\n }\n}\n\nexport const GetUserUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetUserUseCaseImpl,\n dependencies: [GetUserGateway]\n});\n"],"names":["GetUserUseCaseImpl","gateway","params","GetUserUseCase","UseCaseAbstraction","GetUserGateway"],"mappings":";AAOA,MAAMA;IACF,YAA6BC,OAAiC,CAAE;aAAnCA,OAAO,GAAPA;IAAoC;IAEjE,MAAM,QAAQC,MAA6B,EAAkC;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAACA;IAChC;AACJ;AAEO,MAAMC,gCAAiBC,eAAAA,oBAAuC,CAAC;IAClE,gBAAgBJ;IAChB,cAAc;QAACK;KAAe;AAClC"}
@@ -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
+ }, []>;