diff --git a/types/microsoft-graph/index.d.ts b/types/microsoft-graph/index.d.ts index e688c38987..85a8e54a8b 100644 --- a/types/microsoft-graph/index.d.ts +++ b/types/microsoft-graph/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package microsoft-graph 1.21 +// Type definitions for non-npm package microsoft-graph 1.22 // Project: https://github.com/microsoftgraph/msgraph-typescript-typings // Definitions by: Microsoft Graph Team // Michael Mainer @@ -277,7 +277,43 @@ export type MobileAppContentFileUploadState = | "commitFileFailed" | "commitFileTimedOut"; export type MobileAppPublishingState = "notPublished" | "processing" | "published"; +export type RunAsAccountType = "system" | "user"; export type VppTokenAccountType = "business" | "education"; +export type Win32LobAppFileSystemOperationType = + | "notConfigured" + | "exists" + | "modifiedDate" + | "createdDate" + | "version" + | "sizeInMB"; +export type Win32LobAppMsiPackageType = "perMachine" | "perUser" | "dualPurpose"; +export type Win32LobAppNotification = "showAll" | "showReboot" | "hideAll"; +export type Win32LobAppPowerShellScriptRuleOperationType = + | "notConfigured" + | "string" + | "dateTime" + | "integer" + | "float" + | "version" + | "boolean"; +export type Win32LobAppRegistryRuleOperationType = + | "notConfigured" + | "exists" + | "doesNotExist" + | "string" + | "integer" + | "version"; +export type Win32LobAppRestartBehavior = "basedOnReturnCode" | "allow" | "suppress" | "force"; +export type Win32LobAppReturnCodeType = "failed" | "success" | "softReboot" | "hardReboot" | "retry"; +export type Win32LobAppRuleOperator = + | "notConfigured" + | "equal" + | "notEqual" + | "greaterThan" + | "greaterThanOrEqual" + | "lessThan" + | "lessThanOrEqual"; +export type Win32LobAppRuleType = "detection" | "requirement"; export type WindowsArchitecture = "none" | "x86" | "x64" | "arm" | "neutral"; export type WindowsDeviceType = "none" | "desktop" | "mobile" | "holographic" | "team"; export type InstallState = "notApplicable" | "installed" | "failed" | "notInstalled" | "uninstallFailed" | "unknown"; @@ -896,6 +932,7 @@ export type Tone = | "c" | "d" | "flash"; +export type LifecycleEventType = "missed" | "subscriptionRemoved" | "reauthorizationRequired"; export type ChannelMembershipType = "standard" | "private" | "unknownFutureValue"; export type ChatMessageImportance = "normal" | "high" | "urgent" | "unknownFutureValue"; export type ChatMessagePolicyViolationDlpActionTypes = "none" | "notifySender" | "blockAccess" | "blockAccessExternal"; @@ -1585,8 +1622,11 @@ export interface OAuth2PermissionGrant extends Entity { scope?: NullableOption; } export interface ScopedRoleMembership extends Entity { + // Unique identifier for the administrative unit that the directory role is scoped to administrativeUnitId?: string; + // Unique identifier for the directory role that the member is in. roleId?: string; + // Role member identity information. Represents the user that is a member of this scoped-role. roleMemberInfo?: Identity; } export interface Calendar extends Entity { @@ -1770,6 +1810,13 @@ export interface Event extends OutlookItem { start?: NullableOption; // The text of the event's subject line. subject?: NullableOption; + /** + * A custom identifier specified by a client app for the server to avoid redundant POST operations in case of client + * retries to create the same event. This is useful when low network connectivity causes the client to time out before + * receiving a response from the server for the client's prior create-event request. After you set transactionId when + * creating an event, you cannot change transactionId in a subsequent update. This property is only returned in a response + * payload if an app has set it. Optional. + */ transactionId?: NullableOption; // The event type. The possible values are: singleInstance, occurrence, exception, seriesMaster. Read-only. type?: NullableOption; @@ -2566,11 +2613,11 @@ export interface Application extends DirectoryObject { */ requiredResourceAccess?: RequiredResourceAccess[]; /** - * Specifies what Microsoft accounts are supported for the current application. Supported values are:AzureADMyOrg: Users - * with a Microsoft work or school account in my organization’s Azure AD tenant (i.e. single tenant)AzureADMultipleOrgs: - * Users with a Microsoft work or school account in any organization’s Azure AD tenant (i.e. multi-tenant) - * AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any - * organization’s Azure AD tenant + * Specifies the Microsoft accounts that are supported for the current application. Supported values are:AzureADMyOrg: + * Users with a Microsoft work or school account in my organization’s Azure AD tenant (single tenant)AzureADMultipleOrgs: + * Users with a Microsoft work or school account in any organization’s Azure AD tenant + * (multi-tenant)AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account + * in any organization’s Azure AD tenant. */ signInAudience?: NullableOption; // Custom strings that can be used to categorize and identify the application. Not nullable. @@ -2655,10 +2702,25 @@ export interface IdentityProvider extends Entity { // tslint:disable-next-line: no-empty-interface export interface ActivityBasedTimeoutPolicy extends StsPolicy {} export interface AdministrativeUnit extends DirectoryObject { + // An optional description for the administrative unit. description?: NullableOption; + // Display name for the administrative unit. displayName?: NullableOption; + /** + * Controls whether the adminstrative unit and its members are hidden or public. Can be set to HiddenMembership or Public. + * If not set, default behavior is Public. When set to HiddenMembership, only members of the administrative unit can list + * other members of the adminstrative unit. + */ visibility?: NullableOption; + /** + * Users and groups that are members of this Adminsitrative Unit. HTTP Methods: GET (list members), POST (add members), + * DELETE (remove members). + */ members?: NullableOption; + /** + * Scoped-role members of this Administrative Unit. HTTP Methods: GET (list scopedRoleMemberships), POST (add + * scopedRoleMembership), DELETE (remove scopedRoleMembership). + */ scopedRoleMembers?: NullableOption; extensions?: NullableOption; } @@ -3928,22 +3990,23 @@ export interface Subscription extends Entity { * application permissions, this field contains the id of the service principal corresponding to the app. Read-only. */ creatorId?: NullableOption; + /** + * A base64-encoded representation of a certificate with a public key used to encrypt resource data in change + * notifications. Optional. Required when includeResourceData is true. + */ + encryptionCertificate?: NullableOption; + // A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Optional. + encryptionCertificateId?: NullableOption; /** * Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be an amount * of time from subscription creation that varies for the resource subscribed to. See the table below for maximum * supported subscription length of time. */ expirationDateTime?: string; - /** - * Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint, specified by - * notificationUrl, supports. The possible values are: v1_0, v1_1, v1_2, v1_3. For subscribers whose notification endpoint - * supports a version lower than the currently recommended version (TLS 1.2), specifying this property by a set timeline - * allows them to temporarily use their deprecated version of TLS before completing their upgrade to TLS 1.2. For these - * subscribers, not setting this property per the timeline would result in subscription operations failing. For - * subscribers whose notification endpoint already supports TLS 1.2, setting this property is optional. In such cases, - * Microsoft Graph defaults the property to v1_2. - */ + // When set to true, change notifications include resource data (such as content of a chat message). Optional. + includeResourceData?: NullableOption; latestSupportedTlsVersion?: NullableOption; + lifecycleNotificationUrl?: NullableOption; /** * Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS * protocol. @@ -5813,6 +5876,34 @@ export interface WebApp extends MobileApp { // Whether or not to use managed browser. This property is only applicable for Android and IOS. useManagedBrowser?: boolean; } +export interface Win32LobApp extends MobileLobApp { + // The Windows architecture(s) for which this app can run on. Possible values are: none, x86, x64, arm, neutral. + applicableArchitectures?: WindowsArchitecture; + // The command line to install this app + installCommandLine?: NullableOption; + // The install experience for this app. + installExperience?: NullableOption; + // The value for the minimum CPU speed which is required to install this app. + minimumCpuSpeedInMHz?: NullableOption; + // The value for the minimum free disk space which is required to install this app. + minimumFreeDiskSpaceInMB?: NullableOption; + // The value for the minimum physical memory which is required to install this app. + minimumMemoryInMB?: NullableOption; + // The value for the minimum number of processors which is required to install this app. + minimumNumberOfProcessors?: NullableOption; + // The value for the minimum supported windows release. + minimumSupportedWindowsRelease?: NullableOption; + // The MSI details if this Win32 app is an MSI app. + msiInformation?: NullableOption; + // The return codes for post installation behavior. + returnCodes?: NullableOption; + // The detection and requirement rules for this app. + rules?: NullableOption; + // The relative path of the setup file in the encrypted Win32LobApp package. + setupFilePath?: NullableOption; + // The command line to uninstall this app + uninstallCommandLine?: NullableOption; +} export interface WindowsMobileMSI extends MobileLobApp { // The command line. commandLine?: NullableOption; @@ -7648,7 +7739,7 @@ export interface Windows10EndpointProtectionConfiguration extends DeviceConfigur // Indicates whether or not to block user from overriding Exploit Protection settings. defenderSecurityCenterBlockExploitProtectionOverride?: boolean; // Blocks stateful FTP connections to the device - firewallBlockStatefulFTP?: boolean; + firewallBlockStatefulFTP?: NullableOption; /** * Specify how the certificate revocation list is to be enforced. Possible values are: deviceDefault, none, attempt, * require. @@ -7671,7 +7762,7 @@ export interface Windows10EndpointProtectionConfiguration extends DeviceConfigur * If an authentication set is not fully supported by a keying module, direct the module to ignore only unsupported * authentication suites rather than the entire set */ - firewallMergeKeyingModuleSettings?: boolean; + firewallMergeKeyingModuleSettings?: NullableOption; /** * Configures how packet queueing should be applied in the tunnel gateway scenario. Possible values are: deviceDefault, * disabled, queueInbound, queueOutbound, queueBoth. @@ -9416,8 +9507,13 @@ export interface ChatMessage extends Entity { // The importance of the chat message. The possible values are: normal, high, urgent. importance?: ChatMessageImportance; /** - * Read only. Timestamp of when the chat message is created or edited, including when a reply is made (if it's a root chat - * message in a channel) or a reaction is added or removed. + * Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Microsoft Teams UI. If + * no edits are made the value is null. + */ + lastEditedDateTime?: NullableOption; + /** + * Read only. Timestamp when the chat message is created (initial setting) or edited, including when a reaction is added + * or removed. */ lastModifiedDateTime?: NullableOption; // Locale of the chat message set by the client. @@ -9455,6 +9551,8 @@ export interface TeamsTab extends Entity { teamsApp?: NullableOption; } // tslint:disable-next-line: no-empty-interface +export interface Chat extends Entity {} +// tslint:disable-next-line: no-empty-interface export interface ChatMessageHostedContent extends Entity {} export interface Schedule extends Entity { // Indicates whether the schedule is enabled for the team. Required. @@ -11995,12 +12093,143 @@ export interface MimeContent { // The byte array that contains the actual content. value?: NullableOption; } +export interface MobileAppInstallTimeSettings { + // The time at which the app should be installed. + deadlineDateTime?: NullableOption; + // The time at which the app should be available for installation. + startDateTime?: NullableOption; + // Whether the local device time or UTC time should be used when determining the available and deadline times. + useLocalTime?: boolean; +} export interface VppLicensingType { // Whether the program supports the device licensing type. supportsDeviceLicensing?: boolean; // Whether the program supports the user licensing type. supportsUserLicensing?: boolean; } +export interface Win32LobAppAssignmentSettings extends MobileAppAssignmentSettings { + // The install time settings to apply for this app assignment. + installTimeSettings?: NullableOption; + // The notification status for this app assignment. Possible values are: showAll, showReboot, hideAll. + notifications?: Win32LobAppNotification; + // The reboot settings to apply for this app assignment. + restartSettings?: NullableOption; +} +export interface Win32LobAppRestartSettings { + // The number of minutes before the restart time to display the countdown dialog for pending restarts. + countdownDisplayBeforeRestartInMinutes?: number; + // The number of minutes to wait before restarting the device after an app installation. + gracePeriodInMinutes?: number; + // The number of minutes to snooze the restart notification dialog when the snooze button is selected. + restartNotificationSnoozeDurationInMinutes?: NullableOption; +} +export interface Win32LobAppRule { + // The rule type indicating the purpose of the rule. Possible values are: detection, requirement. + ruleType?: Win32LobAppRuleType; +} +export interface Win32LobAppFileSystemRule extends Win32LobAppRule { + // A value indicating whether to expand environment variables in the 32-bit context on 64-bit systems. + check32BitOn64System?: boolean; + // The file or folder comparison value. + comparisonValue?: NullableOption; + // The file or folder name to look up. + fileOrFolderName?: NullableOption; + /** + * The file system operation type. Possible values are: notConfigured, exists, modifiedDate, createdDate, version, + * sizeInMB. + */ + operationType?: Win32LobAppFileSystemOperationType; + /** + * The operator for file or folder detection. Possible values are: notConfigured, equal, notEqual, greaterThan, + * greaterThanOrEqual, lessThan, lessThanOrEqual. + */ + operator?: Win32LobAppRuleOperator; + // The file or folder path to look up. + path?: NullableOption; +} +export interface Win32LobAppInstallExperience { + // Device restart behavior. Possible values are: basedOnReturnCode, allow, suppress, force. + deviceRestartBehavior?: Win32LobAppRestartBehavior; + // Indicates the type of execution context the app runs in. + runAsAccount?: RunAsAccountType; +} +export interface Win32LobAppMsiInformation { + // The MSI package type. Possible values are: perMachine, perUser, dualPurpose. + packageType?: Win32LobAppMsiPackageType; + // The MSI product code. + productCode?: NullableOption; + // The MSI product name. + productName?: NullableOption; + // The MSI product version. + productVersion?: NullableOption; + // The MSI publisher. + publisher?: NullableOption; + // Whether the MSI app requires the machine to reboot to complete installation. + requiresReboot?: boolean; + // The MSI upgrade code. + upgradeCode?: NullableOption; +} +export interface Win32LobAppPowerShellScriptRule extends Win32LobAppRule { + // The script output comparison value. Do not specify a value if the rule is used for detection. + comparisonValue?: NullableOption; + // The display name for the rule. Do not specify this value if the rule is used for detection. + displayName?: NullableOption; + // A value indicating whether a signature check is enforced. + enforceSignatureCheck?: boolean; + /** + * The script output comparison operation type. Use NotConfigured (the default value) if the rule is used for detection. + * Possible values are: notConfigured, string, dateTime, integer, float, version, boolean. + */ + operationType?: Win32LobAppPowerShellScriptRuleOperationType; + /** + * The script output operator. Use NotConfigured (the default value) if the rule is used for detection. Possible values + * are: notConfigured, equal, notEqual, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual. + */ + operator?: Win32LobAppRuleOperator; + // A value indicating whether the script should run as 32-bit. + runAs32Bit?: boolean; + /** + * The execution context of the script. Do not specify this value if the rule is used for detection. Script detection + * rules will run in the same context as the associated app install context. + */ + runAsAccount?: NullableOption; + // The base64-encoded script content. + scriptContent?: NullableOption; +} +export interface Win32LobAppProductCodeRule extends Win32LobAppRule { + // The product code of the app. + productCode?: NullableOption; + // The product version comparison value. + productVersion?: NullableOption; + /** + * The product version comparison operator. Possible values are: notConfigured, equal, notEqual, greaterThan, + * greaterThanOrEqual, lessThan, lessThanOrEqual. + */ + productVersionOperator?: Win32LobAppRuleOperator; +} +export interface Win32LobAppRegistryRule extends Win32LobAppRule { + // A value indicating whether to search the 32-bit registry on 64-bit systems. + check32BitOn64System?: boolean; + // The registry comparison value. + comparisonValue?: NullableOption; + // The full path of the registry entry containing the value to detect. + keyPath?: NullableOption; + // The registry operation type. Possible values are: notConfigured, exists, doesNotExist, string, integer, version. + operationType?: Win32LobAppRegistryRuleOperationType; + /** + * The operator for registry detection. Possible values are: notConfigured, equal, notEqual, greaterThan, + * greaterThanOrEqual, lessThan, lessThanOrEqual. + */ + operator?: Win32LobAppRuleOperator; + // The name of the registry value to detect. + valueName?: NullableOption; +} +export interface Win32LobAppReturnCode { + // Return code. + returnCode?: number; + // The type of return code. Possible values are: failed, success, softReboot, hardReboot, retry. + type?: Win32LobAppReturnCodeType; +} export interface WindowsMinimumOperatingSystem { // Windows version 10.0 or later. v10_0?: boolean; @@ -13690,8 +13919,14 @@ export interface ChangeNotification { * clientState property received with each change notification. Optional. */ clientState?: NullableOption; + /** + * (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and + * includeResourceData were defined during the subscription request and if the resource supports it. Optional. + */ + encryptedContent?: NullableOption; // Unique ID for the notification. Optional. id?: NullableOption; + lifecycleEvent?: NullableOption; // The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required. resource?: string; // The content of this property depends on the type of resource being subscribed to. Required. @@ -13703,9 +13938,36 @@ export interface ChangeNotification { // The unique identifier of the tenant from which the change notification originated. tenantId?: string; } +export interface ChangeNotificationEncryptedContent { + /** + * Base64-encoded encrypted data that produces a full resource respresented as JSON. The data has been encrypted with the + * provided dataKey using an AES/CBC/PKCS5PADDING cipher suite. + */ + data?: string; + /** + * Base64-encoded symmetric key generated by Microsoft Graph to encrypt the data value and to generate the data signature. + * This key is encrypted with the certificate public key that was provided during the subscription. It must be decrypted + * with the certificate private key before it can be used to decrypt the data or verify the signature. This key has been + * encrypted with the following cipher suite: RSA/ECB/OAEPWithSHA1AndMGF1Padding. + */ + dataKey?: string; + // Base64-encoded HMAC-SHA256 hash of the data for validation purposes. + dataSignature?: string; + // ID of the certificate used to encrypt the dataKey. + encryptionCertificateId?: string; + // Hexadecimal representation of the thumbprint of the certificate used to encrypt the dataKey. + encryptionCertificateThumbprint?: string; +} // tslint:disable-next-line: no-empty-interface export interface ResourceData {} export interface ChangeNotificationCollection { + /** + * Contains an array of JWT tokens generated by Microsoft Graph for the application to validate the origin of the + * notifications. Microsoft Graph generates a single token for each distinct app and tenant pair for an item if it exists + * in the value array. Keep in mind that notifications can contain a mix of items for various apps and tenants that + * subscribed using the same notification URL. Only provided for change notifications with resource data Optional. + */ + validationTokens?: NullableOption; // The set of notifications being sent to the notification URL. Required. value?: ChangeNotification[]; } diff --git a/types/microsoft-graph/microsoft-graph-tests.ts b/types/microsoft-graph/microsoft-graph-tests.ts index 4dd4e1c670..369259bf26 100644 --- a/types/microsoft-graph/microsoft-graph-tests.ts +++ b/types/microsoft-graph/microsoft-graph-tests.ts @@ -4,7 +4,7 @@ import { User, Event, DateTimeTimeZone, ItemBody, ServicePrincipal, Invitation, Application, CallTranscriptionInfo, CancelMediaProcessingOperation, ResultInfo, CallRecords, - IdentitySet, Identity, RiskLevel, EventMessageResponse, PermissionClassificationType, DelegatedPermissionClassification + IdentitySet, Identity, RiskLevel, EventMessageResponse, PermissionClassificationType, DelegatedPermissionClassification, Permission } from "microsoft-graph"; const user: User = { @@ -111,3 +111,8 @@ const permissionClassificationType: PermissionClassificationType = "medium"; const delegatedPermissionClassification: DelegatedPermissionClassification = { classification: permissionClassificationType }; + +const permission: Permission = { + link: null, + id: "string" +};