@@ -19,31 +19,31 @@ export enum GroupType {
1919 /**
2020 * Any group Type
2121 */
22- Any = 0 ,
22+ any = 0 ,
2323
2424 /**
2525 * Office 365 group
2626 */
2727 // tslint:disable-next-line:no-bitwise
28- Unified = 1 << 0 ,
28+ unified = 1 << 0 ,
2929
3030 /**
3131 * Security group
3232 */
3333 // tslint:disable-next-line:no-bitwise
34- Security = 1 << 1 ,
34+ security = 1 << 1 ,
3535
3636 /**
3737 * Mail Enabled Security group
3838 */
3939 // tslint:disable-next-line:no-bitwise
40- MailEnabledSecurity = 1 << 2 ,
40+ mailenabledsecurity = 1 << 2 ,
4141
4242 /**
4343 * Distribution Group
4444 */
4545 // tslint:disable-next-line:no-bitwise
46- Distribution = 1 << 3
46+ distribution = 1 << 3
4747}
4848
4949/**
@@ -53,14 +53,14 @@ export enum GroupType {
5353 * @param {IGraph } graph
5454 * @param {string } query - what to search for
5555 * @param {number } [top=10] - number of groups to return
56- * @param {GroupType } [groupTypes=GroupType.Any ] - the type of group to search for
56+ * @param {GroupType } [groupTypes=GroupType.any ] - the type of group to search for
5757 * @returns {Promise<Group[]> } An array of Groups
5858 */
5959export async function findGroups (
6060 graph : IGraph ,
6161 query : string ,
6262 top : number = 10 ,
63- groupTypes : GroupType = GroupType . Any
63+ groupTypes : GroupType = GroupType . any
6464) : Promise < Group [ ] > {
6565 const scopes = 'Group.Read.All' ;
6666
@@ -69,26 +69,26 @@ export async function findGroups(
6969 filterQuery = `(startswith(displayName,'${ query } ') or startswith(mailNickname,'${ query } ') or startswith(mail,'${ query } '))` ;
7070 }
7171
72- if ( groupTypes !== GroupType . Any ) {
72+ if ( groupTypes !== GroupType . any ) {
7373 const filterGroups = [ ] ;
7474
7575 // tslint:disable-next-line:no-bitwise
76- if ( GroupType . Unified === ( groupTypes & GroupType . Unified ) ) {
76+ if ( GroupType . unified === ( groupTypes & GroupType . unified ) ) {
7777 filterGroups . push ( "groupTypes/any(c:c+eq+'Unified')" ) ;
7878 }
7979
8080 // tslint:disable-next-line:no-bitwise
81- if ( GroupType . Security === ( groupTypes & GroupType . Security ) ) {
81+ if ( GroupType . security === ( groupTypes & GroupType . security ) ) {
8282 filterGroups . push ( '(mailEnabled eq false and securityEnabled eq true)' ) ;
8383 }
8484
8585 // tslint:disable-next-line:no-bitwise
86- if ( GroupType . MailEnabledSecurity === ( groupTypes & GroupType . MailEnabledSecurity ) ) {
86+ if ( GroupType . mailenabledsecurity === ( groupTypes & GroupType . mailenabledsecurity ) ) {
8787 filterGroups . push ( '(mailEnabled eq true and securityEnabled eq true)' ) ;
8888 }
8989
9090 // tslint:disable-next-line:no-bitwise
91- if ( GroupType . Distribution === ( groupTypes & GroupType . Distribution ) ) {
91+ if ( GroupType . distribution === ( groupTypes & GroupType . distribution ) ) {
9292 filterGroups . push ( '(mailEnabled eq true and securityEnabled eq false)' ) ;
9393 }
9494
0 commit comments