@itwin/core-mobile 4.0.0-dev.8 → 4.0.0-dev.81

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/README.md +1 -1
  3. package/lib/cjs/MobileBackend.d.ts +7 -7
  4. package/lib/cjs/MobileBackend.js +28 -24
  5. package/lib/cjs/MobileBackend.js.map +1 -1
  6. package/lib/cjs/MobileFrontend.d.ts +5 -5
  7. package/lib/cjs/MobileFrontend.js +25 -21
  8. package/lib/cjs/MobileFrontend.js.map +1 -1
  9. package/lib/cjs/__DOC_ONLY__.d.ts +33 -33
  10. package/lib/cjs/__DOC_ONLY__.js +56 -52
  11. package/lib/cjs/__DOC_ONLY__.js.map +1 -1
  12. package/lib/cjs/backend/MobileAuthorizationBackend.d.ts +17 -17
  13. package/lib/cjs/backend/MobileAuthorizationBackend.js +46 -46
  14. package/lib/cjs/backend/MobileAuthorizationBackend.js.map +1 -1
  15. package/lib/cjs/backend/MobileFileHandler.d.ts +112 -112
  16. package/lib/cjs/backend/MobileFileHandler.d.ts.map +1 -1
  17. package/lib/cjs/backend/MobileFileHandler.js +263 -263
  18. package/lib/cjs/backend/MobileFileHandler.js.map +1 -1
  19. package/lib/cjs/backend/MobileHost.d.ts +72 -72
  20. package/lib/cjs/backend/MobileHost.d.ts.map +1 -1
  21. package/lib/cjs/backend/MobileHost.js +149 -156
  22. package/lib/cjs/backend/MobileHost.js.map +1 -1
  23. package/lib/cjs/backend/MobileRpcServer.d.ts +19 -19
  24. package/lib/cjs/backend/MobileRpcServer.js +156 -156
  25. package/lib/cjs/backend/MobileRpcServer.js.map +1 -1
  26. package/lib/cjs/backend/Request.d.ts +117 -149
  27. package/lib/cjs/backend/Request.d.ts.map +1 -1
  28. package/lib/cjs/backend/Request.js +255 -267
  29. package/lib/cjs/backend/Request.js.map +1 -1
  30. package/lib/cjs/common/MobileAppChannel.d.ts +4 -4
  31. package/lib/cjs/common/MobileAppChannel.js +11 -11
  32. package/lib/cjs/common/MobileAppChannel.js.map +1 -1
  33. package/lib/cjs/common/MobileAppProps.d.ts +35 -35
  34. package/lib/cjs/common/MobileAppProps.d.ts.map +1 -1
  35. package/lib/cjs/common/MobileAppProps.js +26 -26
  36. package/lib/cjs/common/MobileAppProps.js.map +1 -1
  37. package/lib/cjs/common/MobileEventLoop.d.ts +11 -11
  38. package/lib/cjs/common/MobileEventLoop.js +30 -30
  39. package/lib/cjs/common/MobileEventLoop.js.map +1 -1
  40. package/lib/cjs/common/MobileIpc.d.ts +17 -17
  41. package/lib/cjs/common/MobileIpc.js +70 -70
  42. package/lib/cjs/common/MobileIpc.js.map +1 -1
  43. package/lib/cjs/common/MobilePush.d.ts +20 -20
  44. package/lib/cjs/common/MobilePush.js +53 -53
  45. package/lib/cjs/common/MobilePush.js.map +1 -1
  46. package/lib/cjs/common/MobileRpcManager.d.ts +40 -40
  47. package/lib/cjs/common/MobileRpcManager.js +110 -110
  48. package/lib/cjs/common/MobileRpcManager.js.map +1 -1
  49. package/lib/cjs/common/MobileRpcProtocol.d.ts +58 -58
  50. package/lib/cjs/common/MobileRpcProtocol.d.ts.map +1 -1
  51. package/lib/cjs/common/MobileRpcProtocol.js +277 -277
  52. package/lib/cjs/common/MobileRpcProtocol.js.map +1 -1
  53. package/lib/cjs/common/MobileRpcRequest.d.ts +20 -20
  54. package/lib/cjs/common/MobileRpcRequest.js +50 -50
  55. package/lib/cjs/common/MobileRpcRequest.js.map +1 -1
  56. package/lib/cjs/frontend/MobileApp.d.ts +23 -23
  57. package/lib/cjs/frontend/MobileApp.d.ts.map +1 -1
  58. package/lib/cjs/frontend/MobileApp.js +79 -80
  59. package/lib/cjs/frontend/MobileApp.js.map +1 -1
  60. package/lib/cjs/frontend/MobileAuthorizationFrontend.d.ts +17 -17
  61. package/lib/cjs/frontend/MobileAuthorizationFrontend.d.ts.map +1 -1
  62. package/lib/cjs/frontend/MobileAuthorizationFrontend.js +54 -46
  63. package/lib/cjs/frontend/MobileAuthorizationFrontend.js.map +1 -1
  64. package/lib/cjs/test/ios/MobilePlatform.test.d.ts +1 -1
  65. package/lib/cjs/test/ios/MobilePlatform.test.js +84 -84
  66. package/lib/cjs/test/ios/MobilePlatform.test.js.map +1 -1
  67. package/package.json +18 -26
package/CHANGELOG.md CHANGED
@@ -1,6 +1,53 @@
1
1
  # Change Log - @itwin/core-mobile
2
2
 
3
- This log was last generated on Thu, 26 Jan 2023 22:53:27 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 12 Apr 2023 13:12:42 GMT and should not be manually modified.
4
+
5
+ ## 3.7.2
6
+ Wed, 12 Apr 2023 13:12:42 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.7.1
11
+ Mon, 03 Apr 2023 15:15:37 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 3.7.0
16
+ Wed, 29 Mar 2023 15:02:27 GMT
17
+
18
+ ### Updates
19
+
20
+ - Fix mobile getAccessToken error handling
21
+ - React to IModelApp.rpcInterfaces and BentleyCloudRpcManager changes.
22
+
23
+ ## 3.6.3
24
+ Mon, 27 Mar 2023 16:26:47 GMT
25
+
26
+ _Version update only_
27
+
28
+ ## 3.6.2
29
+ Fri, 17 Mar 2023 17:52:32 GMT
30
+
31
+ _Version update only_
32
+
33
+ ## 3.6.1
34
+ Fri, 24 Feb 2023 22:00:48 GMT
35
+
36
+ _Version update only_
37
+
38
+ ## 3.6.0
39
+ Wed, 08 Feb 2023 14:58:40 GMT
40
+
41
+ ### Updates
42
+
43
+ - Fixed bug which prevented mobile lifecycle events from being received on frontend.
44
+ - Fix for mobile app lifcycle crash
45
+ - React to RPC deprecations.
46
+
47
+ ## 3.5.6
48
+ Fri, 24 Feb 2023 16:02:47 GMT
49
+
50
+ _Version update only_
4
51
 
5
52
  ## 3.5.5
6
53
  Thu, 26 Jan 2023 22:53:27 GMT
package/README.md CHANGED
@@ -4,7 +4,7 @@ Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md
4
4
 
5
5
  ## Description
6
6
 
7
- The __@itwin/core-electron__ package contains the electron utilities to write an iTwin.js application based on Electron.
7
+ The __@itwin/core-mobile__ package contains the mobile utilities to write an iTwin.js application for mobile devices.
8
8
 
9
9
  ## Documentation
10
10
 
@@ -1,8 +1,8 @@
1
- export * from "./backend/MobileAuthorizationBackend";
2
- export * from "./backend/MobileFileHandler";
3
- export * from "./backend/MobileHost";
4
- export * from "./common/MobileAppProps";
5
- export * from "./common/MobileRpcManager";
6
- export * from "./common/MobileRpcProtocol";
7
- export * from "./common/MobileRpcRequest";
1
+ export * from "./backend/MobileAuthorizationBackend";
2
+ export * from "./backend/MobileFileHandler";
3
+ export * from "./backend/MobileHost";
4
+ export * from "./common/MobileAppProps";
5
+ export * from "./common/MobileRpcManager";
6
+ export * from "./common/MobileRpcProtocol";
7
+ export * from "./common/MobileRpcRequest";
8
8
  //# sourceMappingURL=MobileBackend.d.ts.map
@@ -1,25 +1,29 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // Barrel file for backend of a mobile application
18
- __exportStar(require("./backend/MobileAuthorizationBackend"), exports);
19
- __exportStar(require("./backend/MobileFileHandler"), exports);
20
- __exportStar(require("./backend/MobileHost"), exports);
21
- __exportStar(require("./common/MobileAppProps"), exports);
22
- __exportStar(require("./common/MobileRpcManager"), exports);
23
- __exportStar(require("./common/MobileRpcProtocol"), exports);
24
- __exportStar(require("./common/MobileRpcRequest"), exports);
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ // Barrel file for backend of a mobile application
22
+ __exportStar(require("./backend/MobileAuthorizationBackend"), exports);
23
+ __exportStar(require("./backend/MobileFileHandler"), exports);
24
+ __exportStar(require("./backend/MobileHost"), exports);
25
+ __exportStar(require("./common/MobileAppProps"), exports);
26
+ __exportStar(require("./common/MobileRpcManager"), exports);
27
+ __exportStar(require("./common/MobileRpcProtocol"), exports);
28
+ __exportStar(require("./common/MobileRpcRequest"), exports);
25
29
  //# sourceMappingURL=MobileBackend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,uEAAqD;AACrD,8DAA4C;AAC5C,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C","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\r\n// Barrel file for backend of a mobile application\r\n\r\nexport * from \"./backend/MobileAuthorizationBackend\";\r\nexport * from \"./backend/MobileFileHandler\";\r\nexport * from \"./backend/MobileHost\";\r\nexport * from \"./common/MobileAppProps\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./common/MobileRpcProtocol\";\r\nexport * from \"./common/MobileRpcRequest\";\r\n"]}
1
+ {"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,uEAAqD;AACrD,8DAA4C;AAC5C,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// Barrel file for backend of a mobile application\n\nexport * from \"./backend/MobileAuthorizationBackend\";\nexport * from \"./backend/MobileFileHandler\";\nexport * from \"./backend/MobileHost\";\nexport * from \"./common/MobileAppProps\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./common/MobileRpcProtocol\";\nexport * from \"./common/MobileRpcRequest\";\n"]}
@@ -1,6 +1,6 @@
1
- export * from "./common/MobileAppProps";
2
- export * from "./common/MobileRpcManager";
3
- export * from "./common/MobileRpcProtocol";
4
- export * from "./common/MobileRpcRequest";
5
- export * from "./frontend/MobileApp";
1
+ export * from "./common/MobileAppProps";
2
+ export * from "./common/MobileRpcManager";
3
+ export * from "./common/MobileRpcProtocol";
4
+ export * from "./common/MobileRpcRequest";
5
+ export * from "./frontend/MobileApp";
6
6
  //# sourceMappingURL=MobileFrontend.d.ts.map
@@ -1,22 +1,26 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./common/MobileAppProps"), exports);
18
- __exportStar(require("./common/MobileRpcManager"), exports);
19
- __exportStar(require("./common/MobileRpcProtocol"), exports);
20
- __exportStar(require("./common/MobileRpcRequest"), exports);
21
- __exportStar(require("./frontend/MobileApp"), exports);
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./common/MobileAppProps"), exports);
22
+ __exportStar(require("./common/MobileRpcManager"), exports);
23
+ __exportStar(require("./common/MobileRpcProtocol"), exports);
24
+ __exportStar(require("./common/MobileRpcRequest"), exports);
25
+ __exportStar(require("./frontend/MobileApp"), exports);
22
26
  //# sourceMappingURL=MobileFrontend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C;AAC1C,uDAAqC","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\r\nexport * from \"./common/MobileAppProps\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./common/MobileRpcProtocol\";\r\nexport * from \"./common/MobileRpcRequest\";\r\nexport * from \"./frontend/MobileApp\";\r\n"]}
1
+ {"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C;AAC1C,uDAAqC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./common/MobileAppProps\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./common/MobileRpcProtocol\";\nexport * from \"./common/MobileRpcRequest\";\nexport * from \"./frontend/MobileApp\";\n"]}
@@ -1,34 +1,34 @@
1
- export * from "./MobileBackend";
2
- export * from "./MobileFrontend";
3
- /** @docs-package-description
4
- * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
5
- */
6
- /**
7
- * @docs-group-description MobileApp
8
- * Classes for configuring and administering an iTwin.js application on mobile.
9
- */
10
- /**
11
- * @docs-group-description MobileAppProps
12
- * Configuration options for use with MobileApp.
13
- */
14
- /**
15
- * @docs-group-description MobileHost
16
- * Classes for configuring and administering the backend host on mobile.
17
- */
18
- /**
19
- * @docs-group-description MobileRpcManager
20
- * Coordinates usage of RPC interfaces for mobile applications.
21
- */
22
- /**
23
- * @docs-group-description MobileRpcServer
24
- * Provides RPC handling for the backend host on mobile.
25
- */
26
- /**
27
- * @docs-group-description iModelHub
28
- * Classes for interacting with iModelHub.
29
- */
30
- /**
31
- * @docs-group-description RpcInterface
32
- * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
33
- */
1
+ export * from "./MobileBackend";
2
+ export * from "./MobileFrontend";
3
+ /** @docs-package-description
4
+ * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
5
+ */
6
+ /**
7
+ * @docs-group-description MobileApp
8
+ * Classes for configuring and administering an iTwin.js application on mobile.
9
+ */
10
+ /**
11
+ * @docs-group-description MobileAppProps
12
+ * Configuration options for use with MobileApp.
13
+ */
14
+ /**
15
+ * @docs-group-description MobileHost
16
+ * Classes for configuring and administering the backend host on mobile.
17
+ */
18
+ /**
19
+ * @docs-group-description MobileRpcManager
20
+ * Coordinates usage of RPC interfaces for mobile applications.
21
+ */
22
+ /**
23
+ * @docs-group-description MobileRpcServer
24
+ * Provides RPC handling for the backend host on mobile.
25
+ */
26
+ /**
27
+ * @docs-group-description iModelHub
28
+ * Classes for interacting with iModelHub.
29
+ */
30
+ /**
31
+ * @docs-group-description RpcInterface
32
+ * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
33
+ */
34
34
  //# sourceMappingURL=__DOC_ONLY__.d.ts.map
@@ -1,53 +1,57 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.
18
- // It imports both frontend and backend code, which is not legal anywhere.
19
- // Do not import it in real code!
20
- __exportStar(require("./MobileBackend"), exports);
21
- __exportStar(require("./MobileFrontend"), exports);
22
- /** @docs-package-description
23
- * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
24
- */
25
- /**
26
- * @docs-group-description MobileApp
27
- * Classes for configuring and administering an iTwin.js application on mobile.
28
- */
29
- /**
30
- * @docs-group-description MobileAppProps
31
- * Configuration options for use with MobileApp.
32
- */
33
- /**
34
- * @docs-group-description MobileHost
35
- * Classes for configuring and administering the backend host on mobile.
36
- */
37
- /**
38
- * @docs-group-description MobileRpcManager
39
- * Coordinates usage of RPC interfaces for mobile applications.
40
- */
41
- /**
42
- * @docs-group-description MobileRpcServer
43
- * Provides RPC handling for the backend host on mobile.
44
- */
45
- /**
46
- * @docs-group-description iModelHub
47
- * Classes for interacting with iModelHub.
48
- */
49
- /**
50
- * @docs-group-description RpcInterface
51
- * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
52
- */
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ // THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.
22
+ // It imports both frontend and backend code, which is not legal anywhere.
23
+ // Do not import it in real code!
24
+ __exportStar(require("./MobileBackend"), exports);
25
+ __exportStar(require("./MobileFrontend"), exports);
26
+ /** @docs-package-description
27
+ * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.
28
+ */
29
+ /**
30
+ * @docs-group-description MobileApp
31
+ * Classes for configuring and administering an iTwin.js application on mobile.
32
+ */
33
+ /**
34
+ * @docs-group-description MobileAppProps
35
+ * Configuration options for use with MobileApp.
36
+ */
37
+ /**
38
+ * @docs-group-description MobileHost
39
+ * Classes for configuring and administering the backend host on mobile.
40
+ */
41
+ /**
42
+ * @docs-group-description MobileRpcManager
43
+ * Coordinates usage of RPC interfaces for mobile applications.
44
+ */
45
+ /**
46
+ * @docs-group-description MobileRpcServer
47
+ * Provides RPC handling for the backend host on mobile.
48
+ */
49
+ /**
50
+ * @docs-group-description iModelHub
51
+ * Classes for interacting with iModelHub.
52
+ */
53
+ /**
54
+ * @docs-group-description RpcInterface
55
+ * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.
56
+ */
53
57
  //# sourceMappingURL=__DOC_ONLY__.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,kDAAgC;AAChC,mDAAiC;AAEjC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\r\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\r\n// It imports both frontend and backend code, which is not legal anywhere.\r\n// Do not import it in real code!\r\n\r\nexport * from \"./MobileBackend\";\r\nexport * from \"./MobileFrontend\";\r\n\r\n/** @docs-package-description\r\n * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.\r\n */\r\n/**\r\n * @docs-group-description MobileApp\r\n * Classes for configuring and administering an iTwin.js application on mobile.\r\n */\r\n/**\r\n * @docs-group-description MobileAppProps\r\n * Configuration options for use with MobileApp.\r\n */\r\n/**\r\n * @docs-group-description MobileHost\r\n * Classes for configuring and administering the backend host on mobile.\r\n */\r\n/**\r\n * @docs-group-description MobileRpcManager\r\n * Coordinates usage of RPC interfaces for mobile applications.\r\n */\r\n/**\r\n * @docs-group-description MobileRpcServer\r\n * Provides RPC handling for the backend host on mobile.\r\n */\r\n/**\r\n * @docs-group-description iModelHub\r\n * Classes for interacting with iModelHub.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.\r\n */\r\n"]}
1
+ {"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,kDAAgC;AAChC,mDAAiC;AAEjC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\n// It imports both frontend and backend code, which is not legal anywhere.\n// Do not import it in real code!\n\nexport * from \"./MobileBackend\";\nexport * from \"./MobileFrontend\";\n\n/** @docs-package-description\n * The core-mobile package provides the necessary tools to run an ITwin.js application on iOS and Android. It provides a layer of communication between native tooling for mobile apps and ITwin.js core.\n */\n/**\n * @docs-group-description MobileApp\n * Classes for configuring and administering an iTwin.js application on mobile.\n */\n/**\n * @docs-group-description MobileAppProps\n * Configuration options for use with MobileApp.\n */\n/**\n * @docs-group-description MobileHost\n * Classes for configuring and administering the backend host on mobile.\n */\n/**\n * @docs-group-description MobileRpcManager\n * Coordinates usage of RPC interfaces for mobile applications.\n */\n/**\n * @docs-group-description MobileRpcServer\n * Provides RPC handling for the backend host on mobile.\n */\n/**\n * @docs-group-description iModelHub\n * Classes for interacting with iModelHub.\n */\n/**\n * @docs-group-description RpcInterface\n * Used to define a set of operations exposed by a service that a client can call, using configurable protocols.\n */\n"]}
@@ -1,18 +1,18 @@
1
- /** @packageDocumentation
2
- * @module OIDC
3
- */
4
- import { AccessToken } from "@itwin/core-bentley";
5
- import { AuthorizationClient } from "@itwin/core-common";
6
- /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
7
- * @internal
8
- */
9
- export declare class MobileAuthorizationBackend implements AuthorizationClient {
10
- private _accessToken;
11
- private _expirationDate;
12
- private _expiryBuffer;
13
- private _fetchingToken;
14
- private get _hasExpired();
15
- getAccessToken(): Promise<AccessToken>;
16
- setAccessToken(accessToken?: string, expirationDate?: string): void;
17
- }
1
+ /** @packageDocumentation
2
+ * @module OIDC
3
+ */
4
+ import { AccessToken } from "@itwin/core-bentley";
5
+ import { AuthorizationClient } from "@itwin/core-common";
6
+ /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
7
+ * @internal
8
+ */
9
+ export declare class MobileAuthorizationBackend implements AuthorizationClient {
10
+ private _accessToken;
11
+ private _expirationDate;
12
+ private _expiryBuffer;
13
+ private _fetchingToken;
14
+ private get _hasExpired();
15
+ getAccessToken(): Promise<AccessToken>;
16
+ setAccessToken(accessToken?: string, expirationDate?: string): void;
17
+ }
18
18
  //# sourceMappingURL=MobileAuthorizationBackend.d.ts.map
@@ -1,47 +1,47 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module OIDC
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MobileAuthorizationBackend = void 0;
11
- const MobileHost_1 = require("./MobileHost");
12
- /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
13
- * @internal
14
- */
15
- class MobileAuthorizationBackend {
16
- constructor() {
17
- this._accessToken = "";
18
- this._expiryBuffer = 60 * 10; // ten minutes
19
- this._fetchingToken = false;
20
- }
21
- get _hasExpired() {
22
- return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;
23
- }
24
- async getAccessToken() {
25
- if (this._fetchingToken) {
26
- return Promise.reject(); // short-circuits any recursive use of this function
27
- }
28
- if (this._accessToken && !this._hasExpired) {
29
- return this._accessToken;
30
- }
31
- else {
32
- this._fetchingToken = true;
33
- const result = await MobileHost_1.MobileHost.authGetAccessToken();
34
- this._accessToken = result[0];
35
- if (result[1])
36
- this._expirationDate = new Date(result[1]);
37
- this._fetchingToken = false;
38
- return this._accessToken;
39
- }
40
- }
41
- setAccessToken(accessToken, expirationDate) {
42
- this._accessToken = accessToken !== null && accessToken !== void 0 ? accessToken : "";
43
- this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;
44
- }
45
- }
46
- exports.MobileAuthorizationBackend = MobileAuthorizationBackend;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module OIDC
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.MobileAuthorizationBackend = void 0;
11
+ const MobileHost_1 = require("./MobileHost");
12
+ /** Utility to provide and cache auth tokens from native mobile apps to IModelHost.
13
+ * @internal
14
+ */
15
+ class MobileAuthorizationBackend {
16
+ constructor() {
17
+ this._accessToken = "";
18
+ this._expiryBuffer = 60 * 10; // ten minutes
19
+ this._fetchingToken = false;
20
+ }
21
+ get _hasExpired() {
22
+ return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;
23
+ }
24
+ async getAccessToken() {
25
+ if (this._fetchingToken) {
26
+ return Promise.reject(); // short-circuits any recursive use of this function
27
+ }
28
+ if (this._accessToken && !this._hasExpired) {
29
+ return this._accessToken;
30
+ }
31
+ else {
32
+ this._fetchingToken = true;
33
+ const result = await MobileHost_1.MobileHost.authGetAccessToken();
34
+ this._accessToken = result[0];
35
+ if (result[1])
36
+ this._expirationDate = new Date(result[1]);
37
+ this._fetchingToken = false;
38
+ return this._accessToken;
39
+ }
40
+ }
41
+ setAccessToken(accessToken, expirationDate) {
42
+ this._accessToken = accessToken ?? "";
43
+ this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;
44
+ }
45
+ }
46
+ exports.MobileAuthorizationBackend = MobileAuthorizationBackend;
47
47
  //# sourceMappingURL=MobileAuthorizationBackend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,6CAA0C;AAE1C;;GAEG;AACH,MAAa,0BAA0B;IAAvC;QACU,iBAAY,GAAgB,EAAE,CAAC;QAE/B,kBAAa,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc;QACvC,mBAAc,GAAG,KAAK,CAAC;IA4BjC,CAAC;IA1BC,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,KAAK,SAAS,IAAI,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IACxH,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,oDAAoD;SAC9E;QAED,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YAC1C,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,uBAAU,CAAC,kBAAkB,EAAE,CAAC;YACrD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,MAAM,CAAC,CAAC,CAAC;gBACX,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC5B,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;IACH,CAAC;IAEM,cAAc,CAAC,WAAoB,EAAE,cAAuB;QACjE,IAAI,CAAC,YAAY,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC;QACtC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,CAAC;CACF;AAhCD,gEAgCC","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 OIDC\r\n */\r\n\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\nimport { AuthorizationClient } from \"@itwin/core-common\";\r\nimport { MobileHost } from \"./MobileHost\";\r\n\r\n/** Utility to provide and cache auth tokens from native mobile apps to IModelHost.\r\n * @internal\r\n */\r\nexport class MobileAuthorizationBackend implements AuthorizationClient {\r\n private _accessToken: AccessToken = \"\";\r\n private _expirationDate: Date | undefined;\r\n private _expiryBuffer = 60 * 10; // ten minutes\r\n private _fetchingToken = false;\r\n\r\n private get _hasExpired(): boolean {\r\n return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;\r\n }\r\n\r\n public async getAccessToken(): Promise<AccessToken> {\r\n if (this._fetchingToken) {\r\n return Promise.reject(); // short-circuits any recursive use of this function\r\n }\r\n\r\n if (this._accessToken && !this._hasExpired) {\r\n return this._accessToken;\r\n } else {\r\n this._fetchingToken = true;\r\n const result = await MobileHost.authGetAccessToken();\r\n this._accessToken = result[0];\r\n if (result[1])\r\n this._expirationDate = new Date(result[1]);\r\n this._fetchingToken = false;\r\n return this._accessToken;\r\n }\r\n }\r\n\r\n public setAccessToken(accessToken?: string, expirationDate?: string) {\r\n this._accessToken = accessToken ?? \"\";\r\n this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,6CAA0C;AAE1C;;GAEG;AACH,MAAa,0BAA0B;IAAvC;QACU,iBAAY,GAAgB,EAAE,CAAC;QAE/B,kBAAa,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc;QACvC,mBAAc,GAAG,KAAK,CAAC;IA4BjC,CAAC;IA1BC,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,eAAe,KAAK,SAAS,IAAI,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IACxH,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,oDAAoD;SAC9E;QAED,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YAC1C,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,uBAAU,CAAC,kBAAkB,EAAE,CAAC;YACrD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,MAAM,CAAC,CAAC,CAAC;gBACX,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;YAC5B,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;IACH,CAAC;IAEM,cAAc,CAAC,WAAoB,EAAE,cAAuB;QACjE,IAAI,CAAC,YAAY,GAAG,WAAW,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,CAAC;CACF;AAhCD,gEAgCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OIDC\n */\n\nimport { AccessToken } from \"@itwin/core-bentley\";\nimport { AuthorizationClient } from \"@itwin/core-common\";\nimport { MobileHost } from \"./MobileHost\";\n\n/** Utility to provide and cache auth tokens from native mobile apps to IModelHost.\n * @internal\n */\nexport class MobileAuthorizationBackend implements AuthorizationClient {\n private _accessToken: AccessToken = \"\";\n private _expirationDate: Date | undefined;\n private _expiryBuffer = 60 * 10; // ten minutes\n private _fetchingToken = false;\n\n private get _hasExpired(): boolean {\n return this._expirationDate !== undefined && this._expirationDate.getTime() - Date.now() <= this._expiryBuffer * 1000;\n }\n\n public async getAccessToken(): Promise<AccessToken> {\n if (this._fetchingToken) {\n return Promise.reject(); // short-circuits any recursive use of this function\n }\n\n if (this._accessToken && !this._hasExpired) {\n return this._accessToken;\n } else {\n this._fetchingToken = true;\n const result = await MobileHost.authGetAccessToken();\n this._accessToken = result[0];\n if (result[1])\n this._expirationDate = new Date(result[1]);\n this._fetchingToken = false;\n return this._accessToken;\n }\n }\n\n public setAccessToken(accessToken?: string, expirationDate?: string) {\n this._accessToken = accessToken ?? \"\";\n this._expirationDate = expirationDate ? new Date(expirationDate) : undefined;\n }\n}\n"]}