@itwin/core-backend 4.8.0-dev.3 → 4.8.0-dev.5

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 (99) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/lib/cjs/BackendLoggerCategory.d.ts +3 -1
  3. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
  4. package/lib/cjs/BackendLoggerCategory.js +2 -0
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BlobContainerService.d.ts +3 -3
  7. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  8. package/lib/cjs/BlobContainerService.js.map +1 -1
  9. package/lib/cjs/CloudSqlite.d.ts +21 -13
  10. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  11. package/lib/cjs/CloudSqlite.js +24 -6
  12. package/lib/cjs/CloudSqlite.js.map +1 -1
  13. package/lib/cjs/CodeService.d.ts +4 -4
  14. package/lib/cjs/CodeService.d.ts.map +1 -1
  15. package/lib/cjs/CodeService.js.map +1 -1
  16. package/lib/cjs/GeoCoordConfig.d.ts +10 -0
  17. package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
  18. package/lib/cjs/GeoCoordConfig.js +20 -23
  19. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  20. package/lib/cjs/IModelDb.d.ts +14 -9
  21. package/lib/cjs/IModelDb.d.ts.map +1 -1
  22. package/lib/cjs/IModelDb.js +53 -17
  23. package/lib/cjs/IModelDb.js.map +1 -1
  24. package/lib/cjs/IModelHost.d.ts +8 -1
  25. package/lib/cjs/IModelHost.d.ts.map +1 -1
  26. package/lib/cjs/IModelHost.js +24 -15
  27. package/lib/cjs/IModelHost.js.map +1 -1
  28. package/lib/cjs/PropertyStore.d.ts +17 -7
  29. package/lib/cjs/PropertyStore.d.ts.map +1 -1
  30. package/lib/cjs/PropertyStore.js +11 -5
  31. package/lib/cjs/PropertyStore.js.map +1 -1
  32. package/lib/cjs/SQLiteDb.d.ts +2 -3
  33. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  34. package/lib/cjs/SQLiteDb.js +2 -3
  35. package/lib/cjs/SQLiteDb.js.map +1 -1
  36. package/lib/cjs/SchemaSync.d.ts +1 -1
  37. package/lib/cjs/SchemaSync.d.ts.map +1 -1
  38. package/lib/cjs/SchemaSync.js.map +1 -1
  39. package/lib/cjs/TextAnnotationGeometry.d.ts +5 -1
  40. package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
  41. package/lib/cjs/TextAnnotationGeometry.js +11 -8
  42. package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
  43. package/lib/cjs/TextAnnotationLayout.d.ts +21 -13
  44. package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
  45. package/lib/cjs/TextAnnotationLayout.js +119 -90
  46. package/lib/cjs/TextAnnotationLayout.js.map +1 -1
  47. package/lib/cjs/ViewStore.d.ts +16 -2
  48. package/lib/cjs/ViewStore.d.ts.map +1 -1
  49. package/lib/cjs/ViewStore.js +14 -1
  50. package/lib/cjs/ViewStore.js.map +1 -1
  51. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +33 -0
  52. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +17 -21
  53. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +80 -38
  54. package/lib/cjs/assets/Settings/backend.setting.json5 +8 -119
  55. package/lib/cjs/core-backend.d.ts +2 -1
  56. package/lib/cjs/core-backend.d.ts.map +1 -1
  57. package/lib/cjs/core-backend.js +3 -2
  58. package/lib/cjs/core-backend.js.map +1 -1
  59. package/lib/cjs/internal/ImplementationProhibited.d.ts +44 -0
  60. package/lib/cjs/internal/ImplementationProhibited.d.ts.map +1 -0
  61. package/lib/cjs/internal/ImplementationProhibited.js +51 -0
  62. package/lib/cjs/internal/ImplementationProhibited.js.map +1 -0
  63. package/lib/cjs/internal/workspace/SettingsImpl.d.ts +43 -0
  64. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -0
  65. package/lib/cjs/internal/workspace/SettingsImpl.js +161 -0
  66. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -0
  67. package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts +6 -0
  68. package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -0
  69. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +276 -0
  70. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -0
  71. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +41 -0
  72. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -0
  73. package/lib/cjs/internal/workspace/WorkspaceImpl.js +696 -0
  74. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -0
  75. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts +10 -0
  76. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -0
  77. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +41 -0
  78. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -0
  79. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  80. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -2
  81. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  82. package/lib/cjs/workspace/Settings.d.ts +167 -138
  83. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  84. package/lib/cjs/workspace/Settings.js +68 -138
  85. package/lib/cjs/workspace/Settings.js.map +1 -1
  86. package/lib/cjs/workspace/SettingsSchemas.d.ts +112 -48
  87. package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
  88. package/lib/cjs/workspace/SettingsSchemas.js +1 -172
  89. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  90. package/lib/cjs/workspace/Workspace.d.ts +411 -277
  91. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  92. package/lib/cjs/workspace/Workspace.js +76 -457
  93. package/lib/cjs/workspace/Workspace.js.map +1 -1
  94. package/lib/cjs/workspace/WorkspaceEditor.d.ts +245 -0
  95. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -0
  96. package/lib/cjs/workspace/WorkspaceEditor.js +34 -0
  97. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -0
  98. package/package.json +12 -12
  99. package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +0 -45
package/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Change Log - @itwin/core-backend
2
2
 
3
- This log was last generated on Sat, 08 Jun 2024 00:53:21 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 12 Jun 2024 18:03:49 GMT and should not be manually modified.
4
+
5
+ ## 4.7.0
6
+ Wed, 12 Jun 2024 18:02:16 GMT
7
+
8
+ ### Updates
9
+
10
+ - schemaUpgrade() now push change to schema sync
11
+ - Remove @alpha BackendLoggerCategory.Editing
12
+ - Added getAvailableCoordinateReferenceSystems.
13
+ - Brotli compression enabled for RPC requests.
14
+ - Increase restrictions on native app storage name.
15
+ - Added computeTextBlockExtents
4
16
 
5
17
  ## 4.6.2
6
18
  Sat, 08 Jun 2024 00:50:25 GMT
@@ -81,6 +81,8 @@ export declare enum BackendLoggerCategory {
81
81
  * - [[ViewStateHydrator]]
82
82
  * @internal
83
83
  */
84
- ViewStateHydrator = "core-backend.ViewStateHydrator"
84
+ ViewStateHydrator = "core-backend.ViewStateHydrator",
85
+ /** @internal */
86
+ Workspace = "core-backend.Workspace"
85
87
  }
86
88
  //# sourceMappingURL=BackendLoggerCategory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackendLoggerCategory.d.ts","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,aAAa,+BAA+B;IAE5C;;OAEG;IACH,SAAS,2BAA2B;IAEpC;;OAEG;IACH,wBAAwB,0CAA0C;IAElE;;OAEG;IACH,QAAQ,0BAA0B;IAElC;;;;OAIG;IACH,IAAI,sBAAsB;IAE1B;;OAEG;IACH,UAAU,4BAA4B;IAEtC;;OAEG;IACH,iBAAiB,mCAAmC;IAEpD;;;OAGG;IACH,QAAQ,0BAA0B;IAElC;;OAEG;IACH,UAAU,4BAA4B;IAEtC;;OAEG;IACH,oBAAoB,sCAAsC;IAE1D;;OAEG;IACH,gBAAgB,kCAAkC;IAElD;;OAEG;IACH,iBAAiB,mCAAmC;IAEpD;;OAEG;IACH,YAAY,8BAA8B;IAE1C;;OAEG;IACH,OAAO,yBAAyB;IAEhC;;OAEG;IACH,eAAe,iCAAiC;IAChD;;OAEG;IACH,SAAS,2BAA2B;IAEpC;;;OAGG;IACH,SAAS,2BAA2B;IAEpC;;;OAGG;IACH,iBAAiB,mCAAmC;CACrD"}
1
+ {"version":3,"file":"BackendLoggerCategory.d.ts","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,aAAa,+BAA+B;IAE5C;;OAEG;IACH,SAAS,2BAA2B;IAEpC;;OAEG;IACH,wBAAwB,0CAA0C;IAElE;;OAEG;IACH,QAAQ,0BAA0B;IAElC;;;;OAIG;IACH,IAAI,sBAAsB;IAE1B;;OAEG;IACH,UAAU,4BAA4B;IAEtC;;OAEG;IACH,iBAAiB,mCAAmC;IAEpD;;;OAGG;IACH,QAAQ,0BAA0B;IAElC;;OAEG;IACH,UAAU,4BAA4B;IAEtC;;OAEG;IACH,oBAAoB,sCAAsC;IAE1D;;OAEG;IACH,gBAAgB,kCAAkC;IAElD;;OAEG;IACH,iBAAiB,mCAAmC;IAEpD;;OAEG;IACH,YAAY,8BAA8B;IAE1C;;OAEG;IACH,OAAO,yBAAyB;IAEhC;;OAEG;IACH,eAAe,iCAAiC;IAChD;;OAEG;IACH,SAAS,2BAA2B;IAEpC;;;OAGG;IACH,SAAS,2BAA2B;IAEpC;;;OAGG;IACH,iBAAiB,mCAAmC;IAEpD,gBAAgB;IAChB,SAAS,2BAA2B;CACrC"}
@@ -90,5 +90,7 @@ var BackendLoggerCategory;
90
90
  * @internal
91
91
  */
92
92
  BackendLoggerCategory["ViewStateHydrator"] = "core-backend.ViewStateHydrator";
93
+ /** @internal */
94
+ BackendLoggerCategory["Workspace"] = "core-backend.Workspace";
93
95
  })(BackendLoggerCategory || (exports.BackendLoggerCategory = BackendLoggerCategory = {}));
94
96
  //# sourceMappingURL=BackendLoggerCategory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,qBA4FX;AA5FD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;AACtD,CAAC,EA5FW,qBAAqB,qCAArB,qBAAqB,QA4FhC","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 Logging\r\n */\r\n\r\n/** Logger categories used by this package\r\n * @note All logger categories in this package start with the `core-backend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum BackendLoggerCategory {\r\n /** The logger category used by API related to authorization */\r\n Authorization = \"core-backend.Authorization\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CodeSpecs]]\r\n */\r\n CodeSpecs = \"core-backend.CodeSpecs\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CustomViewState3dCreator]]\r\n */\r\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\r\n\r\n /** The logger category used by the [[DevTools]] class and related classes.\r\n * @internal\r\n */\r\n DevTools = \"core-backend.DevTools\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ChangeSummaryManager]]\r\n * - [[ECDb]]\r\n * - [[ECSqlStatement]]\r\n */\r\n ECDb = \"core-backend.ECDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Functional]]\r\n */\r\n Functional = \"core-backend.Functional\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[LinearReferencing]]\r\n */\r\n LinearReferencing = \"core-backend.LinearReferencing\",\r\n\r\n /** The logger category used by the following classes:\r\n * - BriefcaseManager\r\n * - [[IModelDb]]\r\n */\r\n IModelDb = \"core-backend.IModelDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[IModelHost]]\r\n */\r\n IModelHost = \"core-backend.IModelHost\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileRequestMemoizer\r\n */\r\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\r\n\r\n /** The logger category used by the following classes:\r\n * - IModelTileRpcImpl (Tile Uploading)\r\n */\r\n IModelTileUpload = \"core-backend.IModelTileUpload\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileStorage (tile upload/download)\r\n */\r\n IModelTileStorage = \"core-backend.IModelTileStorage\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Relationship]]\r\n */\r\n Relationship = \"core-backend.Relationship\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Schemas]]\r\n */\r\n Schemas = \"core-backend.Schemas\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[PromiseMemoizer]]\r\n */\r\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\r\n /** The logger category used by the following classes:\r\n * - [[EventSink]]\r\n */\r\n EventSink = \"core-backend.EventSink\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[NativeHost]], [[NativeAppStorage]]\r\n * @internal\r\n */\r\n NativeApp = \"core-backend.NativeApp\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ViewStateHydrator]]\r\n * @internal\r\n */\r\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\r\n}\r\n"]}
1
+ {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,qBA+FX;AA/FD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;IAEpD,gBAAgB;IAChB,6DAAoC,CAAA;AACtC,CAAC,EA/FW,qBAAqB,qCAArB,qBAAqB,QA+FhC","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 Logging\r\n */\r\n\r\n/** Logger categories used by this package\r\n * @note All logger categories in this package start with the `core-backend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum BackendLoggerCategory {\r\n /** The logger category used by API related to authorization */\r\n Authorization = \"core-backend.Authorization\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CodeSpecs]]\r\n */\r\n CodeSpecs = \"core-backend.CodeSpecs\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CustomViewState3dCreator]]\r\n */\r\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\r\n\r\n /** The logger category used by the [[DevTools]] class and related classes.\r\n * @internal\r\n */\r\n DevTools = \"core-backend.DevTools\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ChangeSummaryManager]]\r\n * - [[ECDb]]\r\n * - [[ECSqlStatement]]\r\n */\r\n ECDb = \"core-backend.ECDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Functional]]\r\n */\r\n Functional = \"core-backend.Functional\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[LinearReferencing]]\r\n */\r\n LinearReferencing = \"core-backend.LinearReferencing\",\r\n\r\n /** The logger category used by the following classes:\r\n * - BriefcaseManager\r\n * - [[IModelDb]]\r\n */\r\n IModelDb = \"core-backend.IModelDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[IModelHost]]\r\n */\r\n IModelHost = \"core-backend.IModelHost\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileRequestMemoizer\r\n */\r\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\r\n\r\n /** The logger category used by the following classes:\r\n * - IModelTileRpcImpl (Tile Uploading)\r\n */\r\n IModelTileUpload = \"core-backend.IModelTileUpload\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileStorage (tile upload/download)\r\n */\r\n IModelTileStorage = \"core-backend.IModelTileStorage\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Relationship]]\r\n */\r\n Relationship = \"core-backend.Relationship\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Schemas]]\r\n */\r\n Schemas = \"core-backend.Schemas\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[PromiseMemoizer]]\r\n */\r\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\r\n /** The logger category used by the following classes:\r\n * - [[EventSink]]\r\n */\r\n EventSink = \"core-backend.EventSink\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[NativeHost]], [[NativeAppStorage]]\r\n * @internal\r\n */\r\n NativeApp = \"core-backend.NativeApp\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ViewStateHydrator]]\r\n * @internal\r\n */\r\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\r\n\r\n /** @internal */\r\n Workspace = \"core-backend.Workspace\",\r\n}\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module BlobContainers
3
3
  */
4
4
  import { AccessToken, GuidString, Id64String } from "@itwin/core-bentley";
5
- import { SettingObject } from "./workspace/Settings";
5
+ import { SettingsContainer } from "./workspace/Settings";
6
6
  /**
7
7
  * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.
8
8
  * @beta
@@ -50,7 +50,7 @@ export declare namespace BlobContainer {
50
50
  /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */
51
51
  description?: string;
52
52
  /** optional properties for the container */
53
- json?: SettingObject;
53
+ json?: SettingsContainer;
54
54
  }
55
55
  /** Properties returned by `Service.requestToken` */
56
56
  interface TokenProps {
@@ -128,7 +128,7 @@ export declare namespace BlobContainer {
128
128
  /** query the Metadata for a container */
129
129
  queryMetadata(container: AccessContainerProps): Promise<Metadata>;
130
130
  /** update the json properties of this container */
131
- updateJson(container: AccessContainerProps, json: SettingObject): Promise<void>;
131
+ updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;
132
132
  /** Request a `ContainerToken` for a container. Throws on failure. */
133
133
  requestToken(props: RequestTokenProps): Promise<TokenProps>;
134
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.d.ts","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAE7B,+FAA+F;IACxF,IAAI,OAAO,EAAE,aAAa,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAE/D,8CAA8C;IAC9C,KAAY,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1C,mDAAmD;IACnD,KAAY,WAAW,GAAG,MAAM,CAAC;IAEjC,4FAA4F;IAC5F,KAAY,SAAS,GAAG,WAAW,CAAC;IAEpC,+EAA+E;IAC/E,KAAY,cAAc,GAAG,WAAW,CAAC;IAEzC;;;;;;;;OAQG;IACH,UAAiB,KAAK;QACpB,8CAA8C;QAC9C,OAAO,EAAE,UAAU,CAAC;QACpB,6GAA6G;QAC7G,QAAQ,CAAC,EAAE,UAAU,CAAC;QACtB,iEAAiE;QACjE,SAAS,CAAC,EAAE,UAAU,CAAC;KACxB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AC1B;IAED,sDAAsD;IACtD,UAAiB,uBAAuB;QACtC,qCAAqC;QACrC,KAAK,EAAE,KAAK,CAAC;QACb,iDAAiD;QACjD,QAAQ,EAAE,QAAQ,CAAC;QACnB,4GAA4G;QAC5G,SAAS,EAAE,SAAS,CAAC;QACrB;;;WAGG;QACH,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B;IAED,6DAA6D;IAC7D,UAAiB,gBAAgB;QAC/B,wGAAwG;QACxG,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAEvE;;;WAGG;QACH,MAAM,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvD,sCAAsC;QACtC,UAAU,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAE5D,yCAAyC;QACzC,aAAa,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAElE,mDAAmD;QACnD,UAAU,CAAC,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEpF,qEAAqE;QACrE,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;KAC7D;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CAiJ7B;AAjJD,WAAiB,aAAa;AAiJ9B,CAAC,EAjJgB,aAAa,6BAAb,aAAa,QAiJ7B","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 BlobContainers\r\n */\r\n\r\n// spell:ignore datacenter\r\n\r\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { SettingObject } from \"./workspace/Settings\";\r\n\r\n/**\r\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\r\n * @beta\r\n */\r\nexport namespace BlobContainer {\r\n\r\n /** Object that implements the methods to create, delete, and request access to a container. */\r\n export let service: BlobContainer.ContainerService | undefined;\r\n\r\n /** name of cloud provider for a container. */\r\n export type Provider = \"azure\" | \"google\";\r\n\r\n /** the name of the container within its `Scope` */\r\n export type ContainerId = string;\r\n\r\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\r\n export type UserToken = AccessToken;\r\n\r\n /** token that authenticates access to a container for either read or write. */\r\n export type ContainerToken = AccessToken;\r\n\r\n /**\r\n * The scope for a container. This determines:\r\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\r\n * - the administrators who may configure RBAC permissions\r\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\r\n * determines the region for data residency requirements.\r\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\r\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\r\n */\r\n export interface Scope {\r\n /** iTwinId of the owner of this container. */\r\n iTwinId: Id64String;\r\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\r\n iModelId?: Id64String;\r\n /** the user GUID an individual, if this container is private. */\r\n ownerGuid?: GuidString;\r\n }\r\n\r\n /**\r\n * Metadata about the use of a container so that:\r\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\r\n * - usage reports can aggregate types of containers\r\n * - applications can identify their containers\r\n * - applications can store properties about their containers\r\n */\r\n export interface Metadata {\r\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\r\n containerType: string;\r\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\r\n label: string;\r\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\r\n description?: string;\r\n /** optional properties for the container */\r\n json?: SettingObject;\r\n }\r\n\r\n /** Properties returned by `Service.requestToken` */\r\n export interface TokenProps {\r\n /**\r\n * expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\r\n * and must be refreshed before it expires\r\n */\r\n token: ContainerToken;\r\n /** scope of the container. */\r\n scope: Scope;\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\r\n expiration: Date;\r\n /** Metadata of the container. */\r\n metadata: Metadata;\r\n }\r\n\r\n /** The URI and Id of the container. */\r\n export interface UriAndId {\r\n baseUri: string;\r\n containerId: ContainerId;\r\n }\r\n\r\n /** Information required to access an existing container. */\r\n export interface AccessContainerProps extends UriAndId {\r\n userToken: UserToken;\r\n }\r\n\r\n /** Information about a newly created container. */\r\n export interface CreatedContainerProps extends UriAndId {\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n }\r\n\r\n /**\r\n * Access level to request for token.\r\n * - `\"write\"`: request a writeable AccessToken.\r\n * - `\"read\"`: request a read-only AccessToken.\r\n * - `\"admin\"`: request a admin AccessToken.\r\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\r\n * If the user is not authorized for the level requested, an exception is thrown.\r\n */\r\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\r\n\r\n /** Information required to request an access token for a container. */\r\n export interface RequestTokenProps extends AccessContainerProps {\r\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\r\n accessLevel?: RequestAccessLevel;\r\n /** the number of seconds before the token should expire.\r\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\r\n */\r\n durationSeconds?: number;\r\n }\r\n\r\n /** Information required to create a new container. */\r\n export interface CreateNewContainerProps {\r\n /** the scope of the new container */\r\n scope: Scope;\r\n /** metadata to be stored on the new container */\r\n metadata: Metadata;\r\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\r\n userToken: UserToken;\r\n /**\r\n * the id for the container. Useful for tests.\r\n * @internal\r\n */\r\n containerId?: ContainerId;\r\n }\r\n\r\n /** Methods to create, delete, and access blob containers. */\r\n export interface ContainerService {\r\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\r\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\r\n\r\n /**\r\n * Delete an existing blob container.\r\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\r\n */\r\n delete(container: AccessContainerProps): Promise<void>;\r\n\r\n /** query the Scope for a container */\r\n queryScope(container: AccessContainerProps): Promise<Scope>;\r\n\r\n /** query the Metadata for a container */\r\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\r\n\r\n /** update the json properties of this container */\r\n updateJson(container: AccessContainerProps, json: SettingObject): Promise<void>;\r\n\r\n /** Request a `ContainerToken` for a container. Throws on failure. */\r\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CAiJ7B;AAjJD,WAAiB,aAAa;AAiJ9B,CAAC,EAjJgB,aAAa,6BAAb,aAAa,QAiJ7B","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 BlobContainers\r\n */\r\n\r\n// spell:ignore datacenter\r\n\r\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { SettingsContainer } from \"./workspace/Settings\";\r\n\r\n/**\r\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\r\n * @beta\r\n */\r\nexport namespace BlobContainer {\r\n\r\n /** Object that implements the methods to create, delete, and request access to a container. */\r\n export let service: BlobContainer.ContainerService | undefined;\r\n\r\n /** name of cloud provider for a container. */\r\n export type Provider = \"azure\" | \"google\";\r\n\r\n /** the name of the container within its `Scope` */\r\n export type ContainerId = string;\r\n\r\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\r\n export type UserToken = AccessToken;\r\n\r\n /** token that authenticates access to a container for either read or write. */\r\n export type ContainerToken = AccessToken;\r\n\r\n /**\r\n * The scope for a container. This determines:\r\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\r\n * - the administrators who may configure RBAC permissions\r\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\r\n * determines the region for data residency requirements.\r\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\r\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\r\n */\r\n export interface Scope {\r\n /** iTwinId of the owner of this container. */\r\n iTwinId: Id64String;\r\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\r\n iModelId?: Id64String;\r\n /** the user GUID an individual, if this container is private. */\r\n ownerGuid?: GuidString;\r\n }\r\n\r\n /**\r\n * Metadata about the use of a container so that:\r\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\r\n * - usage reports can aggregate types of containers\r\n * - applications can identify their containers\r\n * - applications can store properties about their containers\r\n */\r\n export interface Metadata {\r\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\r\n containerType: string;\r\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\r\n label: string;\r\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\r\n description?: string;\r\n /** optional properties for the container */\r\n json?: SettingsContainer;\r\n }\r\n\r\n /** Properties returned by `Service.requestToken` */\r\n export interface TokenProps {\r\n /**\r\n * expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\r\n * and must be refreshed before it expires\r\n */\r\n token: ContainerToken;\r\n /** scope of the container. */\r\n scope: Scope;\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\r\n expiration: Date;\r\n /** Metadata of the container. */\r\n metadata: Metadata;\r\n }\r\n\r\n /** The URI and Id of the container. */\r\n export interface UriAndId {\r\n baseUri: string;\r\n containerId: ContainerId;\r\n }\r\n\r\n /** Information required to access an existing container. */\r\n export interface AccessContainerProps extends UriAndId {\r\n userToken: UserToken;\r\n }\r\n\r\n /** Information about a newly created container. */\r\n export interface CreatedContainerProps extends UriAndId {\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n }\r\n\r\n /**\r\n * Access level to request for token.\r\n * - `\"write\"`: request a writeable AccessToken.\r\n * - `\"read\"`: request a read-only AccessToken.\r\n * - `\"admin\"`: request a admin AccessToken.\r\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\r\n * If the user is not authorized for the level requested, an exception is thrown.\r\n */\r\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\r\n\r\n /** Information required to request an access token for a container. */\r\n export interface RequestTokenProps extends AccessContainerProps {\r\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\r\n accessLevel?: RequestAccessLevel;\r\n /** the number of seconds before the token should expire.\r\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\r\n */\r\n durationSeconds?: number;\r\n }\r\n\r\n /** Information required to create a new container. */\r\n export interface CreateNewContainerProps {\r\n /** the scope of the new container */\r\n scope: Scope;\r\n /** metadata to be stored on the new container */\r\n metadata: Metadata;\r\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\r\n userToken: UserToken;\r\n /**\r\n * the id for the container. Useful for tests.\r\n * @internal\r\n */\r\n containerId?: ContainerId;\r\n }\r\n\r\n /** Methods to create, delete, and access blob containers. */\r\n export interface ContainerService {\r\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\r\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\r\n\r\n /**\r\n * Delete an existing blob container.\r\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\r\n */\r\n delete(container: AccessContainerProps): Promise<void>;\r\n\r\n /** query the Scope for a container */\r\n queryScope(container: AccessContainerProps): Promise<Scope>;\r\n\r\n /** query the Metadata for a container */\r\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\r\n\r\n /** update the json properties of this container */\r\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\r\n\r\n /** Request a `ContainerToken` for a container. Throws on failure. */\r\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\r\n }\r\n}\r\n"]}
@@ -30,30 +30,32 @@ export declare namespace CloudSqlite {
30
30
  export function startCloudPrefetch(container: CloudContainer, dbName: string, args?: PrefetchProps): CloudPrefetch;
31
31
  export interface ContainerProps {
32
32
  /** The type of storage provider. */
33
- storageType: "azure" | "google";
33
+ readonly storageType: "azure" | "google";
34
34
  /** The base URI for the container. */
35
- baseUri: string;
35
+ readonly baseUri: string;
36
36
  /** The name of the container. */
37
- containerId: string;
37
+ readonly containerId: string;
38
38
  /** true if the container is public (doesn't require authorization) */
39
- isPublic?: boolean;
39
+ readonly isPublic?: boolean;
40
+ /** access token for container. If not present uses `CloudSqlite.requestToken` */
41
+ accessToken?: string;
40
42
  }
41
43
  /** Properties to access a CloudContainer. */
42
44
  export interface ContainerAccessProps extends ContainerProps {
43
45
  /** an alias for the container. Defaults to `containerId` */
44
- alias?: string;
46
+ readonly alias?: string;
45
47
  /** SAS token that grants access to the container. */
46
48
  accessToken: string;
47
49
  /** if true, container is allowed to request the write lock. */
48
- writeable?: boolean;
50
+ readonly writeable?: boolean;
49
51
  /** if true, container is attached in "secure" mode (blocks are encrypted). Only supported in daemon mode. */
50
- secure?: boolean;
52
+ readonly secure?: boolean;
51
53
  /** string attached to log messages from CloudSQLite. This is most useful for identifying usage from daemon mode. */
52
- logId?: string;
54
+ readonly logId?: string;
53
55
  /** Duration for holding write lock, in seconds. After this time the write lock expires if not refreshed. Default is one hour. */
54
- lockExpireSeconds?: number;
56
+ readonly lockExpireSeconds?: number;
55
57
  /** number of seconds between auto-refresh of access token. If <=0 no auto-refresh. Default is 1 hour (60*60) */
56
- tokenRefreshSeconds?: number;
58
+ readonly tokenRefreshSeconds?: number;
57
59
  }
58
60
  /** Returned from `CloudContainer.queryDatabase` describing one database in the container */
59
61
  export interface CachedDbProps {
@@ -591,16 +593,22 @@ export declare namespace CloudSqlite {
591
593
  /** Close the database for this DbAccess if it is opened, and disconnect this `DbAccess from its CloudContainer. */
592
594
  close(): void;
593
595
  /**
594
- * Initialize a cloud container to hold a Cloud SQliteDb. The container must first be created via its storage supplier api (e.g. Azure, or Google).
595
- * A valid sasToken that grants write access must be supplied. This function creates and uploads an empty database into the container.
596
+ * Initialize a cloud container to hold VersionedSqliteDbs. The container must first be created by [[createBlobContainer]].
597
+ * This function creates and uploads an empty database into the container.
596
598
  * @note this deletes any existing content in the container.
597
599
  */
598
600
  protected static _initializeDb(args: {
599
601
  dbType: typeof VersionedSqliteDb;
600
- props: ContainerAccessProps;
602
+ props: ContainerProps;
601
603
  dbName: string;
602
604
  blockSize?: "64K" | "4M";
603
605
  }): Promise<void>;
606
+ /**
607
+ * Create a new BlobContainer from the BlobContainer service to hold one or more VersionedSqliteDbs.
608
+ * @returns A ContainerProps that describes the newly created container.
609
+ * @note the current user must have administrator rights to create containers.
610
+ */
611
+ protected static createBlobContainer(args: Omit<BlobContainer.CreateNewContainerProps, "userToken">): Promise<CloudSqlite.ContainerProps>;
604
612
  /**
605
613
  * Synchronize the local cache of this database with any changes by made by others.
606
614
  * @note This is called automatically whenever any write operation is performed on this DbAccess. It is only necessary to
@@ -1 +1 @@
1
- {"version":3,"file":"CloudSqlite.d.ts","sourceRoot":"","sources":["../../src/CloudSqlite.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EACL,WAAW,EAA+B,WAAW,EAAE,UAAU,EAAU,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAC7H,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAKvD,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI9D;;;GAGG;AACH,yBAAiB,WAAW,CAAC;IAK3B,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACtF;;;OAGG;IACH,gBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAQ/E;IASD;;;;;OAKG;IACH,MAAM,UAAU,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,GAAG;QAAE,WAAW,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAA;KAAE,GAAG,cAAc,CAoChM;IAED,yFAAyF;IACzF,MAAM,UAAU,kBAAkB,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,CAEjH;IACD,MAAM,WAAW,cAAc;QAC7B,oCAAoC;QACpC,WAAW,EAAE,OAAO,GAAG,QAAQ,CAAC;QAChC,sCAAsC;QACtC,OAAO,EAAE,MAAM,CAAC;QAChB,iCAAiC;QACjC,WAAW,E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,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;SAAE;QAahJ;;;;WAIG;yBACoB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,uBAAuB,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC;QAa/I;;;;;;;WAOG;QACI,oBAAoB;QAK3B;;;WAGG;QACI,WAAW,IAAI,MAAM;QAM5B;;;;;;;;WAQG;QACU,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE;YAAE,aAAa,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAmC1I,wFAAwF;QACxF,OAAO,CAAC,WAAW;QAOnB;;;;;;;;;;;;WAYG;QACH,IAAW,WAAW,mCAOrB;QAED;;;WAGG;QACH,IAAW,MAAM,6BAOhB;KACF;;CACF"}
@@ -30,8 +30,10 @@ var CloudSqlite;
30
30
  * If the service is unavailable or returns an error, an empty token is returned.
31
31
  */
32
32
  async function requestToken(args) {
33
- // allow the userToken to be supplied via Rpc. If not supplied, or blank, use the backend's accessToken.
34
- const userToken = args.userToken ? args.userToken : (await IModelHost_1.IModelHost.getAccessToken());
33
+ // allow the userToken to be supplied via args. If not supplied, or blank, use the backend's accessToken. If that fails, use the value from the current RPC request
34
+ let userToken = args.userToken ? args.userToken : await IModelHost_1.IModelHost.getAccessToken();
35
+ if (userToken === "")
36
+ userToken = tracing_1.RpcTrace.currentActivity?.accessToken ?? "";
35
37
  if (BlobContainerService_1.BlobContainer.service === undefined) {
36
38
  throw new Error(`BlobContainer.service is not defined`);
37
39
  }
@@ -320,22 +322,38 @@ var CloudSqlite;
320
322
  this._container.disconnect();
321
323
  }
322
324
  /**
323
- * Initialize a cloud container to hold a Cloud SQliteDb. The container must first be created via its storage supplier api (e.g. Azure, or Google).
324
- * A valid sasToken that grants write access must be supplied. This function creates and uploads an empty database into the container.
325
+ * Initialize a cloud container to hold VersionedSqliteDbs. The container must first be created by [[createBlobContainer]].
326
+ * This function creates and uploads an empty database into the container.
325
327
  * @note this deletes any existing content in the container.
326
328
  */
327
329
  static async _initializeDb(args) {
328
- const container = createCloudContainer({ ...args.props, writeable: true });
330
+ const container = createCloudContainer({ ...args.props, writeable: true, accessToken: args.props.accessToken ?? await CloudSqlite.requestToken(args.props) });
329
331
  container.initializeContainer({ blockSize: args.blockSize === "4M" ? 4 * 1024 * 1024 : 64 * 1024 });
330
332
  container.connect(CloudCaches.getCache({ cacheName: this._cacheName }));
331
333
  await withWriteLock({ user: "initialize", container }, async () => {
332
334
  const localFileName = (0, path_1.join)(IModelHost_1.KnownLocations.tmpdir, "blank.db");
333
- args.dbType.createNewDb(localFileName);
335
+ args.dbType.createNewDb(localFileName, args);
334
336
  await transferDb("upload", container, { dbName: args.dbName, localFileName });
335
337
  (0, fs_1.unlinkSync)(localFileName);
336
338
  });
337
339
  container.disconnect({ detach: true });
338
340
  }
341
+ /**
342
+ * Create a new BlobContainer from the BlobContainer service to hold one or more VersionedSqliteDbs.
343
+ * @returns A ContainerProps that describes the newly created container.
344
+ * @note the current user must have administrator rights to create containers.
345
+ */
346
+ static async createBlobContainer(args) {
347
+ const service = BlobContainerService_1.BlobContainer.service;
348
+ if (undefined === service)
349
+ throw new Error("no BlobContainer service available");
350
+ const auth = IModelHost_1.IModelHost.authorizationClient;
351
+ if (undefined === auth)
352
+ throw new Error("no authorization client available");
353
+ const userToken = await auth.getAccessToken();
354
+ const cloudContainer = await service.create({ scope: args.scope, metadata: { ...args.metadata, containerType: "property-store" }, userToken });
355
+ return { baseUri: cloudContainer.baseUri, containerId: cloudContainer.containerId, storageType: cloudContainer.provider };
356
+ }
339
357
  /**
340
358
  * Synchronize the local cache of this database with any changes by made by others.
341
359
  * @note This is called automatically whenever any write operation is performed on this DbAccess. It is only necessary to