@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
|
@@ -30,9 +30,12 @@
|
|
|
30
30
|
* },
|
|
31
31
|
* });
|
|
32
32
|
*/
|
|
33
|
-
import
|
|
33
|
+
import type { DatabaseReference } from '../platform/DataverseDataSources.js';
|
|
34
|
+
import type { OnDisambiguationNeeded, OnMissingConnection } from '../connections/types.js';
|
|
34
35
|
import type { ConnectorSchema } from './resolveConnections.js';
|
|
35
36
|
import type { AppConnectionReference } from '../bridge/NativePowerAppsBridge.js';
|
|
37
|
+
import type { ConnectionRequirement, ResourceConsentRequirement } from './types.js';
|
|
38
|
+
import type { ConnectionReferenceConfig } from './types.js';
|
|
36
39
|
export type { ConnectorSchema } from './resolveConnections.js';
|
|
37
40
|
export interface UseConnectionRefsOptions {
|
|
38
41
|
isSignedIn: boolean;
|
|
@@ -46,23 +49,21 @@ export interface UseConnectionRefsOptions {
|
|
|
46
49
|
region?: string;
|
|
47
50
|
/**
|
|
48
51
|
* PowerApps app GUID (from power.config.json `appId`).
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* `/apps/{appId}/launch` endpoint and take precedence over the static
|
|
52
|
-
* `connectionReferences` object below.
|
|
53
|
-
* Leave undefined during local development to use the static fallback.
|
|
52
|
+
* Outside Dev Player, app and connection metadata is fetched exclusively
|
|
53
|
+
* from the PowerApps RP `/apps/{appId}/launch` endpoint.
|
|
54
54
|
*/
|
|
55
55
|
appId?: string;
|
|
56
56
|
/**
|
|
57
57
|
* The connectionReferences map from power.config.json.
|
|
58
|
+
* Used only in Dev Player for unpublished local apps.
|
|
58
59
|
* Shape: { [refId]: { id: string; dataSources: string[] } }
|
|
59
60
|
*/
|
|
60
|
-
connectionReferences: Record<string,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}>;
|
|
61
|
+
connectionReferences: Record<string, ConnectionReferenceConfig>;
|
|
62
|
+
/** Whether power.config.json contains Dataverse database references. */
|
|
63
|
+
hasDataverse: boolean;
|
|
64
64
|
/**
|
|
65
65
|
* Connector schema map keyed by data source name.
|
|
66
|
+
* Used only in Dev Player for unpublished local apps.
|
|
66
67
|
* Generated automatically by generate-connector-schemas.
|
|
67
68
|
* Shape: { [dataSourceName]: ConnectorSchema }
|
|
68
69
|
*/
|
|
@@ -80,10 +81,11 @@ export interface UseConnectionRefsOptions {
|
|
|
80
81
|
*/
|
|
81
82
|
onMissingConnection?: OnMissingConnection;
|
|
82
83
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
* The ISV's AAD application (client) ID. When provided, each user-selected
|
|
85
|
+
* `Connected` connection is granted through delegated user consent. Fixed
|
|
86
|
+
* shared connections skip this grant in published apps.
|
|
85
87
|
* Connections where the grant fails are marked `NeedsAclGrant` and treated
|
|
86
|
-
|
|
88
|
+
* as missing so the setup screen can guide the user to create a new one.
|
|
87
89
|
*/
|
|
88
90
|
isvClientId?: string;
|
|
89
91
|
}
|
|
@@ -91,12 +93,25 @@ export interface UseConnectionRefsResult {
|
|
|
91
93
|
connectionRefs: Record<string, AppConnectionReference>;
|
|
92
94
|
isReady: boolean;
|
|
93
95
|
error: string | null;
|
|
96
|
+
errorKind: ConnectionResolutionErrorKind | null;
|
|
94
97
|
/**
|
|
95
98
|
* API IDs of connectors for which no connection was found (or the user did
|
|
96
99
|
* not resolve during disambiguation). Useful for surfacing a "Set up
|
|
97
100
|
* connections" prompt in the app UI.
|
|
98
101
|
*/
|
|
99
102
|
missingConnectors: string[];
|
|
103
|
+
/** Unresolved requirements keyed by the app's local connection-reference ID. */
|
|
104
|
+
missingConnectionReferences: ConnectionRequirement[];
|
|
105
|
+
/** Every connection reference required by the app. */
|
|
106
|
+
connectionRequirements: ConnectionRequirement[];
|
|
107
|
+
/** Non-connector protected resources returned by app launch metadata. */
|
|
108
|
+
resourceConsents: ResourceConsentRequirement[];
|
|
109
|
+
/** Blocking connection configuration errors. */
|
|
110
|
+
configurationErrors: string[];
|
|
111
|
+
/** Whether selected connection references still need durable app usage consent. */
|
|
112
|
+
requiresConnectionConsent: boolean;
|
|
113
|
+
/** Identity of the app/environment/config represented by this result. */
|
|
114
|
+
resolvedConfigKey: string | null;
|
|
100
115
|
/**
|
|
101
116
|
* The Dataverse org URL for this environment (e.g. "https://org12345.crm.dynamics.com").
|
|
102
117
|
* Fetched from the Power Platform environment metadata independently of whether a
|
|
@@ -104,23 +119,19 @@ export interface UseConnectionRefsResult {
|
|
|
104
119
|
* Empty string until isReady is true or if the environment has no linked Dataverse database.
|
|
105
120
|
*/
|
|
106
121
|
dataverseOrgUrl: string;
|
|
122
|
+
/** Database references resolved from the RP launch response. */
|
|
123
|
+
databaseReferences: Record<string, DatabaseReference>;
|
|
107
124
|
}
|
|
125
|
+
export type ConnectionResolutionErrorKind = 'app-access-denied' | 'generic';
|
|
108
126
|
/**
|
|
109
127
|
* Resolves Power Platform connection references for the current user, with
|
|
110
128
|
* disambiguation support for environments where multiple connections exist for
|
|
111
129
|
* the same connector.
|
|
112
130
|
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* 2. Acquires a Power Platform API token.
|
|
118
|
-
* 3. In parallel: fetches the Dataverse instanceUrl and ALL connections for
|
|
119
|
-
* each configured connector.
|
|
120
|
-
* 4. Runs disambiguation: resolves single matches, invokes `onDisambiguationNeeded`
|
|
121
|
-
* for multiple matches, and invokes `onMissingConnection` for absent ones.
|
|
122
|
-
* 5. Pre-warms the Dataverse token in the MSAL cache.
|
|
123
|
-
* 6. Sets isReady=true with the fully-populated connections map.
|
|
131
|
+
* Outside Dev Player, the published app launch endpoint is authoritative.
|
|
132
|
+
* Dev Player resolves unpublished local references through per-connector APIs.
|
|
133
|
+
* Both paths disambiguate candidates, pre-warm Dataverse authentication, and
|
|
134
|
+
* return a fully populated bridge configuration.
|
|
124
135
|
*/
|
|
125
|
-
export declare function useConnectionRefs({ isSignedIn, acquireToken, appId, environmentId, region, connectionReferences, schemaMap, onDisambiguationNeeded, onMissingConnection, isvClientId, }: UseConnectionRefsOptions): UseConnectionRefsResult;
|
|
136
|
+
export declare function useConnectionRefs({ isSignedIn, acquireToken, appId, environmentId, region, connectionReferences, hasDataverse, schemaMap, onDisambiguationNeeded, onMissingConnection, isvClientId, }: UseConnectionRefsOptions): UseConnectionRefsResult;
|
|
126
137
|
//# sourceMappingURL=useConnectionRefs.d.ts.map
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* // Call setup.startCreate() to trigger connection creation
|
|
18
18
|
* // Call setup.checkNow() to re-poll after WebView finishes
|
|
19
19
|
*/
|
|
20
|
-
import type { NativeConnectionInstance } from '
|
|
20
|
+
import type { ConnectionInput, NativeConnectionInstance } from './types.js';
|
|
21
21
|
/**
|
|
22
22
|
* The current phase of the connection setup flow for one connector.
|
|
23
23
|
*
|
|
@@ -43,12 +43,12 @@ export interface UseConnectionSetupOptions {
|
|
|
43
43
|
onConnected?: (instance: NativeConnectionInstance) => void;
|
|
44
44
|
/**
|
|
45
45
|
* The ISV/wrap-app AAD client ID (from auth.config.json `msal.clientId`).
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* so that APIM accepts tokens bearing this appid at runtime (otherwise APIM
|
|
49
|
-
* returns 403 "missing connection ACL" for all third-party app tokens).
|
|
46
|
+
* After connection creation, delegated user consent adds the calling app ID
|
|
47
|
+
* to the most specific applicable connection ACL.
|
|
50
48
|
*/
|
|
51
|
-
isvClientId
|
|
49
|
+
isvClientId: string;
|
|
50
|
+
/** Fixed shared connection resource ID. */
|
|
51
|
+
sharedConnectionId?: string;
|
|
52
52
|
/**
|
|
53
53
|
* Redirect URL passed to the getConsentLink API call.
|
|
54
54
|
* Defaults to the standard native-client redirect accepted by Power Platform.
|
|
@@ -71,7 +71,11 @@ export interface UseConnectionSetupResult {
|
|
|
71
71
|
* Start the connection creation flow.
|
|
72
72
|
* Transitions: idle/error → creating → (oauth | connected | error).
|
|
73
73
|
*/
|
|
74
|
-
startCreate: () => Promise<void>;
|
|
74
|
+
startCreate: (input?: ConnectionInput) => Promise<void>;
|
|
75
|
+
/** Update and re-consent an existing unauthenticated connection. */
|
|
76
|
+
startRepair: (instance: NativeConnectionInstance, input?: ConnectionInput, requiresApiConsent?: boolean) => Promise<void>;
|
|
77
|
+
/** Verify third-party ACL access before accepting an existing connection. */
|
|
78
|
+
useExisting: (instance: NativeConnectionInstance) => Promise<void>;
|
|
75
79
|
/**
|
|
76
80
|
* Call after the OAuth WebView is dismissed (or anytime during 'oauth' phase)
|
|
77
81
|
* to immediately poll the connection status instead of waiting for the next
|
|
@@ -92,5 +96,5 @@ export interface UseConnectionSetupResult {
|
|
|
92
96
|
/** Reset the flow back to idle (e.g., for a retry). */
|
|
93
97
|
reset: () => void;
|
|
94
98
|
}
|
|
95
|
-
export declare function useConnectionSetup({ connectorId, environmentId, region, acquireToken, onConnected,
|
|
99
|
+
export declare function useConnectionSetup({ connectorId, environmentId, region, acquireToken, onConnected, sharedConnectionId, oauthRedirectUrl, polling, }: UseConnectionSetupOptions): UseConnectionSetupResult;
|
|
96
100
|
//# sourceMappingURL=useConnectionSetup.d.ts.map
|
|
@@ -11,6 +11,12 @@ export interface PickedFileInfo {
|
|
|
11
11
|
}
|
|
12
12
|
export interface FilePickerProps {
|
|
13
13
|
label?: string;
|
|
14
|
+
/** Optional test ID for the outer container. */
|
|
15
|
+
testID?: string;
|
|
16
|
+
/** Optional test ID for the selected file row. */
|
|
17
|
+
fileRowTestID?: string;
|
|
18
|
+
/** Optional test ID for the pick/replace button. */
|
|
19
|
+
pickButtonTestID?: string;
|
|
14
20
|
/**
|
|
15
21
|
* The file name to display.
|
|
16
22
|
* - In view mode: the name of the existing Dataverse file.
|
|
@@ -61,5 +67,5 @@ export interface FilePickerProps {
|
|
|
61
67
|
* - Pass both to show the existing file name (tappable to download) alongside a
|
|
62
68
|
* replace button — useful when the edit screen should also allow previewing.
|
|
63
69
|
*/
|
|
64
|
-
export declare function FilePicker({ label, fileName, onDownload, shareTitle, onChange, acceptedTypes, pickButtonLabel, replaceButtonLabel, readingLabel, containerStyle, labelStyle, fileRowStyle, fileNameStyle, buttonStyle, buttonTextStyle, accentColor, }: FilePickerProps): React.JSX.Element;
|
|
70
|
+
export declare function FilePicker({ label, testID, fileRowTestID, pickButtonTestID, fileName, onDownload, shareTitle, onChange, acceptedTypes, pickButtonLabel, replaceButtonLabel, readingLabel, containerStyle, labelStyle, fileRowStyle, fileNameStyle, buttonStyle, buttonTextStyle, accentColor, }: FilePickerProps): React.JSX.Element;
|
|
65
71
|
//# sourceMappingURL=FilePicker.d.ts.map
|
|
@@ -13,6 +13,14 @@ export interface PickedImageInfo {
|
|
|
13
13
|
}
|
|
14
14
|
export interface ImagePickerProps {
|
|
15
15
|
label?: string;
|
|
16
|
+
/** Optional test ID for the outer container. */
|
|
17
|
+
testID?: string;
|
|
18
|
+
/** Optional test ID for the camera button. */
|
|
19
|
+
cameraButtonTestID?: string;
|
|
20
|
+
/** Optional test ID for the image-library button. */
|
|
21
|
+
selectButtonTestID?: string;
|
|
22
|
+
/** Optional test ID for the selected image preview. */
|
|
23
|
+
previewTestID?: string;
|
|
16
24
|
/**
|
|
17
25
|
* Base64 string from Dataverse (the `cr_assetimage` thumbnail).
|
|
18
26
|
* The component builds the preview data URI internally.
|
|
@@ -72,5 +80,5 @@ export interface ImagePickerProps {
|
|
|
72
80
|
* - On pick, the image is returned as base64 for legacy callers and as a
|
|
73
81
|
* File-compatible object for generated Dataverse upload methods.
|
|
74
82
|
*/
|
|
75
|
-
export declare function ImagePicker({ label, initialBase64, onChange, containerStyle, labelStyle, buttonRowStyle, buttonStyle, buttonTextStyle, previewStyle, accentColor, onImageChange, imageFileName, quality, allowsEditing, aspect, cropShape, exif, legacy, cameraButtonLabel, selectButtonLabel, changeButtonLabel, readingLabel, }: ImagePickerProps): React.JSX.Element;
|
|
83
|
+
export declare function ImagePicker({ label, testID, cameraButtonTestID, selectButtonTestID, previewTestID, initialBase64, onChange, containerStyle, labelStyle, buttonRowStyle, buttonStyle, buttonTextStyle, previewStyle, accentColor, onImageChange, imageFileName, quality, allowsEditing, aspect, cropShape, exif, legacy, cameraButtonLabel, selectButtonLabel, changeButtonLabel, readingLabel, }: ImagePickerProps): React.JSX.Element;
|
|
76
84
|
//# sourceMappingURL=ImagePicker.d.ts.map
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
* React Native host integration for @microsoft/power-apps
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
+
import '@microsoft/power-apps-native-assets';
|
|
6
7
|
export { NativePowerAppsBridge } from './bridge/NativePowerAppsBridge.js';
|
|
7
8
|
export { PowerPagesBridge, setupPowerPagesHost } from './bridge/PowerPagesBridge.js';
|
|
8
9
|
export type { PowerPagesBridgeOptions } from './bridge/PowerPagesBridge.js';
|
|
9
10
|
export type { NativeBridgeOptions, CdsDataSourceConfig, AppConnection, AppConnectionReference } from './bridge/NativePowerAppsBridge.js';
|
|
10
11
|
export { buildConnectionReferences } from './bridge/NativePowerAppsBridge.js';
|
|
11
12
|
export { setupNativeHost } from './bridge/setupNativeHost.js';
|
|
13
|
+
export { updateBridgeOptionsInPlace } from './bridge/bridgeState.js';
|
|
12
14
|
export { AuthProvider, useAuth } from './auth/AuthContext';
|
|
13
15
|
export type { AuthState, AuthProviderProps } from './auth/AuthContext';
|
|
14
16
|
export { completePowerAppsAuthSession } from './auth/completePowerAppsAuthSession.js';
|
|
@@ -16,15 +18,21 @@ export type { AuthConfig, MsalAuthConfig, IntuneConfig } from '@microsoft/power-
|
|
|
16
18
|
export { PowerAppsHostProvider } from './provider/PowerAppsHostProvider';
|
|
17
19
|
export type { PowerAppsHostProviderProps } from './provider/PowerAppsHostProvider';
|
|
18
20
|
export { PowerAppsProvider } from './provider/PowerAppsProvider.js';
|
|
19
|
-
export type { PowerAppsProviderProps, PowerConfig } from './provider/PowerAppsProvider.js';
|
|
20
|
-
export {
|
|
21
|
-
export
|
|
22
|
-
export {
|
|
23
|
-
export type {
|
|
24
|
-
export {
|
|
25
|
-
export type {
|
|
21
|
+
export type { AppInsightsConfig, PowerAppsAppConfig, PowerAppsProviderProps, PowerConfig, } from './provider/PowerAppsProvider.js';
|
|
22
|
+
export { buildEnvironmentEndpoint, POWER_PLATFORM_API_SCOPE } from './platform/PowerPlatformEnvironmentApi.js';
|
|
23
|
+
export { fetchInstanceUrl } from './platform/DataverseGlobalDiscoveryApi.js';
|
|
24
|
+
export { buildCdsDataSources } from './platform/DataverseDataSources.js';
|
|
25
|
+
export type { LinkedEnvironmentMetadata, DatabaseReference, DatabaseReferenceDataSource } from './platform/DataverseDataSources.js';
|
|
26
|
+
export { useConnectionRefs } from './connections/useConnectionRefs.js';
|
|
27
|
+
export type { UseConnectionRefsOptions, UseConnectionRefsResult, ConnectorSchema } from './connections/useConnectionRefs.js';
|
|
28
|
+
export { fetchConnectorMetadata, fetchConnectionsForConnector, deleteConnection, createConnection, pollConnectionStatus, confirmConsentCode, repairConnection, fetchAppLaunchData, fetchAppConnectionUsages, postConnectionUsage, reportScopeConsents, } from './connections/PowerPlatformConnectionApi.js';
|
|
29
|
+
export type { ConnectorMetadata, CreateConnectionResult, AppLaunchResult, RegisteredConnectionUsage, } from './connections/PowerPlatformConnectionApi.js';
|
|
26
30
|
export { disambiguateConnections, extractConnectionId } from './connections/disambiguate.js';
|
|
27
|
-
export
|
|
31
|
+
export { shouldPersistConnectionUsages, shouldShowConnectionReview, } from './connections/connectionState.js';
|
|
32
|
+
export { buildConnectionRequirements, buildConnectionResolutionKey, findConnectionDataSourceConflicts, hasCompleteStaticConnectionConfig, isCompositeConnectionApiId, getConnectorId, normalizeApiId, } from './connections/types.js';
|
|
33
|
+
export { buildConnectionUserConsentUrl, buildConsentLinkDefinition, buildConnectionParameterSets, buildConnectionUsageRequest, buildConnectionUsageUrl, buildScopeConsentRequest, buildScopeConsentUrl, hasOAuthParameter, parseConnectionParameters, serializeConnectionParameters, } from './connections/connectionMetadata.js';
|
|
34
|
+
export type { ConsentLinkDefinition, RawConnectionParameter, RawConnectionParameterSet, SerializedConnectionParameters, } from './connections/connectionMetadata.js';
|
|
35
|
+
export type { ConnectionConsentDetails, ConnectionInput, ConnectionParameterDefinition, ConnectionParameterSet, ConnectionParameterType, ConnectionParameterValue, ConnectionReferenceConfig, ConnectionRequirement, ConnectionUsageInput, ResourceConsentRequirement, NativeConnectionInstance, NativeConnectionResolution, NativeDisambiguationResult, OnDisambiguationNeeded, OnMissingConnection, } from './connections/types.js';
|
|
28
36
|
export { useConnectionSetup } from './connections/useConnectionSetup.js';
|
|
29
37
|
export type { ConnectionSetupPhase, UseConnectionSetupOptions, UseConnectionSetupResult, } from './connections/useConnectionSetup.js';
|
|
30
38
|
export { ConnectionSetupScreen } from './connections/ConnectionSetupScreen.js';
|
|
@@ -39,7 +47,7 @@ export { ImagePicker } from './controls/ImagePicker.js';
|
|
|
39
47
|
export type { ImagePickerProps, PickedImageInfo } from './controls/ImagePicker.js';
|
|
40
48
|
export { isDevPlayer } from './utils/isDevPlayer.js';
|
|
41
49
|
export { base64ToDataverseUploadFile, base64ToUint8Array, createDataverseUploadFile, } from './utils/dataverseUtils.js';
|
|
42
|
-
export { getAppLogger, configureAppLogger, HostOperationNames } from './telemetry/index.js';
|
|
43
|
-
export type { ILogger } from '@microsoft/power-apps-native-common';
|
|
50
|
+
export { getAppLogger, configureAppLogger, getCustomerTelemetryLogger, HostOperationNames, } from './telemetry/index.js';
|
|
51
|
+
export type { ICustomerTelemetryLogger, ILogger, } from '@microsoft/power-apps-native-common';
|
|
44
52
|
export { ErrorBoundary } from './ErrorBoundary.js';
|
|
45
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Conditional debug logger for power-apps-native-host.
|
|
3
3
|
*
|
|
4
|
-
* Debug logs (debugLog / debugWarn) are
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* APKs generated from the template so the production log stream stays clean.
|
|
4
|
+
* Debug logs (debugLog / debugWarn) are emitted in development bundles or when
|
|
5
|
+
* running inside Power Apps Dev Player. They remain silent in wrapped release
|
|
6
|
+
* apps so the production log stream stays clean.
|
|
8
7
|
*/
|
|
8
|
+
export declare function isDebugLoggingEnabled(): boolean;
|
|
9
9
|
export declare function debugLog(...args: unknown[]): void;
|
|
10
10
|
export declare function debugWarn(...args: unknown[]): void;
|
|
11
11
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
export declare function createHostQueryClient(): QueryClient;
|
|
3
|
+
export declare function createOfflineHostActivationCallbacks(queryClient: QueryClient): {
|
|
4
|
+
prepareForOfflineActivation: () => Promise<void>;
|
|
5
|
+
completeOfflineActivation: () => Promise<void>;
|
|
6
|
+
rollbackOfflineActivation: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
export declare function resolveSdkMountDecision(value: unknown): {
|
|
9
|
+
shouldMountChildren: boolean;
|
|
10
|
+
contractSupported: boolean;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=createOfflineHostActivationCallbacks.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useOfflineIntegration } from './useOfflineIntegration';
|
|
2
|
+
type Options = {
|
|
3
|
+
powerConfig: Parameters<typeof useOfflineIntegration>[0]['powerConfig'];
|
|
4
|
+
offlineProfile?: Record<string, unknown>;
|
|
5
|
+
acquireToken: (scopes: string[]) => Promise<string | null>;
|
|
6
|
+
hasRealAccount: boolean;
|
|
7
|
+
isAuthReady: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function useOfflineIntegrationWithStartupGate({ powerConfig, offlineProfile, acquireToken, hasRealAccount, isAuthReady, }: Options): {
|
|
10
|
+
isEnabled: boolean;
|
|
11
|
+
StatusOverlay: import("react").ComponentType<Record<string, never>> | null;
|
|
12
|
+
shouldMountChildren: boolean;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useOfflineIntegrationWithStartupGate.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface LinkedEnvironmentMetadata {
|
|
2
|
+
resourceId?: string;
|
|
3
|
+
friendlyName?: string;
|
|
4
|
+
uniqueName?: string;
|
|
5
|
+
domainName?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
instanceUrl?: string;
|
|
8
|
+
instanceApiUrl?: string;
|
|
9
|
+
baseLanguage?: number;
|
|
10
|
+
instanceState?: string;
|
|
11
|
+
createdTime?: string;
|
|
12
|
+
platformSku?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DatabaseReferenceDataSource {
|
|
15
|
+
entitySetName?: string;
|
|
16
|
+
logicalName?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DatabaseReference {
|
|
19
|
+
dataSources?: Record<string, DatabaseReferenceDataSource>;
|
|
20
|
+
}
|
|
21
|
+
export declare function hasDataverseDatabaseReferences<T>(databaseReferences?: Record<string, T>): boolean;
|
|
22
|
+
export declare function buildCdsDataSources(databaseReferences: Record<string, DatabaseReference>, dataverseOrgUrl: string): Array<{
|
|
23
|
+
runtimeUrl: string;
|
|
24
|
+
entitySetName: string;
|
|
25
|
+
logicalName: string;
|
|
26
|
+
version: string;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=DataverseDataSources.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Fetch the Dataverse instance URL from the Dataverse Global Discovery Service. */
|
|
2
|
+
export declare function fetchInstanceUrl(environmentId: string, region: string, acquireToken: (scopes: string[]) => Promise<string | null>, _bearerToken?: string): Promise<string | undefined>;
|
|
3
|
+
//# sourceMappingURL=DataverseGlobalDiscoveryApi.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function globalDiscoveryEndpoint(region: string): string;
|
|
2
|
+
export declare function globalDiscoveryScope(region: string): string;
|
|
3
|
+
export declare function buildGlobalDiscoveryUrl(environmentId: string, region: string): string;
|
|
4
|
+
//# sourceMappingURL=GlobalDiscovery.d.ts.map
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* power-apps-native-host — PowerPlatformEnvironmentApi
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* pattern: resolves the Power Platform environment-scoped API endpoint from the
|
|
6
|
-
* environment GUID and region, then fetches linkedEnvironmentMetadata to obtain
|
|
7
|
-
* the Dataverse instanceUrl.
|
|
8
|
-
*
|
|
9
|
-
* Reference (Host SDK):
|
|
10
|
-
* packages/power-apps-host/src/providers/defaults/DefaultAppMetadataProvider.ts
|
|
11
|
-
* packages/power-apps-common/src/services/PowerPlatformApiDiscovery.ts
|
|
4
|
+
* Resolves Power Platform RP endpoints and scopes.
|
|
12
5
|
*/
|
|
13
6
|
/**
|
|
14
7
|
* Build the Power Platform environment-scoped API base URL.
|
|
@@ -26,19 +19,6 @@
|
|
|
26
19
|
* → "d909aac059d0e5b1900dc082ef5774.d7.environment.api.powerplatform.com"
|
|
27
20
|
*/
|
|
28
21
|
export declare function buildEnvironmentEndpoint(environmentId: string, region: string): string;
|
|
29
|
-
export interface LinkedEnvironmentMetadata {
|
|
30
|
-
resourceId?: string;
|
|
31
|
-
friendlyName?: string;
|
|
32
|
-
uniqueName?: string;
|
|
33
|
-
domainName?: string;
|
|
34
|
-
version?: string;
|
|
35
|
-
instanceUrl?: string;
|
|
36
|
-
instanceApiUrl?: string;
|
|
37
|
-
baseLanguage?: number;
|
|
38
|
-
instanceState?: string;
|
|
39
|
-
createdTime?: string;
|
|
40
|
-
platformSku?: string;
|
|
41
|
-
}
|
|
42
22
|
/**
|
|
43
23
|
* Token scope for the Power Platform management API (prod cluster).
|
|
44
24
|
* Non-prod clusters (test, gov, high, dev, mooncake, etc.) host the management
|
|
@@ -52,57 +32,6 @@ export declare const POWER_PLATFORM_API_SCOPE = "https://api.powerplatform.com/.
|
|
|
52
32
|
* {@link buildEnvironmentEndpoint}.
|
|
53
33
|
*/
|
|
54
34
|
export declare function powerPlatformScope(region: string): string;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
* the environment-scoped Power Platform management API — the same call that
|
|
58
|
-
* the Host SDK's DefaultAppMetadataProvider makes to populate
|
|
59
|
-
* `databaseReferences[*].databaseDetails.linkedEnvironmentMetadata`.
|
|
60
|
-
*
|
|
61
|
-
* @param environmentId - Environment GUID (from power.config.json `environmentId`).
|
|
62
|
-
* @param region - Cluster region string (from power.config.json `region`, default "prod").
|
|
63
|
-
* @param acquireToken - Callback to obtain a bearer token for the given scopes.
|
|
64
|
-
* Scope will be {@link powerPlatformScope}`(region)`.
|
|
65
|
-
* @param bearerToken - Optional pre-fetched bearer token for {@link powerPlatformScope}`(region)`.
|
|
66
|
-
* Pass this to avoid a redundant `acquireToken` round-trip when the
|
|
67
|
-
* caller has already obtained a token for the same audience.
|
|
68
|
-
* @returns The Dataverse org URL (e.g. "https://org12345.crm.dynamics.com"), or
|
|
69
|
-
* `undefined` if the environment has no linked CDS database.
|
|
70
|
-
*/
|
|
71
|
-
export declare function fetchInstanceUrl(environmentId: string, region: string, acquireToken: (scopes: string[]) => Promise<string | null>, bearerToken?: string): Promise<string | undefined>;
|
|
72
|
-
/**
|
|
73
|
-
* Shape of a single Dataverse table entry inside power.config.json
|
|
74
|
-
* `databaseReferences[*].dataSources[*]`.
|
|
75
|
-
*/
|
|
76
|
-
export interface DatabaseReferenceDataSource {
|
|
77
|
-
entitySetName?: string;
|
|
78
|
-
logicalName?: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Shape of a single database reference entry inside power.config.json
|
|
82
|
-
* `databaseReferences`.
|
|
83
|
-
*/
|
|
84
|
-
export interface DatabaseReference {
|
|
85
|
-
dataSources?: Record<string, DatabaseReferenceDataSource>;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Build the CDS data source config array that the SDK reads via
|
|
89
|
-
* AppPowerAppsClientPlugin.getAppCdsDataSourceConfigsAsync.
|
|
90
|
-
*
|
|
91
|
-
* Pass the resolved Dataverse org URL (from useConnectionRefs) and the
|
|
92
|
-
* databaseReferences map from power.config.json. The resulting array is
|
|
93
|
-
* passed directly to <PowerAppsHostProvider dataSources={...} />.
|
|
94
|
-
*
|
|
95
|
-
* @param databaseReferences - The `databaseReferences` map from power.config.json.
|
|
96
|
-
* @param dataverseOrgUrl - The resolved Dataverse org URL
|
|
97
|
-
* (connectionRefs['commondataserviceforapps']?.datasetName).
|
|
98
|
-
* Pass an empty string before the org URL is known;
|
|
99
|
-
* the host provider will receive empty runtimeUrl entries
|
|
100
|
-
* and the SDK will not attempt Dataverse calls.
|
|
101
|
-
*/
|
|
102
|
-
export declare function buildCdsDataSources(databaseReferences: Record<string, DatabaseReference>, dataverseOrgUrl: string): Array<{
|
|
103
|
-
runtimeUrl: string;
|
|
104
|
-
entitySetName: string;
|
|
105
|
-
logicalName: string;
|
|
106
|
-
version: string;
|
|
107
|
-
}>;
|
|
35
|
+
/** Delegated permission required by the connection user-consent endpoint. */
|
|
36
|
+
export declare function connectionUserConsentScope(region: string): string;
|
|
108
37
|
//# sourceMappingURL=PowerPlatformEnvironmentApi.d.ts.map
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
* </PowerAppsHostProvider>
|
|
28
28
|
*/
|
|
29
29
|
import React from 'react';
|
|
30
|
-
import type { ConnectorSchema } from '../
|
|
31
|
-
import type { DatabaseReference } from '../platform/
|
|
30
|
+
import type { ConnectorSchema } from '../connections/useConnectionRefs.js';
|
|
31
|
+
import type { DatabaseReference } from '../platform/DataverseDataSources.js';
|
|
32
32
|
import type { OnDisambiguationNeeded } from '../connections/types.js';
|
|
33
|
+
import type { ConnectionReferenceConfig, ConnectionUsageInput, ResourceConsentRequirement } from '../connections/types.js';
|
|
33
34
|
export interface PowerAppsHostProviderProps {
|
|
34
35
|
/**
|
|
35
36
|
* Callback to acquire an access token for the given scopes.
|
|
@@ -41,12 +42,12 @@ export interface PowerAppsHostProviderProps {
|
|
|
41
42
|
* Connection resolution only runs when this is true.
|
|
42
43
|
*/
|
|
43
44
|
isSignedIn: boolean;
|
|
45
|
+
/** Sign out the active account. Shown on blocking connection error screens. */
|
|
46
|
+
onSignOut?: () => void | Promise<void>;
|
|
44
47
|
/**
|
|
45
48
|
* PowerApps app GUID (from power.config.json `appId`).
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* `connectionReferences` prop. Leave undefined during local development
|
|
49
|
-
* to fall back to the static `connectionReferences`.
|
|
49
|
+
* Outside Dev Player, app and connection metadata is fetched exclusively
|
|
50
|
+
* from the PowerApps RP `/apps/{appId}/launch` API.
|
|
50
51
|
*/
|
|
51
52
|
appId?: string;
|
|
52
53
|
/** Power Platform environment GUID (from power.config.json). */
|
|
@@ -58,6 +59,7 @@ export interface PowerAppsHostProviderProps {
|
|
|
58
59
|
region?: string;
|
|
59
60
|
/**
|
|
60
61
|
* The connectionReferences map from power.config.json.
|
|
62
|
+
* Used only in Dev Player for unpublished local apps.
|
|
61
63
|
* Shape: { [refId]: { id: string; dataSources: string[] } }
|
|
62
64
|
*
|
|
63
65
|
* NOTE: This prop must be referentially stable across renders (memoize it in
|
|
@@ -65,18 +67,16 @@ export interface PowerAppsHostProviderProps {
|
|
|
65
67
|
* so passing a fresh object literal every render forces continuous
|
|
66
68
|
* re-registration.
|
|
67
69
|
*/
|
|
68
|
-
connectionReferences: Record<string,
|
|
69
|
-
id: string;
|
|
70
|
-
dataSources: string[];
|
|
71
|
-
}>;
|
|
70
|
+
connectionReferences: Record<string, ConnectionReferenceConfig>;
|
|
72
71
|
/**
|
|
73
72
|
* Connector schema map keyed by data source name.
|
|
73
|
+
* Used only in Dev Player for unpublished local apps.
|
|
74
74
|
* Generated automatically by generate-connector-schemas.
|
|
75
75
|
*/
|
|
76
76
|
schemaMap: Record<string, ConnectorSchema>;
|
|
77
77
|
/**
|
|
78
78
|
* The databaseReferences map from power.config.json.
|
|
79
|
-
|
|
79
|
+
* Used only in Dev Player. Production database references come from RP.
|
|
80
80
|
*
|
|
81
81
|
* NOTE: Like `connectionReferences`, pass a referentially stable value; an
|
|
82
82
|
* unstable identity each render triggers redundant bridge re-registration.
|
|
@@ -84,8 +84,8 @@ export interface PowerAppsHostProviderProps {
|
|
|
84
84
|
databaseReferences?: Record<string, DatabaseReference>;
|
|
85
85
|
/**
|
|
86
86
|
* Optional custom renderer for the OAuth consent WebView shown during
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
* connection creation. If not provided, the system authentication browser
|
|
88
|
+
* is used. Pass the final redirect URL to onDone when the custom view captures it.
|
|
89
89
|
*
|
|
90
90
|
* @example
|
|
91
91
|
* // Using react-native-webview:
|
|
@@ -96,20 +96,31 @@ export interface PowerAppsHostProviderProps {
|
|
|
96
96
|
* </Modal>
|
|
97
97
|
* )}
|
|
98
98
|
*/
|
|
99
|
-
renderOAuthWebView?: (url: string, onDone: () => void) => React.ReactNode;
|
|
99
|
+
renderOAuthWebView?: (url: string, onDone: (redirectUrl?: string) => void) => React.ReactNode;
|
|
100
100
|
/**
|
|
101
101
|
* The ISV/wrap-app AAD client ID (from auth.config.json `msal.clientId`).
|
|
102
102
|
* When provided, the ISV's service principal is granted CanView access on
|
|
103
103
|
* each newly created connection, allowing APIM to accept tokens with this
|
|
104
104
|
* appid at runtime (prevents 403 "missing connection ACL" for third-party tokens).
|
|
105
105
|
*/
|
|
106
|
-
isvClientId
|
|
106
|
+
isvClientId: string;
|
|
107
107
|
/**
|
|
108
108
|
* Called when multiple Connected connections exist for the same connector.
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
* Present a native picker UI and return the chosen connectionId, or null to
|
|
110
|
+
* leave the reference unresolved.
|
|
111
111
|
*/
|
|
112
112
|
onDisambiguationNeeded?: OnDisambiguationNeeded;
|
|
113
|
+
/**
|
|
114
|
+
* Called after the user selects Allow and before the player launches.
|
|
115
|
+
* Use this to persist app-to-connection usage through an approved public RP endpoint.
|
|
116
|
+
* Rejecting keeps the app gated and shows the error in the consent screen.
|
|
117
|
+
* Not invoked in Power Apps Dev Player; local testing is intentionally non-persistent.
|
|
118
|
+
*/
|
|
119
|
+
onConnectionConsent?: (usages: ConnectionUsageInput[]) => void | Promise<void>;
|
|
120
|
+
/** Persist protected resource approval in production. Not invoked in Dev Player. */
|
|
121
|
+
onResourceConsent?: (resources: ResourceConsentRequirement[]) => void | Promise<void>;
|
|
122
|
+
/** Called when the user selects Do not allow. */
|
|
123
|
+
onConnectionConsentDeclined?: () => void | Promise<void>;
|
|
113
124
|
children: React.ReactNode;
|
|
114
125
|
}
|
|
115
126
|
/**
|
|
@@ -119,5 +130,5 @@ export interface PowerAppsHostProviderProps {
|
|
|
119
130
|
*
|
|
120
131
|
* Children are never rendered until all required connections are resolved.
|
|
121
132
|
*/
|
|
122
|
-
export declare function PowerAppsHostProvider({ acquireToken, isSignedIn, appId, environmentId, region, connectionReferences, schemaMap, databaseReferences, renderOAuthWebView, isvClientId, onDisambiguationNeeded, children, }: PowerAppsHostProviderProps): React.JSX.Element;
|
|
133
|
+
export declare function PowerAppsHostProvider({ acquireToken, isSignedIn, onSignOut, appId, environmentId, region, connectionReferences, schemaMap, databaseReferences, renderOAuthWebView, isvClientId, onDisambiguationNeeded, onConnectionConsent, onResourceConsent, onConnectionConsentDeclined, children, }: PowerAppsHostProviderProps): React.JSX.Element;
|
|
123
134
|
//# sourceMappingURL=PowerAppsHostProvider.d.ts.map
|