@itwin/presentation-backend 4.0.0-dev.52 → 4.0.0-dev.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts +41 -41
  2. package/lib/cjs/presentation-backend/BackendLoggerCategory.js +50 -50
  3. package/lib/cjs/presentation-backend/Constants.d.ts +8 -8
  4. package/lib/cjs/presentation-backend/Constants.js +40 -36
  5. package/lib/cjs/presentation-backend/Constants.js.map +1 -1
  6. package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +11 -11
  7. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +260 -260
  8. package/lib/cjs/presentation-backend/NativePlatform.d.ts +87 -87
  9. package/lib/cjs/presentation-backend/NativePlatform.js +140 -140
  10. package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
  11. package/lib/cjs/presentation-backend/Presentation.d.ts +106 -106
  12. package/lib/cjs/presentation-backend/Presentation.d.ts.map +1 -1
  13. package/lib/cjs/presentation-backend/Presentation.js +148 -148
  14. package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
  15. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +12 -12
  16. package/lib/cjs/presentation-backend/PresentationIpcHandler.js +41 -41
  17. package/lib/cjs/presentation-backend/PresentationManager.d.ts +456 -456
  18. package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
  19. package/lib/cjs/presentation-backend/PresentationManager.js +309 -309
  20. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +61 -61
  21. package/lib/cjs/presentation-backend/PresentationManagerDetail.js +430 -426
  22. package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
  23. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +62 -62
  24. package/lib/cjs/presentation-backend/PresentationRpcImpl.js +388 -388
  25. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts +102 -102
  26. package/lib/cjs/presentation-backend/RulesetEmbedder.js +283 -279
  27. package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
  28. package/lib/cjs/presentation-backend/RulesetManager.d.ts +53 -53
  29. package/lib/cjs/presentation-backend/RulesetManager.js +73 -73
  30. package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +140 -140
  31. package/lib/cjs/presentation-backend/RulesetVariablesManager.js +129 -129
  32. package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +28 -28
  33. package/lib/cjs/presentation-backend/SelectionScopesHelper.js +210 -210
  34. package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +123 -123
  35. package/lib/cjs/presentation-backend/TemporaryStorage.js +151 -151
  36. package/lib/cjs/presentation-backend/UpdatesTracker.d.ts +27 -27
  37. package/lib/cjs/presentation-backend/UpdatesTracker.js +54 -54
  38. package/lib/cjs/presentation-backend/Utils.d.ts +49 -49
  39. package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
  40. package/lib/cjs/presentation-backend/Utils.js +107 -107
  41. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.d.ts +16 -16
  42. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +55 -51
  43. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
  44. package/lib/cjs/presentation-backend/domain/RulesetElements.d.ts +21 -21
  45. package/lib/cjs/presentation-backend/domain/RulesetElements.js +38 -38
  46. package/lib/cjs/presentation-backend.d.ts +19 -19
  47. package/lib/cjs/presentation-backend.js +39 -35
  48. package/lib/cjs/presentation-backend.js.map +1 -1
  49. package/package.json +14 -14
@@ -1,103 +1,103 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { Entity, IModelDb } from "@itwin/core-backend";
5
- import { Id64String } from "@itwin/core-bentley";
6
- import { Ruleset } from "@itwin/presentation-common";
7
- /**
8
- * Interface for callbacks which will be called before and after Element/Model updates
9
- * @public
10
- */
11
- interface UpdateCallbacks {
12
- onBeforeUpdate: (props: Entity) => Promise<void>;
13
- onAfterUpdate: (props: Entity) => Promise<void>;
14
- }
15
- /**
16
- * Interface for callbacks which will be called before and after Element/Model is inserted
17
- * @public
18
- */
19
- interface InsertCallbacks {
20
- onBeforeInsert: (props: Entity) => Promise<void>;
21
- onAfterInsert: (props: Entity) => Promise<void>;
22
- }
23
- /**
24
- * Options for [[RulesetEmbedder.insertRuleset]] operation.
25
- * @public
26
- */
27
- export interface RulesetInsertOptions {
28
- /**
29
- * When should insertion be skipped:
30
- * - `same-id` - if iModel already contains a ruleset with the same id and **any** version
31
- * - `same-id-and-version-eq` - if iModel already contains a ruleset with same id and version
32
- * - `same-id-and-version-gte` - if iModel already contains a ruleset with same id and
33
- * version greater or equal to version of the inserted ruleset.
34
- *
35
- * Defaults to `same-id-and-version-eq`.
36
- */
37
- skip?: "never" | "same-id" | "same-id-and-version-eq" | "same-id-and-version-gte";
38
- /**
39
- * Which existing versions of rulesets with same id should be replaced when we insert a new one:
40
- * - `all` - replace all rulesets with same id.
41
- * - `all-lower` - replace rulesets with same id and version lower than the version of inserted ruleset.
42
- * - `exact` - replace only the ruleset whose id and version matches the inserted ruleset.
43
- *
44
- * Defaults to `exact`.
45
- */
46
- replaceVersions?: "all" | "all-lower" | "exact";
47
- /**
48
- * Callbacks that will be called before and after `Entity` updates
49
- */
50
- onEntityUpdate?: UpdateCallbacks;
51
- /**
52
- * Callbacks that will be called before and after `Entity` is inserted
53
- */
54
- onEntityInsert?: InsertCallbacks;
55
- }
56
- /**
57
- * Properties for creating a `RulesetEmbedder` instance.
58
- * @public
59
- */
60
- export interface RulesetEmbedderProps {
61
- /** iModel to embed rulesets to */
62
- imodel: IModelDb;
63
- }
64
- /**
65
- * An API for embedding presentation rulesets into iModels.
66
- * @public
67
- */
68
- export declare class RulesetEmbedder {
69
- private _imodel;
70
- private readonly _schemaPath;
71
- private readonly _rulesetModelName;
72
- private readonly _rulesetSubjectName;
73
- /**
74
- * Constructs RulesetEmbedder
75
- */
76
- constructor(props: RulesetEmbedderProps);
77
- /**
78
- * Inserts a ruleset into iModel.
79
- * @param ruleset Ruleset to insert.
80
- * @param options Options for inserting a ruleset.
81
- * @returns ID of inserted ruleset element or, if insertion was skipped, ID of existing ruleset with the same ID and highest version.
82
- */
83
- insertRuleset(ruleset: Ruleset, options?: RulesetInsertOptions): Promise<Id64String>;
84
- private updateRuleset;
85
- private insertNewRuleset;
86
- /**
87
- * Get all rulesets embedded in the iModel.
88
- */
89
- getRulesets(): Promise<Ruleset[]>;
90
- private getOrCreateRulesetModel;
91
- private queryRulesetModel;
92
- private queryDefinitionPartition;
93
- private querySubject;
94
- private insertDefinitionModel;
95
- private insertDefinitionPartition;
96
- private insertSubject;
97
- private handleElementOperationPrerequisites;
98
- private insertElement;
99
- private insertModel;
100
- private updateElement;
101
- }
102
- export {};
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { Entity, IModelDb } from "@itwin/core-backend";
5
+ import { Id64String } from "@itwin/core-bentley";
6
+ import { Ruleset } from "@itwin/presentation-common";
7
+ /**
8
+ * Interface for callbacks which will be called before and after Element/Model updates
9
+ * @public
10
+ */
11
+ interface UpdateCallbacks {
12
+ onBeforeUpdate: (props: Entity) => Promise<void>;
13
+ onAfterUpdate: (props: Entity) => Promise<void>;
14
+ }
15
+ /**
16
+ * Interface for callbacks which will be called before and after Element/Model is inserted
17
+ * @public
18
+ */
19
+ interface InsertCallbacks {
20
+ onBeforeInsert: (props: Entity) => Promise<void>;
21
+ onAfterInsert: (props: Entity) => Promise<void>;
22
+ }
23
+ /**
24
+ * Options for [[RulesetEmbedder.insertRuleset]] operation.
25
+ * @public
26
+ */
27
+ export interface RulesetInsertOptions {
28
+ /**
29
+ * When should insertion be skipped:
30
+ * - `same-id` - if iModel already contains a ruleset with the same id and **any** version
31
+ * - `same-id-and-version-eq` - if iModel already contains a ruleset with same id and version
32
+ * - `same-id-and-version-gte` - if iModel already contains a ruleset with same id and
33
+ * version greater or equal to version of the inserted ruleset.
34
+ *
35
+ * Defaults to `same-id-and-version-eq`.
36
+ */
37
+ skip?: "never" | "same-id" | "same-id-and-version-eq" | "same-id-and-version-gte";
38
+ /**
39
+ * Which existing versions of rulesets with same id should be replaced when we insert a new one:
40
+ * - `all` - replace all rulesets with same id.
41
+ * - `all-lower` - replace rulesets with same id and version lower than the version of inserted ruleset.
42
+ * - `exact` - replace only the ruleset whose id and version matches the inserted ruleset.
43
+ *
44
+ * Defaults to `exact`.
45
+ */
46
+ replaceVersions?: "all" | "all-lower" | "exact";
47
+ /**
48
+ * Callbacks that will be called before and after `Entity` updates
49
+ */
50
+ onEntityUpdate?: UpdateCallbacks;
51
+ /**
52
+ * Callbacks that will be called before and after `Entity` is inserted
53
+ */
54
+ onEntityInsert?: InsertCallbacks;
55
+ }
56
+ /**
57
+ * Properties for creating a `RulesetEmbedder` instance.
58
+ * @public
59
+ */
60
+ export interface RulesetEmbedderProps {
61
+ /** iModel to embed rulesets to */
62
+ imodel: IModelDb;
63
+ }
64
+ /**
65
+ * An API for embedding presentation rulesets into iModels.
66
+ * @public
67
+ */
68
+ export declare class RulesetEmbedder {
69
+ private _imodel;
70
+ private readonly _schemaPath;
71
+ private readonly _rulesetModelName;
72
+ private readonly _rulesetSubjectName;
73
+ /**
74
+ * Constructs RulesetEmbedder
75
+ */
76
+ constructor(props: RulesetEmbedderProps);
77
+ /**
78
+ * Inserts a ruleset into iModel.
79
+ * @param ruleset Ruleset to insert.
80
+ * @param options Options for inserting a ruleset.
81
+ * @returns ID of inserted ruleset element or, if insertion was skipped, ID of existing ruleset with the same ID and highest version.
82
+ */
83
+ insertRuleset(ruleset: Ruleset, options?: RulesetInsertOptions): Promise<Id64String>;
84
+ private updateRuleset;
85
+ private insertNewRuleset;
86
+ /**
87
+ * Get all rulesets embedded in the iModel.
88
+ */
89
+ getRulesets(): Promise<Ruleset[]>;
90
+ private getOrCreateRulesetModel;
91
+ private queryRulesetModel;
92
+ private queryDefinitionPartition;
93
+ private querySubject;
94
+ private insertDefinitionModel;
95
+ private insertDefinitionPartition;
96
+ private insertSubject;
97
+ private handleElementOperationPrerequisites;
98
+ private insertElement;
99
+ private insertModel;
100
+ private updateElement;
101
+ }
102
+ export {};
103
103
  //# sourceMappingURL=RulesetEmbedder.d.ts.map