@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
1 lines • 9.91 kB
Source Map (JSON)
{"version":3,"sources":["../../../packages/core/data/cim.ts"],"names":[],"mappings":"AAEA,qBAAa,GAAG;IACZ,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAA6C;IAC/E,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAuC;IACzE,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAyB;IAE5D,OAAc,SAAS;;;;;;;QAQnB;;WAEG;;MAEL;IAEF,OAAc,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8CpB;IAEF;;;;;;;;OAQG;WACW,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM;IAI9G;;;;;OAKG;WACW,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IAInF;;;;;;OAMG;WACW,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,MAAM;IAIpG;;;;;;;OAOG;WACW,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,MAAM;IAIxH;;;;;;OAMG;WACW,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAIlG;;OAEG;WACW,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAIvD;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;CAGhC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,oBAAY,SAAS,GAAG,GAAG,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACnC","file":"cim.d.ts","sourcesContent":["import { Net } from './net';\r\n\r\nexport class Cim {\r\n private static cimClassRelativeUri = 'features/cim/namespaces/{0}/classes/{1}';\r\n private static cimQueryRelativeUri = 'features/cim/namespaces/{0}/query';\r\n private static cimInvokeRelativeUri = '/methods/{0}/invoke';\r\n\r\n public static namespace = {\r\n cimV2: 'root.cimv2',\r\n cluster: 'root.MSCluster',\r\n standardCimV2: 'root.standardCimv2',\r\n managementTools: 'root.Microsoft.Windows.ManagementTools',\r\n serverManager: 'root.Microsoft.Windows.ServerManager',\r\n windowsUpdate: 'root.Microsoft.Windows.WindowsUpdate',\r\n\r\n /**\r\n * @deprecated namespace is deprecated use \"Cim.namespace.managementTools\"\r\n */\r\n managementTools2: 'root.Microsoft.Windows.ManagementTools'\r\n };\r\n\r\n public static cimClass = {\r\n clusterResource: 'MSCluster_Resource',\r\n clusterNode: 'MSCluster_Node',\r\n win32NetworkAdapter: 'Win32_NetworkAdapter',\r\n clusterUtilities: 'MSCluster_ClusterUtilities',\r\n win32ComputerSystem: 'Win32_ComputerSystem',\r\n win32OperatingSystem: 'Win32_OperatingSystem',\r\n win32Processor: 'Win32_Processor',\r\n win32LogicalDisks: 'Win32_LogicalDisk',\r\n win32PhysicalMemory: 'Win32_PhysicalMemory',\r\n win32Service: 'Win32_Service',\r\n Win32DependentService: 'Win32_DependentService',\r\n win32PnpEntity: 'Win32_PnPEntity',\r\n win32Sid: 'Win32_SID',\r\n msftMTProcessorSummary: 'MSFT_MTProcessorSummary',\r\n msftMTMemorySummary: 'MSFT_MTMemorySummary',\r\n msftMTDisk: 'MSFT_MTDisk',\r\n msftMTNetworkAdapter: 'MSFT_MTNetworkAdapter',\r\n msftMTTaskManager: 'MSFT_MTTaskManager',\r\n msftMTProcesses: 'MSFT_MTProcess',\r\n msftMTEventProvider: 'MSFT_MTEventProvider',\r\n msftMTEventChannel: 'MSFT_MTEventChannel',\r\n msftMTRegistryKey: 'MSFT_MTRegistryKey',\r\n msftMTRegistryValue: 'MSFT_MTRegistryValue',\r\n msftMTRegistryTasks: 'MSFT_MTRegistryTasks',\r\n msftMTRegistryString: 'MSFT_MTregistryString',\r\n msftMTRegistryBinary: 'MSFT_MTregistryBinary',\r\n msftMTRegistryDword: 'MSFT_MTregistryDword',\r\n msftMTRegistryMultiString: 'MSFT_MTregistryMultiString',\r\n msftMTRegistryQword: 'MSFT_MTregistryQword',\r\n msftNetAdapter: 'MSFT_NetAdapter',\r\n msftNetIPInterface: 'MSFT_NetIPInterface',\r\n msftNetIPAddress: 'MSFT_NetIPAddress',\r\n msftNetRoute: 'MSFT_NetRoute',\r\n msftDnsClientServerAddress: 'MSFT_DNSClientServerAddress',\r\n msftServerManagerTasks: 'MSFT_ServerManagerTasks',\r\n msftWUOperationsSession: 'MSFT_WUOperationsSession',\r\n msftWUSettings: 'MSFT_WUSettings',\r\n msftNetFirewallRule: 'MSFT_NetFirewallRule',\r\n msftNetAddressFilter: 'MSFT_NetAddressFilter',\r\n msftNetApplicationFilter: 'MSFT_NetApplicationFilter',\r\n msftNetInterfaceFilter: 'MSFT_NetInterfaceFilter',\r\n msftNetInterfaceTypeFilter: 'MSFT_NetInterfaceTypeFilter',\r\n msftNetProtocolPortFilter: 'MSFT_NetProtocolPortFilter',\r\n msftNetNetworkLayerSecurityFilter: 'MSFT_NetNetworkLayerSecurityFilter',\r\n msftNetServiceFilter: 'MSFT_NetServiceFilter'\r\n };\r\n\r\n /**\r\n * WQL query to select by a single property value\r\n * @param className the class name to query for\r\n * @param propertyName The property Name to filter by\r\n * @param properties the collection of properties to retrieve. To get all properties specify and array\r\n * of one element: [\"*\"]\r\n * @returns the WQL query for the given parameters formatted to add the desired property value:\r\n * Select {properties} from {className} where {PropertyName}='{0}'\r\n */\r\n public static wqlSelectBySingleProperty(className: string, propertyName: string, properties: string[]): string {\r\n return 'Select {0} from {1} where {2}='.format(properties.join(','), className, propertyName) + '\\'{0}\\'';\r\n }\r\n\r\n /**\r\n * CIM URL builder for MultipleInstances\r\n *\r\n * @param namespace the cim namespace.\r\n * @param className the class name.\r\n */\r\n public static cimUrlMultipleInstances(namespace: string, className: string): string {\r\n return Cim.instanceMultiple(namespace, className);\r\n }\r\n\r\n /**\r\n * CIM URL builder for SingleInstance\r\n *\r\n * @param namespace the cim namespace.\r\n * @param className the class name.\r\n * @param keyProperties the key properties object.\r\n */\r\n public static cimUrlSingleInstance(namespace: string, className: string, keyProperties: any): string {\r\n return Cim.instanceSingle(namespace, className).format(Net.cimCreateName(keyProperties));\r\n }\r\n\r\n /**\r\n * CIM URL builder for InstanceMethod\r\n *\r\n * @param namespace the cim namespace.\r\n * @param className the class name.\r\n * @param methodName the method name.\r\n * @param keyProperties the key properties object.\r\n */\r\n public static cimUrlInstanceMethod(namespace: string, className: string, methodName: string, keyProperties: any): string {\r\n return Cim.invokeInstance(namespace, className, methodName).format(Net.cimCreateName(keyProperties));\r\n }\r\n\r\n /**\r\n * CIM URL builder for StaticMethod\r\n *\r\n * @param namespace the cim namespace.\r\n * @param className the class name.\r\n * @param methodName the method name.\r\n */\r\n public static cimUrlStaticMethod(namespace: string, className: string, methodName: string): string {\r\n return Cim.invokeStatic(namespace, className, methodName);\r\n }\r\n\r\n /**\r\n * CIM URL builder for WqlQuery\r\n */\r\n public static cimUrlWqlQuery(namespace: string): string {\r\n return Cim.cimQueryRelativeUri.format(namespace);\r\n }\r\n\r\n /**\r\n * Create Get URL of cim instances.\r\n *\r\n * @param namespaceName name of CIM namespace.\r\n * @param className name of CIM class.\r\n * @return relative URL of GET call.\r\n */\r\n private static instanceMultiple(namespaceName: string, className: string): string {\r\n return Cim.cimClassRelativeUri.format(namespaceName, className) + '/instances';\r\n }\r\n\r\n /**\r\n * Create Get URL of cim single instance.\r\n *\r\n * @param namespaceName name of CIM namespace.\r\n * @param className name of CIM class.\r\n * @return relative URL of GET call.\r\n */\r\n private static instanceSingle(namespaceName: string, className: string): string {\r\n return Cim.cimClassRelativeUri.format(namespaceName, className) + '/instances/{0}';\r\n }\r\n\r\n /**\r\n * Create POST URL of cim static method.\r\n *\r\n * @param namespaceName name of CIM namespace.\r\n * @param className name of CIM class.\r\n * @param methodName name of CIM method.\r\n * @return relative URL of POST call.\r\n */\r\n private static invokeStatic(namespaceName: string, className: string, methodName: string): string {\r\n return Cim.cimClassRelativeUri.format(namespaceName, className) + Cim.cimInvokeRelativeUri.format(methodName);\r\n }\r\n\r\n /**\r\n * Create POST URL of cim instance method.\r\n *\r\n * @param namespaceName name of CIM namespace.\r\n * @param className name of CIM class.\r\n * @param methodName name of CIM method.\r\n * @return relative URL of POST call.\r\n */\r\n private static invokeInstance(namespaceName: string, className: string, methodName: string): string {\r\n return Cim.cimClassRelativeUri.format(namespaceName, className) + '/instances/{0}' + Cim.cimInvokeRelativeUri.format(methodName);\r\n }\r\n}\r\n\r\n/**\r\n * CIM single instance.\r\n */\r\nexport interface CimSingle {\r\n name?: string;\r\n id?: string;\r\n properties: any;\r\n}\r\n\r\n/**\r\n * CIM multiple instances.\r\n */\r\nexport interface CimMultiple {\r\n value: CimSingle[];\r\n}\r\n\r\n/**\r\n * Cim result object including an error.\r\n */\r\nexport type CimResult = any;\r\n\r\n/**\r\n * Cim key properties set with name value pair.\r\n */\r\nexport interface CimKeyProperties {\r\n [name: string]: string | number;\r\n}\r\n"]}