UNPKG

@nodert-win11-22h2/windows.management.update

Version:

Use the Windows.Management.Update UWP API directly from Node.js

490 lines (389 loc) 15.2 kB
WindowsUpdateContract = (function () { var cls = function WindowsUpdateContract() { }; return cls; }) (); exports.WindowsUpdateContract = WindowsUpdateContract; _WindowsUpdateAdministratorOptions = function () { this.none = 0; this.requireAdministratorApprovalForScans = 1; this.requireAdministratorApprovalForUpdates = 2; this.requireAdministratorApprovalForActions = 3; } exports.WindowsUpdateAdministratorOptions = new _WindowsUpdateAdministratorOptions(); _WindowsUpdateAdministratorStatus = function () { this.succeeded = 0; this.noAdministratorRegistered = 1; this.otherAdministratorIsRegistered = 2; } exports.WindowsUpdateAdministratorStatus = new _WindowsUpdateAdministratorStatus(); _WindowsUpdateAttentionRequiredReason = function () { this.none = 0; this.seekerUpdate = 1; this.readyToReboot = 2; this.needNonMeteredNetwork = 3; this.needUserAgreementForMeteredNetwork = 4; this.needNetwork = 5; this.needMoreSpace = 6; this.batterySaverEnabled = 7; this.needUserInteraction = 8; this.needUserAgreementForPolicy = 9; this.compatibilityError = 10; this.needUserInteractionForEula = 11; this.needUserInteractionForCta = 12; this.regulated = 13; this.externalReboot = 14; this.otherUpdate = 15; this.blockedByProvider = 16; this.blockedByPostRebootFailure = 17; this.userEngaged = 18; this.blockedByBattery = 19; this.exclusivity = 20; this.blockedBySerialization = 21; this.conflictClass = 22; this.blockedByAdminApproval = 23; this.blockedByTooManyAttempts = 24; this.blockedByFailure = 25; this.demotion = 26; this.blockedByActiveHours = 27; this.scheduledForMaintenance = 28; this.policyScheduledInstallTime = 29; this.blockedByOobe = 30; this.deferredDuringOobe = 31; this.deferredForSustainableTime = 32; } exports.WindowsUpdateAttentionRequiredReason = new _WindowsUpdateAttentionRequiredReason(); PreviewBuildsManager = (function () { var cls = function PreviewBuildsManager() { this.arePreviewBuildsAllowed = new Boolean(); }; cls.prototype.syncAsync = function syncAsync(callback) { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.getCurrentState = function getCurrentState() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="PreviewBuildsState" /> /// </signature> return new PreviewBuildsState(); } cls.getDefault = function getDefault() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="PreviewBuildsManager" /> /// </signature> return new PreviewBuildsManager(); } cls.isSupported = function isSupported() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="Boolean" /> /// </signature> return new Boolean(); } return cls; }) (); exports.PreviewBuildsManager = PreviewBuildsManager; PreviewBuildsState = (function () { var cls = function PreviewBuildsState() { this.properties = new Object(); }; return cls; }) (); exports.PreviewBuildsState = PreviewBuildsState; WindowsUpdate = (function () { var cls = function WindowsUpdate() { this.actionProgress = new WindowsUpdateActionProgress(); this.actionResult = new WindowsUpdateActionResult(); this.attentionRequiredInfo = new WindowsUpdateAttentionRequiredInfo(); this.currentAction = new String(); this.deadline = new Date(); this.description = new String(); this.eulaText = new String(); this.isCritical = new Boolean(); this.isDriver = new Boolean(); this.isEulaAccepted = new Boolean(); this.isFeatureUpdate = new Boolean(); this.isForOS = new Boolean(); this.isMandatory = new Boolean(); this.isMinorImpact = new Boolean(); this.isSecurity = new Boolean(); this.isSeeker = new Boolean(); this.isUrgent = new Boolean(); this.moreInfoUrl = new Object(); this.providerId = new String(); this.supportUrl = new Object(); this.title = new String(); this.updateId = new String(); }; cls.prototype.getPropertyValue = function getPropertyValue(propertyName) { /// <signature> /// <summary>Function summary.</summary> /// <param name="propertyName" type="String">A param.</param> /// <returns type="Object" /> /// </signature> return new Object(); } cls.prototype.acceptEula = function acceptEula() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } return cls; }) (); exports.WindowsUpdate = WindowsUpdate; WindowsUpdateActionCompletedEventArgs = (function () { var cls = function WindowsUpdateActionCompletedEventArgs() { this.action = new String(); this.extendedError = new Number(); this.succeeded = new Boolean(); this.update = new WindowsUpdate(); }; return cls; }) (); exports.WindowsUpdateActionCompletedEventArgs = WindowsUpdateActionCompletedEventArgs; WindowsUpdateActionProgress = (function () { var cls = function WindowsUpdateActionProgress() { this.action = new String(); this.progress = new Number(); }; return cls; }) (); exports.WindowsUpdateActionProgress = WindowsUpdateActionProgress; WindowsUpdateActionResult = (function () { var cls = function WindowsUpdateActionResult() { this.action = new String(); this.extendedError = new Number(); this.succeeded = new Boolean(); this.timestamp = new Date(); }; return cls; }) (); exports.WindowsUpdateActionResult = WindowsUpdateActionResult; WindowsUpdateAdministrator = (function () { var cls = function WindowsUpdateAdministrator() { }; cls.prototype.startAdministratorScan = function startAdministratorScan() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.approveWindowsUpdateAction = function approveWindowsUpdateAction(updateId, action) { /// <signature> /// <summary>Function summary.</summary> /// <param name="updateId" type="String">A param.</param> /// <param name="action" type="String">A param.</param> /// </signature> } cls.prototype.revokeWindowsUpdateActionApproval = function revokeWindowsUpdateActionApproval(updateId, action) { /// <signature> /// <summary>Function summary.</summary> /// <param name="updateId" type="String">A param.</param> /// <param name="action" type="String">A param.</param> /// </signature> } cls.prototype.approveWindowsUpdate = function approveWindowsUpdate(updateId, approvalData) { /// <signature> /// <summary>Function summary.</summary> /// <param name="updateId" type="String">A param.</param> /// <param name="approvalData" type="WindowsUpdateApprovalData">A param.</param> /// </signature> } cls.prototype.revokeWindowsUpdateApproval = function revokeWindowsUpdateApproval(updateId) { /// <signature> /// <summary>Function summary.</summary> /// <param name="updateId" type="String">A param.</param> /// </signature> } cls.prototype.getUpdates = function getUpdates() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="Object" /> /// </signature> return new Object(); } cls.getRegisteredAdministrator = function getRegisteredAdministrator(organizationName) { /// <signature> /// <summary>Function summary.</summary> /// <param name="organizationName" type="String">A param.</param> /// <returns type="WindowsUpdateGetAdministratorResult" /> /// </signature> return new WindowsUpdateGetAdministratorResult(); } cls.registerForAdministration = function registerForAdministration(organizationName, options) { /// <signature> /// <summary>Function summary.</summary> /// <param name="organizationName" type="String">A param.</param> /// <param name="options" type="WindowsUpdateAdministratorOptions">A param.</param> /// <returns type="WindowsUpdateAdministratorStatus" /> /// </signature> return new WindowsUpdateAdministratorStatus(); } cls.unregisterForAdministration = function unregisterForAdministration(organizationName) { /// <signature> /// <summary>Function summary.</summary> /// <param name="organizationName" type="String">A param.</param> /// <returns type="WindowsUpdateAdministratorStatus" /> /// </signature> return new WindowsUpdateAdministratorStatus(); } cls.getRegisteredAdministratorName = function getRegisteredAdministratorName() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="String" /> /// </signature> return new String(); } cls.requestRestart = function requestRestart(restartOptions) { /// <signature> /// <summary>Function summary.</summary> /// <param name="restartOptions" type="WindowsUpdateRestartRequestOptions">A param.</param> /// <returns type="String" /> /// </signature> return new String(); } cls.cancelRestartRequest = function cancelRestartRequest(requestRestartToken) { /// <signature> /// <summary>Function summary.</summary> /// <param name="requestRestartToken" type="String">A param.</param> /// </signature> } return cls; }) (); exports.WindowsUpdateAdministrator = WindowsUpdateAdministrator; WindowsUpdateApprovalData = (function () { var cls = function WindowsUpdateApprovalData() { this.seeker = new Boolean(); this.optOutOfAutoReboot = new Boolean(); this.complianceGracePeriodInDays = new Number(); this.complianceDeadlineInDays = new Number(); this.allowDownloadOnMetered = new Boolean(); }; return cls; }) (); exports.WindowsUpdateApprovalData = WindowsUpdateApprovalData; WindowsUpdateAttentionRequiredInfo = (function () { var cls = function WindowsUpdateAttentionRequiredInfo() { this.reason = new WindowsUpdateAttentionRequiredReason(); this.timestamp = new Date(); }; return cls; }) (); exports.WindowsUpdateAttentionRequiredInfo = WindowsUpdateAttentionRequiredInfo; WindowsUpdateAttentionRequiredReasonChangedEventArgs = (function () { var cls = function WindowsUpdateAttentionRequiredReasonChangedEventArgs() { this.reason = new WindowsUpdateAttentionRequiredReason(); this.update = new WindowsUpdate(); }; return cls; }) (); exports.WindowsUpdateAttentionRequiredReasonChangedEventArgs = WindowsUpdateAttentionRequiredReasonChangedEventArgs; WindowsUpdateGetAdministratorResult = (function () { var cls = function WindowsUpdateGetAdministratorResult() { this.administrator = new WindowsUpdateAdministrator(); this.status = new WindowsUpdateAdministratorStatus(); }; return cls; }) (); exports.WindowsUpdateGetAdministratorResult = WindowsUpdateGetAdministratorResult; WindowsUpdateItem = (function () { var cls = function WindowsUpdateItem() { this.category = new String(); this.description = new String(); this.moreInfoUrl = new Object(); this.operation = new String(); this.providerId = new String(); this.timestamp = new Date(); this.title = new String(); this.updateId = new String(); }; return cls; }) (); exports.WindowsUpdateItem = WindowsUpdateItem; WindowsUpdateManager = (function () { var cls = function WindowsUpdateManager() { this.isScanning = new Boolean(); this.isWorking = new Boolean(); this.lastSuccessfulScanTimestamp = new Date(); }; var cls = function WindowsUpdateManager(clientId) { this.isScanning = new Boolean(); this.isWorking = new Boolean(); this.lastSuccessfulScanTimestamp = new Date(); }; cls.prototype.getMostRecentCompletedUpdatesAsync = function getMostRecentCompletedUpdatesAsync(count, callback) { /// <signature> /// <summary>Function summary.</summary> /// <param name="count" type="Number">A param.</param> /// </signature> } cls.prototype.getApplicableUpdates = function getApplicableUpdates() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="Object" /> /// </signature> return new Object(); } cls.prototype.getMostRecentCompletedUpdates = function getMostRecentCompletedUpdates(count) { /// <signature> /// <summary>Function summary.</summary> /// <param name="count" type="Number">A param.</param> /// <returns type="Object" /> /// </signature> return new Object(); } cls.prototype.startScan = function startScan(userInitiated) { /// <signature> /// <summary>Function summary.</summary> /// <param name="userInitiated" type="Boolean">A param.</param> /// </signature> } cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.WindowsUpdateManager = WindowsUpdateManager; WindowsUpdateProgressChangedEventArgs = (function () { var cls = function WindowsUpdateProgressChangedEventArgs() { this.actionProgress = new WindowsUpdateActionProgress(); this.update = new WindowsUpdate(); }; return cls; }) (); exports.WindowsUpdateProgressChangedEventArgs = WindowsUpdateProgressChangedEventArgs; WindowsUpdateRestartRequestOptions = (function () { var cls = function WindowsUpdateRestartRequestOptions() { this.title = new String(); this.organizationName = new String(); this.optOutOfAutoReboot = new Boolean(); this.moreInfoUrl = new Object(); this.description = new String(); this.complianceGracePeriodInDays = new Number(); this.complianceDeadlineInDays = new Number(); }; var cls = function WindowsUpdateRestartRequestOptions(title, description, moreInfoUrl, complianceDeadlineInDays, complianceGracePeriodInDays) { this.title = new String(); this.organizationName = new String(); this.optOutOfAutoReboot = new Boolean(); this.moreInfoUrl = new Object(); this.description = new String(); this.complianceGracePeriodInDays = new Number(); this.complianceDeadlineInDays = new Number(); }; return cls; }) (); exports.WindowsUpdateRestartRequestOptions = WindowsUpdateRestartRequestOptions; WindowsUpdateScanCompletedEventArgs = (function () { var cls = function WindowsUpdateScanCompletedEventArgs() { this.extendedError = new Number(); this.providerId = new String(); this.succeeded = new Boolean(); this.updates = new Object(); }; return cls; }) (); exports.WindowsUpdateScanCompletedEventArgs = WindowsUpdateScanCompletedEventArgs;