@itwin/core-common 5.1.0-dev.27 → 5.1.0-dev.29

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.
@@ -10,7 +10,7 @@ import { GeometryStreamProps } from "./geometry/GeometryStream";
10
10
  import { SubCategoryAppearance } from "./SubCategoryAppearance";
11
11
  import { TextAnnotationProps } from "./annotation/TextAnnotation";
12
12
  /** Properties of a NavigationProperty.
13
- * @public
13
+ * @public @preview
14
14
  * @extensions
15
15
  */
16
16
  export interface RelatedElementProps {
@@ -20,7 +20,7 @@ export interface RelatedElementProps {
20
20
  relClassName?: string;
21
21
  }
22
22
  /** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)
23
- * @public
23
+ * @public @preview
24
24
  * @extensions
25
25
  */
26
26
  export interface ElementProps extends EntityProps {
@@ -41,7 +41,7 @@ export interface ElementProps extends EntityProps {
41
41
  jsonProperties?: any;
42
42
  }
43
43
  /** The Id and relationship class of an Element that is somehow related to another Element
44
- * @public
44
+ * @public @preview
45
45
  */
46
46
  export declare class RelatedElement implements RelatedElementProps {
47
47
  /** The Id of the element to which this element is related. */
@@ -57,12 +57,12 @@ export declare class RelatedElement implements RelatedElementProps {
57
57
  toJSON(): RelatedElementProps;
58
58
  }
59
59
  /** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
60
- * @public
60
+ * @public @preview
61
61
  */
62
62
  export declare class TypeDefinition extends RelatedElement {
63
63
  }
64
64
  /** Properties of a [GeometricElement]($backend)
65
- * @public
65
+ * @public @preview
66
66
  * @extensions
67
67
  */
68
68
  export interface GeometricElementProps extends ElementProps {
@@ -78,7 +78,7 @@ export interface GeometricElementProps extends ElementProps {
78
78
  placement?: PlacementProps;
79
79
  }
80
80
  /** Properties of a [[Placement3d]]
81
- * @public
81
+ * @public @preview
82
82
  * @extensions
83
83
  */
84
84
  export interface Placement3dProps {
@@ -87,7 +87,7 @@ export interface Placement3dProps {
87
87
  bbox?: LowAndHighXYZProps;
88
88
  }
89
89
  /** Properties of a [[Placement2d]]
90
- * @public
90
+ * @public @preview
91
91
  * @extensions
92
92
  */
93
93
  export interface Placement2dProps {
@@ -96,20 +96,20 @@ export interface Placement2dProps {
96
96
  bbox?: LowAndHighXYProps;
97
97
  }
98
98
  /**
99
- * @public
99
+ * @public @preview
100
100
  * @extensions
101
101
  */
102
102
  export type PlacementProps = Placement2dProps | Placement3dProps;
103
103
  /** determine if this is Placement2dProps
104
- * @public
104
+ * @public @preview
105
105
  */
106
106
  export declare function isPlacement2dProps(props: PlacementProps): props is Placement2dProps;
107
107
  /** determine if this is Placement3dProps
108
- * @public
108
+ * @public @preview
109
109
  */
110
110
  export declare function isPlacement3dProps(props: PlacementProps): props is Placement3dProps;
111
111
  /** Properties that define a [GeometricElement3d]($backend)
112
- * @public
112
+ * @public @preview
113
113
  * @extensions
114
114
  */
115
115
  export interface GeometricElement3dProps extends GeometricElementProps {
@@ -117,7 +117,7 @@ export interface GeometricElement3dProps extends GeometricElementProps {
117
117
  typeDefinition?: RelatedElementProps;
118
118
  }
119
119
  /** JSON representation of a [TextAnnotation3d]($backend).
120
- * @public
120
+ * @public @preview
121
121
  * @extensions
122
122
  */
123
123
  export interface TextAnnotation3dProps extends GeometricElement3dProps {
@@ -128,14 +128,14 @@ export interface TextAnnotation3dProps extends GeometricElement3dProps {
128
128
  };
129
129
  }
130
130
  /** Properties that define a [PhysicalElement]($backend)
131
- * @public
131
+ * @public @preview
132
132
  * @extensions
133
133
  */
134
134
  export interface PhysicalElementProps extends GeometricElement3dProps {
135
135
  physicalMaterial?: RelatedElementProps;
136
136
  }
137
137
  /** An enumeration of the different types of [SectionDrawing]($backend)s.
138
- * @public
138
+ * @public @preview
139
139
  * @extensions
140
140
  */
141
141
  export declare enum SectionType {
@@ -145,7 +145,7 @@ export declare enum SectionType {
145
145
  Plan = 6
146
146
  }
147
147
  /** Properties that define a [Drawing]($backend).
148
- * @public
148
+ * @public @preview
149
149
  * @extensions
150
150
  */
151
151
  export interface DrawingProps extends ElementProps {
@@ -153,12 +153,12 @@ export interface DrawingProps extends ElementProps {
153
153
  * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).
154
154
  * Default: 1.
155
155
  * @note The scale factor **must** be greater than zero.
156
- * @public
156
+ * @public @preview
157
157
  */
158
158
  scaleFactor?: number;
159
159
  }
160
160
  /** Properties that define a [SectionDrawing]($backend).
161
- * @public
161
+ * @public @preview
162
162
  * @extensions
163
163
  */
164
164
  export interface SectionDrawingProps extends DrawingProps {
@@ -181,7 +181,7 @@ export interface SectionDrawingProps extends DrawingProps {
181
181
  };
182
182
  }
183
183
  /** Properties that define a [SectionDrawingLocation]($backend)
184
- * @public
184
+ * @public @preview
185
185
  * @extensions
186
186
  */
187
187
  export interface SectionDrawingLocationProps extends GeometricElement3dProps {
@@ -189,7 +189,7 @@ export interface SectionDrawingLocationProps extends GeometricElement3dProps {
189
189
  sectionView?: RelatedElementProps;
190
190
  }
191
191
  /** Properties that define a [GeometricElement2d]($backend)
192
- * @public
192
+ * @public @preview
193
193
  * @extensions
194
194
  */
195
195
  export interface GeometricElement2dProps extends GeometricElementProps {
@@ -197,7 +197,7 @@ export interface GeometricElement2dProps extends GeometricElementProps {
197
197
  typeDefinition?: RelatedElementProps;
198
198
  }
199
199
  /** JSON representation of a [TextAnnotation2d]($backend).
200
- * @public
200
+ * @public @preview
201
201
  * @extensions
202
202
  */
203
203
  export interface TextAnnotation2dProps extends GeometricElement2dProps {
@@ -208,7 +208,7 @@ export interface TextAnnotation2dProps extends GeometricElement2dProps {
208
208
  };
209
209
  }
210
210
  /** Properties of a [GeometryPart]($backend)
211
- * @public
211
+ * @public @preview
212
212
  * @extensions
213
213
  */
214
214
  export interface GeometryPartProps extends ElementProps {
@@ -220,7 +220,7 @@ export interface GeometryPartProps extends ElementProps {
220
220
  bbox?: LowAndHighXYZProps;
221
221
  }
222
222
  /** Properties for a [ViewAttachment]($backend)
223
- * @public
223
+ * @public @preview
224
224
  * @extensions
225
225
  */
226
226
  export interface ViewAttachmentProps extends GeometricElement2dProps {
@@ -242,7 +242,7 @@ export interface ViewAttachmentProps extends GeometricElement2dProps {
242
242
  };
243
243
  }
244
244
  /** Properties of a [Subject]($backend)
245
- * @public
245
+ * @public @preview
246
246
  * @extensions
247
247
  */
248
248
  export interface SubjectProps extends ElementProps {
@@ -264,7 +264,7 @@ export interface SheetTemplateProps extends ElementProps {
264
264
  border?: Id64String;
265
265
  }
266
266
  /** Properties of a [Sheet]($backend).
267
- * @public
267
+ * @public @preview
268
268
  * @extensions
269
269
  */
270
270
  export interface SheetProps extends ElementProps {
@@ -275,21 +275,21 @@ export interface SheetProps extends ElementProps {
275
275
  attachments?: Id64String[];
276
276
  }
277
277
  /** Properties of a [DefinitionElement]($backend)
278
- * @public
278
+ * @public @preview
279
279
  * @extensions
280
280
  */
281
281
  export interface DefinitionElementProps extends ElementProps {
282
282
  isPrivate?: boolean;
283
283
  }
284
284
  /** Properties of a [TypeDefinitionElement]($backend)
285
- * @public
285
+ * @public @preview
286
286
  * @extensions
287
287
  */
288
288
  export interface TypeDefinitionElementProps extends DefinitionElementProps {
289
289
  recipe?: RelatedElementProps;
290
290
  }
291
291
  /** Properties of a [PhysicalType]($backend)
292
- * @public
292
+ * @public @preview
293
293
  * @extensions
294
294
  */
295
295
  export interface PhysicalTypeProps extends TypeDefinitionElementProps {
@@ -297,7 +297,7 @@ export interface PhysicalTypeProps extends TypeDefinitionElementProps {
297
297
  physicalMaterial?: RelatedElementProps;
298
298
  }
299
299
  /** Properties of a [InformationPartitionElement]($backend)
300
- * @public
300
+ * @public @preview
301
301
  * @extensions
302
302
  */
303
303
  export interface InformationPartitionElementProps extends ElementProps {
@@ -305,7 +305,7 @@ export interface InformationPartitionElementProps extends ElementProps {
305
305
  }
306
306
  /** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].
307
307
  * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].
308
- * @public
308
+ * @public @preview
309
309
  * @extensions
310
310
  */
311
311
  export interface DisplayStyleLoadProps {
@@ -320,7 +320,7 @@ export interface DisplayStyleLoadProps {
320
320
  }
321
321
  /** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].
322
322
  * @see [[ElementLoadOptions.renderTimeline]].
323
- * @public
323
+ * @public @preview
324
324
  * @extensions
325
325
  */
326
326
  export interface RenderTimelineLoadProps {
@@ -331,7 +331,7 @@ export interface RenderTimelineLoadProps {
331
331
  }
332
332
  /** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like
333
333
  * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).
334
- * @public
334
+ * @public @preview
335
335
  * @extensions
336
336
  */
337
337
  export interface ElementLoadOptions {
@@ -352,7 +352,7 @@ export interface ElementLoadOptions {
352
352
  renderTimeline?: RenderTimelineLoadProps;
353
353
  }
354
354
  /** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).
355
- * @public
355
+ * @public @preview
356
356
  * @extensions
357
357
  */
358
358
  export interface ElementLoadProps extends ElementLoadOptions {
@@ -365,14 +365,14 @@ export interface ElementLoadProps extends ElementLoadOptions {
365
365
  federationGuid?: GuidString;
366
366
  }
367
367
  /** Properties of an [ElementAspect]($backend)
368
- * @public
368
+ * @public @preview
369
369
  * @extensions
370
370
  */
371
371
  export interface ElementAspectProps extends EntityProps {
372
372
  element: RelatedElementProps;
373
373
  }
374
374
  /** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.
375
- * @public
375
+ * @public @preview
376
376
  * @extensions
377
377
  */
378
378
  export interface ExternalSourceAspectProps extends ElementAspectProps {
@@ -431,7 +431,7 @@ export interface ExternalSourceAttachmentProps extends ElementProps {
431
431
  scale?: XYZProps;
432
432
  }
433
433
  /** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.
434
- * @public
434
+ * @public @preview
435
435
  * @extensions
436
436
  */
437
437
  export interface ChannelRootAspectProps extends ElementAspectProps {
@@ -439,7 +439,7 @@ export interface ChannelRootAspectProps extends ElementAspectProps {
439
439
  owner: string;
440
440
  }
441
441
  /** Properties of a [LineStyle]($backend)
442
- * @public
442
+ * @public @preview
443
443
  * @extensions
444
444
  */
445
445
  export interface LineStyleProps extends DefinitionElementProps {
@@ -454,7 +454,7 @@ export interface LightLocationProps extends GeometricElement3dProps {
454
454
  enabled?: boolean;
455
455
  }
456
456
  /** The *rank* for a Category
457
- * @public
457
+ * @public @preview
458
458
  * @extensions
459
459
  */
460
460
  export declare enum Rank {
@@ -468,7 +468,7 @@ export declare enum Rank {
468
468
  User = 3
469
469
  }
470
470
  /** Parameters of a [Category]($backend)
471
- * @public
471
+ * @public @preview
472
472
  * @extensions
473
473
  */
474
474
  export interface CategoryProps extends DefinitionElementProps {
@@ -476,7 +476,7 @@ export interface CategoryProps extends DefinitionElementProps {
476
476
  description?: string;
477
477
  }
478
478
  /** Parameters of a [SubCategory]($backend)
479
- * @public
479
+ * @public @preview
480
480
  * @extensions
481
481
  */
482
482
  export interface SubCategoryProps extends DefinitionElementProps {
@@ -484,7 +484,7 @@ export interface SubCategoryProps extends DefinitionElementProps {
484
484
  description?: string;
485
485
  }
486
486
  /** Parameters of a [UrlLink]($backend)
487
- * @public
487
+ * @public @preview
488
488
  * @extensions
489
489
  */
490
490
  export interface UrlLinkProps extends ElementProps {
@@ -492,7 +492,7 @@ export interface UrlLinkProps extends ElementProps {
492
492
  url?: string;
493
493
  }
494
494
  /** Parameters of a [RepositoryLink]($backend)
495
- * @public
495
+ * @public @preview
496
496
  * @extensions
497
497
  */
498
498
  export interface RepositoryLinkProps extends UrlLinkProps {
@@ -506,7 +506,7 @@ export interface SynchronizationConfigLinkProps extends UrlLinkProps {
506
506
  lastSuccessfulRun?: string;
507
507
  }
508
508
  /** Wire format describing a [RenderTimeline]($backend).
509
- * @public
509
+ * @public @preview
510
510
  * @extensions
511
511
  */
512
512
  export interface RenderTimelineProps extends ElementProps {
@@ -13,7 +13,7 @@ exports.isPlacement3dProps = isPlacement3dProps;
13
13
  const core_bentley_1 = require("@itwin/core-bentley");
14
14
  const IModelError_1 = require("./IModelError");
15
15
  /** The Id and relationship class of an Element that is somehow related to another Element
16
- * @public
16
+ * @public @preview
17
17
  */
18
18
  class RelatedElement {
19
19
  /** The Id of the element to which this element is related. */
@@ -48,25 +48,25 @@ class RelatedElement {
48
48
  }
49
49
  exports.RelatedElement = RelatedElement;
50
50
  /** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
51
- * @public
51
+ * @public @preview
52
52
  */
53
53
  class TypeDefinition extends RelatedElement {
54
54
  }
55
55
  exports.TypeDefinition = TypeDefinition;
56
56
  /** determine if this is Placement2dProps
57
- * @public
57
+ * @public @preview
58
58
  */
59
59
  function isPlacement2dProps(props) {
60
60
  return props.angle !== undefined;
61
61
  }
62
62
  /** determine if this is Placement3dProps
63
- * @public
63
+ * @public @preview
64
64
  */
65
65
  function isPlacement3dProps(props) {
66
66
  return !isPlacement2dProps(props);
67
67
  }
68
68
  /** An enumeration of the different types of [SectionDrawing]($backend)s.
69
- * @public
69
+ * @public @preview
70
70
  * @extensions
71
71
  */
72
72
  var SectionType;
@@ -87,7 +87,7 @@ var ExternalSourceAttachmentRole;
87
87
  ExternalSourceAttachmentRole[ExternalSourceAttachmentRole["SpecifyPart"] = 1] = "SpecifyPart";
88
88
  })(ExternalSourceAttachmentRole || (exports.ExternalSourceAttachmentRole = ExternalSourceAttachmentRole = {}));
89
89
  /** The *rank* for a Category
90
- * @public
90
+ * @public @preview
91
91
  * @extensions
92
92
  */
93
93
  var Rank;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4IH,gDAEC;AAKD,gDAEC;AAnJD,sDAAiF;AAQjF,+CAA4C;AAqC5C;;GAEG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C,KAAK,KAAK,SAAS,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAqB;IACtD,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AA+BD;;;GAGG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,iDAAU,CAAA;IACV,uDAAa,CAAA;IACb,6CAAQ,CAAA;AACV,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAiSD;;GAEG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,gEAAgE;IAChE,mGAAkB,CAAA;IAClB,0EAA0E;IAC1E,6FAAe,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AAyCD;;;GAGG;AACH,IAAY,IASX;AATD,WAAY,IAAI;IACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\n */\n\nimport { GuidString, Id64, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { EntityProps } from \"./EntityProps\";\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\nimport { IModelError } from \"./IModelError\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\nimport { TextAnnotationProps } from \"./annotation/TextAnnotation\";\n\n/** Properties of a NavigationProperty.\n * @public\n * @extensions\n */\nexport interface RelatedElementProps {\n /** The Id of the element to which this element is related. */\n id: Id64String;\n /** The full className of the relationship class. */\n relClassName?: string;\n}\n\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\n * @public\n * @extensions\n */\nexport interface ElementProps extends EntityProps {\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n code: CodeProps;\n /** The Parent of this element, if defined. */\n parent?: RelatedElementProps;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\n */\n federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n jsonProperties?: any;\n}\n\n/** The Id and relationship class of an Element that is somehow related to another Element\n * @public\n */\nexport class RelatedElement implements RelatedElementProps {\n /** The Id of the element to which this element is related. */\n public readonly id: Id64String;\n\n /** The full className of the relationship class. */\n public readonly relClassName?: string;\n\n constructor(props: RelatedElementProps) {\n this.id = Id64.fromJSON(props.id);\n this.relClassName = props.relClassName;\n }\n\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\n return json ? new RelatedElement(json) : undefined;\n }\n\n /** Used to *null out* an existing navigation relationship. */\n public static readonly none = new RelatedElement({ id: Id64.invalid });\n\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\n public static idFromJson(json: any): Id64String {\n if ((typeof json === \"object\") && (\"id\" in json)) {\n const r = RelatedElement.fromJSON(json);\n if (r === undefined)\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\n return r.id;\n }\n return Id64.fromJSON(json);\n }\n\n public toJSON(): RelatedElementProps {\n return {\n id: this.id,\n relClassName: this.relClassName,\n };\n }\n}\n\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\n * @public\n */\nexport class TypeDefinition extends RelatedElement {\n}\n\n/** Properties of a [GeometricElement]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricElementProps extends ElementProps {\n /** The id of the category for this geometric element. */\n category: Id64String;\n /** The geometry stream properties */\n geom?: GeometryStreamProps;\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\n /** The placement properties */\n placement?: PlacementProps;\n}\n\n/** Properties of a [[Placement3d]]\n * @public\n * @extensions\n */\nexport interface Placement3dProps {\n origin: XYZProps;\n angles: YawPitchRollProps;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties of a [[Placement2d]]\n * @public\n * @extensions\n */\nexport interface Placement2dProps {\n origin: XYProps;\n angle: AngleProps;\n bbox?: LowAndHighXYProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport type PlacementProps = Placement2dProps | Placement3dProps;\n\n/** determine if this is Placement2dProps\n * @public\n */\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\n return (props as Placement2dProps).angle !== undefined;\n}\n\n/** determine if this is Placement3dProps\n * @public\n */\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\n return !isPlacement2dProps(props);\n}\n\n/** Properties that define a [GeometricElement3d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricElement3dProps extends GeometricElementProps {\n placement?: Placement3dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation3d]($backend).\n * @public\n * @extensions\n */\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\n jsonProperties?: {\n [key: string]: any;\n /** @beta */\n annotation?: TextAnnotationProps;\n };\n}\n\n/** Properties that define a [PhysicalElement]($backend)\n * @public\n * @extensions\n */\nexport interface PhysicalElementProps extends GeometricElement3dProps {\n physicalMaterial?: RelatedElementProps;\n}\n\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\n * @public\n * @extensions\n */\nexport enum SectionType {\n Section = 3,\n Detail = 4,\n Elevation = 5,\n Plan = 6,\n}\n\n/** Properties that define a [Drawing]($backend).\n * @public\n * @extensions\n */\nexport interface DrawingProps extends ElementProps {\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\n * Default: 1.\n * @note The scale factor **must** be greater than zero.\n * @public\n */\n scaleFactor?: number;\n}\n\n/** Properties that define a [SectionDrawing]($backend).\n * @public\n * @extensions\n */\nexport interface SectionDrawingProps extends DrawingProps {\n /** The type of section used to generate the drawing. Default: Section. */\n sectionType?: SectionType;\n /** The spatial view from which the section was generated. */\n spatialView?: RelatedElementProps;\n jsonProperties?: {\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n drawingToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\n sheetToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\n * the sheet graphics when drawn in the context of the spatial view.\n * The ClipVector is in spatial coordinates.\n */\n drawingBoundaryClip?: ClipVectorProps;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n displaySpatialView?: true;\n };\n}\n\n/** Properties that define a [SectionDrawingLocation]($backend)\n * @public\n * @extensions\n */\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\n /** The [ViewDefinition]($backend) to which this location refers. */\n sectionView?: RelatedElementProps;\n}\n\n/** Properties that define a [GeometricElement2d]($backend)\n * @public\n * @extensions\n */\nexport interface GeometricElement2dProps extends GeometricElementProps {\n placement?: Placement2dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation2d]($backend).\n * @public\n * @extensions\n */\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\n jsonProperties?: {\n [key: string]: any;\n /** @beta */\n annotation?: TextAnnotationProps;\n };\n}\n\n/** Properties of a [GeometryPart]($backend)\n * @public\n * @extensions\n */\nexport interface GeometryPartProps extends ElementProps {\n geom?: GeometryStreamProps;\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties for a [ViewAttachment]($backend)\n * @public\n * @extensions\n */\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\n view: RelatedElementProps;\n jsonProperties?: {\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\n displayPriority?: number;\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\n clip?: ClipVectorProps;\n /** Options for customizing how the view attachment is displayed on the sheet. */\n displayOptions?: {\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\n drawAsRaster?: boolean;\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\n */\n preserveBackground?: boolean;\n };\n };\n}\n\n/** Properties of a [Subject]($backend)\n * @public\n * @extensions\n */\nexport interface SubjectProps extends ElementProps {\n description?: string;\n}\n\n/** Properties of a [SheetBorderTemplate]($backend)\n * @beta\n */\nexport interface SheetBorderTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n}\n\n/** Properties of a [SheetTemplate]($backend)\n * @beta\n */\nexport interface SheetTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n border?: Id64String;\n}\n\n/** Properties of a [Sheet]($backend).\n * @public\n * @extensions\n */\nexport interface SheetProps extends ElementProps {\n width?: number;\n height?: number;\n scale?: number;\n sheetTemplate?: Id64String;\n attachments?: Id64String[];\n}\n\n/** Properties of a [DefinitionElement]($backend)\n * @public\n * @extensions\n */\nexport interface DefinitionElementProps extends ElementProps {\n isPrivate?: boolean;\n}\n\n/** Properties of a [TypeDefinitionElement]($backend)\n * @public\n * @extensions\n */\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\n recipe?: RelatedElementProps;\n}\n\n/** Properties of a [PhysicalType]($backend)\n * @public\n * @extensions\n */\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\n physicalMaterial?: RelatedElementProps;\n}\n\n/** Properties of a [InformationPartitionElement]($backend)\n * @public\n * @extensions\n */\nexport interface InformationPartitionElementProps extends ElementProps {\n description?: string;\n}\n\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\n * @public\n * @extensions\n */\nexport interface DisplayStyleLoadProps {\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\n * The element Ids are not required on the frontend for display and can be quite large.\n */\n omitScheduleScriptElementIds?: boolean;\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\n */\n compressExcludedElementIds?: boolean;\n}\n\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\n * @see [[ElementLoadOptions.renderTimeline]].\n * @public\n * @extensions\n */\nexport interface RenderTimelineLoadProps {\n /** If true, the lists of element Ids in the schedule script will be empty.\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\n */\n omitScriptElementIds?: boolean;\n}\n\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\n * @public\n * @extensions\n */\nexport interface ElementLoadOptions {\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\n onlyBaseProperties?: boolean;\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\n */\n wantGeometry?: boolean;\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\n */\n wantBRepData?: boolean;\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\n displayStyle?: DisplayStyleLoadProps;\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\n renderTimeline?: RenderTimelineLoadProps;\n}\n\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\n * @public\n * @extensions\n */\nexport interface ElementLoadProps extends ElementLoadOptions {\n id?: Id64String;\n /** The properties of the Code of the element to load.\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\n * TODO: change to Required<CodeProps> in Version 4.0\n */\n code?: CodeProps;\n federationGuid?: GuidString;\n}\n\n/** Properties of an [ElementAspect]($backend)\n * @public\n * @extensions\n */\nexport interface ElementAspectProps extends EntityProps {\n element: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\n * @public\n * @extensions\n */\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n scope: RelatedElementProps;\n /** The identifier of the object in the source repository. */\n identifier: string;\n /** The kind of object within the source repository. */\n kind: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n version?: string;\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n checksum?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n jsonProperties?: any;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n source?: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSource]($backend)\n * @beta\n */\nexport interface ExternalSourceProps extends ElementProps {\n repository?: RelatedElementProps;\n connectorName?: string;\n connectorVersion?: string;\n}\n\n/** The role that an attached [ExternalSource]($backend) plays.\n * @beta\n */\nexport enum ExternalSourceAttachmentRole {\n /** The attached [ExternalSource]($backend) provides context. */\n SpecifyContext = 0,\n /** The attached [ExternalSource]($backend) models a part of the whole. */\n SpecifyPart = 1,\n}\n\n/** Properties of an [ExternalSourceAttachment]($backend)\n * @beta\n */\nexport interface ExternalSourceAttachmentProps extends ElementProps {\n attaches?: RelatedElementProps;\n role?: ExternalSourceAttachmentRole;\n translation?: XYZProps;\n yaw?: number;\n pitch?: number;\n roll?: number;\n scale?: XYZProps;\n}\n\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\n * @public\n * @extensions\n */\nexport interface ChannelRootAspectProps extends ElementAspectProps {\n /** The owner of the channel */\n owner: string;\n}\n\n/** Properties of a [LineStyle]($backend)\n * @public\n * @extensions\n */\nexport interface LineStyleProps extends DefinitionElementProps {\n description?: string;\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\n data: string;\n}\n\n/** Properties of a [LightLocation]($backend)\n * @internal\n */\nexport interface LightLocationProps extends GeometricElement3dProps {\n enabled?: boolean;\n}\n\n/** The *rank* for a Category\n * @public\n * @extensions\n */\nexport enum Rank {\n /** This category is predefined by the system */\n System = 0,\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\n Domain = 1,\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\n Application = 2,\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\n User = 3,\n}\n\n/** Parameters of a [Category]($backend)\n * @public\n * @extensions\n */\nexport interface CategoryProps extends DefinitionElementProps {\n rank?: Rank;\n description?: string;\n}\n\n/** Parameters of a [SubCategory]($backend)\n * @public\n * @extensions\n */\nexport interface SubCategoryProps extends DefinitionElementProps {\n appearance?: SubCategoryAppearance.Props;\n description?: string;\n}\n\n/** Parameters of a [UrlLink]($backend)\n * @public\n * @extensions\n */\nexport interface UrlLinkProps extends ElementProps {\n description?: string;\n url?: string;\n}\n\n/** Parameters of a [RepositoryLink]($backend)\n * @public\n * @extensions\n */\nexport interface RepositoryLinkProps extends UrlLinkProps {\n repositoryGuid?: GuidString;\n format?: string;\n}\n\n/** The properties of a [SynchronizationConfigLink]($backend)\n * @beta\n */\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\n lastSuccessfulRun?: string;\n}\n\n/** Wire format describing a [RenderTimeline]($backend).\n * @public\n * @extensions\n */\nexport interface RenderTimelineProps extends ElementProps {\n /** An optional human-readable description of the timeline. */\n description?: string;\n /** The stringified JSON representation of the instructions for visualizing change over time.\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\n */\n script: string;\n}\n\n/** Properties of a [SheetIndexEntry]($backend).\n * @beta\n*/\nexport interface SheetIndexEntryProps extends ElementProps {\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\n entryPriority: number;\n}\n\n/** Properties of a [SheetIndexFolder]($backend)\n * @beta\n */\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\n\n/** Properties of a [SheetIndexReference]($backend)\n * @beta\n */\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\n sheetIndex?: RelatedElementProps;\n}\n\n/** Properties of a [SheetReference]($backend)\n * @beta\n */\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\n sheet?: RelatedElementProps;\n}\n"]}
1
+ {"version":3,"file":"ElementProps.js","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4IH,gDAEC;AAKD,gDAEC;AAnJD,sDAAiF;AAQjF,+CAA4C;AAqC5C;;GAEG;AACH,MAAa,cAAc;IACzB,8DAA8D;IAC9C,EAAE,CAAa;IAE/B,oDAAoD;IACpC,YAAY,CAAU;IAEtC,YAAY,KAA0B;QACpC,IAAI,CAAC,EAAE,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAA0B;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IAED,8DAA8D;IACvD,MAAM,CAAU,IAAI,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE,EAAE,mBAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAEvE,mJ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ACd,gDAAgD;IAChD,mCAAU,CAAA;IACV,4GAA4G;IAC5G,mCAAU,CAAA;IACV,6HAA6H;IAC7H,6CAAe,CAAA;IACf,mIAAmI;IACnI,+BAAQ,CAAA;AACV,CAAC,EATW,IAAI,oBAAJ,IAAI,QASf","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 Entities\n */\n\nimport { GuidString, Id64, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport {\n AngleProps, ClipVectorProps, LowAndHighXYProps, LowAndHighXYZProps, TransformProps, XYProps, XYZProps, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { CodeProps } from \"./Code\";\nimport { EntityProps } from \"./EntityProps\";\nimport { ElementGeometryBuilderParams, ElementGeometryBuilderParamsForPart } from \"./geometry/ElementGeometry\";\nimport { GeometryStreamProps } from \"./geometry/GeometryStream\";\nimport { IModelError } from \"./IModelError\";\nimport { SubCategoryAppearance } from \"./SubCategoryAppearance\";\nimport { TextAnnotationProps } from \"./annotation/TextAnnotation\";\n\n/** Properties of a NavigationProperty.\n * @public @preview\n * @extensions\n */\nexport interface RelatedElementProps {\n /** The Id of the element to which this element is related. */\n id: Id64String;\n /** The full className of the relationship class. */\n relClassName?: string;\n}\n\n/** Properties of an [Element]($docs/bis/guide/fundamentals/element-fundamentals)\n * @public @preview\n * @extensions\n */\nexport interface ElementProps extends EntityProps {\n /** The Id of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n code: CodeProps;\n /** The Parent of this element, if defined. */\n parent?: RelatedElementProps;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element.\n * @note On insert, if this is a valid Guid, the value is preserved. If it is `undefined`, a new Guid is created. If it is an invalid Guid (e.g. Guid.empty), the\n * resultant element will have a `null` federationGuid. For update, `undefined` means \"don't change.\"\n */\n federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n jsonProperties?: any;\n}\n\n/** The Id and relationship class of an Element that is somehow related to another Element\n * @public @preview\n */\nexport class RelatedElement implements RelatedElementProps {\n /** The Id of the element to which this element is related. */\n public readonly id: Id64String;\n\n /** The full className of the relationship class. */\n public readonly relClassName?: string;\n\n constructor(props: RelatedElementProps) {\n this.id = Id64.fromJSON(props.id);\n this.relClassName = props.relClassName;\n }\n\n public static fromJSON(json?: RelatedElementProps): RelatedElement | undefined {\n return json ? new RelatedElement(json) : undefined;\n }\n\n /** Used to *null out* an existing navigation relationship. */\n public static readonly none = new RelatedElement({ id: Id64.invalid });\n\n /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */\n public static idFromJson(json: any): Id64String {\n if ((typeof json === \"object\") && (\"id\" in json)) {\n const r = RelatedElement.fromJSON(json);\n if (r === undefined)\n throw new IModelError(IModelStatus.BadArg, \"Problem parsing Id64 from json\");\n return r.id;\n }\n return Id64.fromJSON(json);\n }\n\n public toJSON(): RelatedElementProps {\n return {\n id: this.id,\n relClassName: this.relClassName,\n };\n }\n}\n\n/** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.\n * @public @preview\n */\nexport class TypeDefinition extends RelatedElement {\n}\n\n/** Properties of a [GeometricElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElementProps extends ElementProps {\n /** The id of the category for this geometric element. */\n category: Id64String;\n /** The geometry stream properties */\n geom?: GeometryStreamProps;\n /** Describes how to build the element's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent element.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParams;\n /** The placement properties */\n placement?: PlacementProps;\n}\n\n/** Properties of a [[Placement3d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement3dProps {\n origin: XYZProps;\n angles: YawPitchRollProps;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties of a [[Placement2d]]\n * @public @preview\n * @extensions\n */\nexport interface Placement2dProps {\n origin: XYProps;\n angle: AngleProps;\n bbox?: LowAndHighXYProps;\n}\n\n/**\n * @public @preview\n * @extensions\n */\nexport type PlacementProps = Placement2dProps | Placement3dProps;\n\n/** determine if this is Placement2dProps\n * @public @preview\n */\nexport function isPlacement2dProps(props: PlacementProps): props is Placement2dProps {\n return (props as Placement2dProps).angle !== undefined;\n}\n\n/** determine if this is Placement3dProps\n * @public @preview\n */\nexport function isPlacement3dProps(props: PlacementProps): props is Placement3dProps {\n return !isPlacement2dProps(props);\n}\n\n/** Properties that define a [GeometricElement3d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement3dProps extends GeometricElementProps {\n placement?: Placement3dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation3d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation3dProps extends GeometricElement3dProps {\n jsonProperties?: {\n [key: string]: any;\n /** @beta */\n annotation?: TextAnnotationProps;\n };\n}\n\n/** Properties that define a [PhysicalElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalElementProps extends GeometricElement3dProps {\n physicalMaterial?: RelatedElementProps;\n}\n\n/** An enumeration of the different types of [SectionDrawing]($backend)s.\n * @public @preview\n * @extensions\n */\nexport enum SectionType {\n Section = 3,\n Detail = 4,\n Elevation = 5,\n Plan = 6,\n}\n\n/** Properties that define a [Drawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface DrawingProps extends ElementProps {\n /** A factor used by tools to adjust the size of text in [GeometricElement2d]($backend)s in the associated [DrawingModel]($backend) and to compute the\n * size of the [ViewAttachment]($backend) created when attaching the [Drawing]($backend) to a [Sheet]($backend).\n * Default: 1.\n * @note The scale factor **must** be greater than zero.\n * @public @preview\n */\n scaleFactor?: number;\n}\n\n/** Properties that define a [SectionDrawing]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingProps extends DrawingProps {\n /** The type of section used to generate the drawing. Default: Section. */\n sectionType?: SectionType;\n /** The spatial view from which the section was generated. */\n spatialView?: RelatedElementProps;\n jsonProperties?: {\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n drawingToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), a transform from the sheet's coordinates to spatial coordinates. */\n sheetToSpatialTransform?: TransformProps;\n /** If the section drawing is placed onto a [Sheet]($backend) via a [ViewAttachment]($backend), JSON representation of a [ClipVector]($geometry) to apply to\n * the sheet graphics when drawn in the context of the spatial view.\n * The ClipVector is in spatial coordinates.\n */\n drawingBoundaryClip?: ClipVectorProps;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n displaySpatialView?: true;\n };\n}\n\n/** Properties that define a [SectionDrawingLocation]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SectionDrawingLocationProps extends GeometricElement3dProps {\n /** The [ViewDefinition]($backend) to which this location refers. */\n sectionView?: RelatedElementProps;\n}\n\n/** Properties that define a [GeometricElement2d]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometricElement2dProps extends GeometricElementProps {\n placement?: Placement2dProps;\n typeDefinition?: RelatedElementProps;\n}\n\n/** JSON representation of a [TextAnnotation2d]($backend).\n * @public @preview\n * @extensions\n */\nexport interface TextAnnotation2dProps extends GeometricElement2dProps {\n jsonProperties?: {\n [key: string]: any;\n /** @beta */\n annotation?: TextAnnotationProps;\n };\n}\n\n/** Properties of a [GeometryPart]($backend)\n * @public @preview\n * @extensions\n */\nexport interface GeometryPartProps extends ElementProps {\n geom?: GeometryStreamProps;\n /** Describes how to build the part's GeometryStream, as an alternative to [[geom]]. This is used for insert and update operations only.\n * It is not a persistent property - it will always be undefined in the properties returned by functions that read a persistent part.\n */\n elementGeometryBuilderParams?: ElementGeometryBuilderParamsForPart;\n bbox?: LowAndHighXYZProps;\n}\n\n/** Properties for a [ViewAttachment]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ViewAttachmentProps extends GeometricElement2dProps {\n view: RelatedElementProps;\n jsonProperties?: {\n /** Integer priority in [-500,500]. Where two attachments overlap, the one with the higher priority draws in front of the other. Default: 0. */\n displayPriority?: number;\n /** JSON representation of a [ClipVector]($core-geometry] in sheet coordinate space, used to clip the attachment's graphics on the sheet. */\n clip?: ClipVectorProps;\n /** Options for customizing how the view attachment is displayed on the sheet. */\n displayOptions?: {\n /** If true, the view attachment is always drawn as a raster image. By default, only 3d perspective views are drawn this way (they always *must* be). Default: false. */\n drawAsRaster?: boolean;\n /** If true, and the view attachment is drawn as a raster image, the background color of the view will be preserved. By default the background color of the\n * sheet is used and any background pixels become transparent, allowing the contents of the sheet to show through. Default: false.\n */\n preserveBackground?: boolean;\n };\n };\n}\n\n/** Properties of a [Subject]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubjectProps extends ElementProps {\n description?: string;\n}\n\n/** Properties of a [SheetBorderTemplate]($backend)\n * @beta\n */\nexport interface SheetBorderTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n}\n\n/** Properties of a [SheetTemplate]($backend)\n * @beta\n */\nexport interface SheetTemplateProps extends ElementProps {\n height?: number;\n width?: number;\n border?: Id64String;\n}\n\n/** Properties of a [Sheet]($backend).\n * @public @preview\n * @extensions\n */\nexport interface SheetProps extends ElementProps {\n width?: number;\n height?: number;\n scale?: number;\n sheetTemplate?: Id64String;\n attachments?: Id64String[];\n}\n\n/** Properties of a [DefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface DefinitionElementProps extends ElementProps {\n isPrivate?: boolean;\n}\n\n/** Properties of a [TypeDefinitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface TypeDefinitionElementProps extends DefinitionElementProps {\n recipe?: RelatedElementProps;\n}\n\n/** Properties of a [PhysicalType]($backend)\n * @public @preview\n * @extensions\n */\nexport interface PhysicalTypeProps extends TypeDefinitionElementProps {\n /** The [PhysicalMaterial]($backend) that makes up this physical type. */\n physicalMaterial?: RelatedElementProps;\n}\n\n/** Properties of a [InformationPartitionElement]($backend)\n * @public @preview\n * @extensions\n */\nexport interface InformationPartitionElementProps extends ElementProps {\n description?: string;\n}\n\n/** Options controlling which properties are included or excluded when querying [[DisplayStyleProps]].\n * @see [[ViewStateLoadProps]] and [[ElementLoadOptions]].\n * @public @preview\n * @extensions\n */\nexport interface DisplayStyleLoadProps {\n /** If true, the lists of element Ids in the display style's schedule script will be empty.\n * The element Ids are not required on the frontend for display and can be quite large.\n */\n omitScheduleScriptElementIds?: boolean;\n /** If true, [[DisplayStyleSettingsProps.excludedElements]] will be compressed into a single compact string; otherwise they will be expanded into an array of strings.\n * The number of Ids may be quite large, so the compressed format is preferred, especially when communicating between the backend and frontend.\n */\n compressExcludedElementIds?: boolean;\n}\n\n/** Options controlling which properties are included or excluded when querying [[RenderTimelineProps]].\n * @see [[ElementLoadOptions.renderTimeline]].\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineLoadProps {\n /** If true, the lists of element Ids in the schedule script will be empty.\n * The element Ids can be extremely numerous and are not required on the frontend for display, so they are omitted by default by [DisplayStyleState.load]($frontend).\n */\n omitScriptElementIds?: boolean;\n}\n\n/** Options used to specify properties to include or exclude when querying [[ElementProps]] with functions like\n * [IModelDb.Elements.getElementProps]($backend) and [IModelConnection.Elements.loadProps]($frontend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadOptions {\n /** if true, only load the members of [[ElementProps]], and no members from subclasses */\n onlyBaseProperties?: boolean;\n /** If true, include the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * Geometry streams can consist of many megabytes worth of JSON, so they are omitted by default.\n */\n wantGeometry?: boolean;\n /** When including a geometry stream containing brep entries, whether to return the raw brep data or proxy geometry, false when undefined */\n /** If true, include [[BRepEntity.DataProps.data]] in the [[GeometryStreamProps]] for [[GeometricElementProps]] and [[GeometryPartProps]].\n * The data is a potentially large base-64-encoded opaque binary blob that cannot be directly inspected or manipulated on the frontend, so it is omitted by default.\n */\n wantBRepData?: boolean;\n /** Options controlling which properties of [[DisplayStyleProps]] to include or exclude. */\n displayStyle?: DisplayStyleLoadProps;\n /** Options controlling which properties of [[RenderTimelineProps]] to include or exclude. */\n renderTimeline?: RenderTimelineLoadProps;\n}\n\n/** Parameters to specify what element to load for functions like [IModelDb.Elements.getElementProps]($backend).\n * @public @preview\n * @extensions\n */\nexport interface ElementLoadProps extends ElementLoadOptions {\n id?: Id64String;\n /** The properties of the Code of the element to load.\n * @note the Value member is required even though it is not declared so here. If no value is supplied, no element will ever be loaded.\n * TODO: change to Required<CodeProps> in Version 4.0\n */\n code?: CodeProps;\n federationGuid?: GuidString;\n}\n\n/** Properties of an [ElementAspect]($backend)\n * @public @preview\n * @extensions\n */\nexport interface ElementAspectProps extends EntityProps {\n element: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSourceAspect]($backend) that stores synchronization information for an element originating from an external source.\n * @public @preview\n * @extensions\n */\nexport interface ExternalSourceAspectProps extends ElementAspectProps {\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n scope: RelatedElementProps;\n /** The identifier of the object in the source repository. */\n identifier: string;\n /** The kind of object within the source repository. */\n kind: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n version?: string;\n /** The optional cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n checksum?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: if defined, jsonProperties must be a *string*, specifically a valid JSON string.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n jsonProperties?: any;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n source?: RelatedElementProps;\n}\n\n/** Properties of an [ExternalSource]($backend)\n * @beta\n */\nexport interface ExternalSourceProps extends ElementProps {\n repository?: RelatedElementProps;\n connectorName?: string;\n connectorVersion?: string;\n}\n\n/** The role that an attached [ExternalSource]($backend) plays.\n * @beta\n */\nexport enum ExternalSourceAttachmentRole {\n /** The attached [ExternalSource]($backend) provides context. */\n SpecifyContext = 0,\n /** The attached [ExternalSource]($backend) models a part of the whole. */\n SpecifyPart = 1,\n}\n\n/** Properties of an [ExternalSourceAttachment]($backend)\n * @beta\n */\nexport interface ExternalSourceAttachmentProps extends ElementProps {\n attaches?: RelatedElementProps;\n role?: ExternalSourceAttachmentRole;\n translation?: XYZProps;\n yaw?: number;\n pitch?: number;\n roll?: number;\n scale?: XYZProps;\n}\n\n/** Properties of an [ChannelRootAspect]($backend) that identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\n * @public @preview\n * @extensions\n */\nexport interface ChannelRootAspectProps extends ElementAspectProps {\n /** The owner of the channel */\n owner: string;\n}\n\n/** Properties of a [LineStyle]($backend)\n * @public @preview\n * @extensions\n */\nexport interface LineStyleProps extends DefinitionElementProps {\n description?: string;\n /** The JSON string line style definition element data [LineStyleDefinition.StyleProps]($backend) */\n data: string;\n}\n\n/** Properties of a [LightLocation]($backend)\n * @internal\n */\nexport interface LightLocationProps extends GeometricElement3dProps {\n enabled?: boolean;\n}\n\n/** The *rank* for a Category\n * @public @preview\n * @extensions\n */\nexport enum Rank {\n /** This category is predefined by the system */\n System = 0,\n /** This category is defined by a schema. Elements in this category are not recognized by system classes. */\n Domain = 1,\n /** This category is defined by an application. Elements in this category are not recognized by system and schema classes. */\n Application = 2,\n /** This category is defined by a user. Elements in this category are not recognized by system, schema, and application classes. */\n User = 3,\n}\n\n/** Parameters of a [Category]($backend)\n * @public @preview\n * @extensions\n */\nexport interface CategoryProps extends DefinitionElementProps {\n rank?: Rank;\n description?: string;\n}\n\n/** Parameters of a [SubCategory]($backend)\n * @public @preview\n * @extensions\n */\nexport interface SubCategoryProps extends DefinitionElementProps {\n appearance?: SubCategoryAppearance.Props;\n description?: string;\n}\n\n/** Parameters of a [UrlLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface UrlLinkProps extends ElementProps {\n description?: string;\n url?: string;\n}\n\n/** Parameters of a [RepositoryLink]($backend)\n * @public @preview\n * @extensions\n */\nexport interface RepositoryLinkProps extends UrlLinkProps {\n repositoryGuid?: GuidString;\n format?: string;\n}\n\n/** The properties of a [SynchronizationConfigLink]($backend)\n * @beta\n */\nexport interface SynchronizationConfigLinkProps extends UrlLinkProps {\n lastSuccessfulRun?: string;\n}\n\n/** Wire format describing a [RenderTimeline]($backend).\n * @public @preview\n * @extensions\n */\nexport interface RenderTimelineProps extends ElementProps {\n /** An optional human-readable description of the timeline. */\n description?: string;\n /** The stringified JSON representation of the instructions for visualizing change over time.\n * @see [[RenderSchedule.ScriptProps]] for the JSON interface.\n */\n script: string;\n}\n\n/** Properties of a [SheetIndexEntry]($backend).\n * @beta\n*/\nexport interface SheetIndexEntryProps extends ElementProps {\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\n entryPriority: number;\n}\n\n/** Properties of a [SheetIndexFolder]($backend)\n * @beta\n */\nexport type SheetIndexFolderProps = SheetIndexEntryProps;\n\n/** Properties of a [SheetIndexReference]($backend)\n * @beta\n */\nexport interface SheetIndexReferenceProps extends SheetIndexEntryProps {\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\n sheetIndex?: RelatedElementProps;\n}\n\n/** Properties of a [SheetReference]($backend)\n * @beta\n */\nexport interface SheetReferenceProps extends SheetIndexEntryProps {\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\n sheet?: RelatedElementProps;\n}\n"]}
@@ -6,7 +6,7 @@ import { Id64String } from "@itwin/core-bentley";
6
6
  * between the backend and frontend.
7
7
  * EntityProps and all of its sub-types like [[ElementProps]] are "plain old Javascript objects" - that is, objects containing
8
8
  * no methods and no properties of `class` type.
9
- * @public
9
+ * @public @preview
10
10
  * @extensions
11
11
  */
12
12
  export interface EntityProps {
@@ -24,7 +24,7 @@ export interface EntityProps {
24
24
  };
25
25
  }
26
26
  /** Specifies the source and target elements of a [[Relationship]] instance.
27
- * @public
27
+ * @public @preview
28
28
  * @extensions
29
29
  */
30
30
  export interface SourceAndTarget {
@@ -32,13 +32,13 @@ export interface SourceAndTarget {
32
32
  targetId: Id64String;
33
33
  }
34
34
  /** Properties that are common to all types of link table ECRelationships
35
- * @public
35
+ * @public @preview
36
36
  * @extensions
37
37
  */
38
38
  export interface RelationshipProps extends EntityProps, SourceAndTarget {
39
39
  }
40
40
  /** Parameters for performing a query on [Entity]($backend) classes.
41
- * @public
41
+ * @public @preview
42
42
  * @extensions
43
43
  */
44
44
  export interface EntityQueryParams {
@@ -1 +1 @@
1
- {"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,2EAAoB,CAAA;IACpB,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,gEAAc,CAAA;IACd,kEAAe,CAAA;IACf,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kEAAe,CAAA;IACf,gEAAc,CAAA;IACd,sEAAiB,CAAA;AACnB,CAAC,EAZW,iBAAi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ACjC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,mCAAmC;YAC9E,4DAA4D;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF;AAjCD,wCAiCC","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 Entities\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { RelatedElement } from \"./ElementProps\";\n\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\n * between the backend and frontend.\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\n * no methods and no properties of `class` type.\n * @public\n * @extensions\n */\nexport interface EntityProps {\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\n * @see [Entity.isInstanceOfEntity]($backend).\n */\n readonly isInstanceOfEntity?: never;\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\n classFullName: string;\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\n id?: Id64String;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\n jsonProperties?: { [key: string]: any };\n}\n\n/** Specifies the source and target elements of a [[Relationship]] instance.\n * @public\n * @extensions\n */\nexport interface SourceAndTarget {\n sourceId: Id64String;\n targetId: Id64String;\n}\n\n/** Properties that are common to all types of link table ECRelationships\n * @public\n * @extensions\n */\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\n}\n\n/** Parameters for performing a query on [Entity]($backend) classes.\n * @public\n * @extensions\n */\nexport interface EntityQueryParams {\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\n from?: string;\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\n only?: boolean;\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\n where?: string;\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\n orderBy?: string;\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\n limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n offset?: number;\n /** Bindings for parameterized values.\n * @see [[ECSqlStatement.bindValues]]\n */\n bindings?: any[] | object;\n}\n\n/** The primitive types of an Entity property.\n * @beta\n */\nexport enum PrimitiveTypeCode {\n Uninitialized = 0x00,\n Binary = 0x101,\n Boolean = 0x201,\n DateTime = 0x301,\n Double = 0x401,\n Integer = 0x501,\n Long = 0x601,\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\n String = 0x901,\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\n}\n\n/** A callback function to process properties of an Entity\n * @beta\n * @deprecated in 5.0. Use `PropertyHandler` from `@itwin/ecschema-metadata` instead.\n *\n * @example\n * ```typescript\n * // Current usage:\n * const callback: PropertyCallback = (name: string, propMetaData: PropertyMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * };\n *\n * // Replacement:\n * const callback: PropertyHandler = (propName: string, property: Property) => {\n * console.log(`Property name: ${propName}, Property type: ${property.propertyType}`);\n * };\n * ```\n */\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\n\n/** A custom attribute instance\n * @beta\n * @deprecated in 5.0. Use `CustomAttribute` interface from `@itwin/ecschema-metadata` instead.\n */\nexport interface CustomAttribute {\n /** The class of the CustomAttribute */\n ecclass: string;\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\n properties: { [propName: string]: any };\n}\n\ntype FactoryFunc = (jsonObj: any) => any;\n\n/**\n * @beta\n * @deprecated in 5.0. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface PropertyMetaDataProps {\n primitiveType?: number;\n structName?: string;\n extendedType?: string;\n description?: string;\n displayLabel?: string;\n minimumValue?: any;\n maximumValue?: any;\n minimumLength?: number;\n maximumLength?: number;\n readOnly?: boolean;\n kindOfQuantity?: string;\n isCustomHandled?: boolean;\n isCustomHandledOrphan?: boolean;\n minOccurs?: number;\n maxOccurs?: number;\n direction?: string;\n relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n}\n\n/** Metadata for a property.\n * @beta\n * @deprecated in 5.0. Use the `Property` class from @itwin/ecschema-metadata` instead.\n */\nexport class PropertyMetaData implements PropertyMetaDataProps {\n public primitiveType?: PrimitiveTypeCode;\n public structName?: string;\n public extendedType?: string;\n public description?: string;\n public displayLabel?: string;\n public minimumValue?: any;\n public maximumValue?: any;\n public minimumLength?: number;\n public maximumLength?: number;\n public readOnly?: boolean;\n public kindOfQuantity?: string;\n public isCustomHandled?: boolean;\n public isCustomHandledOrphan?: boolean;\n public minOccurs?: number;\n public maxOccurs?: number;\n public direction?: string;\n public relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public customAttributes?: CustomAttribute[];\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: PropertyMetaDataProps) {\n this.primitiveType = jsonObj.primitiveType;\n if (jsonObj.structName)\n this.structName = jsonObj.structName;\n this.extendedType = jsonObj.extendedType;\n this.description = jsonObj.description;\n this.displayLabel = jsonObj.displayLabel;\n if (undefined !== jsonObj.minimumValue)\n this.minimumValue = jsonObj.minimumValue;\n if (undefined !== jsonObj.maximumValue)\n this.maximumValue = jsonObj.maximumValue;\n if (undefined !== jsonObj.minimumLength)\n this.minimumLength = jsonObj.minimumLength;\n if (undefined !== jsonObj.maximumLength)\n this.maximumLength = jsonObj.maximumLength;\n this.readOnly = jsonObj.readOnly;\n this.kindOfQuantity = jsonObj.kindOfQuantity;\n this.isCustomHandled = jsonObj.isCustomHandled;\n if (undefined !== jsonObj.minOccurs)\n this.minOccurs = jsonObj.minOccurs;\n if (undefined !== jsonObj.maxOccurs)\n this.maxOccurs = jsonObj.maxOccurs;\n this.direction = jsonObj.direction;\n this.relationshipClass = jsonObj.relationshipClass;\n this.customAttributes = jsonObj.customAttributes;\n }\n\n /** Create a typed value, or array of values, from a factory and an input object */\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\n if (undefined === this.minOccurs)\n return func(jsonObj); // not an array\n\n const val: any = [];\n jsonObj.forEach((element: any) => val.push(func(element)));\n return val;\n }\n\n /** construct a single property from an input object according to this metadata */\n public createProperty(jsonObj: any): any {\n if (jsonObj === undefined)\n return undefined;\n\n if (undefined !== this.primitiveType) {\n switch (this.primitiveType) {\n case PrimitiveTypeCode.Boolean:\n case PrimitiveTypeCode.Double:\n case PrimitiveTypeCode.Integer:\n case PrimitiveTypeCode.String:\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\n\n case PrimitiveTypeCode.Point2d:\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\n\n case PrimitiveTypeCode.Point3d:\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\n }\n }\n if (this.isNavigation)\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\n\n return jsonObj;\n }\n\n /** Return `true` if this property is a NavigationProperty. */\n public get isNavigation(): boolean {\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\n }\n}\n\n/**\n * @beta\n * @deprecated in 5.0. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface EntityMetaDataProps {\n classId: Id64String;\n ecclass: string;\n description?: string;\n modifier?: string;\n displayLabel?: string;\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\n baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n properties: { [propName: string]: PropertyMetaData };\n}\n\n/** Metadata for an Entity.\n * @beta\n * @deprecated in 5.0. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.\n */\nexport class EntityMetaData implements EntityMetaDataProps {\n /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */\n public readonly classId: Id64String;\n /** The Entity name */\n public readonly ecclass: string;\n public readonly description?: string;\n public readonly modifier?: string;\n public readonly displayLabel?: string;\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\n public readonly baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly properties: { [propName: string]: PropertyMetaData };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: EntityMetaDataProps) {\n this.classId = jsonObj.classId;\n this.ecclass = jsonObj.ecclass;\n this.description = jsonObj.description;\n this.modifier = jsonObj.modifier;\n this.displayLabel = jsonObj.displayLabel;\n this.baseClasses = jsonObj.baseClasses;\n this.customAttributes = jsonObj.customAttributes;\n this.properties = {};\n\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"EntityProps.js","sourceRoot":"","sources":["../../src/EntityProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAAwD;AACxD,iDAAgD;AA6DhD;;GAEG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,2EAAoB,CAAA;IACpB,+DAAc,CAAA;IACd,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,gEAAc,CAAA;IACd,kEAAe,CAAA;IACf,4DAAY,CAAA;IACZ,kEAAe,CAAA;IACf,kEAAe,CAAA;IACf,gEAAc,CAAA;IACd,sEAAiB,CAAA;AACnB,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B;AA4DD;;;GAGG;AACH,MAAa,gBAAgB;IACpB,aAAa,CAAqB;IAClC,UAAU,CAAU;IACpB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,YAAY,CAAO;IACnB,YAAY,CAAO;IACnB,aAAa,CAAU;IACvB,aAAa,CAAU;IACvB,QAAQ,CAAW;IACnB,cAAc,CAAU;IACxB,eAAe,CAAW;IAC1B,qBAAqB,CAAW;IAChC,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,iBAAiB,CAAU;IAClC,4DAA4D;IACrD,gBAAgB,CAAqB;IAE5C,4DAA4D;IAC5D,YAAmB,OAA8B;QAC/C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,OAAO,CAAC,UAAU;YACpB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,SAA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,OAAO,CAAS;IAChB,WAAW,CAAU;IACrB,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtC,uIAAuI;IACvH,WAAW,CAAW;IACtC,2CAA2C;IAC3C,4DAA4D;IAC5C,gBAAgB,CAAqB;IACrD,qFAAqF;IACrF,4DAA4D;IAC5C,UAAU,CAA2C;IAErE,4DAA4D;IAC5D,YAAmB,OAA4B;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,mCAAmC;YAC9E,4DAA4D;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;CACF;AAjCD,wCAiCC","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 Entities\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { RelatedElement } from \"./ElementProps\";\n\n/** The persistent format of an [Entity]($backend), also used as the \"wire format\" when transmitting information about entities\n * between the backend and frontend.\n * EntityProps and all of its sub-types like [[ElementProps]] are \"plain old Javascript objects\" - that is, objects containing\n * no methods and no properties of `class` type.\n * @public @preview\n * @extensions\n */\nexport interface EntityProps {\n /** A non-existent property used to discriminate between [[EntityProps]] and [Entity]($backend).\n * @see [Entity.isInstanceOfEntity]($backend).\n */\n readonly isInstanceOfEntity?: never;\n /** The full name of the [ECClass]($docs/bis/guide/references/glossary/#ecclass) for this entity, in the form \"Schema:ClassName\" */\n classFullName: string;\n /** The Id of the entity. Must be present for SELECT, UPDATE, or DELETE, ignored for INSERT. */\n id?: Id64String;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this Entity. */\n jsonProperties?: { [key: string]: any };\n}\n\n/** Specifies the source and target elements of a [[Relationship]] instance.\n * @public @preview\n * @extensions\n */\nexport interface SourceAndTarget {\n sourceId: Id64String;\n targetId: Id64String;\n}\n\n/** Properties that are common to all types of link table ECRelationships\n * @public @preview\n * @extensions\n */\nexport interface RelationshipProps extends EntityProps, SourceAndTarget {\n}\n\n/** Parameters for performing a query on [Entity]($backend) classes.\n * @public @preview\n * @extensions\n */\nexport interface EntityQueryParams {\n /** The sql className, in the form \"Schema.ClassName\", of the class to search. */\n from?: string;\n /** Set to true to limit results to *not* include sub-classes of \"from\" class */\n only?: boolean;\n /** Optional \"WHERE\" clause to filter entities. Note: do *not* include the \"WHERE\" keyword. */\n where?: string;\n /** Optional \"ORDERBY\" clause to sort results. Note: do *not* include the \"ORDERBY\" keyword. */\n orderBy?: string;\n /** Optional \"LIMIT\" clause to limit the number of rows returned. */\n limit?: number;\n /** Optional \"OFFSET\" clause. Only valid if Limit is also present. */\n offset?: number;\n /** Bindings for parameterized values.\n * @see [[ECSqlStatement.bindValues]]\n */\n bindings?: any[] | object;\n}\n\n/** The primitive types of an Entity property.\n * @beta\n */\nexport enum PrimitiveTypeCode {\n Uninitialized = 0x00,\n Binary = 0x101,\n Boolean = 0x201,\n DateTime = 0x301,\n Double = 0x401,\n Integer = 0x501,\n Long = 0x601,\n Point2d = 0x701, // eslint-disable-line @typescript-eslint/no-shadow\n Point3d = 0x801, // eslint-disable-line @typescript-eslint/no-shadow\n String = 0x901,\n IGeometry = 0xa01, // Used for Bentley.Geometry.Common.IGeometry types\n}\n\n/** A callback function to process properties of an Entity\n * @beta\n * @deprecated in 5.0. Use `PropertyHandler` from `@itwin/ecschema-metadata` instead.\n *\n * @example\n * ```typescript\n * // Current usage:\n * const callback: PropertyCallback = (name: string, propMetaData: PropertyMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * };\n *\n * // Replacement:\n * const callback: PropertyHandler = (propName: string, property: Property) => {\n * console.log(`Property name: ${propName}, Property type: ${property.propertyType}`);\n * };\n * ```\n */\nexport type PropertyCallback = (name: string, meta: PropertyMetaData) => void;\n\n/** A custom attribute instance\n * @beta\n * @deprecated in 5.0. Use `CustomAttribute` interface from `@itwin/ecschema-metadata` instead.\n */\nexport interface CustomAttribute {\n /** The class of the CustomAttribute */\n ecclass: string;\n /** An object whose properties correspond by name to the properties of this custom attribute instance. */\n properties: { [propName: string]: any };\n}\n\ntype FactoryFunc = (jsonObj: any) => any;\n\n/**\n * @beta\n * @deprecated in 5.0. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface PropertyMetaDataProps {\n primitiveType?: number;\n structName?: string;\n extendedType?: string;\n description?: string;\n displayLabel?: string;\n minimumValue?: any;\n maximumValue?: any;\n minimumLength?: number;\n maximumLength?: number;\n readOnly?: boolean;\n kindOfQuantity?: string;\n isCustomHandled?: boolean;\n isCustomHandledOrphan?: boolean;\n minOccurs?: number;\n maxOccurs?: number;\n direction?: string;\n relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n}\n\n/** Metadata for a property.\n * @beta\n * @deprecated in 5.0. Use the `Property` class from @itwin/ecschema-metadata` instead.\n */\nexport class PropertyMetaData implements PropertyMetaDataProps {\n public primitiveType?: PrimitiveTypeCode;\n public structName?: string;\n public extendedType?: string;\n public description?: string;\n public displayLabel?: string;\n public minimumValue?: any;\n public maximumValue?: any;\n public minimumLength?: number;\n public maximumLength?: number;\n public readOnly?: boolean;\n public kindOfQuantity?: string;\n public isCustomHandled?: boolean;\n public isCustomHandledOrphan?: boolean;\n public minOccurs?: number;\n public maxOccurs?: number;\n public direction?: string;\n public relationshipClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public customAttributes?: CustomAttribute[];\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: PropertyMetaDataProps) {\n this.primitiveType = jsonObj.primitiveType;\n if (jsonObj.structName)\n this.structName = jsonObj.structName;\n this.extendedType = jsonObj.extendedType;\n this.description = jsonObj.description;\n this.displayLabel = jsonObj.displayLabel;\n if (undefined !== jsonObj.minimumValue)\n this.minimumValue = jsonObj.minimumValue;\n if (undefined !== jsonObj.maximumValue)\n this.maximumValue = jsonObj.maximumValue;\n if (undefined !== jsonObj.minimumLength)\n this.minimumLength = jsonObj.minimumLength;\n if (undefined !== jsonObj.maximumLength)\n this.maximumLength = jsonObj.maximumLength;\n this.readOnly = jsonObj.readOnly;\n this.kindOfQuantity = jsonObj.kindOfQuantity;\n this.isCustomHandled = jsonObj.isCustomHandled;\n if (undefined !== jsonObj.minOccurs)\n this.minOccurs = jsonObj.minOccurs;\n if (undefined !== jsonObj.maxOccurs)\n this.maxOccurs = jsonObj.maxOccurs;\n this.direction = jsonObj.direction;\n this.relationshipClass = jsonObj.relationshipClass;\n this.customAttributes = jsonObj.customAttributes;\n }\n\n /** Create a typed value, or array of values, from a factory and an input object */\n private createValueOrArray(func: FactoryFunc, jsonObj: any) {\n if (undefined === this.minOccurs)\n return func(jsonObj); // not an array\n\n const val: any = [];\n jsonObj.forEach((element: any) => val.push(func(element)));\n return val;\n }\n\n /** construct a single property from an input object according to this metadata */\n public createProperty(jsonObj: any): any {\n if (jsonObj === undefined)\n return undefined;\n\n if (undefined !== this.primitiveType) {\n switch (this.primitiveType) {\n case PrimitiveTypeCode.Boolean:\n case PrimitiveTypeCode.Double:\n case PrimitiveTypeCode.Integer:\n case PrimitiveTypeCode.String:\n return jsonObj; // this works even for arrays or strings that are JSON because the parsed JSON is already the right type\n\n case PrimitiveTypeCode.Point2d:\n return this.createValueOrArray((obj) => Point2d.fromJSON(obj), jsonObj);\n\n case PrimitiveTypeCode.Point3d:\n return this.createValueOrArray((obj) => Point3d.fromJSON(obj), jsonObj);\n }\n }\n if (this.isNavigation)\n return jsonObj.id !== undefined ? new RelatedElement(jsonObj) : Id64.fromJSON(jsonObj);\n\n return jsonObj;\n }\n\n /** Return `true` if this property is a NavigationProperty. */\n public get isNavigation(): boolean {\n return (this.direction !== undefined); // the presence of `direction` means it is a navigation property\n }\n}\n\n/**\n * @beta\n * @deprecated in 5.0. Use `@itwin/ecschema-metadata` instead.\n */\nexport interface EntityMetaDataProps {\n classId: Id64String;\n ecclass: string;\n description?: string;\n modifier?: string;\n displayLabel?: string;\n /** The base classes from which this class derives. If more than one, the first is the super class and the others are [mixins]($docs/bis/ec/ec-mixin-class). */\n baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n properties: { [propName: string]: PropertyMetaData };\n}\n\n/** Metadata for an Entity.\n * @beta\n * @deprecated in 5.0. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.\n */\nexport class EntityMetaData implements EntityMetaDataProps {\n /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */\n public readonly classId: Id64String;\n /** The Entity name */\n public readonly ecclass: string;\n public readonly description?: string;\n public readonly modifier?: string;\n public readonly displayLabel?: string;\n /** The base class that this class is derives from. If more than one, the first is the actual base class and the others are mixins. */\n public readonly baseClasses: string[];\n /** The Custom Attributes for this class */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly customAttributes?: CustomAttribute[];\n /** An object whose properties correspond by name to the properties of this class. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public readonly properties: { [propName: string]: PropertyMetaData };\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(jsonObj: EntityMetaDataProps) {\n this.classId = jsonObj.classId;\n this.ecclass = jsonObj.ecclass;\n this.description = jsonObj.description;\n this.modifier = jsonObj.modifier;\n this.displayLabel = jsonObj.displayLabel;\n this.baseClasses = jsonObj.baseClasses;\n this.customAttributes = jsonObj.customAttributes;\n this.properties = {};\n\n for (const propName in jsonObj.properties) { // eslint-disable-line guard-for-in\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.properties[propName] = new PropertyMetaData(jsonObj.properties[propName]);\n }\n }\n}\n"]}
@@ -63,7 +63,7 @@ export interface ViewStoreError extends ITwinError {
63
63
  /** @beta */
64
64
  export declare namespace ViewStoreError {
65
65
  const scope = "itwin-ViewStore";
66
- type Key = "invalid-value" | "invalid-member" | "no-owner" | "not-found" | "not-unique" | "group-error";
66
+ type Key = "invalid-value" | "invalid-member" | "no-owner" | "not-found" | "not-unique" | "no-viewstore" | "group-error";
67
67
  /** Determine whether an error object is a ViewStoreError */
68
68
  function isError<T extends ViewStoreError>(error: unknown, key?: Key): error is T;
69
69
  /** Instantiate and throw a ViewStoreError */