@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
|
@@ -39,12 +39,23 @@
|
|
|
39
39
|
* the consuming app decides how to render it (full-screen, modal, etc.).
|
|
40
40
|
*/
|
|
41
41
|
import React from 'react';
|
|
42
|
-
import type {
|
|
42
|
+
import type { ConnectionConsentDetails, ResourceConsentRequirement } from '../connections/types.js';
|
|
43
|
+
import type { ConnectorSchema } from './useConnectionRefs.js';
|
|
43
44
|
export interface MissingConnectorEntry {
|
|
44
45
|
/** Connector API ID (e.g. "/providers/Microsoft.PowerApps/apis/shared_office365users"). */
|
|
45
46
|
apiId: string;
|
|
46
47
|
/** Local ref ID from power.config.json (for correlation). */
|
|
47
48
|
localRefId: string;
|
|
49
|
+
/** Canonical connector short name. Supplied by useConnectionRefs. */
|
|
50
|
+
connectorId?: string;
|
|
51
|
+
dataSources?: string[];
|
|
52
|
+
displayName?: string;
|
|
53
|
+
iconUri?: string;
|
|
54
|
+
appActions?: string[];
|
|
55
|
+
gatewayObjectIdHint?: string;
|
|
56
|
+
authenticationType?: string;
|
|
57
|
+
parameterSetName?: string;
|
|
58
|
+
sharedConnectionId?: string;
|
|
48
59
|
}
|
|
49
60
|
export interface ConnectionSetupScreenProps {
|
|
50
61
|
/**
|
|
@@ -60,11 +71,20 @@ export interface ConnectionSetupScreenProps {
|
|
|
60
71
|
environmentId: string;
|
|
61
72
|
region?: string;
|
|
62
73
|
acquireToken: (scopes: string[]) => Promise<string | null>;
|
|
74
|
+
onSignOut?: () => void | Promise<void>;
|
|
63
75
|
/**
|
|
64
76
|
* Called when all missing connections have been resolved.
|
|
65
|
-
|
|
77
|
+
* `resolvedIds` maps localRefId → connectionId for all newly created connections.
|
|
66
78
|
*/
|
|
67
|
-
onAllConnected: (resolvedIds: Record<string, string>) => void
|
|
79
|
+
onAllConnected: (resolvedIds: Record<string, string>) => void | Promise<void>;
|
|
80
|
+
/** All connector usages requiring user approval, including already-resolved references. */
|
|
81
|
+
consentDetails?: ConnectionConsentDetails[];
|
|
82
|
+
/** Additional protected resources, such as cross-environment Dataverse instances. */
|
|
83
|
+
resourceConsents?: ResourceConsentRequirement[];
|
|
84
|
+
/** Called when the user explicitly declines access. */
|
|
85
|
+
onConsentDeclined?: () => void | Promise<void>;
|
|
86
|
+
/** Whether to show app-level Review Access after authentication. Defaults to true. */
|
|
87
|
+
showReview?: boolean;
|
|
68
88
|
/**
|
|
69
89
|
* If provided, a "Skip" button is shown. Useful for non-blocking connection flows.
|
|
70
90
|
* The app should handle the case where connections remain unresolved.
|
|
@@ -76,11 +96,12 @@ export interface ConnectionSetupScreenProps {
|
|
|
76
96
|
* access on each newly created connection, fixing the APIM 403 for
|
|
77
97
|
* third-party app tokens.
|
|
78
98
|
*/
|
|
79
|
-
isvClientId
|
|
99
|
+
isvClientId: string;
|
|
80
100
|
/**
|
|
81
101
|
* Optional custom renderer for the OAuth WebView.
|
|
82
102
|
* Receives the consent URL and a dismiss callback.
|
|
83
|
-
|
|
103
|
+
* If not provided, Expo's system authentication browser is used.
|
|
104
|
+
* Custom views should pass their final redirect URL to `onDone` when available.
|
|
84
105
|
*
|
|
85
106
|
* @example
|
|
86
107
|
* // Using react-native-webview:
|
|
@@ -91,7 +112,7 @@ export interface ConnectionSetupScreenProps {
|
|
|
91
112
|
* </Modal>
|
|
92
113
|
* )}
|
|
93
114
|
*/
|
|
94
|
-
renderOAuthWebView?: (url: string, onDone: () => void) => React.ReactNode;
|
|
115
|
+
renderOAuthWebView?: (url: string, onDone: (redirectUrl?: string) => void) => React.ReactNode;
|
|
95
116
|
/** Optional title override (default: "Set up connections"). */
|
|
96
117
|
title?: string;
|
|
97
118
|
}
|
|
@@ -103,5 +124,5 @@ export interface ConnectionSetupScreenProps {
|
|
|
103
124
|
* resolved `onAllConnected` fires and the parent app should unmount this
|
|
104
125
|
* component and proceed to launch the app.
|
|
105
126
|
*/
|
|
106
|
-
export declare function ConnectionSetupScreen({ missingConnectors, schemaMap, environmentId, region, acquireToken, isvClientId, onAllConnected, onSkip, renderOAuthWebView, title, }: ConnectionSetupScreenProps): React.JSX.Element;
|
|
127
|
+
export declare function ConnectionSetupScreen({ missingConnectors, schemaMap, environmentId, region, acquireToken, onSignOut, isvClientId, onAllConnected, onSkip, consentDetails, resourceConsents, onConsentDeclined, showReview, renderOAuthWebView, title, }: ConnectionSetupScreenProps): React.JSX.Element;
|
|
107
128
|
//# sourceMappingURL=ConnectionSetupScreen.d.ts.map
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
* These mirror the endpoints used by ConnectorsApi in @microsoft/power-apps-common
|
|
8
8
|
* but are implemented as plain async functions so they have no external dependencies.
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
10
|
+
import type { DatabaseReference } from '../platform/DataverseDataSources.js';
|
|
11
|
+
import type { ConnectionInput, ConnectionParameterSet, ConnectionRequirement, ConnectionUsageInput, NativeConnectionInstance, ResourceConsentRequirement } from './types.js';
|
|
11
12
|
import type { AppConnectionReference } from '../bridge/NativePowerAppsBridge.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* in the connection ACE so that APIM accepts third-party app tokens at runtime.
|
|
16
|
-
*/
|
|
17
|
-
export declare const SERVICE_POWERAPPS_SCOPE = "https://service.powerapps.com/.default";
|
|
13
|
+
export declare class AppLaunchAccessDeniedError extends Error {
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
18
16
|
/** Subset of connector metadata returned by the Power Platform API. */
|
|
19
17
|
export interface ConnectorMetadata {
|
|
20
18
|
/** Short connector name, e.g. "shared_office365users". */
|
|
@@ -25,8 +23,15 @@ export interface ConnectorMetadata {
|
|
|
25
23
|
iconUri: string;
|
|
26
24
|
/** Description text. */
|
|
27
25
|
description: string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
26
|
+
/** Environment-specific APIM runtime URL used for connector requests. */
|
|
27
|
+
primaryRuntimeUrl: string;
|
|
28
|
+
scopes: {
|
|
29
|
+
will: string[];
|
|
30
|
+
wont: string[];
|
|
31
|
+
};
|
|
32
|
+
/** Whether the connector authenticates through an OAuth consent flow. */
|
|
33
|
+
hasOAuthParameter: boolean;
|
|
34
|
+
parameterSets: ConnectionParameterSet[];
|
|
30
35
|
}
|
|
31
36
|
/**
|
|
32
37
|
* Fetch metadata for a single connector from the Power Platform API.
|
|
@@ -43,6 +48,8 @@ export declare function fetchConnectorMetadata(connectorId: string, environmentI
|
|
|
43
48
|
* Returns only the `NativeConnectionInstance` shape used by the disambiguation layer.
|
|
44
49
|
*/
|
|
45
50
|
export declare function fetchConnectionsForConnector(connectorId: string, environmentId: string, region: string, token: string): Promise<NativeConnectionInstance[]>;
|
|
51
|
+
/** Delete a single connection instance from the user's environment. */
|
|
52
|
+
export declare function deleteConnection(connectorId: string, connectionId: string, environmentId: string, region: string, token: string): Promise<boolean>;
|
|
46
53
|
/**
|
|
47
54
|
* Result of initiating an OAuth connection creation.
|
|
48
55
|
*
|
|
@@ -51,8 +58,7 @@ export declare function fetchConnectionsForConnector(connectorId: string, enviro
|
|
|
51
58
|
* user can complete the OAuth consent flow. Poll `pollConnectionStatus`
|
|
52
59
|
* until the status changes to "Connected".
|
|
53
60
|
*
|
|
54
|
-
* `connected` — the connection was created
|
|
55
|
-
* first-party SSO connections that do not need explicit OAuth consent).
|
|
61
|
+
* `connected` — the connection resource was created in Connected state.
|
|
56
62
|
*
|
|
57
63
|
* `error` — creation failed; `message` contains the error description.
|
|
58
64
|
*/
|
|
@@ -71,7 +77,7 @@ export type CreateConnectionResult = {
|
|
|
71
77
|
* Create a new connection for a connector in the user's environment.
|
|
72
78
|
*
|
|
73
79
|
* Calls:
|
|
74
|
-
*
|
|
80
|
+
* PUT {envBase}/connectivity/connectors/{connectorId}/connections/{connectionId}
|
|
75
81
|
*
|
|
76
82
|
* If the response contains a `consentLink`, the connection needs OAuth
|
|
77
83
|
* completion (caller should open the URL and then poll `pollConnectionStatus`).
|
|
@@ -86,7 +92,8 @@ export type CreateConnectionResult = {
|
|
|
86
92
|
* will redirect the user here after consent. Defaults to
|
|
87
93
|
* the standard native-client redirect accepted by Power Platform.
|
|
88
94
|
*/
|
|
89
|
-
export declare function createConnection(connectorId: string, environmentId: string, region: string, token: string, displayName?: string, oauthRedirectUrl?: string): Promise<CreateConnectionResult>;
|
|
95
|
+
export declare function createConnection(connectorId: string, environmentId: string, region: string, token: string, displayName?: string, oauthRedirectUrl?: string, input?: ConnectionInput): Promise<CreateConnectionResult>;
|
|
96
|
+
export declare function repairConnection(connectorId: string, connectionName: string, environmentId: string, region: string, token: string, oauthRedirectUrl?: string, input?: ConnectionInput, requiresApiConsent?: boolean): Promise<CreateConnectionResult>;
|
|
90
97
|
/**
|
|
91
98
|
* Poll a connection's status until it is "Connected" or a timeout is reached.
|
|
92
99
|
*
|
|
@@ -101,6 +108,7 @@ export declare function createConnection(connectorId: string, environmentId: str
|
|
|
101
108
|
export declare function pollConnectionStatus(connectorId: string, connectionName: string, environmentId: string, region: string, acquireToken: (scopes: string[]) => Promise<string | null>, options?: {
|
|
102
109
|
intervalMs?: number;
|
|
103
110
|
timeoutMs?: number;
|
|
111
|
+
signal?: AbortSignal;
|
|
104
112
|
}): Promise<NativeConnectionInstance | null>;
|
|
105
113
|
/**
|
|
106
114
|
* Confirm a consent code returned by the APIM consent server in the OAuth
|
|
@@ -141,13 +149,38 @@ export interface AppLaunchResult {
|
|
|
141
149
|
* has no linked Dataverse database).
|
|
142
150
|
*/
|
|
143
151
|
dataverseOrgUrl: string;
|
|
152
|
+
/** Dataverse table metadata returned by the app launch endpoint. */
|
|
153
|
+
databaseReferences: Record<string, DatabaseReference>;
|
|
144
154
|
/**
|
|
145
155
|
* Connector short-names (e.g. "shared_office365users") for which the
|
|
146
156
|
* launch API found no "Connected" connection instance for the signed-in
|
|
147
157
|
* user. These connectors need the connection setup flow.
|
|
148
158
|
*/
|
|
149
159
|
missingConnectors: string[];
|
|
160
|
+
/** Missing requirements keyed by the app's local connection-reference ID. */
|
|
161
|
+
missingConnectionReferences: ConnectionRequirement[];
|
|
162
|
+
/** Every app requirement, including references resolved by the launch API. */
|
|
163
|
+
connectionRequirements: ConnectionRequirement[];
|
|
164
|
+
/** Connected candidates retained for explicit per-reference disambiguation. */
|
|
165
|
+
connectionCandidates: Record<string, NativeConnectionInstance[]>;
|
|
166
|
+
/** Non-connector protected resources requiring explicit user disclosure. */
|
|
167
|
+
resourceConsents: ResourceConsentRequirement[];
|
|
168
|
+
/** Configuration errors that make bridge connection binding ambiguous. */
|
|
169
|
+
configurationErrors: string[];
|
|
170
|
+
/** Durable app-to-connection bindings returned by launch or the app connections API. */
|
|
171
|
+
registeredConnectionUsages: RegisteredConnectionUsage[];
|
|
172
|
+
/** True when at least one selected local reference/action is not durably registered. */
|
|
173
|
+
requiresConnectionConsent: boolean;
|
|
174
|
+
}
|
|
175
|
+
export interface RegisteredConnectionUsage {
|
|
176
|
+
reference: string;
|
|
177
|
+
apiId: string;
|
|
178
|
+
connectionId: string;
|
|
179
|
+
appActions: string[];
|
|
150
180
|
}
|
|
181
|
+
export declare function fetchAppConnectionUsages(appId: string, environmentId: string, region: string, token: string): Promise<RegisteredConnectionUsage[]>;
|
|
182
|
+
export declare function postConnectionUsage(appId: string, usage: ConnectionUsageInput, environmentId: string, region: string, token: string): Promise<void>;
|
|
183
|
+
export declare function reportScopeConsents(appId: string, usages: ConnectionUsageInput[], environmentId: string, region: string, token: string): Promise<void>;
|
|
151
184
|
/**
|
|
152
185
|
* Fetch app launch data from the Power Platform environment-scoped launch
|
|
153
186
|
* endpoint and process it into the shape the NativePowerAppsBridge needs.
|
|
@@ -160,7 +193,7 @@ export interface AppLaunchResult {
|
|
|
160
193
|
* — Dataverse org URL
|
|
161
194
|
*
|
|
162
195
|
* Endpoint (environment-scoped, same base as all Power Platform API calls):
|
|
163
|
-
*
|
|
196
|
+
* POST {envEndpoint}/powerapps/apps/{appId}/launch
|
|
164
197
|
* ?api-version=2&lastKnownGoodPublishedVersion=true
|
|
165
198
|
*
|
|
166
199
|
* Authentication: bearer token for {@link powerPlatformScope}`(region)`.
|
|
@@ -169,37 +202,13 @@ export interface AppLaunchResult {
|
|
|
169
202
|
* @param environmentId - Environment GUID.
|
|
170
203
|
* @param region - Cluster region (default "prod").
|
|
171
204
|
* @param token - Bearer token for {@link powerPlatformScope}`(region)`.
|
|
172
|
-
* @returns Processed launch data, or `null`
|
|
205
|
+
* @returns Processed launch data, or `null` when the app is not found.
|
|
173
206
|
*/
|
|
174
207
|
export declare function fetchAppLaunchData(appId: string, environmentId: string, region: string, token: string): Promise<AppLaunchResult | null>;
|
|
175
208
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* Available in Hermes (React Native) via the global `atob`.
|
|
180
|
-
*/
|
|
181
|
-
export declare function parseJwtOid(jwtToken: string): string | null;
|
|
182
|
-
/**
|
|
183
|
-
* Add the ISV's AAD application (client) ID to the connection's ACL AppIds
|
|
184
|
-
* list via the Power Apps RP `addAadAppToConnectionAcl` endpoint.
|
|
185
|
-
*
|
|
186
|
-
* The RP finds the user's existing ACE (identified by `userOid`) and appends
|
|
187
|
-
* `isvClientId` to its `AppIds` list. APIM's stage-2 token check verifies
|
|
188
|
-
* that the requesting token's `appid` is present in this list, so without
|
|
189
|
-
* this call APIM returns 403 "missing connection ACL" for third-party tokens.
|
|
190
|
-
*
|
|
191
|
-
* POST https://api.powerapps.com/providers/Microsoft.PowerApps/environments/{environmentId}
|
|
192
|
-
* /apis/{connectorId}/connections/{connectionId}/addAadAppToConnectionAcl
|
|
193
|
-
* ?api-version=2016-11-01
|
|
194
|
-
*
|
|
195
|
-
* Body: { "aadApplicationId": "<ISV client ID>", "objectId": "<user OID>" }
|
|
196
|
-
*
|
|
197
|
-
* @param connectorId - Connector short name (e.g. "shared_office365users").
|
|
198
|
-
* @param connectionId - Bare 32-char hex connection ID.
|
|
199
|
-
* @param environmentId - Environment GUID.
|
|
200
|
-
* @param isvClientId - The ISV's AAD application (client) ID.
|
|
201
|
-
* @param userOid - The signed-in user's AAD object ID (oid JWT claim).
|
|
202
|
-
* @param token - Bearer token for `https://service.powerapps.com/.default`.
|
|
209
|
+
* Grant the calling application's delegated access to a connection for the
|
|
210
|
+
* signed-in user. The backend derives both identities from the token and
|
|
211
|
+
* selects the most specific applicable user, group, or tenant ACL.
|
|
203
212
|
*/
|
|
204
|
-
export declare function
|
|
213
|
+
export declare function grantConnectionUserConsent(connectorId: string, connectionId: string, environmentId: string, region: string, token: string): Promise<boolean>;
|
|
205
214
|
//# sourceMappingURL=PowerPlatformConnectionApi.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ConnectionInput, ConnectionParameterDefinition, ConnectionParameterSet, ConnectionUsageInput } from './types.js';
|
|
2
|
+
export interface ConsentLinkDefinition {
|
|
3
|
+
redirectUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export type SerializedConnectionParameters = {
|
|
6
|
+
connectionParameters: ConnectionInput['parameters'];
|
|
7
|
+
} | {
|
|
8
|
+
connectionParametersSet: {
|
|
9
|
+
name: string;
|
|
10
|
+
values: Record<string, {
|
|
11
|
+
value: ConnectionInput['parameters'][string];
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export interface RawConnectionParameter {
|
|
16
|
+
type?: string;
|
|
17
|
+
defaultValue?: string | boolean | number;
|
|
18
|
+
uiDefinition?: {
|
|
19
|
+
displayName?: string;
|
|
20
|
+
constraints?: {
|
|
21
|
+
required?: string | boolean;
|
|
22
|
+
hidden?: string | boolean;
|
|
23
|
+
capability?: string[];
|
|
24
|
+
allowedValues?: Array<{
|
|
25
|
+
value?: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface RawConnectionParameterSet {
|
|
32
|
+
name?: string;
|
|
33
|
+
uiDefinition?: {
|
|
34
|
+
displayName?: string;
|
|
35
|
+
};
|
|
36
|
+
connectionParameters?: Record<string, RawConnectionParameter>;
|
|
37
|
+
parameters?: Record<string, RawConnectionParameter>;
|
|
38
|
+
}
|
|
39
|
+
export declare function parseConnectionParameters(parameters: Record<string, RawConnectionParameter> | undefined): ConnectionParameterDefinition[];
|
|
40
|
+
export declare function buildConnectionParameterSets(connectionParameters: Record<string, RawConnectionParameter> | undefined, parameterSets: RawConnectionParameterSet[] | undefined): ConnectionParameterSet[];
|
|
41
|
+
export declare function hasOAuthParameter(parameters: Record<string, RawConnectionParameter> | undefined): boolean;
|
|
42
|
+
export declare function buildConnectionUserConsentUrl(environmentEndpoint: string, connectorId: string, connectionId: string): string;
|
|
43
|
+
export declare function getAppLaunchFailureMessage(status: number, statusText: string, responseText: string): string | null;
|
|
44
|
+
export declare function isAppLaunchAccessDenied(status: number, responseText: string): boolean;
|
|
45
|
+
export declare function buildConsentLinkDefinition(redirectUrl: string): ConsentLinkDefinition;
|
|
46
|
+
export declare function serializeConnectionParameters(input?: ConnectionInput): SerializedConnectionParameters;
|
|
47
|
+
export declare function buildConnectionUsageUrl(environmentBaseUrl: string, environmentId: string, usage: ConnectionUsageInput): string;
|
|
48
|
+
export declare function buildConnectionUsageRequest(appId: string, usage: ConnectionUsageInput): {
|
|
49
|
+
properties: {
|
|
50
|
+
reference: string;
|
|
51
|
+
resourceId: string;
|
|
52
|
+
appActions: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare function buildScopeConsentUrl(environmentBaseUrl: string, appId: string): string;
|
|
56
|
+
export declare function buildScopeConsentRequest(usages: ConnectionUsageInput[]): {
|
|
57
|
+
consents: Array<{
|
|
58
|
+
connectionId: string;
|
|
59
|
+
consentType: 'userConsent';
|
|
60
|
+
scopes: {
|
|
61
|
+
will: string[];
|
|
62
|
+
wont: string[];
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=connectionMetadata.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AppLaunchResult } from './PowerPlatformConnectionApi.js';
|
|
2
|
+
import type { RegisteredConnectionUsage } from './PowerPlatformConnectionApi.js';
|
|
3
|
+
import type { AppConnectionReference } from '../bridge/NativePowerAppsBridge.js';
|
|
4
|
+
import type { ConnectionRequirement } from './types.js';
|
|
5
|
+
export declare function isTransientConnectionConsentStatus(status: number): boolean;
|
|
6
|
+
export declare function shouldGrantConnectionUserConsent(requirement: Pick<ConnectionRequirement, 'sharedConnectionId'>, runningInDevPlayer: boolean): boolean;
|
|
7
|
+
export declare function getConnectionNamesRequiringAclGrant(connectionRefs: Record<string, AppConnectionReference>, connectionRequirements: ConnectionRequirement[]): string[];
|
|
8
|
+
export declare function invalidateFailedAclGrants(result: AppLaunchResult, failedConnectionNames: ReadonlySet<string>): void;
|
|
9
|
+
export declare function selectLaunchConnection(result: AppLaunchResult, localRefId: string, connectionId: string): boolean;
|
|
10
|
+
export declare function getUnregisteredConnectionRequirements(result: AppLaunchResult, usages?: RegisteredConnectionUsage[]): ConnectionRequirement[];
|
|
11
|
+
export declare function applyRegisteredConnectionSelections(result: AppLaunchResult, usages: RegisteredConnectionUsage[]): void;
|
|
12
|
+
export declare function hasRegisteredConnectionConsent(result: AppLaunchResult, usages?: RegisteredConnectionUsage[]): boolean;
|
|
13
|
+
export declare function applyRegisteredConnectionUsages(result: AppLaunchResult, usages: RegisteredConnectionUsage[]): void;
|
|
14
|
+
export declare function shouldPersistConnectionUsages(runningInDevPlayer: boolean, appId: string | undefined): boolean;
|
|
15
|
+
export declare function shouldShowConnectionReview(runningInDevPlayer: boolean, requiresConnectionConsent: boolean, hasResourceConsents: boolean): boolean;
|
|
16
|
+
//# sourceMappingURL=connectionState.d.ts.map
|
|
@@ -27,6 +27,7 @@ import type { NativeConnectionInstance, NativeConnectionResolution } from './typ
|
|
|
27
27
|
export declare function disambiguateConnections(connectionReferences: Record<string, {
|
|
28
28
|
id: string;
|
|
29
29
|
dataSources: string[];
|
|
30
|
+
sharedConnectionId?: string;
|
|
30
31
|
}>, allConnectionsByApiId: Record<string, NativeConnectionInstance[]>): NativeConnectionResolution[];
|
|
31
32
|
/**
|
|
32
33
|
* Extract the connection UUID from a raw connection name returned by the API.
|
|
@@ -36,8 +37,9 @@ export declare function disambiguateConnections(connectionReferences: Record<str
|
|
|
36
37
|
* "abc12345def6789012345678901234ab" (bare UUID, no dashes)
|
|
37
38
|
* "abc12345-def6-7890-1234-5678901234ab" (UUID with dashes)
|
|
38
39
|
*
|
|
39
|
-
* Returns the
|
|
40
|
-
*
|
|
40
|
+
* Returns the terminal resource name exactly as supplied by Power Platform.
|
|
41
|
+
* Some connectors require dashed GUIDs while others use compact IDs.
|
|
41
42
|
*/
|
|
42
43
|
export declare function extractConnectionId(rawName: string): string;
|
|
44
|
+
export declare function connectionIdsEqual(left: string, right: string): boolean;
|
|
43
45
|
//# sourceMappingURL=disambiguate.d.ts.map
|
|
@@ -5,19 +5,18 @@
|
|
|
5
5
|
* useConnectionRefs:
|
|
6
6
|
*
|
|
7
7
|
* • resolveViaStaticRefs — per-connector resolution using the static
|
|
8
|
-
* connectionReferences map from power.config.json.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* connections are excluded before the user is asked to pick.
|
|
8
|
+
* connectionReferences map from power.config.json. Used only by Dev Player
|
|
9
|
+
* for unpublished local apps. Handles pre-disambiguation ACL grants so
|
|
10
|
+
* inaccessible connections are excluded before the user is asked to pick.
|
|
12
11
|
*
|
|
13
|
-
* • applyAclGrants — post-resolution
|
|
12
|
+
* • applyAclGrants — post-resolution user consent used by the fast path
|
|
14
13
|
* (production APKs via fetchAppLaunchData).
|
|
15
14
|
*
|
|
16
15
|
* Both helpers return / consume the shared AppLaunchResult shape so the
|
|
17
16
|
* hook orchestrator can handle them uniformly.
|
|
18
17
|
*/
|
|
19
18
|
import type { AppLaunchResult } from './PowerPlatformConnectionApi.js';
|
|
20
|
-
import type { OnDisambiguationNeeded, OnMissingConnection } from '
|
|
19
|
+
import type { ConnectionReferenceConfig, ConnectionRequirement, OnDisambiguationNeeded, OnMissingConnection } from './types.js';
|
|
21
20
|
import type { AppConnectionReference } from '../bridge/NativePowerAppsBridge.js';
|
|
22
21
|
/**
|
|
23
22
|
* Connector schema entry generated by `generate-connector-schemas`.
|
|
@@ -28,6 +27,10 @@ export interface ConnectorSchema {
|
|
|
28
27
|
name: string;
|
|
29
28
|
properties: {
|
|
30
29
|
primaryRuntimeUrl: string;
|
|
30
|
+
scopes?: {
|
|
31
|
+
will?: string[];
|
|
32
|
+
wont?: string[];
|
|
33
|
+
};
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
export interface StaticRefsOptions {
|
|
@@ -35,19 +38,18 @@ export interface StaticRefsOptions {
|
|
|
35
38
|
* Static connectionReferences from power.config.json.
|
|
36
39
|
* Shape: { [refId]: { id: string; dataSources: string[] } }
|
|
37
40
|
*/
|
|
38
|
-
connectionReferences: Record<string,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}>;
|
|
41
|
+
connectionReferences: Record<string, ConnectionReferenceConfig>;
|
|
42
|
+
/** Whether power.config.json contains Dataverse database references. */
|
|
43
|
+
hasDataverse: boolean;
|
|
42
44
|
/** Connector schema map keyed by data source name. */
|
|
43
45
|
schemaMap: Record<string, ConnectorSchema>;
|
|
44
46
|
environmentId: string;
|
|
45
47
|
region: string;
|
|
46
|
-
/** Used for
|
|
48
|
+
/** Used for connection consent and the Dataverse instanceUrl fetch. */
|
|
47
49
|
acquireToken: (scopes: string[]) => Promise<string | null>;
|
|
48
50
|
/** Pre-acquired Power Platform API bearer token. */
|
|
49
51
|
token: string;
|
|
50
|
-
/** ISV client ID — when provided, runs pre-disambiguation
|
|
52
|
+
/** ISV client ID — when provided, runs pre-disambiguation user consent. */
|
|
51
53
|
isvClientId?: string;
|
|
52
54
|
onDisambiguationNeeded?: OnDisambiguationNeeded;
|
|
53
55
|
onMissingConnection?: OnMissingConnection;
|
|
@@ -59,7 +61,7 @@ export interface StaticRefsOptions {
|
|
|
59
61
|
* 1. Build an apiId → schema lookup.
|
|
60
62
|
* 2. In parallel: fetch the Dataverse instanceUrl and all connection instances
|
|
61
63
|
* for every connector.
|
|
62
|
-
* 3. If `isvClientId` is set, run pre-disambiguation
|
|
64
|
+
* 3. If `isvClientId` is set, run pre-disambiguation user consent — connections
|
|
63
65
|
* where the grant fails are marked `NeedsAclGrant` and excluded from
|
|
64
66
|
* resolution, prompting the user to create a new connection.
|
|
65
67
|
* 4. Disambiguate: resolve single matches, invoke callbacks for ambiguous /
|
|
@@ -67,20 +69,20 @@ export interface StaticRefsOptions {
|
|
|
67
69
|
* `true`.
|
|
68
70
|
* 5. Build and return an `AppLaunchResult`-shaped object.
|
|
69
71
|
*/
|
|
70
|
-
export declare function resolveViaStaticRefs({ connectionReferences, schemaMap, environmentId, region, acquireToken, token, isvClientId, onDisambiguationNeeded, onMissingConnection, }: StaticRefsOptions): Promise<AppLaunchResult>;
|
|
72
|
+
export declare function resolveViaStaticRefs({ connectionReferences, hasDataverse, schemaMap, environmentId, region, acquireToken, token, isvClientId, onDisambiguationNeeded, onMissingConnection, }: StaticRefsOptions): Promise<AppLaunchResult>;
|
|
71
73
|
/**
|
|
72
|
-
* Run idempotent post-resolution
|
|
74
|
+
* Run idempotent post-resolution delegated consent grants for the calling app.
|
|
73
75
|
*
|
|
74
76
|
* Used by the fast path (production APKs via `fetchAppLaunchData`) where the
|
|
75
|
-
* launch API has already resolved the user's connections
|
|
76
|
-
*
|
|
77
|
+
* launch API has already resolved the user's connections. Grants are applied
|
|
78
|
+
* only to user-selected connections; fixed shared connections are already
|
|
79
|
+
* authorized by their owner and must not receive delegated user consent.
|
|
77
80
|
*
|
|
78
81
|
* For the slow path the grants run before disambiguation inside
|
|
79
82
|
* `resolveViaStaticRefs`, where they can still influence which connections
|
|
80
83
|
* are considered available.
|
|
81
84
|
*
|
|
82
|
-
*
|
|
83
|
-
* when the connector is called.
|
|
85
|
+
* Returns the connection names whose ACL grants failed so callers can fail closed.
|
|
84
86
|
*/
|
|
85
|
-
export declare function applyAclGrants(connectionRefs: Record<string, AppConnectionReference>, environmentId: string,
|
|
87
|
+
export declare function applyAclGrants(connectionRefs: Record<string, AppConnectionReference>, connectionRequirements: ConnectionRequirement[], environmentId: string, region: string, acquireToken: (scopes: string[]) => Promise<string | null>): Promise<Set<string>>;
|
|
86
88
|
//# sourceMappingURL=resolveConnections.d.ts.map
|
|
@@ -17,18 +17,146 @@ export declare enum ConnectionStatus {
|
|
|
17
17
|
NeedsAclGrant = "NeedsAclGrant",
|
|
18
18
|
NotConnected = "NotConnected"
|
|
19
19
|
}
|
|
20
|
+
export interface ConnectionReferenceConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
dataSources: string[];
|
|
23
|
+
displayName?: string;
|
|
24
|
+
iconUri?: string;
|
|
25
|
+
appActions?: string[];
|
|
26
|
+
sharedConnectionId?: string;
|
|
27
|
+
gatewayObjectIdHint?: string;
|
|
28
|
+
authenticationType?: string;
|
|
29
|
+
parameterSetName?: string;
|
|
30
|
+
workflowDetails?: {
|
|
31
|
+
workflowEntityId?: string;
|
|
32
|
+
workflowDisplayName?: string;
|
|
33
|
+
workflowName?: string;
|
|
34
|
+
};
|
|
35
|
+
dataSets?: Record<string, unknown>;
|
|
36
|
+
dependencies?: Record<string, unknown>;
|
|
37
|
+
dependents?: string[];
|
|
38
|
+
nestedActions?: Array<{
|
|
39
|
+
actionName?: string;
|
|
40
|
+
apiName?: string;
|
|
41
|
+
flowConnectionRef?: string;
|
|
42
|
+
}>;
|
|
43
|
+
parameterHintsV2?: Record<string, {
|
|
44
|
+
value?: unknown;
|
|
45
|
+
}>;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
}
|
|
48
|
+
export interface ConnectionRequirement {
|
|
49
|
+
localRefId: string;
|
|
50
|
+
apiId: string;
|
|
51
|
+
connectorId: string;
|
|
52
|
+
dataSources: string[];
|
|
53
|
+
displayName?: string;
|
|
54
|
+
iconUri?: string;
|
|
55
|
+
appActions?: string[];
|
|
56
|
+
sharedConnectionId?: string;
|
|
57
|
+
gatewayObjectIdHint?: string;
|
|
58
|
+
authenticationType?: string;
|
|
59
|
+
parameterSetName?: string;
|
|
60
|
+
apiScopes: {
|
|
61
|
+
will: string[];
|
|
62
|
+
wont: string[];
|
|
63
|
+
};
|
|
64
|
+
isFlowDependent: boolean;
|
|
65
|
+
}
|
|
66
|
+
export type ConnectionParameterType = 'string' | 'securestring' | 'boolean' | 'integer' | 'clientcertificate';
|
|
67
|
+
export interface ConnectionParameterDefinition {
|
|
68
|
+
name: string;
|
|
69
|
+
displayName: string;
|
|
70
|
+
type: ConnectionParameterType;
|
|
71
|
+
required: boolean;
|
|
72
|
+
hidden: boolean;
|
|
73
|
+
capabilities?: string[];
|
|
74
|
+
allowedValues?: Array<{
|
|
75
|
+
value: string;
|
|
76
|
+
displayName: string;
|
|
77
|
+
}>;
|
|
78
|
+
defaultValue?: string | boolean | number;
|
|
79
|
+
}
|
|
80
|
+
export interface ConnectionParameterSet {
|
|
81
|
+
/** Undefined for a connector's single, non-parameter-set authentication definition. */
|
|
82
|
+
name?: string;
|
|
83
|
+
displayName: string;
|
|
84
|
+
parameters: ConnectionParameterDefinition[];
|
|
85
|
+
requiresApiConsent: boolean;
|
|
86
|
+
gatewayParameterName?: string;
|
|
87
|
+
}
|
|
88
|
+
export type ConnectionParameterValue = string | boolean | number | {
|
|
89
|
+
pfx: string;
|
|
90
|
+
password: string;
|
|
91
|
+
} | {
|
|
92
|
+
gatewayObjectId: string;
|
|
93
|
+
};
|
|
94
|
+
export interface ConnectionInput {
|
|
95
|
+
parameterSetName?: string;
|
|
96
|
+
gatewayObjectId?: string;
|
|
97
|
+
gatewayParameterName?: string;
|
|
98
|
+
parameters: Record<string, ConnectionParameterValue>;
|
|
99
|
+
}
|
|
100
|
+
export interface ConnectionConsentDetails {
|
|
101
|
+
localRefId: string;
|
|
102
|
+
connectorId: string;
|
|
103
|
+
displayName: string;
|
|
104
|
+
description: string;
|
|
105
|
+
appActions: string[];
|
|
106
|
+
}
|
|
107
|
+
export interface ResourceConsentRequirement {
|
|
108
|
+
resourceId: string;
|
|
109
|
+
displayName: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ConnectionUsageInput {
|
|
112
|
+
localRefId: string;
|
|
113
|
+
apiId: string;
|
|
114
|
+
connectionId: string;
|
|
115
|
+
dataSources: string[];
|
|
116
|
+
appActions: string[];
|
|
117
|
+
apiScopes: {
|
|
118
|
+
will: string[];
|
|
119
|
+
wont: string[];
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export declare function normalizeApiId(apiId: string): string;
|
|
123
|
+
export declare function getConnectorId(apiId: string): string;
|
|
124
|
+
export declare function getConnectionDatasetName(reference: {
|
|
125
|
+
dataSets?: Record<string, unknown>;
|
|
126
|
+
}): string;
|
|
127
|
+
export declare function getFlowConnectionName(reference: ConnectionReferenceConfig): string;
|
|
128
|
+
export declare function getFlowDataSourceNames(reference: ConnectionReferenceConfig): string[];
|
|
129
|
+
export declare function buildConnectionRequirements(connectionReferences: Record<string, ConnectionReferenceConfig>, scopesByApiId?: Record<string, {
|
|
130
|
+
will: string[];
|
|
131
|
+
wont: string[];
|
|
132
|
+
}>): ConnectionRequirement[];
|
|
133
|
+
export declare function isCompositeConnectionApiId(apiId: string): boolean;
|
|
134
|
+
export declare function findConnectionDataSourceConflicts(requirements: ConnectionRequirement[]): string[];
|
|
135
|
+
export declare function hasCompleteStaticConnectionConfig(connectionReferences: Record<string, ConnectionReferenceConfig>, schemaMap: Record<string, {
|
|
136
|
+
name: string;
|
|
137
|
+
properties: {
|
|
138
|
+
primaryRuntimeUrl: string;
|
|
139
|
+
};
|
|
140
|
+
}>): boolean;
|
|
141
|
+
export declare function buildConnectionResolutionKey(appId: string | undefined, environmentId: string, connectionReferences: Record<string, ConnectionReferenceConfig>): string;
|
|
20
142
|
/** A single connection instance returned by the Power Platform connectivity API. */
|
|
21
143
|
export interface NativeConnectionInstance {
|
|
22
|
-
/**
|
|
144
|
+
/** Terminal connection resource name exactly as returned by Power Platform. */
|
|
23
145
|
id: string;
|
|
24
146
|
/** Full resource name from the API (connector-prefixed, e.g. "shared_office365users/abc123"). */
|
|
25
147
|
name: string;
|
|
26
148
|
/** Connector API identifier (e.g. "/providers/Microsoft.PowerApps/apis/shared_office365users"). */
|
|
27
149
|
apiId: string;
|
|
150
|
+
/** Object ID of the connection owner when returned by the connectivity API. */
|
|
151
|
+
ownerId?: string;
|
|
28
152
|
/** Resolved authorization status of this connection. */
|
|
29
153
|
status: ConnectionStatus;
|
|
30
154
|
/** Optional human-readable display name from the API. */
|
|
31
155
|
displayName?: string;
|
|
156
|
+
accountName?: string;
|
|
157
|
+
parameterSetName?: string;
|
|
158
|
+
isAuthenticated?: boolean;
|
|
159
|
+
statusErrorCode?: string;
|
|
32
160
|
}
|
|
33
161
|
/**
|
|
34
162
|
* Result of attempting to match a single connection reference to an instance.
|