addigy 2.10.3 → 2.10.4
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/lib/mdm/mdm-profiles.d.ts +1 -1
- package/lib/mdm/mdm-profiles.js +2 -2
- package/package.json +63 -63
|
@@ -2,7 +2,7 @@ import { IAddigyInternalAuthObject } from '../auth/auth.types';
|
|
|
2
2
|
import { SupportedOsVersions } from '../types';
|
|
3
3
|
export declare class MdmProfiles {
|
|
4
4
|
private readonly http;
|
|
5
|
-
createCustomProfile(authObject: IAddigyInternalAuthObject, name: string,
|
|
5
|
+
createCustomProfile(authObject: IAddigyInternalAuthObject, name: string, customProfileBase64: string, supportedOsVersions: SupportedOsVersions, payloadScope?: 'System' | 'User', is_profile_signed?: boolean): Promise<any>;
|
|
6
6
|
createMdmProfile(authObject: IAddigyInternalAuthObject, mdmProfile: any): Promise<any>;
|
|
7
7
|
private toSnakeCase;
|
|
8
8
|
}
|
package/lib/mdm/mdm-profiles.js
CHANGED
|
@@ -17,14 +17,14 @@ class MdmProfiles {
|
|
|
17
17
|
headers: { origin: addigy_constants_1.Urls.appProd },
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
async createCustomProfile(authObject, name,
|
|
20
|
+
async createCustomProfile(authObject, name, customProfileBase64, supportedOsVersions, payloadScope = 'System', is_profile_signed = false) {
|
|
21
21
|
const groupUUID = (0, uuid_1.v4)();
|
|
22
|
+
const customProfileText = Buffer.from(customProfileBase64, 'base64').toString('utf-8');
|
|
22
23
|
const customProfileJson = plist_1.default.parse(customProfileText);
|
|
23
24
|
const updateCustomProfileJson = Object.entries(customProfileJson).reduce((acc, [key, value]) => {
|
|
24
25
|
acc[this.toSnakeCase(key)] = value;
|
|
25
26
|
return acc;
|
|
26
27
|
}, {});
|
|
27
|
-
const customProfileBase64 = Buffer.from(customProfileText).toString('base64');
|
|
28
28
|
const payload = {
|
|
29
29
|
addigy_payload_type: 'com.addigy.custom.mdm.payload',
|
|
30
30
|
payload_type: 'custom',
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@expo/plist": "0.1.0",
|
|
10
|
-
"axios": "1.6.8",
|
|
11
|
-
"http-cookie-agent": "6.0.3",
|
|
12
|
-
"tough-cookie": "4.1.3",
|
|
13
|
-
"uuid": "9.0.1"
|
|
14
|
-
},
|
|
15
|
-
"description": "",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@pliancy/eslint-config-ts": "1.1.1",
|
|
18
|
-
"@pliancy/semantic-release-config-npm": "2.2.0",
|
|
19
|
-
"@types/jest": "29.5.12",
|
|
20
|
-
"@types/node": "20.12.4",
|
|
21
|
-
"@types/tough-cookie": "4.0.5",
|
|
22
|
-
"@types/uuid": "9.0.8",
|
|
23
|
-
"commitizen": "4.3.0",
|
|
24
|
-
"concurrently": "8.2.2",
|
|
25
|
-
"cpy-cli": "5.0.0",
|
|
26
|
-
"cz-conventional-changelog": "3.3.0",
|
|
27
|
-
"husky": "9.0.11",
|
|
28
|
-
"jest": "29.7.0",
|
|
29
|
-
"open": "10.1.0",
|
|
30
|
-
"pinst": "3.0.0",
|
|
31
|
-
"rimraf": "5.0.5",
|
|
32
|
-
"ts-jest": "29.1.2",
|
|
33
|
-
"typescript": "5.4.3"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"addigy",
|
|
37
|
-
"addigy api",
|
|
38
|
-
"rest api",
|
|
39
|
-
"rest"
|
|
40
|
-
],
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"main": "index.js",
|
|
43
|
-
"name": "addigy",
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "https://github.com/pliancy/addigy-node"
|
|
47
|
-
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"build": "concurrently 'yarn clean' 'yarn test' 'yarn tsc' 'yarn copy'",
|
|
50
|
-
"build:check": "tsc --noEmit",
|
|
51
|
-
"clean": "rimraf coverage dist tmp",
|
|
52
|
-
"copy": "pinst --disable && cpy package.json dist && cpy README.md dist && pinst --enable",
|
|
53
|
-
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
54
|
-
"_postinstall": "husky install",
|
|
55
|
-
"qa": "concurrently 'yarn lint' 'yarn test' ' yarn clean' 'yarn build:check'",
|
|
56
|
-
"semantic-release": "semantic-release",
|
|
57
|
-
"test": "jest",
|
|
58
|
-
"tsc": "tsc -p tsconfig.build.json"
|
|
59
|
-
},
|
|
60
|
-
"types": "index.d.ts",
|
|
61
|
-
"version": "2.10.3",
|
|
62
|
-
"volta": {
|
|
63
|
-
"node": "20.12.1",
|
|
64
|
-
"yarn": "1.22.22"
|
|
2
|
+
"author": "Caleb Albers <calebalbers@gmail.com>",
|
|
3
|
+
"config": {
|
|
4
|
+
"commitizen": {
|
|
5
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
65
6
|
}
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@expo/plist": "0.1.3",
|
|
10
|
+
"axios": "1.7.2",
|
|
11
|
+
"http-cookie-agent": "6.0.5",
|
|
12
|
+
"tough-cookie": "4.1.4",
|
|
13
|
+
"uuid": "9.0.1"
|
|
14
|
+
},
|
|
15
|
+
"description": "",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@pliancy/eslint-config-ts": "1.1.1",
|
|
18
|
+
"@pliancy/semantic-release-config-npm": "2.2.0",
|
|
19
|
+
"@types/jest": "29.5.12",
|
|
20
|
+
"@types/node": "20.12.12",
|
|
21
|
+
"@types/tough-cookie": "4.0.5",
|
|
22
|
+
"@types/uuid": "9.0.8",
|
|
23
|
+
"commitizen": "4.3.0",
|
|
24
|
+
"concurrently": "8.2.2",
|
|
25
|
+
"cpy-cli": "5.0.0",
|
|
26
|
+
"cz-conventional-changelog": "3.3.0",
|
|
27
|
+
"husky": "9.0.11",
|
|
28
|
+
"jest": "29.7.0",
|
|
29
|
+
"open": "10.1.0",
|
|
30
|
+
"pinst": "3.0.0",
|
|
31
|
+
"rimraf": "5.0.7",
|
|
32
|
+
"ts-jest": "29.1.4",
|
|
33
|
+
"typescript": "5.4.5"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"addigy",
|
|
37
|
+
"addigy api",
|
|
38
|
+
"rest api",
|
|
39
|
+
"rest"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"main": "index.js",
|
|
43
|
+
"name": "addigy",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/pliancy/addigy-node"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "concurrently 'yarn clean' 'yarn test' 'yarn tsc' 'yarn copy'",
|
|
50
|
+
"build:check": "tsc --noEmit",
|
|
51
|
+
"clean": "rimraf coverage dist tmp",
|
|
52
|
+
"copy": "pinst --disable && cpy package.json dist && cpy README.md dist && pinst --enable",
|
|
53
|
+
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
54
|
+
"_postinstall": "husky install",
|
|
55
|
+
"qa": "concurrently 'yarn lint' 'yarn test' ' yarn clean' 'yarn build:check'",
|
|
56
|
+
"semantic-release": "semantic-release",
|
|
57
|
+
"test": "jest",
|
|
58
|
+
"tsc": "tsc -p tsconfig.build.json"
|
|
59
|
+
},
|
|
60
|
+
"types": "index.d.ts",
|
|
61
|
+
"version": "2.10.4",
|
|
62
|
+
"volta": {
|
|
63
|
+
"node": "20.12.1",
|
|
64
|
+
"yarn": "1.22.22"
|
|
65
|
+
}
|
|
66
66
|
}
|