react-native-intune 0.1.1 → 1.0.0-rc.1
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/README.md +8 -4
- package/RNIntune.podspec +3 -3
- package/android/build.gradle +46 -25
- package/android/src/main/java/com/reactnativeintune/RNIntunePackage.kt +11 -6
- package/android/src/main/java/com/reactnativeintune/RNIntuneResetJournal.kt +1 -1
- package/ios/RNIntunePlistGuard.m +1 -1
- package/ios/RNIntuneResetJournal.m +1 -1
- package/lib/module/api/tokenProvider.js +3 -0
- package/lib/module/api/tokenProvider.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/decode.js +23 -2
- package/lib/module/internal/decode.js.map +1 -1
- package/lib/module/types.js +37 -6
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/api/tokenProvider.d.ts +3 -0
- package/lib/typescript/src/api/tokenProvider.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/decode.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +61 -11
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +7 -8
- package/plugin/transforms.js +155 -2
- package/plugin/withIntune.js +27 -0
- package/scripts/doctor.mjs +7 -3
- package/scripts/lib/checks.mjs +483 -27
- package/scripts/lib/edits.mjs +329 -0
- package/scripts/lib/project.mjs +13 -0
- package/scripts/setup.mjs +59 -9
- package/sdk-lock.json +9 -8
- package/sdk-versions.json +125 -28
- package/src/api/tokenProvider.ts +3 -0
- package/src/index.ts +1 -0
- package/src/internal/decode.ts +27 -8
- package/src/types.ts +66 -15
package/README.md
CHANGED
|
@@ -22,9 +22,13 @@
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
> **Status:
|
|
26
|
-
>
|
|
27
|
-
>
|
|
25
|
+
> **Status: 1.0 release candidate.** From 1.0 on this follows semantic versioning — the
|
|
26
|
+
> [versioning page](https://bayazetyan.github.io/react-native-intune/docs/versioning) says
|
|
27
|
+
> exactly what that promises and what it cannot. Enrollment and policy enforcement are
|
|
28
|
+
> verified on physical iOS and Android devices against a real tenant, through the broker
|
|
29
|
+
> on each; fresh projects build on bare React Native 0.74 to 0.87 and Expo SDK 54 to 57.
|
|
30
|
+
> Built for Xcode 26 — Xcode 27 support arrives with Microsoft's Intune SDK 22.x, which
|
|
31
|
+
> will be 2.0 here.
|
|
28
32
|
|
|
29
33
|
*Not affiliated with, endorsed by, or sponsored by Microsoft. Microsoft, Intune and Entra
|
|
30
34
|
are trademarks of the Microsoft group of companies.*
|
|
@@ -74,7 +78,7 @@ responsibility**:
|
|
|
74
78
|
|---|---|
|
|
75
79
|
| React Native | 0.74+, **New Architecture required** |
|
|
76
80
|
| iOS | **17.0+, Xcode 26+** — MAM SDK 21.x is built against them |
|
|
77
|
-
| Android | minSdk 24, Java 17
|
|
81
|
+
| Android | minSdk 24, Java 17 — Gradle, AGP and Kotlin on Microsoft's tested row or one verified here; `doctor` says which |
|
|
78
82
|
| On the device | Company Portal on Android; Authenticator or Company Portal on iOS |
|
|
79
83
|
| In the tenant | An Entra app registration with the Intune MAM API permission granted |
|
|
80
84
|
|
package/RNIntune.podspec
CHANGED
|
@@ -19,8 +19,8 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
s.license = package["license"]
|
|
20
20
|
s.authors = package["author"]
|
|
21
21
|
|
|
22
|
-
# Deliberately NOT min_ios_version_supported. Intune App SDK 21.
|
|
23
|
-
# `minos 17.0` (verified with otool on IntuneMAMSwift.framework), so a host app on
|
|
22
|
+
# Deliberately NOT min_ios_version_supported. Intune App SDK 21.x is built with
|
|
23
|
+
# `minos 17.0` (verified with otool on IntuneMAMSwift.framework in 21.8.0 and 21.9.0), so a host app on
|
|
24
24
|
# React Native's floor of 15.1 cannot link it. Supporting iOS 16 means pinning SDK
|
|
25
25
|
# 20.x, which Microsoft maintains for high-priority security fixes only.
|
|
26
26
|
s.platforms = { :ios => "17.0" }
|
|
@@ -56,7 +56,7 @@ Pod::Spec.new do |s|
|
|
|
56
56
|
# SDK runs the whole sign-in itself, fails with "Failed to instantiate MSALAuthority /
|
|
57
57
|
# Ensure the appropriate version of ADAL is included in the application" (observed on
|
|
58
58
|
# device, 2026-09-04). Version pinned in sdk-versions.json -> toolchain.msal_ios.
|
|
59
|
-
s.dependency "MSAL", "2.
|
|
59
|
+
s.dependency "MSAL", "2.16.0"
|
|
60
60
|
|
|
61
61
|
s.pod_target_xcconfig = {
|
|
62
62
|
"STRIP_SWIFT_SYMBOLS" => "NO",
|
package/android/build.gradle
CHANGED
|
@@ -93,33 +93,54 @@ gradle.taskGraph.whenReady { graph ->
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* The MAM SDK is resolved through a repository rather than as a file.
|
|
97
97
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* local .aar file dependencies are not supported when building an AAR".
|
|
101
|
-
*
|
|
98
|
+
* `implementation files(mamAar)` is what Microsoft's guide shows for an *app* module, and
|
|
99
|
+
* in a *library* module AGP rejects it wherever it has to package the library: "Direct
|
|
100
|
+
* local .aar file dependencies are not supported when building an AAR". This used to be
|
|
101
|
+
* worked around by disabling the bundle tasks by name, and that could not be made right
|
|
102
|
+
* across AGP versions — the lint AAR an app's `lintVitalAnalyzeRelease` consumes is built
|
|
103
|
+
* by one of those tasks. Disabling it broke every clean release build on AGP 8.12;
|
|
104
|
+
* leaving it enabled breaks the same build on the AGP of React Native 0.74, which applies
|
|
105
|
+
* the local-.aar rule to the lint AAR too.
|
|
102
106
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* file dependencies would not be packaged" — so the output being skipped is an output
|
|
106
|
-
* that could never have been correct. The MAM SDK is distributed as a file from
|
|
107
|
-
* Microsoft's GitHub, not from Maven Central, so there is no coordinate to depend on
|
|
108
|
-
* instead.
|
|
107
|
+
* Resolved from a repository, the SDK is an ordinary module dependency and AGP stops
|
|
108
|
+
* treating this library as a special case anywhere.
|
|
109
109
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
110
|
+
* An Ivy repository with an `[artifact].[ext]` pattern, because it points at the file
|
|
111
|
+
* fetch-sdks already wrote, under the exact name Microsoft distributes —
|
|
112
|
+
* `Microsoft.Intune.MAM.SDK.aar` — with nothing copied or renamed and no metadata to
|
|
113
|
+
* generate. A flat directory would do the same and prints "should be avoided because it
|
|
114
|
+
* doesn't support any meta-data formats" on every consumer's build, naming this library.
|
|
115
|
+
* The version in the coordinate is not in the pattern, so it is informational: the pin in
|
|
116
|
+
* sdk-versions.json, the one fetch-sdks downloaded.
|
|
117
|
+
*
|
|
118
|
+
* The repository has to be visible to the app, not only to this project: the app resolves
|
|
119
|
+
* its runtime classpath with its own repositories, so a repository declared here alone
|
|
120
|
+
* would fail there. It is added to every project and made exclusive to the one module, so
|
|
121
|
+
* nothing else is ever looked up in it and this module is never looked up anywhere else.
|
|
113
122
|
*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
def mamVersion = new groovy.json.JsonSlurper()
|
|
124
|
+
.parse(file("$projectDir/../sdk-versions.json")).android.tag
|
|
125
|
+
def mamRepoDir = mamAar.parentFile
|
|
126
|
+
rootProject.allprojects {
|
|
127
|
+
repositories {
|
|
128
|
+
exclusiveContent {
|
|
129
|
+
forRepository {
|
|
130
|
+
ivy {
|
|
131
|
+
name = "react-native-intune-mam-sdk"
|
|
132
|
+
url = mamRepoDir.toURI()
|
|
133
|
+
patternLayout {
|
|
134
|
+
artifact "[artifact].[ext]"
|
|
135
|
+
}
|
|
136
|
+
metadataSources {
|
|
137
|
+
artifact()
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
filter {
|
|
142
|
+
includeModule("react-native-intune", "Microsoft.Intune.MAM.SDK")
|
|
143
|
+
}
|
|
123
144
|
}
|
|
124
145
|
}
|
|
125
146
|
}
|
|
@@ -127,7 +148,7 @@ tasks.configureEach { task ->
|
|
|
127
148
|
dependencies {
|
|
128
149
|
implementation "com.facebook.react:react-android"
|
|
129
150
|
|
|
130
|
-
implementation
|
|
151
|
+
implementation("react-native-intune:Microsoft.Intune.MAM.SDK:${mamVersion}@aar")
|
|
131
152
|
|
|
132
153
|
// MSAL. Mirrored in sdk-versions.json -> toolchain.msal_android; change both together.
|
|
133
154
|
//
|
|
@@ -146,7 +167,7 @@ dependencies {
|
|
|
146
167
|
//
|
|
147
168
|
// [verify] whether MSAL degrades cleanly without it, or throws at sign-in on a real
|
|
148
169
|
// device. If it throws, the fallback is documenting the feed for consumers.
|
|
149
|
-
implementation("com.microsoft.identity.client:msal:8.
|
|
170
|
+
implementation("com.microsoft.identity.client:msal:8.5.0") {
|
|
150
171
|
exclude group: "com.microsoft.device.display"
|
|
151
172
|
}
|
|
152
173
|
}
|
|
@@ -16,17 +16,22 @@ class RNIntunePackage : BaseReactPackage() {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
override fun getReactModuleInfoProvider() = ReactModuleInfoProvider {
|
|
19
|
+
// Positional, not named. In React Native 0.74 `ReactModuleInfo` is still a Java
|
|
20
|
+
// class, and Kotlin cannot pass named arguments to a Java constructor — the named
|
|
21
|
+
// form compiles only on versions where the class was rewritten in Kotlin, so it
|
|
22
|
+
// failed on 0.74 while building everywhere this was developed. The six parameters
|
|
23
|
+
// are in the same order in both.
|
|
19
24
|
mapOf(
|
|
20
25
|
RNIntuneModule.NAME to ReactModuleInfo(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
RNIntuneModule.NAME, // name
|
|
27
|
+
RNIntuneModule.NAME, // className
|
|
28
|
+
false, // canOverrideExistingModule
|
|
24
29
|
// The event emitter must be live from construction, not from the first
|
|
25
30
|
// enroll() — a service-initiated wipe can arrive before JS calls anything
|
|
26
31
|
// (SPEC §4.4, §12.4). Revisit this flag when the emitter lands.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
false, // needsEagerInit
|
|
33
|
+
false, // isCxxModule
|
|
34
|
+
true, // isTurboModule
|
|
30
35
|
)
|
|
31
36
|
)
|
|
32
37
|
}
|
package/ios/RNIntunePlistGuard.m
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
#import "RNIntuneCore.h"
|
|
7
7
|
|
|
8
8
|
/// The `IntuneMAMSettings` dictionary in the host app's Info.plist, and the keys inside
|
|
9
|
-
/// it that the SDK reads at launch. Verified against the strings in the 21.8.0
|
|
9
|
+
/// it that the SDK reads at launch. Verified against the strings in the 21.8.0 and 21.9.0 binaries.
|
|
10
10
|
static NSString *const kSettingsKey = @"IntuneMAMSettings";
|
|
11
11
|
static NSString *const kClientId = @"ADALClientId";
|
|
12
12
|
static NSString *const kAuthority = @"ADALAuthority";
|
|
@@ -81,7 +81,7 @@ static NSString *const RNIntuneJournalKey = @"com.reactnativeintune.resetJournal
|
|
|
81
81
|
// `wipe: YES` because the SDK is already wiping; the flag records what happened rather
|
|
82
82
|
// than requesting it. `reason` is what lets the consumer's handler tell an
|
|
83
83
|
// administrator revoking access from a user logging out (SPEC §7.4).
|
|
84
|
-
[self openWithAccountId:accountId tenantId:tenantId wipe:YES reason:@"
|
|
84
|
+
[self openWithAccountId:accountId tenantId:tenantId wipe:YES reason:@"remoteWipe"];
|
|
85
85
|
return YES;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -20,6 +20,9 @@ let tokenProvider = null;
|
|
|
20
20
|
* Registers the provider for `authMode: 'external'`. Return `null` from it to say
|
|
21
21
|
* "cannot get a token right now" — the SDK treats that as needing authorization rather
|
|
22
22
|
* than as a hard failure.
|
|
23
|
+
*
|
|
24
|
+
* @internal Outside the contract in 1.x: `external` is kept working but has not been run
|
|
25
|
+
* on a device against a tenant. Planned for 2.0 — see `AuthMode`.
|
|
23
26
|
*/
|
|
24
27
|
export function setTokenProvider(provider) {
|
|
25
28
|
tokenProvider = provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeIntune","emitter","str","tokenProvider","setTokenProvider","provider","addListener","raw","r","requestId","request","resourceId","tenantId","authority","accountId","active","rejectToken","reason","respond","token","length","resolveToken","e","Error","message","catch"],"sourceRoot":"../../../src","sources":["api/tokenProvider.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,YAAY,MAAM,oBAAiB;AAC1C,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,GAAG,QAAQ,uBAAoB;AAGxC,IAAIC,aAAmC,GAAG,IAAI;;AAE9C;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,QAA8B,EAAQ;EACrEF,aAAa,GAAGE,QAAQ;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACAJ,OAAO,CAACK,WAAW,CAAC,cAAc,EAAGC,GAAW,IAAK;EACnD,MAAMC,CAAC,GAAGD,GAA8B;EACxC,MAAME,SAAS,GAAGP,GAAG,CAACM,CAAC,CAACC,SAAS,CAAC;EAClC,MAAMC,OAAqB,GAAG;IAC5BC,UAAU,EAAET,GAAG,CAACM,CAAC,CAACG,UAAU,CAAC;IAC7BC,QAAQ,EAAEV,GAAG,CAACM,CAAC,CAACI,QAAQ,CAAC;IACzBC,SAAS,EAAEX,GAAG,CAACM,CAAC,CAACK,SAAS,CAAC;IAC3BC,SAAS,EAAEZ,GAAG,CAACM,CAAC,CAACM,SAAS;EAC5B,CAAC;EAED,MAAMC,MAAM,GAAGZ,aAAa;EAC5B,IAAIY,MAAM,KAAK,IAAI,EAAE;IACnBf,YAAY,CAACgB,WAAW,CAAC;MACvBP,SAAS;MACTQ,MAAM,EACJ,4EAA4E,GAC5E;IACJ,CAAC,CAAC;IACF;EACF;EAEA,MAAMC,OAAO,GAAG,MAAAA,CAAA,KAAY;IAC1B,IAAI;MACF,MAAMC,KAAK,GAAG,MAAMJ,MAAM,CAACL,OAAO,CAAC;MACnC,IAAI,OAAOS,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;QACjDpB,YAAY,CAACqB,YAAY,CAAC;UAAEZ,SAAS;UAAEU;QAAM,CAAC,CAAC;MACjD,CAAC,MAAM;QACLnB,YAAY,CAACgB,WAAW,CAAC;UACvBP,SAAS;UACTQ,MAAM,EAAE;QACV,CAAC,CAAC;MACJ;IACF,CAAC,CAAC,OAAOK,CAAC,EAAE;MACV;MACA;MACAtB,YAAY,CAACgB,WAAW,CAAC;QACvBP,SAAS;QACTQ,MAAM,EAAEK,CAAC,YAAYC,KAAK,GAAGD,CAAC,CAACE,OAAO,GAAG;MAC3C,CAAC,CAAC;IACJ;EACF,CAAC;;EAED;EACA;EACAN,OAAO,CAAC,CAAC,CAACO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["NativeIntune","emitter","str","tokenProvider","setTokenProvider","provider","addListener","raw","r","requestId","request","resourceId","tenantId","authority","accountId","active","rejectToken","reason","respond","token","length","resolveToken","e","Error","message","catch"],"sourceRoot":"../../../src","sources":["api/tokenProvider.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,YAAY,MAAM,oBAAiB;AAC1C,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,GAAG,QAAQ,uBAAoB;AAGxC,IAAIC,aAAmC,GAAG,IAAI;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,QAA8B,EAAQ;EACrEF,aAAa,GAAGE,QAAQ;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A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C,CAAC,CAAC;AAC3B,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntuneError","configure","getBrokerStatus","isSupported","openBrokerInstall","acquireToken","getAccounts","signIn","signInAndEnroll","signInSilent","signOut","enroll","enrollInteractive","getState","reset","setResetHandler","getDiagnostics","getPolicy","onBrokerStatusChanged","onEnrollmentResult","onPolicyChanged","onRestartRequired","onUnenrollmentResult","onWipeRequested","setTokenProvider","Intune"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,YAAS;AACvB,SAASA,WAAW,QAAQ,sBAAmB;AAE/C,SACEC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,iBAAiB,QACZ,oBAAiB;AACxB,SACEC,YAAY,EACZC,WAAW,EACXC,MAAM,EACNC,eAAe,EACfC,YAAY,EACZC,OAAO,QACF,eAAY;AACnB,SACEC,MAAM,EACNC,iBAAiB,EACjBC,QAAQ,EACRC,KAAK,EACLC,eAAe,QACV,qBAAkB;AACzB,SAASC,cAAc,EAAEC,SAAS,QAAQ,iBAAc;AACxD,SACEC,qBAAqB,EACrBC,kBAAkB,EAClBC,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBC,eAAe,QACV,iBAAc;AACrB,SAASC,gBAAgB,QAAQ,wBAAqB;AAEtD;AACE;AACAvB,SAAS,EACTE,WAAW,EACXD,eAAe,EACfE,iBAAiB;AACjB;AACAG,MAAM,EACNE,YAAY,EACZD,eAAe,EACfH,YAAY,EACZC,WAAW,EACXI,OAAO;AACP;AACAC,MAAM,EACNC,iBAAiB,EACjBC,QAAQ,EACRC,KAAK,EACLC,eAAe;AACf;AACAE,SAAS,EACTD,cAAc;AACd;AACAQ,gBAAgB;AAChB;AACAL,kBAAkB,EAClBG,oBAAoB,EACpBF,eAAe,EACfG,eAAe,EACfF,iBAAiB,EACjBH,qBAAqB;AAGvB,MAAMO,MAAM,GAAG;EACbxB,SAAS;EACTE,WAAW;EACXD,eAAe;EACfE,iBAAiB;EACjBG,MAAM;EACNE,YAAY;EACZD,eAAe;EACfH,YAAY;EACZC,WAAW;EACXI,OAAO;EACPC,MAAM;EACNC,iBAAiB;EACjBC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfE,SAAS;EACTD,cAAc;
|
|
1
|
+
{"version":3,"names":["IntuneError","configure","getBrokerStatus","isSupported","openBrokerInstall","acquireToken","getAccounts","signIn","signInAndEnroll","signInSilent","signOut","enroll","enrollInteractive","getState","reset","setResetHandler","getDiagnostics","getPolicy","onBrokerStatusChanged","onEnrollmentResult","onPolicyChanged","onRestartRequired","onUnenrollmentResult","onWipeRequested","setTokenProvider","Intune"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,YAAS;AACvB,SAASA,WAAW,QAAQ,sBAAmB;AAE/C,SACEC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,iBAAiB,QACZ,oBAAiB;AACxB,SACEC,YAAY,EACZC,WAAW,EACXC,MAAM,EACNC,eAAe,EACfC,YAAY,EACZC,OAAO,QACF,eAAY;AACnB,SACEC,MAAM,EACNC,iBAAiB,EACjBC,QAAQ,EACRC,KAAK,EACLC,eAAe,QACV,qBAAkB;AACzB,SAASC,cAAc,EAAEC,SAAS,QAAQ,iBAAc;AACxD,SACEC,qBAAqB,EACrBC,kBAAkB,EAClBC,eAAe,EACfC,iBAAiB,EACjBC,oBAAoB,EACpBC,eAAe,QACV,iBAAc;AACrB,SAASC,gBAAgB,QAAQ,wBAAqB;AAEtD;AACE;AACAvB,SAAS,EACTE,WAAW,EACXD,eAAe,EACfE,iBAAiB;AACjB;AACAG,MAAM,EACNE,YAAY,EACZD,eAAe,EACfH,YAAY,EACZC,WAAW,EACXI,OAAO;AACP;AACAC,MAAM,EACNC,iBAAiB,EACjBC,QAAQ,EACRC,KAAK,EACLC,eAAe;AACf;AACAE,SAAS,EACTD,cAAc;AACd;AACAQ,gBAAgB;AAChB;AACAL,kBAAkB,EAClBG,oBAAoB,EACpBF,eAAe,EACfG,eAAe,EACfF,iBAAiB,EACjBH,qBAAqB;AAGvB,MAAMO,MAAM,GAAG;EACbxB,SAAS;EACTE,WAAW;EACXD,eAAe;EACfE,iBAAiB;EACjBG,MAAM;EACNE,YAAY;EACZD,eAAe;EACfH,YAAY;EACZC,WAAW;EACXI,OAAO;EACPC,MAAM;EACNC,iBAAiB;EACjBC,QAAQ;EACRC,KAAK;EACLC,eAAe;EACfE,SAAS;EACTD,cAAc;EACd;EACAQ,gBAAgB;EAChBL,kBAAkB;EAClBG,oBAAoB;EACpBF,eAAe;EACfG,eAAe;EACfF,iBAAiB;EACjBH;AACF,CAAU;AAEV,eAAeO,MAAM","ignoreList":[]}
|
|
@@ -74,11 +74,32 @@ export function toEnrollmentStatus(value) {
|
|
|
74
74
|
return typeof value === 'string' && ENROLLMENT_STATUSES.has(value) ? value : EnrollmentStatus.Unknown;
|
|
75
75
|
}
|
|
76
76
|
const RESET_STAGES = new Set(Object.values(ResetStage));
|
|
77
|
-
const RESET_REASONS = new Set(['logout', '
|
|
77
|
+
const RESET_REASONS = new Set(['logout', 'tenantChanged', 'intuneDisabled', 'remoteWipe', 'accountSwitch', 'supportReset', 'resume']);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The spellings before 1.0. The journal is persisted on the device, so an app updated
|
|
81
|
+
* while a reset is unfinished — the process killed mid-reset, or a service wipe waiting
|
|
82
|
+
* for the next launch — reads a reason an older version wrote. Dropping it to null would
|
|
83
|
+
* lose exactly the case the reason exists for: telling the user their administrator
|
|
84
|
+
* removed access.
|
|
85
|
+
*/
|
|
86
|
+
const LEGACY_RESET_REASONS = {
|
|
87
|
+
tenant_changed: 'tenantChanged',
|
|
88
|
+
intune_disabled: 'intuneDisabled',
|
|
89
|
+
remote_wipe: 'remoteWipe',
|
|
90
|
+
account_switch: 'accountSwitch',
|
|
91
|
+
support_reset: 'supportReset'
|
|
92
|
+
};
|
|
78
93
|
|
|
79
94
|
/** Null rather than a guess: an unrecognised reason is not worth acting on. */
|
|
80
95
|
export function toResetReason(value) {
|
|
81
|
-
|
|
96
|
+
if (typeof value !== 'string') {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (RESET_REASONS.has(value)) {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
return LEGACY_RESET_REASONS[value] ?? null;
|
|
82
103
|
}
|
|
83
104
|
export function toResetStage(value) {
|
|
84
105
|
return typeof value === 'string' && RESET_STAGES.has(value) ? value : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","EnrollmentStatus","ResetStage","str","value","fallback","nullableStr","length","toRestartReason","bool","strArray","Array","isArray","filter","v","strRecord","out","k","Object","entries","String","ENROLLMENT_STATUSES","Set","values","toEnrollmentStatus","has","Unknown","RESET_STAGES","RESET_REASONS","toResetReason","toResetStage","toEnrollmentResult","raw","r","status","accountId","nativeCode","nativeMessage","restartRequired","toIntuneState","configured","configuredTenantId","registeredAccountIds","enrolledAccountId","pendingReset","pendingResetReason","toPolicySnapshot","isManaged","canSaveToLocal","canSaveToPersonal","canOpenFromUnmanaged","screenshotAllowed","toBrokerStatus","brokerAvailable","companyPortalInstalled","authenticatorInstalled","required","OS","toAuthResult","tenantId","username","accessToken","idToken","expiresOn","scopes","toAuthAccount"],"sourceRoot":"../../../src","sources":["internal/decode.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;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AC;EACtC,KAAK,MAAM,CAACC,CAAC,EAAEH,CAAC,CAAC,IAAII,MAAM,CAACC,OAAO,CAACf,KAAgC,CAAC,EAAE;IACrEY,GAAG,CAACC,CAAC,CAAC,GAAG,OAAOH,CAAC,KAAK,QAAQ,GAAGA,CAAC,GAAGM,MAAM,CAACN,CAAC,CAAC;EAChD;EACA,OAAOE,GAAG;AACZ;;AAEA;;AAEA,MAAMK,mBAAmB,GAAG,IAAIC,GAAG,CAASJ,MAAM,CAACK,MAAM,CAACtB,gBAAgB,CAAC,CAAC;AAE5E,OAAO,SAASuB,kBAAkBA,CAACpB,KAAc,EAAoB;EACnE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIiB,mBAAmB,CAACI,GAAG,CAACrB,KAAK,CAAC,GAC7DA,KAAK,GACNH,gBAAgB,CAACyB,OAAO;AAC9B;AAEA,MAAMC,YAAY,GAAG,IAAIL,GAAG,CAASJ,MAAM,CAACK,MAAM,CAACrB,UAAU,CAAC,CAAC;AAE/D,MAAM0B,aAAa,GAAG,IAAIN,GAAG,CAAS,CACpC,QAAQ,EACR,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"names":["Platform","EnrollmentStatus","ResetStage","str","value","fallback","nullableStr","length","toRestartReason","bool","strArray","Array","isArray","filter","v","strRecord","out","k","Object","entries","String","ENROLLMENT_STATUSES","Set","values","toEnrollmentStatus","has","Unknown","RESET_STAGES","RESET_REASONS","LEGACY_RESET_REASONS","tenant_changed","intune_disabled","remote_wipe","account_switch","support_reset","toResetReason","toResetStage","toEnrollmentResult","raw","r","status","accountId","nativeCode","nativeMessage","restartRequired","toIntuneState","configured","configuredTenantId","registeredAccountIds","enrolledAccountId","pendingReset","pendingResetReason","toPolicySnapshot","isManaged","canSaveToLocal","canSaveToPersonal","canOpenFromUnmanaged","screenshotAllowed","toBrokerStatus","brokerAvailable","companyPortalInstalled","authenticatorInstalled","required","OS","toAuthResult","tenantId","username","accessToken","idToken","expiresOn","scopes","toAuthAccount"],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AG,CAACoC,CAAC,CAAC4B,WAAW,CAAC;IAC/BC,OAAO,EAAE9D,WAAW,CAACiC,CAAC,CAAC6B,OAAO,CAAC;IAC/BC,SAAS,EAAE,OAAO9B,CAAC,CAAC8B,SAAS,KAAK,QAAQ,GAAG9B,CAAC,CAAC8B,SAAS,GAAG,CAAC;IAC5DC,MAAM,EAAE5D,QAAQ,CAAC6B,CAAC,CAAC+B,MAAM;EAC3B,CAAC;AACH;AAEA,OAAO,SAASC,aAAaA,CAACjC,GAAW,EAAe;EACtD,MAAMC,CAAC,GAAGD,GAA8B;EACxC,OAAO;IACLG,SAAS,EAAEtC,GAAG,CAACoC,CAAC,CAACE,SAAS,CAAC;IAC3BwB,QAAQ,EAAE9D,GAAG,CAACoC,CAAC,CAAC0B,QAAQ,CAAC;IACzBC,QAAQ,EAAE/D,GAAG,CAACoC,CAAC,CAAC2B,QAAQ;EAC1B,CAAC;AACH","ignoreList":[]}
|
package/lib/module/types.js
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
* The blocking distinction in SPEC §8 is load-bearing and easy to get backwards:
|
|
22
22
|
* `NotLicensed` and `NotTargeted` must NOT block the user, `Failed` must.
|
|
23
|
+
*
|
|
24
|
+
* Gains members in minor versions, as Microsoft's SDKs add statuses — give a `switch`
|
|
25
|
+
* over it a `default`, and treat what lands there as not blocking. See
|
|
26
|
+
* [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
23
27
|
*/
|
|
24
28
|
export let EnrollmentStatus = /*#__PURE__*/function (EnrollmentStatus) {
|
|
25
29
|
EnrollmentStatus["Succeeded"] = "succeeded";
|
|
@@ -66,12 +70,25 @@ export let FileProtectionLevel = /*#__PURE__*/function (FileProtectionLevel) {
|
|
|
66
70
|
return FileProtectionLevel;
|
|
67
71
|
}({});
|
|
68
72
|
|
|
69
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Why a reset was started. Recorded in the journal and surfaced in `getDiagnostics`.
|
|
75
|
+
*
|
|
76
|
+
* camelCase, like every other string value in this API. Before 1.0 these were
|
|
77
|
+
* snake_case (`remote_wipe`); a journal written by an older version is still read, and
|
|
78
|
+
* its reason reported in the new spelling.
|
|
79
|
+
*
|
|
80
|
+
* Gains members in minor versions — give a `switch` over it a `default`.
|
|
81
|
+
*/
|
|
70
82
|
|
|
71
83
|
/**
|
|
72
|
-
* Who owns MSAL. `builtin`
|
|
73
|
-
*
|
|
74
|
-
*
|
|
84
|
+
* Who owns MSAL. `'builtin'` — the module — is the default and the only mode supported
|
|
85
|
+
* in 1.x.
|
|
86
|
+
*
|
|
87
|
+
* `'external'` is for apps that already have their own MSAL and answer the SDK's token
|
|
88
|
+
* requests themselves.
|
|
89
|
+
* **Not supported in 1.x.** `authMode: 'external'` is kept working in the code, but it has
|
|
90
|
+
* not been run on a device against a tenant, so it is undocumented and outside the semver
|
|
91
|
+
* contract — it may change in any release. It is planned for 2.0.
|
|
75
92
|
*/
|
|
76
93
|
|
|
77
94
|
// ---------------------------------------------------------------- config
|
|
@@ -107,15 +124,26 @@ export let FileProtectionLevel = /*#__PURE__*/function (FileProtectionLevel) {
|
|
|
107
124
|
* `false` would hide functionality that nothing is restricting.
|
|
108
125
|
*/
|
|
109
126
|
|
|
110
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Opaque key/value for support bundles. Contains no tokens and no UPNs.
|
|
129
|
+
*
|
|
130
|
+
* **Outside the semver contract**: the keys follow whatever is useful to diagnose and
|
|
131
|
+
* may change in any release. See [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
132
|
+
*/
|
|
111
133
|
|
|
112
134
|
// ---------------------------------------------------------------- events
|
|
113
135
|
|
|
114
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Payload of a native-initiated MAM service token request, for `authMode: 'external'`.
|
|
138
|
+
*
|
|
139
|
+
* @internal Outside the contract in 1.x — see `AuthMode`.
|
|
140
|
+
*/
|
|
115
141
|
|
|
116
142
|
/**
|
|
117
143
|
* Return the access token, or `null` to signal "cannot get a token right now". Runs on a
|
|
118
144
|
* background thread's behalf, and the SDK may ask with no JS call in flight.
|
|
145
|
+
*
|
|
146
|
+
* @internal Outside the contract in 1.x — see `AuthMode`.
|
|
119
147
|
*/
|
|
120
148
|
|
|
121
149
|
/** Clear the app's own local data. If it throws, the journal stays open and retries. */
|
|
@@ -139,5 +167,8 @@ export let FileProtectionLevel = /*#__PURE__*/function (FileProtectionLevel) {
|
|
|
139
167
|
*
|
|
140
168
|
* `E_NATIVE` appearing in logs is a signal to extend the native mapping table, not an
|
|
141
169
|
* acceptable steady state.
|
|
170
|
+
*
|
|
171
|
+
* Gains members in minor versions — give a `switch` over it a `default`. See
|
|
172
|
+
* [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
142
173
|
*/
|
|
143
174
|
//# sourceMappingURL=types.js.map
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EnrollmentStatus","ResetStage","FileProtectionLevel"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAE1B;EAFUA,gBAAgB;EAI1B;EAJUA,gBAAgB;EAM1B;EANUA,gBAAgB;EAQ1B;EARUA,gBAAgB;EAAhBA,gBAAgB;EAW1B;EAXUA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAgB1B;AACF;AACA;AACA;EAnBYA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAuB5B;AACA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;;AAMtB;AACA;AACA;AACA;AACA;AACA,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;;AAO/B;;AAUA;AACA;AACA;AACA;AACA;;AAGA;;AAuCA;;AASA;;
|
|
1
|
+
{"version":3,"names":["EnrollmentStatus","ResetStage","FileProtectionLevel"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAE1B;EAFUA,gBAAgB;EAI1B;EAJUA,gBAAgB;EAM1B;EANUA,gBAAgB;EAQ1B;EARUA,gBAAgB;EAAhBA,gBAAgB;EAW1B;EAXUA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAgB1B;AACF;AACA;AACA;EAnBYA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAuB5B;AACA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;;AAMtB;AACA;AACA;AACA;AACA;AACA,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;;AAO/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAuCA;;AASA;;AAsEA;;AAgCA;AACA;AACA;AACA;AACA;AACA;;AAgCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;;AAUA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AAYA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -13,6 +13,9 @@ import type { TokenProvider } from '../types.js';
|
|
|
13
13
|
* Registers the provider for `authMode: 'external'`. Return `null` from it to say
|
|
14
14
|
* "cannot get a token right now" — the SDK treats that as needing authorization rather
|
|
15
15
|
* than as a hard failure.
|
|
16
|
+
*
|
|
17
|
+
* @internal Outside the contract in 1.x: `external` is kept working but has not been run
|
|
18
|
+
* on a device against a tenant. Planned for 2.0 — see `AuthMode`.
|
|
16
19
|
*/
|
|
17
20
|
export declare function setTokenProvider(provider: TokenProvider | null): void;
|
|
18
21
|
//# sourceMappingURL=tokenProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenProvider.d.ts","sourceRoot":"","sources":["../../../../src/api/tokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,aAAU,CAAC;AAI5D
|
|
1
|
+
{"version":3,"file":"tokenProvider.d.ts","sourceRoot":"","sources":["../../../../src/api/tokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,aAAU,CAAC;AAI5D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAErE"}
|
|
@@ -55,6 +55,7 @@ declare const Intune: {
|
|
|
55
55
|
readonly setResetHandler: typeof setResetHandler;
|
|
56
56
|
readonly getPolicy: typeof getPolicy;
|
|
57
57
|
readonly getDiagnostics: typeof getDiagnostics;
|
|
58
|
+
/** @internal Outside the contract in 1.x — see `AuthMode`. */
|
|
58
59
|
readonly setTokenProvider: typeof setTokenProvider;
|
|
59
60
|
readonly onEnrollmentResult: typeof onEnrollmentResult;
|
|
60
61
|
readonly onUnenrollmentResult: typeof onUnenrollmentResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,cAAc,YAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AAEhD,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,iBAAiB,EAClB,MAAM,oBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,MAAM,EACN,eAAe,EACf,YAAY,EACZ,OAAO,EACR,MAAM,eAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,eAAe,EAChB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAc,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EAChB,MAAM,iBAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAEvD,OAAO,EAEL,SAAS,EACT,WAAW,EACX,eAAe,EACf,iBAAiB,EAEjB,MAAM,EACN,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,EACX,OAAO,EAEP,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,eAAe,EAEf,SAAS,EACT,cAAc,EAEd,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,qBAAqB,GACtB,CAAC;AAEF,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,cAAc,YAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AAEhD,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,iBAAiB,EAClB,MAAM,oBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,MAAM,EACN,eAAe,EACf,YAAY,EACZ,OAAO,EACR,MAAM,eAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,eAAe,EAChB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAc,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EAChB,MAAM,iBAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAEvD,OAAO,EAEL,SAAS,EACT,WAAW,EACX,eAAe,EACf,iBAAiB,EAEjB,MAAM,EACN,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,EACX,OAAO,EAEP,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,eAAe,EAEf,SAAS,EACT,cAAc,EAEd,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,qBAAqB,GACtB,CAAC;AAEF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;IAkBV,8DAA8D;;;;;;;;CAQtD,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../../src/internal/decode.ts"],"names":[],"mappings":"AAAA;;;;;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,GAAG,MAAM,GAAG,IAAI,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAE7D;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,UAAQ,GAAG,OAAO,CAQ9D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAIjD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOhE;AAMD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAInE;AA6BD,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CAQhE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAI9D;AAID,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAShE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAWtD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAW5D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CASxD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAWpD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAOtD"}
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
*
|
|
16
16
|
* The blocking distinction in SPEC §8 is load-bearing and easy to get backwards:
|
|
17
17
|
* `NotLicensed` and `NotTargeted` must NOT block the user, `Failed` must.
|
|
18
|
+
*
|
|
19
|
+
* Gains members in minor versions, as Microsoft's SDKs add statuses — give a `switch`
|
|
20
|
+
* over it a `default`, and treat what lands there as not blocking. See
|
|
21
|
+
* [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
18
22
|
*/
|
|
19
23
|
export declare enum EnrollmentStatus {
|
|
20
24
|
Succeeded = "succeeded",
|
|
@@ -55,12 +59,25 @@ export declare enum FileProtectionLevel {
|
|
|
55
59
|
CompleteUntilFirstUserAuthentication = "completeUntilFirstUserAuthentication",
|
|
56
60
|
None = "none"
|
|
57
61
|
}
|
|
58
|
-
/** Why a reset was started. Recorded in the journal and surfaced in `getDiagnostics`. */
|
|
59
|
-
export type ResetReason = 'logout' | 'tenant_changed' | 'intune_disabled' | 'remote_wipe' | 'account_switch' | 'support_reset' | 'resume';
|
|
60
62
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
63
|
+
* Why a reset was started. Recorded in the journal and surfaced in `getDiagnostics`.
|
|
64
|
+
*
|
|
65
|
+
* camelCase, like every other string value in this API. Before 1.0 these were
|
|
66
|
+
* snake_case (`remote_wipe`); a journal written by an older version is still read, and
|
|
67
|
+
* its reason reported in the new spelling.
|
|
68
|
+
*
|
|
69
|
+
* Gains members in minor versions — give a `switch` over it a `default`.
|
|
70
|
+
*/
|
|
71
|
+
export type ResetReason = 'logout' | 'tenantChanged' | 'intuneDisabled' | 'remoteWipe' | 'accountSwitch' | 'supportReset' | 'resume';
|
|
72
|
+
/**
|
|
73
|
+
* Who owns MSAL. `'builtin'` — the module — is the default and the only mode supported
|
|
74
|
+
* in 1.x.
|
|
75
|
+
*
|
|
76
|
+
* `'external'` is for apps that already have their own MSAL and answer the SDK's token
|
|
77
|
+
* requests themselves.
|
|
78
|
+
* **Not supported in 1.x.** `authMode: 'external'` is kept working in the code, but it has
|
|
79
|
+
* not been run on a device against a tenant, so it is undocumented and outside the semver
|
|
80
|
+
* contract — it may change in any release. It is planned for 2.0.
|
|
64
81
|
*/
|
|
65
82
|
export type AuthMode = 'builtin' | 'external';
|
|
66
83
|
export type IntuneConfig = {
|
|
@@ -72,7 +89,7 @@ export type IntuneConfig = {
|
|
|
72
89
|
authority: string;
|
|
73
90
|
/** Must match the platform format — see the README. */
|
|
74
91
|
redirectUri: string;
|
|
75
|
-
/** Default `'builtin'
|
|
92
|
+
/** Default `'builtin'`, and the only value supported in 1.x. */
|
|
76
93
|
authMode?: AuthMode;
|
|
77
94
|
/** Default `false`. */
|
|
78
95
|
verboseLogging?: boolean;
|
|
@@ -141,7 +158,10 @@ export type EnrollParams = {
|
|
|
141
158
|
/** Entra object ID. Never a UPN — that is what `upn` below is for. */
|
|
142
159
|
accountId: string;
|
|
143
160
|
/**
|
|
144
|
-
*
|
|
161
|
+
* @internal
|
|
162
|
+
*
|
|
163
|
+
* **Android, `authMode: 'external'` only** — outside the contract in 1.x, see `AuthMode`.
|
|
164
|
+
* `registerAccountForMAM` takes the UPN as
|
|
145
165
|
* well as the object ID and will not accept null for it, and in `external` mode the
|
|
146
166
|
* module has no MSAL cache to resolve one from.
|
|
147
167
|
*
|
|
@@ -175,9 +195,19 @@ export type BrokerStatus = {
|
|
|
175
195
|
export type EnrollmentResult = {
|
|
176
196
|
status: EnrollmentStatus;
|
|
177
197
|
accountId: string | null;
|
|
178
|
-
/**
|
|
198
|
+
/**
|
|
199
|
+
* Raw platform constant *name*, e.g. `LicensedNotTargeted`. For support bundles.
|
|
200
|
+
*
|
|
201
|
+
* **Outside the semver contract.** It is the SDK's own name and changes when
|
|
202
|
+
* Microsoft's SDK does — log it, do not branch on it. Branch on `status`. See
|
|
203
|
+
* [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
204
|
+
*/
|
|
179
205
|
nativeCode: string;
|
|
180
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* SDK debug string. Safe to log — contains no token.
|
|
208
|
+
*
|
|
209
|
+
* **Outside the semver contract**, like `nativeCode`.
|
|
210
|
+
*/
|
|
181
211
|
nativeMessage: string;
|
|
182
212
|
restartRequired: boolean;
|
|
183
213
|
};
|
|
@@ -190,6 +220,11 @@ export type EnrollmentResult = {
|
|
|
190
220
|
export type IntuneState = {
|
|
191
221
|
configured: boolean;
|
|
192
222
|
configuredTenantId: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* What the SDK reports as registered. An array because that is the SDK's shape; with
|
|
225
|
+
* one identity per installation it holds zero or one account in practice, and more
|
|
226
|
+
* than one means an earlier registration was left behind.
|
|
227
|
+
*/
|
|
193
228
|
registeredAccountIds: string[];
|
|
194
229
|
enrolledAccountId: string | null;
|
|
195
230
|
/** `null` means no account is registered. */
|
|
@@ -244,9 +279,18 @@ export type PolicySnapshot = {
|
|
|
244
279
|
*/
|
|
245
280
|
raw: Record<string, string>;
|
|
246
281
|
};
|
|
247
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Opaque key/value for support bundles. Contains no tokens and no UPNs.
|
|
284
|
+
*
|
|
285
|
+
* **Outside the semver contract**: the keys follow whatever is useful to diagnose and
|
|
286
|
+
* may change in any release. See [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
287
|
+
*/
|
|
248
288
|
export type Diagnostics = Record<string, string>;
|
|
249
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* Payload of a native-initiated MAM service token request, for `authMode: 'external'`.
|
|
291
|
+
*
|
|
292
|
+
* @internal Outside the contract in 1.x — see `AuthMode`.
|
|
293
|
+
*/
|
|
250
294
|
export type TokenRequest = {
|
|
251
295
|
resourceId: string;
|
|
252
296
|
tenantId: string;
|
|
@@ -256,6 +300,8 @@ export type TokenRequest = {
|
|
|
256
300
|
/**
|
|
257
301
|
* Return the access token, or `null` to signal "cannot get a token right now". Runs on a
|
|
258
302
|
* background thread's behalf, and the SDK may ask with no JS call in flight.
|
|
303
|
+
*
|
|
304
|
+
* @internal Outside the contract in 1.x — see `AuthMode`.
|
|
259
305
|
*/
|
|
260
306
|
export type TokenProvider = (request: TokenRequest) => Promise<string | null> | string | null;
|
|
261
307
|
export type ResetHandlerContext = {
|
|
@@ -286,6 +332,7 @@ export type IntuneEvents = {
|
|
|
286
332
|
unenrollmentResult: EnrollmentResult;
|
|
287
333
|
wipeRequested: WipeRequest;
|
|
288
334
|
restartRequired: RestartRequest;
|
|
335
|
+
/** @internal The `external` token bridge — outside the contract in 1.x. */
|
|
289
336
|
tokenRequest: TokenRequest & {
|
|
290
337
|
requestId: string;
|
|
291
338
|
};
|
|
@@ -297,6 +344,9 @@ export type IntuneEvents = {
|
|
|
297
344
|
*
|
|
298
345
|
* `E_NATIVE` appearing in logs is a signal to extend the native mapping table, not an
|
|
299
346
|
* acceptable steady state.
|
|
347
|
+
*
|
|
348
|
+
* Gains members in minor versions — give a `switch` over it a `default`. See
|
|
349
|
+
* [Versioning](https://bayazetyan.github.io/react-native-intune/docs/versioning).
|
|
300
350
|
*/
|
|
301
351
|
export type IntuneErrorCode = 'E_NOT_CONFIGURED' | 'E_RESET_REQUIRED' | 'E_SDK_UNAVAILABLE' | 'E_BROKER_MISSING' | 'E_INVALID_ACCOUNT_ID' | 'E_TOKEN_PROVIDER_FAILED' | 'E_TOKEN_PROVIDER_MISSING' | 'E_EXTERNAL_AUTH_MODE' | 'E_INTERACTION_REQUIRED' | 'E_NO_ACTIVITY' | 'E_USER_CANCELLED' | 'E_RESET_IN_PROGRESS' | 'E_ALREADY_ENROLLED' | 'E_NOT_NEEDED'
|
|
302
352
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;;;;;;GAWG;AACH,oBAAY,gBAAgB;IAC1B,SAAS,cAAc;IACvB,gFAAgF;IAChF,WAAW,gBAAgB;IAC3B,+EAA+E;IAC/E,WAAW,gBAAgB;IAC3B,yEAAyE;IACzE,MAAM,WAAW;IACjB,6FAA6F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