react-native-intune 0.1.0-alpha.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.
Files changed (110) hide show
  1. package/LICENSE +27 -0
  2. package/NOTICE +49 -0
  3. package/README.md +164 -0
  4. package/RNIntune.podspec +69 -0
  5. package/android/build.gradle +152 -0
  6. package/android/consumer-rules.pro +28 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/java/com/reactnativeintune/RNIntuneAuth.kt +330 -0
  9. package/android/src/main/java/com/reactnativeintune/RNIntuneAuthCallback.kt +195 -0
  10. package/android/src/main/java/com/reactnativeintune/RNIntuneConfig.kt +63 -0
  11. package/android/src/main/java/com/reactnativeintune/RNIntuneEventQueue.kt +50 -0
  12. package/android/src/main/java/com/reactnativeintune/RNIntuneModule.kt +752 -0
  13. package/android/src/main/java/com/reactnativeintune/RNIntuneMsalConfig.kt +78 -0
  14. package/android/src/main/java/com/reactnativeintune/RNIntuneNotifications.kt +187 -0
  15. package/android/src/main/java/com/reactnativeintune/RNIntunePackage.kt +33 -0
  16. package/android/src/main/java/com/reactnativeintune/RNIntunePolicy.kt +108 -0
  17. package/android/src/main/java/com/reactnativeintune/RNIntuneReset.kt +85 -0
  18. package/android/src/main/java/com/reactnativeintune/RNIntuneResetJournal.kt +140 -0
  19. package/app.plugin.js +10 -0
  20. package/ios/RNIntune.h +20 -0
  21. package/ios/RNIntune.mm +467 -0
  22. package/ios/RNIntuneAuth.h +121 -0
  23. package/ios/RNIntuneAuth.m +390 -0
  24. package/ios/RNIntuneCore.h +150 -0
  25. package/ios/RNIntuneCore.m +535 -0
  26. package/ios/RNIntuneDelegates.h +70 -0
  27. package/ios/RNIntuneDelegates.m +268 -0
  28. package/ios/RNIntunePendingRequests.h +57 -0
  29. package/ios/RNIntunePendingRequests.m +230 -0
  30. package/ios/RNIntunePlistGuard.h +37 -0
  31. package/ios/RNIntunePlistGuard.m +147 -0
  32. package/ios/RNIntunePolicy.h +25 -0
  33. package/ios/RNIntunePolicy.m +112 -0
  34. package/ios/RNIntuneReset.h +34 -0
  35. package/ios/RNIntuneReset.m +93 -0
  36. package/ios/RNIntuneResetJournal.h +69 -0
  37. package/ios/RNIntuneResetJournal.m +106 -0
  38. package/lib/module/NativeIntune.js +20 -0
  39. package/lib/module/NativeIntune.js.map +1 -0
  40. package/lib/module/api/auth.js +66 -0
  41. package/lib/module/api/auth.js.map +1 -0
  42. package/lib/module/api/enrollment.js +104 -0
  43. package/lib/module/api/enrollment.js.map +1 -0
  44. package/lib/module/api/events.js +50 -0
  45. package/lib/module/api/events.js.map +1 -0
  46. package/lib/module/api/lifecycle.js +73 -0
  47. package/lib/module/api/lifecycle.js.map +1 -0
  48. package/lib/module/api/policy.js +23 -0
  49. package/lib/module/api/policy.js.map +1 -0
  50. package/lib/module/api/tokenProvider.js +80 -0
  51. package/lib/module/api/tokenProvider.js.map +1 -0
  52. package/lib/module/index.js +82 -0
  53. package/lib/module/index.js.map +1 -0
  54. package/lib/module/internal/decode.js +153 -0
  55. package/lib/module/internal/decode.js.map +1 -0
  56. package/lib/module/internal/emitter.js +15 -0
  57. package/lib/module/internal/emitter.js.map +1 -0
  58. package/lib/module/internal/errors.js +32 -0
  59. package/lib/module/internal/errors.js.map +1 -0
  60. package/lib/module/package.json +1 -0
  61. package/lib/module/types.js +143 -0
  62. package/lib/module/types.js.map +1 -0
  63. package/lib/typescript/package.json +1 -0
  64. package/lib/typescript/src/NativeIntune.d.ts +120 -0
  65. package/lib/typescript/src/NativeIntune.d.ts.map +1 -0
  66. package/lib/typescript/src/api/auth.d.ts +37 -0
  67. package/lib/typescript/src/api/auth.d.ts.map +1 -0
  68. package/lib/typescript/src/api/enrollment.d.ts +54 -0
  69. package/lib/typescript/src/api/enrollment.d.ts.map +1 -0
  70. package/lib/typescript/src/api/events.d.ts +24 -0
  71. package/lib/typescript/src/api/events.d.ts.map +1 -0
  72. package/lib/typescript/src/api/lifecycle.d.ts +33 -0
  73. package/lib/typescript/src/api/lifecycle.d.ts.map +1 -0
  74. package/lib/typescript/src/api/policy.d.ts +14 -0
  75. package/lib/typescript/src/api/policy.d.ts.map +1 -0
  76. package/lib/typescript/src/api/tokenProvider.d.ts +18 -0
  77. package/lib/typescript/src/api/tokenProvider.d.ts.map +1 -0
  78. package/lib/typescript/src/index.d.ts +67 -0
  79. package/lib/typescript/src/index.d.ts.map +1 -0
  80. package/lib/typescript/src/internal/decode.d.ts +48 -0
  81. package/lib/typescript/src/internal/decode.d.ts.map +1 -0
  82. package/lib/typescript/src/internal/emitter.d.ts +11 -0
  83. package/lib/typescript/src/internal/emitter.d.ts.map +1 -0
  84. package/lib/typescript/src/internal/errors.d.ts +22 -0
  85. package/lib/typescript/src/internal/errors.d.ts.map +1 -0
  86. package/lib/typescript/src/types.d.ts +317 -0
  87. package/lib/typescript/src/types.d.ts.map +1 -0
  88. package/package.json +204 -0
  89. package/plugin/transforms.js +153 -0
  90. package/plugin/withIntune.js +320 -0
  91. package/scripts/cli.mjs +72 -0
  92. package/scripts/doctor.mjs +232 -0
  93. package/scripts/fetch-sdks.mjs +456 -0
  94. package/scripts/lib/checks.mjs +720 -0
  95. package/scripts/lib/project.mjs +196 -0
  96. package/scripts/setup.mjs +233 -0
  97. package/sdk-lock.json +27 -0
  98. package/sdk-versions.json +70 -0
  99. package/src/NativeIntune.ts +130 -0
  100. package/src/api/auth.ts +73 -0
  101. package/src/api/enrollment.ts +112 -0
  102. package/src/api/events.ts +87 -0
  103. package/src/api/lifecycle.ts +75 -0
  104. package/src/api/policy.ts +22 -0
  105. package/src/api/tokenProvider.ts +80 -0
  106. package/src/index.ts +127 -0
  107. package/src/internal/decode.ts +191 -0
  108. package/src/internal/emitter.ts +14 -0
  109. package/src/internal/errors.ts +43 -0
  110. package/src/types.ts +381 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Rejections. Every one carries a stable code from SPEC §13.6 — never a raw platform
5
+ * error, because a code is something a consumer can branch on and a platform message is
6
+ * not.
7
+ */
8
+
9
+ export class IntuneError extends Error {
10
+ constructor(code, message, native) {
11
+ super(message);
12
+ this.name = 'IntuneError';
13
+ this.code = code;
14
+ this.nativeCode = native?.nativeCode;
15
+ this.nativeMessage = native?.nativeMessage;
16
+ }
17
+ }
18
+
19
+ /** Entra object ID. Deliberately strict — see below. */
20
+ const GUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
21
+
22
+ /**
23
+ * The UPN-based SDK APIs are deprecated, so the module identifies accounts by object ID
24
+ * only (SPEC §13.2). Catching a UPN here gives a named error at the call site instead of
25
+ * an opaque SDK failure minutes later, in a tenant you cannot reach.
26
+ */
27
+ export function assertAccountId(accountId) {
28
+ if (!GUID.test(accountId)) {
29
+ throw new IntuneError('E_INVALID_ACCOUNT_ID', `accountId must be an Entra object ID (GUID), got "${accountId}". ` + `If this looks like an email address, you passed a UPN — use the object ID.`);
30
+ }
31
+ }
32
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IntuneError","Error","constructor","code","message","native","name","nativeCode","nativeMessage","GUID","assertAccountId","accountId","test"],"sourceRoot":"../../../src","sources":["internal/errors.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAKrCC,WAAWA,CACTC,IAAqB,EACrBC,OAAe,EACfC,MAAwD,EACxD;IACA,KAAK,CAACD,OAAO,CAAC;IACd,IAAI,CAACE,IAAI,GAAG,aAAa;IACzB,IAAI,CAACH,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACI,UAAU,GAAGF,MAAM,EAAEE,UAAU;IACpC,IAAI,CAACC,aAAa,GAAGH,MAAM,EAAEG,aAAa;EAC5C;AACF;;AAEA;AACA,MAAMC,IAAI,GAAG,iEAAiE;;AAE9E;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,SAAiB,EAAQ;EACvD,IAAI,CAACF,IAAI,CAACG,IAAI,CAACD,SAAS,CAAC,EAAE;IACzB,MAAM,IAAIX,WAAW,CACnB,sBAAsB,EACtB,qDAAqDW,SAAS,KAAK,GACjE,4EACJ,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Public types and enums. Hand-written, unlike `NativeIntune.ts` which Codegen reads.
5
+ *
6
+ * The split exists because Codegen accepts only `boolean | number | string | Object |
7
+ * Array | Promise | void` and no literal unions, so the bridge spec has to stay loose.
8
+ * Everything strict lives here and in `index.ts`. Nothing in the public API is `any`.
9
+ *
10
+ * This file is the semver contract described in SPEC §13. Adding to it is a minor;
11
+ * changing or removing anything is a major. `PolicySnapshot.raw` is explicitly excluded.
12
+ */
13
+
14
+ // ---------------------------------------------------------------- enums
15
+
16
+ /**
17
+ * Normalized enrollment outcome. The two platforms report different enums — iOS 28
18
+ * codes, Android 10 — and both are mapped onto this set natively. See SPEC §4.1 for the
19
+ * full table; `EnrollmentResult.nativeCode` always carries the raw platform constant.
20
+ *
21
+ * The blocking distinction in SPEC §8 is load-bearing and easy to get backwards:
22
+ * `NotLicensed` and `NotTargeted` must NOT block the user, `Failed` must.
23
+ */
24
+ export let EnrollmentStatus = /*#__PURE__*/function (EnrollmentStatus) {
25
+ EnrollmentStatus["Succeeded"] = "succeeded";
26
+ /** Tenant is MAM-enabled but the user has no Intune licence. Must NOT block. */
27
+ EnrollmentStatus["NotLicensed"] = "notLicensed";
28
+ /** Licensed, but no App Protection Policy targets the user. Must NOT block. */
29
+ EnrollmentStatus["NotTargeted"] = "notTargeted";
30
+ /** Licensed and targeted, but enrollment failed. This one DOES block. */
31
+ EnrollmentStatus["Failed"] = "failed";
32
+ /** Android reports this itself; on iOS it is our own state while the delegate is pending. */
33
+ EnrollmentStatus["Pending"] = "pending";
34
+ EnrollmentStatus["AuthorizationNeeded"] = "authorizationNeeded";
35
+ /** Android only. iOS uses Authenticator as a broker and has no equivalent code. */
36
+ EnrollmentStatus["CompanyPortalRequired"] = "companyPortalRequired";
37
+ EnrollmentStatus["WrongUser"] = "wrongUser";
38
+ EnrollmentStatus["Unenrolled"] = "unenrolled";
39
+ EnrollmentStatus["UnenrollmentFailed"] = "unenrollmentFailed";
40
+ /**
41
+ * Any native value the mapping does not cover. Unknown values map here rather than
42
+ * throwing, so an SDK update that adds a status cannot crash a shipped app.
43
+ */
44
+ EnrollmentStatus["Unknown"] = "unknown";
45
+ return EnrollmentStatus;
46
+ }({});
47
+
48
+ /** Journal stage of an unfinished reset. See SPEC §7. */
49
+ export let ResetStage = /*#__PURE__*/function (ResetStage) {
50
+ ResetStage["Unregistering"] = "unregistering";
51
+ ResetStage["CleaningAuth"] = "cleaningAuth";
52
+ ResetStage["CleaningLocal"] = "cleaningLocal";
53
+ return ResetStage;
54
+ }({});
55
+
56
+ /**
57
+ * iOS `MaxFileProtectionLevel`. The default makes protected files unreadable roughly ten
58
+ * seconds after the device locks, which breaks local databases; an app with lock-screen
59
+ * UI wants `CompleteUntilFirstUserAuthentication`. See SPEC §5.2.
60
+ */
61
+ export let FileProtectionLevel = /*#__PURE__*/function (FileProtectionLevel) {
62
+ FileProtectionLevel["Complete"] = "complete";
63
+ FileProtectionLevel["CompleteUnlessOpen"] = "completeUnlessOpen";
64
+ FileProtectionLevel["CompleteUntilFirstUserAuthentication"] = "completeUntilFirstUserAuthentication";
65
+ FileProtectionLevel["None"] = "none";
66
+ return FileProtectionLevel;
67
+ }({});
68
+
69
+ /** Why a reset was started. Recorded in the journal and surfaced in `getDiagnostics`. */
70
+
71
+ /**
72
+ * Who owns MSAL. `builtin` is the module (SPEC §3.1) and the default. `external` is for
73
+ * apps that already have their own MSAL and supply MAM tokens via `setTokenProvider`;
74
+ * it is a supported mode, not a documentation fallback.
75
+ */
76
+
77
+ // ---------------------------------------------------------------- config
78
+
79
+ /** Hex strings, e.g. `#1B5E20`. */
80
+
81
+ // ---------------------------------------------------------------- auth
82
+
83
+ // ---------------------------------------------------------------- state
84
+
85
+ /**
86
+ * The reconciliation primitive, and the intended way to drive this module. Read it at
87
+ * launch, compare against what your backend says the state should be, act on the
88
+ * difference. Do not drive enrollment from lifecycle hooks: the process can die
89
+ * mid-operation and only a state comparison recovers from that. See SPEC §13.2.
90
+ */
91
+
92
+ // ---------------------------------------------------------------- policy
93
+
94
+ /**
95
+ * Only what an app needs to adapt its own UI — hiding an export button, disabling a
96
+ * share sheet. **PIN prompts, screenshot blocking and encryption are enforced inside the
97
+ * SDK and never surface here.** Do not try to implement enforcement from these booleans.
98
+ *
99
+ * Deliberately short: every field is a support obligation.
100
+ *
101
+ * There is no clipboard field, and there cannot be one. Neither platform exposes a
102
+ * clipboard policy getter — the restriction is enforced inside the SDK and is not
103
+ * queryable — so `canSaveToPersonal` and `canOpenFromUnmanaged` serve the same
104
+ * "adapt your UI" purpose using values both platforms can actually answer (SPEC §4.3).
105
+ *
106
+ * When no policy applies, every field is permissive rather than `false`: reporting
107
+ * `false` would hide functionality that nothing is restricting.
108
+ */
109
+
110
+ /** Opaque key/value for support bundles. Contains no tokens and no UPNs. */
111
+
112
+ // ---------------------------------------------------------------- events
113
+
114
+ /** Payload of a native-initiated MAM service token request. See SPEC §13.4. */
115
+
116
+ /**
117
+ * Return the access token, or `null` to signal "cannot get a token right now". Runs on a
118
+ * background thread's behalf, and the SDK may ask with no JS call in flight.
119
+ */
120
+
121
+ /** Clear the app's own local data. If it throws, the journal stays open and retries. */
122
+
123
+ /**
124
+ * Why the SDK wants the app restarted.
125
+ *
126
+ * One value today, because that is the only case the SDK reports: policy arrived for the
127
+ * first time. Typed as a union rather than `string` so a consumer can switch on it, with
128
+ * `unknown` for a value a future SDK adds — an unrecognised reason must not break a
129
+ * shipped app, and a restart is still a restart.
130
+ */
131
+
132
+ /** Event names and their payloads, used to type the emitter in `index.ts`. */
133
+
134
+ // ---------------------------------------------------------------- errors
135
+
136
+ /**
137
+ * Stable rejection codes. A non-success enrollment *status* is data and resolves; these
138
+ * mean the caller did something wrong or the environment is broken. See SPEC §13.6.
139
+ *
140
+ * `E_NATIVE` appearing in logs is a signal to extend the native mapping table, not an
141
+ * acceptable steady state.
142
+ */
143
+ //# sourceMappingURL=types.js.map
@@ -0,0 +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;;AAmEA;;AAsBA;AACA;AACA;AACA;AACA;AACA;;AA2BA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;;AAGA;;AAEA;;AAQA;AACA;AACA;AACA;;AAUA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AAWA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Codegen spec — the ONLY file Codegen reads, and the only `Native*.ts` allowed in
3
+ * `jsSrcsDir`. An extra one is picked up and fails confusingly.
4
+ *
5
+ * This file is deliberately loose (CLAUDE.md rule 11). Codegen accepts only
6
+ * `boolean | number | string | Object | Array | Promise | void`: no literal unions, no
7
+ * optional parameters, no enums. So every union and every optional is normalized in
8
+ * `index.ts` before it crosses the bridge, and every aggregate return is `Object` here
9
+ * and a real type there. Nothing in the public API is `Object`.
10
+ *
11
+ * Editing this file means Codegen must re-run — `pod install` on iOS,
12
+ * `generateCodegenArtifactsFromSchema` on Android. A native build that breaks right
13
+ * after a change here is a stale Codegen artifact until proven otherwise.
14
+ */
15
+ import { type TurboModule } from 'react-native';
16
+ export interface Spec extends TurboModule {
17
+ /**
18
+ * Every field is required here even though most are optional in the public API:
19
+ * `index.ts` applies the defaults, so the native side never has to guess one.
20
+ * Empty string means "unset" for `keychainGroupOverride`.
21
+ */
22
+ configure(config: {
23
+ clientId: string;
24
+ tenantId: string;
25
+ authority: string;
26
+ redirectUri: string;
27
+ authMode: string;
28
+ verboseLogging: boolean;
29
+ restartHandledByApp: boolean;
30
+ maxFileProtectionLevel: string;
31
+ strictMode: boolean;
32
+ keychainGroupOverride: string;
33
+ telemetryEnabled: boolean;
34
+ brandingBackground: string;
35
+ brandingForeground: string;
36
+ brandingAccent: string;
37
+ brandingSecondaryBackground: string;
38
+ brandingSecondaryForeground: string;
39
+ }): Promise<void>;
40
+ /** SDK linked and platform prerequisites met. Gate the whole Intune path on this. */
41
+ isSupported(): Promise<boolean>;
42
+ /** BrokerStatus. */
43
+ getBrokerStatus(): Promise<Object>;
44
+ openBrokerInstall(): Promise<void>;
45
+ /** SignInParams in, AuthResult out. */
46
+ signIn(params: Object): Promise<Object>;
47
+ /** SignInParams in, AuthResult out. Rejects E_INTERACTION_REQUIRED. */
48
+ signInSilent(params: Object): Promise<Object>;
49
+ /** AcquireTokenParams in, AuthResult out. For the app's own scopes only. */
50
+ acquireToken(params: Object): Promise<Object>;
51
+ /** AuthAccount[]. */
52
+ getAccounts(): Promise<Object[]>;
53
+ signOut(params: {
54
+ accountId: string;
55
+ wipeIntune: boolean;
56
+ }): Promise<void>;
57
+ /**
58
+ * EnrollmentResult. Resolves for every outcome including failures — a non-success
59
+ * status is data, not an exception. Resolved from the SDK's delegate or notification,
60
+ * never from the underlying call returning (SPEC §12.5).
61
+ */
62
+ enroll(params: {
63
+ accountId: string;
64
+ upn: string;
65
+ }): Promise<Object>;
66
+ /**
67
+ * EnrollmentResult. **iOS only** — `loginAndEnrollAccount:` makes the SDK run the
68
+ * sign-in itself and show its own UI, so no MSAL is needed on our side. Android has no
69
+ * counterpart: `registerAccountForMAM` always needs a token from the app.
70
+ *
71
+ * Pass '' for `upn` to let the SDK prompt for the address as well.
72
+ */
73
+ enrollInteractive(params: {
74
+ upn: string;
75
+ }): Promise<Object>;
76
+ /** IntuneState — the reconciliation primitive. */
77
+ getState(): Promise<Object>;
78
+ /**
79
+ * Writes the journal and unregisters. The process is expected to terminate during this
80
+ * call on Android (SPEC §7), so nothing after it is guaranteed to run.
81
+ */
82
+ reset(params: {
83
+ wipe: boolean;
84
+ reason: string;
85
+ }): Promise<void>;
86
+ /**
87
+ * NOT public API. Verifies the account really is gone, then closes the journal —
88
+ * `reset()` in index.ts calls it after the consumer's reset handler has cleared local
89
+ * data. Separate from `reset` because the steps between them may straddle a process
90
+ * death, and the journal is what carries the sequence across it (SPEC §7).
91
+ */
92
+ completeReset(): Promise<void>;
93
+ /** PolicySnapshot. */
94
+ getPolicy(): Promise<Object>;
95
+ /** Opaque key/value for support bundles. No tokens, no UPNs. */
96
+ getDiagnostics(): Promise<Object>;
97
+ /**
98
+ * NOT public API. `setTokenProvider` in `index.ts` wraps these; the SDK asks for a MAM
99
+ * service token on a background thread, including on its own retry schedule with no JS
100
+ * call in flight, so it cannot be a callback parameter on `enroll` (SPEC §13.4).
101
+ */
102
+ resolveToken(params: {
103
+ requestId: string;
104
+ token: string;
105
+ }): void;
106
+ rejectToken(params: {
107
+ requestId: string;
108
+ reason: string;
109
+ }): void;
110
+ /**
111
+ * Present only to satisfy `NativeEventEmitter`; ref-counting, no logic. The emitter
112
+ * itself is live from module construction and queues events fired before JS
113
+ * subscribes — a wipe lost during startup means the reset never runs (SPEC §4.4).
114
+ */
115
+ addListener(eventName: string): void;
116
+ removeListeners(count: number): void;
117
+ }
118
+ declare const _default: Spec;
119
+ export default _default;
120
+ //# sourceMappingURL=NativeIntune.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeIntune.d.ts","sourceRoot":"","sources":["../../../src/NativeIntune.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Sign-in, for `authMode: 'builtin'` — the module owns MSAL (SPEC §3).
3
+ *
4
+ * Two tokens exist and only one of them appears here: the MAM service token is acquired
5
+ * internally and never crosses the bridge. Everything returned by these calls is for
6
+ * *your* API's scopes (SPEC §3.5).
7
+ */
8
+ import type { AcquireTokenParams, AuthAccount, AuthResult, EnrollmentResult, SignInParams, SignOutParams } from '../types.js';
9
+ /**
10
+ * Uses the broker when one is present, which also gives device-wide SSO: a user already
11
+ * signed into Outlook usually gets a token with no prompt at all.
12
+ */
13
+ export declare function signIn(params?: SignInParams): Promise<AuthResult>;
14
+ /**
15
+ * Cache-first. Rejects with `E_INTERACTION_REQUIRED` when a prompt is needed — the normal
16
+ * pattern is `signInSilent` first, `signIn` on that rejection.
17
+ */
18
+ export declare function signInSilent(params?: SignInParams): Promise<AuthResult>;
19
+ /** For your own API's scopes, after sign-in. */
20
+ export declare function acquireToken(params: AcquireTokenParams): Promise<AuthResult>;
21
+ /**
22
+ * Accounts with cached refresh tokens. Under single identity (SPEC §9) this holds at
23
+ * most one; more than one means state a reset should have cleared.
24
+ */
25
+ export declare function getAccounts(): Promise<AuthAccount[]>;
26
+ /**
27
+ * Removes the account from the MSAL cache. With `wipeIntune: true` it also runs the full
28
+ * reset sequence, which is what you want on logout — and which means **the process may
29
+ * terminate during this call on Android.**
30
+ */
31
+ export declare function signOut(params: SignOutParams): Promise<void>;
32
+ /** The common path in one call. Use the primitives when you need a step in between. */
33
+ export declare function signInAndEnroll(params?: SignInParams): Promise<{
34
+ auth: AuthResult;
35
+ enrollment: EnrollmentResult;
36
+ }>;
37
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/api/auth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACd,MAAM,aAAU,CAAC;AAElB;;;GAGG;AACH,wBAAsB,MAAM,CAAC,MAAM,GAAE,YAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAE3E;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,MAAM,GAAE,YAAiB,GACxB,OAAO,CAAC,UAAU,CAAC,CAErB;AAED,gDAAgD;AAChD,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,UAAU,CAAC,CAErB;AAED;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5D;AAED,uFAAuF;AACvF,wBAAsB,eAAe,CACnC,MAAM,GAAE,YAAiB,GACxB,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAI7D"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Enrollment, state, and the reset sequence.
3
+ *
4
+ * The theme running through all three: **the SDK reports asynchronously and the process
5
+ * may not survive**. Nothing here resolves from a call returning, and nothing assumes
6
+ * the next line will run.
7
+ */
8
+ import type { EnrollInteractiveParams, EnrollmentResult, EnrollParams, IntuneState, ResetHandler, ResetParams } from '../types.js';
9
+ /**
10
+ * Clears the app's own local data during a reset. The module cannot do this for you — it
11
+ * does not know what you store or where.
12
+ *
13
+ * Registered rather than passed to `reset` because a reset can be *resumed* at launch
14
+ * from the journal, with no `reset` call in flight (SPEC §7).
15
+ */
16
+ export declare function setResetHandler(handler: ResetHandler | null): void;
17
+ /**
18
+ * Resolves with a result for every outcome including failures — a non-success status is
19
+ * data, not an exception. It only rejects for programming errors.
20
+ *
21
+ * Expect seconds, and a spinner: the promise settles when the SDK reports through its
22
+ * delegate or notification, not when the underlying call returns.
23
+ *
24
+ * Read SPEC §8 before branching on `status`. `NotLicensed` and `NotTargeted` must not
25
+ * block the user; `Failed` must.
26
+ */
27
+ export declare function enroll(params: EnrollParams): Promise<EnrollmentResult>;
28
+ /**
29
+ * **iOS only.** Hands the whole sign-in to the SDK: it shows its own credential screen,
30
+ * signs the user in, and enrolls them. No MSAL on our side, which is why this works
31
+ * before the built-in auth layer exists.
32
+ *
33
+ * Rejects with `E_SDK_UNAVAILABLE` on Android — `registerAccountForMAM` there always
34
+ * needs a token supplied by the app, so there is nothing equivalent to call.
35
+ *
36
+ * Like `enroll`, it resolves with a result for every outcome including failures.
37
+ */
38
+ export declare function enrollInteractive(params?: EnrollInteractiveParams): Promise<EnrollmentResult>;
39
+ /**
40
+ * The reconciliation primitive, and the intended way to drive this module. Call it at
41
+ * launch, compare against what your backend says the state should be, act on the
42
+ * difference. It never rejects.
43
+ */
44
+ export declare function getState(): Promise<IntuneState>;
45
+ /**
46
+ * Unregisters, unenrolls, optionally wipes corporate data, and clears the runtime
47
+ * configuration.
48
+ *
49
+ * **The process is expected to terminate during this call on Android** (SPEC §7). Do not
50
+ * write code after `await reset(...)` that must run — put the continuation in the
51
+ * launch-time reconciliation and let the journal resume it.
52
+ */
53
+ export declare function reset(params: ResetParams): Promise<void>;
54
+ //# sourceMappingURL=enrollment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enrollment.d.ts","sourceRoot":"","sources":["../../../../src/api/enrollment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACZ,MAAM,aAAU,CAAC;AAIlB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG,IAAI,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAsB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAU5E;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,GAAE,uBAA4B,GACnC,OAAO,CAAC,gBAAgB,CAAC,CAI3B;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,CAErD;AAED;;;;;;;GAOG;AACH,wBAAsB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB9D"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Typed subscriptions.
3
+ *
4
+ * Every one of these can fire without the app having called anything: the SDK enrolls on
5
+ * its own retry schedule, an administrator can change policy, and a wipe is
6
+ * service-initiated. Subscribe at startup, not when you happen to be waiting (SPEC §4.4).
7
+ */
8
+ import type { EmitterSubscription } from 'react-native';
9
+ import type { BrokerStatus, EnrollmentResult, PolicySnapshot, RestartRequest } from '../types.js';
10
+ /** Also fires for the SDK's own background enrollment retries, which have no caller. */
11
+ export declare function onEnrollmentResult(listener: (result: EnrollmentResult) => void): EmitterSubscription;
12
+ /** The terminal state of a reset. */
13
+ export declare function onUnenrollmentResult(listener: (result: EnrollmentResult) => void): EmitterSubscription;
14
+ /** An administrator changed policy — re-read whatever UI you gate on it. */
15
+ export declare function onPolicyChanged(listener: (policy: PolicySnapshot) => void): EmitterSubscription;
16
+ /** The user installed or removed Company Portal. */
17
+ export declare function onBrokerStatusChanged(listener: (status: BrokerStatus) => void): EmitterSubscription;
18
+ /** **Service-initiated.** Can arrive with no prior app call at all. */
19
+ export declare function onWipeRequested(listener: (request: {
20
+ accountId: string | null;
21
+ }) => void): EmitterSubscription;
22
+ /** iOS, on first policy application. See `configure({ restartHandledByApp })`. */
23
+ export declare function onRestartRequired(listener: (request: RestartRequest) => void): EmitterSubscription;
24
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/api/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAUxD,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAEhB,cAAc,EACd,cAAc,EACf,MAAM,aAAU,CAAC;AAUlB,wFAAwF;AACxF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,GAC3C,mBAAmB,CAErB;AAED,qCAAqC;AACrC,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,GAC3C,mBAAmB,CAErB;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,GACzC,mBAAmB,CAErB;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GACvC,mBAAmB,CAErB;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,CAAC,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KAAK,IAAI,GACxD,mBAAmB,CAQrB;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,GAC1C,mBAAmB,CAQrB"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Setup, and the two questions worth asking before it: is the SDK usable at all, and is
3
+ * a broker present.
4
+ */
5
+ import { type BrokerStatus, type IntuneConfig } from '../types.js';
6
+ /**
7
+ * Configures the SDK for one customer tenant. Every other method rejects with
8
+ * `E_NOT_CONFIGURED` until this resolves.
9
+ *
10
+ * Two things it will refuse rather than paper over:
11
+ *
12
+ * - a different `tenantId` than the active one — `E_RESET_REQUIRED`, because silently
13
+ * reconfiguring would leave the old tenant enrolled, and the iOS runtime overrides
14
+ * persist across restarts so the mismatch would survive a relaunch;
15
+ * - an `Info.plist` that disagrees with it — `E_PLIST_CONFLICT`, see SPEC §5.1.2.
16
+ */
17
+ export declare function configure(config: IntuneConfig): Promise<void>;
18
+ /**
19
+ * SDK linked and platform prerequisites met. Gate the whole Intune path on this so a
20
+ * misbuilt binary degrades instead of crashing.
21
+ */
22
+ export declare function isSupported(): Promise<boolean>;
23
+ /**
24
+ * Answerable before `configure`, on purpose — the app needs it to decide whether to
25
+ * prompt for a broker install.
26
+ *
27
+ * A false negative here usually means a missing manifest entry rather than a missing
28
+ * app: `LSApplicationQueriesSchemes` on iOS, `<queries>` on Android 11+.
29
+ */
30
+ export declare function getBrokerStatus(): Promise<BrokerStatus>;
31
+ /** Rejects with `E_NOT_NEEDED` when a broker is already present. */
32
+ export declare function openBrokerInstall(): Promise<void>;
33
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/api/lifecycle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,aAAU,CAAC;AAElB;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B7D;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAE9C;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAE7D;AAED,oEAAoE;AACpE,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEjD"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Reading policy, and reading the module's own state for a support bundle.
3
+ */
4
+ import type { Diagnostics, PolicySnapshot } from '../types.js';
5
+ /**
6
+ * For adapting your own UI — hiding an export button, disabling a share sheet.
7
+ *
8
+ * **PIN prompts, screenshot blocking and encryption are enforced inside the SDK and
9
+ * never surface here.** Do not attempt to implement enforcement from these booleans.
10
+ */
11
+ export declare function getPolicy(): Promise<PolicySnapshot>;
12
+ /** Safe to attach to a support ticket: no tokens, no UPNs. */
13
+ export declare function getDiagnostics(): Promise<Diagnostics>;
14
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/api/policy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAU,CAAC;AAE5D;;;;;GAKG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAEzD;AAED,8DAA8D;AAC9D,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAE3D"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The MAM service token bridge (SPEC §13.4).
3
+ *
4
+ * The SDK asks for this token on a background thread, including on its own retry
5
+ * schedule when no JS call is in flight — which is why it is a registration rather than
6
+ * a callback parameter on `enroll`.
7
+ *
8
+ * The token never leaves the module: the provider's answer goes to native, native hands
9
+ * it to the SDK, and it is never logged or returned to JS (CLAUDE.md rule 9).
10
+ */
11
+ import type { TokenProvider } from '../types.js';
12
+ /**
13
+ * Registers the provider for `authMode: 'external'`. Return `null` from it to say
14
+ * "cannot get a token right now" — the SDK treats that as needing authorization rather
15
+ * than as a hard failure.
16
+ */
17
+ export declare function setTokenProvider(provider: TokenProvider | null): void;
18
+ //# sourceMappingURL=tokenProvider.d.ts.map
@@ -0,0 +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;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAErE"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Public API for react-native-intune. See SPEC §13 for the reference — a method that
3
+ * exists here but not there does not exist, and the two change in the same commit.
4
+ *
5
+ * This file is deliberately only a surface. The work is one directory down:
6
+ *
7
+ * ```
8
+ * src/
9
+ * NativeIntune.ts Codegen spec — the only file Codegen reads, deliberately loose
10
+ * types.ts every public type and enum
11
+ * api/
12
+ * lifecycle.ts configure, isSupported, broker presence
13
+ * auth.ts sign-in, tokens for your own API (authMode 'builtin')
14
+ * enrollment.ts enroll, getState, reset
15
+ * policy.ts getPolicy, getDiagnostics
16
+ * events.ts subscriptions
17
+ * tokenProvider.ts the MAM service token bridge (authMode 'external')
18
+ * internal/
19
+ * decode.ts bridge Object -> typed, with deliberate fallbacks
20
+ * errors.ts IntuneError and the accountId guard
21
+ * emitter.ts the single NativeEventEmitter
22
+ * ```
23
+ *
24
+ * Both import styles work and neither is preferred:
25
+ *
26
+ * ```ts
27
+ * import Intune from 'react-native-intune'; Intune.configure(...)
28
+ * import { configure } from 'react-native-intune'; configure(...)
29
+ * ```
30
+ */
31
+ export * from './types.js';
32
+ export { IntuneError } from './internal/errors.js';
33
+ import { configure, getBrokerStatus, isSupported, openBrokerInstall } from './api/lifecycle.js';
34
+ import { acquireToken, getAccounts, signIn, signInAndEnroll, signInSilent, signOut } from './api/auth.js';
35
+ import { enroll, enrollInteractive, getState, reset, setResetHandler } from './api/enrollment.js';
36
+ import { getDiagnostics, getPolicy } from './api/policy.js';
37
+ import { onBrokerStatusChanged, onEnrollmentResult, onPolicyChanged, onRestartRequired, onUnenrollmentResult, onWipeRequested } from './api/events.js';
38
+ import { setTokenProvider } from './api/tokenProvider.js';
39
+ export { configure, isSupported, getBrokerStatus, openBrokerInstall, signIn, signInSilent, signInAndEnroll, acquireToken, getAccounts, signOut, enroll, enrollInteractive, getState, reset, setResetHandler, getPolicy, getDiagnostics, setTokenProvider, onEnrollmentResult, onUnenrollmentResult, onPolicyChanged, onWipeRequested, onRestartRequired, onBrokerStatusChanged, };
40
+ declare const Intune: {
41
+ readonly configure: typeof configure;
42
+ readonly isSupported: typeof isSupported;
43
+ readonly getBrokerStatus: typeof getBrokerStatus;
44
+ readonly openBrokerInstall: typeof openBrokerInstall;
45
+ readonly signIn: typeof signIn;
46
+ readonly signInSilent: typeof signInSilent;
47
+ readonly signInAndEnroll: typeof signInAndEnroll;
48
+ readonly acquireToken: typeof acquireToken;
49
+ readonly getAccounts: typeof getAccounts;
50
+ readonly signOut: typeof signOut;
51
+ readonly enroll: typeof enroll;
52
+ readonly enrollInteractive: typeof enrollInteractive;
53
+ readonly getState: typeof getState;
54
+ readonly reset: typeof reset;
55
+ readonly setResetHandler: typeof setResetHandler;
56
+ readonly getPolicy: typeof getPolicy;
57
+ readonly getDiagnostics: typeof getDiagnostics;
58
+ readonly setTokenProvider: typeof setTokenProvider;
59
+ readonly onEnrollmentResult: typeof onEnrollmentResult;
60
+ readonly onUnenrollmentResult: typeof onUnenrollmentResult;
61
+ readonly onPolicyChanged: typeof onPolicyChanged;
62
+ readonly onWipeRequested: typeof onWipeRequested;
63
+ readonly onRestartRequired: typeof onRestartRequired;
64
+ readonly onBrokerStatusChanged: typeof onBrokerStatusChanged;
65
+ };
66
+ export default Intune;
67
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;CAyBF,CAAC;AAEX,eAAe,MAAM,CAAC"}