Skip to content

Commit

Permalink
Merge pull request #1192 from juliemturner/version-2
Browse files Browse the repository at this point in the history
Fix issue with return type of graph directory-objects #1155
  • Loading branch information
juliemturner authored May 7, 2020
2 parents 97cd2aa + b676774 commit bf5d928
Show file tree
Hide file tree
Showing 2 changed files with 322 additions and 322 deletions.
100 changes: 50 additions & 50 deletions packages/graph/directory-objects/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ import { graphPost } from "../operations";
@deleteable()
export class _DirectoryObject<GetType = IDirectoryObjectType> extends _GraphQueryableInstance<GetType> {

/**
* Returns all the groups and directory roles that the specified Directory Object is a member of. The check is transitive
*
* @param securityEnabledOnly
*/
public getMemberObjects(securityEnabledOnly = false): Promise<{ value: string[] }> {
return graphPost(this.clone(DirectoryObject, "getMemberObjects"), body({ securityEnabledOnly }));
}
/**
* Returns all the groups and directory roles that the specified Directory Object is a member of. The check is transitive
*
* @param securityEnabledOnly
*/
public getMemberObjects(securityEnabledOnly = false): Promise<string[]> {
return graphPost(this.clone(DirectoryObject, "getMemberObjects"), body({ securityEnabledOnly }));
}

/**
* Returns all the groups that the specified Directory Object is a member of. The check is transitive
*
* @param securityEnabledOnly
*/
public getMemberGroups(securityEnabledOnly = false): Promise<{ value: string[] }> {
return graphPost(this.clone(DirectoryObject, "getMemberGroups"), body({ securityEnabledOnly }));
}
/**
* Returns all the groups that the specified Directory Object is a member of. The check is transitive
*
* @param securityEnabledOnly
*/
public getMemberGroups(securityEnabledOnly = false): Promise<string[]> {
return graphPost(this.clone(DirectoryObject, "getMemberGroups"), body({ securityEnabledOnly }));
}

/**
* Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member.
* This function is transitive.
* @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified.
*/
public checkMemberGroups(groupIds: String[]): Promise<{ value: string[] }> {
return graphPost(this.clone(DirectoryObject, "checkMemberGroups"), body({ groupIds }));
}
/**
* Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member.
* This function is transitive.
* @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified.
*/
public checkMemberGroups(groupIds: String[]): Promise<string[]> {
return graphPost(this.clone(DirectoryObject, "checkMemberGroups"), body({ groupIds }));
}
}

export interface IDirectoryObject<GetType = IDirectoryObjectType> extends _DirectoryObject, IDeleteable { }
Expand All @@ -48,16 +48,16 @@ export const DirectoryObject = graphInvokableFactory<IDirectoryObject>(_Director
@defaultPath("directoryObjects")
@getById(DirectoryObject)
export class _DirectoryObjects<GetType = IDirectoryObjectType[]> extends _GraphQueryableCollection<GetType> {
/**
* Returns the directory objects specified in a list of ids. NOTE: The directory objects returned are the full objects containing all their properties.
* The $select query option is not available for this operation.
*
* @param ids A collection of ids for which to return objects. You can specify up to 1000 ids.
* @param type A collection of resource types that specifies the set of resource collections to search. Default is directoryObject.
*/
public getByIds(ids: string[], type: DirectoryObjectTypes = DirectoryObjectTypes.directoryObject): Promise<IDirectoryObjectType[]> {
return graphPost(this.clone(DirectoryObjects, "getByIds"), body({ ids, type }));
}
/**
* Returns the directory objects specified in a list of ids. NOTE: The directory objects returned are the full objects containing all their properties.
* The $select query option is not available for this operation.
*
* @param ids A collection of ids for which to return objects. You can specify up to 1000 ids.
* @param type A collection of resource types that specifies the set of resource collections to search. Default is directoryObject.
*/
public getByIds(ids: string[], type: DirectoryObjectTypes = DirectoryObjectTypes.directoryObject): Promise<IDirectoryObjectType[]> {
return graphPost(this.clone(DirectoryObjects, "getByIds"), body({ ids, type }));
}
}
export interface IDirectoryObjects extends _DirectoryObjects, IGetById<IDirectoryObjectType> { }
export const DirectoryObjects = graphInvokableFactory<IDirectoryObjects>(_DirectoryObjects);
Expand All @@ -66,20 +66,20 @@ export const DirectoryObjects = graphInvokableFactory<IDirectoryObjects>(_Direct
* DirectoryObjectTypes
*/
export enum DirectoryObjectTypes {
/**
* Directory Objects
*/
directoryObject,
/**
* User
*/
user,
/**
* Group
*/
group,
/**
* Device
*/
device,
/**
* Directory Objects
*/
directoryObject,
/**
* User
*/
user,
/**
* Group
*/
group,
/**
* Device
*/
device,
}
Loading

0 comments on commit bf5d928

Please sign in to comment.