@itwin/core-common 4.1.0-dev.7 → 4.1.0-dev.8
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/lib/cjs/IpcAppProps.d.ts +6 -6
- package/lib/cjs/IpcAppProps.d.ts.map +1 -1
- package/lib/cjs/IpcAppProps.js +8 -9
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.d.ts +4 -3
- package/lib/cjs/NativeAppProps.d.ts.map +1 -1
- package/lib/cjs/NativeAppProps.js +5 -4
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.d.ts +4 -0
- package/lib/cjs/ipc/IpcSession.d.ts.map +1 -1
- package/lib/cjs/ipc/IpcSession.js +6 -6
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/esm/IpcAppProps.d.ts +6 -6
- package/lib/esm/IpcAppProps.d.ts.map +1 -1
- package/lib/esm/IpcAppProps.js +7 -8
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/NativeAppProps.d.ts +4 -3
- package/lib/esm/NativeAppProps.d.ts.map +1 -1
- package/lib/esm/NativeAppProps.js +4 -3
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/ipc/IpcSession.d.ts +4 -0
- package/lib/esm/ipc/IpcSession.d.ts.map +1 -1
- package/lib/esm/ipc/IpcSession.js +5 -5
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/package.json +6 -6
package/lib/cjs/IpcAppProps.d.ts
CHANGED
|
@@ -45,12 +45,12 @@ export interface ModelIdAndGeometryGuid {
|
|
|
45
45
|
guid: GuidString;
|
|
46
46
|
}
|
|
47
47
|
/** @internal */
|
|
48
|
-
export declare
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
48
|
+
export declare const ipcAppChannels: {
|
|
49
|
+
readonly functions: "itwinjs-core/ipc-app";
|
|
50
|
+
readonly appNotify: "itwinjs-core/ipcApp-notify";
|
|
51
|
+
readonly txns: "itwinjs-core/txns";
|
|
52
|
+
readonly editingScope: "itwinjs-core/editing-scope";
|
|
53
|
+
};
|
|
54
54
|
/**
|
|
55
55
|
* Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.
|
|
56
56
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7H,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings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|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.ipcAppChannels = exports.getPullChangesIpcChannel = void 0;
|
|
11
11
|
/** Get IPC channel name used for reporting progress of pulling changes into iModel.
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
const getPullChangesIpcChannel = (iModelId) => `${
|
|
14
|
+
const getPullChangesIpcChannel = (iModelId) => `${exports.ipcAppChannels.functions}/pullChanges/${iModelId}`;
|
|
15
15
|
exports.getPullChangesIpcChannel = getPullChangesIpcChannel;
|
|
16
16
|
/** @internal */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})(IpcAppChannel = exports.IpcAppChannel || (exports.IpcAppChannel = {}));
|
|
17
|
+
exports.ipcAppChannels = {
|
|
18
|
+
functions: "itwinjs-core/ipc-app",
|
|
19
|
+
appNotify: "itwinjs-core/ipcApp-notify",
|
|
20
|
+
txns: "itwinjs-core/txns",
|
|
21
|
+
editingScope: "itwinjs-core/editing-scope",
|
|
22
|
+
};
|
|
24
23
|
//# sourceMappingURL=IpcAppProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\r\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { OpenBriefcaseProps } from \"./BriefcaseTypes\";\r\nimport { ChangedEntities } from \"./ChangedEntities\";\r\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, StandaloneOpenOptions } from \"./IModel\";\r\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\r\n\r\n/** Options for pulling changes into iModel.\r\n * @internal\r\n */\r\nexport interface PullChangesOptions {\r\n /** Enables progress reporting. */\r\n reportProgress?: boolean;\r\n /** Interval for reporting progress (in milliseconds). */\r\n progressInterval?: number;\r\n /** Enables checks for abort. */\r\n enableCancellation?: boolean;\r\n}\r\n\r\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\r\n * @internal\r\n */\r\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\r\n\r\n/** Identifies a list of tile content Ids belonging to a single tile tree.\r\n * @internal\r\n */\r\nexport interface TileTreeContentIds {\r\n treeId: string;\r\n contentIds: string[];\r\n}\r\n\r\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\r\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelIdAndGeometryGuid {\r\n /** The model's Id. */\r\n id: Id64String;\r\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\r\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\r\n */\r\n guid: GuidString;\r\n}\r\n\r\n/** @internal */\r\nexport const ipcAppChannels = {\r\n functions: \"itwinjs-core/ipc-app\",\r\n appNotify: \"itwinjs-core/ipcApp-notify\",\r\n txns: \"itwinjs-core/txns\",\r\n editingScope: \"itwinjs-core/editing-scope\",\r\n} as const;\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\r\n * @internal\r\n */\r\nexport interface IpcAppNotifications {\r\n notifyApp: () => void;\r\n}\r\n\r\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\r\n * @see [TxnManager]($backend) for the source of these events.\r\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\r\n * @internal\r\n */\r\nexport interface TxnNotifications {\r\n notifyElementsChanged: (changes: ChangedEntities) => void;\r\n notifyModelsChanged: (changes: ChangedEntities) => void;\r\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\r\n notifyCommit: () => void;\r\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\r\n notifyChangesApplied: () => void;\r\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\r\n notifyAfterUndoRedo: (isUndo: boolean) => void;\r\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n\r\n notifyIModelNameChanged: (name: string) => void;\r\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\r\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\r\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\r\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\r\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\r\n}\r\n\r\n/**\r\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\r\n * @internal\r\n */\r\nexport interface EditingScopeNotifications {\r\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface IpcAppFunctions {\r\n /** Send frontend log to backend.\r\n * @param _level Specify log level.\r\n * @param _category Specify log category.\r\n * @param _message Specify log message.\r\n * @param _metaData metaData if any.\r\n */\r\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\r\n\r\n /** see BriefcaseConnection.openFile */\r\n openBriefcase: (_args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openStandalone: (_filePath: string, _openMode: OpenMode, _opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.close */\r\n closeIModel: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.saveChanges */\r\n saveChanges: (key: string, description?: string) => Promise<void>;\r\n /** see BriefcaseTxns.hasPendingTxns */\r\n hasPendingTxns: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isUndoPossible */\r\n isUndoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isRedoPossible */\r\n isRedoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.getUndoString */\r\n getUndoString: (key: string) => Promise<string>;\r\n /** see BriefcaseTxns.getRedoString */\r\n getRedoString: (key: string) => Promise<string>;\r\n\r\n /** see BriefcaseConnection.pullChanges */\r\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\r\n /** Cancels pull of changes. */\r\n cancelPullChangesRequest: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.pushChanges */\r\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\r\n /** Cancels currently pending or active generation of tile content. */\r\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\r\n\r\n /** Cancel element graphics requests.\r\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\r\n */\r\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\r\n\r\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\r\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\r\n\r\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\r\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\r\n reinstateTxn: (key: string) => Promise<IModelStatus>;\r\n restartTxnSession: (key: string) => Promise<void>;\r\n\r\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\r\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\r\n}\r\n\r\n"]}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import { AccessToken, GuidString } from "@itwin/core-bentley";
|
|
5
5
|
import { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from "./BriefcaseTypes";
|
|
6
6
|
/** @internal */
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export declare const nativeAppIpcStrings: {
|
|
8
|
+
readonly channelName: "itwinjs-core/nativeApp";
|
|
9
|
+
readonly notifyChannel: "itwinjs-core/nativeApp-notify";
|
|
10
|
+
};
|
|
10
11
|
/**
|
|
11
12
|
* Type of value for storage values
|
|
12
13
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAppProps.d.ts","sourceRoot":"","sources":["../../src/NativeAppPro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E,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnD;;;OAGG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD,sEAAsE;IACtE,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CACrI"}
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
* @module NativeApp
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.OverriddenBy = exports.InternetConnectivityStatus = exports.
|
|
10
|
+
exports.OverriddenBy = exports.InternetConnectivityStatus = exports.nativeAppIpcStrings = void 0;
|
|
11
11
|
/** @internal */
|
|
12
|
-
exports.
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
exports.nativeAppIpcStrings = {
|
|
13
|
+
channelName: "itwinjs-core/nativeApp",
|
|
14
|
+
notifyChannel: "itwinjs-core/nativeApp-notify",
|
|
15
|
+
};
|
|
15
16
|
/** Indicates whether or not the computer is currently connected to the internet.
|
|
16
17
|
* @beta
|
|
17
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AACH,QAAA,
|
|
1
|
+
{"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AACH,QAAA,mBAAmB,GAAG;IACjC,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,+BAA+B;CACtC,CAAC;AAQX;;GAEG;AACH,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,+EAAM,CAAA;IACN,iFAAO,CAAA;AACT,CAAC,EAHW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAGrC;AAED;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAO,CAAA;IACP,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { AccessToken, GuidString } from \"@itwin/core-bentley\";\r\nimport { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from \"./BriefcaseTypes\";\r\n\r\n/** @internal */\r\nexport const nativeAppIpcStrings = {\r\n channelName: \"itwinjs-core/nativeApp\",\r\n notifyChannel: \"itwinjs-core/nativeApp-notify\",\r\n} as const;\r\n\r\n/**\r\n * Type of value for storage values\r\n * @beta\r\n */\r\nexport type StorageValue = string | number | boolean | undefined | Uint8Array;\r\n\r\n/** Indicates whether or not the computer is currently connected to the internet.\r\n * @beta\r\n */\r\nexport enum InternetConnectivityStatus {\r\n Online,\r\n Offline,\r\n}\r\n\r\n/** Describes whether the user or the browser overrode the internet connectivity status.\r\n * @beta\r\n */\r\nexport enum OverriddenBy {\r\n Browser,\r\n User,\r\n}\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from NativeApp backend.\r\n * @internal\r\n */\r\nexport interface NativeAppNotifications {\r\n notifyInternetConnectivityChanged(status: InternetConnectivityStatus): void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of a Native App and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface NativeAppFunctions {\r\n\r\n /** If the user is signed in a valid access token will be returned. */\r\n getAccessToken: () => Promise<AccessToken | undefined>;\r\n\r\n /** Check if the internet is reachable. */\r\n checkInternetConnectivity(): Promise<InternetConnectivityStatus>;\r\n\r\n /** Manually override internet reachability for testing purposes.\r\n * @param _status New status to set on backend.\r\n */\r\n overrideInternetConnectivity(_overriddenBy: OverriddenBy, _status: InternetConnectivityStatus): Promise<void>;\r\n\r\n /** Acquire a new BriefcaseId for the supplied iModelId from iModelHub */\r\n acquireNewBriefcaseId(_iModelId: GuidString): Promise<number>;\r\n\r\n /** Get the filename in the briefcase cache for the supplied BriefcaseId and iModelId.\r\n * @note this merely returns the full path fileName. It does not test for the existence of the file.\r\n */\r\n getBriefcaseFileName(_props: BriefcaseProps): Promise<string>;\r\n\r\n /** Download a briefcase file for the supplied briefcase properties. */\r\n downloadBriefcase(_requestProps: RequestNewBriefcaseProps, _reportProgress: boolean, _interval?: number): Promise<LocalBriefcaseProps>;\r\n\r\n /**\r\n * Cancels the previously requested download of a briefcase\r\n * @param _key Key to locate the briefcase in the disk cache\r\n * @note returns true if the cancel request was acknowledged. false otherwise\r\n */\r\n requestCancelDownloadBriefcase(_fileName: string): Promise<boolean>;\r\n\r\n /**\r\n * Delete a previously downloaded briefcase. The briefcase must be closed.\r\n * @param _fileName the Briefcase to delete\r\n */\r\n deleteBriefcaseFiles(_fileName: string): Promise<void>;\r\n\r\n /**\r\n * Gets a list of all briefcases that were previously downloaded to the system briefcase cache.\r\n * @note returns array of LocalBriefcaseProps.\r\n */\r\n getCachedBriefcases(_iModelId?: GuidString): Promise<LocalBriefcaseProps[]>;\r\n\r\n /**\r\n * Open a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n */\r\n storageMgrOpen(_storageId: string): Promise<string>;\r\n\r\n /**\r\n * Close a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n * @param _deleteOnClose delete the storage on close\r\n */\r\n storageMgrClose(_storageId: string, _deleteOnClose: boolean): Promise<void>;\r\n\r\n /**\r\n * Get the names of available storages\r\n * @note returns list of storage names\r\n */\r\n storageMgrNames(): Promise<string[]>;\r\n\r\n /**\r\n * Get the value associated with a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @note returns key value or undefined\r\n */\r\n storageGet(_storageId: string, _key: string): Promise<StorageValue | undefined>;\r\n\r\n /**\r\n * Set a value for a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @param _value value to be set\r\n */\r\n storageSet(_storageId: string, _key: string, _value: StorageValue): Promise<void>;\r\n\r\n /**\r\n * Remove a key/value pair.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n */\r\n storageRemove(_storageId: string, _key: string): Promise<void>;\r\n\r\n /**\r\n * Get list of keys in a storage.\r\n * @param _storageId string identifier of storage\r\n * @note returns list of storage ids\r\n */\r\n storageKeys(_storageId: string): Promise<string[]>;\r\n\r\n /**\r\n * Delete all key/value pairs.\r\n * @param _storageId string identifier of storage\r\n */\r\n storageRemoveAll(_storageId: string): Promise<void>;\r\n\r\n /** get the type of a value for a key, or undefined if not present. */\r\n storageGetValueType(_storageId: string, _key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcSession.d.ts","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,OAAO,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,gBAAgB;AAChB,8BAAsB,UAAU;IAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAa;IACpC,WAAkB,MAAM,IAAI,UAAU,GAAG,SAAS,CAAyB;WAE7D,KAAK,CAAC,OAAO,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"IpcSession.d.ts","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,iBAAiB;;CAEpB,CAAC;AAEX,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,OAAO,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,gBAAgB;AAChB,8BAAsB,UAAU;IAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAa;IACpC,WAAkB,MAAM,IAAI,UAAU,GAAG,SAAS,CAAyB;WAE7D,KAAK,CAAC,OAAO,EAAE,UAAU;WAOzB,IAAI;aAIF,SAAS,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC;CACrE"}
|
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
* @module IpcSocket
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.IpcSession = void 0;
|
|
10
|
+
exports.IpcSession = exports.rpcOverIpcStrings = void 0;
|
|
11
|
+
/** @internal */
|
|
12
|
+
exports.rpcOverIpcStrings = {
|
|
13
|
+
channelName: "itwinjs-core/rpc-over-ipc",
|
|
14
|
+
};
|
|
11
15
|
/** @internal */
|
|
12
16
|
class IpcSession {
|
|
13
17
|
static get active() { return this._active; }
|
|
14
18
|
static start(session) {
|
|
15
|
-
if (this._active)
|
|
19
|
+
if (this._active)
|
|
16
20
|
return;
|
|
17
|
-
}
|
|
18
21
|
this._active = session;
|
|
19
22
|
}
|
|
20
23
|
static stop() {
|
|
21
|
-
if (!this._active) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
24
|
this._active = undefined;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,2BAA2B;CAChC,CAAC;AAUX,gBAAgB;AAChB,MAAsB,UAAU;IAEvB,MAAM,KAAK,MAAM,KAA6B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEpE,MAAM,CAAC,KAAK,CAAC,OAAmB;QACrC,IAAI,IAAI,CAAC,OAAO;YACd,OAAO;QAET,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,IAAI;QAChB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;CAGF;AAhBD,gCAgBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\n/** @internal */\r\nexport const rpcOverIpcStrings = {\r\n channelName: \"itwinjs-core/rpc-over-ipc\",\r\n} as const;\r\n\r\n/** @internal */\r\nexport interface InterceptedRpcRequest {\r\n definition: { interfaceName: string, interfaceVersion: string };\r\n operation: string;\r\n parameters: any[];\r\n context: { [index: string]: string };\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcSession {\r\n private static _active?: IpcSession;\r\n public static get active(): IpcSession | undefined { return this._active; }\r\n\r\n public static start(session: IpcSession) {\r\n if (this._active)\r\n return;\r\n\r\n this._active = session;\r\n }\r\n\r\n public static stop() {\r\n this._active = undefined;\r\n }\r\n\r\n public abstract handleRpc(info: InterceptedRpcRequest): Promise<any>;\r\n}\r\n"]}
|
package/lib/esm/IpcAppProps.d.ts
CHANGED
|
@@ -45,12 +45,12 @@ export interface ModelIdAndGeometryGuid {
|
|
|
45
45
|
guid: GuidString;
|
|
46
46
|
}
|
|
47
47
|
/** @internal */
|
|
48
|
-
export declare
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
48
|
+
export declare const ipcAppChannels: {
|
|
49
|
+
readonly functions: "itwinjs-core/ipc-app";
|
|
50
|
+
readonly appNotify: "itwinjs-core/ipcApp-notify";
|
|
51
|
+
readonly txns: "itwinjs-core/txns";
|
|
52
|
+
readonly editingScope: "itwinjs-core/editing-scope";
|
|
53
|
+
};
|
|
54
54
|
/**
|
|
55
55
|
* Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.
|
|
56
56
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC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,CAAC,CAAC;IAE/D,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3E,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACrD,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD,4FAA4F;IAC5F,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D"}
|
package/lib/esm/IpcAppProps.js
CHANGED
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
/** Get IPC channel name used for reporting progress of pulling changes into iModel.
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export const getPullChangesIpcChannel = (iModelId) => `${
|
|
11
|
+
export const getPullChangesIpcChannel = (iModelId) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;
|
|
12
12
|
/** @internal */
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})(IpcAppChannel || (IpcAppChannel = {}));
|
|
13
|
+
export const ipcAppChannels = {
|
|
14
|
+
functions: "itwinjs-core/ipc-app",
|
|
15
|
+
appNotify: "itwinjs-core/ipcApp-notify",
|
|
16
|
+
txns: "itwinjs-core/txns",
|
|
17
|
+
editingScope: "itwinjs-core/editing-scope",
|
|
18
|
+
};
|
|
20
19
|
//# sourceMappingURL=IpcAppProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,cAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAwBpH,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\r\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { OpenBriefcaseProps } from \"./BriefcaseTypes\";\r\nimport { ChangedEntities } from \"./ChangedEntities\";\r\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, StandaloneOpenOptions } from \"./IModel\";\r\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\r\n\r\n/** Options for pulling changes into iModel.\r\n * @internal\r\n */\r\nexport interface PullChangesOptions {\r\n /** Enables progress reporting. */\r\n reportProgress?: boolean;\r\n /** Interval for reporting progress (in milliseconds). */\r\n progressInterval?: number;\r\n /** Enables checks for abort. */\r\n enableCancellation?: boolean;\r\n}\r\n\r\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\r\n * @internal\r\n */\r\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\r\n\r\n/** Identifies a list of tile content Ids belonging to a single tile tree.\r\n * @internal\r\n */\r\nexport interface TileTreeContentIds {\r\n treeId: string;\r\n contentIds: string[];\r\n}\r\n\r\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\r\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelIdAndGeometryGuid {\r\n /** The model's Id. */\r\n id: Id64String;\r\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\r\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\r\n */\r\n guid: GuidString;\r\n}\r\n\r\n/** @internal */\r\nexport const ipcAppChannels = {\r\n functions: \"itwinjs-core/ipc-app\",\r\n appNotify: \"itwinjs-core/ipcApp-notify\",\r\n txns: \"itwinjs-core/txns\",\r\n editingScope: \"itwinjs-core/editing-scope\",\r\n} as const;\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\r\n * @internal\r\n */\r\nexport interface IpcAppNotifications {\r\n notifyApp: () => void;\r\n}\r\n\r\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\r\n * @see [TxnManager]($backend) for the source of these events.\r\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\r\n * @internal\r\n */\r\nexport interface TxnNotifications {\r\n notifyElementsChanged: (changes: ChangedEntities) => void;\r\n notifyModelsChanged: (changes: ChangedEntities) => void;\r\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\r\n notifyCommit: () => void;\r\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\r\n notifyChangesApplied: () => void;\r\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\r\n notifyAfterUndoRedo: (isUndo: boolean) => void;\r\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n\r\n notifyIModelNameChanged: (name: string) => void;\r\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\r\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\r\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\r\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\r\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\r\n}\r\n\r\n/**\r\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\r\n * @internal\r\n */\r\nexport interface EditingScopeNotifications {\r\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface IpcAppFunctions {\r\n /** Send frontend log to backend.\r\n * @param _level Specify log level.\r\n * @param _category Specify log category.\r\n * @param _message Specify log message.\r\n * @param _metaData metaData if any.\r\n */\r\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\r\n\r\n /** see BriefcaseConnection.openFile */\r\n openBriefcase: (_args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openStandalone: (_filePath: string, _openMode: OpenMode, _opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.close */\r\n closeIModel: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.saveChanges */\r\n saveChanges: (key: string, description?: string) => Promise<void>;\r\n /** see BriefcaseTxns.hasPendingTxns */\r\n hasPendingTxns: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isUndoPossible */\r\n isUndoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isRedoPossible */\r\n isRedoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.getUndoString */\r\n getUndoString: (key: string) => Promise<string>;\r\n /** see BriefcaseTxns.getRedoString */\r\n getRedoString: (key: string) => Promise<string>;\r\n\r\n /** see BriefcaseConnection.pullChanges */\r\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\r\n /** Cancels pull of changes. */\r\n cancelPullChangesRequest: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.pushChanges */\r\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\r\n /** Cancels currently pending or active generation of tile content. */\r\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\r\n\r\n /** Cancel element graphics requests.\r\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\r\n */\r\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\r\n\r\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\r\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\r\n\r\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\r\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\r\n reinstateTxn: (key: string) => Promise<IModelStatus>;\r\n restartTxnSession: (key: string) => Promise<void>;\r\n\r\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\r\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\r\n}\r\n\r\n"]}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import { AccessToken, GuidString } from "@itwin/core-bentley";
|
|
5
5
|
import { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from "./BriefcaseTypes";
|
|
6
6
|
/** @internal */
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export declare const nativeAppIpcStrings: {
|
|
8
|
+
readonly channelName: "itwinjs-core/nativeApp";
|
|
9
|
+
readonly notifyChannel: "itwinjs-core/nativeApp-notify";
|
|
10
|
+
};
|
|
10
11
|
/**
|
|
11
12
|
* Type of value for storage values
|
|
12
13
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAppProps.d.ts","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjG,gBAAgB;AAChB,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"NativeAppProps.d.ts","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjG,gBAAgB;AAChB,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9E;;GAEG;AACH,oBAAY,0BAA0B;IACpC,MAAM,IAAA;IACN,OAAO,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,YAAY;IACtB,OAAO,IAAA;IACP,IAAI,IAAA;CACL;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,iCAAiC,CAAC,MAAM,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAC7E;AAED;;;GAGG;AACH,MAAM,WAA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AAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAEhF;;;;;OAKG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/D;;;;OAIG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnD;;;OAGG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD,sEAAsE;IACtE,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CACrI"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* @module NativeApp
|
|
7
7
|
*/
|
|
8
8
|
/** @internal */
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export const nativeAppIpcStrings = {
|
|
10
|
+
channelName: "itwinjs-core/nativeApp",
|
|
11
|
+
notifyChannel: "itwinjs-core/nativeApp-notify",
|
|
12
|
+
};
|
|
12
13
|
/** Indicates whether or not the computer is currently connected to the internet.
|
|
13
14
|
* @beta
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"NativeAppProps.js","sourceRoot":"","sources":["../../src/NativeAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,+BAA+B;CACtC,CAAC;AAQX;;GAEG;AACH,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,+EAAM,CAAA;IACN,iFAAO,CAAA;AACT,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qDAAO,CAAA;IACP,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { AccessToken, GuidString } from \"@itwin/core-bentley\";\r\nimport { BriefcaseProps, LocalBriefcaseProps, RequestNewBriefcaseProps } from \"./BriefcaseTypes\";\r\n\r\n/** @internal */\r\nexport const nativeAppIpcStrings = {\r\n channelName: \"itwinjs-core/nativeApp\",\r\n notifyChannel: \"itwinjs-core/nativeApp-notify\",\r\n} as const;\r\n\r\n/**\r\n * Type of value for storage values\r\n * @beta\r\n */\r\nexport type StorageValue = string | number | boolean | undefined | Uint8Array;\r\n\r\n/** Indicates whether or not the computer is currently connected to the internet.\r\n * @beta\r\n */\r\nexport enum InternetConnectivityStatus {\r\n Online,\r\n Offline,\r\n}\r\n\r\n/** Describes whether the user or the browser overrode the internet connectivity status.\r\n * @beta\r\n */\r\nexport enum OverriddenBy {\r\n Browser,\r\n User,\r\n}\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from NativeApp backend.\r\n * @internal\r\n */\r\nexport interface NativeAppNotifications {\r\n notifyInternetConnectivityChanged(status: InternetConnectivityStatus): void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of a Native App and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface NativeAppFunctions {\r\n\r\n /** If the user is signed in a valid access token will be returned. */\r\n getAccessToken: () => Promise<AccessToken | undefined>;\r\n\r\n /** Check if the internet is reachable. */\r\n checkInternetConnectivity(): Promise<InternetConnectivityStatus>;\r\n\r\n /** Manually override internet reachability for testing purposes.\r\n * @param _status New status to set on backend.\r\n */\r\n overrideInternetConnectivity(_overriddenBy: OverriddenBy, _status: InternetConnectivityStatus): Promise<void>;\r\n\r\n /** Acquire a new BriefcaseId for the supplied iModelId from iModelHub */\r\n acquireNewBriefcaseId(_iModelId: GuidString): Promise<number>;\r\n\r\n /** Get the filename in the briefcase cache for the supplied BriefcaseId and iModelId.\r\n * @note this merely returns the full path fileName. It does not test for the existence of the file.\r\n */\r\n getBriefcaseFileName(_props: BriefcaseProps): Promise<string>;\r\n\r\n /** Download a briefcase file for the supplied briefcase properties. */\r\n downloadBriefcase(_requestProps: RequestNewBriefcaseProps, _reportProgress: boolean, _interval?: number): Promise<LocalBriefcaseProps>;\r\n\r\n /**\r\n * Cancels the previously requested download of a briefcase\r\n * @param _key Key to locate the briefcase in the disk cache\r\n * @note returns true if the cancel request was acknowledged. false otherwise\r\n */\r\n requestCancelDownloadBriefcase(_fileName: string): Promise<boolean>;\r\n\r\n /**\r\n * Delete a previously downloaded briefcase. The briefcase must be closed.\r\n * @param _fileName the Briefcase to delete\r\n */\r\n deleteBriefcaseFiles(_fileName: string): Promise<void>;\r\n\r\n /**\r\n * Gets a list of all briefcases that were previously downloaded to the system briefcase cache.\r\n * @note returns array of LocalBriefcaseProps.\r\n */\r\n getCachedBriefcases(_iModelId?: GuidString): Promise<LocalBriefcaseProps[]>;\r\n\r\n /**\r\n * Open a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n */\r\n storageMgrOpen(_storageId: string): Promise<string>;\r\n\r\n /**\r\n * Close a key/value pair base storage\r\n * @param _storageId string identifier of storage\r\n * @param _deleteOnClose delete the storage on close\r\n */\r\n storageMgrClose(_storageId: string, _deleteOnClose: boolean): Promise<void>;\r\n\r\n /**\r\n * Get the names of available storages\r\n * @note returns list of storage names\r\n */\r\n storageMgrNames(): Promise<string[]>;\r\n\r\n /**\r\n * Get the value associated with a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @note returns key value or undefined\r\n */\r\n storageGet(_storageId: string, _key: string): Promise<StorageValue | undefined>;\r\n\r\n /**\r\n * Set a value for a key.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n * @param _value value to be set\r\n */\r\n storageSet(_storageId: string, _key: string, _value: StorageValue): Promise<void>;\r\n\r\n /**\r\n * Remove a key/value pair.\r\n * @param _storageId string identifier of storage\r\n * @param _key key identifier for value\r\n */\r\n storageRemove(_storageId: string, _key: string): Promise<void>;\r\n\r\n /**\r\n * Get list of keys in a storage.\r\n * @param _storageId string identifier of storage\r\n * @note returns list of storage ids\r\n */\r\n storageKeys(_storageId: string): Promise<string[]>;\r\n\r\n /**\r\n * Delete all key/value pairs.\r\n * @param _storageId string identifier of storage\r\n */\r\n storageRemoveAll(_storageId: string): Promise<void>;\r\n\r\n /** get the type of a value for a key, or undefined if not present. */\r\n storageGetValueType(_storageId: string, _key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcSession.d.ts","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,OAAO,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,gBAAgB;AAChB,8BAAsB,UAAU;IAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAa;IACpC,WAAkB,MAAM,IAAI,UAAU,GAAG,SAAS,CAAyB;WAE7D,KAAK,CAAC,OAAO,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"IpcSession.d.ts","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gBAAgB;AAChB,eAAO,MAAM,iBAAiB;;CAEpB,CAAC;AAEX,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,OAAO,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,gBAAgB;AAChB,8BAAsB,UAAU;IAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAa;IACpC,WAAkB,MAAM,IAAI,UAAU,GAAG,SAAS,CAAyB;WAE7D,KAAK,CAAC,OAAO,EAAE,UAAU;WAOzB,IAAI;aAIF,SAAS,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC;CACrE"}
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
* @module IpcSocket
|
|
7
7
|
*/
|
|
8
8
|
/** @internal */
|
|
9
|
+
export const rpcOverIpcStrings = {
|
|
10
|
+
channelName: "itwinjs-core/rpc-over-ipc",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
9
13
|
export class IpcSession {
|
|
10
14
|
static get active() { return this._active; }
|
|
11
15
|
static start(session) {
|
|
12
|
-
if (this._active)
|
|
16
|
+
if (this._active)
|
|
13
17
|
return;
|
|
14
|
-
}
|
|
15
18
|
this._active = session;
|
|
16
19
|
}
|
|
17
20
|
static stop() {
|
|
18
|
-
if (!this._active) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
21
|
this._active = undefined;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;
|
|
1
|
+
{"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,2BAA2B;CAChC,CAAC;AAUX,gBAAgB;AAChB,MAAM,OAAgB,UAAU;IAEvB,MAAM,KAAK,MAAM,KAA6B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEpE,MAAM,CAAC,KAAK,CAAC,OAAmB;QACrC,IAAI,IAAI,CAAC,OAAO;YACd,OAAO;QAET,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,IAAI;QAChB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;CAGF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\n/** @internal */\r\nexport const rpcOverIpcStrings = {\r\n channelName: \"itwinjs-core/rpc-over-ipc\",\r\n} as const;\r\n\r\n/** @internal */\r\nexport interface InterceptedRpcRequest {\r\n definition: { interfaceName: string, interfaceVersion: string };\r\n operation: string;\r\n parameters: any[];\r\n context: { [index: string]: string };\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcSession {\r\n private static _active?: IpcSession;\r\n public static get active(): IpcSession | undefined { return this._active; }\r\n\r\n public static start(session: IpcSession) {\r\n if (this._active)\r\n return;\r\n\r\n this._active = session;\r\n }\r\n\r\n public static stop() {\r\n this._active = undefined;\r\n }\r\n\r\n public abstract handleRpc(info: InterceptedRpcRequest): Promise<any>;\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-common",
|
|
3
|
-
"version": "4.1.0-dev.
|
|
3
|
+
"version": "4.1.0-dev.8",
|
|
4
4
|
"description": "iTwin.js components common to frontend and backend",
|
|
5
5
|
"main": "lib/cjs/core-common.js",
|
|
6
6
|
"module": "lib/esm/core-common.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"js-base64": "^3.6.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@itwin/core-bentley": "^4.1.0-dev.
|
|
32
|
-
"@itwin/core-geometry": "^4.1.0-dev.
|
|
31
|
+
"@itwin/core-bentley": "^4.1.0-dev.8",
|
|
32
|
+
"@itwin/core-geometry": "^4.1.0-dev.8"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@itwin/eslint-plugin": "^4.0.0-dev.33",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"nyc": "^15.1.0",
|
|
44
44
|
"rimraf": "^3.0.2",
|
|
45
45
|
"typescript": "~5.0.2",
|
|
46
|
-
"@itwin/build-tools": "4.1.0-dev.
|
|
47
|
-
"@itwin/core-bentley": "4.1.0-dev.
|
|
48
|
-
"@itwin/core-geometry": "4.1.0-dev.
|
|
46
|
+
"@itwin/build-tools": "4.1.0-dev.8",
|
|
47
|
+
"@itwin/core-bentley": "4.1.0-dev.8",
|
|
48
|
+
"@itwin/core-geometry": "4.1.0-dev.8"
|
|
49
49
|
},
|
|
50
50
|
"nyc": {
|
|
51
51
|
"extends": "./node_modules/@itwin/build-tools/.nycrc",
|