@mcesystems/mdm-client-g4 1.0.64

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generateEnrollmentProfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateEnrollmentProfile.d.ts","sourceRoot":"","sources":["../../../src/example/generateEnrollmentProfile.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * GraphQL queries and mutations for MDM API
3
+ */
4
+ export declare const GENERATE_ENROLLMENT_PROFILE: string;
5
+ export declare const INSTALL_APP: string;
6
+ export declare const WAIT_FOR_DEVICE_TO_ENROLL: string;
7
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,2BAA2B,QAOvC,CAAC;AAEF,eAAO,MAAM,WAAW,QAOvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAQrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { MdmClient, createMDMClient } from "./logic/mdmClient";
2
+ export type { GenerateEnrollmentProfileResponse, InstallAppOptions, InstallAppMdmOptions, MdmClientConfig, WaitForDeviceToEnrollResponse, InstallAppResponse, DeviceType, MdmApiCallStatus, } from "./types/mdm";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EACX,iCAAiC,EACjC,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,GAChB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * MDM API Client
3
+ */
4
+ import type { GenerateEnrollmentProfileResponse, InstallAppResponse, MdmClientConfig, WaitForDeviceToEnrollResponse } from "@/types/mdm";
5
+ export declare class MdmClient {
6
+ readonly config: MdmClientConfig;
7
+ private client;
8
+ constructor(config: MdmClientConfig);
9
+ generateEnrollmentProfile(deviceId: string): Promise<GenerateEnrollmentProfileResponse>;
10
+ waitForDeviceToEnroll(deviceId: string, previousOpRef?: string): Promise<WaitForDeviceToEnrollResponse>;
11
+ installApp(deviceId: string, options: {
12
+ appId?: string;
13
+ url?: string;
14
+ waitForInstalled?: boolean;
15
+ }): Promise<InstallAppResponse>;
16
+ }
17
+ export declare function createMDMClient(): Promise<MdmClient | undefined>;
18
+ //# sourceMappingURL=mdmClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdmClient.d.ts","sourceRoot":"","sources":["../../../src/logic/mdmClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EACX,iCAAiC,EACjC,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,MAAM,aAAa,CAAC;AAYrB,qBAAa,SAAS;IAGT,QAAQ,CAAC,MAAM,EAAE,eAAe;IAF5C,OAAO,CAAC,MAAM,CAAgB;gBAET,MAAM,EAAE,eAAe;IAyB/B,yBAAyB,CACrC,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,iCAAiC,CAAC;IAehC,qBAAqB,CACjC,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,6BAA6B,CAAC;IAe5B,UAAU,CACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GACnE,OAAO,CAAC,kBAAkB,CAAC;CA2B9B;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAkBtE"}
@@ -0,0 +1,30 @@
1
+ export type DeviceType = "IOS" | "ANDROID";
2
+ export type MdmApiCallStatus = "OK" | "SERVER_ERROR" | "TIMEOUT" | "UNENROLLED_DEVICE_ID";
3
+ export interface GenerateEnrollmentProfileResponse {
4
+ status: MdmApiCallStatus;
5
+ profile?: string | null;
6
+ }
7
+ export interface WaitForDeviceToEnrollResponse {
8
+ status: MdmApiCallStatus;
9
+ isEnrolled?: boolean | null;
10
+ opRef?: string | null;
11
+ }
12
+ export interface InstallAppResponse {
13
+ status: MdmApiCallStatus;
14
+ opRef?: string | null;
15
+ }
16
+ export interface MdmClientConfig {
17
+ endpoint: string;
18
+ authToken?: string;
19
+ timeout?: number;
20
+ }
21
+ export interface InstallAppMdmOptions {
22
+ appId?: string;
23
+ url?: string;
24
+ waitForInstalled?: boolean;
25
+ }
26
+ export interface InstallAppOptions {
27
+ installViaMdm?: boolean;
28
+ mdm?: InstallAppMdmOptions;
29
+ }
30
+ //# sourceMappingURL=mdm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdm.d.ts","sourceRoot":"","sources":["../../../src/types/mdm.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,cAAc,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE1F,MAAM,WAAW,iCAAiC;IACjD,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,6BAA6B;IAC7C,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,oBAAoB,CAAC;CAC3B"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@mcesystems/mdm-client-g4",
3
+ "version": "1.0.64",
4
+ "description": "MDM client for device management",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "keywords": [
16
+ "typescript",
17
+ "esm"
18
+ ],
19
+ "author": "Device Management Tools Contributors",
20
+ "license": "ISC",
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "dependencies": {
25
+ "dotenv": "^17.2.3",
26
+ "graphql-request": "^5.2.0",
27
+ "tsx": "^4.21.0",
28
+ "uuid": "^13.0.0",
29
+ "@mcesystems/auth": "npm:@mcesystems/auth-g4@1.0.64",
30
+ "@mcesystems/tool-debug": "1.0.64"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^22.10.2",
34
+ "@types/plist": "^3.0.5",
35
+ "cross-env": "^10.1.0",
36
+ "esbuild": "^0.27.0",
37
+ "plist": "^3.1.0",
38
+ "rimraf": "^6.0.1",
39
+ "typescript": "^5.7.2"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "README.md"
44
+ ],
45
+ "scripts": {
46
+ "build": "tsx esbuild.config.mts && tsc --emitDeclarationOnly",
47
+ "clean": "rimraf dist",
48
+ "pack": "npm pack"
49
+ }
50
+ }