addigy 2.10.0 → 2.10.2
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/index.d.ts +3 -1
- package/index.js +4 -3
- package/lib/addigy.d.ts +0 -2
- package/lib/addigy.js +0 -2
- package/lib/alerts/alert.types.d.ts +19 -0
- package/lib/alerts/alerts.d.ts +2 -2
- package/lib/applications/applications.d.ts +2 -1
- package/lib/applications/applications.types.d.ts +10 -0
- package/lib/applications/applications.types.js +2 -0
- package/lib/auth/auth.d.ts +1 -0
- package/lib/auth/auth.js +6 -2
- package/lib/devices/devices.d.ts +7 -4
- package/lib/devices/devices.js +22 -0
- package/lib/devices/devices.types.d.ts +189 -0
- package/lib/devices/devices.types.js +2 -0
- package/lib/mdm/mdm-policies.d.ts +2 -1
- package/lib/mdm/mdm-policies.js +20 -1
- package/lib/mdm/mdm.types.d.ts +9 -0
- package/lib/policies/policies.d.ts +5 -4
- package/lib/policies/policies.types.d.ts +10 -0
- package/lib/policies/policies.types.js +2 -0
- package/lib/profiles/profiles.d.ts +5 -4
- package/lib/profiles/profiles.types.d.ts +50 -0
- package/lib/software/software.d.ts +4 -4
- package/lib/types.d.ts +4 -2
- package/lib/users/user.types.d.ts +11 -0
- package/package.json +16 -16
- package/lib/commands/commands.d.ts +0 -7
- package/lib/commands/commands.js +0 -31
package/index.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ export * from './lib/alerts/alert.types';
|
|
|
5
5
|
export { Auth } from './lib/auth/auth';
|
|
6
6
|
export * from './lib/auth/auth.types';
|
|
7
7
|
export { Applications } from './lib/applications/applications';
|
|
8
|
+
export * from './lib/applications/applications.types';
|
|
8
9
|
export { Billing } from './lib/billing/billing';
|
|
9
10
|
export { Certs } from './lib/certs/certs';
|
|
10
|
-
export { Commands } from './lib/commands/commands';
|
|
11
11
|
export { Devices } from './lib/devices/devices';
|
|
12
|
+
export * from './lib/devices/devices.types';
|
|
12
13
|
export { Facts } from './lib/facts/facts';
|
|
13
14
|
export * from './lib/facts/facts.types';
|
|
14
15
|
export { Files } from './lib/files/files';
|
|
@@ -20,6 +21,7 @@ export { MdmPolicies } from './lib/mdm/mdm-policies';
|
|
|
20
21
|
export { MdmProfiles } from './lib/mdm/mdm-profiles';
|
|
21
22
|
export * from './lib/mdm/mdm.types';
|
|
22
23
|
export { Policies } from './lib/policies/policies';
|
|
24
|
+
export * from './lib/policies/policies.types';
|
|
23
25
|
export { Profiles } from './lib/profiles/profiles';
|
|
24
26
|
export * from './lib/profiles/profiles.types';
|
|
25
27
|
export { ScreenConnect } from './lib/screenconnect/screenconnect';
|
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Users = exports.Software = exports.ScreenConnect = exports.Profiles = exports.Policies = exports.MdmProfiles = exports.MdmPolicies = exports.MdmConfigurations = exports.Maintenance = exports.Integrations = exports.Files = exports.Facts = exports.Devices = exports.
|
|
17
|
+
exports.Users = exports.Software = exports.ScreenConnect = exports.Profiles = exports.Policies = exports.MdmProfiles = exports.MdmPolicies = exports.MdmConfigurations = exports.Maintenance = exports.Integrations = exports.Files = exports.Facts = exports.Devices = exports.Certs = exports.Billing = exports.Applications = exports.Auth = exports.Alerts = exports.Addigy = void 0;
|
|
18
18
|
__exportStar(require("./lib/types"), exports);
|
|
19
19
|
var addigy_1 = require("./lib/addigy");
|
|
20
20
|
Object.defineProperty(exports, "Addigy", { enumerable: true, get: function () { return addigy_1.Addigy; } });
|
|
@@ -26,14 +26,14 @@ Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { re
|
|
|
26
26
|
__exportStar(require("./lib/auth/auth.types"), exports);
|
|
27
27
|
var applications_1 = require("./lib/applications/applications");
|
|
28
28
|
Object.defineProperty(exports, "Applications", { enumerable: true, get: function () { return applications_1.Applications; } });
|
|
29
|
+
__exportStar(require("./lib/applications/applications.types"), exports);
|
|
29
30
|
var billing_1 = require("./lib/billing/billing");
|
|
30
31
|
Object.defineProperty(exports, "Billing", { enumerable: true, get: function () { return billing_1.Billing; } });
|
|
31
32
|
var certs_1 = require("./lib/certs/certs");
|
|
32
33
|
Object.defineProperty(exports, "Certs", { enumerable: true, get: function () { return certs_1.Certs; } });
|
|
33
|
-
var commands_1 = require("./lib/commands/commands");
|
|
34
|
-
Object.defineProperty(exports, "Commands", { enumerable: true, get: function () { return commands_1.Commands; } });
|
|
35
34
|
var devices_1 = require("./lib/devices/devices");
|
|
36
35
|
Object.defineProperty(exports, "Devices", { enumerable: true, get: function () { return devices_1.Devices; } });
|
|
36
|
+
__exportStar(require("./lib/devices/devices.types"), exports);
|
|
37
37
|
var facts_1 = require("./lib/facts/facts");
|
|
38
38
|
Object.defineProperty(exports, "Facts", { enumerable: true, get: function () { return facts_1.Facts; } });
|
|
39
39
|
__exportStar(require("./lib/facts/facts.types"), exports);
|
|
@@ -53,6 +53,7 @@ Object.defineProperty(exports, "MdmProfiles", { enumerable: true, get: function
|
|
|
53
53
|
__exportStar(require("./lib/mdm/mdm.types"), exports);
|
|
54
54
|
var policies_1 = require("./lib/policies/policies");
|
|
55
55
|
Object.defineProperty(exports, "Policies", { enumerable: true, get: function () { return policies_1.Policies; } });
|
|
56
|
+
__exportStar(require("./lib/policies/policies.types"), exports);
|
|
56
57
|
var profiles_1 = require("./lib/profiles/profiles");
|
|
57
58
|
Object.defineProperty(exports, "Profiles", { enumerable: true, get: function () { return profiles_1.Profiles; } });
|
|
58
59
|
__exportStar(require("./lib/profiles/profiles.types"), exports);
|
package/lib/addigy.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Alerts } from './alerts/alerts';
|
|
|
3
3
|
import { Applications } from './applications/applications';
|
|
4
4
|
import { Billing } from './billing/billing';
|
|
5
5
|
import { Certs } from './certs/certs';
|
|
6
|
-
import { Commands } from './commands/commands';
|
|
7
6
|
import { MdmConfigurations } from './mdm/mdm-configurations';
|
|
8
7
|
import { Devices } from './devices/devices';
|
|
9
8
|
import { Facts } from './facts/facts';
|
|
@@ -25,7 +24,6 @@ export declare class Addigy {
|
|
|
25
24
|
apps: Applications;
|
|
26
25
|
billing: Billing;
|
|
27
26
|
certs: Certs;
|
|
28
|
-
commands: Commands;
|
|
29
27
|
devices: Devices;
|
|
30
28
|
facts: Facts;
|
|
31
29
|
files: Files;
|
package/lib/addigy.js
CHANGED
|
@@ -8,7 +8,6 @@ const alerts_1 = require("./alerts/alerts");
|
|
|
8
8
|
const applications_1 = require("./applications/applications");
|
|
9
9
|
const billing_1 = require("./billing/billing");
|
|
10
10
|
const certs_1 = require("./certs/certs");
|
|
11
|
-
const commands_1 = require("./commands/commands");
|
|
12
11
|
const mdm_configurations_1 = require("./mdm/mdm-configurations");
|
|
13
12
|
const devices_1 = require("./devices/devices");
|
|
14
13
|
const facts_1 = require("./facts/facts");
|
|
@@ -44,7 +43,6 @@ class Addigy {
|
|
|
44
43
|
this.apps = new applications_1.Applications(this.http);
|
|
45
44
|
this.billing = new billing_1.Billing();
|
|
46
45
|
this.certs = new certs_1.Certs();
|
|
47
|
-
this.commands = new commands_1.Commands(this.http);
|
|
48
46
|
this.devices = new devices_1.Devices(this.http, this.config);
|
|
49
47
|
this.facts = new facts_1.Facts();
|
|
50
48
|
this.files = new files_1.Files(this.config);
|
|
@@ -3,3 +3,22 @@ export declare enum AlertStatus {
|
|
|
3
3
|
Resolved = "Resolved",
|
|
4
4
|
Unattended = "Unattended"
|
|
5
5
|
}
|
|
6
|
+
export interface Alert {
|
|
7
|
+
category: string;
|
|
8
|
+
created_on: number;
|
|
9
|
+
status: AlertStatus;
|
|
10
|
+
valuetype: string;
|
|
11
|
+
value: string;
|
|
12
|
+
selector: 'changed' | string;
|
|
13
|
+
remtime: number;
|
|
14
|
+
fact_name: string;
|
|
15
|
+
_id: string;
|
|
16
|
+
emails: string[];
|
|
17
|
+
created_date: Date;
|
|
18
|
+
name: string;
|
|
19
|
+
agentid: string;
|
|
20
|
+
level: 'warning' | 'error' | 'info' | string;
|
|
21
|
+
orgid: string;
|
|
22
|
+
remenabled: boolean;
|
|
23
|
+
fact_identifier: string;
|
|
24
|
+
}
|
package/lib/alerts/alerts.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AlertStatus } from './alert.types';
|
|
1
|
+
import { Alert, AlertStatus } from './alert.types';
|
|
2
2
|
import { AxiosInstance } from 'axios';
|
|
3
3
|
export declare class Alerts {
|
|
4
4
|
private readonly http;
|
|
5
5
|
constructor(http: AxiosInstance);
|
|
6
|
-
getAlerts(status: AlertStatus, page?: number, pageLength?: number): Promise<
|
|
6
|
+
getAlerts(status: AlertStatus, page?: number, pageLength?: number): Promise<Alert[]>;
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { InstalledApplicationsResponse } from './applications.types';
|
|
2
3
|
export declare class Applications {
|
|
3
4
|
private readonly http;
|
|
4
5
|
constructor(http: AxiosInstance);
|
|
5
|
-
getInstalledApplications(): Promise<
|
|
6
|
+
getInstalledApplications(): Promise<InstalledApplicationsResponse>;
|
|
6
7
|
}
|
package/lib/auth/auth.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { IAddigyInternalAuthObject } from './auth.types';
|
|
|
3
3
|
export declare class Auth {
|
|
4
4
|
private readonly config;
|
|
5
5
|
private readonly http;
|
|
6
|
+
private readonly httpApp;
|
|
6
7
|
constructor(config: IAddigyConfig);
|
|
7
8
|
getAuthObject(): Promise<IAddigyInternalAuthObject>;
|
|
8
9
|
getImpersonationAuthObject(authObject: IAddigyInternalAuthObject, orgId: string): Promise<IAddigyInternalAuthObject>;
|
package/lib/auth/auth.js
CHANGED
|
@@ -14,6 +14,11 @@ class Auth {
|
|
|
14
14
|
baseURL: addigy_constants_1.Urls.api,
|
|
15
15
|
...(0, addigy_utils_1.getAxiosHttpAgents)(),
|
|
16
16
|
});
|
|
17
|
+
this.httpApp = axios_1.default.create({
|
|
18
|
+
baseURL: addigy_constants_1.Urls.app,
|
|
19
|
+
...(0, addigy_utils_1.getAxiosHttpAgents)(),
|
|
20
|
+
headers: { origin: addigy_constants_1.Urls.app },
|
|
21
|
+
});
|
|
17
22
|
}
|
|
18
23
|
async getAuthObject() {
|
|
19
24
|
let postBody = {
|
|
@@ -43,10 +48,9 @@ class Auth {
|
|
|
43
48
|
user_email: authObject.emailAddress,
|
|
44
49
|
};
|
|
45
50
|
try {
|
|
46
|
-
let res = await this.
|
|
51
|
+
let res = await this.httpApp.post('api/impersonation', postBody, {
|
|
47
52
|
headers: {
|
|
48
53
|
Cookie: `prod_auth_token=${authObject.authToken};`,
|
|
49
|
-
origin: addigy_constants_1.Urls.app,
|
|
50
54
|
},
|
|
51
55
|
});
|
|
52
56
|
const cookies = res.headers['set-cookie'];
|
package/lib/devices/devices.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { IAddigyConfig } from '../types';
|
|
3
|
+
import { Device } from './devices.types';
|
|
3
4
|
export declare class Devices {
|
|
4
5
|
private readonly http;
|
|
5
6
|
private readonly config;
|
|
6
7
|
constructor(http: AxiosInstance, config: IAddigyConfig);
|
|
7
|
-
getOnlineDevices(): Promise<
|
|
8
|
-
getDevices(): Promise<
|
|
9
|
-
getPolicyDevices(policyId: string): Promise<
|
|
10
|
-
updateDevicePolicy(policyId: string, agentId: string): Promise<
|
|
8
|
+
getOnlineDevices(): Promise<Device[]>;
|
|
9
|
+
getDevices(): Promise<Device[]>;
|
|
10
|
+
getPolicyDevices(policyId: string): Promise<Device[]>;
|
|
11
|
+
updateDevicePolicy(policyId: string, agentId: string): Promise<Device[]>;
|
|
12
|
+
runCommand(agentIds: string[], command: string): Promise<object[]>;
|
|
13
|
+
getCommandOutput(actionId: string, agentId: string): Promise<object[]>;
|
|
11
14
|
}
|
package/lib/devices/devices.js
CHANGED
|
@@ -51,5 +51,27 @@ class Devices {
|
|
|
51
51
|
throw err;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
async runCommand(agentIds, command) {
|
|
55
|
+
let postBody = {
|
|
56
|
+
agent_ids: agentIds,
|
|
57
|
+
command: command,
|
|
58
|
+
};
|
|
59
|
+
try {
|
|
60
|
+
let res = await this.http.post(`devices/commands`, postBody);
|
|
61
|
+
return res.data;
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async getCommandOutput(actionId, agentId) {
|
|
68
|
+
try {
|
|
69
|
+
let res = await this.http.get(`devices/output?action_id=${actionId}&agentid=${agentId}`);
|
|
70
|
+
return res.data;
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
throw err;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
54
76
|
}
|
|
55
77
|
exports.Devices = Devices;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export interface Device {
|
|
2
|
+
'Passcode Compliant With Profiles': string;
|
|
3
|
+
'Battery Capacity Loss Percentage': number;
|
|
4
|
+
'Has Unlock Token': boolean;
|
|
5
|
+
'Malwarebytes Account ID'?: string | number;
|
|
6
|
+
'Authenticated Root Volume Enabled': boolean;
|
|
7
|
+
'Passcode Compliant'?: string | number;
|
|
8
|
+
MeId: string;
|
|
9
|
+
'Has Wireless': boolean;
|
|
10
|
+
'Local IP': string;
|
|
11
|
+
'Is Recovery Lock Enabled': null;
|
|
12
|
+
Timezone: string;
|
|
13
|
+
client_ip: string;
|
|
14
|
+
'Current MNC': string;
|
|
15
|
+
'Identity Username'?: string;
|
|
16
|
+
'Kernel Panic': boolean;
|
|
17
|
+
'Malwarebytes Suspicious Activity Detected'?: boolean;
|
|
18
|
+
'EAS Device Identifier': string;
|
|
19
|
+
'Personal Hotspot Enabled': boolean;
|
|
20
|
+
Malwarebytes: boolean;
|
|
21
|
+
user_override: string;
|
|
22
|
+
'Xcode Installed': boolean;
|
|
23
|
+
'Device Chip Type': string;
|
|
24
|
+
'MDM Last Connected': string;
|
|
25
|
+
'Build Version': string;
|
|
26
|
+
'Used Memory (GB)': number;
|
|
27
|
+
'Policy ID': string;
|
|
28
|
+
'LocalHost Name': string;
|
|
29
|
+
'External Boot Level': string;
|
|
30
|
+
'Java Vendor': string;
|
|
31
|
+
'SMART Failing': boolean;
|
|
32
|
+
'Gatekeeper Enabled': boolean;
|
|
33
|
+
'Firewall Allowed Applications'?: string[] | string;
|
|
34
|
+
'Identity Job Title'?: string;
|
|
35
|
+
'Is MDM Software Update Stuck': boolean;
|
|
36
|
+
Username?: string;
|
|
37
|
+
'Ethernet MAC Address': string;
|
|
38
|
+
'Firmware Password Allow Orams': boolean;
|
|
39
|
+
'Bandwidth Saved (GB)': number;
|
|
40
|
+
'Enrolled Via ADE': boolean;
|
|
41
|
+
'User Enrollment': boolean;
|
|
42
|
+
'Azure AD Device Ids'?: string[] | number[];
|
|
43
|
+
'Passcode Lock Grace Period Enforced'?: boolean;
|
|
44
|
+
'Firewall Stealth Mode Enabled': boolean;
|
|
45
|
+
'Active Managed Users'?: number;
|
|
46
|
+
'Processor Speed (GHz)': number;
|
|
47
|
+
'macOS Version': string;
|
|
48
|
+
'MDM Update Eligibility': boolean;
|
|
49
|
+
'macOS Sonoma Support': boolean;
|
|
50
|
+
'Firewall Blocked Applications'?: string[] | string;
|
|
51
|
+
iMEI: string;
|
|
52
|
+
Locales: string[];
|
|
53
|
+
'Last Online': string;
|
|
54
|
+
'Mac UUID': string;
|
|
55
|
+
'32-Bit Application Paths'?: string[];
|
|
56
|
+
'Total Memory (GB)': 8;
|
|
57
|
+
'Battery Cycles': number;
|
|
58
|
+
'Is Activation Lock Manageable': boolean;
|
|
59
|
+
'Splashtop Version'?: string;
|
|
60
|
+
'Current MCC': string;
|
|
61
|
+
'Subscriber MCC': string;
|
|
62
|
+
'Uptime (days)': number;
|
|
63
|
+
'Peer Count': number;
|
|
64
|
+
'Admin Users': string[];
|
|
65
|
+
Online: boolean;
|
|
66
|
+
'Is FindMy Enabled'?: boolean;
|
|
67
|
+
UDID: string;
|
|
68
|
+
'Serial Number': string;
|
|
69
|
+
'Subscriber Carrier': string;
|
|
70
|
+
Languages?: string[];
|
|
71
|
+
'Warranty Days Left'?: number;
|
|
72
|
+
'Logged in iCloud Users'?: number;
|
|
73
|
+
'Audit Execution (seconds)': number;
|
|
74
|
+
'Cloud Backup Enabled': boolean;
|
|
75
|
+
'Total Disk Space (GB)': number;
|
|
76
|
+
'Max Resident Users': number;
|
|
77
|
+
'Bandwidth Served (GB)': number;
|
|
78
|
+
'Microsoft Company Portal Version'?: string;
|
|
79
|
+
'Bootstrap Token Required For Software Update': boolean;
|
|
80
|
+
'Files Served': number;
|
|
81
|
+
'LANCache Size (bytes)': number;
|
|
82
|
+
'Firmware Password Change Pending': boolean;
|
|
83
|
+
policy_id: string;
|
|
84
|
+
'Third-Party Agents': string[];
|
|
85
|
+
'Device Model Name': string;
|
|
86
|
+
'Identity Provider Name'?: string;
|
|
87
|
+
'OS Version': string;
|
|
88
|
+
'Activation Lock Enabled': boolean;
|
|
89
|
+
'Sim Carrier': string;
|
|
90
|
+
'Ethernet MA CS'?: string;
|
|
91
|
+
'Current Carrier': string;
|
|
92
|
+
'System Version': string;
|
|
93
|
+
'Malwarebytes Version'?: string;
|
|
94
|
+
'Phone Number': string;
|
|
95
|
+
'OS Platform': string;
|
|
96
|
+
'Policy IDs': string[];
|
|
97
|
+
'Identity Password Set Date'?: string | number | Date;
|
|
98
|
+
'Privileged MDM': boolean;
|
|
99
|
+
'Tmp Size (MB)': number;
|
|
100
|
+
'Bootstrap Token Allowed For Authentication': string;
|
|
101
|
+
'Third-Party Kernel Extensions'?: string[];
|
|
102
|
+
'Has MDM': boolean;
|
|
103
|
+
'Wifi MAC Address'?: string;
|
|
104
|
+
'Product Name': string;
|
|
105
|
+
'Device Category'?: string;
|
|
106
|
+
'Carrier Settings Version': string;
|
|
107
|
+
'Has MDM Profile Approved': boolean;
|
|
108
|
+
'Product Description': string;
|
|
109
|
+
'Malwarebytes Nebula Machine ID'?: string | number;
|
|
110
|
+
'Battery Failures': number;
|
|
111
|
+
'Software Update Device ID': string;
|
|
112
|
+
'Battery Percentage': number;
|
|
113
|
+
'Cellular Technology': number;
|
|
114
|
+
'Identity Employee Department'?: string;
|
|
115
|
+
'Current User': string;
|
|
116
|
+
'Modem Firmware Version': string;
|
|
117
|
+
'Identity Office Location'?: string;
|
|
118
|
+
'Addigy Splashtop Installed'?: boolean;
|
|
119
|
+
'Bootstrap Token Required For Kernel Extension Approval': boolean;
|
|
120
|
+
'Active Users': string[];
|
|
121
|
+
Compliant?: boolean;
|
|
122
|
+
'Is MDM Client Stuck': boolean;
|
|
123
|
+
'Azure AD User Ids'?: string[];
|
|
124
|
+
'Passcode Lock Grace Period'?: string | number | Date;
|
|
125
|
+
'Firmware Password Exists': boolean;
|
|
126
|
+
'Subscriber MNC': string;
|
|
127
|
+
'Last Cloud Backup Date'?: string | number | Date;
|
|
128
|
+
'Identity Employee Type'?: string | number;
|
|
129
|
+
'Registration Date'?: string | number | Date;
|
|
130
|
+
'Secure Boot Level': string;
|
|
131
|
+
'Battery Charging': boolean;
|
|
132
|
+
agentid: string;
|
|
133
|
+
'Firewall Enabled': boolean;
|
|
134
|
+
'Identity Employee Hire Date'?: string | number | Date;
|
|
135
|
+
'Data Roaming Enabled': boolean;
|
|
136
|
+
'Is Apple Silicon'?: boolean;
|
|
137
|
+
'Identity Usage Location'?: string;
|
|
138
|
+
'Display On': boolean;
|
|
139
|
+
'Java Version'?: string;
|
|
140
|
+
'Third-Party Daemons': string[];
|
|
141
|
+
'Last Reboot Timestamp': number;
|
|
142
|
+
'Malwarebytes Last Scan'?: string | number | Date;
|
|
143
|
+
'Do Not Disturb Enabled': boolean;
|
|
144
|
+
'MDM Activation Lock Enabled': boolean;
|
|
145
|
+
'Malwarebytes Suspicious Activity Count'?: string | number;
|
|
146
|
+
'Is Supervised': boolean;
|
|
147
|
+
'Hardware Encryption Capability (iOS only)'?: string;
|
|
148
|
+
'Bluetooth MAC': string;
|
|
149
|
+
'Voice Roaming Enabled': boolean;
|
|
150
|
+
'Firewall Block All Incoming Connections': boolean;
|
|
151
|
+
'Free Disk Space (GB)': number;
|
|
152
|
+
iCCID: string;
|
|
153
|
+
'Awaiting Configuration': boolean;
|
|
154
|
+
'Is Roaming': boolean;
|
|
155
|
+
'Free Disk Percentage': number;
|
|
156
|
+
'Installed Profiles': string[];
|
|
157
|
+
'Battery Temperature(Fahrenheit)': number;
|
|
158
|
+
'System Integrity Protection Enabled': boolean;
|
|
159
|
+
'MDM Lost Mode Enabled': boolean;
|
|
160
|
+
'Splashtop ID': string;
|
|
161
|
+
'Addigy Identity Users'?: number;
|
|
162
|
+
'Processor Type': string;
|
|
163
|
+
'Hardware Model': string;
|
|
164
|
+
'Identity Mobile Phone'?: string;
|
|
165
|
+
'FileVault Enabled': boolean;
|
|
166
|
+
'Passcode Present'?: boolean;
|
|
167
|
+
'Battery Temperature(Celsius)': number;
|
|
168
|
+
'Remote Login Enabled': boolean;
|
|
169
|
+
'Agent Version': string;
|
|
170
|
+
'Time Machine Days Since Last Backup'?: number;
|
|
171
|
+
'Identity Email'?: string;
|
|
172
|
+
'FileVault Key Escrowed': boolean;
|
|
173
|
+
'Host Name'?: string;
|
|
174
|
+
'Is MDM Identity Certificate Installed': boolean;
|
|
175
|
+
'Location Service Enabled': boolean;
|
|
176
|
+
'Device Name': string;
|
|
177
|
+
'Malwarebytes Machine ID'?: string | number;
|
|
178
|
+
'Is Shared iPad'?: boolean;
|
|
179
|
+
'Remote Desktop Enabled': boolean;
|
|
180
|
+
'Days Since Last Cloud Backup'?: number;
|
|
181
|
+
'Is iCloud Enabled'?: boolean;
|
|
182
|
+
'Splashtop Installation Date'?: string | number | Date;
|
|
183
|
+
'Crashplan Days Since Last Backup'?: number;
|
|
184
|
+
'Policy Execution (seconds)': number;
|
|
185
|
+
'Addigy Identity Installed': boolean;
|
|
186
|
+
'Displays Serial Number'?: string;
|
|
187
|
+
'Identity User Display Name'?: string;
|
|
188
|
+
'Watchman Monitoring Installed': false;
|
|
189
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAddigyInternalAuthObject } from '../auth/auth.types';
|
|
2
|
-
import { CreateWebContentFilterPayload, Extension, NotificationSettings, PPPCInput, ServiceManagementPayloadRule } from './mdm.types';
|
|
2
|
+
import { CreateWebContentFilterPayload, Extension, MdmConfigurationInput, NotificationSettings, PPPCInput, ServiceManagementPayloadRule } from './mdm.types';
|
|
3
3
|
import { FilevaultRequest } from '../files/files.types';
|
|
4
4
|
export declare class MdmPolicies {
|
|
5
5
|
private readonly http;
|
|
@@ -17,4 +17,5 @@ export declare class MdmPolicies {
|
|
|
17
17
|
createWebContentFilterPolicy(authObject: IAddigyInternalAuthObject, payloadName: string, webContentPayload: CreateWebContentFilterPayload, priority?: number): Promise<any>;
|
|
18
18
|
createFilevaultPolicy(authObject: IAddigyInternalAuthObject, name: string, filevault: FilevaultRequest, payloadPriority?: number): Promise<any>;
|
|
19
19
|
createPPPCPolicy(authObject: IAddigyInternalAuthObject, name: string, pppcPolicy: PPPCInput[]): Promise<any>;
|
|
20
|
+
createMdmCertificate(authObject: IAddigyInternalAuthObject, mdmConfigurationInput: MdmConfigurationInput): Promise<any>;
|
|
20
21
|
}
|
package/lib/mdm/mdm-policies.js
CHANGED
|
@@ -278,7 +278,7 @@ class MdmPolicies {
|
|
|
278
278
|
addigy_payload_type: 'com.addigy.TCC.configuration-profile-policy.com.apple.TCC.configuration-profile-policy',
|
|
279
279
|
payload_type: 'com.apple.TCC.configuration-profile-policy',
|
|
280
280
|
payload_display_name: name,
|
|
281
|
-
payload_group_id:
|
|
281
|
+
payload_group_id: (0, uuid_1.v4)(),
|
|
282
282
|
payload_version: 1,
|
|
283
283
|
payload_identifier: `com.addigy.TCC.configuration-profile-policy.com.apple.TCC.configuration-profile-policy.${groupUUID}`,
|
|
284
284
|
payload_uuid: (0, uuid_1.v4)(),
|
|
@@ -343,5 +343,24 @@ class MdmPolicies {
|
|
|
343
343
|
});
|
|
344
344
|
return res.data;
|
|
345
345
|
}
|
|
346
|
+
async createMdmCertificate(authObject, mdmConfigurationInput) {
|
|
347
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
348
|
+
const payload = {
|
|
349
|
+
addigy_payload_type: 'com.addigy.certificate.com.apple.security.root',
|
|
350
|
+
payload_type: 'com.apple.security.root',
|
|
351
|
+
payload_version: 1,
|
|
352
|
+
payload_group_id: groupUUID,
|
|
353
|
+
payload_identifier: `com.addigy.certificate.com.apple.security.root.${groupUUID}`,
|
|
354
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
355
|
+
addigy_payload_version: 0,
|
|
356
|
+
...mdmConfigurationInput,
|
|
357
|
+
};
|
|
358
|
+
const res = await this.http.post('/', { payloads: [payload] }, {
|
|
359
|
+
headers: {
|
|
360
|
+
Cookie: `auth_token=${authObject.authToken};`,
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
return res.data;
|
|
364
|
+
}
|
|
346
365
|
}
|
|
347
366
|
exports.MdmPolicies = MdmPolicies;
|
package/lib/mdm/mdm.types.d.ts
CHANGED
|
@@ -200,3 +200,12 @@ export interface PoliciesMdmPayload {
|
|
|
200
200
|
configuration_id: string;
|
|
201
201
|
policy_id: string;
|
|
202
202
|
}
|
|
203
|
+
export interface MdmConfigurationInput {
|
|
204
|
+
payload_priority: number;
|
|
205
|
+
payload_content: string;
|
|
206
|
+
payload_certificate_file_name: string;
|
|
207
|
+
payload_display_name: string;
|
|
208
|
+
}
|
|
209
|
+
export type MdmConfiguration = MdmConfigurationInput & Payload & {
|
|
210
|
+
addigy_payload_version: number;
|
|
211
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { Policy } from './policies.types';
|
|
2
3
|
export declare class Policies {
|
|
3
4
|
private readonly http;
|
|
4
5
|
constructor(http: AxiosInstance);
|
|
5
|
-
getPolicies(): Promise<
|
|
6
|
-
getPolicyInstructions(policyId: string, provider?: string): Promise<
|
|
7
|
-
createPolicyInstructions(policyId: string, instructionId: string): Promise<
|
|
8
|
-
deletePolicyInstructions(policyId: string, instructionId: string, provider?: string): Promise<
|
|
6
|
+
getPolicies(): Promise<Policy[]>;
|
|
7
|
+
getPolicyInstructions(policyId: string, provider?: string): Promise<Policy[]>;
|
|
8
|
+
createPolicyInstructions(policyId: string, instructionId: string): Promise<Policy[]>;
|
|
9
|
+
deletePolicyInstructions(policyId: string, instructionId: string, provider?: string): Promise<Policy[]>;
|
|
9
10
|
getPolicyDetails(policyId: string, provider?: string): Promise<object[]>;
|
|
10
11
|
createPolicy(name: string, parentId?: string, icon?: string, color?: string): Promise<object[]>;
|
|
11
12
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { Profile } from './profiles.types';
|
|
2
3
|
export declare class Profiles {
|
|
3
4
|
private readonly http;
|
|
4
5
|
constructor(http: AxiosInstance);
|
|
5
|
-
getProfiles(instructionId?: string): Promise<
|
|
6
|
-
createProfile(name: string, payloads: object[]): Promise<
|
|
7
|
-
updateProfile(instructionId: string, payloads: object[]): Promise<
|
|
8
|
-
deleteProfile(instructionId: string): Promise<
|
|
6
|
+
getProfiles(instructionId?: string): Promise<Profile[]>;
|
|
7
|
+
createProfile(name: string, payloads: object[]): Promise<Profile>;
|
|
8
|
+
updateProfile(instructionId: string, payloads: object[]): Promise<Profile>;
|
|
9
|
+
deleteProfile(instructionId: string): Promise<Profile>;
|
|
9
10
|
}
|
|
@@ -18,3 +18,53 @@ export interface CustomProfileJSONData {
|
|
|
18
18
|
payload_display_name: string;
|
|
19
19
|
payload_content: any[];
|
|
20
20
|
}
|
|
21
|
+
export interface Profile {
|
|
22
|
+
category: string;
|
|
23
|
+
commands: string[];
|
|
24
|
+
label: string;
|
|
25
|
+
editid: string;
|
|
26
|
+
profiles: string[];
|
|
27
|
+
orgid: string;
|
|
28
|
+
type: string;
|
|
29
|
+
public: boolean;
|
|
30
|
+
policy_restricted: boolean;
|
|
31
|
+
instructionId: string;
|
|
32
|
+
priority?: string;
|
|
33
|
+
version?: string;
|
|
34
|
+
base_identifier?: string;
|
|
35
|
+
remove_script: string;
|
|
36
|
+
identifier?: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
run_on_success: boolean;
|
|
39
|
+
tcc_version: number;
|
|
40
|
+
software_icon: {
|
|
41
|
+
file_path: string;
|
|
42
|
+
file_name: string;
|
|
43
|
+
id: string;
|
|
44
|
+
filename: string;
|
|
45
|
+
provider: string;
|
|
46
|
+
md5_hash: string;
|
|
47
|
+
};
|
|
48
|
+
description: string;
|
|
49
|
+
user_email: string;
|
|
50
|
+
downloads: Record<string, unknown>[];
|
|
51
|
+
price_per_device: number;
|
|
52
|
+
user_instruction?: string;
|
|
53
|
+
scopes: string[];
|
|
54
|
+
firewall_instruction?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
profile: {
|
|
57
|
+
payload_uuid: string;
|
|
58
|
+
payloads: string[];
|
|
59
|
+
payload_identifier: string;
|
|
60
|
+
downloads_dir: string;
|
|
61
|
+
payload_version: number;
|
|
62
|
+
payload_type: string;
|
|
63
|
+
};
|
|
64
|
+
installation_script: string;
|
|
65
|
+
status_on_skipped: string;
|
|
66
|
+
condition: string;
|
|
67
|
+
archived: boolean;
|
|
68
|
+
provider: string;
|
|
69
|
+
dns_instruction: null;
|
|
70
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { IAddigyInternalAuthObject } from '../auth/auth.types';
|
|
3
|
-
import { CreateSoftware } from './software.types';
|
|
3
|
+
import { CreateSoftware, Software as ISoftware } from './software.types';
|
|
4
4
|
export declare class Software {
|
|
5
5
|
private readonly http;
|
|
6
6
|
constructor(http: AxiosInstance);
|
|
7
|
-
getPublicSoftware(): Promise<
|
|
8
|
-
getCustomSoftware(): Promise<
|
|
9
|
-
getCustomSoftwareAllVersions(softwareId: string): Promise<
|
|
7
|
+
getPublicSoftware(): Promise<ISoftware[]>;
|
|
8
|
+
getCustomSoftware(): Promise<ISoftware[]>;
|
|
9
|
+
getCustomSoftwareAllVersions(softwareId: string): Promise<ISoftware[]>;
|
|
10
10
|
getCustomSoftwareSpecificVersion(instructionId: string): Promise<object[]>;
|
|
11
11
|
createCustomSoftware(baseIdentifier: string, version: string, downloads: string[], installationScript: string, condition: string, removeScript: string, priority?: number): Promise<object[]>;
|
|
12
12
|
createSoftwareInternal(authObject: IAddigyInternalAuthObject, software: CreateSoftware): Promise<Software>;
|
package/lib/types.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ export interface IAddigyConfig {
|
|
|
4
4
|
adminUsername?: string;
|
|
5
5
|
adminPassword?: string;
|
|
6
6
|
}
|
|
7
|
+
export type AddigyPayloadType = 'com.addigy.syspolicy.system-extension-policy.com.apple.system-extension-policy' | 'com.addigy.TCC.configuration-profile-policy.com.apple.TCC.configuration-profile-policy' | 'com.addigy.syspolicy.kernel-extension-policy.com.apple.syspolicy.kernel-extension-policy' | 'com.addigy.notifications.com.apple.notificationsettings' | 'com.addigy.custom.mdm.payload' | 'com.addigy.securityAndPrivacy.com.apple.MCX.FileVault2' | 'com.addigy.securityAndPrivacy.com.apple.MCX' | 'com.addigy.securityAndPrivacy.com.apple.security.pkcs1' | 'com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryKeyEscrow' | 'com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryRedirect' | 'com.addigy.servicemanagement.com.apple.servicemanagement' | 'com.addigy.webcontent-filter.com.apple.webcontent-filter' | 'com.addigy.certificate.com.apple.security.root';
|
|
8
|
+
export type PayloadType = 'com.apple.system-extension-policy' | 'com.apple.syspolicy.kernel-extension-policy' | 'com.apple.TCC.configuration-profile-policy' | 'com.apple.notificationsettings' | 'custom' | 'com.apple.MCX.FileVault2' | 'com.apple.MCX' | 'com.apple.security.pkcs1' | 'com.apple.security.FDERecoveryKeyEscrow' | 'com.apple.security.FDERecoveryRedirect' | 'com.apple.servicemanagement' | 'com.apple.webcontent-filter' | 'com.apple.security.root';
|
|
7
9
|
export interface Payload {
|
|
8
|
-
addigy_payload_type:
|
|
9
|
-
payload_type:
|
|
10
|
+
addigy_payload_type: AddigyPayloadType;
|
|
11
|
+
payload_type: PayloadType;
|
|
10
12
|
payload_version: number;
|
|
11
13
|
payload_identifier: string;
|
|
12
14
|
payload_uuid: string;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { Policy } from '../policies/policies.types';
|
|
1
2
|
export declare enum UserRoles {
|
|
2
3
|
Owner = "power",
|
|
3
4
|
Admin = "admin",
|
|
4
5
|
User = "user"
|
|
5
6
|
}
|
|
7
|
+
export interface User {
|
|
8
|
+
id: string;
|
|
9
|
+
uid: string;
|
|
10
|
+
name: string;
|
|
11
|
+
email: string;
|
|
12
|
+
phone: string;
|
|
13
|
+
role: UserRoles;
|
|
14
|
+
addigy_role: string;
|
|
15
|
+
policies: Policy[];
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -7,30 +7,30 @@
|
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@expo/plist": "0.1.0",
|
|
10
|
-
"axios": "1.6.
|
|
11
|
-
"http-cookie-agent": "6.0.
|
|
10
|
+
"axios": "1.6.8",
|
|
11
|
+
"http-cookie-agent": "6.0.3",
|
|
12
12
|
"tough-cookie": "4.1.3",
|
|
13
|
-
"uuid": "
|
|
13
|
+
"uuid": "9.0.1"
|
|
14
14
|
},
|
|
15
15
|
"description": "",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@pliancy/eslint-config-ts": "1.1.
|
|
17
|
+
"@pliancy/eslint-config-ts": "1.1.1",
|
|
18
18
|
"@pliancy/semantic-release-config-npm": "2.2.0",
|
|
19
|
-
"@types/jest": "29.5.
|
|
20
|
-
"@types/node": "20.
|
|
19
|
+
"@types/jest": "29.5.12",
|
|
20
|
+
"@types/node": "20.12.4",
|
|
21
21
|
"@types/tough-cookie": "4.0.5",
|
|
22
22
|
"@types/uuid": "9.0.8",
|
|
23
23
|
"commitizen": "4.3.0",
|
|
24
|
+
"concurrently": "8.2.2",
|
|
24
25
|
"cpy-cli": "5.0.0",
|
|
25
26
|
"cz-conventional-changelog": "3.3.0",
|
|
26
|
-
"husky": "
|
|
27
|
+
"husky": "9.0.11",
|
|
27
28
|
"jest": "29.7.0",
|
|
28
|
-
"
|
|
29
|
-
"open": "10.0.4",
|
|
29
|
+
"open": "10.1.0",
|
|
30
30
|
"pinst": "3.0.0",
|
|
31
31
|
"rimraf": "5.0.5",
|
|
32
|
-
"ts-jest": "29.1.
|
|
33
|
-
"typescript": "5.
|
|
32
|
+
"ts-jest": "29.1.2",
|
|
33
|
+
"typescript": "5.4.3"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"addigy",
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
"url": "https://github.com/pliancy/addigy-node"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
-
"build": "
|
|
49
|
+
"build": "concurrently 'yarn clean' 'yarn test' 'yarn tsc' 'yarn copy'",
|
|
50
50
|
"build:check": "tsc --noEmit",
|
|
51
51
|
"clean": "rimraf coverage dist tmp",
|
|
52
52
|
"copy": "pinst --disable && cpy package.json dist && cpy README.md dist && pinst --enable",
|
|
53
53
|
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
54
54
|
"_postinstall": "husky install",
|
|
55
|
-
"qa": "
|
|
55
|
+
"qa": "concurrently 'yarn lint' 'yarn test' ' yarn clean' 'yarn build:check'",
|
|
56
56
|
"semantic-release": "semantic-release",
|
|
57
57
|
"test": "jest",
|
|
58
58
|
"tsc": "tsc -p tsconfig.build.json"
|
|
59
59
|
},
|
|
60
60
|
"types": "index.d.ts",
|
|
61
|
-
"version": "2.10.
|
|
61
|
+
"version": "2.10.2",
|
|
62
62
|
"volta": {
|
|
63
|
-
"node": "20.
|
|
64
|
-
"yarn": "1.22.
|
|
63
|
+
"node": "20.12.1",
|
|
64
|
+
"yarn": "1.22.22"
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
export declare class Commands {
|
|
3
|
-
private readonly http;
|
|
4
|
-
constructor(http: AxiosInstance);
|
|
5
|
-
runCommand(agentIds: string[], command: string): Promise<object[]>;
|
|
6
|
-
getCommandOutput(actionId: string, agentId: string): Promise<object[]>;
|
|
7
|
-
}
|
package/lib/commands/commands.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Commands = void 0;
|
|
4
|
-
class Commands {
|
|
5
|
-
constructor(http) {
|
|
6
|
-
this.http = http;
|
|
7
|
-
}
|
|
8
|
-
async runCommand(agentIds, command) {
|
|
9
|
-
let postBody = {
|
|
10
|
-
agent_ids: agentIds,
|
|
11
|
-
command: command,
|
|
12
|
-
};
|
|
13
|
-
try {
|
|
14
|
-
let res = await this.http.post(`devices/commands`, postBody);
|
|
15
|
-
return res.data;
|
|
16
|
-
}
|
|
17
|
-
catch (err) {
|
|
18
|
-
throw err;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
async getCommandOutput(actionId, agentId) {
|
|
22
|
-
try {
|
|
23
|
-
let res = await this.http.get(`devices/output?action_id=${actionId}&agentid=${agentId}`);
|
|
24
|
-
return res.data;
|
|
25
|
-
}
|
|
26
|
-
catch (err) {
|
|
27
|
-
throw err;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.Commands = Commands;
|