@itwin/core-backend 4.1.0-dev.8 → 4.1.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.
- package/CHANGELOG.md +99 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BlobContainerService.d.ts +38 -28
- package/lib/cjs/BlobContainerService.d.ts.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +8 -5
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +9 -16
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +4 -16
- package/lib/cjs/Category.d.ts.map +1 -1
- package/lib/cjs/Category.js +0 -12
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChannelControl.d.ts +5 -1
- package/lib/cjs/ChannelControl.d.ts.map +1 -1
- package/lib/cjs/ChannelControl.js +10 -5
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +20 -9
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts +2 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +2 -1
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +57 -40
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js +54 -39
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +2 -5
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +0 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +6 -0
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +6 -0
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.d.ts +28 -1
- package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +28 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/Element.d.ts +40 -97
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +0 -57
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +2 -4
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +2 -4
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/Entity.d.ts +5 -2
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +10 -2
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/ExternalSource.d.ts +4 -11
- package/lib/cjs/ExternalSource.d.ts.map +1 -1
- package/lib/cjs/ExternalSource.js +0 -7
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +61 -26
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +164 -83
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +1 -3
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +3 -5
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/Material.d.ts +0 -1
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +1 -2
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +4 -13
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +0 -9
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/PropertyStore.d.ts +3 -3
- package/lib/cjs/PropertyStore.d.ts.map +1 -1
- package/lib/cjs/PropertyStore.js +2 -5
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +2 -5
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +0 -3
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +1 -1
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.d.ts +0 -1
- package/lib/cjs/Schema.d.ts.map +1 -1
- package/lib/cjs/Schema.js +0 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaUtils.d.ts +19 -0
- package/lib/cjs/SchemaUtils.d.ts.map +1 -0
- package/lib/cjs/SchemaUtils.js +42 -0
- package/lib/cjs/SchemaUtils.js.map +1 -0
- package/lib/cjs/SqliteStatement.d.ts +13 -1
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +23 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/Texture.d.ts +3 -4
- package/lib/cjs/Texture.d.ts.map +1 -1
- package/lib/cjs/Texture.js +1 -2
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.d.ts +3 -0
- package/lib/cjs/TileStorage.d.ts.map +1 -1
- package/lib/cjs/TileStorage.js +9 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +7 -28
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +0 -21
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStore.d.ts +488 -0
- package/lib/cjs/ViewStore.d.ts.map +1 -0
- package/lib/cjs/ViewStore.js +1246 -0
- package/lib/cjs/ViewStore.js.map +1 -0
- package/lib/cjs/core-backend.d.ts +2 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +2 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.d.ts +6 -12
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +0 -6
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/rpc/tracing.js +2 -2
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +5 -3
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +53 -36
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +0 -2
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +1 -1
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +4 -4
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/package.json +21 -40
package/lib/cjs/Texture.js
CHANGED
|
@@ -16,14 +16,13 @@ const Element_1 = require("./Element");
|
|
|
16
16
|
class Texture extends Element_1.DefinitionElement {
|
|
17
17
|
/** @internal */
|
|
18
18
|
static get className() { return "Texture"; }
|
|
19
|
-
/** @
|
|
19
|
+
/** @beta */
|
|
20
20
|
constructor(props, iModel) {
|
|
21
21
|
super(props, iModel);
|
|
22
22
|
this.format = props.format;
|
|
23
23
|
this.data = typeof props.data === "string" ? core_common_1.Base64EncodedString.toUint8Array(props.data) : props.data;
|
|
24
24
|
this.description = props.description;
|
|
25
25
|
}
|
|
26
|
-
/** @internal */
|
|
27
26
|
toJSON() {
|
|
28
27
|
const val = super.toJSON();
|
|
29
28
|
val.format = this.format;
|
package/lib/cjs/Texture.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Texture.js","sourceRoot":"","sources":["../../src/Texture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAE4B;AAC5B,uCAA8C;AAW9C;;GAEG;AACH,MAAa,OAAQ,SAAQ,2BAAiB;IAC5C,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAKpE,
|
|
1
|
+
{"version":3,"file":"Texture.js","sourceRoot":"","sources":["../../src/Texture.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAE4B;AAC5B,uCAA8C;AAW9C;;GAEG;AACH,MAAa,OAAQ,SAAQ,2BAAiB;IAC5C,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAKpE,YAAY;IACZ,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,iCAAmB,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QACvG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACvC,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAkB,CAAC;QAC3C,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,GAAG,CAAC,IAAI,GAAG,iCAAmB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACnC,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IAC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------\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 Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n Base64EncodedString, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ImageSourceFormat, TextureProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\n\r\n/** A [TextureProps]($common) in which the image data can be specified either as a base-64-encoded string or a Uint8Array.\r\n * @see [[Texture]] constructor.\r\n * @beta\r\n */\r\nexport interface TextureCreateProps extends Omit<TextureProps, \"data\"> {\r\n data: Base64EncodedString | Uint8Array;\r\n}\r\n\r\n/** Defines a rendering texture that is associated with a Material and applied to surface geometry.\r\n * @public\r\n */\r\nexport class Texture extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"Texture\"; }\r\n public format: ImageSourceFormat;\r\n public data: Uint8Array;\r\n public description?: string;\r\n\r\n /** @beta */\r\n protected constructor(props: TextureCreateProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.format = props.format;\r\n this.data = typeof props.data === \"string\" ? Base64EncodedString.toUint8Array(props.data) : props.data;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): TextureProps {\r\n const val = super.toJSON() as TextureProps;\r\n val.format = this.format;\r\n val.data = Base64EncodedString.fromUint8Array(this.data);\r\n val.description = this.description;\r\n return val;\r\n }\r\n\r\n /** Create a Code for a Texture given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the Texture and provides the scope for its name.\r\n * @param name The Texture name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n\r\n /** Create a texture with the given parameters.\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The newly constructed Texture element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n */\r\n public static createTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Texture {\r\n const textureProps: TextureCreateProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n format,\r\n data,\r\n description,\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new Texture(textureProps, iModelDb);\r\n }\r\n\r\n /** Insert a new texture into a [[DefinitionModel]].\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The Id of the newly-inserted texture element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n */\r\n public static insertTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String {\r\n const texture = this.createTexture(iModelDb, definitionModelId, name, format, data, description);\r\n return iModelDb.elements.insertElement(texture.toJSON());\r\n }\r\n}\r\n"]}
|
package/lib/cjs/TileStorage.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export declare class TileStorage {
|
|
|
17
17
|
initialize(iModelId: string): Promise<void>;
|
|
18
18
|
/**
|
|
19
19
|
* Returns config that can be used by frontends to download tiles
|
|
20
|
+
* @param iModelId Id of the iModel
|
|
21
|
+
* @param expiresInSeconds Optional number of seconds until the download URL expires. Defaults to expiring exactly at midnight of next Sunday to enable persistent client-side caching.
|
|
22
|
+
* It is recommended to set this to a shorter period when using S3-compatible storage - an exact expiry date cannot be ensured due to limitations in their API.
|
|
20
23
|
* @see [TileStorage]($frontend)
|
|
21
24
|
*/
|
|
22
25
|
getDownloadConfig(iModelId: string, expiresInSeconds?: number): Promise<TransferConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileStorage.d.ts","sourceRoot":"","sources":["../../src/TileStorage.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMrF;;;GAGG;AACH,qBAAa,WAAW;IACtB;;;OAGG;IACH,SAAgB,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIzC,OAAO,CAAC,mBAAmB,CAA0B;IAErD;;OAEG;IACU,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASxD
|
|
1
|
+
{"version":3,"file":"TileStorage.d.ts","sourceRoot":"","sources":["../../src/TileStorage.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMrF;;;GAGG;AACH,qBAAa,WAAW;IACtB;;;OAGG;IACH,SAAgB,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIzC,OAAO,CAAC,mBAAmB,CAA0B;IAErD;;OAEG;IACU,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASxD;;;;;;OAMG;IACU,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAcpG;;OAEG;IACU,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAczK;;OAEG;IACU,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAavI;;OAEG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAyB7G;;OAEG;IACU,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIpI,OAAO,CAAC,YAAY;CAOrB"}
|
package/lib/cjs/TileStorage.js
CHANGED
|
@@ -33,11 +33,19 @@ class TileStorage {
|
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Returns config that can be used by frontends to download tiles
|
|
36
|
+
* @param iModelId Id of the iModel
|
|
37
|
+
* @param expiresInSeconds Optional number of seconds until the download URL expires. Defaults to expiring exactly at midnight of next Sunday to enable persistent client-side caching.
|
|
38
|
+
* It is recommended to set this to a shorter period when using S3-compatible storage - an exact expiry date cannot be ensured due to limitations in their API.
|
|
36
39
|
* @see [TileStorage]($frontend)
|
|
37
40
|
*/
|
|
38
41
|
async getDownloadConfig(iModelId, expiresInSeconds) {
|
|
39
42
|
try {
|
|
40
|
-
|
|
43
|
+
if (expiresInSeconds !== undefined)
|
|
44
|
+
return await this.storage.getDownloadConfig({ baseDirectory: iModelId }, { expiresInSeconds });
|
|
45
|
+
const expiresOn = new Date();
|
|
46
|
+
expiresOn.setDate(expiresOn.getDate() + (7 - expiresOn.getDay())); // next Sunday
|
|
47
|
+
expiresOn.setHours(0, 0, 0, 0); // exactly at midnight
|
|
48
|
+
return await this.storage.getDownloadConfig({ baseDirectory: iModelId }, { expiresOn });
|
|
41
49
|
}
|
|
42
50
|
catch (err) {
|
|
43
51
|
this.logException("Failed to get download config", err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileStorage.js","sourceRoot":"","sources":["../../src/TileStorage.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,+BAAoC;AACpC,+BAAiC;AAEjC,oDAA4D;AAC5D,sDAA6C;AAC7C,mEAAgE;AAChE,6CAA0C;AAE1C;;;GAGG;AACH,MAAa,WAAW;IAOtB,YAAmB,OAAsB;QAIjC,wBAAmB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAHnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAID;;OAEG;IACI,KAAK,CAAC,UAAU,CAAC,QAAgB;QACtC,IAAI,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC;YACxC,OAAO;QACT,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE;YAC1E,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC;SACrE;QACD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"TileStorage.js","sourceRoot":"","sources":["../../src/TileStorage.ts"],"names":[],"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IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;aACf,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,QAAgB,EAAE,WAAmB,EAAE,MAAc,EAAE,SAAiB,EAAE,IAAa;QAC/G,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAA,oCAAsB,EAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAC3G,CAAC;IAEO,YAAY,CAAC,OAAe,EAAE,GAAY;QAChD,qBAAM,CAAC,YAAY,CACjB,6CAAqB,CAAC,iBAAiB,EACvC,GAAG,EACH,CAAC,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,CAAC,qBAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,OAAO,kBAAkB,EAAE,EAAE,GAAG,aAAa,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CACnI,CAAC;IACJ,CAAC;CACF;AAzHD,kCAyHC","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\nimport { gunzip, gzip } from \"zlib\";\r\nimport { promisify } from \"util\";\r\nimport { Metadata, ServerStorage, TransferConfig } from \"@itwin/object-storage-core\";\r\nimport { getTileObjectReference } from \"@itwin/core-common\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\r\nimport { IModelHost } from \"./IModelHost\";\r\n\r\n/**\r\n * Facilitates interaction with cloud tile cache.\r\n * @beta\r\n */\r\nexport class TileStorage {\r\n /**\r\n * Allows using the underlying `ServerStorage` API directly.\r\n * @see https://github.com/iTwin/object-storage/\r\n */\r\n public readonly storage: ServerStorage;\r\n\r\n public constructor(storage: ServerStorage) {\r\n this.storage = storage;\r\n }\r\n\r\n private _initializedIModels: Set<string> = new Set();\r\n\r\n /**\r\n * Ensures any required cloud storage resources for a specific iModel are ready to use.\r\n */\r\n public async initialize(iModelId: string): Promise<void> {\r\n if (this._initializedIModels.has(iModelId))\r\n return;\r\n if (!(await this.storage.baseDirectoryExists({ baseDirectory: iModelId }))) {\r\n await this.storage.createBaseDirectory({ baseDirectory: iModelId });\r\n }\r\n this._initializedIModels.add(iModelId);\r\n }\r\n\r\n /**\r\n * Returns config that can be used by frontends to download tiles\r\n * @param iModelId Id of the iModel\r\n * @param expiresInSeconds Optional number of seconds until the download URL expires. Defaults to expiring exactly at midnight of next Sunday to enable persistent client-side caching.\r\n * It is recommended to set this to a shorter period when using S3-compatible storage - an exact expiry date cannot be ensured due to limitations in their API.\r\n * @see [TileStorage]($frontend)\r\n */\r\n public async getDownloadConfig(iModelId: string, expiresInSeconds?: number): Promise<TransferConfig> {\r\n try {\r\n if (expiresInSeconds !== undefined)\r\n return await this.storage.getDownloadConfig({ baseDirectory: iModelId }, { expiresInSeconds });\r\n const expiresOn = new Date();\r\n expiresOn.setDate(expiresOn.getDate() + (7 - expiresOn.getDay())); // next Sunday\r\n expiresOn.setHours(0, 0, 0, 0); // exactly at midnight\r\n return await this.storage.getDownloadConfig({ baseDirectory: iModelId }, { expiresOn });\r\n } catch (err) {\r\n this.logException(\"Failed to get download config\", err);\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Uploads a tile to the cloud cache.\r\n */\r\n public async uploadTile(iModelId: string, changesetId: string, treeId: string, contentId: string, content: Uint8Array, guid?: string, metadata?: Metadata): Promise<void> {\r\n try {\r\n await this.storage.upload(\r\n getTileObjectReference(iModelId, changesetId, treeId, contentId, guid),\r\n Buffer.from(IModelHost.compressCachedTiles ? await promisify(gzip)(content.buffer) : content.buffer),\r\n metadata,\r\n IModelHost.compressCachedTiles ? { contentEncoding: \"gzip\" } : undefined,\r\n );\r\n } catch (err) {\r\n this.logException(\"Failed to upload tile\", err);\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Downloads a tile from the cloud cache.\r\n */\r\n public async downloadTile(iModelId: string, changesetId: string, treeId: string, contentId: string, guid?: string): Promise<Uint8Array> {\r\n try {\r\n const buffer = await this.storage.download(\r\n getTileObjectReference(iModelId, changesetId, treeId, contentId, guid),\r\n \"buffer\",\r\n );\r\n return IModelHost.compressCachedTiles ? await promisify(gunzip)(buffer) : buffer;\r\n } catch (err) {\r\n this.logException(\"Failed to download tile\", err);\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Returns a list of all tiles that are found in the cloud cache.\r\n */\r\n public async getCachedTiles(iModelId: string): Promise<{ treeId: string, contentId: string, guid: string }[]> {\r\n return (await this.storage.listObjects({ baseDirectory: iModelId }))\r\n .map((objectReference) => ({\r\n parts: objectReference.relativeDirectory?.split(\"/\") ?? [\"\"],\r\n objectName: objectReference.objectName,\r\n }))\r\n .filter(({ parts, objectName }) => {\r\n if (parts[0] !== \"tiles\")\r\n return false;\r\n if (parts.length !== 3) {\r\n Logger.logWarning(BackendLoggerCategory.IModelTileStorage, \"Malformed tile id found in tile cache: {tileId}\", { tileId: [...parts, objectName].join(\"/\") });\r\n return false;\r\n }\r\n return true;\r\n }).map(({ parts, objectName }) => {\r\n // relativeDirectory = tiles/<treeId>/<guid>\r\n // objectName = <contentId>\r\n return {\r\n treeId: parts[1],\r\n contentId: objectName,\r\n guid: parts[2],\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Returns a boolean indicating whether a tile exists in the cloud cache\r\n */\r\n public async isTileCached(iModelId: string, changesetId: string, treeId: string, contentId: string, guid?: string): Promise<boolean> {\r\n return this.storage.objectExists(getTileObjectReference(iModelId, changesetId, treeId, contentId, guid));\r\n }\r\n\r\n private logException(message: string, err: unknown): void {\r\n Logger.logException(\r\n BackendLoggerCategory.IModelTileStorage,\r\n err,\r\n (category, msg, errorMetadata) => Logger.logError(category, `${message}: {errorMessage}`, { ...errorMetadata, errorMessage: msg }),\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -18,9 +18,7 @@ export declare class ModelSelector extends DefinitionElement {
|
|
|
18
18
|
static get className(): string;
|
|
19
19
|
/** The array of modelIds of the GeometricModels displayed by this ModelSelector */
|
|
20
20
|
models: Id64String[];
|
|
21
|
-
|
|
22
|
-
constructor(props: ModelSelectorProps, iModel: IModelDb);
|
|
23
|
-
/** @internal */
|
|
21
|
+
protected constructor(props: ModelSelectorProps, iModel: IModelDb);
|
|
24
22
|
toJSON(): ModelSelectorProps;
|
|
25
23
|
protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
|
|
26
24
|
/** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
@@ -60,9 +58,7 @@ export declare class CategorySelector extends DefinitionElement {
|
|
|
60
58
|
static get className(): string;
|
|
61
59
|
/** The array of element Ids of the Categories selected by this CategorySelector */
|
|
62
60
|
categories: Id64String[];
|
|
63
|
-
|
|
64
|
-
constructor(props: CategorySelectorProps, iModel: IModelDb);
|
|
65
|
-
/** @internal */
|
|
61
|
+
protected constructor(props: CategorySelectorProps, iModel: IModelDb);
|
|
66
62
|
toJSON(): CategorySelectorProps;
|
|
67
63
|
protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
|
|
68
64
|
/** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
@@ -95,14 +91,7 @@ export declare class CategorySelector extends DefinitionElement {
|
|
|
95
91
|
/**
|
|
96
92
|
* The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,
|
|
97
93
|
* plus additional view-specific parameters in their [[Element.jsonProperties]].
|
|
98
|
-
*
|
|
99
94
|
* Subclasses of ViewDefinition determine which model(s) are viewed.
|
|
100
|
-
*
|
|
101
|
-
* **Example: Obtaining the background color for a view**
|
|
102
|
-
* ``` ts
|
|
103
|
-
* [[include:ViewDefinition.getBackgroundColor]]
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
95
|
* @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.
|
|
107
96
|
* @public
|
|
108
97
|
*/
|
|
@@ -113,9 +102,7 @@ export declare abstract class ViewDefinition extends DefinitionElement {
|
|
|
113
102
|
categorySelectorId: Id64String;
|
|
114
103
|
/** The element Id of the [[DisplayStyle]] for this ViewDefinition */
|
|
115
104
|
displayStyleId: Id64String;
|
|
116
|
-
/** @internal */
|
|
117
105
|
protected constructor(props: ViewDefinitionProps, iModel: IModelDb);
|
|
118
|
-
/** @internal */
|
|
119
106
|
toJSON(): ViewDefinitionProps;
|
|
120
107
|
protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
|
|
121
108
|
/** @beta */
|
|
@@ -168,9 +155,7 @@ export declare abstract class ViewDefinition3d extends ViewDefinition {
|
|
|
168
155
|
angles: YawPitchRollAngles;
|
|
169
156
|
/** The camera used for this view, if `cameraOn` is true. */
|
|
170
157
|
camera: Camera;
|
|
171
|
-
|
|
172
|
-
constructor(props: ViewDefinition3dProps, iModel: IModelDb);
|
|
173
|
-
/** @internal */
|
|
158
|
+
protected constructor(props: ViewDefinition3dProps, iModel: IModelDb);
|
|
174
159
|
toJSON(): ViewDefinition3dProps;
|
|
175
160
|
/** Provides access to optional detail settings for this view. */
|
|
176
161
|
get details(): ViewDetails3d;
|
|
@@ -194,11 +179,9 @@ export declare class SpatialViewDefinition extends ViewDefinition3d {
|
|
|
194
179
|
static get className(): string;
|
|
195
180
|
/** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */
|
|
196
181
|
modelSelectorId: Id64String;
|
|
197
|
-
|
|
198
|
-
constructor(props: SpatialViewDefinitionProps, iModel: IModelDb);
|
|
182
|
+
protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb);
|
|
199
183
|
/** Construct a SpatialViewDefinition from its JSON representation. */
|
|
200
184
|
static fromJSON(props: Omit<SpatialViewDefinitionProps, "classFullName">, iModel: IModelDb): SpatialViewDefinition;
|
|
201
|
-
/** Convert this view to its JSON representation. */
|
|
202
185
|
toJSON(): SpatialViewDefinitionProps;
|
|
203
186
|
protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
|
|
204
187
|
/** @beta */
|
|
@@ -284,9 +267,7 @@ export declare class ViewDefinition2d extends ViewDefinition {
|
|
|
284
267
|
delta: Point2d;
|
|
285
268
|
/** The rotation of this view. */
|
|
286
269
|
angle: Angle;
|
|
287
|
-
|
|
288
|
-
constructor(props: ViewDefinition2dProps, iModel: IModelDb);
|
|
289
|
-
/** @internal */
|
|
270
|
+
protected constructor(props: ViewDefinition2dProps, iModel: IModelDb);
|
|
290
271
|
toJSON(): ViewDefinition2dProps;
|
|
291
272
|
protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
|
|
292
273
|
/** Provides access to optional detail settings for this view. */
|
|
@@ -300,8 +281,7 @@ export declare class ViewDefinition2d extends ViewDefinition {
|
|
|
300
281
|
export declare class DrawingViewDefinition extends ViewDefinition2d {
|
|
301
282
|
/** @internal */
|
|
302
283
|
static get className(): string;
|
|
303
|
-
|
|
304
|
-
constructor(props: ViewDefinition2dProps, iModel: IModelDb);
|
|
284
|
+
protected constructor(props: ViewDefinition2dProps, iModel: IModelDb);
|
|
305
285
|
/** Create a DrawingViewDefinition
|
|
306
286
|
* @param iModelDb The iModel
|
|
307
287
|
* @param definitionModelId The [[DefinitionModel]]
|
|
@@ -424,7 +404,6 @@ export declare class LightLocation extends SpatialLocationElement {
|
|
|
424
404
|
static get className(): string;
|
|
425
405
|
/** Whether this light is currently turned on. */
|
|
426
406
|
enabled: boolean;
|
|
427
|
-
|
|
428
|
-
constructor(props: LightLocationProps, iModel: IModelDb);
|
|
407
|
+
protected constructor(props: LightLocationProps, iModel: IModelDb);
|
|
429
408
|
}
|
|
430
409
|
//# sourceMappingURL=ViewDefinition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewDefinition.d.ts","sourceRoot":"","sources":["../../src/ViewDefinition.ts"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MAAM,EAAE,QAAQ;cAK5C,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI;CAI/E;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACvD,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA4B;IAC1E,iDAAiD;IAC1C,OAAO,EAAG,OAAO,CAAC;IAEzB,SAAS,aAAa,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ;CAClE"}
|
|
@@ -21,12 +21,10 @@ const Element_1 = require("./Element");
|
|
|
21
21
|
class ModelSelector extends Element_1.DefinitionElement {
|
|
22
22
|
/** @internal */
|
|
23
23
|
static get className() { return "ModelSelector"; }
|
|
24
|
-
/** @internal */
|
|
25
24
|
constructor(props, iModel) {
|
|
26
25
|
super(props, iModel);
|
|
27
26
|
this.models = props.models;
|
|
28
27
|
}
|
|
29
|
-
/** @internal */
|
|
30
28
|
toJSON() {
|
|
31
29
|
const val = super.toJSON();
|
|
32
30
|
val.models = this.models;
|
|
@@ -87,12 +85,10 @@ exports.ModelSelector = ModelSelector;
|
|
|
87
85
|
class CategorySelector extends Element_1.DefinitionElement {
|
|
88
86
|
/** @internal */
|
|
89
87
|
static get className() { return "CategorySelector"; }
|
|
90
|
-
/** @internal */
|
|
91
88
|
constructor(props, iModel) {
|
|
92
89
|
super(props, iModel);
|
|
93
90
|
this.categories = props.categories;
|
|
94
91
|
}
|
|
95
|
-
/** @internal */
|
|
96
92
|
toJSON() {
|
|
97
93
|
const val = super.toJSON();
|
|
98
94
|
val.categories = this.categories;
|
|
@@ -148,21 +144,13 @@ exports.CategorySelector = CategorySelector;
|
|
|
148
144
|
/**
|
|
149
145
|
* The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,
|
|
150
146
|
* plus additional view-specific parameters in their [[Element.jsonProperties]].
|
|
151
|
-
*
|
|
152
147
|
* Subclasses of ViewDefinition determine which model(s) are viewed.
|
|
153
|
-
*
|
|
154
|
-
* **Example: Obtaining the background color for a view**
|
|
155
|
-
* ``` ts
|
|
156
|
-
* [[include:ViewDefinition.getBackgroundColor]]
|
|
157
|
-
* ```
|
|
158
|
-
*
|
|
159
148
|
* @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.
|
|
160
149
|
* @public
|
|
161
150
|
*/
|
|
162
151
|
class ViewDefinition extends (_b = Element_1.DefinitionElement) {
|
|
163
152
|
/** @internal */
|
|
164
153
|
static get className() { return "ViewDefinition"; }
|
|
165
|
-
/** @internal */
|
|
166
154
|
constructor(props, iModel) {
|
|
167
155
|
super(props, iModel);
|
|
168
156
|
this.categorySelectorId = core_bentley_1.Id64.fromJSON(props.categorySelectorId);
|
|
@@ -172,7 +160,6 @@ class ViewDefinition extends (_b = Element_1.DefinitionElement) {
|
|
|
172
160
|
if (!core_bentley_1.Id64.isValid(this.displayStyleId))
|
|
173
161
|
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadArg, `displayStyleId is invalid`);
|
|
174
162
|
}
|
|
175
|
-
/** @internal */
|
|
176
163
|
toJSON() {
|
|
177
164
|
const json = super.toJSON();
|
|
178
165
|
json.categorySelectorId = this.categorySelectorId;
|
|
@@ -246,7 +233,6 @@ exports.ViewDefinition = ViewDefinition;
|
|
|
246
233
|
class ViewDefinition3d extends ViewDefinition {
|
|
247
234
|
/** @internal */
|
|
248
235
|
static get className() { return "ViewDefinition3d"; }
|
|
249
|
-
/** @internal */
|
|
250
236
|
constructor(props, iModel) {
|
|
251
237
|
super(props, iModel);
|
|
252
238
|
this.cameraOn = core_bentley_1.JsonUtils.asBool(props.cameraOn);
|
|
@@ -256,7 +242,6 @@ class ViewDefinition3d extends ViewDefinition {
|
|
|
256
242
|
this.camera = new core_common_1.Camera(props.camera);
|
|
257
243
|
this._details = new core_common_1.ViewDetails3d(this.jsonProperties);
|
|
258
244
|
}
|
|
259
|
-
/** @internal */
|
|
260
245
|
toJSON() {
|
|
261
246
|
const val = super.toJSON();
|
|
262
247
|
val.cameraOn = this.cameraOn;
|
|
@@ -287,7 +272,6 @@ exports.ViewDefinition3d = ViewDefinition3d;
|
|
|
287
272
|
class SpatialViewDefinition extends (_d = ViewDefinition3d) {
|
|
288
273
|
/** @internal */
|
|
289
274
|
static get className() { return "SpatialViewDefinition"; }
|
|
290
|
-
/** @internal */
|
|
291
275
|
constructor(props, iModel) {
|
|
292
276
|
super(props, iModel);
|
|
293
277
|
this.modelSelectorId = core_bentley_1.Id64.fromJSON(props.modelSelectorId);
|
|
@@ -298,7 +282,6 @@ class SpatialViewDefinition extends (_d = ViewDefinition3d) {
|
|
|
298
282
|
static fromJSON(props, iModel) {
|
|
299
283
|
return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);
|
|
300
284
|
}
|
|
301
|
-
/** Convert this view to its JSON representation. */
|
|
302
285
|
toJSON() {
|
|
303
286
|
const json = super.toJSON();
|
|
304
287
|
json.modelSelectorId = this.modelSelectorId;
|
|
@@ -442,7 +425,6 @@ exports.OrthographicViewDefinition = OrthographicViewDefinition;
|
|
|
442
425
|
class ViewDefinition2d extends ViewDefinition {
|
|
443
426
|
/** @internal */
|
|
444
427
|
static get className() { return "ViewDefinition2d"; }
|
|
445
|
-
/** @internal */
|
|
446
428
|
constructor(props, iModel) {
|
|
447
429
|
super(props, iModel);
|
|
448
430
|
this.baseModelId = core_bentley_1.Id64.fromJSON(props.baseModelId);
|
|
@@ -451,7 +433,6 @@ class ViewDefinition2d extends ViewDefinition {
|
|
|
451
433
|
this.angle = core_geometry_1.Angle.fromJSON(props.angle);
|
|
452
434
|
this._details = new core_common_1.ViewDetails(this.jsonProperties);
|
|
453
435
|
}
|
|
454
|
-
/** @internal */
|
|
455
436
|
toJSON() {
|
|
456
437
|
const val = super.toJSON();
|
|
457
438
|
val.baseModelId = this.baseModelId;
|
|
@@ -476,7 +457,6 @@ exports.ViewDefinition2d = ViewDefinition2d;
|
|
|
476
457
|
class DrawingViewDefinition extends ViewDefinition2d {
|
|
477
458
|
/** @internal */
|
|
478
459
|
static get className() { return "DrawingViewDefinition"; }
|
|
479
|
-
/** @internal */
|
|
480
460
|
constructor(props, iModel) {
|
|
481
461
|
super(props, iModel);
|
|
482
462
|
}
|
|
@@ -634,7 +614,6 @@ exports.ViewAttachment = ViewAttachment;
|
|
|
634
614
|
class LightLocation extends Element_1.SpatialLocationElement {
|
|
635
615
|
/** @internal */
|
|
636
616
|
static get className() { return "LightLocation"; }
|
|
637
|
-
/** @internal */
|
|
638
617
|
constructor(props, iModel) { super(props, iModel); }
|
|
639
618
|
}
|
|
640
619
|
exports.LightLocation = LightLocation;
|