homebridge-adt-pulse 3.3.1 → 3.4.0

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.
package/build/lib/api.js CHANGED
@@ -4,22 +4,26 @@ import { JSDOM } from 'jsdom';
4
4
  import _ from 'lodash';
5
5
  import { serializeError } from 'serialize-error';
6
6
  import { CookieJar } from 'tough-cookie';
7
- import { detectApiDebugParser, detectApiDoSubmitHandlers, detectApiGatewayInformation, detectApiOrbSecurityButtons, detectApiPanelInformation, detectApiPanelStatus, detectApiPortalVersion, detectApiSensorsInformation, detectApiSensorsStatus, } from './detect.js';
7
+ import { detectApiDoSubmitHandlers, detectApiGatewayInformation, detectApiOrbSecurityButtons, detectApiPanelInformation, detectApiPanelStatus, detectApiSensorsInformation, detectApiSensorsStatus, detectGlobalDebugParser, detectGlobalPortalVersion, } from './detect.js';
8
+ import { generateFakeDynatracePCHeaderValue, generateFakeReadyButtons, } from './fake.js';
8
9
  import { paramNetworkId, paramSat, requestPathAccessSignIn, requestPathAccessSignInEXxPartnerAdt, requestPathAccessSignInNetworkIdXxPartnerAdt, requestPathAjaxSyncCheckServTXx, requestPathKeepAlive, requestPathMfaMfaSignInWorkflowChallenge, requestPathQuickControlArmDisarm, requestPathQuickControlServRunRraCommand, requestPathSummarySummary, requestPathSystemDeviceId1, requestPathSystemGateway, requestPathSystemSystem, textPanelEmergencyKeys, textPanelTypeModel, } from './regex.js';
9
- import { debugLog, fetchErrorMessage, fetchMissingSatCode, fetchTableCells, findGatewayManufacturerModel, findNullKeys, findPanelManufacturer, generateDynatracePCHeaderValue, generateFakeReadyButtons, generateHash, isPortalSyncCode, isSessionCleanState, parseArmDisarmMessage, parseDoSubmitHandlers, parseOrbSecurityButtons, parseOrbSensors, parseOrbTextSummary, parseSensorsTable, sleep, stackTracer, } from './utility.js';
10
- export class ADTPulse {
10
+ import { debugLog, fetchErrorMessage, fetchMissingSatCode, fetchTableCells, findGatewayManufacturerModel, findNullKeys, findPanelManufacturer, generateHash, isPortalSyncCode, isSessionCleanState, parseArmDisarmMessage, parseDoSubmitHandlers, parseOrbSecurityButtons, parseOrbSensors, parseOrbTextSummary, parseSensorsTable, sleep, stackTracer, } from './utility.js';
11
+ export class ADTPulseAPI {
12
+ #connection;
11
13
  #credentials;
12
14
  #internal;
13
15
  #session;
14
16
  constructor(config, internalConfig) {
17
+ this.#connection = {
18
+ subdomain: config.subdomain,
19
+ };
15
20
  this.#credentials = {
16
21
  fingerprint: config.fingerprint,
17
22
  password: config.password,
18
- subdomain: config.subdomain,
19
23
  username: config.username,
20
24
  };
21
25
  this.#internal = {
22
- baseUrl: internalConfig.baseUrl ?? `https://${this.#credentials.subdomain}.adtpulse.com`,
26
+ baseUrl: internalConfig.baseUrl ?? `https://${this.#connection.subdomain}.adtpulse.com`,
23
27
  debug: internalConfig.debug ?? false,
24
28
  logger: internalConfig.logger ?? null,
25
29
  reportedHashes: [],
@@ -42,7 +46,7 @@ export class ADTPulse {
42
46
  };
43
47
  if (config.speed !== 1) {
44
48
  if (this.#internal.debug) {
45
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.constructor()', 'warn', `Plugin is now running under ${config.speed}x operational speed. You may see slower device updates`);
49
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.constructor()', 'warn', `Plugin is now running under ${config.speed}x operational speed. You may see slower device updates`);
46
50
  }
47
51
  switch (config.speed) {
48
52
  case 0.75:
@@ -62,13 +66,13 @@ export class ADTPulse {
62
66
  async login() {
63
67
  let errorObject;
64
68
  if (this.#internal.debug) {
65
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', `Attempting to login to "${this.#internal.baseUrl}"`);
69
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', `Attempting to login to "${this.#internal.baseUrl}"`);
66
70
  }
67
71
  try {
68
72
  const sessions = {};
69
73
  if (this.isAuthenticated()) {
70
74
  if (this.#internal.debug) {
71
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', [
75
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', [
72
76
  'Already logged in',
73
77
  [
74
78
  '(',
@@ -94,7 +98,7 @@ export class ADTPulse {
94
98
  sessions.axiosIndex = await this.#session.httpClient.get(`${this.#internal.baseUrl}/`, this.getRequestConfig());
95
99
  if (sessions.axiosIndex.status >= 400) {
96
100
  if (this.#internal.debug) {
97
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', `The remote server responded with a HTTP ${sessions.axiosIndex.status} status code`);
101
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', `The remote server responded with a HTTP ${sessions.axiosIndex.status} status code`);
98
102
  }
99
103
  return {
100
104
  action: 'LOGIN',
@@ -106,7 +110,7 @@ export class ADTPulse {
106
110
  }
107
111
  if (typeof sessions.axiosIndex?.request === 'undefined') {
108
112
  if (this.#internal.debug) {
109
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', 'The HTTP client responded without the "request" object');
113
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', 'The HTTP client responded without the "request" object');
110
114
  }
111
115
  return {
112
116
  action: 'LOGIN',
@@ -119,12 +123,12 @@ export class ADTPulse {
119
123
  const axiosIndexRequestPath = sessions.axiosIndex.request.path;
120
124
  const axiosIndexRequestPathValid = requestPathAccessSignIn.test(axiosIndexRequestPath);
121
125
  if (this.#internal.debug) {
122
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', `Request path ➜ ${axiosIndexRequestPath}`);
123
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', `Request path valid ➜ ${axiosIndexRequestPathValid}`);
126
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', `Request path ➜ ${axiosIndexRequestPath}`);
127
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', `Request path valid ➜ ${axiosIndexRequestPathValid}`);
124
128
  }
125
129
  if (!axiosIndexRequestPathValid) {
126
130
  if (this.#internal.debug) {
127
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', `"${axiosIndexRequestPath} is not the sign-in page`);
131
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', `"${axiosIndexRequestPath} is not the sign-in page`);
128
132
  }
129
133
  this.handleLoginFailure(axiosIndexRequestPath, sessions.axiosIndex);
130
134
  return {
@@ -143,7 +147,7 @@ export class ADTPulse {
143
147
  loginForm.append('fingerprint', this.#credentials.fingerprint);
144
148
  this.#session.portalVersion = axiosIndexRequestPath.replace(requestPathAccessSignIn, '$2');
145
149
  await this.newInformationDispatcher('portal-version', { version: this.#session.portalVersion });
146
- sessions.axiosSignin = await this.#session.httpClient.post(`${this.#internal.baseUrl}/myhome/${this.#session.portalVersion}/access/signin.jsp?e=ns&partner=adt`, loginForm, this.getRequestConfig({
150
+ sessions.axiosSignIn = await this.#session.httpClient.post(`${this.#internal.baseUrl}/myhome/${this.#session.portalVersion}/access/signin.jsp?e=ns&partner=adt`, loginForm, this.getRequestConfig({
147
151
  headers: {
148
152
  'Cache-Control': 'max-age=0',
149
153
  'Content-Type': 'application/x-www-form-urlencoded',
@@ -154,7 +158,7 @@ export class ADTPulse {
154
158
  }));
155
159
  if (sessions.axiosIndex.status >= 400) {
156
160
  if (this.#internal.debug) {
157
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', `The remote server responded with a HTTP ${sessions.axiosIndex.status} status code`);
161
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', `The remote server responded with a HTTP ${sessions.axiosIndex.status} status code`);
158
162
  }
159
163
  return {
160
164
  action: 'LOGIN',
@@ -164,9 +168,9 @@ export class ADTPulse {
164
168
  },
165
169
  };
166
170
  }
167
- if (typeof sessions.axiosSignin?.request === 'undefined') {
171
+ if (typeof sessions.axiosSignIn?.request === 'undefined') {
168
172
  if (this.#internal.debug) {
169
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', 'The HTTP client responded without the "request" object');
173
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', 'The HTTP client responded without the "request" object');
170
174
  }
171
175
  return {
172
176
  action: 'LOGIN',
@@ -176,28 +180,28 @@ export class ADTPulse {
176
180
  },
177
181
  };
178
182
  }
179
- const axiosSigninRequestPath = sessions.axiosSignin.request.path;
180
- const axiosSigninRequestPathValid = requestPathSummarySummary.test(axiosSigninRequestPath);
183
+ const axiosSignInRequestPath = sessions.axiosSignIn.request.path;
184
+ const axiosSignInRequestPathValid = requestPathSummarySummary.test(axiosSignInRequestPath);
181
185
  if (this.#internal.debug) {
182
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', `Request path ➜ ${axiosSigninRequestPath}`);
183
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'info', `Request path valid ➜ ${axiosSigninRequestPathValid}`);
186
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', `Request path ➜ ${axiosSignInRequestPath}`);
187
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'info', `Request path valid ➜ ${axiosSignInRequestPathValid}`);
184
188
  }
185
- if (!axiosSigninRequestPathValid) {
189
+ if (!axiosSignInRequestPathValid) {
186
190
  if (this.#internal.debug) {
187
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', `"${axiosSigninRequestPath}" is not the summary page`);
191
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', `"${axiosSignInRequestPath}" is not the summary page`);
188
192
  }
189
- this.handleLoginFailure(axiosSigninRequestPath, sessions.axiosSignin);
193
+ this.handleLoginFailure(axiosSignInRequestPath, sessions.axiosSignIn);
190
194
  return {
191
195
  action: 'LOGIN',
192
196
  success: false,
193
197
  info: {
194
- message: `"${axiosSigninRequestPath}" is not the summary page`,
198
+ message: `"${axiosSignInRequestPath}" is not the summary page`,
195
199
  },
196
200
  };
197
201
  }
198
- if (typeof sessions.axiosSignin.data !== 'string') {
202
+ if (typeof sessions.axiosSignIn.data !== 'string') {
199
203
  if (this.#internal.debug) {
200
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', 'The response body of the summary page is not of type "string"');
204
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', 'The response body of the summary page is not of type "string"');
201
205
  }
202
206
  return {
203
207
  action: 'LOGIN',
@@ -207,16 +211,16 @@ export class ADTPulse {
207
211
  },
208
212
  };
209
213
  }
210
- const matchNetworkId = sessions.axiosSignin.data.match(paramNetworkId);
214
+ const matchNetworkId = sessions.axiosSignIn.data.match(paramNetworkId);
211
215
  this.#session.networkId = (matchNetworkId !== null && matchNetworkId.length >= 2) ? matchNetworkId[1] : null;
212
- const matchSatCode = sessions.axiosSignin.data.match(paramSat);
216
+ const matchSatCode = sessions.axiosSignIn.data.match(paramSat);
213
217
  this.#session.backupSatCode = (matchSatCode !== null && matchSatCode.length >= 2) ? matchSatCode[1] : null;
214
218
  if (this.#session.backupSatCode === null && this.#internal.debug) {
215
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'warn', 'Unable to backup sat code, will try again when system becomes available');
219
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'warn', 'Unable to backup sat code, will try again when system becomes available');
216
220
  }
217
221
  this.#session.isAuthenticated = true;
218
222
  if (this.#internal.debug) {
219
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'success', [
223
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'success', [
220
224
  'Login successful',
221
225
  [
222
226
  '(',
@@ -243,7 +247,7 @@ export class ADTPulse {
243
247
  errorObject = serializeError(error);
244
248
  }
245
249
  if (this.#internal.debug) {
246
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.login()', 'error', 'Method encountered an error during execution');
250
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.login()', 'error', 'Method encountered an error during execution');
247
251
  stackTracer('serialize-error', errorObject);
248
252
  }
249
253
  return {
@@ -257,13 +261,13 @@ export class ADTPulse {
257
261
  async logout() {
258
262
  let errorObject;
259
263
  if (this.#internal.debug) {
260
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'info', `Attempting to logout of "${this.#internal.baseUrl}"`);
264
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'info', `Attempting to logout of "${this.#internal.baseUrl}"`);
261
265
  }
262
266
  try {
263
267
  const sessions = {};
264
268
  if (!this.isAuthenticated()) {
265
269
  if (this.#internal.debug) {
266
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'info', [
270
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'info', [
267
271
  'Already logged out',
268
272
  [
269
273
  '(',
@@ -294,7 +298,7 @@ export class ADTPulse {
294
298
  }));
295
299
  if (sessions.axiosSignout.status >= 400) {
296
300
  if (this.#internal.debug) {
297
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'error', `The remote server responded with a HTTP ${sessions.axiosSignout.status} status code`);
301
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'error', `The remote server responded with a HTTP ${sessions.axiosSignout.status} status code`);
298
302
  }
299
303
  return {
300
304
  action: 'LOGOUT',
@@ -306,7 +310,7 @@ export class ADTPulse {
306
310
  }
307
311
  if (typeof sessions.axiosSignout?.request === 'undefined') {
308
312
  if (this.#internal.debug) {
309
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'error', 'The HTTP client responded without the "request" object');
313
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'error', 'The HTTP client responded without the "request" object');
310
314
  }
311
315
  return {
312
316
  action: 'LOGOUT',
@@ -319,12 +323,12 @@ export class ADTPulse {
319
323
  const axiosSignoutRequestPath = sessions.axiosSignout.request.path;
320
324
  const axiosSignoutRequestPathValid = requestPathAccessSignInNetworkIdXxPartnerAdt.test(axiosSignoutRequestPath);
321
325
  if (this.#internal.debug) {
322
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'info', `Request path ➜ ${axiosSignoutRequestPath}`);
323
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'info', `Request path valid ➜ ${axiosSignoutRequestPathValid}`);
326
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'info', `Request path ➜ ${axiosSignoutRequestPath}`);
327
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'info', `Request path valid ➜ ${axiosSignoutRequestPathValid}`);
324
328
  }
325
329
  if (!axiosSignoutRequestPathValid) {
326
330
  if (this.#internal.debug) {
327
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'error', `"${axiosSignoutRequestPath}" is not the sign-in page with "networkid" and "partner=adt" parameters`);
331
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'error', `"${axiosSignoutRequestPath}" is not the sign-in page with "networkid" and "partner=adt" parameters`);
328
332
  }
329
333
  this.handleLoginFailure(axiosSignoutRequestPath, sessions.axiosSignout);
330
334
  return {
@@ -337,7 +341,7 @@ export class ADTPulse {
337
341
  }
338
342
  this.resetSession();
339
343
  if (this.#internal.debug) {
340
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'success', [
344
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'success', [
341
345
  'Logout successful',
342
346
  [
343
347
  '(',
@@ -364,7 +368,7 @@ export class ADTPulse {
364
368
  errorObject = serializeError(error);
365
369
  }
366
370
  if (this.#internal.debug) {
367
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.logout()', 'error', 'Method encountered an error during execution');
371
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.logout()', 'error', 'Method encountered an error during execution');
368
372
  stackTracer('serialize-error', errorObject);
369
373
  }
370
374
  return {
@@ -378,7 +382,7 @@ export class ADTPulse {
378
382
  async getGatewayInformation() {
379
383
  let errorObject;
380
384
  if (this.#internal.debug) {
381
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'info', `Attempting to retrieve gateway information from "${this.#internal.baseUrl}"`);
385
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'info', `Attempting to retrieve gateway information from "${this.#internal.baseUrl}"`);
382
386
  }
383
387
  try {
384
388
  const sessions = {};
@@ -391,7 +395,7 @@ export class ADTPulse {
391
395
  }));
392
396
  if (sessions.axiosSystemGateway.status >= 400) {
393
397
  if (this.#internal.debug) {
394
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystemGateway.status} status code`);
398
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystemGateway.status} status code`);
395
399
  }
396
400
  return {
397
401
  action: 'GET_GATEWAY_INFORMATION',
@@ -403,7 +407,7 @@ export class ADTPulse {
403
407
  }
404
408
  if (typeof sessions.axiosSystemGateway?.request === 'undefined') {
405
409
  if (this.#internal.debug) {
406
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'error', 'The HTTP client responded without the "request" object');
410
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'error', 'The HTTP client responded without the "request" object');
407
411
  }
408
412
  return {
409
413
  action: 'GET_GATEWAY_INFORMATION',
@@ -416,12 +420,12 @@ export class ADTPulse {
416
420
  const axiosSystemGatewayRequestPath = sessions.axiosSystemGateway.request.path;
417
421
  const axiosSystemGatewayRequestPathValid = requestPathSystemGateway.test(axiosSystemGatewayRequestPath);
418
422
  if (this.#internal.debug) {
419
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'info', `Request path ➜ ${axiosSystemGatewayRequestPath}`);
420
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'info', `Request path valid ➜ ${axiosSystemGatewayRequestPathValid}`);
423
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'info', `Request path ➜ ${axiosSystemGatewayRequestPath}`);
424
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'info', `Request path valid ➜ ${axiosSystemGatewayRequestPathValid}`);
421
425
  }
422
426
  if (!axiosSystemGatewayRequestPathValid) {
423
427
  if (this.#internal.debug) {
424
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'error', `"${axiosSystemGatewayRequestPath}" is not the system gateway page`);
428
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'error', `"${axiosSystemGatewayRequestPath}" is not the system gateway page`);
425
429
  }
426
430
  this.handleLoginFailure(axiosSystemGatewayRequestPath, sessions.axiosSystemGateway);
427
431
  return {
@@ -434,7 +438,7 @@ export class ADTPulse {
434
438
  }
435
439
  if (typeof sessions.axiosSystemGateway.data !== 'string') {
436
440
  if (this.#internal.debug) {
437
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'error', 'The response body of the system gateway page is not of type "string"');
441
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'error', 'The response body of the system gateway page is not of type "string"');
438
442
  }
439
443
  return {
440
444
  action: 'GET_GATEWAY_INFORMATION',
@@ -516,7 +520,7 @@ export class ADTPulse {
516
520
  rawHtml: sessions.axiosSystemGateway.data,
517
521
  });
518
522
  if (this.#internal.debug) {
519
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'success', `Successfully retrieved gateway information from "${this.#internal.baseUrl}"`);
523
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'success', `Successfully retrieved gateway information from "${this.#internal.baseUrl}"`);
520
524
  }
521
525
  return {
522
526
  action: 'GET_GATEWAY_INFORMATION',
@@ -528,7 +532,7 @@ export class ADTPulse {
528
532
  errorObject = serializeError(error);
529
533
  }
530
534
  if (this.#internal.debug) {
531
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getGatewayInformation()', 'error', 'Method encountered an error during execution');
535
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getGatewayInformation()', 'error', 'Method encountered an error during execution');
532
536
  stackTracer('serialize-error', errorObject);
533
537
  }
534
538
  return {
@@ -542,7 +546,7 @@ export class ADTPulse {
542
546
  async getPanelInformation() {
543
547
  let errorObject;
544
548
  if (this.#internal.debug) {
545
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'info', `Attempting to retrieve panel information from "${this.#internal.baseUrl}"`);
549
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'info', `Attempting to retrieve panel information from "${this.#internal.baseUrl}"`);
546
550
  }
547
551
  try {
548
552
  const sessions = {};
@@ -554,7 +558,7 @@ export class ADTPulse {
554
558
  }));
555
559
  if (sessions.axiosSystemDeviceId1.status >= 400) {
556
560
  if (this.#internal.debug) {
557
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystemDeviceId1.status} status code`);
561
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystemDeviceId1.status} status code`);
558
562
  }
559
563
  return {
560
564
  action: 'GET_PANEL_INFORMATION',
@@ -566,7 +570,7 @@ export class ADTPulse {
566
570
  }
567
571
  if (typeof sessions.axiosSystemDeviceId1?.request === 'undefined') {
568
572
  if (this.#internal.debug) {
569
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'error', 'The HTTP client responded without the "request" object');
573
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'error', 'The HTTP client responded without the "request" object');
570
574
  }
571
575
  return {
572
576
  action: 'GET_PANEL_INFORMATION',
@@ -579,12 +583,12 @@ export class ADTPulse {
579
583
  const axiosSystemDeviceId1RequestPath = sessions.axiosSystemDeviceId1.request.path;
580
584
  const axiosSystemDeviceId1RequestPathValid = requestPathSystemDeviceId1.test(axiosSystemDeviceId1RequestPath);
581
585
  if (this.#internal.debug) {
582
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'info', `Request path ➜ ${axiosSystemDeviceId1RequestPath}`);
583
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'info', `Request path valid ➜ ${axiosSystemDeviceId1RequestPathValid}`);
586
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'info', `Request path ➜ ${axiosSystemDeviceId1RequestPath}`);
587
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'info', `Request path valid ➜ ${axiosSystemDeviceId1RequestPathValid}`);
584
588
  }
585
589
  if (!axiosSystemDeviceId1RequestPathValid) {
586
590
  if (this.#internal.debug) {
587
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'error', `"${axiosSystemDeviceId1RequestPath}" is not the system device id 1 page`);
591
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'error', `"${axiosSystemDeviceId1RequestPath}" is not the system device id 1 page`);
588
592
  }
589
593
  this.handleLoginFailure(axiosSystemDeviceId1RequestPath, sessions.axiosSystemDeviceId1);
590
594
  return {
@@ -597,7 +601,7 @@ export class ADTPulse {
597
601
  }
598
602
  if (typeof sessions.axiosSystemDeviceId1.data !== 'string') {
599
603
  if (this.#internal.debug) {
600
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'error', 'The response body of the system device id 1 page is not of type "string"');
604
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'error', 'The response body of the system device id 1 page is not of type "string"');
601
605
  }
602
606
  return {
603
607
  action: 'GET_PANEL_INFORMATION',
@@ -644,7 +648,7 @@ export class ADTPulse {
644
648
  rawHtml: sessions.axiosSystemDeviceId1.data,
645
649
  });
646
650
  if (this.#internal.debug) {
647
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'success', `Successfully retrieved panel information from "${this.#internal.baseUrl}"`);
651
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'success', `Successfully retrieved panel information from "${this.#internal.baseUrl}"`);
648
652
  }
649
653
  return {
650
654
  action: 'GET_PANEL_INFORMATION',
@@ -656,7 +660,7 @@ export class ADTPulse {
656
660
  errorObject = serializeError(error);
657
661
  }
658
662
  if (this.#internal.debug) {
659
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelInformation()', 'error', 'Method encountered an error during execution');
663
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelInformation()', 'error', 'Method encountered an error during execution');
660
664
  stackTracer('serialize-error', errorObject);
661
665
  }
662
666
  return {
@@ -670,7 +674,7 @@ export class ADTPulse {
670
674
  async getPanelStatus() {
671
675
  let errorObject;
672
676
  if (this.#internal.debug) {
673
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'info', `Attempting to retrieve panel status from "${this.#internal.baseUrl}"`);
677
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'info', `Attempting to retrieve panel status from "${this.#internal.baseUrl}"`);
674
678
  }
675
679
  try {
676
680
  const sessions = {};
@@ -682,7 +686,7 @@ export class ADTPulse {
682
686
  }));
683
687
  if (sessions.axiosSummary.status >= 400) {
684
688
  if (this.#internal.debug) {
685
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
689
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
686
690
  }
687
691
  return {
688
692
  action: 'GET_PANEL_STATUS',
@@ -694,7 +698,7 @@ export class ADTPulse {
694
698
  }
695
699
  if (typeof sessions.axiosSummary?.request === 'undefined') {
696
700
  if (this.#internal.debug) {
697
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'error', 'The HTTP client responded without the "request" object');
701
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'error', 'The HTTP client responded without the "request" object');
698
702
  }
699
703
  return {
700
704
  action: 'GET_PANEL_STATUS',
@@ -707,12 +711,12 @@ export class ADTPulse {
707
711
  const axiosSummaryRequestPath = sessions.axiosSummary.request.path;
708
712
  const axiosSummaryRequestPathValid = requestPathSummarySummary.test(axiosSummaryRequestPath);
709
713
  if (this.#internal.debug) {
710
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
711
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
714
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
715
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
712
716
  }
713
717
  if (!axiosSummaryRequestPathValid) {
714
718
  if (this.#internal.debug) {
715
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
719
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
716
720
  }
717
721
  this.handleLoginFailure(axiosSummaryRequestPath, sessions.axiosSummary);
718
722
  return {
@@ -725,7 +729,7 @@ export class ADTPulse {
725
729
  }
726
730
  if (typeof sessions.axiosSummary.data !== 'string') {
727
731
  if (this.#internal.debug) {
728
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'error', 'The response body of the summary page is not of type "string"');
732
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'error', 'The response body of the summary page is not of type "string"');
729
733
  }
730
734
  return {
731
735
  action: 'GET_PANEL_STATUS',
@@ -739,7 +743,7 @@ export class ADTPulse {
739
743
  const missingSatCode = fetchMissingSatCode(sessions.axiosSummary);
740
744
  if (missingSatCode !== null) {
741
745
  if (this.#internal.debug) {
742
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
746
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
743
747
  }
744
748
  this.#session.backupSatCode = missingSatCode;
745
749
  }
@@ -759,7 +763,7 @@ export class ADTPulse {
759
763
  rawHtml: sessions.axiosSummary.data,
760
764
  });
761
765
  if (this.#internal.debug) {
762
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'success', `Successfully retrieved panel status from "${this.#internal.baseUrl}"`);
766
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'success', `Successfully retrieved panel status from "${this.#internal.baseUrl}"`);
763
767
  }
764
768
  return {
765
769
  action: 'GET_PANEL_STATUS',
@@ -771,7 +775,7 @@ export class ADTPulse {
771
775
  errorObject = serializeError(error);
772
776
  }
773
777
  if (this.#internal.debug) {
774
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getPanelStatus()', 'error', 'Method encountered an error during execution');
778
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getPanelStatus()', 'error', 'Method encountered an error during execution');
775
779
  stackTracer('serialize-error', errorObject);
776
780
  }
777
781
  return {
@@ -785,7 +789,7 @@ export class ADTPulse {
785
789
  async setPanelStatus(armFrom, armTo, isAlarmActive) {
786
790
  let errorObject;
787
791
  if (this.#internal.debug) {
788
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'info', `Attempting to update panel status from "${armFrom}" to "${armTo}" at "${this.#internal.baseUrl}"`);
792
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'info', `Attempting to update panel status from "${armFrom}" to "${armTo}" at "${this.#internal.baseUrl}"`);
789
793
  }
790
794
  if (armFrom !== 'away'
791
795
  && armFrom !== 'night'
@@ -830,7 +834,7 @@ export class ADTPulse {
830
834
  && armTo === 'off'
831
835
  && !isAlarmActive)) {
832
836
  if (this.#internal.debug) {
833
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'info', `No need to change arm state from "${armFrom}" to "${armTo}" due to its equivalence`);
837
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'info', `No need to change arm state from "${armFrom}" to "${armTo}" due to its equivalence`);
834
838
  }
835
839
  return {
836
840
  action: 'SET_PANEL_STATUS',
@@ -841,14 +845,14 @@ export class ADTPulse {
841
845
  };
842
846
  }
843
847
  if (this.#internal.debug && isAlarmActive) {
844
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'warn', `Alarm is currently ringing and arm state is being changed from "${armFrom}" to "${armTo}"`);
848
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'warn', `Alarm is currently ringing and arm state is being changed from "${armFrom}" to "${armTo}"`);
845
849
  }
846
850
  try {
847
851
  let isAlarmCurrentlyActive = isAlarmActive;
848
852
  const securityButtonsResponse = await this.getOrbSecurityButtons();
849
853
  if (!securityButtonsResponse.success) {
850
854
  if (this.#internal.debug) {
851
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'An error occurred while retrieving security buttons');
855
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'An error occurred while retrieving security buttons');
852
856
  }
853
857
  return {
854
858
  action: 'SET_PANEL_STATUS',
@@ -865,7 +869,7 @@ export class ADTPulse {
865
869
  sat: this.#session.backupSatCode,
866
870
  });
867
871
  if (this.#internal.debug) {
868
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'warn', 'No security buttons were found. Replacing stuck orb security buttons with fake buttons');
872
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'warn', 'No security buttons were found. Replacing stuck orb security buttons with fake buttons');
869
873
  stackTracer('fake-ready-buttons', {
870
874
  before: securityButtons,
871
875
  after: readyButtons,
@@ -874,7 +878,7 @@ export class ADTPulse {
874
878
  }
875
879
  if (readyButtons.length === 0 && this.#session.backupSatCode === null) {
876
880
  if (this.#internal.debug) {
877
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'No security buttons were found and replacement failed because no backup sat code exists');
881
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'No security buttons were found and replacement failed because no backup sat code exists');
878
882
  }
879
883
  return {
880
884
  action: 'SET_PANEL_STATUS',
@@ -886,7 +890,7 @@ export class ADTPulse {
886
890
  }
887
891
  if (readyButtons.length < 1) {
888
892
  if (this.#internal.debug) {
889
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'Security buttons are not found on the summary page');
893
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'Security buttons are not found on the summary page');
890
894
  }
891
895
  return {
892
896
  action: 'SET_PANEL_STATUS',
@@ -900,7 +904,7 @@ export class ADTPulse {
900
904
  && !this.#internal.testMode.isSystemDisarmedBeforeTest) {
901
905
  if (!['off', 'disarmed'].includes(readyButtons[0].urlParams.armState)) {
902
906
  if (this.#internal.debug) {
903
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'Test mode is active and system is not disarmed');
907
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'Test mode is active and system is not disarmed');
904
908
  }
905
909
  return {
906
910
  action: 'SET_PANEL_STATUS',
@@ -922,7 +926,7 @@ export class ADTPulse {
922
926
  });
923
927
  if (!armDisarmResponse.success) {
924
928
  if (this.#internal.debug) {
925
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'An error occurred in the arm disarm handler (while disarming)');
929
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'An error occurred in the arm disarm handler (while disarming)');
926
930
  }
927
931
  return {
928
932
  action: 'SET_PANEL_STATUS',
@@ -932,7 +936,7 @@ export class ADTPulse {
932
936
  }
933
937
  if (armDisarmResponse.info.readyButtons.length < 1) {
934
938
  if (this.#internal.debug) {
935
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'Arm disarm handler failed to find new security buttons');
939
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'Arm disarm handler failed to find new security buttons');
936
940
  }
937
941
  return {
938
942
  action: 'SET_PANEL_STATUS',
@@ -958,7 +962,7 @@ export class ADTPulse {
958
962
  });
959
963
  if (!armDisarmResponse.success) {
960
964
  if (this.#internal.debug) {
961
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'An error occurred in the arm disarm handler (while arming)');
965
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'An error occurred in the arm disarm handler (while arming)');
962
966
  }
963
967
  return {
964
968
  action: 'SET_PANEL_STATUS',
@@ -969,7 +973,7 @@ export class ADTPulse {
969
973
  forceArmRequired = armDisarmResponse.info.forceArmRequired;
970
974
  }
971
975
  if (this.#internal.debug) {
972
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'success', `Successfully updated panel status from "${armFrom}" to "${armTo}" at "${this.#internal.baseUrl}"`);
976
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'success', `Successfully updated panel status from "${armFrom}" to "${armTo}" at "${this.#internal.baseUrl}"`);
973
977
  }
974
978
  return {
975
979
  action: 'SET_PANEL_STATUS',
@@ -983,7 +987,7 @@ export class ADTPulse {
983
987
  errorObject = serializeError(error);
984
988
  }
985
989
  if (this.#internal.debug) {
986
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.setPanelStatus()', 'error', 'Method encountered an error during execution');
990
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.setPanelStatus()', 'error', 'Method encountered an error during execution');
987
991
  stackTracer('serialize-error', errorObject);
988
992
  }
989
993
  return {
@@ -997,7 +1001,7 @@ export class ADTPulse {
997
1001
  async getSensorsInformation() {
998
1002
  let errorObject;
999
1003
  if (this.#internal.debug) {
1000
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'info', `Attempting to retrieve sensors information from "${this.#internal.baseUrl}"`);
1004
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'info', `Attempting to retrieve sensors information from "${this.#internal.baseUrl}"`);
1001
1005
  }
1002
1006
  try {
1003
1007
  const sessions = {};
@@ -1009,7 +1013,7 @@ export class ADTPulse {
1009
1013
  }));
1010
1014
  if (sessions.axiosSystem.status >= 400) {
1011
1015
  if (this.#internal.debug) {
1012
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystem.status} status code`);
1016
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'error', `The remote server responded with a HTTP ${sessions.axiosSystem.status} status code`);
1013
1017
  }
1014
1018
  return {
1015
1019
  action: 'GET_SENSORS_INFORMATION',
@@ -1021,7 +1025,7 @@ export class ADTPulse {
1021
1025
  }
1022
1026
  if (typeof sessions.axiosSystem?.request === 'undefined') {
1023
1027
  if (this.#internal.debug) {
1024
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'error', 'The HTTP client responded without the "request" object');
1028
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'error', 'The HTTP client responded without the "request" object');
1025
1029
  }
1026
1030
  return {
1027
1031
  action: 'GET_SENSORS_INFORMATION',
@@ -1034,12 +1038,12 @@ export class ADTPulse {
1034
1038
  const axiosSystemRequestPath = sessions.axiosSystem.request.path;
1035
1039
  const axiosSystemRequestPathValid = requestPathSystemSystem.test(axiosSystemRequestPath);
1036
1040
  if (this.#internal.debug) {
1037
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'info', `Request path ➜ ${axiosSystemRequestPath}`);
1038
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'info', `Request path valid ➜ ${axiosSystemRequestPathValid}`);
1041
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'info', `Request path ➜ ${axiosSystemRequestPath}`);
1042
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'info', `Request path valid ➜ ${axiosSystemRequestPathValid}`);
1039
1043
  }
1040
1044
  if (!axiosSystemRequestPathValid) {
1041
1045
  if (this.#internal.debug) {
1042
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'error', `"${axiosSystemRequestPath}" is not the system page`);
1046
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'error', `"${axiosSystemRequestPath}" is not the system page`);
1043
1047
  }
1044
1048
  this.handleLoginFailure(axiosSystemRequestPath, sessions.axiosSystem);
1045
1049
  return {
@@ -1052,7 +1056,7 @@ export class ADTPulse {
1052
1056
  }
1053
1057
  if (typeof sessions.axiosSystem.data !== 'string') {
1054
1058
  if (this.#internal.debug) {
1055
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'error', 'The response body of the system page is not of type "string"');
1059
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'error', 'The response body of the system page is not of type "string"');
1056
1060
  }
1057
1061
  return {
1058
1062
  action: 'GET_SENSORS_INFORMATION',
@@ -1069,21 +1073,21 @@ export class ADTPulse {
1069
1073
  pretendToBeVisual: true,
1070
1074
  });
1071
1075
  const jsdomSystemSensorsTable = sessions.jsdomSystem.window.document.querySelectorAll('#systemContentList tr[class^=\'p_row\'] tr.p_listRow');
1072
- const parsedSensorsTable = parseSensorsTable(jsdomSystemSensorsTable);
1073
- await this.newInformationDispatcher('sensors-information', parsedSensorsTable);
1076
+ const parsedSensorsInformationTable = parseSensorsTable('sensors-information', jsdomSystemSensorsTable);
1077
+ await this.newInformationDispatcher('sensors-information', parsedSensorsInformationTable);
1074
1078
  await this.newInformationDispatcher('debug-parser', {
1075
1079
  method: 'getSensorsInformation',
1076
- response: parsedSensorsTable,
1080
+ response: parsedSensorsInformationTable,
1077
1081
  rawHtml: sessions.axiosSystem.data,
1078
1082
  });
1079
1083
  if (this.#internal.debug) {
1080
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'success', `Successfully retrieved sensors information from "${this.#internal.baseUrl}"`);
1084
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'success', `Successfully retrieved sensors information from "${this.#internal.baseUrl}"`);
1081
1085
  }
1082
1086
  return {
1083
1087
  action: 'GET_SENSORS_INFORMATION',
1084
1088
  success: true,
1085
1089
  info: {
1086
- sensors: parsedSensorsTable,
1090
+ sensors: parsedSensorsInformationTable,
1087
1091
  },
1088
1092
  };
1089
1093
  }
@@ -1091,7 +1095,7 @@ export class ADTPulse {
1091
1095
  errorObject = serializeError(error);
1092
1096
  }
1093
1097
  if (this.#internal.debug) {
1094
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsInformation()', 'error', 'Method encountered an error during execution');
1098
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsInformation()', 'error', 'Method encountered an error during execution');
1095
1099
  stackTracer('serialize-error', errorObject);
1096
1100
  }
1097
1101
  return {
@@ -1105,7 +1109,7 @@ export class ADTPulse {
1105
1109
  async getSensorsStatus() {
1106
1110
  let errorObject;
1107
1111
  if (this.#internal.debug) {
1108
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'info', `Attempting to retrieve sensors status from "${this.#internal.baseUrl}"`);
1112
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'info', `Attempting to retrieve sensors status from "${this.#internal.baseUrl}"`);
1109
1113
  }
1110
1114
  try {
1111
1115
  const sessions = {};
@@ -1117,7 +1121,7 @@ export class ADTPulse {
1117
1121
  }));
1118
1122
  if (sessions.axiosSummary.status >= 400) {
1119
1123
  if (this.#internal.debug) {
1120
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
1124
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
1121
1125
  }
1122
1126
  return {
1123
1127
  action: 'GET_SENSORS_STATUS',
@@ -1129,7 +1133,7 @@ export class ADTPulse {
1129
1133
  }
1130
1134
  if (typeof sessions.axiosSummary?.request === 'undefined') {
1131
1135
  if (this.#internal.debug) {
1132
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'error', 'The HTTP client responded without the "request" object');
1136
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'error', 'The HTTP client responded without the "request" object');
1133
1137
  }
1134
1138
  return {
1135
1139
  action: 'GET_SENSORS_STATUS',
@@ -1142,12 +1146,12 @@ export class ADTPulse {
1142
1146
  const axiosSummaryRequestPath = sessions.axiosSummary.request.path;
1143
1147
  const axiosSummaryRequestPathValid = requestPathSummarySummary.test(axiosSummaryRequestPath);
1144
1148
  if (this.#internal.debug) {
1145
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
1146
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
1149
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
1150
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
1147
1151
  }
1148
1152
  if (!axiosSummaryRequestPathValid) {
1149
1153
  if (this.#internal.debug) {
1150
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
1154
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
1151
1155
  }
1152
1156
  this.handleLoginFailure(axiosSummaryRequestPath, sessions.axiosSummary);
1153
1157
  return {
@@ -1160,7 +1164,7 @@ export class ADTPulse {
1160
1164
  }
1161
1165
  if (typeof sessions.axiosSummary.data !== 'string') {
1162
1166
  if (this.#internal.debug) {
1163
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'error', 'The response body of the summary page is not of type "string"');
1167
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'error', 'The response body of the summary page is not of type "string"');
1164
1168
  }
1165
1169
  return {
1166
1170
  action: 'GET_SENSORS_STATUS',
@@ -1174,7 +1178,7 @@ export class ADTPulse {
1174
1178
  const missingSatCode = fetchMissingSatCode(sessions.axiosSummary);
1175
1179
  if (missingSatCode !== null) {
1176
1180
  if (this.#internal.debug) {
1177
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
1181
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
1178
1182
  }
1179
1183
  this.#session.backupSatCode = missingSatCode;
1180
1184
  }
@@ -1194,7 +1198,7 @@ export class ADTPulse {
1194
1198
  rawHtml: sessions.axiosSummary.data,
1195
1199
  });
1196
1200
  if (this.#internal.debug) {
1197
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'success', `Successfully retrieved sensors status from "${this.#internal.baseUrl}"`);
1201
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'success', `Successfully retrieved sensors status from "${this.#internal.baseUrl}"`);
1198
1202
  }
1199
1203
  return {
1200
1204
  action: 'GET_SENSORS_STATUS',
@@ -1208,7 +1212,7 @@ export class ADTPulse {
1208
1212
  errorObject = serializeError(error);
1209
1213
  }
1210
1214
  if (this.#internal.debug) {
1211
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getSensorsStatus()', 'error', 'Method encountered an error during execution');
1215
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getSensorsStatus()', 'error', 'Method encountered an error during execution');
1212
1216
  stackTracer('serialize-error', errorObject);
1213
1217
  }
1214
1218
  return {
@@ -1222,7 +1226,7 @@ export class ADTPulse {
1222
1226
  async getOrbSecurityButtons() {
1223
1227
  let errorObject;
1224
1228
  if (this.#internal.debug) {
1225
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'info', `Attempting to retrieve orb security buttons from "${this.#internal.baseUrl}"`);
1229
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'info', `Attempting to retrieve orb security buttons from "${this.#internal.baseUrl}"`);
1226
1230
  }
1227
1231
  try {
1228
1232
  const sessions = {};
@@ -1234,7 +1238,7 @@ export class ADTPulse {
1234
1238
  }));
1235
1239
  if (sessions.axiosSummary.status >= 400) {
1236
1240
  if (this.#internal.debug) {
1237
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
1241
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'error', `The remote server responded with a HTTP ${sessions.axiosSummary.status} status code`);
1238
1242
  }
1239
1243
  return {
1240
1244
  action: 'GET_ORB_SECURITY_BUTTONS',
@@ -1246,7 +1250,7 @@ export class ADTPulse {
1246
1250
  }
1247
1251
  if (typeof sessions.axiosSummary?.request === 'undefined') {
1248
1252
  if (this.#internal.debug) {
1249
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'error', 'The HTTP client responded without the "request" object');
1253
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'error', 'The HTTP client responded without the "request" object');
1250
1254
  }
1251
1255
  return {
1252
1256
  action: 'GET_ORB_SECURITY_BUTTONS',
@@ -1259,12 +1263,12 @@ export class ADTPulse {
1259
1263
  const axiosSummaryRequestPath = sessions.axiosSummary.request.path;
1260
1264
  const axiosSummaryRequestPathValid = requestPathSummarySummary.test(axiosSummaryRequestPath);
1261
1265
  if (this.#internal.debug) {
1262
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
1263
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
1266
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'info', `Request path ➜ ${axiosSummaryRequestPath}`);
1267
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'info', `Request path valid ➜ ${axiosSummaryRequestPathValid}`);
1264
1268
  }
1265
1269
  if (!axiosSummaryRequestPathValid) {
1266
1270
  if (this.#internal.debug) {
1267
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
1271
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'error', `"${axiosSummaryRequestPath}" is not the summary page`);
1268
1272
  }
1269
1273
  this.handleLoginFailure(axiosSummaryRequestPath, sessions.axiosSummary);
1270
1274
  return {
@@ -1277,7 +1281,7 @@ export class ADTPulse {
1277
1281
  }
1278
1282
  if (typeof sessions.axiosSummary.data !== 'string') {
1279
1283
  if (this.#internal.debug) {
1280
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'error', 'The response body of the summary page is not of type "string"');
1284
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'error', 'The response body of the summary page is not of type "string"');
1281
1285
  }
1282
1286
  return {
1283
1287
  action: 'GET_ORB_SECURITY_BUTTONS',
@@ -1291,7 +1295,7 @@ export class ADTPulse {
1291
1295
  const missingSatCode = fetchMissingSatCode(sessions.axiosSummary);
1292
1296
  if (missingSatCode !== null) {
1293
1297
  if (this.#internal.debug) {
1294
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
1298
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'success', 'Backup sat code was successfully recovered from previous failed retrieval');
1295
1299
  }
1296
1300
  this.#session.backupSatCode = missingSatCode;
1297
1301
  }
@@ -1312,7 +1316,7 @@ export class ADTPulse {
1312
1316
  });
1313
1317
  this.#session.isCleanState = isSessionCleanState(parsedOrbSecurityButtons);
1314
1318
  if (this.#internal.debug) {
1315
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'success', `Successfully retrieved orb security buttons from "${this.#internal.baseUrl}"`);
1319
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'success', `Successfully retrieved orb security buttons from "${this.#internal.baseUrl}"`);
1316
1320
  }
1317
1321
  return {
1318
1322
  action: 'GET_ORB_SECURITY_BUTTONS',
@@ -1324,7 +1328,7 @@ export class ADTPulse {
1324
1328
  errorObject = serializeError(error);
1325
1329
  }
1326
1330
  if (this.#internal.debug) {
1327
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.getOrbSecurityButtons()', 'error', 'Method encountered an error during execution');
1331
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.getOrbSecurityButtons()', 'error', 'Method encountered an error during execution');
1328
1332
  stackTracer('serialize-error', errorObject);
1329
1333
  }
1330
1334
  return {
@@ -1338,7 +1342,7 @@ export class ADTPulse {
1338
1342
  async performSyncCheck() {
1339
1343
  let errorObject;
1340
1344
  if (this.#internal.debug) {
1341
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'info', `Attempting to perform a sync check from "${this.#internal.baseUrl}"`);
1345
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'info', `Attempting to perform a sync check from "${this.#internal.baseUrl}"`);
1342
1346
  }
1343
1347
  try {
1344
1348
  const sessions = {};
@@ -1355,7 +1359,7 @@ export class ADTPulse {
1355
1359
  }));
1356
1360
  if (sessions.axiosSyncCheck.status >= 400) {
1357
1361
  if (this.#internal.debug) {
1358
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', `The remote server responded with a HTTP ${sessions.axiosSyncCheck.status} status code`);
1362
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', `The remote server responded with a HTTP ${sessions.axiosSyncCheck.status} status code`);
1359
1363
  }
1360
1364
  return {
1361
1365
  action: 'PERFORM_SYNC_CHECK',
@@ -1367,7 +1371,7 @@ export class ADTPulse {
1367
1371
  }
1368
1372
  if (typeof sessions.axiosSyncCheck?.request === 'undefined') {
1369
1373
  if (this.#internal.debug) {
1370
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', 'The HTTP client responded without the "request" object');
1374
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', 'The HTTP client responded without the "request" object');
1371
1375
  }
1372
1376
  return {
1373
1377
  action: 'PERFORM_SYNC_CHECK',
@@ -1377,28 +1381,28 @@ export class ADTPulse {
1377
1381
  },
1378
1382
  };
1379
1383
  }
1380
- const syncCheckRequestPath = sessions.axiosSyncCheck.request.path;
1381
- const syncCheckRequestPathValid = requestPathAjaxSyncCheckServTXx.test(syncCheckRequestPath);
1384
+ const axiosSyncCheckRequestPath = sessions.axiosSyncCheck.request.path;
1385
+ const axiosSyncCheckRequestPathValid = requestPathAjaxSyncCheckServTXx.test(axiosSyncCheckRequestPath);
1382
1386
  if (this.#internal.debug) {
1383
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'info', `Request path ➜ ${syncCheckRequestPath}`);
1384
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'info', `Request path valid ➜ ${syncCheckRequestPathValid}`);
1387
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'info', `Request path ➜ ${axiosSyncCheckRequestPath}`);
1388
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'info', `Request path valid ➜ ${axiosSyncCheckRequestPathValid}`);
1385
1389
  }
1386
- if (!syncCheckRequestPathValid) {
1390
+ if (!axiosSyncCheckRequestPathValid) {
1387
1391
  if (this.#internal.debug) {
1388
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', `"${syncCheckRequestPath}" is not the sync check page`);
1392
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', `"${axiosSyncCheckRequestPath}" is not the sync check page`);
1389
1393
  }
1390
- this.handleLoginFailure(syncCheckRequestPath, sessions.axiosSyncCheck);
1394
+ this.handleLoginFailure(axiosSyncCheckRequestPath, sessions.axiosSyncCheck);
1391
1395
  return {
1392
1396
  action: 'PERFORM_SYNC_CHECK',
1393
1397
  success: false,
1394
1398
  info: {
1395
- message: `"${syncCheckRequestPath}" is not the sync check page`,
1399
+ message: `"${axiosSyncCheckRequestPath}" is not the sync check page`,
1396
1400
  },
1397
1401
  };
1398
1402
  }
1399
1403
  if (typeof sessions.axiosSyncCheck.data !== 'string') {
1400
1404
  if (this.#internal.debug) {
1401
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', 'The response body of the sync check page is not of type "string"');
1405
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', 'The response body of the sync check page is not of type "string"');
1402
1406
  }
1403
1407
  return {
1404
1408
  action: 'PERFORM_SYNC_CHECK',
@@ -1410,7 +1414,7 @@ export class ADTPulse {
1410
1414
  }
1411
1415
  if (!isPortalSyncCode(sessions.axiosSyncCheck.data)) {
1412
1416
  if (this.#internal.debug) {
1413
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', 'The sync code structure is invalid');
1417
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', 'The sync code structure is invalid');
1414
1418
  }
1415
1419
  return {
1416
1420
  action: 'PERFORM_SYNC_CHECK',
@@ -1421,7 +1425,7 @@ export class ADTPulse {
1421
1425
  };
1422
1426
  }
1423
1427
  if (this.#internal.debug) {
1424
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'success', `Successfully performed a sync check from "${this.#internal.baseUrl}"`);
1428
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'success', `Successfully performed a sync check from "${this.#internal.baseUrl}"`);
1425
1429
  }
1426
1430
  return {
1427
1431
  action: 'PERFORM_SYNC_CHECK',
@@ -1435,7 +1439,7 @@ export class ADTPulse {
1435
1439
  errorObject = serializeError(error);
1436
1440
  }
1437
1441
  if (this.#internal.debug) {
1438
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performSyncCheck()', 'error', 'Method encountered an error during execution');
1442
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performSyncCheck()', 'error', 'Method encountered an error during execution');
1439
1443
  stackTracer('serialize-error', errorObject);
1440
1444
  }
1441
1445
  return {
@@ -1449,7 +1453,7 @@ export class ADTPulse {
1449
1453
  async performKeepAlive() {
1450
1454
  let errorObject;
1451
1455
  if (this.#internal.debug) {
1452
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'info', `Attempting to perform a keep alive from "${this.#internal.baseUrl}"`);
1456
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'info', `Attempting to perform a keep alive from "${this.#internal.baseUrl}"`);
1453
1457
  }
1454
1458
  try {
1455
1459
  const sessions = {};
@@ -1464,12 +1468,12 @@ export class ADTPulse {
1464
1468
  'Sec-Fetch-Site': 'same-origin',
1465
1469
  'Sec-Fetch-User': undefined,
1466
1470
  'Upgrade-Insecure-Requests': undefined,
1467
- 'x-dtpc': generateDynatracePCHeaderValue('keep-alive'),
1471
+ 'x-dtpc': generateFakeDynatracePCHeaderValue('keep-alive'),
1468
1472
  },
1469
1473
  }));
1470
1474
  if (sessions.axiosKeepAlive.status >= 400) {
1471
1475
  if (this.#internal.debug) {
1472
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'error', `The remote server responded with a HTTP ${sessions.axiosKeepAlive.status} status code`);
1476
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'error', `The remote server responded with a HTTP ${sessions.axiosKeepAlive.status} status code`);
1473
1477
  }
1474
1478
  return {
1475
1479
  action: 'PERFORM_KEEP_ALIVE',
@@ -1481,7 +1485,7 @@ export class ADTPulse {
1481
1485
  }
1482
1486
  if (typeof sessions.axiosKeepAlive?.request === 'undefined') {
1483
1487
  if (this.#internal.debug) {
1484
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'error', 'The HTTP client responded without the "request" object');
1488
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'error', 'The HTTP client responded without the "request" object');
1485
1489
  }
1486
1490
  return {
1487
1491
  action: 'PERFORM_KEEP_ALIVE',
@@ -1494,12 +1498,12 @@ export class ADTPulse {
1494
1498
  const axiosKeepAliveRequestPath = sessions.axiosKeepAlive.request.path;
1495
1499
  const axiosKeepAliveRequestPathValid = requestPathKeepAlive.test(axiosKeepAliveRequestPath);
1496
1500
  if (this.#internal.debug) {
1497
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'info', `Request path ➜ ${axiosKeepAliveRequestPath}`);
1498
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'info', `Request path valid ➜ ${axiosKeepAliveRequestPathValid}`);
1501
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'info', `Request path ➜ ${axiosKeepAliveRequestPath}`);
1502
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'info', `Request path valid ➜ ${axiosKeepAliveRequestPathValid}`);
1499
1503
  }
1500
1504
  if (!axiosKeepAliveRequestPathValid) {
1501
1505
  if (this.#internal.debug) {
1502
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'error', `"${axiosKeepAliveRequestPath}" is not the keep alive page`);
1506
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'error', `"${axiosKeepAliveRequestPath}" is not the keep alive page`);
1503
1507
  }
1504
1508
  this.handleLoginFailure(axiosKeepAliveRequestPath, sessions.axiosKeepAlive);
1505
1509
  return {
@@ -1511,7 +1515,7 @@ export class ADTPulse {
1511
1515
  };
1512
1516
  }
1513
1517
  if (this.#internal.debug) {
1514
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'success', `Successfully performed a keep alive from "${this.#internal.baseUrl}"`);
1518
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'success', `Successfully performed a keep alive from "${this.#internal.baseUrl}"`);
1515
1519
  }
1516
1520
  return {
1517
1521
  action: 'PERFORM_KEEP_ALIVE',
@@ -1523,7 +1527,7 @@ export class ADTPulse {
1523
1527
  errorObject = serializeError(error);
1524
1528
  }
1525
1529
  if (this.#internal.debug) {
1526
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.performKeepAlive()', 'error', 'Method encountered an error during execution');
1530
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.performKeepAlive()', 'error', 'Method encountered an error during execution');
1527
1531
  stackTracer('serialize-error', errorObject);
1528
1532
  }
1529
1533
  return {
@@ -1553,7 +1557,7 @@ export class ADTPulse {
1553
1557
  async armDisarmHandler(isAlarmActive, options) {
1554
1558
  let errorObject;
1555
1559
  if (this.#internal.debug) {
1556
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'info', `Attempting to update arm state from "${options.armState}" to "${options.arm}" on "${this.#internal.baseUrl}"`);
1560
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'info', `Attempting to update arm state from "${options.armState}" to "${options.arm}" on "${this.#internal.baseUrl}"`);
1557
1561
  }
1558
1562
  if ((options.armState === 'away'
1559
1563
  && options.arm === 'away')
@@ -1567,7 +1571,7 @@ export class ADTPulse {
1567
1571
  && options.arm === 'off'
1568
1572
  && !isAlarmActive)) {
1569
1573
  if (this.#internal.debug) {
1570
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'info', `No need to change arm state from "${options.armState}" to "${options.arm}" due to its equivalence`);
1574
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'info', `No need to change arm state from "${options.armState}" to "${options.arm}" due to its equivalence`);
1571
1575
  }
1572
1576
  return {
1573
1577
  action: 'ARM_DISARM_HANDLER',
@@ -1599,7 +1603,7 @@ export class ADTPulse {
1599
1603
  }));
1600
1604
  if (sessions.axiosSetArmMode.status >= 400) {
1601
1605
  if (this.#internal.debug) {
1602
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', `The remote server responded with a HTTP ${sessions.axiosSetArmMode.status} status code`);
1606
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', `The remote server responded with a HTTP ${sessions.axiosSetArmMode.status} status code`);
1603
1607
  }
1604
1608
  return {
1605
1609
  action: 'ARM_DISARM_HANDLER',
@@ -1611,7 +1615,7 @@ export class ADTPulse {
1611
1615
  }
1612
1616
  if (typeof sessions.axiosSetArmMode?.request === 'undefined') {
1613
1617
  if (this.#internal.debug) {
1614
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', 'The HTTP client responded without the "request" object');
1618
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', 'The HTTP client responded without the "request" object');
1615
1619
  }
1616
1620
  return {
1617
1621
  action: 'ARM_DISARM_HANDLER',
@@ -1624,12 +1628,12 @@ export class ADTPulse {
1624
1628
  const axiosSetArmModeRequestPath = sessions.axiosSetArmMode.request.path;
1625
1629
  const axiosSetArmModeRequestPathValid = requestPathQuickControlArmDisarm.test(axiosSetArmModeRequestPath);
1626
1630
  if (this.#internal.debug) {
1627
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'info', `Request path ➜ ${axiosSetArmModeRequestPath}`);
1628
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'info', `Request path valid ➜ ${axiosSetArmModeRequestPathValid}`);
1631
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'info', `Request path ➜ ${axiosSetArmModeRequestPath}`);
1632
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'info', `Request path valid ➜ ${axiosSetArmModeRequestPathValid}`);
1629
1633
  }
1630
1634
  if (!axiosSetArmModeRequestPathValid) {
1631
1635
  if (this.#internal.debug) {
1632
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', `"${axiosSetArmModeRequestPath}" is not the arm disarm page`);
1636
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', `"${axiosSetArmModeRequestPath}" is not the arm disarm page`);
1633
1637
  }
1634
1638
  this.handleLoginFailure(axiosSetArmModeRequestPath, sessions.axiosSetArmMode);
1635
1639
  return {
@@ -1645,7 +1649,7 @@ export class ADTPulse {
1645
1649
  const forceArmResponse = await this.forceArmHandler(sessions.axiosSetArmMode, options.relativeUrl);
1646
1650
  if (!forceArmResponse.success) {
1647
1651
  if (this.#internal.debug) {
1648
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', 'An error occurred in the force arm handler');
1652
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', 'An error occurred in the force arm handler');
1649
1653
  }
1650
1654
  return {
1651
1655
  action: 'ARM_DISARM_HANDLER',
@@ -1659,7 +1663,7 @@ export class ADTPulse {
1659
1663
  const securityButtonsResponse = await this.getOrbSecurityButtons();
1660
1664
  if (!securityButtonsResponse.success) {
1661
1665
  if (this.#internal.debug) {
1662
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', 'An error occurred while retrieving security buttons');
1666
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', 'An error occurred while retrieving security buttons');
1663
1667
  }
1664
1668
  return {
1665
1669
  action: 'ARM_DISARM_HANDLER',
@@ -1676,7 +1680,7 @@ export class ADTPulse {
1676
1680
  sat: options.sat,
1677
1681
  });
1678
1682
  if (this.#internal.debug) {
1679
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'warn', 'No security buttons were found. Replacing stuck orb security buttons with fake buttons');
1683
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'warn', 'No security buttons were found. Replacing stuck orb security buttons with fake buttons');
1680
1684
  stackTracer('fake-ready-buttons', {
1681
1685
  before: securityButtons,
1682
1686
  after: readyButtons,
@@ -1684,7 +1688,7 @@ export class ADTPulse {
1684
1688
  }
1685
1689
  }
1686
1690
  if (this.#internal.debug) {
1687
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'success', `Successfully updated arm state from "${options.armState}" to "${options.arm}" on "${this.#internal.baseUrl}"`);
1691
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'success', `Successfully updated arm state from "${options.armState}" to "${options.arm}" on "${this.#internal.baseUrl}"`);
1688
1692
  }
1689
1693
  return {
1690
1694
  action: 'ARM_DISARM_HANDLER',
@@ -1699,7 +1703,7 @@ export class ADTPulse {
1699
1703
  errorObject = serializeError(error);
1700
1704
  }
1701
1705
  if (this.#internal.debug) {
1702
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.armDisarmHandler()', 'error', 'Method encountered an error during execution');
1706
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.armDisarmHandler()', 'error', 'Method encountered an error during execution');
1703
1707
  stackTracer('serialize-error', errorObject);
1704
1708
  }
1705
1709
  return {
@@ -1713,13 +1717,13 @@ export class ADTPulse {
1713
1717
  async forceArmHandler(response, relativeUrl) {
1714
1718
  let errorObject;
1715
1719
  if (this.#internal.debug) {
1716
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'info', `Attempting to force arm on "${this.#internal.baseUrl}"`);
1720
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'info', `Attempting to force arm on "${this.#internal.baseUrl}"`);
1717
1721
  }
1718
1722
  try {
1719
1723
  const sessions = {};
1720
1724
  if (typeof response.data !== 'string') {
1721
1725
  if (this.#internal.debug) {
1722
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', 'The response body of the arm disarm page is not of type "string"');
1726
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', 'The response body of the arm disarm page is not of type "string"');
1723
1727
  }
1724
1728
  return {
1725
1729
  action: 'FORCE_ARM_HANDLER',
@@ -1748,7 +1752,7 @@ export class ADTPulse {
1748
1752
  if (parsedDoSubmitHandlers.length === 0) {
1749
1753
  if (this.#internal.testMode.enabled) {
1750
1754
  if (this.#internal.debug) {
1751
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', 'Test mode is active but no doors or windows were open');
1755
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', 'Test mode is active but no doors or windows were open');
1752
1756
  }
1753
1757
  return {
1754
1758
  action: 'FORCE_ARM_HANDLER',
@@ -1759,7 +1763,7 @@ export class ADTPulse {
1759
1763
  };
1760
1764
  }
1761
1765
  if (this.#internal.debug) {
1762
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'info', 'Force arming not required');
1766
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'info', 'Force arming not required');
1763
1767
  }
1764
1768
  return {
1765
1769
  action: 'FORCE_ARM_HANDLER',
@@ -1775,7 +1779,7 @@ export class ADTPulse {
1775
1779
  requestUrl: null,
1776
1780
  };
1777
1781
  if (this.#internal.debug) {
1778
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'warn', `Portal message ➜ "${parsedArmDisarmMessage}"`);
1782
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'warn', `Portal message ➜ "${parsedArmDisarmMessage}"`);
1779
1783
  }
1780
1784
  for (let i = 0; i < parsedDoSubmitHandlers.length; i += 1) {
1781
1785
  const forceArmRelativeUrl = parsedDoSubmitHandlers[i].relativeUrl;
@@ -1804,12 +1808,12 @@ export class ADTPulse {
1804
1808
  'Sec-Fetch-Mode': 'cors',
1805
1809
  'Sec-Fetch-Site': 'same-origin',
1806
1810
  'Sec-Fetch-User': undefined,
1807
- 'x-dtpc': generateDynatracePCHeaderValue('force-arm'),
1811
+ 'x-dtpc': generateFakeDynatracePCHeaderValue('force-arm'),
1808
1812
  },
1809
1813
  }));
1810
1814
  if (sessions.axiosForceArm.status >= 400) {
1811
1815
  if (this.#internal.debug) {
1812
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', `The remote server responded with a HTTP ${sessions.axiosForceArm.status} status code`);
1816
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', `The remote server responded with a HTTP ${sessions.axiosForceArm.status} status code`);
1813
1817
  }
1814
1818
  return {
1815
1819
  action: 'FORCE_ARM_HANDLER',
@@ -1821,7 +1825,7 @@ export class ADTPulse {
1821
1825
  }
1822
1826
  if (typeof sessions.axiosForceArm?.request === 'undefined') {
1823
1827
  if (this.#internal.debug) {
1824
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', 'The HTTP client responded without the "request" object');
1828
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', 'The HTTP client responded without the "request" object');
1825
1829
  }
1826
1830
  return {
1827
1831
  action: 'FORCE_ARM_HANDLER',
@@ -1834,8 +1838,8 @@ export class ADTPulse {
1834
1838
  const axiosForceArmRequestPath = sessions.axiosForceArm.request.path;
1835
1839
  const axiosForceArmRequestPathValid = requestPathQuickControlServRunRraCommand.test(axiosForceArmRequestPath);
1836
1840
  if (this.#internal.debug) {
1837
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'info', `Request path ➜ ${axiosForceArmRequestPath}`);
1838
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'info', `Request path valid ➜ ${axiosForceArmRequestPathValid}`);
1841
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'info', `Request path ➜ ${axiosForceArmRequestPath}`);
1842
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'info', `Request path valid ➜ ${axiosForceArmRequestPathValid}`);
1839
1843
  }
1840
1844
  if (!axiosForceArmRequestPathValid) {
1841
1845
  tracker.errorMessage = `"${axiosForceArmRequestPath}" is not the run rra command page`;
@@ -1858,7 +1862,7 @@ export class ADTPulse {
1858
1862
  }
1859
1863
  if (tracker.errorMessage !== null) {
1860
1864
  if (this.#internal.debug) {
1861
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', tracker.errorMessage);
1865
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', tracker.errorMessage);
1862
1866
  }
1863
1867
  this.handleLoginFailure(tracker.requestUrl, sessions.axiosForceArm);
1864
1868
  return {
@@ -1871,7 +1875,7 @@ export class ADTPulse {
1871
1875
  }
1872
1876
  if (!tracker.complete) {
1873
1877
  if (this.#internal.debug) {
1874
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', 'Force arming failed because the "Arm Anyway" button was not found');
1878
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', 'Force arming failed because the "Arm Anyway" button was not found');
1875
1879
  }
1876
1880
  return {
1877
1881
  action: 'FORCE_ARM_HANDLER',
@@ -1882,7 +1886,7 @@ export class ADTPulse {
1882
1886
  };
1883
1887
  }
1884
1888
  if (this.#internal.debug) {
1885
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'success', `Successfully forced arm on "${this.#internal.baseUrl}"`);
1889
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'success', `Successfully forced arm on "${this.#internal.baseUrl}"`);
1886
1890
  }
1887
1891
  return {
1888
1892
  action: 'FORCE_ARM_HANDLER',
@@ -1896,7 +1900,7 @@ export class ADTPulse {
1896
1900
  errorObject = serializeError(error);
1897
1901
  }
1898
1902
  if (this.#internal.debug) {
1899
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.forceArmHandler()', 'error', 'Method encountered an error during execution');
1903
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.forceArmHandler()', 'error', 'Method encountered an error during execution');
1900
1904
  stackTracer('serialize-error', errorObject);
1901
1905
  }
1902
1906
  return {
@@ -1913,7 +1917,7 @@ export class ADTPulse {
1913
1917
  let detectedNew = false;
1914
1918
  switch (type) {
1915
1919
  case 'debug-parser':
1916
- detectedNew = await detectApiDebugParser(data, this.#internal.logger, this.#internal.debug);
1920
+ detectedNew = await detectGlobalDebugParser(data, this.#internal.logger, this.#internal.debug);
1917
1921
  break;
1918
1922
  case 'do-submit-handlers':
1919
1923
  detectedNew = await detectApiDoSubmitHandlers(data, this.#internal.logger, this.#internal.debug);
@@ -1931,7 +1935,7 @@ export class ADTPulse {
1931
1935
  detectedNew = await detectApiPanelStatus(data, this.#internal.logger, this.#internal.debug);
1932
1936
  break;
1933
1937
  case 'portal-version':
1934
- detectedNew = await detectApiPortalVersion(data, this.#internal.logger, this.#internal.debug);
1938
+ detectedNew = await detectGlobalPortalVersion(data, this.#internal.logger, this.#internal.debug);
1935
1939
  break;
1936
1940
  case 'sensors-information':
1937
1941
  detectedNew = await detectApiSensorsInformation(data, this.#internal.logger, this.#internal.debug);
@@ -1952,19 +1956,19 @@ export class ADTPulse {
1952
1956
  family: 4,
1953
1957
  headers: {
1954
1958
  Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
1955
- 'Accept-Encoding': 'gzip, deflate, br',
1959
+ 'Accept-Encoding': 'gzip, deflate, br, zstd',
1956
1960
  'Accept-Language': 'en-US,en;q=0.9',
1957
1961
  'Cache-Control': 'no-cache',
1958
1962
  Connection: 'keep-alive',
1959
- Host: `${this.#credentials.subdomain}.adtpulse.com`,
1963
+ Host: `${this.#connection.subdomain}.adtpulse.com`,
1960
1964
  Pragma: 'no-cache',
1961
1965
  'Sec-Fetch-Dest': 'document',
1962
1966
  'Sec-Fetch-Mode': 'navigate',
1963
1967
  'Sec-Fetch-Site': 'none',
1964
1968
  'Sec-Fetch-User': '?1',
1965
1969
  'Upgrade-Insecure-Requests': '1',
1966
- 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
1967
- 'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
1970
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
1971
+ 'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"',
1968
1972
  'sec-ch-ua-mobile': '?0',
1969
1973
  'sec-ch-ua-platform': '"macOS"',
1970
1974
  },
@@ -1985,13 +1989,13 @@ export class ADTPulse {
1985
1989
  if (this.#internal.debug) {
1986
1990
  const errorMessage = fetchErrorMessage(session);
1987
1991
  if (requestPathAccessSignIn.test(requestPath) || requestPathAccessSignInEXxPartnerAdt.test(requestPath)) {
1988
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.handleLoginFailure()', 'error', 'Either the username or password is incorrect, fingerprint format is invalid, or was signed out due to inactivity');
1992
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.handleLoginFailure()', 'error', 'Either the username or password is incorrect, fingerprint format is invalid, or was signed out due to inactivity');
1989
1993
  }
1990
1994
  if (requestPathMfaMfaSignInWorkflowChallenge.test(requestPath)) {
1991
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.handleLoginFailure()', 'error', 'Either the fingerprint expired or "Trust this device" was not selected after completing MFA challenge');
1995
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.handleLoginFailure()', 'error', 'Either the fingerprint was revoked or "Trust this device" was not selected after completing the multi-factor authentication challenge');
1992
1996
  }
1993
1997
  if (errorMessage !== null) {
1994
- debugLog(this.#internal.logger, 'api.ts / ADTPulse.handleLoginFailure()', 'warn', `Portal message ➜ "${errorMessage}"`);
1998
+ debugLog(this.#internal.logger, 'api.ts / ADTPulseAPI.handleLoginFailure()', 'warn', `Portal message ➜ "${errorMessage}"`);
1995
1999
  }
1996
2000
  }
1997
2001
  this.resetSession();