@bentley/imodeljs-native 3.4.6 → 3.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{CloudSqlite.d.ts → NativeCloudSqlite.d.ts} +120 -166
- package/NativeCloudSqlite.d.ts.map +1 -0
- package/NativeCloudSqlite.js +53 -0
- package/NativeCloudSqlite.js.map +1 -0
- package/NativeLibrary.d.ts +1212 -1222
- package/NativeLibrary.d.ts.map +1 -1
- package/NativeLibrary.js +72 -72
- package/NativeLibrary.js.map +1 -1
- package/imodeljs-native.d.ts +2 -2
- package/imodeljs-native.d.ts.map +1 -1
- package/imodeljs-native.js +22 -22
- package/imodeljs-native.js.map +1 -1
- package/installNativePlatform.js +29 -21
- package/package.json +23 -23
- package/CloudSqlite.d.ts.map +0 -1
- package/CloudSqlite.js +0 -156
- package/CloudSqlite.js.map +0 -1
package/NativeLibrary.d.ts
CHANGED
|
@@ -1,1223 +1,1213 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* @note This package may only have **dev** dependencies on @itwin packages, so they are *not* available at runtime. Therefore we can only import **types** from them.
|
|
4
|
-
* @note You cannot use mapped types @href https://www.typescriptlang.org/docs/handbook/2/mapped-types.html from itwin imports here due to how they are resolved downstream
|
|
5
|
-
*/
|
|
6
|
-
import type { BentleyStatus, DbOpcode, DbResult, GuidString, Id64Array, Id64String, IDisposable, IModelStatus, Logger, OpenMode,
|
|
7
|
-
import type { ChangesetIndexAndId, CreateEmptyStandaloneIModelProps, DbRequest, DbResponse, ElementAspectProps, ElementGraphicsRequestProps, ElementLoadProps, ElementProps, FilePropertyProps, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeographicCRSInterpretRequestProps, GeographicCRSInterpretResponseProps, GeometryContainmentResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelProps, LocalDirName, LocalFileName, MassPropertiesResponseProps, ModelLoadProps, ModelProps, RelationshipProps, SnapshotOpenOptions, TextureData, TextureLoadProps, TileVersionInfo, UpgradeOptions } from "@itwin/core-common";
|
|
8
|
-
import type { Range3dProps } from "@itwin/core-geometry";
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
static get
|
|
26
|
-
static get
|
|
27
|
-
static get
|
|
28
|
-
static get
|
|
29
|
-
static
|
|
30
|
-
|
|
31
|
-
static
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
crashDir
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
function
|
|
87
|
-
function
|
|
88
|
-
function
|
|
89
|
-
function
|
|
90
|
-
function
|
|
91
|
-
function
|
|
92
|
-
function
|
|
93
|
-
function
|
|
94
|
-
function
|
|
95
|
-
function
|
|
96
|
-
function
|
|
97
|
-
function
|
|
98
|
-
function
|
|
99
|
-
function
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
* @
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
size
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
interface
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
readonly
|
|
312
|
-
readonly
|
|
313
|
-
readonly
|
|
314
|
-
readonly
|
|
315
|
-
readonly
|
|
316
|
-
readonly
|
|
317
|
-
readonly
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
readonly
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}):
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
static
|
|
519
|
-
static
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
|
|
675
|
-
}
|
|
676
|
-
/** Parameters for opening
|
|
677
|
-
interface SQLiteDbOpenParams {
|
|
678
|
-
/** use OpenMode.ReadWrite to open the file with write access */
|
|
679
|
-
openMode: OpenMode;
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
|
|
758
|
-
*/
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
get
|
|
830
|
-
/**
|
|
831
|
-
get
|
|
832
|
-
/**
|
|
833
|
-
get
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
/**
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
*
|
|
865
|
-
* before
|
|
866
|
-
* @note
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
*
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
*
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
/**
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
* @
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
*
|
|
923
|
-
* for
|
|
924
|
-
*
|
|
925
|
-
*
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
*
|
|
934
|
-
*/
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
*
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
* @
|
|
966
|
-
*/
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
* @
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
interface
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
interface
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
queue(): Promise<void>;
|
|
1214
|
-
cancel(): void;
|
|
1215
|
-
setReady(): void;
|
|
1216
|
-
setThrow(): void;
|
|
1217
|
-
isCanceled(): boolean;
|
|
1218
|
-
wasExecuted(): boolean;
|
|
1219
|
-
getState(): TestWorkerState;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
export {};
|
|
1
|
+
import type { NativeCloudSqlite } from "./NativeCloudSqlite";
|
|
2
|
+
/**
|
|
3
|
+
* @note This package may only have **dev** dependencies on @itwin packages, so they are *not* available at runtime. Therefore we can only import **types** from them.
|
|
4
|
+
* @note You cannot use mapped types @href https://www.typescriptlang.org/docs/handbook/2/mapped-types.html from itwin imports here due to how they are resolved downstream
|
|
5
|
+
*/
|
|
6
|
+
import type { BentleyStatus, DbOpcode, DbResult, GuidString, Id64Array, Id64String, IDisposable, IModelStatus, Logger, OpenMode, StatusCodeWithMessage } from "@itwin/core-bentley";
|
|
7
|
+
import type { ChangesetIndexAndId, CreateEmptyStandaloneIModelProps, DbRequest, DbResponse, ElementAspectProps, ElementGraphicsRequestProps, ElementLoadProps, ElementProps, FilePropertyProps, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeographicCRSInterpretRequestProps, GeographicCRSInterpretResponseProps, GeometryContainmentResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelProps, LocalDirName, LocalFileName, MassPropertiesResponseProps, ModelLoadProps, ModelProps, RelationshipProps, SnapshotOpenOptions, TextureData, TextureLoadProps, TileVersionInfo, UpgradeOptions } from "@itwin/core-common";
|
|
8
|
+
import type { Range3dProps } from "@itwin/core-geometry";
|
|
9
|
+
/** Logger categories used by the native addon
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const NativeLoggerCategory: {
|
|
13
|
+
readonly BeSQLite: "BeSQLite";
|
|
14
|
+
readonly BRepCore: "BRepCore";
|
|
15
|
+
readonly Changeset: "Changeset";
|
|
16
|
+
readonly CloudSqlite: "CloudSqlite";
|
|
17
|
+
readonly DgnCore: "DgnCore";
|
|
18
|
+
readonly ECDb: "ECDb";
|
|
19
|
+
readonly ECObjectsNative: "ECObjectsNative";
|
|
20
|
+
readonly UnitsNative: "UnitsNative";
|
|
21
|
+
};
|
|
22
|
+
/** Find and load the native node-addon library */
|
|
23
|
+
export declare class NativeLibrary {
|
|
24
|
+
static get archName(): string;
|
|
25
|
+
static get nodeAddonName(): string;
|
|
26
|
+
static get defaultLocalDir(): string;
|
|
27
|
+
static get isDevBuild(): boolean;
|
|
28
|
+
static get defaultCacheDir(): string;
|
|
29
|
+
private static _nativeLib?;
|
|
30
|
+
static get nativeLib(): typeof IModelJsNative;
|
|
31
|
+
static load(): typeof IModelJsNative;
|
|
32
|
+
}
|
|
33
|
+
/** Possible outcomes of generateElementGraphics.
|
|
34
|
+
* Must be kept in sync with Dgn::Tile::Graphics::TileGraphicsStatus.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const enum ElementGraphicsStatus {
|
|
38
|
+
Success = 0,
|
|
39
|
+
Canceled = 1,
|
|
40
|
+
NoGeometry = 2,
|
|
41
|
+
InvalidJson = 3,
|
|
42
|
+
UnknownMajorFormatVersion = 4,
|
|
43
|
+
ElementNotFound = 5,
|
|
44
|
+
DuplicateRequestId = 6
|
|
45
|
+
}
|
|
46
|
+
/** Possible outcomes of exportSchema[s] (and generally writing schemas)
|
|
47
|
+
* Must be kept in sync with ECN::SchemaWriteStatus
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare const enum SchemaWriteStatus {
|
|
51
|
+
Success = 0,
|
|
52
|
+
FailedToSaveXml = 1,
|
|
53
|
+
FailedToCreateXml = 2,
|
|
54
|
+
FailedToCreateJson = 3,
|
|
55
|
+
FailedToWriteFile = 4
|
|
56
|
+
}
|
|
57
|
+
/** Module that declares the IModelJs native code.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare namespace IModelJsNative {
|
|
61
|
+
interface NameValuePair {
|
|
62
|
+
name: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
/** any type of Db that supports EC */
|
|
66
|
+
type AnyECDb = DgnDb | ECDb;
|
|
67
|
+
/** any type of Db */
|
|
68
|
+
type AnyDb = AnyECDb | SQLiteDb;
|
|
69
|
+
/** A string that identifies a Txn. */
|
|
70
|
+
type TxnIdString = string;
|
|
71
|
+
interface NativeCrashReportingConfig {
|
|
72
|
+
/** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. */
|
|
73
|
+
crashDir: string;
|
|
74
|
+
/** Write .dmp files to crashDir? The default is false. Even if writeDumpsToCrashDir is false, the iModelJsNativeCrash*.properties.txt file will be written to crashDir. */
|
|
75
|
+
enableCrashDumps?: boolean;
|
|
76
|
+
/** max # .dmp files that may exist in crashDir */
|
|
77
|
+
maxDumpsInDir?: number;
|
|
78
|
+
/** If writeDumpsToCrashDir is true, do you want a full-memory dump? Defaults to false. */
|
|
79
|
+
wantFullMemory?: boolean;
|
|
80
|
+
/** Additional name, value pairs to add as meta data to a crash report. */
|
|
81
|
+
params?: NameValuePair[];
|
|
82
|
+
}
|
|
83
|
+
const version: string;
|
|
84
|
+
let logger: Logger;
|
|
85
|
+
function setUseTileCache(useTileCache: boolean): void;
|
|
86
|
+
function flushLog(): void;
|
|
87
|
+
function getTileVersionInfo(): TileVersionInfo;
|
|
88
|
+
function setCrashReporting(cfg: NativeCrashReportingConfig): void;
|
|
89
|
+
function setCrashReportProperty(name: string, value: string | undefined): void;
|
|
90
|
+
function getCrashReportProperties(): NameValuePair[];
|
|
91
|
+
function storeObjectInVault(obj: any, id: string): void;
|
|
92
|
+
function getObjectFromVault(id: string): any;
|
|
93
|
+
function dropObjectFromVault(id: string): void;
|
|
94
|
+
function addReferenceToObjectInVault(id: string): void;
|
|
95
|
+
function getObjectRefCountFromVault(id: string): number;
|
|
96
|
+
function clearLogLevelCache(): void;
|
|
97
|
+
function addFontWorkspace(fileName: LocalFileName, container?: CloudContainer): boolean;
|
|
98
|
+
function addGcsWorkspaceDb(dbNames: string, container?: CloudContainer, priority?: number): boolean;
|
|
99
|
+
function enableLocalGcsFiles(yesNo: boolean): void;
|
|
100
|
+
function queryConcurrency(pool: "io" | "cpu"): number;
|
|
101
|
+
/** Get the SHA1 hash of a Schema XML file, possibly including its referenced Schemas */
|
|
102
|
+
function computeSchemaChecksum(arg: {
|
|
103
|
+
/** the full path to the root schema XML file */
|
|
104
|
+
schemaXmlPath: string;
|
|
105
|
+
/** A list of directories to find referenced schemas */
|
|
106
|
+
referencePaths: string[];
|
|
107
|
+
/** If true, the returned SHA1 includes the hash of all referenced schemas */
|
|
108
|
+
exactMatch?: boolean;
|
|
109
|
+
}): string;
|
|
110
|
+
/** The return type of synchronous functions that may return an error or a successful result. */
|
|
111
|
+
type ErrorStatusOrResult<ErrorCodeType, ResultType> = {
|
|
112
|
+
/** Error from the operation. This property is defined if and only if the operation failed. */
|
|
113
|
+
error: StatusCodeWithMessage<ErrorCodeType>;
|
|
114
|
+
result?: never;
|
|
115
|
+
} | {
|
|
116
|
+
error?: never;
|
|
117
|
+
/** Result of the operation. This property is defined if the operation completed successfully */
|
|
118
|
+
result: ResultType;
|
|
119
|
+
};
|
|
120
|
+
namespace ConcurrentQuery {
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
type OnResponse = (response: DbResponse) => void;
|
|
125
|
+
/** Configuration for concurrent query manager
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
}
|
|
129
|
+
interface IConcurrentQueryManager {
|
|
130
|
+
concurrentQueryExecute(request: DbRequest, onResponse: ConcurrentQuery.OnResponse): void;
|
|
131
|
+
}
|
|
132
|
+
interface TileContent {
|
|
133
|
+
content: Uint8Array;
|
|
134
|
+
elapsedSeconds: number;
|
|
135
|
+
}
|
|
136
|
+
/** Represents the current state of a pollable tile content request.
|
|
137
|
+
* Note: lack of a "completed" state because polling a completed request returns the content as a Uint8Array.
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
const enum TileContentState {
|
|
141
|
+
New = 0,
|
|
142
|
+
Pending = 1,
|
|
143
|
+
Loading = 2
|
|
144
|
+
}
|
|
145
|
+
/** Result of generateElementGraphics conveying graphics as Uint8Array.
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
interface ElementGraphicsContent {
|
|
149
|
+
status: ElementGraphicsStatus.Success;
|
|
150
|
+
content: Uint8Array;
|
|
151
|
+
}
|
|
152
|
+
/** Result of generateElementGraphics that produced no graphics.
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
interface ElementGraphicsError {
|
|
156
|
+
status: Exclude<ElementGraphicsStatus, ElementGraphicsStatus.Success>;
|
|
157
|
+
}
|
|
158
|
+
/** The result of generateElementGraphics.
|
|
159
|
+
* @note generateElementGraphics produces a Promise<ElementGraphicsResult>. It only ever rejects if some unforeseen error like "iModel not open" or "type error" occurs.
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
type ElementGraphicsResult = ElementGraphicsContent | ElementGraphicsError;
|
|
163
|
+
/** Information returned by DgnDb.queryDefinitionElementUsage. */
|
|
164
|
+
interface DefinitionElementUsageInfo {
|
|
165
|
+
/** The subset of input Ids that are SpatialCategory definitions. */
|
|
166
|
+
spatialCategoryIds?: Id64String[];
|
|
167
|
+
/** The subset of input Ids that are DrawingCategory definitions. */
|
|
168
|
+
drawingCategoryIds?: Id64String[];
|
|
169
|
+
/** The subset of input Ids that are SubCategory definitions. */
|
|
170
|
+
subCategoryIds?: Id64String[];
|
|
171
|
+
/** The subset of input Ids that are CategorySelectors. */
|
|
172
|
+
categorySelectorIds?: Id64String[];
|
|
173
|
+
/** The subset of input Ids that are ModelSelectors. */
|
|
174
|
+
modelSelectorIds?: Id64String[];
|
|
175
|
+
/** The subset of input Ids that are DisplayStyles. */
|
|
176
|
+
displayStyleIds?: Id64String[];
|
|
177
|
+
/** The subset of input Ids that are ViewDefinitions. */
|
|
178
|
+
viewDefinitionIds?: Id64String[];
|
|
179
|
+
/** The subset of input Ids that are GeometryParts. */
|
|
180
|
+
geometryPartIds?: Id64String[];
|
|
181
|
+
/** The subset of input Ids that are RenderMaterials. */
|
|
182
|
+
renderMaterialIds?: Id64String[];
|
|
183
|
+
/** The subset of input Ids that are LineStyles. */
|
|
184
|
+
lineStyleIds?: Id64String[];
|
|
185
|
+
/** The subset of input Ids that are Textures. */
|
|
186
|
+
textureIds?: Id64String[];
|
|
187
|
+
/** Ids of *other* input DefinitionElements that were not checked for usage. */
|
|
188
|
+
otherDefinitionElementIds?: Id64String[];
|
|
189
|
+
/** Ids of input DefinitionElements where usage was detected. */
|
|
190
|
+
usedIds?: Id64String[];
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Represents all of the valid EC Specification Versions.
|
|
194
|
+
*/
|
|
195
|
+
const enum ECVersion {
|
|
196
|
+
V2_0 = 131072,
|
|
197
|
+
V3_1 = 196609,
|
|
198
|
+
V3_2 = 196610,
|
|
199
|
+
Latest = 196610
|
|
200
|
+
}
|
|
201
|
+
interface ChangesetFileProps {
|
|
202
|
+
index: number;
|
|
203
|
+
id: string;
|
|
204
|
+
parentId: string;
|
|
205
|
+
changesType: number;
|
|
206
|
+
description: string;
|
|
207
|
+
briefcaseId: number;
|
|
208
|
+
pushDate: string;
|
|
209
|
+
userCreated: string;
|
|
210
|
+
size?: number;
|
|
211
|
+
pathname: string;
|
|
212
|
+
}
|
|
213
|
+
interface EmbeddedFileProps {
|
|
214
|
+
name: string;
|
|
215
|
+
localFileName: string;
|
|
216
|
+
}
|
|
217
|
+
interface EmbedFileArg extends EmbeddedFileProps {
|
|
218
|
+
date: number;
|
|
219
|
+
fileExt?: string;
|
|
220
|
+
compress?: boolean;
|
|
221
|
+
}
|
|
222
|
+
interface EmbedFileQuery {
|
|
223
|
+
size: number;
|
|
224
|
+
date: number;
|
|
225
|
+
fileExt: string;
|
|
226
|
+
}
|
|
227
|
+
interface FontEncodingProps {
|
|
228
|
+
codePage?: number;
|
|
229
|
+
degree?: number;
|
|
230
|
+
plusMinus?: number;
|
|
231
|
+
diameter?: number;
|
|
232
|
+
}
|
|
233
|
+
enum FontType {
|
|
234
|
+
TrueType = 1,
|
|
235
|
+
Rsc = 2,
|
|
236
|
+
Shx = 3
|
|
237
|
+
}
|
|
238
|
+
interface FontFaceProps {
|
|
239
|
+
faceName: "regular" | "italic" | "bold" | "bolditalic";
|
|
240
|
+
familyName: string;
|
|
241
|
+
type: FontType;
|
|
242
|
+
subId?: number;
|
|
243
|
+
encoding?: FontEncodingProps;
|
|
244
|
+
}
|
|
245
|
+
interface EmbedFontDataProps {
|
|
246
|
+
face: FontFaceProps;
|
|
247
|
+
data: Uint8Array;
|
|
248
|
+
}
|
|
249
|
+
interface EmbedFontFileProps {
|
|
250
|
+
fileName: LocalFileName;
|
|
251
|
+
}
|
|
252
|
+
interface EmbedSystemFontProps {
|
|
253
|
+
systemFont: string;
|
|
254
|
+
}
|
|
255
|
+
type EmbedFontArg = EmbedFontDataProps | EmbedFontFileProps | EmbedSystemFontProps & {
|
|
256
|
+
compress?: true;
|
|
257
|
+
};
|
|
258
|
+
interface SQLiteOps {
|
|
259
|
+
embedFile(arg: EmbedFileArg): void;
|
|
260
|
+
embedFont(arg: EmbedFontArg): void;
|
|
261
|
+
extractEmbeddedFile(arg: EmbeddedFileProps): void;
|
|
262
|
+
getFilePath(): string;
|
|
263
|
+
getLastInsertRowId(): number;
|
|
264
|
+
getLastError(): string;
|
|
265
|
+
isOpen(): boolean;
|
|
266
|
+
isReadonly(): boolean;
|
|
267
|
+
queryEmbeddedFile(name: string): EmbedFileQuery | undefined;
|
|
268
|
+
queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;
|
|
269
|
+
queryNextAvailableFileProperty(props: FilePropertyProps): number;
|
|
270
|
+
removeEmbeddedFile(name: string): void;
|
|
271
|
+
replaceEmbeddedFile(arg: EmbedFileArg): void;
|
|
272
|
+
restartDefaultTxn(): void;
|
|
273
|
+
saveChanges(): void;
|
|
274
|
+
saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;
|
|
275
|
+
vacuum(arg?: {
|
|
276
|
+
pageSize?: number;
|
|
277
|
+
into?: LocalFileName;
|
|
278
|
+
}): void;
|
|
279
|
+
}
|
|
280
|
+
/** The result of DgnDb.inlineGeometryParts.
|
|
281
|
+
* If numSingleRefParts, numRefsInlined, and numPartsDeleted are all the same, the operation was fully successful.
|
|
282
|
+
* Otherwise, some errors occurred inlining and/or deleting one or more parts.
|
|
283
|
+
* A part will not be deleted unless it is first successfully inlined.
|
|
284
|
+
*/
|
|
285
|
+
interface InlineGeometryPartsResult {
|
|
286
|
+
/** The number of parts that were determined to have exactly one reference, making them candidates for inlining. */
|
|
287
|
+
numCandidateParts: number;
|
|
288
|
+
/** The number of part references successfully inlined. */
|
|
289
|
+
numRefsInlined: number;
|
|
290
|
+
/** The number of candidate parts that were successfully deleted after inlining. */
|
|
291
|
+
numPartsDeleted: number;
|
|
292
|
+
}
|
|
293
|
+
interface SchemaReferenceProps {
|
|
294
|
+
readonly name: string;
|
|
295
|
+
readonly version: string;
|
|
296
|
+
}
|
|
297
|
+
interface SchemaItemProps {
|
|
298
|
+
readonly $schema?: string;
|
|
299
|
+
readonly schema?: string;
|
|
300
|
+
readonly schemaVersion?: string;
|
|
301
|
+
readonly name?: string;
|
|
302
|
+
readonly schemaItemType?: string;
|
|
303
|
+
readonly label?: string;
|
|
304
|
+
readonly description?: string;
|
|
305
|
+
readonly customAttributes?: Array<{
|
|
306
|
+
[value: string]: any;
|
|
307
|
+
}>;
|
|
308
|
+
}
|
|
309
|
+
interface SchemaProps {
|
|
310
|
+
readonly $schema: string;
|
|
311
|
+
readonly name: string;
|
|
312
|
+
readonly version: string;
|
|
313
|
+
readonly alias: string;
|
|
314
|
+
readonly label?: string;
|
|
315
|
+
readonly description?: string;
|
|
316
|
+
readonly references?: SchemaReferenceProps[];
|
|
317
|
+
readonly items?: {
|
|
318
|
+
[name: string]: SchemaItemProps;
|
|
319
|
+
};
|
|
320
|
+
readonly customAttributes?: Array<{
|
|
321
|
+
[value: string]: any;
|
|
322
|
+
}>;
|
|
323
|
+
}
|
|
324
|
+
/** The native object for a Briefcase. */
|
|
325
|
+
class DgnDb implements IConcurrentQueryManager, SQLiteOps {
|
|
326
|
+
constructor();
|
|
327
|
+
readonly cloudContainer?: CloudContainer;
|
|
328
|
+
abandonChanges(): DbResult;
|
|
329
|
+
abandonCreateChangeset(): void;
|
|
330
|
+
addChildPropagatesChangesToParentRelationship(schemaName: string, relClassName: string): BentleyStatus;
|
|
331
|
+
addNewFont(arg: {
|
|
332
|
+
type: FontType;
|
|
333
|
+
name: string;
|
|
334
|
+
}): number;
|
|
335
|
+
applyChangeset(changeSet: ChangesetFileProps): void;
|
|
336
|
+
attachChangeCache(changeCachePath: string): DbResult;
|
|
337
|
+
beginMultiTxnOperation(): DbResult;
|
|
338
|
+
beginPurgeOperation(): IModelStatus;
|
|
339
|
+
cancelElementGraphicsRequests(requestIds: string[]): void;
|
|
340
|
+
cancelTileContentRequests(treeId: string, contentIds: string[]): void;
|
|
341
|
+
cancelTo(txnId: TxnIdString): IModelStatus;
|
|
342
|
+
classIdToName(idString: string): string;
|
|
343
|
+
classNameToId(className: string): Id64String;
|
|
344
|
+
closeIModel(): void;
|
|
345
|
+
completeCreateChangeset(arg: {
|
|
346
|
+
index: number;
|
|
347
|
+
}): void;
|
|
348
|
+
computeProjectExtents(wantFullExtents: boolean, wantOutlierIds: boolean): {
|
|
349
|
+
extents: Range3dProps;
|
|
350
|
+
fullExtents?: Range3dProps;
|
|
351
|
+
outliers?: Id64Array;
|
|
352
|
+
};
|
|
353
|
+
concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse): void;
|
|
354
|
+
createBRepGeometry(createProps: any): IModelStatus;
|
|
355
|
+
createChangeCache(changeCacheFile: ECDb, changeCachePath: string): DbResult;
|
|
356
|
+
createClassViewsInDb(): BentleyStatus;
|
|
357
|
+
createIModel(fileName: string, props: CreateEmptyStandaloneIModelProps): void;
|
|
358
|
+
deleteAllTxns(): void;
|
|
359
|
+
deleteElement(elemIdJson: string): void;
|
|
360
|
+
deleteElementAspect(aspectIdJson: string): void;
|
|
361
|
+
deleteLinkTableRelationship(props: RelationshipProps): DbResult;
|
|
362
|
+
deleteLocalValue(name: string): void;
|
|
363
|
+
deleteModel(modelIdJson: string): void;
|
|
364
|
+
detachChangeCache(): number;
|
|
365
|
+
dropSchema(schemaName: string): void;
|
|
366
|
+
dumpChangeset(changeSet: ChangesetFileProps): void;
|
|
367
|
+
elementGeometryCacheOperation(requestProps: any): BentleyStatus;
|
|
368
|
+
embedFile(arg: EmbedFileArg): void;
|
|
369
|
+
embedFont(arg: EmbedFontArg): void;
|
|
370
|
+
enableChangesetSizeStats(enabled: boolean): DbResult;
|
|
371
|
+
enableTxnTesting(): void;
|
|
372
|
+
endMultiTxnOperation(): DbResult;
|
|
373
|
+
endPurgeOperation(): IModelStatus;
|
|
374
|
+
executeTest(testName: string, params: string): string;
|
|
375
|
+
exportGraphics(exportProps: any): DbResult;
|
|
376
|
+
exportPartGraphics(exportProps: any): DbResult;
|
|
377
|
+
exportSchema(schemaName: string, exportDirectory: string): SchemaWriteStatus;
|
|
378
|
+
exportSchemas(exportDirectory: string): SchemaWriteStatus;
|
|
379
|
+
extractChangedInstanceIdsFromChangeSets(changeSetFileNames: string[]): ErrorStatusOrResult<IModelStatus, ChangedInstanceIdsProps>;
|
|
380
|
+
extractChangeSummary(changeCacheFile: ECDb, changesetFilePath: string): ErrorStatusOrResult<DbResult, string>;
|
|
381
|
+
extractEmbeddedFile(arg: EmbeddedFileProps): void;
|
|
382
|
+
findGeometryPartReferences(partIds: Id64String[], is2d: boolean): Id64String[];
|
|
383
|
+
generateElementGraphics(request: ElementGraphicsRequestProps): Promise<ElementGraphicsResult>;
|
|
384
|
+
getBriefcaseId(): number;
|
|
385
|
+
getChangesetSize(): number;
|
|
386
|
+
getChangeTrackingMemoryUsed(): number;
|
|
387
|
+
getCurrentChangeset(): ChangesetIndexAndId;
|
|
388
|
+
getCurrentTxnId(): TxnIdString;
|
|
389
|
+
getECClassMetaData(schema: string, className: string): ErrorStatusOrResult<IModelStatus, string>;
|
|
390
|
+
getElement(opts: ElementLoadProps): ElementProps;
|
|
391
|
+
getFilePath(): string;
|
|
392
|
+
getGeoCoordinatesFromIModelCoordinates(points: GeoCoordinatesRequestProps): GeoCoordinatesResponseProps;
|
|
393
|
+
getGeometryContainment(props: object): Promise<GeometryContainmentResponseProps>;
|
|
394
|
+
getIModelCoordinatesFromGeoCoordinates(points: IModelCoordinatesRequestProps): IModelCoordinatesResponseProps;
|
|
395
|
+
getIModelId(): GuidString;
|
|
396
|
+
getIModelProps(): IModelProps;
|
|
397
|
+
getITwinId(): GuidString;
|
|
398
|
+
getLastError(): string;
|
|
399
|
+
getLastInsertRowId(): number;
|
|
400
|
+
getMassProperties(props: object): Promise<MassPropertiesResponseProps>;
|
|
401
|
+
getModel(opts: ModelLoadProps): ModelProps;
|
|
402
|
+
getMultiTxnOperationDepth(): number;
|
|
403
|
+
getRedoString(): string;
|
|
404
|
+
getSchemaProps(name: string): SchemaProps;
|
|
405
|
+
getSchemaPropsAsync(name: string): Promise<SchemaProps>;
|
|
406
|
+
getSchemaItem(schemaName: string, itemName: string): ErrorStatusOrResult<IModelStatus, string>;
|
|
407
|
+
getTempFileBaseName(): string;
|
|
408
|
+
getTileContent(treeId: string, tileId: string, callback: (result: ErrorStatusOrResult<IModelStatus, Uint8Array>) => void): void;
|
|
409
|
+
getTileTree(id: string, callback: (result: ErrorStatusOrResult<IModelStatus, any>) => void): void;
|
|
410
|
+
getTxnDescription(txnId: TxnIdString): string;
|
|
411
|
+
getUndoString(): string;
|
|
412
|
+
hasFatalTxnError(): boolean;
|
|
413
|
+
hasPendingTxns(): boolean;
|
|
414
|
+
hasUnsavedChanges(): boolean;
|
|
415
|
+
importFunctionalSchema(): DbResult;
|
|
416
|
+
importSchemas(schemaFileNames: string[]): DbResult;
|
|
417
|
+
importXmlSchemas(serializedXmlSchemas: string[]): DbResult;
|
|
418
|
+
inBulkOperation(): boolean;
|
|
419
|
+
inlineGeometryPartReferences(): InlineGeometryPartsResult;
|
|
420
|
+
insertCodeSpec(name: string, jsonProperties: {
|
|
421
|
+
spec: any;
|
|
422
|
+
scopeSpec: any;
|
|
423
|
+
}): Id64String;
|
|
424
|
+
insertElement(elemProps: ElementProps, options?: {
|
|
425
|
+
forceUseId: boolean;
|
|
426
|
+
}): Id64String;
|
|
427
|
+
insertElementAspect(aspectProps: ElementAspectProps): void;
|
|
428
|
+
insertLinkTableRelationship(props: RelationshipProps): Id64String;
|
|
429
|
+
insertModel(modelProps: ModelProps): Id64String;
|
|
430
|
+
isChangeCacheAttached(): boolean;
|
|
431
|
+
isGeometricModelTrackingSupported(): boolean;
|
|
432
|
+
isIndirectChanges(): boolean;
|
|
433
|
+
isLinkTableRelationship(classFullName: string): boolean | undefined;
|
|
434
|
+
isOpen(): boolean;
|
|
435
|
+
isProfilerPaused(): boolean;
|
|
436
|
+
isProfilerRunning(): boolean;
|
|
437
|
+
isReadonly(): boolean;
|
|
438
|
+
isRedoPossible(): boolean;
|
|
439
|
+
isTxnIdValid(txnId: TxnIdString): boolean;
|
|
440
|
+
isUndoPossible(): boolean;
|
|
441
|
+
logTxnError(fatal: boolean): void;
|
|
442
|
+
openIModel(dbName: string, mode: OpenMode, upgradeOptions?: UpgradeOptions, props?: SnapshotOpenOptions, container?: CloudContainer): void;
|
|
443
|
+
pauseProfiler(): DbResult;
|
|
444
|
+
pollTileContent(treeId: string, tileId: string): ErrorStatusOrResult<IModelStatus, TileContentState | TileContent>;
|
|
445
|
+
processGeometryStream(requestProps: any): IModelStatus;
|
|
446
|
+
purgeTileTrees(modelIds: Id64Array | undefined): void;
|
|
447
|
+
queryDefinitionElementUsage(definitionElementIds: Id64Array): DefinitionElementUsageInfo | undefined;
|
|
448
|
+
queryEmbeddedFile(name: string): EmbedFileQuery | undefined;
|
|
449
|
+
queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;
|
|
450
|
+
queryFirstTxnId(): TxnIdString;
|
|
451
|
+
queryLocalValue(name: string): string | undefined;
|
|
452
|
+
queryModelExtents(options: {
|
|
453
|
+
id: Id64String;
|
|
454
|
+
}): {
|
|
455
|
+
modelExtents: Range3dProps;
|
|
456
|
+
};
|
|
457
|
+
queryNextAvailableFileProperty(props: FilePropertyProps): number;
|
|
458
|
+
queryNextTxnId(txnId: TxnIdString): TxnIdString;
|
|
459
|
+
queryPreviousTxnId(txnId: TxnIdString): TxnIdString;
|
|
460
|
+
queryTextureData(opts: TextureLoadProps): Promise<TextureData | undefined>;
|
|
461
|
+
readFontMap(): FontMapProps;
|
|
462
|
+
reinstateTxn(): IModelStatus;
|
|
463
|
+
removeEmbeddedFile(name: string): void;
|
|
464
|
+
replaceEmbeddedFile(arg: EmbedFileArg): void;
|
|
465
|
+
resetBriefcaseId(idValue: number): void;
|
|
466
|
+
restartDefaultTxn(): void;
|
|
467
|
+
restartTxnSession(): void;
|
|
468
|
+
resumeProfiler(): DbResult;
|
|
469
|
+
reverseAll(): IModelStatus;
|
|
470
|
+
reverseTo(txnId: TxnIdString): IModelStatus;
|
|
471
|
+
reverseTxns(numOperations: number): IModelStatus;
|
|
472
|
+
saveChanges(description?: string): DbResult;
|
|
473
|
+
saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;
|
|
474
|
+
saveLocalValue(name: string, value: string | undefined): void;
|
|
475
|
+
schemaToXmlString(schemaName: string, version?: ECVersion): string | undefined;
|
|
476
|
+
setGeometricModelTrackingEnabled(enabled: boolean): ErrorStatusOrResult<IModelStatus, boolean>;
|
|
477
|
+
setIModelDb(iModelDb?: any): void;
|
|
478
|
+
setIModelId(guid: GuidString): DbResult;
|
|
479
|
+
setITwinId(guid: GuidString): DbResult;
|
|
480
|
+
simplifyElementGeometry(simplifyArgs: any): DbResult;
|
|
481
|
+
startCreateChangeset(): ChangesetFileProps;
|
|
482
|
+
startProfiler(scopeName?: string, scenarioName?: string, overrideFile?: boolean, computeExecutionPlan?: boolean): DbResult;
|
|
483
|
+
stopProfiler(): {
|
|
484
|
+
rc: DbResult;
|
|
485
|
+
elapsedTime?: number;
|
|
486
|
+
scopeId?: number;
|
|
487
|
+
fileName?: string;
|
|
488
|
+
};
|
|
489
|
+
updateElement(elemProps: ElementProps): void;
|
|
490
|
+
updateElementAspect(aspectProps: ElementAspectProps): void;
|
|
491
|
+
updateElementGeometryCache(props: object): Promise<any>;
|
|
492
|
+
updateIModelProps(props: IModelProps): void;
|
|
493
|
+
updateLinkTableRelationship(props: RelationshipProps): DbResult;
|
|
494
|
+
updateModel(modelProps: ModelProps): void;
|
|
495
|
+
updateModelGeometryGuid(modelId: Id64String): IModelStatus;
|
|
496
|
+
updateProjectExtents(newExtentsJson: string): void;
|
|
497
|
+
writeAffectedElementDependencyGraphToFile(dotFileName: string, changedElems: Id64Array): BentleyStatus;
|
|
498
|
+
writeFullElementDependencyGraphToFile(dotFileName: string): BentleyStatus;
|
|
499
|
+
vacuum(arg?: {
|
|
500
|
+
pageSize?: number;
|
|
501
|
+
into?: LocalFileName;
|
|
502
|
+
}): void;
|
|
503
|
+
static enableSharedCache(enable: boolean): DbResult;
|
|
504
|
+
static getAssetsDir(): string;
|
|
505
|
+
}
|
|
506
|
+
/** The native object for GeoServices. */
|
|
507
|
+
class GeoServices {
|
|
508
|
+
constructor();
|
|
509
|
+
static getGeographicCRSInterpretation(props: GeographicCRSInterpretRequestProps): GeographicCRSInterpretResponseProps;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* RevisionUtility help with debugging and testing
|
|
513
|
+
* @internal
|
|
514
|
+
*/
|
|
515
|
+
class RevisionUtility {
|
|
516
|
+
constructor();
|
|
517
|
+
static assembleRevision(targetFile: string, rawChangesetFile: string, prefixFile?: string, lzmaPropsJson?: string): BentleyStatus;
|
|
518
|
+
static computeStatistics(sourceFile: string, addPrefix: boolean): string;
|
|
519
|
+
static disassembleRevision(sourceFile: string, targetDir: string): BentleyStatus;
|
|
520
|
+
static dumpChangesetToDb(sourceFile: string, dbFile: string, includeCols: boolean): BentleyStatus;
|
|
521
|
+
static getUncompressSize(sourceFile: string): string;
|
|
522
|
+
static normalizeLzmaParams(lzmaPropsJson?: string): string;
|
|
523
|
+
static recompressRevision(sourceFile: string, targetFile: string, lzmaPropsJson?: string): BentleyStatus;
|
|
524
|
+
}
|
|
525
|
+
class ECDb implements IDisposable, IConcurrentQueryManager {
|
|
526
|
+
constructor();
|
|
527
|
+
abandonChanges(): DbResult;
|
|
528
|
+
closeDb(): void;
|
|
529
|
+
createDb(dbName: string): DbResult;
|
|
530
|
+
dispose(): void;
|
|
531
|
+
dropSchema(schemaName: string): void;
|
|
532
|
+
getFilePath(): string;
|
|
533
|
+
importSchema(schemaPathName: string): DbResult;
|
|
534
|
+
isOpen(): boolean;
|
|
535
|
+
openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;
|
|
536
|
+
saveChanges(changesetName?: string): DbResult;
|
|
537
|
+
getLastError(): string;
|
|
538
|
+
getLastInsertRowId(): number;
|
|
539
|
+
static enableSharedCache(enable: boolean): DbResult;
|
|
540
|
+
concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse): void;
|
|
541
|
+
}
|
|
542
|
+
class ChangedElementsECDb implements IDisposable {
|
|
543
|
+
constructor();
|
|
544
|
+
dispose(): void;
|
|
545
|
+
createDb(db: DgnDb, dbName: string): DbResult;
|
|
546
|
+
openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;
|
|
547
|
+
isOpen(): boolean;
|
|
548
|
+
closeDb(): void;
|
|
549
|
+
processChangesets(db: DgnDb, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string, wantChunkTraversal?: boolean): DbResult;
|
|
550
|
+
processChangesetsAndRoll(dbFilename: string, dbGuid: string, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string, wantRelationshipCaching?: boolean, relationshipCacheSize?: number, wantChunkTraversal?: boolean): DbResult;
|
|
551
|
+
getChangedElements(startChangesetId: string, endChangesetId: string): ErrorStatusOrResult<IModelStatus, any>;
|
|
552
|
+
isProcessed(changesetId: string): boolean;
|
|
553
|
+
cleanCaches(): void;
|
|
554
|
+
}
|
|
555
|
+
class ECSqlStatement implements IDisposable {
|
|
556
|
+
constructor();
|
|
557
|
+
clearBindings(): DbResult;
|
|
558
|
+
dispose(): void;
|
|
559
|
+
getBinder(param: number | string): ECSqlBinder;
|
|
560
|
+
getColumnCount(): number;
|
|
561
|
+
getValue(columnIndex: number): ECSqlValue;
|
|
562
|
+
prepare(db: AnyECDb, ecsql: string, logErrors?: boolean): StatusCodeWithMessage<DbResult>;
|
|
563
|
+
reset(): DbResult;
|
|
564
|
+
step(): DbResult;
|
|
565
|
+
stepAsync(callback: (result: DbResult) => void): void;
|
|
566
|
+
stepForInsert(): {
|
|
567
|
+
status: DbResult;
|
|
568
|
+
id: string;
|
|
569
|
+
};
|
|
570
|
+
stepForInsertAsync(callback: (result: {
|
|
571
|
+
status: DbResult;
|
|
572
|
+
id: string;
|
|
573
|
+
}) => void): void;
|
|
574
|
+
getNativeSql(): string;
|
|
575
|
+
}
|
|
576
|
+
class ECSqlBinder {
|
|
577
|
+
constructor();
|
|
578
|
+
addArrayElement(): ECSqlBinder;
|
|
579
|
+
bindBlob(base64String: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;
|
|
580
|
+
bindBoolean(val: boolean): DbResult;
|
|
581
|
+
bindDateTime(isoString: string): DbResult;
|
|
582
|
+
bindDouble(val: number): DbResult;
|
|
583
|
+
bindGuid(guidStr: GuidString): DbResult;
|
|
584
|
+
bindId(hexStr: Id64String): DbResult;
|
|
585
|
+
bindIdSet(hexVector: Id64String[]): DbResult;
|
|
586
|
+
bindInteger(val: number | string): DbResult;
|
|
587
|
+
bindMember(memberName: string): ECSqlBinder;
|
|
588
|
+
bindNavigation(navIdHexStr: Id64String, relClassName?: string, relClassTableSpace?: string): DbResult;
|
|
589
|
+
bindNull(): DbResult;
|
|
590
|
+
bindPoint2d(x: number, y: number): DbResult;
|
|
591
|
+
bindPoint3d(x: number, y: number, z: number): DbResult;
|
|
592
|
+
bindString(val: string): DbResult;
|
|
593
|
+
}
|
|
594
|
+
class ECSqlColumnInfo {
|
|
595
|
+
constructor();
|
|
596
|
+
getAccessString(): string;
|
|
597
|
+
getPropertyName(): string;
|
|
598
|
+
getRootClassAlias(): string;
|
|
599
|
+
getRootClassName(): string;
|
|
600
|
+
getRootClassTableSpace(): string;
|
|
601
|
+
getType(): number;
|
|
602
|
+
isEnum(): boolean;
|
|
603
|
+
isGeneratedProperty(): boolean;
|
|
604
|
+
isSystemProperty(): boolean;
|
|
605
|
+
}
|
|
606
|
+
class ECSqlValue {
|
|
607
|
+
constructor();
|
|
608
|
+
getArrayIterator(): ECSqlValueIterator;
|
|
609
|
+
getBlob(): Uint8Array;
|
|
610
|
+
getBoolean(): boolean;
|
|
611
|
+
getClassNameForClassId(): string;
|
|
612
|
+
getColumnInfo(): ECSqlColumnInfo;
|
|
613
|
+
getDateTime(): string;
|
|
614
|
+
getDouble(): number;
|
|
615
|
+
getEnum(): Array<{
|
|
616
|
+
schema: string;
|
|
617
|
+
name: string;
|
|
618
|
+
key: string;
|
|
619
|
+
value: number | string;
|
|
620
|
+
}> | undefined;
|
|
621
|
+
getGeometry(): string;
|
|
622
|
+
getGuid(): GuidString;
|
|
623
|
+
getId(): Id64String;
|
|
624
|
+
getInt(): number;
|
|
625
|
+
getInt64(): number;
|
|
626
|
+
getNavigation(): {
|
|
627
|
+
id: Id64String;
|
|
628
|
+
relClassName?: string;
|
|
629
|
+
};
|
|
630
|
+
getPoint2d(): {
|
|
631
|
+
x: number;
|
|
632
|
+
y: number;
|
|
633
|
+
};
|
|
634
|
+
getPoint3d(): {
|
|
635
|
+
x: number;
|
|
636
|
+
y: number;
|
|
637
|
+
z: number;
|
|
638
|
+
};
|
|
639
|
+
getString(): string;
|
|
640
|
+
getStructIterator(): ECSqlValueIterator;
|
|
641
|
+
isNull(): boolean;
|
|
642
|
+
}
|
|
643
|
+
class ECSqlValueIterator {
|
|
644
|
+
constructor();
|
|
645
|
+
getCurrent(): ECSqlValue;
|
|
646
|
+
moveNext(): boolean;
|
|
647
|
+
}
|
|
648
|
+
/** Default transaction mode for SQLiteDbs.
|
|
649
|
+
* @see https://www.sqlite.org/lang_transaction.html
|
|
650
|
+
*/
|
|
651
|
+
const enum DefaultTxnMode {
|
|
652
|
+
/** no default transaction is started. You must use BEGIN/COMMIT or SQLite will use implicit transactions */
|
|
653
|
+
None = 0,
|
|
654
|
+
/** A deferred transaction is started when the file is first opened. This is the default. */
|
|
655
|
+
Deferred = 1,
|
|
656
|
+
/** An immediate transaction is started when the file is first opened. */
|
|
657
|
+
Immediate = 2,
|
|
658
|
+
/** An exclusive transaction is started when the file is first opened. */
|
|
659
|
+
Exclusive = 3
|
|
660
|
+
}
|
|
661
|
+
/** parameters common to opening or creating a new SQLiteDb */
|
|
662
|
+
interface SQLiteDbOpenOrCreateParams {
|
|
663
|
+
/** If true, do not require that the `be_Prop` table exist */
|
|
664
|
+
rawSQLite?: boolean;
|
|
665
|
+
/** @see immutable option at https://www.sqlite.org/c3ref/open.html */
|
|
666
|
+
immutable?: boolean;
|
|
667
|
+
/** Do not attempt to verify that the file is a valid sQLite file before opening. */
|
|
668
|
+
skipFileCheck?: boolean;
|
|
669
|
+
/** the default transaction mode
|
|
670
|
+
* @see [[SQLiteDb.DefaultTxnMode]]
|
|
671
|
+
*/
|
|
672
|
+
defaultTxn?: 0 | 1 | 2 | 3;
|
|
673
|
+
/** see query parameters from 'URI Filenames' in https://www.sqlite.org/c3ref/open.html */
|
|
674
|
+
queryParam?: string;
|
|
675
|
+
}
|
|
676
|
+
/** Parameters for opening an existing SQLiteDb */
|
|
677
|
+
interface SQLiteDbOpenParams extends SQLiteDbOpenOrCreateParams {
|
|
678
|
+
/** use OpenMode.ReadWrite to open the file with write access */
|
|
679
|
+
openMode: OpenMode;
|
|
680
|
+
}
|
|
681
|
+
/** Size of a SQLiteDb page in bytes */
|
|
682
|
+
interface PageSize {
|
|
683
|
+
/** see https://www.sqlite.org/pragma.html#pragma_page_size */
|
|
684
|
+
pageSize?: number;
|
|
685
|
+
}
|
|
686
|
+
/** Parameters for creating a new SQLiteDb */
|
|
687
|
+
type SQLiteDbCreateParams = SQLiteDbOpenOrCreateParams & PageSize;
|
|
688
|
+
class SQLiteDb implements SQLiteOps, IDisposable {
|
|
689
|
+
constructor();
|
|
690
|
+
readonly cloudContainer?: CloudContainer;
|
|
691
|
+
abandonChanges(): void;
|
|
692
|
+
closeDb(): void;
|
|
693
|
+
createDb(dbName: string, container?: CloudContainer, params?: SQLiteDbCreateParams): void;
|
|
694
|
+
dispose(): void;
|
|
695
|
+
embedFile(arg: EmbedFileArg): void;
|
|
696
|
+
embedFont(arg: EmbedFontArg): void;
|
|
697
|
+
extractEmbeddedFile(arg: EmbeddedFileProps): void;
|
|
698
|
+
getFilePath(): string;
|
|
699
|
+
getLastError(): string;
|
|
700
|
+
getLastInsertRowId(): number;
|
|
701
|
+
isOpen(): boolean;
|
|
702
|
+
isReadonly(): boolean;
|
|
703
|
+
openDb(dbName: string, mode: OpenMode | SQLiteDbOpenParams, container?: CloudContainer): void;
|
|
704
|
+
queryEmbeddedFile(name: string): EmbedFileQuery | undefined;
|
|
705
|
+
queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;
|
|
706
|
+
queryNextAvailableFileProperty(props: FilePropertyProps): number;
|
|
707
|
+
removeEmbeddedFile(name: string): void;
|
|
708
|
+
replaceEmbeddedFile(arg: EmbedFileArg): void;
|
|
709
|
+
restartDefaultTxn(): void;
|
|
710
|
+
saveChanges(): void;
|
|
711
|
+
saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal?: Uint8Array): void;
|
|
712
|
+
vacuum(arg?: {
|
|
713
|
+
pageSize?: number;
|
|
714
|
+
into?: LocalFileName;
|
|
715
|
+
}): void;
|
|
716
|
+
}
|
|
717
|
+
class SqliteStatement implements IDisposable {
|
|
718
|
+
constructor();
|
|
719
|
+
bindBlob(param: number | string, val: Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;
|
|
720
|
+
bindDouble(param: number | string, val: number): DbResult;
|
|
721
|
+
bindGuid(param: number | string, guidStr: GuidString): DbResult;
|
|
722
|
+
bindId(param: number | string, hexStr: Id64String): DbResult;
|
|
723
|
+
bindInteger(param: number | string, val: number | string): DbResult;
|
|
724
|
+
bindNull(param: number | string): DbResult;
|
|
725
|
+
bindString(param: number | string, val: string): DbResult;
|
|
726
|
+
clearBindings(): DbResult;
|
|
727
|
+
dispose(): void;
|
|
728
|
+
getColumnBytes(columnIndex: number): number;
|
|
729
|
+
getColumnCount(): number;
|
|
730
|
+
getColumnName(columnIndex: number): string;
|
|
731
|
+
getColumnType(columnIndex: number): number;
|
|
732
|
+
getValueBlob(columnIndex: number): Uint8Array;
|
|
733
|
+
getValueDouble(columnIndex: number): number;
|
|
734
|
+
getValueGuid(columnIndex: number): GuidString;
|
|
735
|
+
getValueId(columnIndex: number): Id64String;
|
|
736
|
+
getValueInteger(columnIndex: number): number;
|
|
737
|
+
getValueString(columnIndex: number): string;
|
|
738
|
+
isReadonly(): boolean;
|
|
739
|
+
isValueNull(columnIndex: number): boolean;
|
|
740
|
+
prepare(db: AnyDb, sql: string, logErrors?: boolean): void;
|
|
741
|
+
reset(): DbResult;
|
|
742
|
+
step(): DbResult;
|
|
743
|
+
stepAsync(callback: (result: DbResult) => void): void;
|
|
744
|
+
}
|
|
745
|
+
/** Incremental IO for blobs */
|
|
746
|
+
class BlobIO {
|
|
747
|
+
constructor();
|
|
748
|
+
/** Close this BlobIO if it is opened.
|
|
749
|
+
* @note this BlobIO *may* be reused after this call by calling `open` again.
|
|
750
|
+
*/
|
|
751
|
+
close(): void;
|
|
752
|
+
/** get the total number of bytes in the blob */
|
|
753
|
+
getNumBytes(): number;
|
|
754
|
+
/** @return true if this BlobIO was successfully opened and may be use to read or write the blob */
|
|
755
|
+
isValid(): boolean;
|
|
756
|
+
/** Open this BlobIO against a table/row/column in a Db */
|
|
757
|
+
open(
|
|
758
|
+
/** The database for the blob */
|
|
759
|
+
db: AnyDb, args: {
|
|
760
|
+
/** the name of the table for the blob*/
|
|
761
|
+
tableName: string;
|
|
762
|
+
/** the name of the column for the blob */
|
|
763
|
+
columnName: string;
|
|
764
|
+
/** The rowId of the blob */
|
|
765
|
+
row: number;
|
|
766
|
+
/** If true, open this BlobIO for write access */
|
|
767
|
+
writeable?: boolean;
|
|
768
|
+
}): void;
|
|
769
|
+
/** Read from a blob
|
|
770
|
+
* @returns the contents of the requested byte range
|
|
771
|
+
*/
|
|
772
|
+
read(args: {
|
|
773
|
+
/** The number of bytes to read */
|
|
774
|
+
numBytes: number;
|
|
775
|
+
/** starting offset within the blob to read */
|
|
776
|
+
offset: number;
|
|
777
|
+
/** If present and of sufficient size, use this ArrayBuffer for the value. */
|
|
778
|
+
blob?: ArrayBuffer;
|
|
779
|
+
}): Uint8Array;
|
|
780
|
+
/** Reposition this BlobIO to a new rowId
|
|
781
|
+
* @note this BlobIO must be valid when this methods is called.
|
|
782
|
+
*/
|
|
783
|
+
changeRow(row: number): void;
|
|
784
|
+
/** Write to a blob */
|
|
785
|
+
write(args: {
|
|
786
|
+
/** The number of bytes to write */
|
|
787
|
+
numBytes: number;
|
|
788
|
+
/** starting offset within the blob to write */
|
|
789
|
+
offset: number;
|
|
790
|
+
/** the value to write */
|
|
791
|
+
blob: ArrayBuffer;
|
|
792
|
+
}): void;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* A cache for storing data from CloudSqlite databases. This object refers to a directory on a local filesystem
|
|
796
|
+
* and is used to **connect** CloudContainers so they may be accessed. The contents of the cache directory are entirely
|
|
797
|
+
* controlled by CloudSqlite and should be empty when the cache is first created and never modified directly. It maintains
|
|
798
|
+
* the state of the local data across sessions.
|
|
799
|
+
*/
|
|
800
|
+
class CloudCache {
|
|
801
|
+
/** Create an instance of a CloudCache. */
|
|
802
|
+
constructor(props: NativeCloudSqlite.CacheProps);
|
|
803
|
+
/** `true` if this CloudCache is connected to a daemon process */
|
|
804
|
+
get isDaemon(): boolean;
|
|
805
|
+
/** The name for this CloudCache. */
|
|
806
|
+
get name(): string;
|
|
807
|
+
/** The root directory of this CloudCache on a local drive. */
|
|
808
|
+
get rootDir(): LocalDirName;
|
|
809
|
+
/** The guid for this CloudCache. Used for acquiring write lock. */
|
|
810
|
+
get guid(): GuidString;
|
|
811
|
+
setLogMask(mask: number): void;
|
|
812
|
+
/** destroy this CloudCache. All CloudContainers should be detached before calling this. */
|
|
813
|
+
destroy(): void;
|
|
814
|
+
}
|
|
815
|
+
/** A CloudSqlite container that may be connected to a CloudCache. */
|
|
816
|
+
class CloudContainer {
|
|
817
|
+
readonly cache?: CloudCache;
|
|
818
|
+
/** Create a new instance of a CloudContainer. It must be connected to a CloudCache for most operations. */
|
|
819
|
+
constructor(props: NativeCloudSqlite.ContainerAccessProps);
|
|
820
|
+
/** The ContainerId. */
|
|
821
|
+
get containerId(): string;
|
|
822
|
+
/** The *alias* to identify this CloudContainer in a CloudCache. Usually just the ContainerId. */
|
|
823
|
+
get alias(): string;
|
|
824
|
+
/** true if this CloudContainer is currently connected to a CloudCache via the `connect` method. */
|
|
825
|
+
get isConnected(): boolean;
|
|
826
|
+
/** true if this CloudContainer was created with the `writeable` flag (and its `accessToken` supplies write access). */
|
|
827
|
+
get isWriteable(): boolean;
|
|
828
|
+
/** true if this CloudContainer currently holds the write lock for its container in the cloud. */
|
|
829
|
+
get hasWriteLock(): boolean;
|
|
830
|
+
/** true if this CloudContainer has local changes that have not be uploaded to its container in the cloud. */
|
|
831
|
+
get hasLocalChanges(): boolean;
|
|
832
|
+
/** The current accessToken providing access to the cloud container */
|
|
833
|
+
get accessToken(): string;
|
|
834
|
+
set accessToken(val: string);
|
|
835
|
+
/** Get the number of garbage blocks in this container that can be purged. */
|
|
836
|
+
get garbageBlocks(): number;
|
|
837
|
+
/** The block size for this CloudContainer. */
|
|
838
|
+
get blockSize(): number;
|
|
839
|
+
/**
|
|
840
|
+
* initialize a cloud blob-store container to be used as a new Sqlite CloudContainer. This creates the manifest, and should be
|
|
841
|
+
* performed on an empty container. If an existing manifest is present, it is destroyed and a new one is created (essentially emptying the container.)
|
|
842
|
+
*/
|
|
843
|
+
initializeContainer(opts?: {
|
|
844
|
+
checksumBlockNames?: boolean;
|
|
845
|
+
blockSize?: number;
|
|
846
|
+
}): void;
|
|
847
|
+
/**
|
|
848
|
+
* Attempt to acquire the write lock for this CloudContainer. For this to succeed:
|
|
849
|
+
* 1. it must be connected to a `CloudCache`
|
|
850
|
+
* 2. this CloudContainer must have been constructed with `writeable: true`
|
|
851
|
+
* 3. the `accessToken` must authorize write access
|
|
852
|
+
* 4. no other process may be holding an unexpired write lock
|
|
853
|
+
* @throws exception if any of the above conditions fail
|
|
854
|
+
* @note Write locks *expire* after the duration specified in the `durationSeconds` property of the constructor argument, in case a process
|
|
855
|
+
* crashes or otherwise fails to release the lock. Calling `acquireWriteLock` with the lock already held resets the lock duration from the current time,
|
|
856
|
+
* so long running processes should call this method periodically to ensure their lock doesn't expire (they should also make sure their accessToken is refreshed
|
|
857
|
+
* before it expires.)
|
|
858
|
+
* @note on success, the manifest is polled before the promise resolves.
|
|
859
|
+
* @param user An identifier of the process/user locking the CloudContainer. In the event of a write lock
|
|
860
|
+
* collision, this string will be included in the exception string of the *other* process attempting to obtain a write lock.
|
|
861
|
+
*/
|
|
862
|
+
acquireWriteLock(user: string): void;
|
|
863
|
+
/**
|
|
864
|
+
* Release the write lock if it is currently held.
|
|
865
|
+
* @note if there are local changes that have not been uploaded, they are automatically uploaded before the write lock is released.
|
|
866
|
+
* @note if the write lock is not held, this method does nothing.
|
|
867
|
+
*/
|
|
868
|
+
releaseWriteLock(): void;
|
|
869
|
+
/**
|
|
870
|
+
* Destroy any currently valid write lock from this or any other process. This is obviously very dangerous and defeats the purpose of write locking.
|
|
871
|
+
* This method exists only for administrator tools to clear a failed process without waiting for the expiration period. It can also be useful for tests.
|
|
872
|
+
* For this to succeed, all of the conditions of `acquireWriteLock` must be true other than #4.
|
|
873
|
+
*/
|
|
874
|
+
clearWriteLock(): void;
|
|
875
|
+
/**
|
|
876
|
+
* Abandon any local changes in this container. If the write lock is currently held, it is released.
|
|
877
|
+
* This function fails with BE_SQLITE_BUSY if one or more clients have open read or write transactions
|
|
878
|
+
* on any database in the container.
|
|
879
|
+
*/
|
|
880
|
+
abandonChanges(): void;
|
|
881
|
+
/**
|
|
882
|
+
* Connect this CloudContainer to a CloudCache for reading or writing its manifest, write lock, and databases.
|
|
883
|
+
* @note A CloudCache is a local directory holding copies of information from the cloud. Its content is persistent across sessions,
|
|
884
|
+
* but this method must be called each session to (re)establish the connection to the cache. If the CloudCache was previously populated,
|
|
885
|
+
* this method may be called and will succeed *even when offline* or without a valid `accessToken`.
|
|
886
|
+
* @note all operations that access the contents of databases or the manifest require this method be called (`isConnected === true`).
|
|
887
|
+
*/
|
|
888
|
+
connect(cache: CloudCache): void;
|
|
889
|
+
/**
|
|
890
|
+
* Disconnect this CloudContainer from its CloudCache. There must be no open databases from this container. Leaves the container attached to the
|
|
891
|
+
* CloudCache so it is available for future sessions.
|
|
892
|
+
*/
|
|
893
|
+
disconnect(): void;
|
|
894
|
+
/**
|
|
895
|
+
* Permanently Detach and Disconnect this CloudContainer from its CloudCache. There must be no open databases from this container.
|
|
896
|
+
*/
|
|
897
|
+
detach(): void;
|
|
898
|
+
/**
|
|
899
|
+
* Poll cloud storage for changes from other processes. *No changes* made by other processes are visible to
|
|
900
|
+
* this CloudContainer unless/until this method is called.
|
|
901
|
+
* @note this is automatically called whenever the write lock is obtained to ensure all changes are against the latest version.
|
|
902
|
+
*/
|
|
903
|
+
checkForChanges(): void;
|
|
904
|
+
/**
|
|
905
|
+
* Upload any changed blocks from all databases in this CloudContainer.
|
|
906
|
+
* @note this is called automatically from `releaseWriteLock` before the write lock is released. It is only necessary to call this directly if you
|
|
907
|
+
* wish to upload changes while the write lock is still held.
|
|
908
|
+
* @see hasLocalChanges
|
|
909
|
+
*/
|
|
910
|
+
uploadChanges(): Promise<void>;
|
|
911
|
+
/**
|
|
912
|
+
* Clean any unused deleted blocks from cloud storage. When a database is written, a subset of its blocks are replaced
|
|
913
|
+
* by new versions, sometimes leaving the originals unused. In this case, they are not deleted immediately.
|
|
914
|
+
* Instead, they are scheduled for deletion at some later time. Calling this method deletes all blocks in the cloud container
|
|
915
|
+
* for which the scheduled deletion time has passed.
|
|
916
|
+
* @param nSeconds Any block that was marked as unused before this number of seconds ago will be deleted. Specifying a non-zero
|
|
917
|
+
* value gives a period of time for other clients to refresh their manifests and stop using the now-garbage blocks. Otherwise they may get
|
|
918
|
+
* a 404 error. Default is 1 hour.
|
|
919
|
+
*/
|
|
920
|
+
cleanDeletedBlocks(nSeconds?: number): Promise<void>;
|
|
921
|
+
/**
|
|
922
|
+
* Create a copy of an existing database within this CloudContainer with a new name.
|
|
923
|
+
* @note CloudSqlite uses copy-on-write semantics for this operation. That is, this method merely makes a
|
|
924
|
+
* new entry in the manifest with the new name that *shares* all of its blocks with the original database.
|
|
925
|
+
* If either database subsequently changes, the only modified blocks are not shared.
|
|
926
|
+
*/
|
|
927
|
+
copyDatabase(dbName: string, toAlias: string): Promise<void>;
|
|
928
|
+
/** Remove a database from this CloudContainer.
|
|
929
|
+
* @see cleanDeletedBlocks
|
|
930
|
+
*/
|
|
931
|
+
deleteDatabase(dbName: string): Promise<void>;
|
|
932
|
+
/** Get the list of database names in this CloudContainer.
|
|
933
|
+
* @param globArg if present, filter the results with SQLite [GLOB](https://www.sqlite.org/lang_expr.html#glob) operator.
|
|
934
|
+
*/
|
|
935
|
+
queryDatabases(globArg?: string): string[];
|
|
936
|
+
/**
|
|
937
|
+
* Get the status of a specific database in this CloudContainer.
|
|
938
|
+
* @param dbName the name of the database of interest
|
|
939
|
+
*/
|
|
940
|
+
queryDatabase(dbName: string): NativeCloudSqlite.CachedDbProps | undefined;
|
|
941
|
+
/**
|
|
942
|
+
* Get the SHA1 hash of the content of a database.
|
|
943
|
+
* @param dbName the name of the database of interest
|
|
944
|
+
* @note the hash will be empty if the database does not exist
|
|
945
|
+
*/
|
|
946
|
+
queryDatabaseHash(dbName: string): string;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Object to perform an "upload" or "download" of a database to/from a CloudContainer.
|
|
950
|
+
* @note The transfer begins when the object is constructed, and the object remains alive during the upload/download operation.
|
|
951
|
+
* It provides the Promise that is resolved when the operation completes or fails, and has methods to provide feedback for progress and to cancel the operation prematurely.
|
|
952
|
+
*/
|
|
953
|
+
class CloudDbTransfer {
|
|
954
|
+
/** create an instance of a transfer. The operation begins immediately when the object is created.
|
|
955
|
+
* @param direction either "upload" or "download"
|
|
956
|
+
* @param container the container holding the database. Does *not* require that the container be connected to a CloudCache.
|
|
957
|
+
* @param args The properties for the source and target of the transfer.
|
|
958
|
+
*/
|
|
959
|
+
constructor(direction: NativeCloudSqlite.TransferDirection, container: CloudContainer, args: NativeCloudSqlite.TransferDbProps);
|
|
960
|
+
/** Cancel a currently pending transfer and cause the promise to be rejected with a Cancelled status.
|
|
961
|
+
* @throws exception if the operation has already completed.
|
|
962
|
+
*/
|
|
963
|
+
cancelTransfer(): void;
|
|
964
|
+
/** Get the current progress of the transfer.
|
|
965
|
+
* @throws exception if the operation has already completed.
|
|
966
|
+
*/
|
|
967
|
+
getProgress(): {
|
|
968
|
+
loaded: number;
|
|
969
|
+
total: number;
|
|
970
|
+
};
|
|
971
|
+
/** Promise that is resolved when the transfer completes, or is rejected if the transfer fails (or is cancelled.) */
|
|
972
|
+
promise: Promise<void>;
|
|
973
|
+
}
|
|
974
|
+
class CloudPrefetch {
|
|
975
|
+
readonly cloudContainer: CloudContainer;
|
|
976
|
+
readonly dbName: string;
|
|
977
|
+
/** create an instance of a prefetch operation. The operation begins immediately when the object is created.
|
|
978
|
+
* The prefetch will continue in the background until it either finishes, is canceled, or the CloudContainer is disconnected from its CloudCache.
|
|
979
|
+
* @param container the container holding the database.
|
|
980
|
+
* @param dbName the name of the database to prefetch
|
|
981
|
+
*/
|
|
982
|
+
constructor(container: CloudContainer, dbName: string, args?: NativeCloudSqlite.PrefetchProps);
|
|
983
|
+
/** Cancel a currently pending prefetch. The promise will be resolved immediately after this call. */
|
|
984
|
+
cancel(): void;
|
|
985
|
+
/**
|
|
986
|
+
* Promise that is resolved when the prefetch completes or is cancelled. Await this promise to ensure that the
|
|
987
|
+
* database has been fully downloaded before going offline, for example.
|
|
988
|
+
* @returns a Promise that resolves to `true` if the prefetch completed and the entire database is local, or `false` if it was aborted or failed.
|
|
989
|
+
* @note the promise is *not* rejected on `cancel`. Some progress may (or may not) have been made by the request.
|
|
990
|
+
* @note To monitor the progress being made during prefetch, call `CloudContainer.queryDatabase` periodically.
|
|
991
|
+
*/
|
|
992
|
+
promise: Promise<boolean>;
|
|
993
|
+
}
|
|
994
|
+
const enum ECPresentationStatus {
|
|
995
|
+
Success = 0,
|
|
996
|
+
Canceled = 1,
|
|
997
|
+
Pending = 2,
|
|
998
|
+
Error = 65536,
|
|
999
|
+
InvalidArgument = 65537
|
|
1000
|
+
}
|
|
1001
|
+
const enum ECPresentationManagerMode {
|
|
1002
|
+
ReadOnly = "ro",
|
|
1003
|
+
ReadWrite = "rw"
|
|
1004
|
+
}
|
|
1005
|
+
interface ECPresentationMemoryHierarchyCacheConfig {
|
|
1006
|
+
mode: "memory";
|
|
1007
|
+
}
|
|
1008
|
+
interface ECPresentationDiskHierarchyCacheConfig {
|
|
1009
|
+
mode: "disk";
|
|
1010
|
+
directory: string;
|
|
1011
|
+
}
|
|
1012
|
+
interface ECPresentationHybridHierarchyCacheConfig {
|
|
1013
|
+
mode: "hybrid";
|
|
1014
|
+
disk?: ECPresentationDiskHierarchyCacheConfig;
|
|
1015
|
+
}
|
|
1016
|
+
type ECPresentationHierarchyCacheConfig = ECPresentationMemoryHierarchyCacheConfig | ECPresentationDiskHierarchyCacheConfig | ECPresentationHybridHierarchyCacheConfig;
|
|
1017
|
+
type ECPresentationManagerResponse<TResult> = ErrorStatusOrResult<ECPresentationStatus, TResult> & {
|
|
1018
|
+
diagnostics?: any;
|
|
1019
|
+
};
|
|
1020
|
+
interface ECPresentationManagerProps {
|
|
1021
|
+
id: string;
|
|
1022
|
+
taskAllocationsMap: {
|
|
1023
|
+
[priority: number]: number;
|
|
1024
|
+
};
|
|
1025
|
+
defaultFormats: {
|
|
1026
|
+
[phenomenon: string]: {
|
|
1027
|
+
unitSystems: string[];
|
|
1028
|
+
serializedFormat: string;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
mode: ECPresentationManagerMode;
|
|
1032
|
+
isChangeTrackingEnabled: boolean;
|
|
1033
|
+
cacheConfig: ECPresentationHierarchyCacheConfig;
|
|
1034
|
+
useMmap?: boolean | number;
|
|
1035
|
+
}
|
|
1036
|
+
class ECPresentationManager implements IDisposable {
|
|
1037
|
+
constructor(props: ECPresentationManagerProps);
|
|
1038
|
+
forceLoadSchemas(db: DgnDb): Promise<ECPresentationManagerResponse<void>>;
|
|
1039
|
+
setupRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;
|
|
1040
|
+
setupSupplementalRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;
|
|
1041
|
+
setRulesetVariableValue(rulesetId: string, variableId: string, type: string, value: any): ECPresentationManagerResponse<void>;
|
|
1042
|
+
unsetRulesetVariableValue(rulesetId: string, variableId: string): ECPresentationManagerResponse<void>;
|
|
1043
|
+
getRulesetVariableValue(rulesetId: string, variableId: string, type: string): ECPresentationManagerResponse<any>;
|
|
1044
|
+
getRulesets(rulesetId: string): ECPresentationManagerResponse<string>;
|
|
1045
|
+
addRuleset(serializedRuleset: string): ECPresentationManagerResponse<string>;
|
|
1046
|
+
removeRuleset(rulesetId: string, hash: string): ECPresentationManagerResponse<boolean>;
|
|
1047
|
+
clearRulesets(): ECPresentationManagerResponse<void>;
|
|
1048
|
+
handleRequest(db: DgnDb, options: string): {
|
|
1049
|
+
result: Promise<ECPresentationManagerResponse<string>>;
|
|
1050
|
+
cancel: () => void;
|
|
1051
|
+
};
|
|
1052
|
+
getUpdateInfo(): ECPresentationManagerResponse<any>;
|
|
1053
|
+
updateHierarchyState(db: DgnDb, rulesetId: string, changeType: "nodesExpanded" | "nodesCollapsed", serializedKeys: string): ECPresentationManagerResponse<void>;
|
|
1054
|
+
dispose(): void;
|
|
1055
|
+
}
|
|
1056
|
+
namespace ECSchemaXmlContext {
|
|
1057
|
+
interface SchemaKey {
|
|
1058
|
+
name: string;
|
|
1059
|
+
readVersion: number;
|
|
1060
|
+
writeVersion: number;
|
|
1061
|
+
minorVersion: number;
|
|
1062
|
+
}
|
|
1063
|
+
const enum SchemaMatchType {
|
|
1064
|
+
Identical = 0,
|
|
1065
|
+
Exact = 1,
|
|
1066
|
+
LatestWriteCompatible = 2,
|
|
1067
|
+
Latest = 3,
|
|
1068
|
+
LatestReadCompatible = 4
|
|
1069
|
+
}
|
|
1070
|
+
type SchemaLocaterCallback = (key: SchemaKey, matchType: SchemaMatchType) => string | undefined | void;
|
|
1071
|
+
}
|
|
1072
|
+
class ECSchemaXmlContext {
|
|
1073
|
+
constructor();
|
|
1074
|
+
addSchemaPath(path: string): void;
|
|
1075
|
+
setSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;
|
|
1076
|
+
setFirstSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;
|
|
1077
|
+
readSchemaFromXmlFile(filePath: string): ErrorStatusOrResult<BentleyStatus, string>;
|
|
1078
|
+
}
|
|
1079
|
+
class SnapRequest {
|
|
1080
|
+
constructor();
|
|
1081
|
+
doSnap(db: DgnDb, request: any): Promise<any>;
|
|
1082
|
+
cancelSnap(): void;
|
|
1083
|
+
}
|
|
1084
|
+
interface FeatureUserDataKeyValuePair {
|
|
1085
|
+
key: string;
|
|
1086
|
+
value: string;
|
|
1087
|
+
}
|
|
1088
|
+
interface NativeUlasClientFeatureEvent {
|
|
1089
|
+
featureId: string;
|
|
1090
|
+
versionStr: string;
|
|
1091
|
+
projectId?: string;
|
|
1092
|
+
startDateZ?: string;
|
|
1093
|
+
endDateZ?: string;
|
|
1094
|
+
featureUserData?: FeatureUserDataKeyValuePair[];
|
|
1095
|
+
}
|
|
1096
|
+
const enum DbChangeStage {
|
|
1097
|
+
Old = 0,
|
|
1098
|
+
New = 1
|
|
1099
|
+
}
|
|
1100
|
+
const enum DbValueType {
|
|
1101
|
+
IntegerVal = 1,
|
|
1102
|
+
FloatVal = 2,
|
|
1103
|
+
TextVal = 3,
|
|
1104
|
+
BlobVal = 4,
|
|
1105
|
+
NullVal = 5
|
|
1106
|
+
}
|
|
1107
|
+
type ChangeValueType = Uint8Array | number | string | null | undefined;
|
|
1108
|
+
interface ChangedValue {
|
|
1109
|
+
new?: ChangeValueType;
|
|
1110
|
+
old?: ChangeValueType;
|
|
1111
|
+
}
|
|
1112
|
+
class ChangesetReader {
|
|
1113
|
+
close(): DbResult;
|
|
1114
|
+
getColumnCount(): number | undefined;
|
|
1115
|
+
getColumnValue(col: number, stage: DbChangeStage): ChangeValueType;
|
|
1116
|
+
getColumnValueType(col: number, stage: DbChangeStage): DbValueType | undefined;
|
|
1117
|
+
getFileName(): string | undefined;
|
|
1118
|
+
getOpCode(): DbOpcode | undefined;
|
|
1119
|
+
getRow(): ChangedValue[] | undefined;
|
|
1120
|
+
getDdlChanges(): string | undefined;
|
|
1121
|
+
getTableName(): string | undefined;
|
|
1122
|
+
isIndirectChange(): boolean | undefined;
|
|
1123
|
+
isPrimaryKeyColumn(col: number): boolean | undefined;
|
|
1124
|
+
open(fileName: string, invert: boolean): DbResult;
|
|
1125
|
+
reset(): DbResult;
|
|
1126
|
+
step(): DbResult;
|
|
1127
|
+
}
|
|
1128
|
+
class DisableNativeAssertions implements IDisposable {
|
|
1129
|
+
constructor();
|
|
1130
|
+
dispose(): void;
|
|
1131
|
+
}
|
|
1132
|
+
class ImportContext implements IDisposable {
|
|
1133
|
+
constructor(sourceDb: DgnDb, targetDb: DgnDb);
|
|
1134
|
+
dispose(): void;
|
|
1135
|
+
dump(outputFileName: string): BentleyStatus;
|
|
1136
|
+
addClass(sourceClassFullName: string, targetClassFullName: string): BentleyStatus;
|
|
1137
|
+
addCodeSpecId(sourceId: Id64String, targetId: Id64String): BentleyStatus;
|
|
1138
|
+
addElementId(sourceId: Id64String, targetId: Id64String): BentleyStatus;
|
|
1139
|
+
removeElementId(sourceId: Id64String): BentleyStatus;
|
|
1140
|
+
findCodeSpecId(sourceId: Id64String): Id64String;
|
|
1141
|
+
findElementId(sourceId: Id64String): Id64String;
|
|
1142
|
+
cloneElement(sourceId: Id64String, cloneOptions?: CloneElementOptions): ElementProps;
|
|
1143
|
+
importCodeSpec(sourceId: Id64String): Id64String;
|
|
1144
|
+
importFont(sourceId: number): number;
|
|
1145
|
+
hasSubCategoryFilter(): boolean;
|
|
1146
|
+
isSubCategoryFiltered(sourceId: Id64String): boolean;
|
|
1147
|
+
filterSubCategoryId(sourceId: Id64String): BentleyStatus;
|
|
1148
|
+
saveStateToDb(db: SQLiteDb): void;
|
|
1149
|
+
loadStateFromDb(db: SQLiteDb): void;
|
|
1150
|
+
}
|
|
1151
|
+
interface CloneElementOptions {
|
|
1152
|
+
binaryGeometry?: boolean;
|
|
1153
|
+
}
|
|
1154
|
+
interface ChangedInstanceOpsProps {
|
|
1155
|
+
insert?: Id64String[];
|
|
1156
|
+
update?: Id64String[];
|
|
1157
|
+
delete?: Id64String[];
|
|
1158
|
+
}
|
|
1159
|
+
/** The *wire format* of the result returned by DgnDb.extractChangedInstanceIdsFromChangeSets */
|
|
1160
|
+
interface ChangedInstanceIdsProps {
|
|
1161
|
+
codeSpec?: ChangedInstanceOpsProps;
|
|
1162
|
+
model?: ChangedInstanceOpsProps;
|
|
1163
|
+
element?: ChangedInstanceOpsProps;
|
|
1164
|
+
aspect?: ChangedInstanceOpsProps;
|
|
1165
|
+
relationship?: ChangedInstanceOpsProps;
|
|
1166
|
+
font?: ChangedInstanceOpsProps;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Temporary implementation to allow crashing the backend for testing purposes
|
|
1170
|
+
* @internal
|
|
1171
|
+
*/
|
|
1172
|
+
class NativeDevTools {
|
|
1173
|
+
static signal(signalType: number): boolean;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Utilities to encode/decode names to convert them to/from names that comply with EC naming rules
|
|
1177
|
+
*/
|
|
1178
|
+
class ECNameValidation {
|
|
1179
|
+
/**
|
|
1180
|
+
* Encodes names to comply with EC naming rules
|
|
1181
|
+
* @param name Name to be encoded
|
|
1182
|
+
* @returns Encoded name
|
|
1183
|
+
* @param name
|
|
1184
|
+
*/
|
|
1185
|
+
static encodeToValidName(name: string): string;
|
|
1186
|
+
/**
|
|
1187
|
+
* Decodes names that were encoded to comply with EC naming rules
|
|
1188
|
+
* @param encodedName Encoded name
|
|
1189
|
+
* @returns Decoded name
|
|
1190
|
+
*/
|
|
1191
|
+
static decodeFromValidName(encodedName: string): string;
|
|
1192
|
+
}
|
|
1193
|
+
const enum TestWorkerState {
|
|
1194
|
+
NotQueued = 0,
|
|
1195
|
+
Queued = 1,
|
|
1196
|
+
Skipped = 2,
|
|
1197
|
+
Running = 3,
|
|
1198
|
+
Ok = 4,
|
|
1199
|
+
Error = 5,
|
|
1200
|
+
Aborted = 6
|
|
1201
|
+
}
|
|
1202
|
+
class TestWorker {
|
|
1203
|
+
constructor(db: DgnDb);
|
|
1204
|
+
queue(): Promise<void>;
|
|
1205
|
+
cancel(): void;
|
|
1206
|
+
setReady(): void;
|
|
1207
|
+
setThrow(): void;
|
|
1208
|
+
isCanceled(): boolean;
|
|
1209
|
+
wasExecuted(): boolean;
|
|
1210
|
+
getState(): TestWorkerState;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1223
1213
|
//# sourceMappingURL=NativeLibrary.d.ts.map
|