idea-aws 3.10.5 → 3.10.6
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.
- package/dist/src/cognito.d.ts +8 -0
- package/dist/src/cognito.js +12 -0
- package/package.json +1 -1
package/dist/src/cognito.d.ts
CHANGED
|
@@ -84,6 +84,14 @@ export declare class Cognito {
|
|
|
84
84
|
* List the groups of the user pool.
|
|
85
85
|
*/
|
|
86
86
|
listGroups(cognitoUserPoolId: string): Promise<CognitoGroup[]>;
|
|
87
|
+
/**
|
|
88
|
+
* Create a new group in the user pool.
|
|
89
|
+
*/
|
|
90
|
+
createGroup(groupName: string, cognitoUserPoolId: string): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Delete a group from the user pool.
|
|
93
|
+
*/
|
|
94
|
+
deleteGroup(groupName: string, cognitoUserPoolId: string): Promise<void>;
|
|
87
95
|
/**
|
|
88
96
|
* List the users part of a group in the user pool.
|
|
89
97
|
*/
|
package/dist/src/cognito.js
CHANGED
|
@@ -249,6 +249,18 @@ class Cognito {
|
|
|
249
249
|
const groups = groupsList.Groups.map(g => ({ name: g.GroupName, description: g.Description }));
|
|
250
250
|
return groups;
|
|
251
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Create a new group in the user pool.
|
|
254
|
+
*/
|
|
255
|
+
async createGroup(groupName, cognitoUserPoolId) {
|
|
256
|
+
await this.cognito.createGroup({ GroupName: groupName, UserPoolId: cognitoUserPoolId }).promise();
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Delete a group from the user pool.
|
|
260
|
+
*/
|
|
261
|
+
async deleteGroup(groupName, cognitoUserPoolId) {
|
|
262
|
+
await this.cognito.deleteGroup({ GroupName: groupName, UserPoolId: cognitoUserPoolId }).promise();
|
|
263
|
+
}
|
|
252
264
|
/**
|
|
253
265
|
* List the users part of a group in the user pool.
|
|
254
266
|
*/
|