@microsoft/power-apps-native-host 0.2.25 → 0.3.3
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 +21 -10
- package/compatibility/current.json +31 -4
- package/lib/NOTICE.txt +1325 -24
- package/lib/commonjs/auth/AuthContext.js +110 -33
- package/lib/commonjs/bridge/NativePowerAppsBridge.js +11 -18
- package/lib/commonjs/bridge/PowerPagesBridge.js +27 -8
- package/lib/commonjs/bridge/bridgeState.js +40 -0
- package/lib/commonjs/config/babelConfig.js +13 -0
- package/lib/commonjs/config/expoConfig.js +71 -0
- package/lib/commonjs/config/metroConfig.js +70 -0
- package/lib/commonjs/config/metroLogger.js +182 -0
- package/lib/commonjs/config/tamaguiConfig.js +98 -0
- package/lib/commonjs/connections/ConnectionSetupScreen.js +459 -80
- package/lib/commonjs/connections/PowerPlatformConnectionApi.js +946 -0
- package/lib/commonjs/connections/connectionMetadata.js +127 -0
- package/lib/commonjs/connections/connectionState.js +96 -0
- package/lib/commonjs/connections/disambiguate.js +19 -11
- package/lib/commonjs/connections/resolveConnections.js +348 -0
- package/lib/commonjs/connections/types.js +106 -0
- package/lib/commonjs/{platform → connections}/useConnectionRefs.js +130 -65
- package/lib/commonjs/connections/useConnectionSetup.js +111 -52
- package/lib/commonjs/controls/FilePicker.js +6 -0
- package/lib/commonjs/controls/ImagePicker.js +8 -0
- package/lib/commonjs/index.js +167 -4
- package/lib/commonjs/logger.js +9 -6
- package/lib/commonjs/offline/createOfflineHostActivationCallbacks.js +61 -0
- package/lib/commonjs/offline/useOfflineIntegrationWithStartupGate.js +48 -0
- package/lib/commonjs/offline/useOfflineIntegrationWithStartupGate.web.js +13 -0
- package/lib/commonjs/platform/DataverseDataSources.js +18 -0
- package/lib/commonjs/platform/DataverseGlobalDiscoveryApi.js +94 -0
- package/lib/commonjs/platform/GlobalDiscovery.js +51 -0
- package/lib/commonjs/platform/PowerPlatformEnvironmentApi.js +6 -106
- package/lib/commonjs/provider/PowerAppsHostProvider.js +157 -25
- package/lib/commonjs/provider/PowerAppsProvider.js +178 -134
- package/lib/commonjs/provider/SessionDetailsGesture.js +208 -0
- package/lib/commonjs/telemetry/OfflineSdkTelemetry.js +95 -0
- package/lib/commonjs/telemetry/OfflineSdkTelemetry.web.js +9 -0
- package/lib/commonjs/telemetry/index.js +22 -3
- package/lib/module/auth/AuthContext.js +110 -33
- package/lib/module/bridge/NativePowerAppsBridge.js +12 -19
- package/lib/module/bridge/PowerPagesBridge.js +27 -8
- package/lib/module/bridge/bridgeState.js +34 -0
- package/lib/module/config/babelConfig.js +9 -0
- package/lib/module/config/expoConfig.js +67 -0
- package/lib/module/config/metroConfig.js +65 -0
- package/lib/module/config/metroLogger.js +175 -0
- package/lib/module/config/tamaguiConfig.js +93 -0
- package/lib/module/connections/ConnectionSetupScreen.js +460 -81
- package/lib/module/connections/PowerPlatformConnectionApi.js +932 -0
- package/lib/module/connections/connectionMetadata.js +112 -0
- package/lib/module/connections/connectionState.js +82 -0
- package/lib/module/connections/disambiguate.js +19 -12
- package/lib/module/connections/resolveConnections.js +343 -0
- package/lib/module/connections/types.js +91 -0
- package/lib/module/{platform → connections}/useConnectionRefs.js +131 -66
- package/lib/module/connections/useConnectionSetup.js +113 -54
- package/lib/module/controls/FilePicker.js +6 -0
- package/lib/module/controls/ImagePicker.js +8 -0
- package/lib/module/index.js +14 -4
- package/lib/module/logger.js +8 -6
- package/lib/module/offline/createOfflineHostActivationCallbacks.js +55 -0
- package/lib/module/offline/useOfflineIntegrationWithStartupGate.js +44 -0
- package/lib/module/offline/useOfflineIntegrationWithStartupGate.web.js +9 -0
- package/lib/module/platform/DataverseDataSources.js +13 -0
- package/lib/module/platform/DataverseGlobalDiscoveryApi.js +89 -0
- package/lib/module/platform/GlobalDiscovery.js +45 -0
- package/lib/module/platform/PowerPlatformEnvironmentApi.js +5 -104
- package/lib/module/provider/PowerAppsHostProvider.js +160 -28
- package/lib/module/provider/PowerAppsProvider.js +182 -138
- package/lib/module/provider/SessionDetailsGesture.js +203 -0
- package/lib/module/telemetry/OfflineSdkTelemetry.js +91 -0
- package/lib/module/telemetry/OfflineSdkTelemetry.web.js +5 -0
- package/lib/module/telemetry/index.js +15 -4
- package/lib/typescript/commonjs/auth/AuthContext.d.ts +3 -1
- package/lib/typescript/commonjs/auth/AuthContext.web.d.ts +1 -0
- package/lib/typescript/commonjs/bridge/bridgeState.d.ts +5 -0
- package/lib/typescript/commonjs/config/babelConfig.d.ts +12 -0
- package/lib/typescript/commonjs/config/expoConfig.d.ts +21 -0
- package/lib/typescript/commonjs/config/metroConfig.d.ts +6 -0
- package/lib/typescript/commonjs/config/metroLogger.d.ts +21 -0
- package/lib/typescript/commonjs/config/tamaguiConfig.d.ts +1792 -0
- package/lib/typescript/commonjs/connections/ConnectionSetupScreen.d.ts +28 -7
- package/lib/typescript/commonjs/{platform → connections}/PowerPlatformConnectionApi.d.ts +52 -43
- package/lib/typescript/commonjs/connections/connectionMetadata.d.ts +66 -0
- package/lib/typescript/commonjs/connections/connectionState.d.ts +16 -0
- package/lib/typescript/commonjs/connections/disambiguate.d.ts +4 -2
- package/lib/typescript/commonjs/{platform → connections}/resolveConnections.d.ts +22 -20
- package/lib/typescript/commonjs/connections/types.d.ts +129 -1
- package/lib/typescript/commonjs/{platform → connections}/useConnectionRefs.d.ts +36 -25
- package/lib/typescript/commonjs/connections/useConnectionSetup.d.ts +12 -8
- package/lib/typescript/commonjs/controls/FilePicker.d.ts +7 -1
- package/lib/typescript/commonjs/controls/ImagePicker.d.ts +9 -1
- package/lib/typescript/commonjs/index.d.ts +18 -10
- package/lib/typescript/commonjs/logger.d.ts +4 -4
- package/lib/typescript/commonjs/offline/createOfflineHostActivationCallbacks.d.ts +12 -0
- package/lib/typescript/commonjs/offline/useOfflineIntegrationWithStartupGate.d.ts +15 -0
- package/lib/typescript/commonjs/offline/useOfflineIntegrationWithStartupGate.web.d.ts +6 -0
- package/lib/typescript/commonjs/platform/DataverseDataSources.d.ts +28 -0
- package/lib/typescript/commonjs/platform/DataverseGlobalDiscoveryApi.d.ts +3 -0
- package/lib/typescript/commonjs/platform/GlobalDiscovery.d.ts +4 -0
- package/lib/typescript/commonjs/platform/PowerPlatformEnvironmentApi.d.ts +3 -74
- package/lib/typescript/commonjs/provider/PowerAppsHostProvider.d.ts +29 -18
- package/lib/typescript/commonjs/provider/PowerAppsProvider.d.ts +54 -9
- package/lib/typescript/commonjs/provider/SessionDetailsGesture.d.ts +13 -0
- package/lib/typescript/commonjs/telemetry/OfflineSdkTelemetry.d.ts +15 -0
- package/lib/typescript/commonjs/telemetry/OfflineSdkTelemetry.web.d.ts +2 -0
- package/lib/typescript/commonjs/telemetry/index.d.ts +13 -1
- package/lib/typescript/module/auth/AuthContext.d.ts +3 -1
- package/lib/typescript/module/auth/AuthContext.web.d.ts +1 -0
- package/lib/typescript/module/bridge/bridgeState.d.ts +5 -0
- package/lib/typescript/module/config/babelConfig.d.ts +12 -0
- package/lib/typescript/module/config/expoConfig.d.ts +21 -0
- package/lib/typescript/module/config/metroConfig.d.ts +6 -0
- package/lib/typescript/module/config/metroLogger.d.ts +21 -0
- package/lib/typescript/module/config/tamaguiConfig.d.ts +1792 -0
- package/lib/typescript/module/connections/ConnectionSetupScreen.d.ts +28 -7
- package/lib/typescript/module/{platform → connections}/PowerPlatformConnectionApi.d.ts +52 -43
- package/lib/typescript/module/connections/connectionMetadata.d.ts +66 -0
- package/lib/typescript/module/connections/connectionState.d.ts +16 -0
- package/lib/typescript/module/connections/disambiguate.d.ts +4 -2
- package/lib/typescript/module/{platform → connections}/resolveConnections.d.ts +22 -20
- package/lib/typescript/module/connections/types.d.ts +129 -1
- package/lib/typescript/module/{platform → connections}/useConnectionRefs.d.ts +36 -25
- package/lib/typescript/module/connections/useConnectionSetup.d.ts +12 -8
- package/lib/typescript/module/controls/FilePicker.d.ts +7 -1
- package/lib/typescript/module/controls/ImagePicker.d.ts +9 -1
- package/lib/typescript/module/index.d.ts +18 -10
- package/lib/typescript/module/logger.d.ts +4 -4
- package/lib/typescript/module/offline/createOfflineHostActivationCallbacks.d.ts +12 -0
- package/lib/typescript/module/offline/useOfflineIntegrationWithStartupGate.d.ts +15 -0
- package/lib/typescript/module/offline/useOfflineIntegrationWithStartupGate.web.d.ts +6 -0
- package/lib/typescript/module/platform/DataverseDataSources.d.ts +28 -0
- package/lib/typescript/module/platform/DataverseGlobalDiscoveryApi.d.ts +3 -0
- package/lib/typescript/module/platform/GlobalDiscovery.d.ts +4 -0
- package/lib/typescript/module/platform/PowerPlatformEnvironmentApi.d.ts +3 -74
- package/lib/typescript/module/provider/PowerAppsHostProvider.d.ts +29 -18
- package/lib/typescript/module/provider/PowerAppsProvider.d.ts +54 -9
- package/lib/typescript/module/provider/SessionDetailsGesture.d.ts +13 -0
- package/lib/typescript/module/telemetry/OfflineSdkTelemetry.d.ts +15 -0
- package/lib/typescript/module/telemetry/OfflineSdkTelemetry.web.d.ts +2 -0
- package/lib/typescript/module/telemetry/index.d.ts +13 -1
- package/package.json +52 -13
- package/scripts/build-codegen-package.js +283 -0
- package/scripts/start-web.mjs +9 -5
- package/scripts/upgrade/runtime.js +139 -24
- package/scripts/upgrade-authoring.js +274 -180
- package/scripts/upgrade.js +10 -16
- package/src/config/generated-config.d.ts +4 -0
- package/src/config/index.d.ts +3 -0
- package/src/config/tsconfig.json +26 -0
- package/lib/commonjs/platform/PowerPlatformConnectionApi.js +0 -606
- package/lib/commonjs/platform/resolveConnections.js +0 -264
- package/lib/module/platform/PowerPlatformConnectionApi.js +0 -595
- package/lib/module/platform/resolveConnections.js +0 -259
|
@@ -28,11 +28,12 @@ import React from 'react';
|
|
|
28
28
|
import { createTamagui } from '@tamagui/core';
|
|
29
29
|
import type { AuthProviderProps } from '../auth/AuthContext';
|
|
30
30
|
import type { PowerAppsHostProviderProps } from './PowerAppsHostProvider';
|
|
31
|
-
import type { ConnectorSchema } from '../
|
|
32
|
-
import type { DatabaseReference } from '../platform/
|
|
33
|
-
import type { OnDisambiguationNeeded } from '../connections/types';
|
|
31
|
+
import type { ConnectorSchema } from '../connections/useConnectionRefs';
|
|
32
|
+
import type { DatabaseReference } from '../platform/DataverseDataSources';
|
|
33
|
+
import type { ConnectionReferenceConfig, OnDisambiguationNeeded } from '../connections/types';
|
|
34
34
|
import type { ThemeTokens } from '../theme/tokens';
|
|
35
35
|
import type { ILogger } from '@microsoft/power-apps-native-common';
|
|
36
|
+
import type { ApplicationInsightsTelemetryProviderConfig } from '@microsoft/power-apps-native-common';
|
|
36
37
|
/** Shape of power.config.json consumed by the provider. */
|
|
37
38
|
export interface PowerConfig {
|
|
38
39
|
/**
|
|
@@ -53,10 +54,7 @@ export interface PowerConfig {
|
|
|
53
54
|
* Omit for the default global collector.
|
|
54
55
|
*/
|
|
55
56
|
geoRegion?: string;
|
|
56
|
-
connectionReferences?: Record<string,
|
|
57
|
-
id: string;
|
|
58
|
-
dataSources: string[];
|
|
59
|
-
}>;
|
|
57
|
+
connectionReferences?: Record<string, ConnectionReferenceConfig>;
|
|
60
58
|
databaseReferences?: Record<string, DatabaseReference>;
|
|
61
59
|
/**
|
|
62
60
|
* Allow additional keys — the offline SDK reads arbitrary fields from
|
|
@@ -67,7 +65,29 @@ export interface PowerConfig {
|
|
|
67
65
|
[key: string]: unknown;
|
|
68
66
|
}
|
|
69
67
|
type TamaguiConfig = ReturnType<typeof createTamagui>;
|
|
68
|
+
export interface AppInsightsConfig extends Omit<ApplicationInsightsTelemetryProviderConfig, 'deviceId' | 'sessionId'> {
|
|
69
|
+
/** Explicit opt-in. Application Insights telemetry is disabled unless this is true. */
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface PowerAppsAppConfig {
|
|
73
|
+
expo?: {
|
|
74
|
+
extra?: {
|
|
75
|
+
appInsightsConfig?: unknown;
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
};
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
}
|
|
70
82
|
export interface PowerAppsProviderProps {
|
|
83
|
+
/**
|
|
84
|
+
* Contents of the generated app.json.
|
|
85
|
+
*
|
|
86
|
+
* Pass this when the app runs inside a host such as Dev Player, where
|
|
87
|
+
* `Constants.expoConfig` describes the host instead of the loaded app.
|
|
88
|
+
* The provider falls back to `Constants.expoConfig` when omitted.
|
|
89
|
+
*/
|
|
90
|
+
appConfig?: PowerAppsAppConfig;
|
|
71
91
|
/** MSAL configuration from auth.config.json (msal section). */
|
|
72
92
|
msalConfig: AuthProviderProps['msalConfig'];
|
|
73
93
|
/** Intune MAM configuration. Defaults to enabled in release builds. */
|
|
@@ -106,6 +126,12 @@ export interface PowerAppsProviderProps {
|
|
|
106
126
|
renderOAuthWebView?: PowerAppsHostProviderProps['renderOAuthWebView'];
|
|
107
127
|
/** See PowerAppsHostProviderProps.onDisambiguationNeeded. */
|
|
108
128
|
onDisambiguationNeeded?: OnDisambiguationNeeded;
|
|
129
|
+
/** See PowerAppsHostProviderProps.onConnectionConsent. */
|
|
130
|
+
onConnectionConsent?: PowerAppsHostProviderProps['onConnectionConsent'];
|
|
131
|
+
/** See PowerAppsHostProviderProps.onResourceConsent. */
|
|
132
|
+
onResourceConsent?: PowerAppsHostProviderProps['onResourceConsent'];
|
|
133
|
+
/** See PowerAppsHostProviderProps.onConnectionConsentDeclined. */
|
|
134
|
+
onConnectionConsentDeclined?: PowerAppsHostProviderProps['onConnectionConsentDeclined'];
|
|
109
135
|
/**
|
|
110
136
|
* App name used as `clientType` in the auto-wired 1DS telemetry provider.
|
|
111
137
|
* Appears in Kusto as the `clientType` column — use a stable
|
|
@@ -125,6 +151,25 @@ export interface PowerAppsProviderProps {
|
|
|
125
151
|
* logger becomes a no-op regardless of build variant.
|
|
126
152
|
*/
|
|
127
153
|
logger?: ILogger | null;
|
|
154
|
+
/**
|
|
155
|
+
* Show app and telemetry session details after a three-finger long press.
|
|
156
|
+
* Available in both development and published native apps. @default true
|
|
157
|
+
*/
|
|
158
|
+
showSessionDetailsOnLongPress?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Use `showSessionDetailsOnLongPress` instead.
|
|
161
|
+
*/
|
|
162
|
+
showSessionDetailsOnSwipe?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Optional customer-owned Application Insights destination.
|
|
165
|
+
*
|
|
166
|
+
* Events are sent directly to the selected C1-owned Application Insights
|
|
167
|
+
* resource and fan out alongside the default Microsoft OneDS provider.
|
|
168
|
+
* Defaults to `appConfig.expo.extra.appInsightsConfig`, then falls back to
|
|
169
|
+
* `Constants.expoConfig.extra.appInsightsConfig`.
|
|
170
|
+
* Ignored when `logger` is provided or `null`.
|
|
171
|
+
*/
|
|
172
|
+
appInsightsConfig?: AppInsightsConfig;
|
|
128
173
|
/**
|
|
129
174
|
* Offline profile JSON — optional override.
|
|
130
175
|
* Primary source: SDK config plugin embeds offline-profile.json into the app
|
|
@@ -142,7 +187,7 @@ export interface PowerAppsProviderProps {
|
|
|
142
187
|
* component, eliminating all provider boilerplate from the consuming app's
|
|
143
188
|
* root layout.
|
|
144
189
|
*/
|
|
145
|
-
export declare function PowerAppsProvider({ msalConfig, intuneConfig, powerConfig, schemaMap, tamaguiConfig, // override with app's tamagui.config.ts
|
|
146
|
-
defaultTheme, theme, darkTheme, followSystemTheme, renderOAuthWebView, onDisambiguationNeeded, appName, logger: loggerProp, offlineProfile, children, }: PowerAppsProviderProps): React.JSX.Element;
|
|
190
|
+
export declare function PowerAppsProvider({ appConfig, msalConfig, intuneConfig, powerConfig, schemaMap, tamaguiConfig, // override with app's tamagui.config.ts
|
|
191
|
+
defaultTheme, theme, darkTheme, followSystemTheme, renderOAuthWebView, onDisambiguationNeeded, onConnectionConsent, onResourceConsent, onConnectionConsentDeclined, appName, logger: loggerProp, showSessionDetailsOnLongPress, showSessionDetailsOnSwipe, appInsightsConfig, offlineProfile, children, }: PowerAppsProviderProps): React.JSX.Element;
|
|
147
192
|
export {};
|
|
148
193
|
//# sourceMappingURL=PowerAppsProvider.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SessionDetailsGestureProps {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
appName: string;
|
|
5
|
+
appId?: string;
|
|
6
|
+
environmentId?: string;
|
|
7
|
+
region: string;
|
|
8
|
+
appVersion?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function SessionDetailsGesture({ enabled, appName, appId, environmentId, region, appVersion, children, }: SessionDetailsGestureProps): React.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=SessionDetailsGesture.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forwards the privacy-safe Offline SDK transport through the host's existing
|
|
3
|
+
* app logger so offline events carry the same session, device, and user data.
|
|
4
|
+
*
|
|
5
|
+
* The host owns exactly one thing here: binding the SDK transport to this
|
|
6
|
+
* host's logger. Buffering and teardown semantics live in the SDK.
|
|
7
|
+
*
|
|
8
|
+
* Setup and teardown are fail-open but not silent. This runs from an effect in
|
|
9
|
+
* the provider that roots the app, so an unguarded throw would take down the
|
|
10
|
+
* whole tree — telemetry is never worth an app that will not start. An
|
|
11
|
+
* unexpected failure is therefore downgraded to a logged diagnostic rather than
|
|
12
|
+
* swallowed, so broken wiring stays observable.
|
|
13
|
+
*/
|
|
14
|
+
export declare function configureOfflineSdkTelemetry(forwardEvents: boolean): () => void;
|
|
15
|
+
//# sourceMappingURL=OfflineSdkTelemetry.d.ts.map
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* (`getAppLogger` / `configureAppLogger`). This module re-exports those
|
|
8
8
|
* alongside the canonical host operation-name constants.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
import { HttpClient } from '@microsoft/power-apps-native-common/http';
|
|
11
|
+
export { getAppLogger, configureAppLogger, getCustomerTelemetryLogger } from '@microsoft/power-apps-native-common';
|
|
12
|
+
export type { ICustomerTelemetryLogger } from '@microsoft/power-apps-native-common';
|
|
11
13
|
/**
|
|
12
14
|
* Canonical operation names for host package telemetry.
|
|
13
15
|
* Follow the `PowerAppsHost.<Subsystem>.<Action>` convention so events are
|
|
@@ -34,15 +36,25 @@ export declare const HostOperationNames: {
|
|
|
34
36
|
readonly BridgeTokenAcquireFailed: "PowerAppsHost.Bridge.TokenAcquire.Failed";
|
|
35
37
|
/** Top-level React error boundary caught an unhandled JS error. */
|
|
36
38
|
readonly RuntimeUnhandledJsError: "PowerAppsHost.Runtime.UnhandledJsError";
|
|
39
|
+
/** Power Platform RP HTTP request, including backend correlation IDs. */
|
|
40
|
+
readonly PlatformHttpRequest: "PowerAppsHost.Platform.HttpRequest";
|
|
37
41
|
/** Resolve Dataverse instanceUrl from Power Platform environment API. */
|
|
38
42
|
readonly PlatformFetchInstanceUrl: "PowerAppsHost.Platform.FetchInstanceUrl";
|
|
39
43
|
/** useConnectionRefs failed to resolve connections (recoverable). Recorded only on failure. */
|
|
40
44
|
readonly PlatformLoadConnectionsFailed: "PowerAppsHost.Platform.LoadConnections.Failed";
|
|
41
45
|
/** Create a new Power Platform connection. */
|
|
42
46
|
readonly PlatformCreateConnection: "PowerAppsHost.Platform.CreateConnection";
|
|
47
|
+
/** Repair an existing Power Platform connection. */
|
|
48
|
+
readonly PlatformRepairConnection: "PowerAppsHost.Platform.RepairConnection";
|
|
49
|
+
/** Poll a connection until it becomes active. */
|
|
50
|
+
readonly PlatformPollConnectionStatus: "PowerAppsHost.Platform.PollConnectionStatus";
|
|
43
51
|
/** Resolve app connection references for the current launch. */
|
|
44
52
|
readonly PlatformResolveConnectionRefs: "PowerAppsHost.Platform.ResolveConnectionRefs";
|
|
45
53
|
/** Grant this app access to a Power Platform connection ACL. */
|
|
46
54
|
readonly PlatformConnectionAclGrant: "PowerAppsHost.Platform.ConnectionAclGrant";
|
|
55
|
+
/** Installed Offline SDK predates the SDK-owned routing contract. */
|
|
56
|
+
readonly OfflineRoutingContractUnsupported: "PowerAppsHost.Offline.RoutingContract.Unsupported";
|
|
47
57
|
};
|
|
58
|
+
export declare const bridgeHttpClient: HttpClient;
|
|
59
|
+
export declare const platformHttpClient: HttpClient;
|
|
48
60
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -46,9 +46,11 @@ export interface AuthProviderProps {
|
|
|
46
46
|
* Pass explicitly only to override the default (e.g. in tests).
|
|
47
47
|
*/
|
|
48
48
|
intuneConfig?: IntuneConfig;
|
|
49
|
+
/** Token audiences that must be available before the account is considered signed in. */
|
|
50
|
+
requiredScopes?: string[];
|
|
49
51
|
children: React.ReactNode;
|
|
50
52
|
}
|
|
51
|
-
export declare function AuthProvider({ msalConfig, intuneConfig, children }: AuthProviderProps): React.JSX.Element;
|
|
53
|
+
export declare function AuthProvider({ msalConfig, intuneConfig, requiredScopes, children, }: AuthProviderProps): React.JSX.Element;
|
|
52
54
|
/**
|
|
53
55
|
* Returns the current auth state from the nearest <AuthProvider>.
|
|
54
56
|
* Must be called within the AuthProvider tree.
|
|
@@ -13,6 +13,7 @@ export interface AuthState {
|
|
|
13
13
|
export interface AuthProviderProps {
|
|
14
14
|
msalConfig: MsalAuthConfig;
|
|
15
15
|
intuneConfig?: IntuneConfig;
|
|
16
|
+
requiredScopes?: string[];
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
}
|
|
18
19
|
export declare function AuthProvider({ children }: AuthProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NativeBridgeOptions } from './NativePowerAppsBridge.js';
|
|
2
|
+
export declare function getRequestBodyForMethod(method: string, body: BodyInit | null): BodyInit | null;
|
|
3
|
+
export declare function assertSuccessfulHttpStatus(status: number, method: string): void;
|
|
4
|
+
export declare function updateBridgeOptionsInPlace(current: NativeBridgeOptions, next: NativeBridgeOptions): NativeBridgeOptions;
|
|
5
|
+
//# sourceMappingURL=bridgeState.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BabelConfigApi {
|
|
2
|
+
cache(value: boolean): void;
|
|
3
|
+
}
|
|
4
|
+
export interface PowerAppsBabelConfigOptions {
|
|
5
|
+
presets?: unknown[];
|
|
6
|
+
plugins?: unknown[];
|
|
7
|
+
}
|
|
8
|
+
export declare function createPowerAppsBabelConfig(api: BabelConfigApi, options?: PowerAppsBabelConfigOptions): {
|
|
9
|
+
presets: unknown[];
|
|
10
|
+
plugins: unknown[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=babelConfig.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ConfigContext, ExpoConfig } from 'expo/config';
|
|
2
|
+
export interface PowerAppsExpoConfigSettings {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
scheme: string;
|
|
6
|
+
androidPackage: string;
|
|
7
|
+
iosBundleIdentifier: string;
|
|
8
|
+
version: string;
|
|
9
|
+
versionCode: number;
|
|
10
|
+
iconPath?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Optional splash image. When omitted, falls back to the `APP_SPLASH_PATH`
|
|
13
|
+
* environment variable and then to the branding placeholder, so the template
|
|
14
|
+
* needs no wiring of its own and prebuild always emits replaceable slots.
|
|
15
|
+
*/
|
|
16
|
+
splashPath?: string | null;
|
|
17
|
+
isDevClient?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type CustomizePowerAppsExpoConfig = (config: ExpoConfig) => ExpoConfig;
|
|
20
|
+
export declare function createPowerAppsExpoConfig(baseConfig: ConfigContext['config'], settings: PowerAppsExpoConfigSettings, customize?: CustomizePowerAppsExpoConfig): ExpoConfig;
|
|
21
|
+
//# sourceMappingURL=expoConfig.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { getDefaultConfig } from 'expo/metro-config.js';
|
|
2
|
+
type PowerAppsMetroConfig = ReturnType<typeof getDefaultConfig>;
|
|
3
|
+
type CustomizeMetroConfig = (config: PowerAppsMetroConfig) => PowerAppsMetroConfig;
|
|
4
|
+
export declare function createPowerAppsMetroConfig(projectRoot: string, customize?: CustomizeMetroConfig): PowerAppsMetroConfig;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=metroConfig.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
type InstrumentationContext = {
|
|
3
|
+
phase: string;
|
|
4
|
+
logPath: string;
|
|
5
|
+
};
|
|
6
|
+
type InstrumentationErrorHandler = (error: Error, context: InstrumentationContext) => void;
|
|
7
|
+
type MetroNext = (error?: Error) => void;
|
|
8
|
+
export type MetroMiddleware = (request: IncomingMessage, response: ServerResponse, next: MetroNext) => unknown;
|
|
9
|
+
export type MetroLoggingOptions = {
|
|
10
|
+
projectRoot?: string;
|
|
11
|
+
maxBodyBytes?: number;
|
|
12
|
+
onError?: InstrumentationErrorHandler;
|
|
13
|
+
};
|
|
14
|
+
export declare function redactMetroLog(value: unknown): string;
|
|
15
|
+
export declare function enablePowerNativeMetroLogging(options?: MetroLoggingOptions): {
|
|
16
|
+
logDir: string;
|
|
17
|
+
logPath: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function withPowerNativeMetroLogging(middleware: MetroMiddleware, options?: MetroLoggingOptions): MetroMiddleware;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=metroLogger.d.ts.map
|