Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/services/graphManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
125 changes: 125 additions & 0 deletions lib/services/graphManagement/lib/models/appRole.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Represents an application role that may be requested by a client application
* calling another application or that may be used to assign an application to
* users or groups in a specified application role. The appRoles property of
* the servicePrincipal entity and of the application entity is a collection of
* appRole.
*
*/
class AppRole {
/**
* Create a AppRole.
* @member {array} [allowedMemberTypes] Specifies whether this app role
* definition can be assigned to users and groups by setting to "User", or to
* other applications by setting to "Application", or to both.
* @member {string} [description] Permission help text that appears in the
* admin app assignment and consent experiences.
* @member {string} [displayName] Display name for the permission that
* appears in the admin consent and app assignment experiences. For example,
* "Read Only" or "Admin".
* @member {string} [id] Unique role identifier inside the appRoles
* collection, such as "c20e145e-5459-4a6c-a074-b942bbd4cfe1".
* @member {boolean} [isEnabled] When creating or updating a role definition,
* this must be set to true (which is the default). To delete a role, this
* must first be set to false.
* @member {string} [value] Specifies the value of the roles claim that the
* application should expect in the authentication and access tokens, such as
* "ReadOnly" or "Admin".
*/
constructor() {
}

/**
* Defines the metadata of AppRole
*
* @returns {object} metadata of AppRole
*
*/
mapper() {
return {
required: false,
serializedName: 'AppRole',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'AppRole',
modelProperties: {
allowedMemberTypes: {
required: false,
serializedName: 'allowedMemberTypes',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
description: {
required: false,
serializedName: 'description',
type: {
name: 'String'
}
},
displayName: {
required: false,
serializedName: 'displayName',
type: {
name: 'String'
}
},
id: {
required: false,
serializedName: 'id',
type: {
name: 'String'
}
},
isEnabled: {
required: false,
serializedName: 'isEnabled',
type: {
name: 'Boolean'
}
},
value: {
required: false,
serializedName: 'value',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AppRole;
29 changes: 29 additions & 0 deletions lib/services/graphManagement/lib/models/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Application extends models['DirectoryObject'] {
* Create a Application.
* @member {string} [appId] The application ID.
* @member {array} [appPermissions] The application permissions.
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} [availableToOtherTenants] Whether the application is be
* available to other tenants.
* @member {string} [displayName] The display name of the application.
Expand Down Expand Up @@ -100,6 +102,33 @@ class Application extends models['DirectoryObject'] {
}
}
},
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'AppRole'
}
}
}
},
availableToOtherTenants: {
required: false,
serializedName: 'availableToOtherTenants',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const models = require('./index');
class ApplicationCreateParameters {
/**
* Create a ApplicationCreateParameters.
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} availableToOtherTenants Whether the application is
* available to other tenants.
* @member {string} displayName The display name of the application.
Expand Down Expand Up @@ -66,6 +68,33 @@ class ApplicationCreateParameters {
},
className: 'ApplicationCreateParameters',
modelProperties: {
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'AppRole'
}
}
}
},
availableToOtherTenants: {
required: true,
serializedName: 'availableToOtherTenants',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const models = require('./index');
class ApplicationUpdateParameters {
/**
* Create a ApplicationUpdateParameters.
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} [availableToOtherTenants] Whether the application is
* available to other tenants
* @member {string} [displayName] The display name of the application.
Expand Down Expand Up @@ -66,6 +68,33 @@ class ApplicationUpdateParameters {
},
className: 'ApplicationUpdateParameters',
modelProperties: {
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'AppRole'
}
}
}
},
availableToOtherTenants: {
required: false,
serializedName: 'availableToOtherTenants',
Expand Down
50 changes: 50 additions & 0 deletions lib/services/graphManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,55 @@ export interface RequiredResourceAccess {
[property: string]: any;
}

/**
* @class
* Initializes a new instance of the AppRole class.
* @constructor
* Represents an application role that may be requested by a client application
* calling another application or that may be used to assign an application to
* users or groups in a specified application role. The appRoles property of
* the servicePrincipal entity and of the application entity is a collection of
* appRole.
*
* @member {array} [allowedMemberTypes] Specifies whether this app role
* definition can be assigned to users and groups by setting to "User", or to
* other applications by setting to "Application", or to both.
* @member {string} [description] Permission help text that appears in the
* admin app assignment and consent experiences.
* @member {string} [displayName] Display name for the permission that appears
* in the admin consent and app assignment experiences. For example, "Read
* Only" or "Admin".
* @member {string} [id] Unique role identifier inside the appRoles collection,
* such as "c20e145e-5459-4a6c-a074-b942bbd4cfe1".
* @member {boolean} [isEnabled] When creating or updating a role definition,
* this must be set to true (which is the default). To delete a role, this must
* first be set to false.
* @member {string} [value] Specifies the value of the roles claim that the
* application should expect in the authentication and access tokens, such as
* "ReadOnly" or "Admin".
*/
export interface AppRole {
allowedMemberTypes?: string[];
description?: string;
displayName?: string;
id?: string;
isEnabled?: boolean;
value?: string;
/**
* @property Describes unknown properties. The value of an unknown property
* can be of "any" type.
*/
[property: string]: any;
}

/**
* @class
* Initializes a new instance of the ApplicationCreateParameters class.
* @constructor
* Request parameters for creating a new application.
*
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} availableToOtherTenants Whether the application is
* available to other tenants.
* @member {string} displayName The display name of the application.
Expand All @@ -178,6 +221,7 @@ export interface RequiredResourceAccess {
* pre-configuration of required resource access drives the consent experience.
*/
export interface ApplicationCreateParameters {
appRoles?: AppRole[];
availableToOtherTenants: boolean;
displayName: string;
homepage?: string;
Expand All @@ -200,6 +244,8 @@ export interface ApplicationCreateParameters {
* @constructor
* Request parameters for updating an existing application.
*
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} [availableToOtherTenants] Whether the application is
* available to other tenants
* @member {string} [displayName] The display name of the application.
Expand All @@ -217,6 +263,7 @@ export interface ApplicationCreateParameters {
* pre-configuration of required resource access drives the consent experience.
*/
export interface ApplicationUpdateParameters {
appRoles?: AppRole[];
availableToOtherTenants?: boolean;
displayName?: string;
homepage?: string;
Expand All @@ -241,6 +288,8 @@ export interface ApplicationUpdateParameters {
*
* @member {string} [appId] The application ID.
* @member {array} [appPermissions] The application permissions.
* @member {array} [appRoles] The collection of application roles that an
* application may declare.
* @member {boolean} [availableToOtherTenants] Whether the application is be
* available to other tenants.
* @member {string} [displayName] The display name of the application.
Expand All @@ -253,6 +302,7 @@ export interface ApplicationUpdateParameters {
export interface Application extends DirectoryObject {
appId?: string;
appPermissions?: string[];
appRoles?: AppRole[];
availableToOtherTenants?: boolean;
displayName?: string;
identifierUris?: string[];
Expand Down
Loading