@microsoft/power-apps 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +153 -0
- package/README.md +63 -0
- package/lib/__tests__/connectorDataOperationExecutor.spec.d.ts +5 -0
- package/lib/__tests__/connectorDataOperationExecutor.spec.d.ts.map +1 -0
- package/lib/__tests__/connectorDataOperationExecutor.spec.js +509 -0
- package/lib/__tests__/connectorDataOperationExecutor.spec.js.map +1 -0
- package/lib/__tests__/dataverseDataOperationExecutor.spec.d.ts +5 -0
- package/lib/__tests__/dataverseDataOperationExecutor.spec.d.ts.map +1 -0
- package/lib/__tests__/dataverseDataOperationExecutor.spec.js +349 -0
- package/lib/__tests__/dataverseDataOperationExecutor.spec.js.map +1 -0
- package/lib/__tests__/helpers/testHelpers.d.ts +27 -0
- package/lib/__tests__/helpers/testHelpers.d.ts.map +1 -0
- package/lib/__tests__/helpers/testHelpers.js +67 -0
- package/lib/__tests__/helpers/testHelpers.js.map +1 -0
- package/lib/__tests__/index.spec.d.ts +5 -0
- package/lib/__tests__/index.spec.d.ts.map +1 -0
- package/lib/__tests__/index.spec.js +10 -0
- package/lib/__tests__/index.spec.js.map +1 -0
- package/lib/__tests__/mockDataOperationExecutor.spec.d.ts +5 -0
- package/lib/__tests__/mockDataOperationExecutor.spec.d.ts.map +1 -0
- package/lib/__tests__/mockDataOperationExecutor.spec.js +51 -0
- package/lib/__tests__/mockDataOperationExecutor.spec.js.map +1 -0
- package/lib/__tests__/mocks/mockDataverseRetrieveMultipleResponse.d.ts +17 -0
- package/lib/__tests__/mocks/mockDataverseRetrieveMultipleResponse.d.ts.map +1 -0
- package/lib/__tests__/mocks/mockDataverseRetrieveMultipleResponse.js +35 -0
- package/lib/__tests__/mocks/mockDataverseRetrieveMultipleResponse.js.map +1 -0
- package/lib/__tests__/mocks/mockLog.d.ts +31 -0
- package/lib/__tests__/mocks/mockLog.d.ts.map +1 -0
- package/lib/__tests__/mocks/mockLog.js +53 -0
- package/lib/__tests__/mocks/mockLog.js.map +1 -0
- package/lib/__tests__/mocks/mockTeamsConnectorResponse.d.ts +76 -0
- package/lib/__tests__/mocks/mockTeamsConnectorResponse.d.ts.map +1 -0
- package/lib/__tests__/mocks/mockTeamsConnectorResponse.js +81 -0
- package/lib/__tests__/mocks/mockTeamsConnectorResponse.js.map +1 -0
- package/lib/__tests__/mocks/silenceConsole.d.ts +37 -0
- package/lib/__tests__/mocks/silenceConsole.d.ts.map +1 -0
- package/lib/__tests__/mocks/silenceConsole.js +58 -0
- package/lib/__tests__/mocks/silenceConsole.js.map +1 -0
- package/lib/__tests__/powerDataRuntimeInstance.test.d.ts +5 -0
- package/lib/__tests__/powerDataRuntimeInstance.test.d.ts.map +1 -0
- package/lib/__tests__/powerDataRuntimeInstance.test.js +179 -0
- package/lib/__tests__/powerDataRuntimeInstance.test.js.map +1 -0
- package/lib/__tests__/powerDataSourcesInfoProvider.test.d.ts +5 -0
- package/lib/__tests__/powerDataSourcesInfoProvider.test.d.ts.map +1 -0
- package/lib/__tests__/powerDataSourcesInfoProvider.test.js +153 -0
- package/lib/__tests__/powerDataSourcesInfoProvider.test.js.map +1 -0
- package/lib/__tests__/runtimeClientProvider.test.d.ts +5 -0
- package/lib/__tests__/runtimeClientProvider.test.d.ts.map +1 -0
- package/lib/__tests__/runtimeClientProvider.test.js +248 -0
- package/lib/__tests__/runtimeClientProvider.test.js.map +1 -0
- package/lib/__tests__/runtimeDataClient.spec.d.ts +2 -0
- package/lib/__tests__/runtimeDataClient.spec.d.ts.map +1 -0
- package/lib/__tests__/runtimeDataClient.spec.js +351 -0
- package/lib/__tests__/runtimeDataClient.spec.js.map +1 -0
- package/lib/__tests__/runtimeDataClient.test.d.ts +2 -0
- package/lib/__tests__/runtimeDataClient.test.d.ts.map +1 -0
- package/lib/__tests__/runtimeDataClient.test.js +351 -0
- package/lib/__tests__/runtimeDataClient.test.js.map +1 -0
- package/lib/__tests__/runtimeDataOperation.test.d.ts +5 -0
- package/lib/__tests__/runtimeDataOperation.test.d.ts.map +1 -0
- package/lib/__tests__/runtimeDataOperation.test.js +234 -0
- package/lib/__tests__/runtimeDataOperation.test.js.map +1 -0
- package/lib/__tests__/runtimeMetadataClient.test.d.ts +5 -0
- package/lib/__tests__/runtimeMetadataClient.test.d.ts.map +1 -0
- package/lib/__tests__/runtimeMetadataClient.test.js +271 -0
- package/lib/__tests__/runtimeMetadataClient.test.js.map +1 -0
- package/lib/__tests__/runtimeMetadataOperations.test.d.ts +5 -0
- package/lib/__tests__/runtimeMetadataOperations.test.d.ts.map +1 -0
- package/lib/__tests__/runtimeMetadataOperations.test.js +286 -0
- package/lib/__tests__/runtimeMetadataOperations.test.js.map +1 -0
- package/lib/__tests__/serviceSchemaModelSnapshot.test.d.ts +2 -0
- package/lib/__tests__/serviceSchemaModelSnapshot.test.d.ts.map +1 -0
- package/lib/__tests__/serviceSchemaModelSnapshot.test.js +98 -0
- package/lib/__tests__/serviceSchemaModelSnapshot.test.js.map +1 -0
- package/lib/__tests__/types.spec.d.ts +5 -0
- package/lib/__tests__/types.spec.d.ts.map +1 -0
- package/lib/__tests__/types.spec.js +104 -0
- package/lib/__tests__/types.spec.js.map +1 -0
- package/lib/__tests__/utils.test.d.ts +5 -0
- package/lib/__tests__/utils.test.d.ts.map +1 -0
- package/lib/__tests__/utils.test.js +33 -0
- package/lib/__tests__/utils.test.js.map +1 -0
- package/lib/app/Lifecycle.d.ts +14 -0
- package/lib/app/Lifecycle.d.ts.map +1 -0
- package/lib/app/Lifecycle.js +37 -0
- package/lib/app/Lifecycle.js.map +1 -0
- package/lib/app/index.d.ts +5 -0
- package/lib/app/index.d.ts.map +1 -0
- package/lib/app/index.js +5 -0
- package/lib/app/index.js.map +1 -0
- package/lib/data/Data.types.d.ts +20 -0
- package/lib/data/Data.types.d.ts.map +1 -0
- package/lib/data/Data.types.js +5 -0
- package/lib/data/Data.types.js.map +1 -0
- package/lib/data/executors/index.d.ts +6 -0
- package/lib/data/executors/index.d.ts.map +1 -0
- package/lib/data/executors/index.js +5 -0
- package/lib/data/executors/index.js.map +1 -0
- package/lib/data/index.d.ts +7 -0
- package/lib/data/index.d.ts.map +1 -0
- package/lib/data/index.js +5 -0
- package/lib/data/index.js.map +1 -0
- package/lib/data/powerAppsData.d.ts +10 -0
- package/lib/data/powerAppsData.d.ts.map +1 -0
- package/lib/data/powerAppsData.js +43 -0
- package/lib/data/powerAppsData.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/communication/CompatibleMessageReceiver.d.ts +12 -0
- package/lib/internal/communication/CompatibleMessageReceiver.d.ts.map +1 -0
- package/lib/internal/communication/CompatibleMessageReceiver.js +92 -0
- package/lib/internal/communication/CompatibleMessageReceiver.js.map +1 -0
- package/lib/internal/communication/IncompatibleMessageReceiver.d.ts +10 -0
- package/lib/internal/communication/IncompatibleMessageReceiver.d.ts.map +1 -0
- package/lib/internal/communication/IncompatibleMessageReceiver.js +13 -0
- package/lib/internal/communication/IncompatibleMessageReceiver.js.map +1 -0
- package/lib/internal/communication/MessageReceiver.Types.d.ts +18 -0
- package/lib/internal/communication/MessageReceiver.Types.d.ts.map +1 -0
- package/lib/internal/communication/MessageReceiver.Types.js +5 -0
- package/lib/internal/communication/MessageReceiver.Types.js.map +1 -0
- package/lib/internal/communication/SendMessage.d.ts +11 -0
- package/lib/internal/communication/SendMessage.d.ts.map +1 -0
- package/lib/internal/communication/SendMessage.js +32 -0
- package/lib/internal/communication/SendMessage.js.map +1 -0
- package/lib/internal/communication/SendMessageOperation.d.ts +15 -0
- package/lib/internal/communication/SendMessageOperation.d.ts.map +1 -0
- package/lib/internal/communication/SendMessageOperation.js +18 -0
- package/lib/internal/communication/SendMessageOperation.js.map +1 -0
- package/lib/internal/data/ConnectionUtils.d.ts +5 -0
- package/lib/internal/data/ConnectionUtils.d.ts.map +1 -0
- package/lib/internal/data/ConnectionUtils.js +20 -0
- package/lib/internal/data/ConnectionUtils.js.map +1 -0
- package/lib/internal/data/OperationExecutor.d.ts +18 -0
- package/lib/internal/data/OperationExecutor.d.ts.map +1 -0
- package/lib/internal/data/OperationExecutor.js +35 -0
- package/lib/internal/data/OperationExecutor.js.map +1 -0
- package/lib/internal/data/core/api/createRecord.d.ts +13 -0
- package/lib/internal/data/core/api/createRecord.d.ts.map +1 -0
- package/lib/internal/data/core/api/createRecord.js +15 -0
- package/lib/internal/data/core/api/createRecord.js.map +1 -0
- package/lib/internal/data/core/api/deleteRecord.d.ts +13 -0
- package/lib/internal/data/core/api/deleteRecord.d.ts.map +1 -0
- package/lib/internal/data/core/api/deleteRecord.js +15 -0
- package/lib/internal/data/core/api/deleteRecord.js.map +1 -0
- package/lib/internal/data/core/api/execute.d.ts +11 -0
- package/lib/internal/data/core/api/execute.d.ts.map +1 -0
- package/lib/internal/data/core/api/execute.js +13 -0
- package/lib/internal/data/core/api/execute.js.map +1 -0
- package/lib/internal/data/core/api/retrieveMultipleRecords.d.ts +13 -0
- package/lib/internal/data/core/api/retrieveMultipleRecords.d.ts.map +1 -0
- package/lib/internal/data/core/api/retrieveMultipleRecords.js +15 -0
- package/lib/internal/data/core/api/retrieveMultipleRecords.js.map +1 -0
- package/lib/internal/data/core/api/retrieveRecord.d.ts +13 -0
- package/lib/internal/data/core/api/retrieveRecord.d.ts.map +1 -0
- package/lib/internal/data/core/api/retrieveRecord.js +15 -0
- package/lib/internal/data/core/api/retrieveRecord.js.map +1 -0
- package/lib/internal/data/core/api/updateRecord.d.ts +14 -0
- package/lib/internal/data/core/api/updateRecord.d.ts.map +1 -0
- package/lib/internal/data/core/api/updateRecord.js +16 -0
- package/lib/internal/data/core/api/updateRecord.js.map +1 -0
- package/lib/internal/data/core/common/types.d.ts +230 -0
- package/lib/internal/data/core/common/types.d.ts.map +1 -0
- package/lib/internal/data/core/common/types.js +25 -0
- package/lib/internal/data/core/common/types.js.map +1 -0
- package/lib/internal/data/core/common/utils.d.ts +19 -0
- package/lib/internal/data/core/common/utils.d.ts.map +1 -0
- package/lib/internal/data/core/common/utils.js +47 -0
- package/lib/internal/data/core/common/utils.js.map +1 -0
- package/lib/internal/data/core/data/defaultOperationOrchestrator.d.ts +93 -0
- package/lib/internal/data/core/data/defaultOperationOrchestrator.d.ts.map +1 -0
- package/lib/internal/data/core/data/defaultOperationOrchestrator.js +249 -0
- package/lib/internal/data/core/data/defaultOperationOrchestrator.js.map +1 -0
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.d.ts +160 -0
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.d.ts.map +1 -0
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.js +500 -0
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.js.map +1 -0
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.d.ts +164 -0
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.d.ts.map +1 -0
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.js +508 -0
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.js.map +1 -0
- package/lib/internal/data/core/data/executors/index.d.ts +5 -0
- package/lib/internal/data/core/data/executors/index.d.ts.map +1 -0
- package/lib/internal/data/core/data/executors/index.js +5 -0
- package/lib/internal/data/core/data/executors/index.js.map +1 -0
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.d.ts +21 -0
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.d.ts.map +1 -0
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.js +75 -0
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.js.map +1 -0
- package/lib/internal/data/core/error/codes.d.ts +31 -0
- package/lib/internal/data/core/error/codes.d.ts.map +1 -0
- package/lib/internal/data/core/error/codes.js +39 -0
- package/lib/internal/data/core/error/codes.js.map +1 -0
- package/lib/internal/data/core/error/constants.d.ts +30 -0
- package/lib/internal/data/core/error/constants.d.ts.map +1 -0
- package/lib/internal/data/core/error/constants.js +33 -0
- package/lib/internal/data/core/error/constants.js.map +1 -0
- package/lib/internal/data/core/error/error.d.ts +8 -0
- package/lib/internal/data/core/error/error.d.ts.map +1 -0
- package/lib/internal/data/core/error/error.js +8 -0
- package/lib/internal/data/core/error/error.js.map +1 -0
- package/lib/internal/data/core/error/messages.d.ts +24 -0
- package/lib/internal/data/core/error/messages.d.ts.map +1 -0
- package/lib/internal/data/core/error/messages.js +55 -0
- package/lib/internal/data/core/error/messages.js.map +1 -0
- package/lib/internal/data/core/error/types.d.ts +30 -0
- package/lib/internal/data/core/error/types.d.ts.map +1 -0
- package/lib/internal/data/core/error/types.js +28 -0
- package/lib/internal/data/core/error/types.js.map +1 -0
- package/lib/internal/data/core/error/util.d.ts +24 -0
- package/lib/internal/data/core/error/util.d.ts.map +1 -0
- package/lib/internal/data/core/error/util.js +71 -0
- package/lib/internal/data/core/error/util.js.map +1 -0
- package/lib/internal/data/core/metadata/runtimeDataSourceService.d.ts +65 -0
- package/lib/internal/data/core/metadata/runtimeDataSourceService.d.ts.map +1 -0
- package/lib/internal/data/core/metadata/runtimeDataSourceService.js +101 -0
- package/lib/internal/data/core/metadata/runtimeDataSourceService.js.map +1 -0
- package/lib/internal/data/core/metadata/runtimeMetadataOperations.d.ts +17 -0
- package/lib/internal/data/core/metadata/runtimeMetadataOperations.d.ts.map +1 -0
- package/lib/internal/data/core/metadata/runtimeMetadataOperations.js +34 -0
- package/lib/internal/data/core/metadata/runtimeMetadataOperations.js.map +1 -0
- package/lib/internal/data/core/runtime/getRuntimeContext.d.ts +11 -0
- package/lib/internal/data/core/runtime/getRuntimeContext.d.ts.map +1 -0
- package/lib/internal/data/core/runtime/getRuntimeContext.js +16 -0
- package/lib/internal/data/core/runtime/getRuntimeContext.js.map +1 -0
- package/lib/internal/data/core/runtime/initializeRuntime.d.ts +13 -0
- package/lib/internal/data/core/runtime/initializeRuntime.d.ts.map +1 -0
- package/lib/internal/data/core/runtime/initializeRuntime.js +38 -0
- package/lib/internal/data/core/runtime/initializeRuntime.js.map +1 -0
- package/lib/internal/data/core/runtime/powerDataRuntime.d.ts +68 -0
- package/lib/internal/data/core/runtime/powerDataRuntime.d.ts.map +1 -0
- package/lib/internal/data/core/runtime/powerDataRuntime.js +116 -0
- package/lib/internal/data/core/runtime/powerDataRuntime.js.map +1 -0
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.d.ts +20 -0
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.d.ts.map +1 -0
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.js +36 -0
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.js.map +1 -0
- package/lib/internal/data/core/runtime/powerDataSourcesInfoProvider.d.ts +34 -0
- package/lib/internal/data/core/runtime/powerDataSourcesInfoProvider.d.ts.map +1 -0
- package/lib/internal/data/core/runtime/powerDataSourcesInfoProvider.js +45 -0
- package/lib/internal/data/core/runtime/powerDataSourcesInfoProvider.js.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeClientProvider.d.ts +43 -0
- package/lib/internal/data/core/runtimeClient/runtimeClientProvider.d.ts.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeClientProvider.js +87 -0
- package/lib/internal/data/core/runtimeClient/runtimeClientProvider.js.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeDataClient.d.ts +112 -0
- package/lib/internal/data/core/runtimeClient/runtimeDataClient.d.ts.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeDataClient.js +457 -0
- package/lib/internal/data/core/runtimeClient/runtimeDataClient.js.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeMetadataClient.d.ts +40 -0
- package/lib/internal/data/core/runtimeClient/runtimeMetadataClient.d.ts.map +1 -0
- package/lib/internal/data/core/runtimeClient/runtimeMetadataClient.js +94 -0
- package/lib/internal/data/core/runtimeClient/runtimeMetadataClient.js.map +1 -0
- package/lib/internal/data/core/telemetry/log.d.ts +20 -0
- package/lib/internal/data/core/telemetry/log.d.ts.map +1 -0
- package/lib/internal/data/core/telemetry/log.js +85 -0
- package/lib/internal/data/core/telemetry/log.js.map +1 -0
- package/lib/internal/data/core/types/index.d.ts +164 -0
- package/lib/internal/data/core/types/index.d.ts.map +1 -0
- package/lib/internal/data/core/types/index.js +7 -0
- package/lib/internal/data/core/types/index.js.map +1 -0
- package/lib/internal/plugin/PluginCommon.d.ts +16 -0
- package/lib/internal/plugin/PluginCommon.d.ts.map +1 -0
- package/lib/internal/plugin/PluginCommon.js +116 -0
- package/lib/internal/plugin/PluginCommon.js.map +1 -0
- package/lib/internal/plugin/PluginMobile.d.ts +13 -0
- package/lib/internal/plugin/PluginMobile.d.ts.map +1 -0
- package/lib/internal/plugin/PluginMobile.js +109 -0
- package/lib/internal/plugin/PluginMobile.js.map +1 -0
- package/lib/telemetry/Logger.types.d.ts +8 -0
- package/lib/telemetry/Logger.types.d.ts.map +1 -0
- package/lib/telemetry/Logger.types.js +5 -0
- package/lib/telemetry/Logger.types.js.map +1 -0
- package/lib/telemetry/LoggerManager.d.ts +6 -0
- package/lib/telemetry/LoggerManager.d.ts.map +1 -0
- package/lib/telemetry/LoggerManager.js +28 -0
- package/lib/telemetry/LoggerManager.js.map +1 -0
- package/lib/telemetry/Metrics.types.d.ts +53 -0
- package/lib/telemetry/Metrics.types.d.ts.map +1 -0
- package/lib/telemetry/Metrics.types.js +5 -0
- package/lib/telemetry/Metrics.types.js.map +1 -0
- package/lib/telemetry/Performance.d.ts +5 -0
- package/lib/telemetry/Performance.d.ts.map +1 -0
- package/lib/telemetry/Performance.js +47 -0
- package/lib/telemetry/Performance.js.map +1 -0
- package/lib/telemetry/index.d.ts +5 -0
- package/lib/telemetry/index.d.ts.map +1 -0
- package/lib/telemetry/index.js +5 -0
- package/lib/telemetry/index.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { executePluginAsync } from '../plugin/PluginCommon';
|
|
5
|
+
import { SendMessageOperation } from './SendMessageOperation';
|
|
6
|
+
export class CompatibleMessageReceiver {
|
|
7
|
+
_receiverName;
|
|
8
|
+
versionInfo;
|
|
9
|
+
isCompatible = true;
|
|
10
|
+
constructor(_receiverName, versionInfo) {
|
|
11
|
+
this._receiverName = _receiverName;
|
|
12
|
+
this.versionInfo = versionInfo;
|
|
13
|
+
}
|
|
14
|
+
async sendMessage(message, onMessageReceived) {
|
|
15
|
+
let resolveOperationPromise;
|
|
16
|
+
let rejectOperationPromise;
|
|
17
|
+
const operationPromise = new Promise((resolve, reject) => {
|
|
18
|
+
resolveOperationPromise = resolve;
|
|
19
|
+
rejectOperationPromise = reject;
|
|
20
|
+
});
|
|
21
|
+
const correlationId = crypto.randomUUID();
|
|
22
|
+
const handleMessage = (compatibleReceiverMessage) => {
|
|
23
|
+
try {
|
|
24
|
+
// Ignore any update after the operation has completed, caller cannot receive additional results.
|
|
25
|
+
if (sendMessageOperation.completed) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (compatibleReceiverMessage) {
|
|
29
|
+
// If the message is an intermediate update then call the message handler, otherwise complete the operation.
|
|
30
|
+
if (compatibleReceiverMessage.isUpdate) {
|
|
31
|
+
if (sendMessageOperation.onMessageReceived) {
|
|
32
|
+
try {
|
|
33
|
+
sendMessageOperation.onMessageReceived(compatibleReceiverMessage.message);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
sendMessageOperation.completed = true;
|
|
37
|
+
rejectOperationPromise(error);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
sendMessageOperation.completed = true;
|
|
42
|
+
rejectOperationPromise(new Error(`Native receiver expected a message handler, but no handler was supplied. Message: ${compatibleReceiverMessage.message}`));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// The callback is the final result, pass it back to the initial caller.
|
|
47
|
+
sendMessageOperation.completed = true;
|
|
48
|
+
resolveOperationPromise(compatibleReceiverMessage.message);
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// The response isn't parsable, continue to promise completion.
|
|
55
|
+
}
|
|
56
|
+
// The callback is the final result, pass it back to the initial caller
|
|
57
|
+
sendMessageOperation.completed = true;
|
|
58
|
+
resolveOperationPromise(compatibleReceiverMessage.message);
|
|
59
|
+
};
|
|
60
|
+
// Error handler to catch any errors during native execution.
|
|
61
|
+
// When receiving an error forward it to the caller.
|
|
62
|
+
const handleError = (error) => {
|
|
63
|
+
sendMessageOperation.completed = true;
|
|
64
|
+
rejectOperationPromise(error);
|
|
65
|
+
};
|
|
66
|
+
// Create function for sending intermediate updates from the calling context.
|
|
67
|
+
const sendUpdate = (updateMessage) => {
|
|
68
|
+
if (sendMessageOperation.completed) {
|
|
69
|
+
throw new Error('Tried to send update for completed operation.');
|
|
70
|
+
}
|
|
71
|
+
// Call executePluginAsync, but do not register for results. Any results will be sent back to the original handlers.
|
|
72
|
+
executePluginAsync('SendMessagePlugin', 'sendMessage', [
|
|
73
|
+
this._receiverName,
|
|
74
|
+
updateMessage,
|
|
75
|
+
correlationId,
|
|
76
|
+
]);
|
|
77
|
+
};
|
|
78
|
+
// Call executePluginAsync to send the native message to react-native, and begin the request.
|
|
79
|
+
const sendMessageOperation = new SendMessageOperation(operationPromise, sendUpdate);
|
|
80
|
+
sendMessageOperation.onMessageReceived = onMessageReceived;
|
|
81
|
+
try {
|
|
82
|
+
const sendMessageResponse = await executePluginAsync('SendMessagePlugin', 'sendMessage', [this._receiverName, message, correlationId]);
|
|
83
|
+
handleMessage(sendMessageResponse);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
handleError(error);
|
|
87
|
+
}
|
|
88
|
+
// Synchronously return the operation to the caller.
|
|
89
|
+
return sendMessageOperation;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=CompatibleMessageReceiver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompatibleMessageReceiver.js","sourceRoot":"","sources":["../../../src/internal/communication/CompatibleMessageReceiver.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,MAAM,OAAO,yBAAyB;IAGT;IAA8B;IAFzC,YAAY,GAAG,IAAI,CAAC;IAEpC,YAA2B,aAAqB,EAAS,WAA+B;QAA7D,kBAAa,GAAb,aAAa,CAAQ;QAAS,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAErF,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,iBAA0D;QAClG,IAAI,uBAAkD,CAAC;QACvD,IAAI,sBAA8C,CAAC;QAEnD,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/D,uBAAuB,GAAG,OAAO,CAAC;YAClC,sBAAsB,GAAG,MAAM,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAE1C,MAAM,aAAa,GAAG,CAAC,yBAAoD,EAAE,EAAE;YAC7E,IAAI;gBACF,iGAAiG;gBACjG,IAAI,oBAAoB,CAAC,SAAS,EAAE;oBAClC,OAAO;iBACR;gBAED,IAAI,yBAAyB,EAAE;oBAC7B,4GAA4G;oBAC5G,IAAI,yBAAyB,CAAC,QAAQ,EAAE;wBACtC,IAAI,oBAAoB,CAAC,iBAAiB,EAAE;4BAC1C,IAAI;gCACF,oBAAoB,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;6BAC3E;4BAAC,OAAO,KAAK,EAAE;gCACd,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC;gCACtC,sBAAsB,CAAC,KAAc,CAAC,CAAC;6BACxC;yBACF;6BAAM;4BACL,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC;4BACtC,sBAAsB,CACpB,IAAI,KAAK,CACP,qFAAqF,yBAAyB,CAAC,OAAO,EAAE,CACzH,CACF,CAAC;yBACH;qBACF;yBAAM;wBACL,wEAAwE;wBACxE,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC;wBACtC,uBAAuB,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;qBAC5D;oBACD,OAAO;iBACR;aACF;YAAC,MAAM;gBACN,+DAA+D;aAChE;YACD,uEAAuE;YACvE,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC;YACtC,uBAAuB,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC,CAAC;QACF,6DAA6D;QAC7D,oDAAoD;QACpD,MAAM,WAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YACnC,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC;YACtC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC;QACF,6EAA6E;QAC7E,MAAM,UAAU,GAAG,CAAC,aAAqB,EAAE,EAAE;YAC3C,IAAI,oBAAoB,CAAC,SAAS,EAAE;gBAClC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;aAClE;YAED,qHAAqH;YACrH,kBAAkB,CAAC,mBAAmB,EAAE,aAAa,EAAE;gBACrD,IAAI,CAAC,aAAa;gBAClB,aAAa;gBACb,aAAa;aACd,CAAC,CAAC;QACL,CAAC,CAAC;QACF,6FAA6F;QAC7F,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;QACpF,oBAAoB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3D,IAAI;YACF,MAAM,mBAAmB,GAA8B,MAAM,kBAAkB,CAC7E,mBAAmB,EACnB,aAAa,EACb,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,aAAa,CAAC,CAC7C,CAAC;YACF,aAAa,CAAC,mBAAmB,CAAC,CAAC;SACpC;QAAC,OAAO,KAAK,EAAE;YACd,WAAW,CAAC,KAAc,CAAC,CAAC;SAC7B;QACD,oDAAoD;QACpD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
export declare class IncompatibleMessageReceiver {
|
|
5
|
+
versionInfo: string | undefined;
|
|
6
|
+
incompatibilityDescription: string;
|
|
7
|
+
readonly isCompatible = false;
|
|
8
|
+
constructor(versionInfo: string | undefined, incompatibilityDescription: string);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=IncompatibleMessageReceiver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IncompatibleMessageReceiver.d.ts","sourceRoot":"","sources":["../../../src/internal/communication/IncompatibleMessageReceiver.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,2BAA2B;IAGZ,WAAW,EAAE,MAAM,GAAG,SAAS;IAAS,0BAA0B,EAAE,MAAM;IAFpG,SAAgB,YAAY,SAAS;gBAEX,WAAW,EAAE,MAAM,GAAG,SAAS,EAAS,0BAA0B,EAAE,MAAM;CACrG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
export class IncompatibleMessageReceiver {
|
|
5
|
+
versionInfo;
|
|
6
|
+
incompatibilityDescription;
|
|
7
|
+
isCompatible = false;
|
|
8
|
+
constructor(versionInfo, incompatibilityDescription) {
|
|
9
|
+
this.versionInfo = versionInfo;
|
|
10
|
+
this.incompatibilityDescription = incompatibilityDescription;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=IncompatibleMessageReceiver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IncompatibleMessageReceiver.js","sourceRoot":"","sources":["../../../src/internal/communication/IncompatibleMessageReceiver.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IAGZ;IAAwC;IAFlD,YAAY,GAAG,KAAK,CAAC;IAErC,YAA0B,WAA+B,EAAS,0BAAkC;QAA1E,gBAAW,GAAX,WAAW,CAAoB;QAAS,+BAA0B,GAA1B,0BAA0B,CAAQ;IAAG,CAAC;CACzG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { IncompatibleMessageReceiver } from './IncompatibleMessageReceiver';
|
|
5
|
+
import { CompatibleMessageReceiver } from './CompatibleMessageReceiver';
|
|
6
|
+
export type MessageReceiver = CompatibleMessageReceiver | IncompatibleMessageReceiver;
|
|
7
|
+
export type CompatibilityCheckerResult = {
|
|
8
|
+
isCompatible: boolean;
|
|
9
|
+
incompatibilityDescription?: string;
|
|
10
|
+
};
|
|
11
|
+
export interface SendMessagePlugin {
|
|
12
|
+
getMessageReceiverAsync(receiverName: string, isCompatibleChecker: (versionInfo: string) => CompatibilityCheckerResult): Promise<MessageReceiver>;
|
|
13
|
+
}
|
|
14
|
+
export type CompatibleReceiverMessage = {
|
|
15
|
+
isUpdate: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MessageReceiver.Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageReceiver.Types.d.ts","sourceRoot":"","sources":["../../../src/internal/communication/MessageReceiver.Types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,2BAA2B,CAAC;AAEtF,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,uBAAuB,CACrB,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,0BAA0B,GACvE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageReceiver.Types.js","sourceRoot":"","sources":["../../../src/internal/communication/MessageReceiver.Types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { CompatibilityCheckerResult, MessageReceiver, SendMessagePlugin } from './MessageReceiver.Types';
|
|
5
|
+
export declare class SendMessage implements SendMessagePlugin {
|
|
6
|
+
static createInstanceAsync(): Promise<SendMessagePlugin>;
|
|
7
|
+
constructor();
|
|
8
|
+
getMessageReceiverAsync(receiverName: string, isCompatibleChecker: (versionInfo: string) => CompatibilityCheckerResult): Promise<MessageReceiver>;
|
|
9
|
+
private _getVersionInfo;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=SendMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendMessage.d.ts","sourceRoot":"","sources":["../../../src/internal/communication/SendMessage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,0BAA0B,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI9G,qBAAa,WAAY,YAAW,iBAAiB;WACrC,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,CAAC;;IAMlD,uBAAuB,CAClC,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,0BAA0B,GACvE,OAAO,CAAC,eAAe,CAAC;YAiBb,eAAe;CAI9B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { executePluginAsync } from '../plugin/PluginCommon';
|
|
5
|
+
import { IncompatibleMessageReceiver } from './IncompatibleMessageReceiver';
|
|
6
|
+
import { CompatibleMessageReceiver } from './CompatibleMessageReceiver';
|
|
7
|
+
export class SendMessage {
|
|
8
|
+
static createInstanceAsync() {
|
|
9
|
+
return Promise.resolve(new SendMessage());
|
|
10
|
+
}
|
|
11
|
+
constructor() { }
|
|
12
|
+
async getMessageReceiverAsync(receiverName, isCompatibleChecker) {
|
|
13
|
+
const versionInfo = await this._getVersionInfo(receiverName);
|
|
14
|
+
if (versionInfo) {
|
|
15
|
+
const compatibilityCheckerResult = isCompatibleChecker(versionInfo);
|
|
16
|
+
if (compatibilityCheckerResult.isCompatible === false) {
|
|
17
|
+
return new IncompatibleMessageReceiver(versionInfo, compatibilityCheckerResult.incompatibilityDescription || '');
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return new CompatibleMessageReceiver(receiverName, versionInfo);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return new IncompatibleMessageReceiver(undefined, `No receiver ${receiverName} registered.`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async _getVersionInfo(receiverName) {
|
|
28
|
+
const result = await executePluginAsync('SendMessagePlugin', 'getVersionInfo', [receiverName]);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=SendMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendMessage.js","sourceRoot":"","sources":["../../../src/internal/communication/SendMessage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,OAAO,WAAW;IACf,MAAM,CAAC,mBAAmB;QAC/B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAe,CAAC;IAET,KAAK,CAAC,uBAAuB,CAClC,YAAoB,EACpB,mBAAwE;QAExE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAC7D,IAAI,WAAW,EAAE;YACf,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;YACpE,IAAI,0BAA0B,CAAC,YAAY,KAAK,KAAK,EAAE;gBACrD,OAAO,IAAI,2BAA2B,CACpC,WAAW,EACX,0BAA0B,CAAC,0BAA0B,IAAI,EAAE,CAC5D,CAAC;aACH;iBAAM;gBACL,OAAO,IAAI,yBAAyB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;aACjE;SACF;aAAM;YACL,OAAO,IAAI,2BAA2B,CAAC,SAAS,EAAE,eAAe,YAAY,cAAc,CAAC,CAAC;SAC9F;IACH,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,YAAoB;QAChD,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;QAC/F,OAAO,MAAgB,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
export declare class SendMessageOperation {
|
|
5
|
+
resultPromise: Promise<string>;
|
|
6
|
+
sendUpdate: (update: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* When completed is false onMessageReceived and sendUpdate will be visible.
|
|
9
|
+
* When completed is true then these are hidden.
|
|
10
|
+
*/
|
|
11
|
+
completed: boolean;
|
|
12
|
+
onMessageReceived: ((message: string) => void) | undefined;
|
|
13
|
+
constructor(resultPromise: Promise<string>, sendUpdate: (update: string) => void);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SendMessageOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendMessageOperation.d.ts","sourceRoot":"","sources":["../../../src/internal/communication/SendMessageOperation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAa,oBAAoB;IAOL,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC;IAAS,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IANrG;;;OAGG;IACI,SAAS,UAAS;IAClB,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAa;gBACpD,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,EAAS,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;CACtG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
export class SendMessageOperation {
|
|
5
|
+
resultPromise;
|
|
6
|
+
sendUpdate;
|
|
7
|
+
/**
|
|
8
|
+
* When completed is false onMessageReceived and sendUpdate will be visible.
|
|
9
|
+
* When completed is true then these are hidden.
|
|
10
|
+
*/
|
|
11
|
+
completed = false;
|
|
12
|
+
onMessageReceived = undefined;
|
|
13
|
+
constructor(resultPromise, sendUpdate) {
|
|
14
|
+
this.resultPromise = resultPromise;
|
|
15
|
+
this.sendUpdate = sendUpdate;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=SendMessageOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendMessageOperation.js","sourceRoot":"","sources":["../../../src/internal/communication/SendMessageOperation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,OAAO,oBAAoB;IAOL;IAAuC;IANjE;;;OAGG;IACI,SAAS,GAAG,KAAK,CAAC;IAClB,iBAAiB,GAA4C,SAAS,CAAC;IAC9E,YAA0B,aAA8B,EAAS,UAAoC;QAA3E,kBAAa,GAAb,aAAa,CAAiB;QAAS,eAAU,GAAV,UAAU,CAA0B;IAAG,CAAC;CAC1G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionUtils.d.ts","sourceRoot":"","sources":["../../../src/internal/data/ConnectionUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAQrD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { executePluginAsync } from '../plugin/PluginCommon';
|
|
5
|
+
let connectionsLoaded = false;
|
|
6
|
+
export async function loadConnections() {
|
|
7
|
+
if (connectionsLoaded) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
connectionsLoaded = true;
|
|
11
|
+
await loadNonCompositeConnectionsAsync();
|
|
12
|
+
await resolveCompositeConnectionsAsync();
|
|
13
|
+
}
|
|
14
|
+
async function loadNonCompositeConnectionsAsync() {
|
|
15
|
+
return executePluginAsync('AppPowerAppsClientPlugin', 'loadNonCompositeConnectionsAsync', []);
|
|
16
|
+
}
|
|
17
|
+
async function resolveCompositeConnectionsAsync() {
|
|
18
|
+
return executePluginAsync('AppPowerAppsClientPlugin', 'resolveCompositeConnectionsAsync', []);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ConnectionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionUtils.js","sourceRoot":"","sources":["../../../src/internal/data/ConnectionUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAE9B,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,iBAAiB,EAAE;QACrB,OAAO;KACR;IAED,iBAAiB,GAAG,IAAI,CAAC;IACzB,MAAM,gCAAgC,EAAE,CAAC;IACzC,MAAM,gCAAgC,EAAE,CAAC;AAC3C,CAAC;AAED,KAAK,UAAU,gCAAgC;IAC7C,OAAO,kBAAkB,CAAC,0BAA0B,EAAE,kCAAkC,EAAE,EAAE,CAAC,CAAC;AAChG,CAAC;AAED,KAAK,UAAU,gCAAgC;IAC7C,OAAO,kBAAkB,CAAC,0BAA0B,EAAE,kCAAkC,EAAE,EAAE,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { IOperationResult } from './core/types';
|
|
5
|
+
/**
|
|
6
|
+
* Executes operations using the plugin.
|
|
7
|
+
*/
|
|
8
|
+
export declare class OperationExecutor {
|
|
9
|
+
/**
|
|
10
|
+
* Executes an operation using the plugin.
|
|
11
|
+
* @param operationName The name of the operation.
|
|
12
|
+
* @param action The action to perform.
|
|
13
|
+
* @param params The parameters for the operation.
|
|
14
|
+
* @returns A promise resolving to the operation result.
|
|
15
|
+
*/
|
|
16
|
+
execute<T = string>(operationName: string, action: string, params: unknown[]): Promise<IOperationResult<T>>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=OperationExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationExecutor.d.ts","sourceRoot":"","sources":["../../../src/internal/data/OperationExecutor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B;;;;;;OAMG;IACU,OAAO,CAAC,CAAC,GAAG,MAAM,EAC7B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EAAE,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAiBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { executePluginAsync } from '../plugin/PluginCommon';
|
|
5
|
+
import { loadConnections } from './ConnectionUtils';
|
|
6
|
+
let loadConnectionsPromise;
|
|
7
|
+
/**
|
|
8
|
+
* Executes operations using the plugin.
|
|
9
|
+
*/
|
|
10
|
+
export class OperationExecutor {
|
|
11
|
+
/**
|
|
12
|
+
* Executes an operation using the plugin.
|
|
13
|
+
* @param operationName The name of the operation.
|
|
14
|
+
* @param action The action to perform.
|
|
15
|
+
* @param params The parameters for the operation.
|
|
16
|
+
* @returns A promise resolving to the operation result.
|
|
17
|
+
*/
|
|
18
|
+
async execute(operationName, action, params) {
|
|
19
|
+
try {
|
|
20
|
+
if (!loadConnectionsPromise) {
|
|
21
|
+
loadConnectionsPromise = loadConnections();
|
|
22
|
+
}
|
|
23
|
+
await loadConnectionsPromise;
|
|
24
|
+
const result = await executePluginAsync(operationName, action, params);
|
|
25
|
+
return {
|
|
26
|
+
success: true,
|
|
27
|
+
data: result,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=OperationExecutor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationExecutor.js","sourceRoot":"","sources":["../../../src/internal/data/OperationExecutor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,IAAI,sBAAiD,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAC5B;;;;;;OAMG;IACI,KAAK,CAAC,OAAO,CAClB,aAAqB,EACrB,MAAc,EACd,MAAiB;QAEjB,IAAI;YACF,IAAI,CAAC,sBAAsB,EAAE;gBAC3B,sBAAsB,GAAG,eAAe,EAAE,CAAC;aAC5C;YAED,MAAM,sBAAsB,CAAC;YAE7B,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAI,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YAC1E,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,MAAM;aACb,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new record in the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param record - The record to create.
|
|
10
|
+
* @returns A promise that resolves to the created record.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createRecordAsync<TInput, TResult>(dataSourcesInfo: DataSourcesInfo, tableName: string, record: TInput): Promise<IOperationResult<TResult>>;
|
|
13
|
+
//# sourceMappingURL=createRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRecord.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/createRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElE;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EACrD,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAKpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new record in the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param record - The record to create.
|
|
10
|
+
* @returns A promise that resolves to the created record.
|
|
11
|
+
*/
|
|
12
|
+
export async function createRecordAsync(dataSourcesInfo, tableName, record) {
|
|
13
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.createRecordAsync(tableName, record);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=createRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRecord.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/createRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,eAAgC,EAChC,SAAiB,EACjB,MAAc;IAEd,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,iBAAiB,CACtE,SAAS,EACT,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Deletes a record from the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to delete the record from.
|
|
9
|
+
* @param recordId - The ID of the record to delete.
|
|
10
|
+
* @returns A promise that resolves to the result of the delete operation.
|
|
11
|
+
*/
|
|
12
|
+
export declare function deleteRecordAsync(dataSourcesInfo: DataSourcesInfo, tableName: string, recordId: string): Promise<IOperationResult<void>>;
|
|
13
|
+
//# sourceMappingURL=deleteRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteRecord.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/deleteRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElE;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAEjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Deletes a record from the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to delete the record from.
|
|
9
|
+
* @param recordId - The ID of the record to delete.
|
|
10
|
+
* @returns A promise that resolves to the result of the delete operation.
|
|
11
|
+
*/
|
|
12
|
+
export async function deleteRecordAsync(dataSourcesInfo, tableName, recordId) {
|
|
13
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.deleteRecordAsync(tableName, recordId);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=deleteRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteRecord.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/deleteRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,eAAgC,EAChC,SAAiB,EACjB,QAAgB;IAEhB,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IDataOperation, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Executes a data operation.
|
|
7
|
+
* @param operation - The data operation to execute.
|
|
8
|
+
* @returns - A promise that resolves to the result of the operation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function executeAsync<TRequest, TResult>(dataSourcesInfo: DataSourcesInfo, operation: IDataOperation<TRequest>): Promise<IOperationResult<TResult>>;
|
|
11
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/execute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,OAAO,EAClD,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,cAAc,CAAC,QAAQ,CAAC,GAClC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAEpC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Executes a data operation.
|
|
7
|
+
* @param operation - The data operation to execute.
|
|
8
|
+
* @returns - A promise that resolves to the result of the operation.
|
|
9
|
+
*/
|
|
10
|
+
export async function executeAsync(dataSourcesInfo, operation) {
|
|
11
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.executeAsync(operation);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/execute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,eAAgC,EAChC,SAAmC;IAEnC,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,YAAY,CAAoB,SAAS,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IOperationOptions, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves multiple records from the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param options - Optional operation options.
|
|
10
|
+
* @returns - A promise that resolves to the created record.
|
|
11
|
+
*/
|
|
12
|
+
export declare function retrieveMultipleRecordsAsync<TResult>(dataSourcesInfo: DataSourcesInfo, tableName: string, options?: IOperationOptions): Promise<IOperationResult<TResult[]>>;
|
|
13
|
+
//# sourceMappingURL=retrieveMultipleRecords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveMultipleRecords.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/retrieveMultipleRecords.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAErF;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EACxD,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAKtC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves multiple records from the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param options - Optional operation options.
|
|
10
|
+
* @returns - A promise that resolves to the created record.
|
|
11
|
+
*/
|
|
12
|
+
export async function retrieveMultipleRecordsAsync(dataSourcesInfo, tableName, options) {
|
|
13
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.retrieveMultipleRecordsAsync(tableName, options);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=retrieveMultipleRecords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveMultipleRecords.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/retrieveMultipleRecords.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,eAAgC,EAChC,SAAiB,EACjB,OAA2B;IAE3B,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,4BAA4B,CACjF,SAAS,EACT,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IOperationOptions, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves a record from the specified table.
|
|
7
|
+
* @param tableName - The name of the table to retrieve the record from.
|
|
8
|
+
* @param recordId - The ID of the record to retrieve.
|
|
9
|
+
* @param options - Optional operation options.
|
|
10
|
+
* @returns A promise that resolves to the retrieved record.
|
|
11
|
+
*/
|
|
12
|
+
export declare function retrieveRecordAsync<TResult>(dataSourcesInfo: DataSourcesInfo, tableName: string, recordId: string, options?: IOperationOptions): Promise<IOperationResult<TResult>>;
|
|
13
|
+
//# sourceMappingURL=retrieveRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveRecord.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/retrieveRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAErF;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAC/C,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAMpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves a record from the specified table.
|
|
7
|
+
* @param tableName - The name of the table to retrieve the record from.
|
|
8
|
+
* @param recordId - The ID of the record to retrieve.
|
|
9
|
+
* @param options - Optional operation options.
|
|
10
|
+
* @returns A promise that resolves to the retrieved record.
|
|
11
|
+
*/
|
|
12
|
+
export async function retrieveRecordAsync(dataSourcesInfo, tableName, recordId, options) {
|
|
13
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.retrieveRecordAsync(tableName, recordId, options);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=retrieveRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveRecord.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/retrieveRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,eAAgC,EAChC,SAAiB,EACjB,QAAgB,EAChB,OAA2B;IAE3B,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,mBAAmB,CACxE,SAAS,EACT,QAAQ,EACR,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { DataSourcesInfo, IOperationResult } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Updates an existing record in the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param recordId - The ID of the record to update.
|
|
10
|
+
* @param changes - The changes to apply to the record.
|
|
11
|
+
* @returns - A promise that resolves to the created record.
|
|
12
|
+
*/
|
|
13
|
+
export declare function updateRecordAsync<TInput, TResult>(dataSourcesInfo: DataSourcesInfo, tableName: string, recordId: string, changes: TInput): Promise<IOperationResult<TResult>>;
|
|
14
|
+
//# sourceMappingURL=updateRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateRecord.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/updateRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElE;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EACrD,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAMpC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
|
|
5
|
+
/**
|
|
6
|
+
* Updates an existing record in the specified table.
|
|
7
|
+
* @param dataSourcesInfo - The data sources information.
|
|
8
|
+
* @param tableName - The name of the table to create the record in.
|
|
9
|
+
* @param recordId - The ID of the record to update.
|
|
10
|
+
* @param changes - The changes to apply to the record.
|
|
11
|
+
* @returns - A promise that resolves to the created record.
|
|
12
|
+
*/
|
|
13
|
+
export async function updateRecordAsync(dataSourcesInfo, tableName, recordId, changes) {
|
|
14
|
+
return await getPowerSdkInstance(dataSourcesInfo).Data.updateRecordAsync(tableName, recordId, changes);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=updateRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateRecord.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/api/updateRecord.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,eAAgC,EAChC,SAAiB,EACjB,QAAgB,EAChB,OAAe;IAEf,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,iBAAiB,CACtE,SAAS,EACT,QAAQ,EACR,OAAO,CACR,CAAC;AACJ,CAAC"}
|