@device-management-toolkit/wsman-messages 5.15.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/WSMan.d.ts +1 -1
  2. package/WSMan.js +307 -310
  3. package/WSMan.js.map +1 -1
  4. package/amt/actions.js +4 -7
  5. package/amt/actions.js.map +1 -1
  6. package/amt/classes.js +2 -5
  7. package/amt/classes.js.map +1 -1
  8. package/amt/index.d.ts +6 -6
  9. package/amt/index.js +5 -12
  10. package/amt/index.js.map +1 -1
  11. package/amt/messages.d.ts +6 -6
  12. package/amt/messages.js +722 -806
  13. package/amt/messages.js.map +1 -1
  14. package/amt/methods.js +2 -5
  15. package/amt/methods.js.map +1 -1
  16. package/amt/models.d.ts +2 -2
  17. package/amt/models.js +1 -2
  18. package/amt/models.js.map +1 -1
  19. package/amt/types.js +1 -2
  20. package/amt/types.js.map +1 -1
  21. package/cim/actions.js +2 -5
  22. package/cim/actions.js.map +1 -1
  23. package/cim/classes.js +2 -5
  24. package/cim/classes.js.map +1 -1
  25. package/cim/index.d.ts +6 -6
  26. package/cim/index.js +5 -11
  27. package/cim/index.js.map +1 -1
  28. package/cim/messages.d.ts +4 -4
  29. package/cim/messages.js +152 -224
  30. package/cim/messages.js.map +1 -1
  31. package/cim/methods.js +2 -5
  32. package/cim/methods.js.map +1 -1
  33. package/cim/models.d.ts +2 -2
  34. package/cim/models.js +1 -2
  35. package/cim/models.js.map +1 -1
  36. package/cim/types.js +1 -2
  37. package/cim/types.js.map +1 -1
  38. package/dist +12 -11
  39. package/index.d.ts +4 -4
  40. package/index.js +5 -44
  41. package/index.js.map +1 -1
  42. package/ips/actions.js +2 -5
  43. package/ips/actions.js.map +1 -1
  44. package/ips/classes.js +2 -5
  45. package/ips/classes.js.map +1 -1
  46. package/ips/index.d.ts +6 -6
  47. package/ips/index.js +5 -11
  48. package/ips/index.js.map +1 -1
  49. package/ips/messages.d.ts +4 -4
  50. package/ips/messages.js +217 -253
  51. package/ips/messages.js.map +1 -1
  52. package/ips/methods.js +2 -5
  53. package/ips/methods.js.map +1 -1
  54. package/ips/models.d.ts +2 -2
  55. package/ips/models.js +1 -2
  56. package/ips/models.js.map +1 -1
  57. package/ips/types.js +1 -2
  58. package/ips/types.js.map +1 -1
  59. package/models/common.js +45 -2
  60. package/models/common.js.map +1 -1
  61. package/models/index.d.ts +1 -1
  62. package/models/index.js +2 -38
  63. package/models/index.js.map +1 -1
  64. package/package.json +12 -11
  65. package/amt/messages.test.d.ts +0 -5
  66. package/amt/messages.test.js +0 -1116
  67. package/amt/messages.test.js.map +0 -1
  68. package/cim/messages.test.d.ts +0 -5
  69. package/cim/messages.test.js +0 -442
  70. package/cim/messages.test.js.map +0 -1
  71. package/ips/messages.test.d.ts +0 -5
  72. package/ips/messages.test.js +0 -296
  73. package/ips/messages.test.js.map +0 -1
  74. package/wsman.test.d.ts +0 -5
  75. package/wsman.test.js +0 -479
  76. package/wsman.test.js.map +0 -1
package/amt/messages.js CHANGED
@@ -1,845 +1,761 @@
1
- "use strict";
2
1
  /*********************************************************************
3
2
  * Copyright (c) Intel Corporation 2021
4
3
  * SPDX-License-Identifier: Apache-2.0
5
4
  **********************************************************************/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Messages = void 0;
8
- const __1 = require("../");
9
- const WSMan_1 = require("../WSMan");
10
- const _1 = require("./");
11
- class AlarmClockService extends WSMan_1.Base {
12
- constructor() {
13
- super(...arguments);
14
- this.className = _1.Classes.ALARM_CLOCK_SERVICE;
15
- /**
16
- * This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
17
- * @param alarmClockOccurrence IPS.Models.AlarmClockOccurrence Object
18
- * @returns string
19
- */
20
- this.AddAlarm = (alarmClockOccurrence) => {
21
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_ALARM, this.className);
22
- // toIsoString() is adding milliseconds... remove them by taking everything before the '.' and adding back the 'Z'
23
- const startTime = alarmClockOccurrence.StartTime.toISOString().split('.')[0] + 'Z';
24
- let body = `<Body><p:AddAlarm_INPUT xmlns:p="${this.wsmanMessageCreator.resourceUriBase}AMT_AlarmClockService"><p:AlarmTemplate><s:InstanceID xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.InstanceID}</s:InstanceID>`;
25
- if (alarmClockOccurrence.ElementName != null) {
26
- body += `<s:ElementName xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.ElementName}</s:ElementName>`;
27
- }
28
- body += `<s:StartTime xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">${startTime}</p:Datetime></s:StartTime>`;
29
- if (alarmClockOccurrence.Interval != null) {
30
- const minutes = alarmClockOccurrence.Interval % 60;
31
- const hours = Math.floor(alarmClockOccurrence.Interval / 60) % 24;
32
- const days = Math.floor(alarmClockOccurrence.Interval / 1440);
33
- body += `<s:Interval xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">P${days}DT${hours}H${minutes}M</p:Interval></s:Interval>`;
34
- }
35
- body += `<s:DeleteOnCompletion xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${String(alarmClockOccurrence.DeleteOnCompletion)}</s:DeleteOnCompletion></p:AlarmTemplate></p:AddAlarm_INPUT></Body>`;
36
- return this.wsmanMessageCreator.createXml(header, body);
37
- };
38
- /**
39
- * Changes properties of the selected instance
40
- * @param alarmClockService An instance of AlarmClockService
41
- * @returns string
42
- */
43
- this.Put = (alarmClockService) => this.protectedPut(alarmClockService, false);
44
- }
5
+ import { CIM } from '../index.js';
6
+ import { Base, BaseActions, WSManErrors, WSManMessageCreator } from '../WSMan.js';
7
+ import { Classes, Actions, Methods } from './index.js';
8
+ class AlarmClockService extends Base {
9
+ className = Classes.ALARM_CLOCK_SERVICE;
10
+ /**
11
+ * This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
12
+ * @param alarmClockOccurrence IPS.Models.AlarmClockOccurrence Object
13
+ * @returns string
14
+ */
15
+ AddAlarm = (alarmClockOccurrence) => {
16
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_ALARM, this.className);
17
+ // toIsoString() is adding milliseconds... remove them by taking everything before the '.' and adding back the 'Z'
18
+ const startTime = alarmClockOccurrence.StartTime.toISOString().split('.')[0] + 'Z';
19
+ let body = `<Body><p:AddAlarm_INPUT xmlns:p="${this.wsmanMessageCreator.resourceUriBase}AMT_AlarmClockService"><p:AlarmTemplate><s:InstanceID xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.InstanceID}</s:InstanceID>`;
20
+ if (alarmClockOccurrence.ElementName != null) {
21
+ body += `<s:ElementName xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.ElementName}</s:ElementName>`;
22
+ }
23
+ body += `<s:StartTime xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">${startTime}</p:Datetime></s:StartTime>`;
24
+ if (alarmClockOccurrence.Interval != null) {
25
+ const minutes = alarmClockOccurrence.Interval % 60;
26
+ const hours = Math.floor(alarmClockOccurrence.Interval / 60) % 24;
27
+ const days = Math.floor(alarmClockOccurrence.Interval / 1440);
28
+ body += `<s:Interval xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">P${days}DT${hours}H${minutes}M</p:Interval></s:Interval>`;
29
+ }
30
+ body += `<s:DeleteOnCompletion xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${String(alarmClockOccurrence.DeleteOnCompletion)}</s:DeleteOnCompletion></p:AlarmTemplate></p:AddAlarm_INPUT></Body>`;
31
+ return this.wsmanMessageCreator.createXml(header, body);
32
+ };
33
+ /**
34
+ * Changes properties of the selected instance
35
+ * @param alarmClockService An instance of AlarmClockService
36
+ * @returns string
37
+ */
38
+ Put = (alarmClockService) => this.protectedPut(alarmClockService, false);
45
39
  }
46
- class AuditLog extends WSMan_1.Base {
47
- constructor() {
48
- super(...arguments);
49
- this.className = _1.Classes.AUDIT_LOG;
50
- /**
51
- * Returns a list of consecutive audit log records in chronological order: The first record in the returned array is the oldest record stored in the log. The record entries are returned as an array of base64Binary elements.
52
- * @param startIndex Identifies the position of the first record to retrieve. An index of 1 indicates the first record in the log. If startIndex isn't provided, defaults to 1.
53
- * @returns string
54
- */
55
- this.ReadRecords = (startIndex) => {
56
- if (startIndex === undefined) {
57
- startIndex = 1;
58
- }
59
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.READ_RECORDS, this.className);
60
- const body = this.wsmanMessageCreator.createBody('ReadRecords_INPUT', this.className, [{ StartIndex: startIndex }]);
61
- return this.wsmanMessageCreator.createXml(header, body);
62
- };
63
- }
40
+ class AuditLog extends Base {
41
+ className = Classes.AUDIT_LOG;
42
+ /**
43
+ * Returns a list of consecutive audit log records in chronological order: The first record in the returned array is the oldest record stored in the log. The record entries are returned as an array of base64Binary elements.
44
+ * @param startIndex Identifies the position of the first record to retrieve. An index of 1 indicates the first record in the log. If startIndex isn't provided, defaults to 1.
45
+ * @returns string
46
+ */
47
+ ReadRecords = (startIndex) => {
48
+ if (startIndex === undefined) {
49
+ startIndex = 1;
50
+ }
51
+ const header = this.wsmanMessageCreator.createHeader(Actions.READ_RECORDS, this.className);
52
+ const body = this.wsmanMessageCreator.createBody('ReadRecords_INPUT', this.className, [{ StartIndex: startIndex }]);
53
+ return this.wsmanMessageCreator.createXml(header, body);
54
+ };
64
55
  }
65
- class AuthorizationService extends WSMan_1.Base {
66
- constructor() {
67
- super(...arguments);
68
- this.className = _1.Classes.AUTHORIZATION_SERVICE;
69
- /**
70
- * Adds a user entry to the Intel(R) AMT device.
71
- * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
72
- * @param realms Array of interface names the ACL entry is allowed to access.
73
- * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
74
- * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
75
- * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
76
- * @returns string
77
- */
78
- this.AddUserAclEntryEx = (accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
79
- if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
80
- throw new Error(WSMan_1.WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
81
- }
82
- if (digestUsername && digestUsername.length > 16) {
83
- throw new Error(WSMan_1.WSManErrors.USERNAME_TOO_LONG);
56
+ class AuthorizationService extends Base {
57
+ className = Classes.AUTHORIZATION_SERVICE;
58
+ /**
59
+ * Adds a user entry to the Intel(R) AMT device.
60
+ * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
61
+ * @param realms Array of interface names the ACL entry is allowed to access.
62
+ * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
63
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
64
+ * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
65
+ * @returns string
66
+ */
67
+ AddUserAclEntryEx = (accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
68
+ if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
69
+ throw new Error(WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
70
+ }
71
+ if (digestUsername && digestUsername.length > 16) {
72
+ throw new Error(WSManErrors.USERNAME_TOO_LONG);
73
+ }
74
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_USER_ACL_ENTRY_EX, this.className);
75
+ const aclObject = {
76
+ DigestUsername: digestUsername,
77
+ DigestPassword: digestPassword,
78
+ KerberosUserSid: kerberosUserSid,
79
+ AccessPermission: accessPermission,
80
+ Realms: realms
81
+ };
82
+ const body = this.wsmanMessageCreator.createBody('AddUserAclEntryEx_INPUT', this.className, [aclObject]);
83
+ return this.wsmanMessageCreator.createXml(header, body);
84
+ };
85
+ /**
86
+ * Enumerates entries in the User Access Control List (ACL). Only 50 handles can be returned, so in order to get others startIndex should be bigger than 1.
87
+ * @param startIndex Indicates the first ACL entry to retrieve. if startIndex isn't provided, it will be set to 1
88
+ * @returns string
89
+ */
90
+ EnumerateUserAclEntries = (startIndex) => {
91
+ if (!startIndex)
92
+ startIndex = 1;
93
+ const header = this.wsmanMessageCreator.createHeader(Actions.ENUMERATE_USER_ACL_ENTRIES, this.className);
94
+ const body = this.wsmanMessageCreator.createBody('EnumerateUserAclEntries_INPUT', this.className, [
95
+ { StartIndex: startIndex }
96
+ ]);
97
+ return this.wsmanMessageCreator.createXml(header, body);
98
+ };
99
+ /**
100
+ * Gets the state of a user ACL entry (enabled/disabled)
101
+ * @param handle Specifies the ACL entry
102
+ * @returns string
103
+ */
104
+ GetAclEnabledState = (handle) => {
105
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_ACL_ENABLED_STATE, this.className);
106
+ const body = this.wsmanMessageCreator.createBody('GetAclEnabledState_INPUT', this.className, [
107
+ { Handle: handle }
108
+ ]);
109
+ return this.wsmanMessageCreator.createXml(header, body);
110
+ };
111
+ /**
112
+ * Returns the username attribute of the Admin ACL.
113
+ * @returns string
114
+ */
115
+ GetAdminAclEntry = () => {
116
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_ACL_ENTRY, this.className);
117
+ const body = this.wsmanMessageCreator.createBody('GetAdminAclEntry_INPUT', this.className, [{}]);
118
+ return this.wsmanMessageCreator.createXml(header, body);
119
+ };
120
+ /**
121
+ * Reads the Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
122
+ * @returns string
123
+ */
124
+ GetAdminAclEntryStatus = () => {
125
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_ACL_ENTRY_STATUS, this.className);
126
+ const body = this.wsmanMessageCreator.createBody('GetAdminAclEntryStatus_INPUT', this.className, [{}]);
127
+ return this.wsmanMessageCreator.createXml(header, body);
128
+ };
129
+ /**
130
+ * Reads the remote Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the remote admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
131
+ * @returns string
132
+ */
133
+ GetAdminNetAclEntryStatus = () => {
134
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_NET_ACL_ENTRY_STATUS, this.className);
135
+ const body = this.wsmanMessageCreator.createBody('GetAdminNetAclEntryStatus_INPUT', this.className, [{}]);
136
+ return this.wsmanMessageCreator.createXml(header, body);
137
+ };
138
+ /**
139
+ * Reads a user entry from the Intel(R) AMT device. Note: confidential information, such as password (hash) is omitted or zeroed in the response.
140
+ * @param handle Specifies the ACL entry to fetch.
141
+ * @returns string
142
+ */
143
+ GetUserAclEntryEx = (handle) => {
144
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_USER_ACL_ENTRY_EX, this.className);
145
+ const body = this.wsmanMessageCreator.createBody('GetUserAclEntryEx_INPUT', this.className, [
146
+ { Handle: handle }
147
+ ]);
148
+ return this.wsmanMessageCreator.createXml(header, body);
149
+ };
150
+ /**
151
+ * Removes an entry from the User Access Control List (ACL), given a handle.
152
+ * @param handle Specifies the ACL entry to be removed.
153
+ * @returns string
154
+ */
155
+ RemoveUserAclEntry = (handle) => {
156
+ const header = this.wsmanMessageCreator.createHeader(Actions.REMOVE_USER_ACL_ENTRY, this.className);
157
+ const body = this.wsmanMessageCreator.createBody('RemoveUserAclEntry_INPUT', this.className, [
158
+ { Handle: handle }
159
+ ]);
160
+ return this.wsmanMessageCreator.createXml(header, body);
161
+ };
162
+ /**
163
+ * Enables or disables a user ACL entry.Disabling ACL entries is useful when accounts that cannot be removed (system accounts - starting with $$) are required to be disabled.
164
+ * @param handle Specifies the ACL entry to update
165
+ * @param enabled Specifies the state of the ACL entry
166
+ * @returns string
167
+ */
168
+ SetAclEnabledState = (handle, enabled) => {
169
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_ACL_ENABLED_STATE, this.className);
170
+ const body = this.wsmanMessageCreator.createBody('SetAclEnabledState_INPUT', this.className, [
171
+ { Handle: handle, Enabled: enabled }
172
+ ]);
173
+ return this.wsmanMessageCreator.createXml(header, body);
174
+ };
175
+ /**
176
+ * Updates an Admin entry in the Intel(R) AMT device.
177
+ * @param username Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
178
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings.
179
+ * @returns string
180
+ */
181
+ SetAdminACLEntryEx = (username, digestPassword) => {
182
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_ADMIN_ACL_ENTRY_EX, this.className);
183
+ const body = this.wsmanMessageCreator.createBody('SetAdminAclEntryEx_INPUT', this.className, [
184
+ {
185
+ Username: username,
186
+ DigestPassword: digestPassword
84
187
  }
85
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_USER_ACL_ENTRY_EX, this.className);
86
- const aclObject = {
87
- DigestUsername: digestUsername,
88
- DigestPassword: digestPassword,
89
- KerberosUserSid: kerberosUserSid,
90
- AccessPermission: accessPermission,
91
- Realms: realms
92
- };
93
- const body = this.wsmanMessageCreator.createBody('AddUserAclEntryEx_INPUT', this.className, [aclObject]);
94
- return this.wsmanMessageCreator.createXml(header, body);
95
- };
96
- /**
97
- * Enumerates entries in the User Access Control List (ACL). Only 50 handles can be returned, so in order to get others startIndex should be bigger than 1.
98
- * @param startIndex Indicates the first ACL entry to retrieve. if startIndex isn't provided, it will be set to 1
99
- * @returns string
100
- */
101
- this.EnumerateUserAclEntries = (startIndex) => {
102
- if (!startIndex)
103
- startIndex = 1;
104
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ENUMERATE_USER_ACL_ENTRIES, this.className);
105
- const body = this.wsmanMessageCreator.createBody('EnumerateUserAclEntries_INPUT', this.className, [
106
- { StartIndex: startIndex }
107
- ]);
108
- return this.wsmanMessageCreator.createXml(header, body);
109
- };
110
- /**
111
- * Gets the state of a user ACL entry (enabled/disabled)
112
- * @param handle Specifies the ACL entry
113
- * @returns string
114
- */
115
- this.GetAclEnabledState = (handle) => {
116
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ACL_ENABLED_STATE, this.className);
117
- const body = this.wsmanMessageCreator.createBody('GetAclEnabledState_INPUT', this.className, [
118
- { Handle: handle }
119
- ]);
120
- return this.wsmanMessageCreator.createXml(header, body);
121
- };
122
- /**
123
- * Returns the username attribute of the Admin ACL.
124
- * @returns string
125
- */
126
- this.GetAdminAclEntry = () => {
127
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY, this.className);
128
- const body = this.wsmanMessageCreator.createBody('GetAdminAclEntry_INPUT', this.className, [{}]);
129
- return this.wsmanMessageCreator.createXml(header, body);
130
- };
131
- /**
132
- * Reads the Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
133
- * @returns string
134
- */
135
- this.GetAdminAclEntryStatus = () => {
136
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY_STATUS, this.className);
137
- const body = this.wsmanMessageCreator.createBody('GetAdminAclEntryStatus_INPUT', this.className, [{}]);
138
- return this.wsmanMessageCreator.createXml(header, body);
139
- };
140
- /**
141
- * Reads the remote Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the remote admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
142
- * @returns string
143
- */
144
- this.GetAdminNetAclEntryStatus = () => {
145
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_NET_ACL_ENTRY_STATUS, this.className);
146
- const body = this.wsmanMessageCreator.createBody('GetAdminNetAclEntryStatus_INPUT', this.className, [{}]);
147
- return this.wsmanMessageCreator.createXml(header, body);
148
- };
149
- /**
150
- * Reads a user entry from the Intel(R) AMT device. Note: confidential information, such as password (hash) is omitted or zeroed in the response.
151
- * @param handle Specifies the ACL entry to fetch.
152
- * @returns string
153
- */
154
- this.GetUserAclEntryEx = (handle) => {
155
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_USER_ACL_ENTRY_EX, this.className);
156
- const body = this.wsmanMessageCreator.createBody('GetUserAclEntryEx_INPUT', this.className, [
157
- { Handle: handle }
158
- ]);
159
- return this.wsmanMessageCreator.createXml(header, body);
160
- };
161
- /**
162
- * Removes an entry from the User Access Control List (ACL), given a handle.
163
- * @param handle Specifies the ACL entry to be removed.
164
- * @returns string
165
- */
166
- this.RemoveUserAclEntry = (handle) => {
167
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.REMOVE_USER_ACL_ENTRY, this.className);
168
- const body = this.wsmanMessageCreator.createBody('RemoveUserAclEntry_INPUT', this.className, [
169
- { Handle: handle }
170
- ]);
171
- return this.wsmanMessageCreator.createXml(header, body);
172
- };
173
- /**
174
- * Enables or disables a user ACL entry.Disabling ACL entries is useful when accounts that cannot be removed (system accounts - starting with $$) are required to be disabled.
175
- * @param handle Specifies the ACL entry to update
176
- * @param enabled Specifies the state of the ACL entry
177
- * @returns string
178
- */
179
- this.SetAclEnabledState = (handle, enabled) => {
180
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ACL_ENABLED_STATE, this.className);
181
- const body = this.wsmanMessageCreator.createBody('SetAclEnabledState_INPUT', this.className, [
182
- { Handle: handle, Enabled: enabled }
183
- ]);
184
- return this.wsmanMessageCreator.createXml(header, body);
185
- };
186
- /**
187
- * Updates an Admin entry in the Intel(R) AMT device.
188
- * @param username Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
189
- * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings.
190
- * @returns string
191
- */
192
- this.SetAdminACLEntryEx = (username, digestPassword) => {
193
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ADMIN_ACL_ENTRY_EX, this.className);
194
- const body = this.wsmanMessageCreator.createBody('SetAdminAclEntryEx_INPUT', this.className, [
195
- {
196
- Username: username,
197
- DigestPassword: digestPassword
198
- }
199
- ]);
200
- return this.wsmanMessageCreator.createXml(header, body);
201
- };
202
- /**
203
- * Updates a user entry in the Intel(R) AMT device.
204
- * @param handle Creation handle to a User ACL entry.
205
- * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
206
- * @param realms Array of interface names the ACL entry is allowed to access.
207
- * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
208
- * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
209
- * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
210
- * @returns string
211
- */
212
- this.UpdateUserAclEntryEx = (handle, accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
213
- if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
214
- throw new Error(WSMan_1.WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
215
- }
216
- if (digestUsername && digestUsername.length > 16) {
217
- throw new Error(WSMan_1.WSManErrors.USERNAME_TOO_LONG);
218
- }
219
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.UPDATE_USER_ACL_ENTRY_EX, this.className);
220
- const aclObject = {
221
- Handle: handle,
222
- DigestUsername: digestUsername,
223
- DigestPassword: digestPassword,
224
- KerberosUserSid: kerberosUserSid,
225
- AccessPermission: accessPermission,
226
- Realms: realms
227
- };
228
- const body = this.wsmanMessageCreator.createBody('UpdateUserAclEntryEx_INPUT', this.className, [aclObject]);
229
- return this.wsmanMessageCreator.createXml(header, body);
230
- };
231
- }
188
+ ]);
189
+ return this.wsmanMessageCreator.createXml(header, body);
190
+ };
191
+ /**
192
+ * Updates a user entry in the Intel(R) AMT device.
193
+ * @param handle Creation handle to a User ACL entry.
194
+ * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
195
+ * @param realms Array of interface names the ACL entry is allowed to access.
196
+ * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
197
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
198
+ * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
199
+ * @returns string
200
+ */
201
+ UpdateUserAclEntryEx = (handle, accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
202
+ if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
203
+ throw new Error(WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
204
+ }
205
+ if (digestUsername && digestUsername.length > 16) {
206
+ throw new Error(WSManErrors.USERNAME_TOO_LONG);
207
+ }
208
+ const header = this.wsmanMessageCreator.createHeader(Actions.UPDATE_USER_ACL_ENTRY_EX, this.className);
209
+ const aclObject = {
210
+ Handle: handle,
211
+ DigestUsername: digestUsername,
212
+ DigestPassword: digestPassword,
213
+ KerberosUserSid: kerberosUserSid,
214
+ AccessPermission: accessPermission,
215
+ Realms: realms
216
+ };
217
+ const body = this.wsmanMessageCreator.createBody('UpdateUserAclEntryEx_INPUT', this.className, [aclObject]);
218
+ return this.wsmanMessageCreator.createXml(header, body);
219
+ };
232
220
  }
233
- class BootCapabilities extends WSMan_1.Base {
234
- constructor() {
235
- super(...arguments);
236
- this.className = _1.Classes.BOOT_CAPABILITIES;
237
- }
221
+ class BootCapabilities extends Base {
222
+ className = Classes.BOOT_CAPABILITIES;
238
223
  }
239
- class BootSettingData extends WSMan_1.Base {
240
- constructor() {
241
- super(...arguments);
242
- this.className = _1.Classes.BOOT_SETTING_DATA;
243
- /**
244
- * Changes properties of BootSettingData.
245
- * @param bootSettingData BootSettingData Object.
246
- * @returns string
247
- */
248
- this.Put = (bootSettingData) => this.protectedPut(bootSettingData, false);
249
- }
224
+ class BootSettingData extends Base {
225
+ className = Classes.BOOT_SETTING_DATA;
226
+ /**
227
+ * Changes properties of BootSettingData.
228
+ * @param bootSettingData BootSettingData Object.
229
+ * @returns string
230
+ */
231
+ Put = (bootSettingData) => this.protectedPut(bootSettingData, false);
250
232
  }
251
- class EnvironmentDetectionSettingData extends WSMan_1.Base {
252
- constructor() {
253
- super(...arguments);
254
- this.className = _1.Classes.ENVIRONMENT_DETECTION_SETTING_DATA;
255
- /**
256
- * Changes properties of EnvironmentDetectionSettingData.
257
- * @param environmentDetectionSettingData EnvironmentDetectionSettingData Object.
258
- * @returns string
259
- */
260
- this.Put = (environmentDetectionSettingData) => this.protectedPut(environmentDetectionSettingData, true);
261
- }
233
+ class EnvironmentDetectionSettingData extends Base {
234
+ className = Classes.ENVIRONMENT_DETECTION_SETTING_DATA;
235
+ /**
236
+ * Changes properties of EnvironmentDetectionSettingData.
237
+ * @param environmentDetectionSettingData EnvironmentDetectionSettingData Object.
238
+ * @returns string
239
+ */
240
+ Put = (environmentDetectionSettingData) => this.protectedPut(environmentDetectionSettingData, true);
262
241
  }
263
- class EthernetPortSettings extends WSMan_1.Base {
264
- constructor() {
265
- super(...arguments);
266
- this.className = _1.Classes.ETHERNET_PORT_SETTINGS;
267
- /**
268
- * Changes properties of the EthernetPortSettings.
269
- * @param ethernetPortObject EthernetPortSettings Object.
270
- * @returns string
271
- */
272
- this.Put = (ethernetPortObject) => this.protectedPut(ethernetPortObject, true);
273
- /**
274
- * Sets link preference with timeout.
275
- * @param linkPreference 1 = ME | 2 = HOST
276
- * @param timeout Timeout in seconds before preference expires.
277
- * @param instanceID The InstanceID selector for the specific Ethernet port (e.g., "Intel(r) AMT Ethernet Port Settings 1")
278
- * @returns string
279
- */
280
- this.SetLinkPreference = (linkPreference, timeout, instanceID = 'Intel(r) AMT Ethernet Port Settings 1') => {
281
- const selector = { name: 'InstanceID', value: instanceID };
282
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_LINK_PREFERENCE, this.className, selector);
283
- const body = this.wsmanMessageCreator.createBody('SetLinkPreference_INPUT', this.className, [
284
- { LinkPreference: linkPreference },
285
- { Timeout: timeout }
286
- ]);
287
- return this.wsmanMessageCreator.createXml(header, body);
288
- };
289
- }
242
+ class EthernetPortSettings extends Base {
243
+ className = Classes.ETHERNET_PORT_SETTINGS;
244
+ /**
245
+ * Changes properties of the EthernetPortSettings.
246
+ * @param ethernetPortObject EthernetPortSettings Object.
247
+ * @returns string
248
+ */
249
+ Put = (ethernetPortObject) => this.protectedPut(ethernetPortObject, true);
250
+ /**
251
+ * Sets link preference with timeout.
252
+ * @param linkPreference 1 = ME | 2 = HOST
253
+ * @param timeout Timeout in seconds before preference expires.
254
+ * @param instanceID The InstanceID selector for the specific Ethernet port (e.g., "Intel(r) AMT Ethernet Port Settings 1")
255
+ * @returns string
256
+ */
257
+ SetLinkPreference = (linkPreference, timeout, instanceID = 'Intel(r) AMT Ethernet Port Settings 1') => {
258
+ const selector = { name: 'InstanceID', value: instanceID };
259
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_LINK_PREFERENCE, this.className, selector);
260
+ const body = this.wsmanMessageCreator.createBody('SetLinkPreference_INPUT', this.className, [
261
+ { LinkPreference: linkPreference },
262
+ { Timeout: timeout }
263
+ ]);
264
+ return this.wsmanMessageCreator.createXml(header, body);
265
+ };
290
266
  }
291
- class GeneralSettings extends WSMan_1.Base {
292
- constructor() {
293
- super(...arguments);
294
- this.className = _1.Classes.GENERAL_SETTINGS;
295
- /**
296
- * Changes properties of GeneralSettings.
297
- * @param generalSettings GeneralSettings Object.
298
- * @returns string
299
- */
300
- this.Put = (generalSettings) => this.protectedPut(generalSettings, false);
301
- }
267
+ class GeneralSettings extends Base {
268
+ className = Classes.GENERAL_SETTINGS;
269
+ /**
270
+ * Changes properties of GeneralSettings.
271
+ * @param generalSettings GeneralSettings Object.
272
+ * @returns string
273
+ */
274
+ Put = (generalSettings) => this.protectedPut(generalSettings, false);
302
275
  }
303
- class IEEE8021xCredentialContext extends WSMan_1.Base {
304
- constructor() {
305
- super(...arguments);
306
- this.className = _1.Classes.IEEE8021X_CREDENTIAL_CONTEXT;
307
- }
276
+ class IEEE8021xCredentialContext extends Base {
277
+ className = Classes.IEEE8021X_CREDENTIAL_CONTEXT;
308
278
  }
309
- class IEEE8021xProfile extends WSMan_1.Base {
310
- constructor() {
311
- super(...arguments);
312
- this.className = _1.Classes.IEEE8021X_PROFILE;
313
- /**
314
- * Changes properties of IEEE8021xProfile
315
- * @param ieee8021xProfile IEEE8021xProfile Object
316
- * @returns string
317
- */
318
- this.Put = (ieee8021xProfile) => this.protectedPut(ieee8021xProfile, false);
319
- }
279
+ class IEEE8021xProfile extends Base {
280
+ className = Classes.IEEE8021X_PROFILE;
281
+ /**
282
+ * Changes properties of IEEE8021xProfile
283
+ * @param ieee8021xProfile IEEE8021xProfile Object
284
+ * @returns string
285
+ */
286
+ Put = (ieee8021xProfile) => this.protectedPut(ieee8021xProfile, false);
320
287
  }
321
- class KerberosSettingData extends WSMan_1.Base {
322
- constructor() {
323
- super(...arguments);
324
- this.className = _1.Classes.KERBEROS_SETTING_DATA;
325
- /**
326
- * Gets the current state of the credential caching functionality
327
- * @returns string
328
- */
329
- this.GetCredentialCacheState = () => {
330
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_CREDENTIAL_CACHE_STATE, this.className);
331
- const body = this.wsmanMessageCreator.createBody('GetCredentialCacheState_INPUT', this.className);
332
- return this.wsmanMessageCreator.createXml(header, body);
333
- };
334
- /**
335
- * Enables/disables the credential caching functionality
336
- * @param enabled New state of the functionality
337
- * @returns string
338
- */
339
- this.SetCredentialCacheState = (enabled) => {
340
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_CREDENTIAL_CACHE_STATE, this.className);
341
- const body = this.wsmanMessageCreator.createBody('SetCredentialCacheState_INPUT', this.className, [enabled]);
342
- return this.wsmanMessageCreator.createXml(header, body);
343
- };
344
- }
288
+ class KerberosSettingData extends Base {
289
+ className = Classes.KERBEROS_SETTING_DATA;
290
+ /**
291
+ * Gets the current state of the credential caching functionality
292
+ * @returns string
293
+ */
294
+ GetCredentialCacheState = () => {
295
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_CREDENTIAL_CACHE_STATE, this.className);
296
+ const body = this.wsmanMessageCreator.createBody('GetCredentialCacheState_INPUT', this.className);
297
+ return this.wsmanMessageCreator.createXml(header, body);
298
+ };
299
+ /**
300
+ * Enables/disables the credential caching functionality
301
+ * @param enabled New state of the functionality
302
+ * @returns string
303
+ */
304
+ SetCredentialCacheState = (enabled) => {
305
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_CREDENTIAL_CACHE_STATE, this.className);
306
+ const body = this.wsmanMessageCreator.createBody('SetCredentialCacheState_INPUT', this.className, [enabled]);
307
+ return this.wsmanMessageCreator.createXml(header, body);
308
+ };
345
309
  }
346
- class ManagementPresenceRemoteSAP extends WSMan_1.Base {
347
- constructor() {
348
- super(...arguments);
349
- this.className = _1.Classes.MANAGEMENT_PRESENCE_REMOTE_SAP;
350
- /**
351
- * Deletes an instance
352
- * @param selector indicates the instance
353
- * @returns string
354
- */
355
- this.Delete = (selector) => this.protectedDelete(selector);
356
- }
310
+ class ManagementPresenceRemoteSAP extends Base {
311
+ className = Classes.MANAGEMENT_PRESENCE_REMOTE_SAP;
312
+ /**
313
+ * Deletes an instance
314
+ * @param selector indicates the instance
315
+ * @returns string
316
+ */
317
+ Delete = (selector) => this.protectedDelete(selector);
357
318
  }
358
- class MessageLog extends WSMan_1.Base {
359
- constructor() {
360
- super(...arguments);
361
- this.className = _1.Classes.MESSAGE_LOG;
362
- /**
363
- * Retrieves multiple records from MessageLog.
364
- * @param identifier the IterationIdentifier input parameter is a numeric value (starting at 1) which is the position of the first record in the log that should be extracted. If identifier isn't provided, defaults to 1.
365
- * @returns string
366
- */
367
- this.GetRecords = (identifier) => {
368
- if (identifier === undefined) {
369
- identifier = 1;
370
- }
371
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_RECORDS, this.className);
372
- const body = this.wsmanMessageCreator.createBody('GetRecords_INPUT', this.className, [
373
- { IterationIdentifier: identifier, MaxReadRecords: 390 }
374
- ]);
375
- return this.wsmanMessageCreator.createXml(header, body);
376
- };
377
- /**
378
- * Requests that an iteration of the MessageLog be established and that the iterator be set to the first entry in the Log. An identifier for the iterator is returned as an output parameter of the method.
379
- * @returns string
380
- */
381
- this.PositionToFirstRecord = () => {
382
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.POSITION_TO_FIRST_RECORD, this.className);
383
- const body = `<Body><h:PositionToFirstRecord_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${this.className}" /></Body>`;
384
- return this.wsmanMessageCreator.createXml(header, body);
385
- };
386
- }
319
+ class MessageLog extends Base {
320
+ className = Classes.MESSAGE_LOG;
321
+ /**
322
+ * Retrieves multiple records from MessageLog.
323
+ * @param identifier the IterationIdentifier input parameter is a numeric value (starting at 1) which is the position of the first record in the log that should be extracted. If identifier isn't provided, defaults to 1.
324
+ * @returns string
325
+ */
326
+ GetRecords = (identifier) => {
327
+ if (identifier === undefined) {
328
+ identifier = 1;
329
+ }
330
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_RECORDS, this.className);
331
+ const body = this.wsmanMessageCreator.createBody('GetRecords_INPUT', this.className, [
332
+ { IterationIdentifier: identifier, MaxReadRecords: 390 }
333
+ ]);
334
+ return this.wsmanMessageCreator.createXml(header, body);
335
+ };
336
+ /**
337
+ * Requests that an iteration of the MessageLog be established and that the iterator be set to the first entry in the Log. An identifier for the iterator is returned as an output parameter of the method.
338
+ * @returns string
339
+ */
340
+ PositionToFirstRecord = () => {
341
+ const header = this.wsmanMessageCreator.createHeader(Actions.POSITION_TO_FIRST_RECORD, this.className);
342
+ const body = `<Body><h:PositionToFirstRecord_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${this.className}" /></Body>`;
343
+ return this.wsmanMessageCreator.createXml(header, body);
344
+ };
387
345
  }
388
- class MPSUsernamePassword extends WSMan_1.Base {
389
- constructor() {
390
- super(...arguments);
391
- this.className = _1.Classes.MPS_USERNAME_PASSWORD;
392
- /**
393
- * Changes properties of MPSUsernamePassword.
394
- * @param mpsUsernamePassword MPSUsernamePassword Object.
395
- * @returns string
396
- */
397
- this.Put = (mpsUsernamePassword) => this.protectedPut(mpsUsernamePassword, false);
398
- }
346
+ class MPSUsernamePassword extends Base {
347
+ className = Classes.MPS_USERNAME_PASSWORD;
348
+ /**
349
+ * Changes properties of MPSUsernamePassword.
350
+ * @param mpsUsernamePassword MPSUsernamePassword Object.
351
+ * @returns string
352
+ */
353
+ Put = (mpsUsernamePassword) => this.protectedPut(mpsUsernamePassword, false);
399
354
  }
400
- class PublicKeyCertificate extends WSMan_1.Base {
401
- constructor() {
402
- super(...arguments);
403
- this.className = _1.Classes.PUBLIC_KEY_CERTIFICATE;
404
- /**
405
- * Deletes an instance
406
- * @param selector indicates the instance
407
- * @returns string
408
- */
409
- this.Delete = (selector) => this.protectedDelete(selector);
410
- /**
411
- * Changes properties of PublicKeyCertificate.
412
- * @param publicKeyCertificate Public Key Certificate object
413
- * @returns string
414
- */
415
- this.Put = (publicKeyCertificate) => this.protectedPut(publicKeyCertificate, false);
416
- }
355
+ class PublicKeyCertificate extends Base {
356
+ className = Classes.PUBLIC_KEY_CERTIFICATE;
357
+ /**
358
+ * Deletes an instance
359
+ * @param selector indicates the instance
360
+ * @returns string
361
+ */
362
+ Delete = (selector) => this.protectedDelete(selector);
363
+ /**
364
+ * Changes properties of PublicKeyCertificate.
365
+ * @param publicKeyCertificate Public Key Certificate object
366
+ * @returns string
367
+ */
368
+ Put = (publicKeyCertificate) => this.protectedPut(publicKeyCertificate, false);
417
369
  }
418
- class PublicKeyManagementService extends WSMan_1.Base {
419
- constructor() {
420
- super(...arguments);
421
- this.className = _1.Classes.PUBLIC_KEY_MANAGEMENT_SERVICE;
422
- /**
423
- * This method adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
424
- * @param addCertificate AddCertificate Object
425
- * @returns string
426
- */
427
- this.AddCertificate = (addCertificate) => {
428
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_CERTIFICATE, this.className);
429
- const body = this.wsmanMessageCreator.createBody('AddCertificate_INPUT', this.className, [addCertificate]);
430
- return this.wsmanMessageCreator.createXml(header, body);
431
- };
432
- /**
433
- * This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS or 802.1X).
434
- * @param keyBlob RSA Key encoded as DES PKCS#1
435
- * @returns string
436
- */
437
- this.AddKey = (keyBlob) => {
438
- const keyObj = {
439
- KeyBlob: keyBlob
440
- };
441
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_KEY, this.className);
442
- const body = this.wsmanMessageCreator.createBody('AddKey_INPUT', this.className, [keyObj]);
443
- return this.wsmanMessageCreator.createXml(header, body);
444
- };
445
- /**
446
- * This method adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
447
- * @param addCertificate AddCertificate Object
448
- * @returns string
449
- */
450
- this.AddTrustedRootCertificate = (addCertificate) => {
451
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_TRUSTED_ROOT_CERTIFICATE, this.className);
452
- const body = this.wsmanMessageCreator.createBody('AddTrustedRootCertificate_INPUT', this.className, [
453
- addCertificate
454
- ]);
455
- return this.wsmanMessageCreator.createXml(header, body);
456
- };
457
- /**
458
- * This method is used to generate a key in the FW.
459
- * @param keyPairParameters KeyPairParameters Object
460
- * @returns string
461
- */
462
- this.GenerateKeyPair = (keyPairParameters) => {
463
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GENERATE_KEY_PAIR, this.className);
464
- const body = this.wsmanMessageCreator.createBody('GenerateKeyPair_INPUT', this.className, [keyPairParameters]);
465
- return this.wsmanMessageCreator.createXml(header, body);
466
- };
467
- /**
468
- * This method is used to create a PKCS#10 certificate signing request based on a key from the key store.
469
- * @param pkcs10Request PKCS10Request Object
470
- * @returns string
471
- */
472
- this.GeneratePKCS10RequestEx = (pkcs10Request) => {
473
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GENERATE_PKCS10_REQUEST_EX, this.className);
474
- const body = this.wsmanMessageCreator.createBody('GeneratePKCS10RequestEx_INPUT', this.className, [pkcs10Request]);
475
- return this.wsmanMessageCreator.createXml(header, body);
476
- };
477
- }
370
+ class PublicKeyManagementService extends Base {
371
+ className = Classes.PUBLIC_KEY_MANAGEMENT_SERVICE;
372
+ /**
373
+ * This method adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
374
+ * @param addCertificate AddCertificate Object
375
+ * @returns string
376
+ */
377
+ AddCertificate = (addCertificate) => {
378
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_CERTIFICATE, this.className);
379
+ const body = this.wsmanMessageCreator.createBody('AddCertificate_INPUT', this.className, [addCertificate]);
380
+ return this.wsmanMessageCreator.createXml(header, body);
381
+ };
382
+ /**
383
+ * This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS or 802.1X).
384
+ * @param keyBlob RSA Key encoded as DES PKCS#1
385
+ * @returns string
386
+ */
387
+ AddKey = (keyBlob) => {
388
+ const keyObj = {
389
+ KeyBlob: keyBlob
390
+ };
391
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_KEY, this.className);
392
+ const body = this.wsmanMessageCreator.createBody('AddKey_INPUT', this.className, [keyObj]);
393
+ return this.wsmanMessageCreator.createXml(header, body);
394
+ };
395
+ /**
396
+ * This method adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
397
+ * @param addCertificate AddCertificate Object
398
+ * @returns string
399
+ */
400
+ AddTrustedRootCertificate = (addCertificate) => {
401
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_TRUSTED_ROOT_CERTIFICATE, this.className);
402
+ const body = this.wsmanMessageCreator.createBody('AddTrustedRootCertificate_INPUT', this.className, [
403
+ addCertificate
404
+ ]);
405
+ return this.wsmanMessageCreator.createXml(header, body);
406
+ };
407
+ /**
408
+ * This method is used to generate a key in the FW.
409
+ * @param keyPairParameters KeyPairParameters Object
410
+ * @returns string
411
+ */
412
+ GenerateKeyPair = (keyPairParameters) => {
413
+ const header = this.wsmanMessageCreator.createHeader(Actions.GENERATE_KEY_PAIR, this.className);
414
+ const body = this.wsmanMessageCreator.createBody('GenerateKeyPair_INPUT', this.className, [keyPairParameters]);
415
+ return this.wsmanMessageCreator.createXml(header, body);
416
+ };
417
+ /**
418
+ * This method is used to create a PKCS#10 certificate signing request based on a key from the key store.
419
+ * @param pkcs10Request PKCS10Request Object
420
+ * @returns string
421
+ */
422
+ GeneratePKCS10RequestEx = (pkcs10Request) => {
423
+ const header = this.wsmanMessageCreator.createHeader(Actions.GENERATE_PKCS10_REQUEST_EX, this.className);
424
+ const body = this.wsmanMessageCreator.createBody('GeneratePKCS10RequestEx_INPUT', this.className, [pkcs10Request]);
425
+ return this.wsmanMessageCreator.createXml(header, body);
426
+ };
478
427
  }
479
- class PublicPrivateKeyPair extends WSMan_1.Base {
480
- constructor() {
481
- super(...arguments);
482
- this.className = _1.Classes.PUBLIC_PRIVATE_KEY_PAIR; /**
483
- * Deletes an instance
484
- * @param selector indicates the instance
485
- * @returns string
486
- */
487
- this.Delete = (selector) => this.protectedDelete(selector);
488
- }
428
+ class PublicPrivateKeyPair extends Base {
429
+ className = Classes.PUBLIC_PRIVATE_KEY_PAIR; /**
430
+ * Deletes an instance
431
+ * @param selector indicates the instance
432
+ * @returns string
433
+ */
434
+ Delete = (selector) => this.protectedDelete(selector);
489
435
  }
490
- class RedirectionService extends WSMan_1.Base {
491
- constructor() {
492
- super(...arguments);
493
- this.className = _1.Classes.REDIRECTION_SERVICE;
494
- /**
495
- * Changes properties of RedirectionService.
496
- * @param redirectionService RedirectionService Object.
497
- * @returns string
498
- */
499
- this.Put = (redirectionService) => this.protectedPut(redirectionService, false);
500
- /**
501
- * Requests that the state of the element be changed to the value specified in the RequestedState parameter. The supported values in requestedState are 32768-32771.
502
- * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
503
- * @value_map 32768 = disable IDER and SOL, 32769 = enable IDER and disable SOL, 32770 = enable SOL and disable IDER, 32771 = enable IDER and SOL
504
- * @returns string
505
- */
506
- this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
507
- }
436
+ class RedirectionService extends Base {
437
+ className = Classes.REDIRECTION_SERVICE;
438
+ /**
439
+ * Changes properties of RedirectionService.
440
+ * @param redirectionService RedirectionService Object.
441
+ * @returns string
442
+ */
443
+ Put = (redirectionService) => this.protectedPut(redirectionService, false);
444
+ /**
445
+ * Requests that the state of the element be changed to the value specified in the RequestedState parameter. The supported values in requestedState are 32768-32771.
446
+ * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
447
+ * @value_map 32768 = disable IDER and SOL, 32769 = enable IDER and disable SOL, 32770 = enable SOL and disable IDER, 32771 = enable IDER and SOL
448
+ * @returns string
449
+ */
450
+ RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
508
451
  }
509
- class RemoteAccessPolicyAppliesToMPS extends WSMan_1.Base {
510
- constructor() {
511
- super(...arguments);
512
- this.className = _1.Classes.REMOTE_ACCESS_POLICY_APPLIES_TO_MPS;
513
- /**
514
- * Deletes an instance
515
- * @param selector indicates the instance
516
- * @returns string
517
- */
518
- this.Delete = (selector) => this.protectedDelete(selector);
519
- /**
520
- * Creates an instance of RemoteAccessPolicyAppliesToMPS
521
- * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object
522
- * @returns string
523
- */
524
- this.Create = (remoteAccessPolicyAppliesToMPS) => this.protectedCreate(remoteAccessPolicyAppliesToMPS);
525
- /**
526
- * Changes properties of RemoteAccessPolicyAppliesToMPS.
527
- * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object.
528
- * @returns string
529
- */
530
- this.Put = (remoteAccessPolicyAppliesToMPS) => this.protectedPut(remoteAccessPolicyAppliesToMPS, false);
531
- }
452
+ class RemoteAccessPolicyAppliesToMPS extends Base {
453
+ className = Classes.REMOTE_ACCESS_POLICY_APPLIES_TO_MPS;
454
+ /**
455
+ * Deletes an instance
456
+ * @param selector indicates the instance
457
+ * @returns string
458
+ */
459
+ Delete = (selector) => this.protectedDelete(selector);
460
+ /**
461
+ * Creates an instance of RemoteAccessPolicyAppliesToMPS
462
+ * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object
463
+ * @returns string
464
+ */
465
+ Create = (remoteAccessPolicyAppliesToMPS) => this.protectedCreate(remoteAccessPolicyAppliesToMPS);
466
+ /**
467
+ * Changes properties of RemoteAccessPolicyAppliesToMPS.
468
+ * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object.
469
+ * @returns string
470
+ */
471
+ Put = (remoteAccessPolicyAppliesToMPS) => this.protectedPut(remoteAccessPolicyAppliesToMPS, false);
532
472
  }
533
- class RemoteAccessPolicyRule extends WSMan_1.Base {
534
- constructor() {
535
- super(...arguments);
536
- this.className = _1.Classes.REMOTE_ACCESS_POLICY_RULE;
537
- /**
538
- * Deletes an instance
539
- * @param selector indicates the instance
540
- * @returns string
541
- */
542
- this.Delete = (selector) => this.protectedDelete(selector);
543
- /**
544
- * Changes properties of RemoteAccessPolicyRule
545
- * @param remoteAccessPolicyRule Remote Access Policy Rule object
546
- * @returns string
547
- */
548
- this.Put = (remoteAccessPolicyRule) => this.protectedPut(remoteAccessPolicyRule, false);
549
- }
473
+ class RemoteAccessPolicyRule extends Base {
474
+ className = Classes.REMOTE_ACCESS_POLICY_RULE;
475
+ /**
476
+ * Deletes an instance
477
+ * @param selector indicates the instance
478
+ * @returns string
479
+ */
480
+ Delete = (selector) => this.protectedDelete(selector);
481
+ /**
482
+ * Changes properties of RemoteAccessPolicyRule
483
+ * @param remoteAccessPolicyRule Remote Access Policy Rule object
484
+ * @returns string
485
+ */
486
+ Put = (remoteAccessPolicyRule) => this.protectedPut(remoteAccessPolicyRule, false);
550
487
  }
551
- class RemoteAccessService extends WSMan_1.Base {
552
- constructor() {
553
- super(...arguments);
554
- this.className = _1.Classes.REMOTE_ACCESS_SERVICE;
555
- /**
556
- * Requires mpServer. Adds a Management Presence Server to the Intel(R) AMT subsystem. Creates an AMT_ManagementPresenceRemoteSAP instance and an AMT_RemoteAccessCredentialContext association to a credential. This credential may be an existing AMT_PublicKeyCertificate instance (if the created MPS is configured to use mutual authentication). If the created MpServer is configured to use username password authentication, an AMT_MPSUsernamePassword instance is created and used as the associated credential.
557
- * @param mpServer MPServer Object.
558
- * @returns string
559
- */
560
- this.AddMPS = (mpServer) => {
561
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_MPS, _1.Classes.REMOTE_ACCESS_SERVICE);
562
- const body = `<Body><h:AddMpServer_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:AccessInfo>${mpServer.AccessInfo}</h:AccessInfo><h:InfoFormat>${mpServer.InfoFormat}</h:InfoFormat><h:Port>${mpServer.Port}</h:Port><h:AuthMethod>${mpServer.AuthMethod}</h:AuthMethod><h:Username>${mpServer.Username}</h:Username><h:Password>${mpServer.Password}</h:Password><h:CN>${mpServer.CommonName}</h:CN></h:AddMpServer_INPUT></Body>`;
563
- return this.wsmanMessageCreator.createXml(header, body);
564
- };
565
- /**
566
- * Requires remoteAccessPolicyRule and selector. Adds a Remote Access policy to the Intel(R) AMT subsystem. The policy defines an event that will trigger an establishment of a tunnel between AMT and a pre-configured MPS. Creates an AMT_RemoteAccessPolicyRule instance and associates it to a given list of AMT_ManagementPresenceRemoteSAP instances with AMT_PolicySetAppliesToElement association instances.
567
- * @param remoteAccessPolicyRule RemoteAccessPolicyRule Object.
568
- * @param selector Selector Object.
569
- * @returns string
570
- */
571
- this.AddRemoteAccessPolicyRule = (remoteAccessPolicyRule, selector) => {
572
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_REMOTE_ACCESS_POLICY_RULE, _1.Classes.REMOTE_ACCESS_SERVICE);
573
- const body = `<Body><h:AddRemoteAccessPolicyRule_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:Trigger>${remoteAccessPolicyRule.Trigger}</h:Trigger><h:TunnelLifeTime>${remoteAccessPolicyRule.TunnelLifeTime}</h:TunnelLifeTime><h:ExtendedData>${remoteAccessPolicyRule.ExtendedData}</h:ExtendedData><h:MpServer><Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">${this.wsmanMessageCreator.resourceUriBase}AMT_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="${selector.name}">${selector.value}</Selector></SelectorSet></ReferenceParameters></h:MpServer></h:AddRemoteAccessPolicyRule_INPUT></Body>`;
574
- return this.wsmanMessageCreator.createXml(header, body);
575
- };
576
- }
488
+ class RemoteAccessService extends Base {
489
+ className = Classes.REMOTE_ACCESS_SERVICE;
490
+ /**
491
+ * Requires mpServer. Adds a Management Presence Server to the Intel(R) AMT subsystem. Creates an AMT_ManagementPresenceRemoteSAP instance and an AMT_RemoteAccessCredentialContext association to a credential. This credential may be an existing AMT_PublicKeyCertificate instance (if the created MPS is configured to use mutual authentication). If the created MpServer is configured to use username password authentication, an AMT_MPSUsernamePassword instance is created and used as the associated credential.
492
+ * @param mpServer MPServer Object.
493
+ * @returns string
494
+ */
495
+ AddMPS = (mpServer) => {
496
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_MPS, Classes.REMOTE_ACCESS_SERVICE);
497
+ const body = `<Body><h:AddMpServer_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:AccessInfo>${mpServer.AccessInfo}</h:AccessInfo><h:InfoFormat>${mpServer.InfoFormat}</h:InfoFormat><h:Port>${mpServer.Port}</h:Port><h:AuthMethod>${mpServer.AuthMethod}</h:AuthMethod><h:Username>${mpServer.Username}</h:Username><h:Password>${mpServer.Password}</h:Password><h:CN>${mpServer.CommonName}</h:CN></h:AddMpServer_INPUT></Body>`;
498
+ return this.wsmanMessageCreator.createXml(header, body);
499
+ };
500
+ /**
501
+ * Requires remoteAccessPolicyRule and selector. Adds a Remote Access policy to the Intel(R) AMT subsystem. The policy defines an event that will trigger an establishment of a tunnel between AMT and a pre-configured MPS. Creates an AMT_RemoteAccessPolicyRule instance and associates it to a given list of AMT_ManagementPresenceRemoteSAP instances with AMT_PolicySetAppliesToElement association instances.
502
+ * @param remoteAccessPolicyRule RemoteAccessPolicyRule Object.
503
+ * @param selector Selector Object.
504
+ * @returns string
505
+ */
506
+ AddRemoteAccessPolicyRule = (remoteAccessPolicyRule, selector) => {
507
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_REMOTE_ACCESS_POLICY_RULE, Classes.REMOTE_ACCESS_SERVICE);
508
+ const body = `<Body><h:AddRemoteAccessPolicyRule_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:Trigger>${remoteAccessPolicyRule.Trigger}</h:Trigger><h:TunnelLifeTime>${remoteAccessPolicyRule.TunnelLifeTime}</h:TunnelLifeTime><h:ExtendedData>${remoteAccessPolicyRule.ExtendedData}</h:ExtendedData><h:MpServer><Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">${this.wsmanMessageCreator.resourceUriBase}AMT_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="${selector.name}">${selector.value}</Selector></SelectorSet></ReferenceParameters></h:MpServer></h:AddRemoteAccessPolicyRule_INPUT></Body>`;
509
+ return this.wsmanMessageCreator.createXml(header, body);
510
+ };
577
511
  }
578
- class SetupAndConfigurationService extends WSMan_1.Base {
579
- constructor() {
580
- super(...arguments);
581
- this.className = _1.Classes.SETUP_AND_CONFIGURATION_SERVICE;
582
- /**
583
- * Commits pending configuration commands made to the Intel(R) AMT device. Completes configuration when in "IN-provisioning" state.
584
- * @returns string
585
- */
586
- this.CommitChanges = () => {
587
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.COMMIT_CHANGES, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
588
- const body = this.wsmanMessageCreator.createBody('CommitChanges_INPUT', _1.Classes.SETUP_AND_CONFIGURATION_SERVICE, [
589
- {}
590
- ]);
591
- return this.wsmanMessageCreator.createXml(header, body);
592
- };
593
- /**
594
- * Pulls instances of SetupAndConfigurationService, following an Enumerate operation.
595
- * @param enumerationContext string returned from an Enumerate call.
596
- * @returns string
597
- */
598
- this.GetUuid = () => {
599
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_UUID, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
600
- const body = this.wsmanMessageCreator.createBody('GetUuid_INPUT', _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
601
- return this.wsmanMessageCreator.createXml(header, body);
602
- };
603
- /**
604
- * Requires password. This method sets the ME Bios extension password. It allows a remote caller to change the ME access password for the BIOS extension screen. This call succeeds depending on the password policy rule defined in MEBx (BIOS extension):"Default Password Only" - Method succeeds only when the current password is still the default value and only in PKI provisioning. "During Setup and Configuration" - Method succeeds only during provisioning, regardless of provisioning method or previous password value."ANYTIME" - Method will always succeed. (i.e. even when configured).
605
- * @param password Password needs to be strong: Contain at least one of: upper-case, lower-case, digit and special character.
606
- * @remarks Min Length = 8
607
- * @remarks Max Length = 32
608
- * @returns string
609
- */
610
- this.SetMEBXPassword = (password) => {
611
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_MEBX_PASSWORD, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
612
- const body = `<Body><h:SetMEBxPassword_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${_1.Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:Password>${password}</h:Password></h:SetMEBxPassword_INPUT></Body>`;
613
- return this.wsmanMessageCreator.createXml(header, body);
614
- };
615
- /**
616
- * Resets the Intel(R) AMT device to default factory settings. The device will need to be re-provisioned after this command.
617
- * @param provisioningMode Indicates the provisioning mode (Enterprise , Small Business or Remote Connectivity) the device will enter following successful completion of the command. Starting from Release 6.0 only effective value is ProvisioningModeEnterprise
618
- * @value_map 0 = ProvisioningModeCurrent, 1 = ProvisioningModeEnterprise, 2 = ProvisioningModeSmallBusiness, 3 = ProvisioningRemoteConnectivity
619
- * @returns string
620
- */
621
- this.Unprovision = (provisioningMode) => {
622
- if (provisioningMode === undefined) {
623
- provisioningMode = 1;
624
- }
625
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.UNPROVISION, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
626
- const body = `<Body><h:Unprovision_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${_1.Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:ProvisioningMode>${provisioningMode}</h:ProvisioningMode></h:Unprovision_INPUT></Body>`;
627
- return this.wsmanMessageCreator.createXml(header, body);
628
- };
629
- /**
630
- * Changes properties of Setup and Configuration Service
631
- * @param setupAndConfigurationService SetupAndConfigurationService object
632
- * @returns string
633
- */
634
- this.Put = (setupAndConfigurationService) => this.protectedPut(setupAndConfigurationService, false);
635
- }
512
+ class SetupAndConfigurationService extends Base {
513
+ className = Classes.SETUP_AND_CONFIGURATION_SERVICE;
514
+ /**
515
+ * Commits pending configuration commands made to the Intel(R) AMT device. Completes configuration when in "IN-provisioning" state.
516
+ * @returns string
517
+ */
518
+ CommitChanges = () => {
519
+ const header = this.wsmanMessageCreator.createHeader(Actions.COMMIT_CHANGES, Classes.SETUP_AND_CONFIGURATION_SERVICE);
520
+ const body = this.wsmanMessageCreator.createBody('CommitChanges_INPUT', Classes.SETUP_AND_CONFIGURATION_SERVICE, [
521
+ {}
522
+ ]);
523
+ return this.wsmanMessageCreator.createXml(header, body);
524
+ };
525
+ /**
526
+ * Pulls instances of SetupAndConfigurationService, following an Enumerate operation.
527
+ * @param enumerationContext string returned from an Enumerate call.
528
+ * @returns string
529
+ */
530
+ GetUuid = () => {
531
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_UUID, Classes.SETUP_AND_CONFIGURATION_SERVICE);
532
+ const body = this.wsmanMessageCreator.createBody('GetUuid_INPUT', Classes.SETUP_AND_CONFIGURATION_SERVICE);
533
+ return this.wsmanMessageCreator.createXml(header, body);
534
+ };
535
+ /**
536
+ * Requires password. This method sets the ME Bios extension password. It allows a remote caller to change the ME access password for the BIOS extension screen. This call succeeds depending on the password policy rule defined in MEBx (BIOS extension):"Default Password Only" - Method succeeds only when the current password is still the default value and only in PKI provisioning. "During Setup and Configuration" - Method succeeds only during provisioning, regardless of provisioning method or previous password value."ANYTIME" - Method will always succeed. (i.e. even when configured).
537
+ * @param password Password needs to be strong: Contain at least one of: upper-case, lower-case, digit and special character.
538
+ * @remarks Min Length = 8
539
+ * @remarks Max Length = 32
540
+ * @returns string
541
+ */
542
+ SetMEBXPassword = (password) => {
543
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_MEBX_PASSWORD, Classes.SETUP_AND_CONFIGURATION_SERVICE);
544
+ const body = `<Body><h:SetMEBxPassword_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:Password>${password}</h:Password></h:SetMEBxPassword_INPUT></Body>`;
545
+ return this.wsmanMessageCreator.createXml(header, body);
546
+ };
547
+ /**
548
+ * Resets the Intel(R) AMT device to default factory settings. The device will need to be re-provisioned after this command.
549
+ * @param provisioningMode Indicates the provisioning mode (Enterprise , Small Business or Remote Connectivity) the device will enter following successful completion of the command. Starting from Release 6.0 only effective value is ProvisioningModeEnterprise
550
+ * @value_map 0 = ProvisioningModeCurrent, 1 = ProvisioningModeEnterprise, 2 = ProvisioningModeSmallBusiness, 3 = ProvisioningRemoteConnectivity
551
+ * @returns string
552
+ */
553
+ Unprovision = (provisioningMode) => {
554
+ if (provisioningMode === undefined) {
555
+ provisioningMode = 1;
556
+ }
557
+ const header = this.wsmanMessageCreator.createHeader(Actions.UNPROVISION, Classes.SETUP_AND_CONFIGURATION_SERVICE);
558
+ const body = `<Body><h:Unprovision_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:ProvisioningMode>${provisioningMode}</h:ProvisioningMode></h:Unprovision_INPUT></Body>`;
559
+ return this.wsmanMessageCreator.createXml(header, body);
560
+ };
561
+ /**
562
+ * Changes properties of Setup and Configuration Service
563
+ * @param setupAndConfigurationService SetupAndConfigurationService object
564
+ * @returns string
565
+ */
566
+ Put = (setupAndConfigurationService) => this.protectedPut(setupAndConfigurationService, false);
636
567
  }
637
- class TimeSynchronizationService extends WSMan_1.Base {
638
- constructor() {
639
- super(...arguments);
640
- this.className = _1.Classes.TIME_SYNCHRONIZATION_SERVICE;
641
- /**
642
- * Requires ta0, tm1, tm2. This method is used to synchronize the Intel(R) AMT device's internal clock with an external clock.
643
- * @param ta0 The time value received from invoking GetLowAccuracyTimeSynch().
644
- * @param tm1 The remote client timestamp after getting a response from GetLowAccuracyTimeSynch().
645
- * @param tm2 The remote client timestamp obtained immediately prior to invoking this method.
646
- * @returns string
647
- */
648
- this.SetHighAccuracyTimeSynch = (ta0, tm1, tm2) => {
649
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_HIGH_ACCURACY_TIME_SYNCH, _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
650
- const body = this.wsmanMessageCreator.createBody('SetHighAccuracyTimeSynch_INPUT', _1.Classes.TIME_SYNCHRONIZATION_SERVICE, [
651
- {
652
- Ta0: ta0,
653
- Tm1: tm1,
654
- Tm2: tm2
655
- }
656
- ]);
657
- return this.wsmanMessageCreator.createXml(header, body);
658
- };
659
- /**
660
- * This method is used for reading the Intel(R) AMT device's internal clock.
661
- * @returns string
662
- */
663
- this.GetLowAccuracyTimeSynch = () => {
664
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_LOW_ACCURACY_TIME_SYNCH, _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
665
- const body = this.wsmanMessageCreator.createBody('GetLowAccuracyTimeSynch_INPUT', _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
666
- return this.wsmanMessageCreator.createXml(header, body);
667
- };
668
- }
568
+ class TimeSynchronizationService extends Base {
569
+ className = Classes.TIME_SYNCHRONIZATION_SERVICE;
570
+ /**
571
+ * Requires ta0, tm1, tm2. This method is used to synchronize the Intel(R) AMT device's internal clock with an external clock.
572
+ * @param ta0 The time value received from invoking GetLowAccuracyTimeSynch().
573
+ * @param tm1 The remote client timestamp after getting a response from GetLowAccuracyTimeSynch().
574
+ * @param tm2 The remote client timestamp obtained immediately prior to invoking this method.
575
+ * @returns string
576
+ */
577
+ SetHighAccuracyTimeSynch = (ta0, tm1, tm2) => {
578
+ const header = this.wsmanMessageCreator.createHeader(Actions.SET_HIGH_ACCURACY_TIME_SYNCH, Classes.TIME_SYNCHRONIZATION_SERVICE);
579
+ const body = this.wsmanMessageCreator.createBody('SetHighAccuracyTimeSynch_INPUT', Classes.TIME_SYNCHRONIZATION_SERVICE, [
580
+ {
581
+ Ta0: ta0,
582
+ Tm1: tm1,
583
+ Tm2: tm2
584
+ }
585
+ ]);
586
+ return this.wsmanMessageCreator.createXml(header, body);
587
+ };
588
+ /**
589
+ * This method is used for reading the Intel(R) AMT device's internal clock.
590
+ * @returns string
591
+ */
592
+ GetLowAccuracyTimeSynch = () => {
593
+ const header = this.wsmanMessageCreator.createHeader(Actions.GET_LOW_ACCURACY_TIME_SYNCH, Classes.TIME_SYNCHRONIZATION_SERVICE);
594
+ const body = this.wsmanMessageCreator.createBody('GetLowAccuracyTimeSynch_INPUT', Classes.TIME_SYNCHRONIZATION_SERVICE);
595
+ return this.wsmanMessageCreator.createXml(header, body);
596
+ };
669
597
  }
670
- class TLSCredentialContext extends WSMan_1.Base {
671
- constructor() {
672
- super(...arguments);
673
- this.className = _1.Classes.TLS_CREDENTIAL_CONTEXT;
674
- /**
675
- * Deletes an instance
676
- * @param selector indicates the instance
677
- * @returns string
678
- */
679
- this.Delete = (selector) => this.protectedDelete(selector);
680
- /**
681
- * Requires tlsCredentialContext. Creates a new instance of TLSCredentialContext.
682
- * @param tlsCredentialContext TLSCredentialContext Object.
683
- * @returns string
684
- */
685
- // TLS Credential Context object is highly complex and needs to use createBody function
686
- this.Create = (certHandle) => {
687
- const header = this.wsmanMessageCreator.createHeader(WSMan_1.BaseActions.CREATE, _1.Classes.TLS_CREDENTIAL_CONTEXT);
688
- // const body = this.wsmanMessageCreator.createBody('AMT_TLSCredentialContext', Classes.TLS_CREDENTIAL_CONTEXT, tlsCredentialContext)
689
- const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
690
- return this.wsmanMessageCreator.createXml(header, body);
691
- };
692
- /**
693
- * Updates an instance of TLSCredentialContext.
694
- * @param certHandle Certificate handle.
695
- * @returns string
696
- */
697
- this.Put = (certHandle) => {
698
- const header = this.wsmanMessageCreator.createHeader(WSMan_1.BaseActions.PUT, _1.Classes.TLS_CREDENTIAL_CONTEXT);
699
- const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
700
- return this.wsmanMessageCreator.createXml(header, body);
701
- };
702
- }
598
+ class TLSCredentialContext extends Base {
599
+ className = Classes.TLS_CREDENTIAL_CONTEXT;
600
+ /**
601
+ * Deletes an instance
602
+ * @param selector indicates the instance
603
+ * @returns string
604
+ */
605
+ Delete = (selector) => this.protectedDelete(selector);
606
+ /**
607
+ * Requires tlsCredentialContext. Creates a new instance of TLSCredentialContext.
608
+ * @param tlsCredentialContext TLSCredentialContext Object.
609
+ * @returns string
610
+ */
611
+ // TLS Credential Context object is highly complex and needs to use createBody function
612
+ Create = (certHandle) => {
613
+ const header = this.wsmanMessageCreator.createHeader(BaseActions.CREATE, Classes.TLS_CREDENTIAL_CONTEXT);
614
+ // const body = this.wsmanMessageCreator.createBody('AMT_TLSCredentialContext', Classes.TLS_CREDENTIAL_CONTEXT, tlsCredentialContext)
615
+ const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
616
+ return this.wsmanMessageCreator.createXml(header, body);
617
+ };
618
+ /**
619
+ * Updates an instance of TLSCredentialContext.
620
+ * @param certHandle Certificate handle.
621
+ * @returns string
622
+ */
623
+ Put = (certHandle) => {
624
+ const header = this.wsmanMessageCreator.createHeader(BaseActions.PUT, Classes.TLS_CREDENTIAL_CONTEXT);
625
+ const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
626
+ return this.wsmanMessageCreator.createXml(header, body);
627
+ };
703
628
  }
704
- class TLSSettingData extends WSMan_1.Base {
705
- constructor() {
706
- super(...arguments);
707
- this.className = _1.Classes.TLS_SETTING_DATA;
708
- /**
709
- * Changes properties of TLSSettingData.
710
- * @param tlsSettingData TLSSettingData Object.
711
- * @returns string
712
- */
713
- this.Put = (tlsSettingData) => this.protectedPut(tlsSettingData, true, { name: 'InstanceID', value: tlsSettingData.InstanceID });
714
- }
629
+ class TLSSettingData extends Base {
630
+ className = Classes.TLS_SETTING_DATA;
631
+ /**
632
+ * Changes properties of TLSSettingData.
633
+ * @param tlsSettingData TLSSettingData Object.
634
+ * @returns string
635
+ */
636
+ Put = (tlsSettingData) => this.protectedPut(tlsSettingData, true, { name: 'InstanceID', value: tlsSettingData.InstanceID });
715
637
  }
716
- class UserInitiatedConnectionService extends WSMan_1.Base {
717
- constructor() {
718
- super(...arguments);
719
- this.className = _1.Classes.USER_INITIATED_CONNECTION_SERVICE;
720
- /**
721
- * Requires requestedState. Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
722
- * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
723
- * @value_map 32768 = All Interfaces disabled, 32769 = BIOS Interface enabled, 32770 = OS Interface enabled, 32771 = BIOS and OS Interfaces enabled
724
- * @returns string
725
- */
726
- this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
727
- }
638
+ class UserInitiatedConnectionService extends Base {
639
+ className = Classes.USER_INITIATED_CONNECTION_SERVICE;
640
+ /**
641
+ * Requires requestedState. Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
642
+ * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
643
+ * @value_map 32768 = All Interfaces disabled, 32769 = BIOS Interface enabled, 32770 = OS Interface enabled, 32771 = BIOS and OS Interfaces enabled
644
+ * @returns string
645
+ */
646
+ RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
728
647
  }
729
- class WiFiPortConfigurationService extends WSMan_1.Base {
730
- constructor() {
731
- super(...arguments);
732
- this.className = _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE;
733
- /**
734
- * Atomically creates an instance of CIM_WifiEndpointSettings from the embedded instance parameter and optionally an instance of CIM_IEEE8021xSettings from the embedded instance parameter (if provided), associates the CIM_WiFiEndpointSettings instance with the referenced instance of CIM_WiFiEndpoint using an instance of CIM_ElementSettingData optionally associates the newly created or referenced by parameter instance of CIM_IEEE8021xSettings with the instance of CIM_WiFiEndpointSettings using an instance of CIM_ConcreteComponent and optionally associates the referenced instance of AMT_PublicKeyCertificate (if provided) with the instance of CIM_IEEE8021xSettings (if provided) using an instance of CIM_CredentialContext.
735
- * @param wifiEndpointSettings WiFiEndpointSettings Object
736
- * @param selector Selector Object.
737
- * @returns string
738
- */
739
- this.AddWiFiSettings = (wifiEndpointSettings, selector, ieee8021xSettingsInput, clientCredential, caCredential) => {
740
- var _a;
741
- const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_WIFI_SETTINGS, _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE);
742
- const dataArray = [];
743
- const wifiEndpointObject = {
744
- WiFiEndpoint: {
745
- Address: '/wsman',
648
+ class WiFiPortConfigurationService extends Base {
649
+ className = Classes.WIFI_PORT_CONFIGURATION_SERVICE;
650
+ /**
651
+ * Atomically creates an instance of CIM_WifiEndpointSettings from the embedded instance parameter and optionally an instance of CIM_IEEE8021xSettings from the embedded instance parameter (if provided), associates the CIM_WiFiEndpointSettings instance with the referenced instance of CIM_WiFiEndpoint using an instance of CIM_ElementSettingData optionally associates the newly created or referenced by parameter instance of CIM_IEEE8021xSettings with the instance of CIM_WiFiEndpointSettings using an instance of CIM_ConcreteComponent and optionally associates the referenced instance of AMT_PublicKeyCertificate (if provided) with the instance of CIM_IEEE8021xSettings (if provided) using an instance of CIM_CredentialContext.
652
+ * @param wifiEndpointSettings WiFiEndpointSettings Object
653
+ * @param selector Selector Object.
654
+ * @returns string
655
+ */
656
+ AddWiFiSettings = (wifiEndpointSettings, selector, ieee8021xSettingsInput, clientCredential, caCredential) => {
657
+ const header = this.wsmanMessageCreator.createHeader(Actions.ADD_WIFI_SETTINGS, Classes.WIFI_PORT_CONFIGURATION_SERVICE);
658
+ const dataArray = [];
659
+ const wifiEndpointObject = {
660
+ WiFiEndpoint: {
661
+ Address: '/wsman',
662
+ ReferenceParameters: {
663
+ ResourceURI: `http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CIM.Classes.WIFI_ENDPOINT}`,
664
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody(selector)
665
+ }
666
+ }
667
+ };
668
+ dataArray.push(wifiEndpointObject);
669
+ if (wifiEndpointSettings) {
670
+ // HANDLE SPECIAL CHARACTERS FOR XML
671
+ wifiEndpointSettings.PSKPassPhrase = wifiEndpointSettings.PSKPassPhrase?.replace(/&/g, '&amp;')
672
+ .replace(/</g, '&lt;')
673
+ .replace(/>/g, '&gt;')
674
+ .replace(/"/g, '&quot;')
675
+ .replace(/'/g, '&apos;');
676
+ const wifiEndpointSettingInputObject = {
677
+ WiFiEndpointSettingsInput: wifiEndpointSettings,
678
+ namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_WiFiEndpointSettings'
679
+ };
680
+ dataArray.push(wifiEndpointSettingInputObject);
681
+ }
682
+ if (ieee8021xSettingsInput) {
683
+ const ieee8021xSettingsInputObject = {
684
+ IEEE8021xSettingsInput: ieee8021xSettingsInput,
685
+ namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_IEEE8021xSettings'
686
+ };
687
+ dataArray.push(ieee8021xSettingsInputObject);
688
+ }
689
+ if (clientCredential) {
690
+ const clientCredentialObject = {
691
+ ClientCredential: {
692
+ Address: 'default',
746
693
  ReferenceParameters: {
747
- ResourceURI: `http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${__1.CIM.Classes.WIFI_ENDPOINT}`,
748
- SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody(selector)
694
+ ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
695
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
696
+ name: 'InstanceID',
697
+ value: clientCredential
698
+ })
749
699
  }
750
700
  }
751
701
  };
752
- dataArray.push(wifiEndpointObject);
753
- if (wifiEndpointSettings) {
754
- // HANDLE SPECIAL CHARACTERS FOR XML
755
- wifiEndpointSettings.PSKPassPhrase = (_a = wifiEndpointSettings.PSKPassPhrase) === null || _a === void 0 ? void 0 : _a.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
756
- const wifiEndpointSettingInputObject = {
757
- WiFiEndpointSettingsInput: wifiEndpointSettings,
758
- namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_WiFiEndpointSettings'
759
- };
760
- dataArray.push(wifiEndpointSettingInputObject);
761
- }
762
- if (ieee8021xSettingsInput) {
763
- const ieee8021xSettingsInputObject = {
764
- IEEE8021xSettingsInput: ieee8021xSettingsInput,
765
- namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_IEEE8021xSettings'
766
- };
767
- dataArray.push(ieee8021xSettingsInputObject);
768
- }
769
- if (clientCredential) {
770
- const clientCredentialObject = {
771
- ClientCredential: {
772
- Address: 'default',
773
- ReferenceParameters: {
774
- ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
775
- SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
776
- name: 'InstanceID',
777
- value: clientCredential
778
- })
779
- }
780
- }
781
- };
782
- dataArray.push(clientCredentialObject);
783
- }
784
- if (caCredential) {
785
- const caCredentialObject = {
786
- CACredential: {
787
- Address: 'default',
788
- ReferenceParameters: {
789
- ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
790
- SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
791
- name: 'InstanceID',
792
- value: caCredential
793
- })
794
- }
702
+ dataArray.push(clientCredentialObject);
703
+ }
704
+ if (caCredential) {
705
+ const caCredentialObject = {
706
+ CACredential: {
707
+ Address: 'default',
708
+ ReferenceParameters: {
709
+ ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
710
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
711
+ name: 'InstanceID',
712
+ value: caCredential
713
+ })
795
714
  }
796
- };
797
- dataArray.push(caCredentialObject);
798
- }
799
- const body = this.wsmanMessageCreator.createBody(_1.Methods.ADD_WIFI_SETTINGS + '_INPUT', _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE, dataArray);
800
- return this.wsmanMessageCreator.createXml(header, body);
801
- };
802
- /**
803
- * Changes properties of WiFiEndpointSettings
804
- * @param wifiEndpointSettings WiFiEndpointSettings Object
805
- * @param selector Selector Object.
806
- * @returns string
807
- */
808
- this.Put = (wifiEndpointSettings, selector) => this.protectedPut(wifiEndpointSettings, true, selector);
809
- }
715
+ }
716
+ };
717
+ dataArray.push(caCredentialObject);
718
+ }
719
+ const body = this.wsmanMessageCreator.createBody(Methods.ADD_WIFI_SETTINGS + '_INPUT', Classes.WIFI_PORT_CONFIGURATION_SERVICE, dataArray);
720
+ return this.wsmanMessageCreator.createXml(header, body);
721
+ };
722
+ /**
723
+ * Changes properties of WiFiEndpointSettings
724
+ * @param wifiEndpointSettings WiFiEndpointSettings Object
725
+ * @param selector Selector Object.
726
+ * @returns string
727
+ */
728
+ Put = (wifiEndpointSettings, selector) => this.protectedPut(wifiEndpointSettings, true, selector);
810
729
  }
811
- class Messages {
812
- constructor() {
813
- this.resourceUriBase = 'http://intel.com/wbem/wscim/1/amt-schema/1/';
814
- this.wsmanMessageCreator = new WSMan_1.WSManMessageCreator(this.resourceUriBase);
815
- this.AlarmClockService = new AlarmClockService(this.wsmanMessageCreator);
816
- this.AuditLog = new AuditLog(this.wsmanMessageCreator);
817
- this.AuthorizationService = new AuthorizationService(this.wsmanMessageCreator);
818
- this.BootCapabilities = new BootCapabilities(this.wsmanMessageCreator);
819
- this.BootSettingData = new BootSettingData(this.wsmanMessageCreator);
820
- this.EnvironmentDetectionSettingData = new EnvironmentDetectionSettingData(this.wsmanMessageCreator);
821
- this.EthernetPortSettings = new EthernetPortSettings(this.wsmanMessageCreator);
822
- this.GeneralSettings = new GeneralSettings(this.wsmanMessageCreator);
823
- this.IEEE8021xCredentialContext = new IEEE8021xCredentialContext(this.wsmanMessageCreator);
824
- this.IEEE8021xProfile = new IEEE8021xProfile(this.wsmanMessageCreator);
825
- this.KerberosSettingData = new KerberosSettingData(this.wsmanMessageCreator);
826
- this.ManagementPresenceRemoteSAP = new ManagementPresenceRemoteSAP(this.wsmanMessageCreator);
827
- this.MessageLog = new MessageLog(this.wsmanMessageCreator);
828
- this.MPSUsernamePassword = new MPSUsernamePassword(this.wsmanMessageCreator);
829
- this.PublicKeyCertificate = new PublicKeyCertificate(this.wsmanMessageCreator);
830
- this.PublicKeyManagementService = new PublicKeyManagementService(this.wsmanMessageCreator);
831
- this.PublicPrivateKeyPair = new PublicPrivateKeyPair(this.wsmanMessageCreator);
832
- this.RedirectionService = new RedirectionService(this.wsmanMessageCreator);
833
- this.RemoteAccessPolicyAppliesToMPS = new RemoteAccessPolicyAppliesToMPS(this.wsmanMessageCreator);
834
- this.RemoteAccessPolicyRule = new RemoteAccessPolicyRule(this.wsmanMessageCreator);
835
- this.RemoteAccessService = new RemoteAccessService(this.wsmanMessageCreator);
836
- this.SetupAndConfigurationService = new SetupAndConfigurationService(this.wsmanMessageCreator);
837
- this.TimeSynchronizationService = new TimeSynchronizationService(this.wsmanMessageCreator);
838
- this.TLSCredentialContext = new TLSCredentialContext(this.wsmanMessageCreator);
839
- this.TLSSettingData = new TLSSettingData(this.wsmanMessageCreator);
840
- this.UserInitiatedConnectionService = new UserInitiatedConnectionService(this.wsmanMessageCreator);
841
- this.WiFiPortConfigurationService = new WiFiPortConfigurationService(this.wsmanMessageCreator);
842
- }
730
+ export class Messages {
731
+ resourceUriBase = 'http://intel.com/wbem/wscim/1/amt-schema/1/';
732
+ wsmanMessageCreator = new WSManMessageCreator(this.resourceUriBase);
733
+ AlarmClockService = new AlarmClockService(this.wsmanMessageCreator);
734
+ AuditLog = new AuditLog(this.wsmanMessageCreator);
735
+ AuthorizationService = new AuthorizationService(this.wsmanMessageCreator);
736
+ BootCapabilities = new BootCapabilities(this.wsmanMessageCreator);
737
+ BootSettingData = new BootSettingData(this.wsmanMessageCreator);
738
+ EnvironmentDetectionSettingData = new EnvironmentDetectionSettingData(this.wsmanMessageCreator);
739
+ EthernetPortSettings = new EthernetPortSettings(this.wsmanMessageCreator);
740
+ GeneralSettings = new GeneralSettings(this.wsmanMessageCreator);
741
+ IEEE8021xCredentialContext = new IEEE8021xCredentialContext(this.wsmanMessageCreator);
742
+ IEEE8021xProfile = new IEEE8021xProfile(this.wsmanMessageCreator);
743
+ KerberosSettingData = new KerberosSettingData(this.wsmanMessageCreator);
744
+ ManagementPresenceRemoteSAP = new ManagementPresenceRemoteSAP(this.wsmanMessageCreator);
745
+ MessageLog = new MessageLog(this.wsmanMessageCreator);
746
+ MPSUsernamePassword = new MPSUsernamePassword(this.wsmanMessageCreator);
747
+ PublicKeyCertificate = new PublicKeyCertificate(this.wsmanMessageCreator);
748
+ PublicKeyManagementService = new PublicKeyManagementService(this.wsmanMessageCreator);
749
+ PublicPrivateKeyPair = new PublicPrivateKeyPair(this.wsmanMessageCreator);
750
+ RedirectionService = new RedirectionService(this.wsmanMessageCreator);
751
+ RemoteAccessPolicyAppliesToMPS = new RemoteAccessPolicyAppliesToMPS(this.wsmanMessageCreator);
752
+ RemoteAccessPolicyRule = new RemoteAccessPolicyRule(this.wsmanMessageCreator);
753
+ RemoteAccessService = new RemoteAccessService(this.wsmanMessageCreator);
754
+ SetupAndConfigurationService = new SetupAndConfigurationService(this.wsmanMessageCreator);
755
+ TimeSynchronizationService = new TimeSynchronizationService(this.wsmanMessageCreator);
756
+ TLSCredentialContext = new TLSCredentialContext(this.wsmanMessageCreator);
757
+ TLSSettingData = new TLSSettingData(this.wsmanMessageCreator);
758
+ UserInitiatedConnectionService = new UserInitiatedConnectionService(this.wsmanMessageCreator);
759
+ WiFiPortConfigurationService = new WiFiPortConfigurationService(this.wsmanMessageCreator);
843
760
  }
844
- exports.Messages = Messages;
845
761
  //# sourceMappingURL=messages.js.map