addigy 2.8.0 → 2.8.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 +1 -1
- package/index.js +33 -28
- package/package.json +19 -19
package/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare class Addigy {
|
|
|
40
40
|
getCustomSoftwareSpecificVersion(instructionId: string): Promise<object[]>;
|
|
41
41
|
getFileUploadUrl(fileName: string, contentType?: string): Promise<string>;
|
|
42
42
|
uploadFile(uploadUrl: string, file: object, contentType?: string): Promise<object[]>;
|
|
43
|
-
createCustomSoftware(baseIdentifier: string, version: string, downloads: string[], installationScript: string, condition: string, removeScript: string): Promise<object[]>;
|
|
43
|
+
createCustomSoftware(baseIdentifier: string, version: string, downloads: string[], installationScript: string, condition: string, removeScript: string, priority?: number): Promise<object[]>;
|
|
44
44
|
getUsers(authObject: IAddigyInternalAuthObject): Promise<object[]>;
|
|
45
45
|
createUser(authObject: IAddigyInternalAuthObject, email: string, name: string, policies: string[] | undefined, role: UserRoles | string, phone?: string): Promise<object[]>;
|
|
46
46
|
updateUser(authObject: IAddigyInternalAuthObject, email: string, name: string, policies: string[] | undefined, role: string, phone?: string): Promise<object[]>;
|
package/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -372,14 +376,15 @@ class Addigy {
|
|
|
372
376
|
throw err;
|
|
373
377
|
}
|
|
374
378
|
}
|
|
375
|
-
async createCustomSoftware(baseIdentifier, version, downloads, installationScript, condition, removeScript) {
|
|
379
|
+
async createCustomSoftware(baseIdentifier, version, downloads, installationScript, condition, removeScript, priority = 10) {
|
|
376
380
|
let postBody = {
|
|
377
381
|
base_identifier: baseIdentifier,
|
|
378
|
-
version
|
|
379
|
-
downloads
|
|
382
|
+
version,
|
|
383
|
+
downloads,
|
|
380
384
|
installation_script: installationScript,
|
|
381
|
-
condition
|
|
385
|
+
condition,
|
|
382
386
|
remove_script: removeScript,
|
|
387
|
+
priority,
|
|
383
388
|
};
|
|
384
389
|
try {
|
|
385
390
|
let res = await this._addigyRequest(`${this.domain}/custom-software`, {
|
|
@@ -580,8 +585,8 @@ class Addigy {
|
|
|
580
585
|
}
|
|
581
586
|
async createKernelExtensionPolicy(authObject, name, allowOverrides, kernalExtensions) {
|
|
582
587
|
var _a, _b;
|
|
583
|
-
let payloadUUID = uuid_1.v4();
|
|
584
|
-
let groupUUID = uuid_1.v4();
|
|
588
|
+
let payloadUUID = (0, uuid_1.v4)();
|
|
589
|
+
let groupUUID = (0, uuid_1.v4)();
|
|
585
590
|
const payload = {
|
|
586
591
|
addigy_payload_type: 'com.addigy.syspolicy.kernel-extension-policy.com.apple.syspolicy.kernel-extension-policy',
|
|
587
592
|
payload_type: 'com.apple.syspolicy.kernel-extension-policy',
|
|
@@ -622,13 +627,13 @@ class Addigy {
|
|
|
622
627
|
}
|
|
623
628
|
async createSystemExtensionPolicy(authObject, name, allowOverrides, systemExtensions) {
|
|
624
629
|
var _a, _b, _c;
|
|
625
|
-
const groupUUID = uuid_1.v4();
|
|
630
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
626
631
|
const payload = {
|
|
627
632
|
addigy_payload_type: 'com.addigy.syspolicy.system-extension-policy.com.apple.system-extension-policy',
|
|
628
633
|
payload_type: 'com.apple.system-extension-policy',
|
|
629
634
|
payload_version: 1,
|
|
630
635
|
payload_identifier: `com.addigy.syspolicy.system-extension-policy.com.apple.system-extension-policy.${groupUUID}`,
|
|
631
|
-
payload_uuid: uuid_1.v4(),
|
|
636
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
632
637
|
payload_group_id: groupUUID,
|
|
633
638
|
payload_enabled: true,
|
|
634
639
|
payload_display_name: name,
|
|
@@ -668,13 +673,13 @@ class Addigy {
|
|
|
668
673
|
}
|
|
669
674
|
}
|
|
670
675
|
async createNotificationSettingsPolicy(authObject, name, notificationSettings) {
|
|
671
|
-
const groupUUID = uuid_1.v4();
|
|
676
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
672
677
|
const payload = {
|
|
673
678
|
addigy_payload_type: 'com.addigy.notifications.com.apple.notificationsettings',
|
|
674
679
|
payload_type: 'com.apple.notificationsettings',
|
|
675
680
|
payload_version: 1,
|
|
676
681
|
payload_identifier: `com.addigy.notifications.com.apple.notificationsettings.${groupUUID}`,
|
|
677
|
-
payload_uuid: uuid_1.v4(),
|
|
682
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
678
683
|
payload_group_id: groupUUID,
|
|
679
684
|
payload_display_name: name,
|
|
680
685
|
notification_settings: notificationSettings,
|
|
@@ -690,7 +695,7 @@ class Addigy {
|
|
|
690
695
|
return JSON.parse(res.body);
|
|
691
696
|
}
|
|
692
697
|
async createCustomProfile(authObject, name, customProfileText, supportedOsVersions, payloadScope = 'System', is_profile_signed = false) {
|
|
693
|
-
const groupUUID = uuid_1.v4();
|
|
698
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
694
699
|
const customProfileJson = plist_1.default.parse(customProfileText);
|
|
695
700
|
const updateCustomProfileJson = Object.entries(customProfileJson).reduce((acc, [key, value]) => {
|
|
696
701
|
acc[this.toSnakeCase(key)] = value;
|
|
@@ -702,7 +707,7 @@ class Addigy {
|
|
|
702
707
|
payload_type: 'custom',
|
|
703
708
|
payload_version: 1,
|
|
704
709
|
payload_identifier: `com.addigy.custom.mdm.payload.${groupUUID}`,
|
|
705
|
-
payload_uuid: `custom-profile-${uuid_1.v4()}`,
|
|
710
|
+
payload_uuid: `custom-profile-${(0, uuid_1.v4)()}`,
|
|
706
711
|
payload_group_id: groupUUID,
|
|
707
712
|
payload_display_name: name,
|
|
708
713
|
is_profile_signed,
|
|
@@ -744,7 +749,7 @@ class Addigy {
|
|
|
744
749
|
}
|
|
745
750
|
}
|
|
746
751
|
async createServiceManagementPolicy(authObject, name, rules, priority = 9) {
|
|
747
|
-
const groupUUID = uuid_1.v4();
|
|
752
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
748
753
|
const payload = {
|
|
749
754
|
addigy_payload_type: 'com.addigy.servicemanagement.com.apple.servicemanagement',
|
|
750
755
|
addigy_payload_version: 0,
|
|
@@ -755,7 +760,7 @@ class Addigy {
|
|
|
755
760
|
payload_identifier: `com.addigy.servicemanagement.com.apple.servicemanagement.${groupUUID}`,
|
|
756
761
|
payload_priority: priority,
|
|
757
762
|
payload_type: 'com.apple.servicemanagement',
|
|
758
|
-
payload_uuid: uuid_1.v4(),
|
|
763
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
759
764
|
payload_version: 1,
|
|
760
765
|
policy_restricted: false,
|
|
761
766
|
requires_device_supervision: false,
|
|
@@ -779,7 +784,7 @@ class Addigy {
|
|
|
779
784
|
}
|
|
780
785
|
}
|
|
781
786
|
async createWebContentFilterPolicy(authObject, payloadName, webContentPayload, priority = 9) {
|
|
782
|
-
const groupUUID = uuid_1.v4();
|
|
787
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
783
788
|
const payload = {
|
|
784
789
|
addigy_payload_type: 'com.addigy.webcontent-filter.com.apple.webcontent-filter',
|
|
785
790
|
addigy_payload_version: 2,
|
|
@@ -803,7 +808,7 @@ class Addigy {
|
|
|
803
808
|
payload_identifier: `com.addigy.webcontent-filter.com.apple.webcontent-filter.${groupUUID}`,
|
|
804
809
|
payload_priority: priority,
|
|
805
810
|
payload_type: 'com.apple.webcontent-filter',
|
|
806
|
-
payload_uuid: uuid_1.v4(),
|
|
811
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
807
812
|
payload_version: 1,
|
|
808
813
|
permitted_urls: null,
|
|
809
814
|
policy_restricted: false,
|
|
@@ -827,8 +832,8 @@ class Addigy {
|
|
|
827
832
|
return JSON.parse(res.body);
|
|
828
833
|
}
|
|
829
834
|
async createFilevaultPolicy(authObject, name, filevault, payloadPriority = 1) {
|
|
830
|
-
const groupUUID = uuid_1.v4();
|
|
831
|
-
const encryptCertPayloadUUID = uuid_1.v4();
|
|
835
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
836
|
+
const encryptCertPayloadUUID = (0, uuid_1.v4)();
|
|
832
837
|
const basePayload = {
|
|
833
838
|
payload_display_name: name,
|
|
834
839
|
payload_version: 1,
|
|
@@ -842,7 +847,7 @@ class Addigy {
|
|
|
842
847
|
payload_type: 'com.apple.MCX.FileVault2',
|
|
843
848
|
addigy_payload_type: 'com.addigy.securityAndPrivacy.com.apple.MCX.FileVault2',
|
|
844
849
|
payload_identifier: `com.addigy.securityAndPrivacy.com.apple.MCX.FileVault2.${groupUUID}`,
|
|
845
|
-
payload_uuid: uuid_1.v4(),
|
|
850
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
846
851
|
enable: filevault.enable ? 'On' : 'Off',
|
|
847
852
|
defer: filevault.defer,
|
|
848
853
|
use_recovery_key: true,
|
|
@@ -859,7 +864,7 @@ class Addigy {
|
|
|
859
864
|
payload_type: 'com.apple.MCX',
|
|
860
865
|
addigy_payload_type: 'com.addigy.securityAndPrivacy.com.apple.MCX',
|
|
861
866
|
payload_identifier: `com.addigy.securityAndPrivacy.com.apple.MCX.${groupUUID} `,
|
|
862
|
-
payload_uuid: uuid_1.v4(),
|
|
867
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
863
868
|
destroy_fv_key_on_standby: filevault.destroyFvKeyOnStandby === undefined
|
|
864
869
|
? null
|
|
865
870
|
: filevault.destroyFvKeyOnStandby,
|
|
@@ -872,14 +877,14 @@ class Addigy {
|
|
|
872
877
|
addigy_payload_type: 'com.addigy.securityAndPrivacy.com.apple.security.pkcs1',
|
|
873
878
|
payload_type: 'com.apple.security.pkcs1',
|
|
874
879
|
payload_identifier: `com.addigy.securityAndPrivacy.com.apple.security.pkcs1.${groupUUID}`,
|
|
875
|
-
payload_uuid: uuid_1.v4(),
|
|
880
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
876
881
|
is_from_security_profile: true,
|
|
877
882
|
}, {
|
|
878
883
|
...basePayload,
|
|
879
884
|
addigy_payload_type: 'com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryKeyEscrow',
|
|
880
885
|
payload_type: 'com.apple.security.FDERecoveryKeyEscrow',
|
|
881
886
|
payload_identifier: `com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryKeyEscrow.${groupUUID}`,
|
|
882
|
-
payload_uuid: uuid_1.v4(),
|
|
887
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
883
888
|
encrypt_cert_payload_uuid: encryptCertPayloadUUID,
|
|
884
889
|
location: 'Key will be escrowed to an Addigy secure database.',
|
|
885
890
|
}, {
|
|
@@ -887,7 +892,7 @@ class Addigy {
|
|
|
887
892
|
addigy_payload_type: 'com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryRedirect',
|
|
888
893
|
payload_type: 'com.apple.security.FDERecoveryRedirect',
|
|
889
894
|
payload_identifier: `com.addigy.securityAndPrivacy.com.apple.security.FDERecoveryRedirect.${groupUUID}`,
|
|
890
|
-
payload_uuid: uuid_1.v4(),
|
|
895
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
891
896
|
encrypt_cert_payload_uuid: encryptCertPayloadUUID,
|
|
892
897
|
redirect_url: '',
|
|
893
898
|
});
|
|
@@ -907,7 +912,7 @@ class Addigy {
|
|
|
907
912
|
}
|
|
908
913
|
}
|
|
909
914
|
async createPPPCPolicy(authObject, name, pppcPolicy) {
|
|
910
|
-
const groupUUID = uuid_1.v4();
|
|
915
|
+
const groupUUID = (0, uuid_1.v4)();
|
|
911
916
|
const payload = {
|
|
912
917
|
addigy_payload_type: 'com.addigy.TCC.configuration-profile-policy.com.apple.TCC.configuration-profile-policy',
|
|
913
918
|
payload_type: 'com.apple.TCC.configuration-profile-policy',
|
|
@@ -915,7 +920,7 @@ class Addigy {
|
|
|
915
920
|
payload_group_id: groupUUID,
|
|
916
921
|
payload_version: 1,
|
|
917
922
|
payload_identifier: `com.addigy.TCC.configuration-profile-policy.com.apple.TCC.configuration-profile-policy.${groupUUID}`,
|
|
918
|
-
payload_uuid: uuid_1.v4(),
|
|
923
|
+
payload_uuid: (0, uuid_1.v4)(),
|
|
919
924
|
services: {
|
|
920
925
|
accessibility: [],
|
|
921
926
|
address_book: [],
|
|
@@ -953,7 +958,7 @@ class Addigy {
|
|
|
953
958
|
static_code: (_a = e.staticCode) !== null && _a !== void 0 ? _a : false,
|
|
954
959
|
predefined_app: null,
|
|
955
960
|
manual_selection: true,
|
|
956
|
-
rowId: uuid_1.v4(),
|
|
961
|
+
rowId: (0, uuid_1.v4)(),
|
|
957
962
|
};
|
|
958
963
|
if (e.service === 'screen_capture' && e.authorization) {
|
|
959
964
|
service.authorization = e.authorization;
|
|
@@ -1153,7 +1158,7 @@ class Addigy {
|
|
|
1153
1158
|
}
|
|
1154
1159
|
async _addigyRequest(url, options) {
|
|
1155
1160
|
try {
|
|
1156
|
-
let res = await got_1.default(url, options);
|
|
1161
|
+
let res = await (0, got_1.default)(url, options);
|
|
1157
1162
|
return res;
|
|
1158
1163
|
}
|
|
1159
1164
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -6,32 +6,32 @@
|
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@expo/plist": "0.0.
|
|
9
|
+
"@expo/plist": "0.0.20",
|
|
10
10
|
"form-data": "4.0.0",
|
|
11
|
-
"got": "11.8.
|
|
11
|
+
"got": "11.8.6",
|
|
12
12
|
"uuid": "8.3.2"
|
|
13
13
|
},
|
|
14
14
|
"description": "",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@pliancy/eslint-config-ts": "0.0
|
|
17
|
-
"@pliancy/semantic-release-config-npm": "2.
|
|
16
|
+
"@pliancy/eslint-config-ts": "1.0.0",
|
|
17
|
+
"@pliancy/semantic-release-config-npm": "2.2.0",
|
|
18
18
|
"@types/got": "9.6.12",
|
|
19
|
-
"@types/jest": "
|
|
20
|
-
"@types/node": "15.
|
|
21
|
-
"@types/uuid": "8.3.
|
|
22
|
-
"commitizen": "4.
|
|
23
|
-
"cpy-cli": "
|
|
19
|
+
"@types/jest": "29.5.5",
|
|
20
|
+
"@types/node": "15.14.9",
|
|
21
|
+
"@types/uuid": "8.3.4",
|
|
22
|
+
"commitizen": "4.3.0",
|
|
23
|
+
"cpy-cli": "5.0.0",
|
|
24
24
|
"cz-conventional-changelog": "3.3.0",
|
|
25
25
|
"gh-pages": "3.2.3",
|
|
26
|
-
"husky": "
|
|
27
|
-
"jest": "
|
|
26
|
+
"husky": "8.0.3",
|
|
27
|
+
"jest": "29.7.0",
|
|
28
28
|
"npm-run-all": "4.1.5",
|
|
29
|
-
"open": "
|
|
30
|
-
"pinst": "
|
|
29
|
+
"open": "9.1.0",
|
|
30
|
+
"pinst": "^3.0.0",
|
|
31
31
|
"rimraf": "3.0.2",
|
|
32
|
-
"ts-jest": "
|
|
33
|
-
"typedoc": "0.
|
|
34
|
-
"typescript": "4.
|
|
32
|
+
"ts-jest": "29.1.1",
|
|
33
|
+
"typedoc": "0.25.1",
|
|
34
|
+
"typescript": "4.9.5"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|
|
37
37
|
"addigy",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"tsc": "tsc -p tsconfig.build.json"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "2.8.
|
|
62
|
+
"version": "2.8.2",
|
|
63
63
|
"volta": {
|
|
64
|
-
"node": "
|
|
65
|
-
"yarn": "1.22.
|
|
64
|
+
"node": "20.8.0",
|
|
65
|
+
"yarn": "1.22.19"
|
|
66
66
|
}
|
|
67
67
|
}
|