@microsoft/power-apps 0.3.1 → 0.3.21
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 +34 -0
- package/lib/__tests__/connectorDataOperationExecutor.spec.js +15 -2
- package/lib/__tests__/connectorDataOperationExecutor.spec.js.map +1 -1
- package/lib/__tests__/dataverseDataOperationExecutor.spec.js +25 -67
- package/lib/__tests__/dataverseDataOperationExecutor.spec.js.map +1 -1
- package/lib/__tests__/powerDataRuntimeInstance.test.js +2 -17
- package/lib/__tests__/powerDataRuntimeInstance.test.js.map +1 -1
- package/lib/__tests__/runtimeDataOperation.test.js +40 -39
- package/lib/__tests__/runtimeDataOperation.test.js.map +1 -1
- package/lib/app/App.Types.d.ts +24 -0
- package/lib/app/App.Types.d.ts.map +1 -0
- package/lib/app/App.Types.js +5 -0
- package/lib/app/App.Types.js.map +1 -0
- package/lib/app/ContextProvider.d.ts +6 -0
- package/lib/app/ContextProvider.d.ts.map +1 -0
- package/lib/app/ContextProvider.js +13 -0
- package/lib/app/ContextProvider.js.map +1 -0
- package/lib/app/Lifecycle.d.ts +1 -0
- package/lib/app/Lifecycle.d.ts.map +1 -1
- package/lib/app/Lifecycle.js +11 -9
- package/lib/app/Lifecycle.js.map +1 -1
- package/lib/app/index.d.ts +2 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +1 -0
- package/lib/app/index.js.map +1 -1
- package/lib/cli/power-apps.d.ts +6 -0
- package/lib/cli/power-apps.d.ts.map +1 -0
- package/lib/cli/power-apps.js +21 -0
- package/lib/cli/power-apps.js.map +1 -0
- package/lib/data/metadata/dataverse/index.d.ts +6 -0
- package/lib/data/metadata/dataverse/index.d.ts.map +1 -0
- package/lib/data/metadata/dataverse/index.js +5 -0
- package/lib/data/metadata/dataverse/index.js.map +1 -0
- package/lib/internal/communication/CompatibleMessageReceiver.d.ts.map +1 -1
- package/lib/internal/communication/CompatibleMessageReceiver.js +3 -2
- package/lib/internal/communication/CompatibleMessageReceiver.js.map +1 -1
- package/lib/internal/data/core/api/createRecord.d.ts.map +1 -1
- package/lib/internal/data/core/api/createRecord.js +1 -1
- package/lib/internal/data/core/api/createRecord.js.map +1 -1
- package/lib/internal/data/core/api/deleteRecord.js +1 -1
- package/lib/internal/data/core/api/deleteRecord.js.map +1 -1
- package/lib/internal/data/core/api/execute.js +1 -1
- package/lib/internal/data/core/api/execute.js.map +1 -1
- package/lib/internal/data/core/api/retrieveMultipleRecords.d.ts.map +1 -1
- package/lib/internal/data/core/api/retrieveMultipleRecords.js +1 -1
- package/lib/internal/data/core/api/retrieveMultipleRecords.js.map +1 -1
- package/lib/internal/data/core/api/retrieveRecord.d.ts.map +1 -1
- package/lib/internal/data/core/api/retrieveRecord.js +1 -1
- package/lib/internal/data/core/api/retrieveRecord.js.map +1 -1
- package/lib/internal/data/core/api/updateRecord.d.ts.map +1 -1
- package/lib/internal/data/core/api/updateRecord.js +1 -1
- package/lib/internal/data/core/api/updateRecord.js.map +1 -1
- package/lib/internal/data/core/common/types.d.ts +2 -10
- package/lib/internal/data/core/common/types.d.ts.map +1 -1
- package/lib/internal/data/core/common/types.js.map +1 -1
- package/lib/internal/data/core/data/defaultOperationOrchestrator.d.ts +0 -6
- package/lib/internal/data/core/data/defaultOperationOrchestrator.d.ts.map +1 -1
- package/lib/internal/data/core/data/defaultOperationOrchestrator.js +7 -41
- package/lib/internal/data/core/data/defaultOperationOrchestrator.js.map +1 -1
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.d.ts +18 -3
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.d.ts.map +1 -1
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.js +45 -10
- package/lib/internal/data/core/data/executors/connectorDataOperationExecutor.js.map +1 -1
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.d.ts +17 -25
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.d.ts.map +1 -1
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.js +171 -225
- package/lib/internal/data/core/data/executors/dataverseDataOperationExecutor.js.map +1 -1
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.d.ts +3 -3
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.d.ts.map +1 -1
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.js +2 -2
- package/lib/internal/data/core/data/executors/mockDataOperationExecutor.js.map +1 -1
- package/lib/internal/data/core/data/executors/shared/stringQueryOptions.d.ts +11 -0
- package/lib/internal/data/core/data/executors/shared/stringQueryOptions.d.ts.map +1 -0
- package/lib/internal/data/core/data/executors/shared/stringQueryOptions.js +38 -0
- package/lib/internal/data/core/data/executors/shared/stringQueryOptions.js.map +1 -0
- package/lib/internal/data/core/runtime/getRuntimeContext.d.ts +1 -1
- package/lib/internal/data/core/runtime/getRuntimeContext.d.ts.map +1 -1
- package/lib/internal/data/core/runtime/getRuntimeContext.js +3 -1
- package/lib/internal/data/core/runtime/getRuntimeContext.js.map +1 -1
- package/lib/internal/data/core/runtime/powerDataRuntime.d.ts +1 -9
- package/lib/internal/data/core/runtime/powerDataRuntime.d.ts.map +1 -1
- package/lib/internal/data/core/runtime/powerDataRuntime.js +1 -14
- package/lib/internal/data/core/runtime/powerDataRuntime.js.map +1 -1
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.d.ts +2 -3
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.d.ts.map +1 -1
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.js +1 -3
- package/lib/internal/data/core/runtime/powerDataRuntimeInstance.js.map +1 -1
- package/lib/internal/data/core/types/dataverseMetadata.d.ts +408 -0
- package/lib/internal/data/core/types/dataverseMetadata.d.ts.map +1 -0
- package/lib/internal/data/core/types/dataverseMetadata.js +118 -0
- package/lib/internal/data/core/types/dataverseMetadata.js.map +1 -0
- package/lib/internal/data/core/types/index.d.ts +2 -2
- package/lib/internal/data/core/types/index.d.ts.map +1 -1
- package/lib/internal/data/core/types/index.js.map +1 -1
- package/lib/internal/plugin/PluginCommon.d.ts +1 -1
- package/lib/internal/plugin/PluginCommon.d.ts.map +1 -1
- package/lib/internal/plugin/PluginCommon.js +14 -7
- package/lib/internal/plugin/PluginCommon.js.map +1 -1
- package/package.json +15 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Converts operation options to a query string format.
|
|
6
|
+
* @param options - The operation options to convert.
|
|
7
|
+
* @returns The formatted query string.
|
|
8
|
+
*/
|
|
9
|
+
export function convertOptionsToQueryString(options) {
|
|
10
|
+
if (!options) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
const parts = [];
|
|
14
|
+
if (options.select && options.select.length > 0) {
|
|
15
|
+
parts.push(`$select=${encodeURIComponent(options.select.map((s) => s.trim().replace(/%20/g, '+').replace(/'/g, '%27')).join(','))}`);
|
|
16
|
+
}
|
|
17
|
+
if (options.filter) {
|
|
18
|
+
const encodedFilter = encodeURIComponent(options.filter.trim()).replace(/%20/g, '+').replace(/'/g, '%27');
|
|
19
|
+
parts.push(`$filter=${encodedFilter}`);
|
|
20
|
+
}
|
|
21
|
+
if (options.orderBy && options.orderBy.length > 0) {
|
|
22
|
+
parts.push(`$orderby=${encodeURIComponent(options.orderBy.map((s) => s.trim().replace(/%20/g, '+').replace(/'/g, '%27')).join(','))}`);
|
|
23
|
+
}
|
|
24
|
+
if (options.top !== undefined && options.top !== null) {
|
|
25
|
+
parts.push(`$top=${options.top}`);
|
|
26
|
+
}
|
|
27
|
+
if (options.skip !== undefined && options.skip !== null) {
|
|
28
|
+
parts.push(`$skip=${options.skip}`);
|
|
29
|
+
}
|
|
30
|
+
if (options.count !== undefined && options.count !== null) {
|
|
31
|
+
parts.push(`$count=${options.count}`);
|
|
32
|
+
}
|
|
33
|
+
if (options.skipToken && options.skipToken.trim() !== '') {
|
|
34
|
+
parts.push(`$skiptoken=${encodeURIComponent(options.skipToken.trim())}`);
|
|
35
|
+
}
|
|
36
|
+
return parts.length ? `?${parts.join('&')}` : '';
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=stringQueryOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringQueryOptions.js","sourceRoot":"","sources":["../../../../../../../src/internal/data/core/data/executors/shared/stringQueryOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAA2B;IACrE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,EAAE,CAAC;KACX;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,KAAK,CAAC,IAAI,CACR,WAAW,kBAAkB,CAC3B,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CACxF,EAAE,CACJ,CAAC;KACH;IAED,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1G,KAAK,CAAC,IAAI,CAAC,WAAW,aAAa,EAAE,CAAC,CAAC;KACxC;IAED,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACjD,KAAK,CAAC,IAAI,CACR,YAAY,kBAAkB,CAC5B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CACzF,EAAE,CACJ,CAAC;KACH;IAED,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE;QACrD,KAAK,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;KACnC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE;QACvD,KAAK,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;KACrC;IAED,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE;QACzD,KAAK,CAAC,IAAI,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;KACvC;IAED,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACxD,KAAK,CAAC,IAAI,CAAC,cAAc,kBAAkB,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;KAC1E;IAED,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -7,5 +7,5 @@ import { PowerDataRuntime } from './powerDataRuntime';
|
|
|
7
7
|
* Builds (or retrieves) a singleton runtime context based on provided data sources.
|
|
8
8
|
* Must be called after initializeRuntime() has injected the OperationExecutor.
|
|
9
9
|
*/
|
|
10
|
-
export declare function getPowerSdkInstance(dataSourcesInfo: DataSourcesInfo): PowerDataRuntime
|
|
10
|
+
export declare function getPowerSdkInstance(dataSourcesInfo: DataSourcesInfo): Promise<PowerDataRuntime>;
|
|
11
11
|
//# sourceMappingURL=getRuntimeContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/getRuntimeContext.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"getRuntimeContext.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/getRuntimeContext.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAMrG"}
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
import { getPowerDataRuntime } from './powerDataRuntimeInstance';
|
|
5
5
|
import { getExecutor } from './initializeRuntime';
|
|
6
6
|
import PowerDataSourcesInfoProvider from './powerDataSourcesInfoProvider';
|
|
7
|
+
import { getIsInitializedPromise } from '../../../../app/Lifecycle';
|
|
7
8
|
/**
|
|
8
9
|
* Builds (or retrieves) a singleton runtime context based on provided data sources.
|
|
9
10
|
* Must be called after initializeRuntime() has injected the OperationExecutor.
|
|
10
11
|
*/
|
|
11
|
-
export function getPowerSdkInstance(dataSourcesInfo) {
|
|
12
|
+
export async function getPowerSdkInstance(dataSourcesInfo) {
|
|
13
|
+
await getIsInitializedPromise();
|
|
12
14
|
const executor = getExecutor(); // from initializeRuntime.ts
|
|
13
15
|
const provider = PowerDataSourcesInfoProvider.getInstance(dataSourcesInfo);
|
|
14
16
|
return getPowerDataRuntime(provider, executor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRuntimeContext.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/getRuntimeContext.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"getRuntimeContext.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/getRuntimeContext.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAG1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,eAAgC;IACxE,MAAM,uBAAuB,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC,CAAC,4BAA4B;IAC5D,MAAM,QAAQ,GAAG,4BAA4B,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { IMetadataOperations, IPowerDataSourcesInfoProvider
|
|
4
|
+
import { IMetadataOperations, IPowerDataSourcesInfoProvider } from '../common/types';
|
|
5
5
|
import { IClientConfig } from '../common/types';
|
|
6
6
|
import { IDataOperationOrchestrator, IPowerDataRuntime, IPowerOperationExecutor } from '../types';
|
|
7
7
|
/**
|
|
@@ -10,7 +10,6 @@ import { IDataOperationOrchestrator, IPowerDataRuntime, IPowerOperationExecutor
|
|
|
10
10
|
export interface IPowerDataRuntimeInitParams {
|
|
11
11
|
powerDataSourcesInfoProvider: IPowerDataSourcesInfoProvider;
|
|
12
12
|
powerOperationExecutor: IPowerOperationExecutor;
|
|
13
|
-
xrm: IXrmContext;
|
|
14
13
|
clientConfig?: IClientConfig;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
@@ -20,7 +19,6 @@ export interface IPowerDataRuntimeInitParams {
|
|
|
20
19
|
export declare class PowerDataRuntime implements IPowerDataRuntime {
|
|
21
20
|
private readonly _clientProvider;
|
|
22
21
|
private readonly _dataSourceService;
|
|
23
|
-
private readonly _xrm;
|
|
24
22
|
private _dataOperations?;
|
|
25
23
|
private _metadataOperations?;
|
|
26
24
|
private _isInitialized;
|
|
@@ -40,12 +38,6 @@ export declare class PowerDataRuntime implements IPowerDataRuntime {
|
|
|
40
38
|
* @throws PowerDataRuntimeError if operations are not initialized
|
|
41
39
|
*/
|
|
42
40
|
get Metadata(): IMetadataOperations;
|
|
43
|
-
/**
|
|
44
|
-
* Validates initialization parameters
|
|
45
|
-
* @param params - Parameters to validate
|
|
46
|
-
* @throws PowerDataRuntimeError if validation fails
|
|
47
|
-
*/
|
|
48
|
-
private _validateInitParams;
|
|
49
41
|
/**
|
|
50
42
|
* Ensures the PowerDataRuntime is initialized
|
|
51
43
|
* @throws PowerDataRuntimeError if not initialized
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerDataRuntime.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"powerDataRuntime.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAA0B,MAAM,iBAAiB,CAAC;AAI7G,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAIlG;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,4BAA4B,EAAE,6BAA6B,CAAC;IAC5D,sBAAsB,EAAE,uBAAuB,CAAC;IAChD,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IACzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,eAAe,CAAC,CAA6B;IACrD,OAAO,CAAC,mBAAmB,CAAC,CAAsB;IAClD,OAAO,CAAC,cAAc,CAAU;IAEhC;;;;OAIG;gBACS,MAAM,EAAE,2BAA2B;IAiB/C;;;OAGG;IACH,IAAW,IAAI,IAAI,0BAA0B,CAM5C;IAED;;;OAGG;IACH,IAAW,QAAQ,IAAI,mBAAmB,CAMzC;IAED;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAUnB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;OAEG;IACH,OAAO,CAAC,yBAAyB;CAGlC"}
|
|
@@ -16,7 +16,6 @@ import { ErrorCodes, getErrorMessage, PowerDataRuntimeError } from '../error/err
|
|
|
16
16
|
export class PowerDataRuntime {
|
|
17
17
|
_clientProvider;
|
|
18
18
|
_dataSourceService;
|
|
19
|
-
_xrm;
|
|
20
19
|
_dataOperations;
|
|
21
20
|
_metadataOperations;
|
|
22
21
|
_isInitialized;
|
|
@@ -27,12 +26,10 @@ export class PowerDataRuntime {
|
|
|
27
26
|
*/
|
|
28
27
|
constructor(params) {
|
|
29
28
|
try {
|
|
30
|
-
this._validateInitParams(params);
|
|
31
29
|
// Initialize the telemetry logger
|
|
32
30
|
Log.createInstance(params.powerOperationExecutor);
|
|
33
31
|
this._clientProvider = new RuntimeClientProvider(params.powerOperationExecutor);
|
|
34
32
|
this._dataSourceService = new RuntimeDataSourceService(params.powerDataSourcesInfoProvider);
|
|
35
|
-
this._xrm = params.xrm;
|
|
36
33
|
this._isInitialized = false;
|
|
37
34
|
this._initialize();
|
|
38
35
|
}
|
|
@@ -65,16 +62,6 @@ export class PowerDataRuntime {
|
|
|
65
62
|
}
|
|
66
63
|
return this._metadataOperations;
|
|
67
64
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Validates initialization parameters
|
|
70
|
-
* @param params - Parameters to validate
|
|
71
|
-
* @throws PowerDataRuntimeError if validation fails
|
|
72
|
-
*/
|
|
73
|
-
_validateInitParams(params) {
|
|
74
|
-
if (!params.xrm) {
|
|
75
|
-
throw new PowerDataRuntimeError(ErrorCodes.InvalidXrmInfo);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
65
|
/**
|
|
79
66
|
* Ensures the PowerDataRuntime is initialized
|
|
80
67
|
* @throws PowerDataRuntimeError if not initialized
|
|
@@ -102,7 +89,7 @@ export class PowerDataRuntime {
|
|
|
102
89
|
* Creates a new instance of DataOperations
|
|
103
90
|
*/
|
|
104
91
|
_createDataOperations() {
|
|
105
|
-
const dataverseOperation = new DataverseDataOperationExecutor(this.
|
|
92
|
+
const dataverseOperation = new DataverseDataOperationExecutor(this._clientProvider);
|
|
106
93
|
const connectorOperation = new ConnectorDataOperationExecutor(this._clientProvider, this._dataSourceService);
|
|
107
94
|
return new DefaultDataOperationOrchestrator(dataverseOperation, connectorOperation, this._dataSourceService);
|
|
108
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerDataRuntime.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntime.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"powerDataRuntime.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntime.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { PowerDataRuntime } from './powerDataRuntime';
|
|
5
|
-
import { IPowerDataSourcesInfoProvider
|
|
5
|
+
import { IPowerDataSourcesInfoProvider } from '../common/types';
|
|
6
6
|
import { IPowerOperationExecutor } from '../types';
|
|
7
7
|
/**
|
|
8
8
|
* Gets or creates a singleton instance of PowerDataRuntime
|
|
9
9
|
* @param powerDataSourcesInfoProvider - Data sources info provider to initialize the PowerDataRuntime
|
|
10
10
|
* @param powerOperationExecutor - Optional power operation executor to initialize the PowerDataRuntime
|
|
11
|
-
* @param xrm - Optional xrm object to initialize the PowerDataRuntime
|
|
12
11
|
* @returns PowerDataRuntime instance
|
|
13
12
|
*/
|
|
14
|
-
export declare function getPowerDataRuntime(powerDataSourcesInfoProvider: IPowerDataSourcesInfoProvider, powerOperationExecutor: IPowerOperationExecutor
|
|
13
|
+
export declare function getPowerDataRuntime(powerDataSourcesInfoProvider: IPowerDataSourcesInfoProvider, powerOperationExecutor: IPowerOperationExecutor): PowerDataRuntime;
|
|
15
14
|
/**
|
|
16
15
|
* Resets the PowerDataRuntime singleton instance.
|
|
17
16
|
* Useful for testing or reinitialization.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerDataRuntimeInstance.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntimeInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"powerDataRuntimeInstance.d.ts","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntimeInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAQnD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,4BAA4B,EAAE,6BAA6B,EAC3D,sBAAsB,EAAE,uBAAuB,GAC9C,gBAAgB,CAQlB;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAIpD"}
|
|
@@ -11,15 +11,13 @@ let powerDataRuntimeInstance;
|
|
|
11
11
|
* Gets or creates a singleton instance of PowerDataRuntime
|
|
12
12
|
* @param powerDataSourcesInfoProvider - Data sources info provider to initialize the PowerDataRuntime
|
|
13
13
|
* @param powerOperationExecutor - Optional power operation executor to initialize the PowerDataRuntime
|
|
14
|
-
* @param xrm - Optional xrm object to initialize the PowerDataRuntime
|
|
15
14
|
* @returns PowerDataRuntime instance
|
|
16
15
|
*/
|
|
17
|
-
export function getPowerDataRuntime(powerDataSourcesInfoProvider, powerOperationExecutor
|
|
16
|
+
export function getPowerDataRuntime(powerDataSourcesInfoProvider, powerOperationExecutor) {
|
|
18
17
|
if (!powerDataRuntimeInstance) {
|
|
19
18
|
powerDataRuntimeInstance = new PowerDataRuntime({
|
|
20
19
|
powerDataSourcesInfoProvider,
|
|
21
20
|
powerOperationExecutor,
|
|
22
|
-
xrm: xrm ?? { WebApi: {} },
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
23
|
return powerDataRuntimeInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerDataRuntimeInstance.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntimeInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC;;GAEG;AACH,IAAI,wBAAsD,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"powerDataRuntimeInstance.js","sourceRoot":"","sources":["../../../../../src/internal/data/core/runtime/powerDataRuntimeInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC;;GAEG;AACH,IAAI,wBAAsD,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,4BAA2D,EAC3D,sBAA+C;IAE/C,IAAI,CAAC,wBAAwB,EAAE;QAC7B,wBAAwB,GAAG,IAAI,gBAAgB,CAAC;YAC9C,4BAA4B;YAC5B,sBAAsB;SACvB,CAAC,CAAC;KACJ;IACD,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,6BAA6B;IAC3C,wBAAwB,GAAG,SAAS,CAAC;IACrC,yDAAyD;IACzD,GAAG,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
interface BooleanManagedProperty {
|
|
5
|
+
CanBeChanged: boolean;
|
|
6
|
+
ManagedPropertyLogicalName: string;
|
|
7
|
+
Value: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const entityClusterModeEnum: {
|
|
10
|
+
readonly 0: "Partitioned";
|
|
11
|
+
readonly 1: "Replicated";
|
|
12
|
+
readonly 2: "Local";
|
|
13
|
+
};
|
|
14
|
+
type EntityClusterMode = keyof typeof entityClusterModeEnum;
|
|
15
|
+
export declare function getEntityClusterModeName(value: EntityClusterMode): "Partitioned" | "Replicated" | "Local";
|
|
16
|
+
declare const ownershipTypeEnum: {
|
|
17
|
+
readonly 0: "None";
|
|
18
|
+
readonly 1: "UserOwned";
|
|
19
|
+
readonly 2: "TeamOwned";
|
|
20
|
+
readonly 4: "BusinessOwned";
|
|
21
|
+
readonly 8: "OrganizationOwned";
|
|
22
|
+
readonly 16: "BusinessParented";
|
|
23
|
+
readonly 32: "Filtered";
|
|
24
|
+
};
|
|
25
|
+
type OwnershipType = keyof typeof ownershipTypeEnum;
|
|
26
|
+
export declare function getOwnershipTypeName(value: OwnershipType): "None" | "UserOwned" | "TeamOwned" | "BusinessOwned" | "OrganizationOwned" | "BusinessParented" | "Filtered";
|
|
27
|
+
interface LocalizedLabel {
|
|
28
|
+
HasChanged: boolean;
|
|
29
|
+
IsManaged: boolean;
|
|
30
|
+
Label: string;
|
|
31
|
+
LanguageCode: number;
|
|
32
|
+
MetadataId: string;
|
|
33
|
+
}
|
|
34
|
+
interface Label {
|
|
35
|
+
LocalizedLabels: LocalizedLabel[];
|
|
36
|
+
UserLocalizedLabel: LocalizedLabel;
|
|
37
|
+
}
|
|
38
|
+
declare const privilegeTypeEnum: {
|
|
39
|
+
readonly 0: "None";
|
|
40
|
+
readonly 1: "Create";
|
|
41
|
+
readonly 2: "Read";
|
|
42
|
+
readonly 3: "Write";
|
|
43
|
+
readonly 4: "Delete";
|
|
44
|
+
readonly 5: "Assign";
|
|
45
|
+
readonly 6: "Share";
|
|
46
|
+
readonly 7: "Append";
|
|
47
|
+
readonly 8: "AppendTo";
|
|
48
|
+
};
|
|
49
|
+
type PrivilegeType = keyof typeof privilegeTypeEnum;
|
|
50
|
+
export declare function getPrivilegeTypeName(value: PrivilegeType): "None" | "Create" | "Read" | "Write" | "Delete" | "Assign" | "Share" | "Append" | "AppendTo";
|
|
51
|
+
interface SecurityPrivilegeMetadata {
|
|
52
|
+
CanBeBasic: boolean;
|
|
53
|
+
CanBeDeep: boolean;
|
|
54
|
+
CanBeEntityReference: boolean;
|
|
55
|
+
CanBeGlobal: boolean;
|
|
56
|
+
CanBeLocal: boolean;
|
|
57
|
+
CanBeParentEntityReference: boolean;
|
|
58
|
+
CanBeRecordFilter: boolean;
|
|
59
|
+
Name: string;
|
|
60
|
+
PrivilegeId: string;
|
|
61
|
+
PrivilegeType: PrivilegeType;
|
|
62
|
+
}
|
|
63
|
+
interface EntitySetting {
|
|
64
|
+
ChildSettings: EntitySetting[];
|
|
65
|
+
Name: string;
|
|
66
|
+
}
|
|
67
|
+
export interface EntityMetadataSelects {
|
|
68
|
+
ActivityTypeMask: number;
|
|
69
|
+
AutoCreateAccessTeams: boolean;
|
|
70
|
+
AutoReplicateClusterRecords: boolean;
|
|
71
|
+
AutoRouteToOwnerQueue: boolean;
|
|
72
|
+
CanBeInCustomEntityAssociation: BooleanManagedProperty;
|
|
73
|
+
CanBeInManyToMany: BooleanManagedProperty;
|
|
74
|
+
CanBePrimaryEntityInRelationship: BooleanManagedProperty;
|
|
75
|
+
CanBeRelatedEntityInRelationship: BooleanManagedProperty;
|
|
76
|
+
CanChangeClusterMode: boolean;
|
|
77
|
+
CanChangeHierarchicalRelationship: BooleanManagedProperty;
|
|
78
|
+
CanChangeTrackingBeEnabled: BooleanManagedProperty;
|
|
79
|
+
CanCreateAttributes: BooleanManagedProperty;
|
|
80
|
+
CanCreateCharts: BooleanManagedProperty;
|
|
81
|
+
CanCreateForms: BooleanManagedProperty;
|
|
82
|
+
CanCreateViews: BooleanManagedProperty;
|
|
83
|
+
CanEnableSyncToExternalSearchIndex: BooleanManagedProperty;
|
|
84
|
+
CanModifyAdditionalSettings: BooleanManagedProperty;
|
|
85
|
+
CanTriggerWorkflow: boolean;
|
|
86
|
+
ChangeTrackingEnabled: boolean;
|
|
87
|
+
ClusterMode: EntityClusterMode;
|
|
88
|
+
CollectionSchemaName: string;
|
|
89
|
+
CreatedOn: number;
|
|
90
|
+
DataProviderId: string;
|
|
91
|
+
DataSourceId: string;
|
|
92
|
+
DaysSinceRecordLastModified: number;
|
|
93
|
+
Description: Label;
|
|
94
|
+
DisplayCollectionName: Label;
|
|
95
|
+
DisplayName: Label;
|
|
96
|
+
EnforceStateTransitions: boolean;
|
|
97
|
+
EntityColor: string;
|
|
98
|
+
EntityHelpUrl: string;
|
|
99
|
+
EntityHelpUrlEnabled: boolean;
|
|
100
|
+
EntitySetName: string;
|
|
101
|
+
ExternalCollectionName: string;
|
|
102
|
+
ExternalName: string;
|
|
103
|
+
HasActivities: boolean;
|
|
104
|
+
HasChanged: boolean;
|
|
105
|
+
HasEmailAddresses: boolean;
|
|
106
|
+
HasFeedback: boolean;
|
|
107
|
+
HasNotes: boolean;
|
|
108
|
+
IconLargeName: string;
|
|
109
|
+
IconMediumName: string;
|
|
110
|
+
IconSmallName: string;
|
|
111
|
+
IconVectorName: string;
|
|
112
|
+
IntroducedVersion: string;
|
|
113
|
+
IsActivity: boolean;
|
|
114
|
+
IsActivityParty: boolean;
|
|
115
|
+
IsAIRUpdated: boolean;
|
|
116
|
+
IsArchivalEnabled: boolean;
|
|
117
|
+
IsAuditEnabled: BooleanManagedProperty;
|
|
118
|
+
IsAvailableOffline: boolean;
|
|
119
|
+
IsBPFEntity: boolean;
|
|
120
|
+
IsBusinessProcessEnabled: boolean;
|
|
121
|
+
IsChildEntity: boolean;
|
|
122
|
+
IsConnectionsEnabled: BooleanManagedProperty;
|
|
123
|
+
IsCustomEntity: boolean;
|
|
124
|
+
IsCustomizable: BooleanManagedProperty;
|
|
125
|
+
IsDocumentManagementEnabled: boolean;
|
|
126
|
+
IsDocumentRecommendationsEnabled: boolean;
|
|
127
|
+
IsDuplicateDetectionEnabled: BooleanManagedProperty;
|
|
128
|
+
IsEnabledForCharts: boolean;
|
|
129
|
+
IsEnabledForExternalChannels: boolean;
|
|
130
|
+
IsEnabledForTrace: boolean;
|
|
131
|
+
IsImportable: boolean;
|
|
132
|
+
IsInteractionCentricEnabled: boolean;
|
|
133
|
+
IsIntersect: boolean;
|
|
134
|
+
IsKnowledgeManagementEnabled: boolean;
|
|
135
|
+
IsLogicalEntity: boolean;
|
|
136
|
+
IsMailMergeEnabled: BooleanManagedProperty;
|
|
137
|
+
IsManaged: boolean;
|
|
138
|
+
IsMappable: BooleanManagedProperty;
|
|
139
|
+
IsMSTeamsIntegrationEnabled: boolean;
|
|
140
|
+
IsOfflineInMobileClient: BooleanManagedProperty;
|
|
141
|
+
IsOneNoteIntegrationEnabled: boolean;
|
|
142
|
+
IsOptimisticConcurrencyEnabled: boolean;
|
|
143
|
+
IsPrivate: boolean;
|
|
144
|
+
IsQuickCreateEnabled: boolean;
|
|
145
|
+
IsReadingPaneEnabled: boolean;
|
|
146
|
+
IsReadOnlyInMobileClient: BooleanManagedProperty;
|
|
147
|
+
IsRenameable: BooleanManagedProperty;
|
|
148
|
+
IsRetentionEnabled: boolean;
|
|
149
|
+
IsRetrieveAuditEnabled: boolean;
|
|
150
|
+
IsRetrieveMultipleAuditEnabled: boolean;
|
|
151
|
+
IsSLAEnabled: boolean;
|
|
152
|
+
IsSolutionAware: boolean;
|
|
153
|
+
IsStateModelAware: boolean;
|
|
154
|
+
IsValidForAdvancedFind: boolean;
|
|
155
|
+
IsValidForQueue: BooleanManagedProperty;
|
|
156
|
+
IsVisibleInMobile: BooleanManagedProperty;
|
|
157
|
+
IsVisibleInMobileClient: BooleanManagedProperty;
|
|
158
|
+
LogicalCollectionName: string;
|
|
159
|
+
LogicalName: string;
|
|
160
|
+
MetadataId: string;
|
|
161
|
+
MobileOfflineFilters: string;
|
|
162
|
+
ModifiedOn: number;
|
|
163
|
+
ObjectTypeCode: number;
|
|
164
|
+
OwnerId: string;
|
|
165
|
+
OwnerIdType: number;
|
|
166
|
+
OwnershipType: OwnershipType;
|
|
167
|
+
OwningBusinessUnit: string;
|
|
168
|
+
PrimaryIdAttribute: string;
|
|
169
|
+
PrimaryImageAttribute: string;
|
|
170
|
+
PrimaryKey: string[];
|
|
171
|
+
PrimaryNameAttribute: string;
|
|
172
|
+
Privileges: SecurityPrivilegeMetadata[];
|
|
173
|
+
RecurrenceBaseEntityLogicalName: string;
|
|
174
|
+
ReportViewName: string;
|
|
175
|
+
SchemaName: string;
|
|
176
|
+
SettingOf: string;
|
|
177
|
+
Settings: EntitySetting[];
|
|
178
|
+
SyncToExternalSearchIndex: boolean;
|
|
179
|
+
TableType: string;
|
|
180
|
+
UsesBusinessDataLabelTable: boolean;
|
|
181
|
+
}
|
|
182
|
+
declare const attributeTypeCodeEnum: {
|
|
183
|
+
readonly 0: "Boolean";
|
|
184
|
+
readonly 1: "Customer";
|
|
185
|
+
readonly 2: "DateTime";
|
|
186
|
+
readonly 3: "Decimal";
|
|
187
|
+
readonly 4: "Double";
|
|
188
|
+
readonly 5: "Integer";
|
|
189
|
+
readonly 6: "Lookup";
|
|
190
|
+
readonly 7: "Memo";
|
|
191
|
+
readonly 8: "Money";
|
|
192
|
+
readonly 9: "Owner";
|
|
193
|
+
readonly 10: "PartyList";
|
|
194
|
+
readonly 11: "Picklist";
|
|
195
|
+
readonly 12: "State";
|
|
196
|
+
readonly 13: "Status";
|
|
197
|
+
readonly 14: "String";
|
|
198
|
+
readonly 15: "Uniqueidentifier";
|
|
199
|
+
readonly 16: "CalendarRules";
|
|
200
|
+
readonly 17: "Virtual";
|
|
201
|
+
readonly 18: "BigInt";
|
|
202
|
+
readonly 19: "ManagedProperty";
|
|
203
|
+
readonly 20: "EntityName";
|
|
204
|
+
};
|
|
205
|
+
type AttributeTypeCode = keyof typeof attributeTypeCodeEnum;
|
|
206
|
+
type AttributeTypeCodeName = (typeof attributeTypeCodeEnum)[AttributeTypeCode];
|
|
207
|
+
export declare function getAttributeTypeCodeName(value: AttributeTypeCode): "Boolean" | "Customer" | "DateTime" | "Decimal" | "Double" | "Integer" | "Lookup" | "Memo" | "Money" | "Owner" | "PartyList" | "Picklist" | "State" | "Status" | "String" | "Uniqueidentifier" | "CalendarRules" | "Virtual" | "BigInt" | "ManagedProperty" | "EntityName";
|
|
208
|
+
interface AttributeTypeDisplayName {
|
|
209
|
+
Value: `${AttributeTypeCodeName}Type`;
|
|
210
|
+
}
|
|
211
|
+
declare const attributeRequiredLevelEnum: {
|
|
212
|
+
readonly 0: "None";
|
|
213
|
+
readonly 1: "SystemRequired";
|
|
214
|
+
readonly 2: "ApplicationRequired";
|
|
215
|
+
readonly 3: "Recommended";
|
|
216
|
+
};
|
|
217
|
+
type AttributeRequiredLevel = keyof typeof attributeRequiredLevelEnum;
|
|
218
|
+
export declare function getAttributeRequiredLevelName(value: AttributeRequiredLevel): "None" | "SystemRequired" | "ApplicationRequired" | "Recommended";
|
|
219
|
+
interface AttributeRequiredLevelManagedProperty {
|
|
220
|
+
CanBeChanged: boolean;
|
|
221
|
+
ManagedPropertyLogicalName: string;
|
|
222
|
+
Value: AttributeRequiredLevel;
|
|
223
|
+
}
|
|
224
|
+
interface AttributeMetadata {
|
|
225
|
+
AttributeOf: string;
|
|
226
|
+
AttributeType: AttributeTypeCode;
|
|
227
|
+
AttributeTypeName: AttributeTypeDisplayName;
|
|
228
|
+
AutoNumberFormat: string;
|
|
229
|
+
CanBeSecuredForCreate: boolean;
|
|
230
|
+
CanBeSecuredForRead: boolean;
|
|
231
|
+
CanBeSecuredForUpdate: boolean;
|
|
232
|
+
CanModifyAdditionalSettings: BooleanManagedProperty;
|
|
233
|
+
ColumnNumber: number;
|
|
234
|
+
CreatedOn: number;
|
|
235
|
+
DeprecatedVersion: string;
|
|
236
|
+
Description: Label;
|
|
237
|
+
DisplayName: Label;
|
|
238
|
+
EntityLogicalName: string;
|
|
239
|
+
ExternalName: string;
|
|
240
|
+
HasChanged: boolean;
|
|
241
|
+
InheritsFrom: string;
|
|
242
|
+
IntroducedVersion: string;
|
|
243
|
+
IsAuditEnabled: BooleanManagedProperty;
|
|
244
|
+
IsCustomAttribute: boolean;
|
|
245
|
+
IsCustomizable: BooleanManagedProperty;
|
|
246
|
+
IsDataSourceSecret: boolean;
|
|
247
|
+
IsFilterable: boolean;
|
|
248
|
+
IsGlobalFilterEnabled: BooleanManagedProperty;
|
|
249
|
+
IsLogical: boolean;
|
|
250
|
+
IsManaged: boolean;
|
|
251
|
+
IsPrimaryId: boolean;
|
|
252
|
+
IsPrimaryName: boolean;
|
|
253
|
+
IsRenameable: BooleanManagedProperty;
|
|
254
|
+
IsRequiredForForm: boolean;
|
|
255
|
+
IsRetrievable: boolean;
|
|
256
|
+
IsSearchable: boolean;
|
|
257
|
+
IsSecured: boolean;
|
|
258
|
+
IsSortableEnabled: BooleanManagedProperty;
|
|
259
|
+
IsValidForAdvancedFind: BooleanManagedProperty;
|
|
260
|
+
IsValidForCreate: boolean;
|
|
261
|
+
IsValidForForm: boolean;
|
|
262
|
+
IsValidForGrid: boolean;
|
|
263
|
+
IsValidForRead: boolean;
|
|
264
|
+
IsValidForUpdate: boolean;
|
|
265
|
+
IsValidODataAttribute: boolean;
|
|
266
|
+
LinkedAttributeId: string;
|
|
267
|
+
LogicalName: string;
|
|
268
|
+
MetadataId: string;
|
|
269
|
+
ModifiedOn: number;
|
|
270
|
+
RequiredLevel: AttributeRequiredLevelManagedProperty;
|
|
271
|
+
SchemaName: string;
|
|
272
|
+
Settings: EntitySetting[];
|
|
273
|
+
SourceType: number;
|
|
274
|
+
}
|
|
275
|
+
interface MetadataBase {
|
|
276
|
+
HasChanged: boolean;
|
|
277
|
+
MetadataId: string;
|
|
278
|
+
}
|
|
279
|
+
declare const relationshipTypeEnum: {
|
|
280
|
+
readonly 0: "OneToManyRelationship";
|
|
281
|
+
readonly 1: "ManyToManyRelationship";
|
|
282
|
+
};
|
|
283
|
+
type RelationshipType = keyof typeof relationshipTypeEnum;
|
|
284
|
+
export declare function getRelationshipTypeName(value: RelationshipType): "OneToManyRelationship" | "ManyToManyRelationship";
|
|
285
|
+
declare const securityTypesEnum: {
|
|
286
|
+
readonly 0: "None";
|
|
287
|
+
readonly 1: "Append";
|
|
288
|
+
readonly 2: "ParentChild";
|
|
289
|
+
readonly 8: "Pointer";
|
|
290
|
+
readonly 16: "Inheritance";
|
|
291
|
+
};
|
|
292
|
+
type SecurityTypes = keyof typeof securityTypesEnum;
|
|
293
|
+
export declare function getSecurityTypesName(value: SecurityTypes): "None" | "Append" | "ParentChild" | "Pointer" | "Inheritance";
|
|
294
|
+
interface RelationshipMetadataBase extends MetadataBase {
|
|
295
|
+
IntroducedVersion: string;
|
|
296
|
+
IsCustomizable: BooleanManagedProperty;
|
|
297
|
+
IsCustomRelationship: boolean;
|
|
298
|
+
IsManaged: boolean;
|
|
299
|
+
IsValidForAdvancedFind: boolean;
|
|
300
|
+
RelationshipType: RelationshipType;
|
|
301
|
+
SchemaName: string;
|
|
302
|
+
SecurityTypes: SecurityTypes;
|
|
303
|
+
}
|
|
304
|
+
declare const associatedMenuBehaviorEnum: {
|
|
305
|
+
readonly 0: "UseCollectionName";
|
|
306
|
+
readonly 1: "UseLabel";
|
|
307
|
+
readonly 2: "DoNotDisplay";
|
|
308
|
+
};
|
|
309
|
+
type AssociatedMenuBehavior = keyof typeof associatedMenuBehaviorEnum;
|
|
310
|
+
export declare function getAssociatedMenuBehaviorName(value: AssociatedMenuBehavior): "UseCollectionName" | "UseLabel" | "DoNotDisplay";
|
|
311
|
+
declare const associatedMenuGroupEnum: {
|
|
312
|
+
readonly 0: "Details";
|
|
313
|
+
readonly 1: "Sales";
|
|
314
|
+
readonly 2: "Service";
|
|
315
|
+
readonly 3: "Marketing";
|
|
316
|
+
};
|
|
317
|
+
type AssociatedMenuGroup = keyof typeof associatedMenuGroupEnum;
|
|
318
|
+
export declare function getAssociatedMenuGroupName(value: AssociatedMenuGroup): "Details" | "Sales" | "Service" | "Marketing";
|
|
319
|
+
interface AssociatedMenuConfiguration {
|
|
320
|
+
AvailableOffline: boolean;
|
|
321
|
+
QueryApi: string;
|
|
322
|
+
Behavior: AssociatedMenuBehavior;
|
|
323
|
+
Group: AssociatedMenuGroup;
|
|
324
|
+
Icon: string;
|
|
325
|
+
IsCustomizable: boolean;
|
|
326
|
+
Label: Label;
|
|
327
|
+
MenuId: string;
|
|
328
|
+
Order: number;
|
|
329
|
+
ViewId: string;
|
|
330
|
+
}
|
|
331
|
+
declare const cascadeTypeEnum: {
|
|
332
|
+
readonly 0: "NoCascade";
|
|
333
|
+
readonly 1: "Cascade";
|
|
334
|
+
readonly 2: "Active";
|
|
335
|
+
readonly 3: "UserOwned";
|
|
336
|
+
readonly 4: "RemoveLink";
|
|
337
|
+
readonly 5: "Restrict";
|
|
338
|
+
};
|
|
339
|
+
type CascadeType = keyof typeof cascadeTypeEnum;
|
|
340
|
+
export declare function getCascadeTypeName(value: CascadeType): "UserOwned" | "NoCascade" | "Cascade" | "Active" | "RemoveLink" | "Restrict";
|
|
341
|
+
interface CascadeConfiguration {
|
|
342
|
+
Archive: CascadeType;
|
|
343
|
+
Assign: CascadeType;
|
|
344
|
+
Delete: CascadeType;
|
|
345
|
+
Merge: CascadeType;
|
|
346
|
+
Reparent: CascadeType;
|
|
347
|
+
RollupView: CascadeType;
|
|
348
|
+
Share: CascadeType;
|
|
349
|
+
Unshare: CascadeType;
|
|
350
|
+
}
|
|
351
|
+
interface RelationshipAttribute {
|
|
352
|
+
ReferencedAttributeName: string;
|
|
353
|
+
ReferencingAttributeName: string;
|
|
354
|
+
}
|
|
355
|
+
interface OneToManyRelationshipMetadata extends RelationshipMetadataBase {
|
|
356
|
+
AssociatedMenuConfiguration: AssociatedMenuConfiguration;
|
|
357
|
+
CascadeConfiguration: CascadeConfiguration;
|
|
358
|
+
DenormalizedAttributeName: string;
|
|
359
|
+
EntityKey: string;
|
|
360
|
+
IsDenormalizedLookup: boolean;
|
|
361
|
+
IsHierarchical: boolean;
|
|
362
|
+
IsRelationshipAttributeDenormalized: boolean;
|
|
363
|
+
ReferencedAttribute: string;
|
|
364
|
+
ReferencedEntity: string;
|
|
365
|
+
ReferencedEntityNavigationPropertyName: string;
|
|
366
|
+
ReferencingAttribute: string;
|
|
367
|
+
ReferencingEntity: string;
|
|
368
|
+
ReferencingEntityNavigationPropertyName: string;
|
|
369
|
+
RelationshipAttributes: RelationshipAttribute[];
|
|
370
|
+
RelationshipBehavior: number;
|
|
371
|
+
}
|
|
372
|
+
interface ManyToManyRelationshipMetadata extends RelationshipMetadataBase {
|
|
373
|
+
Entity1AssociatedMenuConfiguration: AssociatedMenuConfiguration;
|
|
374
|
+
Entity1IntersectAttribute: string;
|
|
375
|
+
Entity1LogicalName: string;
|
|
376
|
+
Entity1NavigationPropertyName: string;
|
|
377
|
+
Entity2AssociatedMenuConfiguration: AssociatedMenuConfiguration;
|
|
378
|
+
Entity2IntersectAttribute: string;
|
|
379
|
+
Entity2LogicalName: string;
|
|
380
|
+
Entity2NavigationPropertyName: string;
|
|
381
|
+
IntersectEntityName: string;
|
|
382
|
+
}
|
|
383
|
+
export interface EntityMetadataExpands {
|
|
384
|
+
Attributes: AttributeMetadata[];
|
|
385
|
+
ManyToOneRelationships: OneToManyRelationshipMetadata[];
|
|
386
|
+
OneToManyRelationships: OneToManyRelationshipMetadata[];
|
|
387
|
+
ManyToManyRelationships: ManyToManyRelationshipMetadata[];
|
|
388
|
+
}
|
|
389
|
+
export type EntityMetadata = EntityMetadataSelects & EntityMetadataExpands;
|
|
390
|
+
type StringKeys<Model> = Extract<keyof Model, string>;
|
|
391
|
+
export interface GetEntityMetadataOptions<Model extends object = object> {
|
|
392
|
+
metadata?: ReadonlyArray<keyof EntityMetadataSelects>;
|
|
393
|
+
schema?: {
|
|
394
|
+
columns?: 'all' | ReadonlyArray<StringKeys<Model>>;
|
|
395
|
+
oneToMany?: boolean;
|
|
396
|
+
manyToOne?: boolean;
|
|
397
|
+
manyToMany?: boolean;
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
export type DataverseMetadataRequest = {
|
|
401
|
+
action: 'getEntityMetadata';
|
|
402
|
+
parameters: {
|
|
403
|
+
tableName: string;
|
|
404
|
+
options?: GetEntityMetadataOptions;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
export {};
|
|
408
|
+
//# sourceMappingURL=dataverseMetadata.d.ts.map
|