bruce-models 0.0.1

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 (197) hide show
  1. package/README.md +0 -0
  2. package/dist/lib/ann-document/ann-document.js +113 -0
  3. package/dist/lib/ann-document/ann-document.js.map +1 -0
  4. package/dist/lib/api/abstract-api.js +229 -0
  5. package/dist/lib/api/abstract-api.js.map +1 -0
  6. package/dist/lib/api/api.js +66 -0
  7. package/dist/lib/api/api.js.map +1 -0
  8. package/dist/lib/api/bruce-api.js +121 -0
  9. package/dist/lib/api/bruce-api.js.map +1 -0
  10. package/dist/lib/api/cam-api.js +120 -0
  11. package/dist/lib/api/cam-api.js.map +1 -0
  12. package/dist/lib/api/global-api.js +119 -0
  13. package/dist/lib/api/global-api.js.map +1 -0
  14. package/dist/lib/api/idm-api.js +120 -0
  15. package/dist/lib/api/idm-api.js.map +1 -0
  16. package/dist/lib/bruce-models.js +72 -0
  17. package/dist/lib/bruce-models.js.map +1 -0
  18. package/dist/lib/calculator/calculator.js +136 -0
  19. package/dist/lib/calculator/calculator.js.map +1 -0
  20. package/dist/lib/common/bounds.js +3 -0
  21. package/dist/lib/common/bounds.js.map +1 -0
  22. package/dist/lib/common/bruce-event.js +45 -0
  23. package/dist/lib/common/bruce-event.js.map +1 -0
  24. package/dist/lib/common/bruce-variable.js +42 -0
  25. package/dist/lib/common/bruce-variable.js.map +1 -0
  26. package/dist/lib/common/cache.js +74 -0
  27. package/dist/lib/common/cache.js.map +1 -0
  28. package/dist/lib/common/camera.js +12 -0
  29. package/dist/lib/common/camera.js.map +1 -0
  30. package/dist/lib/common/cartes.js +30 -0
  31. package/dist/lib/common/cartes.js.map +1 -0
  32. package/dist/lib/common/carto.js +20 -0
  33. package/dist/lib/common/carto.js.map +1 -0
  34. package/dist/lib/common/color.js +82 -0
  35. package/dist/lib/common/color.js.map +1 -0
  36. package/dist/lib/common/delay-queue.js +57 -0
  37. package/dist/lib/common/delay-queue.js.map +1 -0
  38. package/dist/lib/common/dictionary.js +3 -0
  39. package/dist/lib/common/dictionary.js.map +1 -0
  40. package/dist/lib/common/geometry.js +95 -0
  41. package/dist/lib/common/geometry.js.map +1 -0
  42. package/dist/lib/common/transform.js +3 -0
  43. package/dist/lib/common/transform.js.map +1 -0
  44. package/dist/lib/common/utc.js +37 -0
  45. package/dist/lib/common/utc.js.map +1 -0
  46. package/dist/lib/entity/entity-attachment-type.js +132 -0
  47. package/dist/lib/entity/entity-attachment-type.js.map +1 -0
  48. package/dist/lib/entity/entity-attachment.js +204 -0
  49. package/dist/lib/entity/entity-attachment.js.map +1 -0
  50. package/dist/lib/entity/entity-comment.js +129 -0
  51. package/dist/lib/entity/entity-comment.js.map +1 -0
  52. package/dist/lib/entity/entity-link.js +129 -0
  53. package/dist/lib/entity/entity-link.js.map +1 -0
  54. package/dist/lib/entity/entity-lod.js +121 -0
  55. package/dist/lib/entity/entity-lod.js.map +1 -0
  56. package/dist/lib/entity/entity-relation-type.js +147 -0
  57. package/dist/lib/entity/entity-relation-type.js.map +1 -0
  58. package/dist/lib/entity/entity-relation.js +153 -0
  59. package/dist/lib/entity/entity-relation.js.map +1 -0
  60. package/dist/lib/entity/entity-source.js +172 -0
  61. package/dist/lib/entity/entity-source.js.map +1 -0
  62. package/dist/lib/entity/entity-tag.js +223 -0
  63. package/dist/lib/entity/entity-tag.js.map +1 -0
  64. package/dist/lib/entity/entity-type.js +159 -0
  65. package/dist/lib/entity/entity-type.js.map +1 -0
  66. package/dist/lib/entity/entity.js +302 -0
  67. package/dist/lib/entity/entity.js.map +1 -0
  68. package/dist/lib/entity/getters/entity-filter-getter.js +339 -0
  69. package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -0
  70. package/dist/lib/entity/getters/entity-globe.js +131 -0
  71. package/dist/lib/entity/getters/entity-globe.js.map +1 -0
  72. package/dist/lib/entity/getters/view-monitor.js +3 -0
  73. package/dist/lib/entity/getters/view-monitor.js.map +1 -0
  74. package/dist/lib/file/client-file.js +144 -0
  75. package/dist/lib/file/client-file.js.map +1 -0
  76. package/dist/lib/markup/markup.js +38 -0
  77. package/dist/lib/markup/markup.js.map +1 -0
  78. package/dist/lib/program-key/program-key.js +149 -0
  79. package/dist/lib/program-key/program-key.js.map +1 -0
  80. package/dist/lib/project/menu-item-zoom-control.js +14 -0
  81. package/dist/lib/project/menu-item-zoom-control.js.map +1 -0
  82. package/dist/lib/project/menu-item.js +109 -0
  83. package/dist/lib/project/menu-item.js.map +1 -0
  84. package/dist/lib/project/project-view-bookmark.js +151 -0
  85. package/dist/lib/project/project-view-bookmark.js.map +1 -0
  86. package/dist/lib/project/project-view-tile-source.js +114 -0
  87. package/dist/lib/project/project-view-tile-source.js.map +1 -0
  88. package/dist/lib/project/project-view.js +147 -0
  89. package/dist/lib/project/project-view.js.map +1 -0
  90. package/dist/lib/server/pending-action.js +102 -0
  91. package/dist/lib/server/pending-action.js.map +1 -0
  92. package/dist/lib/style/style.js +140 -0
  93. package/dist/lib/style/style.js.map +1 -0
  94. package/dist/lib/tileset/tileset-cad.js +3 -0
  95. package/dist/lib/tileset/tileset-cad.js.map +1 -0
  96. package/dist/lib/tileset/tileset-entities-map-tiles.js +14 -0
  97. package/dist/lib/tileset/tileset-entities-map-tiles.js.map +1 -0
  98. package/dist/lib/tileset/tileset-entities.js +3 -0
  99. package/dist/lib/tileset/tileset-entities.js.map +1 -0
  100. package/dist/lib/tileset/tileset-ext-map-tiles.js +14 -0
  101. package/dist/lib/tileset/tileset-ext-map-tiles.js.map +1 -0
  102. package/dist/lib/tileset/tileset-ext-terrain-tiles.js +3 -0
  103. package/dist/lib/tileset/tileset-ext-terrain-tiles.js.map +1 -0
  104. package/dist/lib/tileset/tileset-map-tiles.js +3 -0
  105. package/dist/lib/tileset/tileset-map-tiles.js.map +1 -0
  106. package/dist/lib/tileset/tileset-pointcloud.js +3 -0
  107. package/dist/lib/tileset/tileset-pointcloud.js.map +1 -0
  108. package/dist/lib/tileset/tileset-terrain-tiles.js +3 -0
  109. package/dist/lib/tileset/tileset-terrain-tiles.js.map +1 -0
  110. package/dist/lib/tileset/tileset.js +388 -0
  111. package/dist/lib/tileset/tileset.js.map +1 -0
  112. package/dist/lib/ucs/ucs.js +131 -0
  113. package/dist/lib/ucs/ucs.js.map +1 -0
  114. package/dist/lib/user/permission.js +21 -0
  115. package/dist/lib/user/permission.js.map +1 -0
  116. package/dist/lib/user/session.js +140 -0
  117. package/dist/lib/user/session.js.map +1 -0
  118. package/dist/lib/user/user-group.js +136 -0
  119. package/dist/lib/user/user-group.js.map +1 -0
  120. package/dist/lib/user/user.js +239 -0
  121. package/dist/lib/user/user.js.map +1 -0
  122. package/dist/lib/util/encrypt-utils.js +21 -0
  123. package/dist/lib/util/encrypt-utils.js.map +1 -0
  124. package/dist/lib/util/math-utils.js +30 -0
  125. package/dist/lib/util/math-utils.js.map +1 -0
  126. package/dist/lib/util/object-utils.js +14 -0
  127. package/dist/lib/util/object-utils.js.map +1 -0
  128. package/dist/lib/util/path-utils.js +59 -0
  129. package/dist/lib/util/path-utils.js.map +1 -0
  130. package/dist/lib/util/url-utils.js +102 -0
  131. package/dist/lib/util/url-utils.js.map +1 -0
  132. package/dist/types/ann-document/ann-document.d.ts +19 -0
  133. package/dist/types/api/abstract-api.d.ts +16 -0
  134. package/dist/types/api/api.d.ts +66 -0
  135. package/dist/types/api/bruce-api.d.ts +14 -0
  136. package/dist/types/api/cam-api.d.ts +13 -0
  137. package/dist/types/api/global-api.d.ts +13 -0
  138. package/dist/types/api/idm-api.d.ts +13 -0
  139. package/dist/types/bruce-models.d.ts +59 -0
  140. package/dist/types/calculator/calculator.d.ts +38 -0
  141. package/dist/types/common/bounds.d.ts +17 -0
  142. package/dist/types/common/bruce-event.d.ts +8 -0
  143. package/dist/types/common/bruce-variable.d.ts +4 -0
  144. package/dist/types/common/cache.d.ts +13 -0
  145. package/dist/types/common/camera.d.ts +6 -0
  146. package/dist/types/common/cartes.d.ts +11 -0
  147. package/dist/types/common/carto.d.ts +8 -0
  148. package/dist/types/common/color.d.ts +19 -0
  149. package/dist/types/common/delay-queue.d.ts +10 -0
  150. package/dist/types/common/dictionary.d.ts +3 -0
  151. package/dist/types/common/geometry.d.ts +14 -0
  152. package/dist/types/common/transform.d.ts +8 -0
  153. package/dist/types/common/utc.d.ts +26 -0
  154. package/dist/types/entity/entity-attachment-type.d.ts +22 -0
  155. package/dist/types/entity/entity-attachment.d.ts +23 -0
  156. package/dist/types/entity/entity-comment.d.ts +18 -0
  157. package/dist/types/entity/entity-link.d.ts +14 -0
  158. package/dist/types/entity/entity-lod.d.ts +31 -0
  159. package/dist/types/entity/entity-relation-type.d.ts +18 -0
  160. package/dist/types/entity/entity-relation.d.ts +24 -0
  161. package/dist/types/entity/entity-source.d.ts +12 -0
  162. package/dist/types/entity/entity-tag.d.ts +18 -0
  163. package/dist/types/entity/entity-type.d.ts +48 -0
  164. package/dist/types/entity/entity.d.ts +51 -0
  165. package/dist/types/entity/getters/entity-filter-getter.d.ts +46 -0
  166. package/dist/types/entity/getters/entity-globe.d.ts +15 -0
  167. package/dist/types/entity/getters/view-monitor.d.ts +13 -0
  168. package/dist/types/file/client-file.d.ts +56 -0
  169. package/dist/types/markup/markup.d.ts +155 -0
  170. package/dist/types/program-key/program-key.d.ts +21 -0
  171. package/dist/types/project/menu-item-zoom-control.d.ts +18 -0
  172. package/dist/types/project/menu-item.d.ts +103 -0
  173. package/dist/types/project/project-view-bookmark.d.ts +41 -0
  174. package/dist/types/project/project-view-tile-source.d.ts +26 -0
  175. package/dist/types/project/project-view.d.ts +58 -0
  176. package/dist/types/server/pending-action.d.ts +33 -0
  177. package/dist/types/style/style.d.ts +32 -0
  178. package/dist/types/tileset/tileset-cad.d.ts +20 -0
  179. package/dist/types/tileset/tileset-entities-map-tiles.d.ts +18 -0
  180. package/dist/types/tileset/tileset-entities.d.ts +14 -0
  181. package/dist/types/tileset/tileset-ext-map-tiles.d.ts +17 -0
  182. package/dist/types/tileset/tileset-ext-terrain-tiles.d.ts +6 -0
  183. package/dist/types/tileset/tileset-map-tiles.d.ts +8 -0
  184. package/dist/types/tileset/tileset-pointcloud.d.ts +15 -0
  185. package/dist/types/tileset/tileset-terrain-tiles.d.ts +6 -0
  186. package/dist/types/tileset/tileset.d.ts +78 -0
  187. package/dist/types/ucs/ucs.d.ts +25 -0
  188. package/dist/types/user/permission.d.ts +15 -0
  189. package/dist/types/user/session.d.ts +26 -0
  190. package/dist/types/user/user-group.d.ts +16 -0
  191. package/dist/types/user/user.d.ts +40 -0
  192. package/dist/types/util/encrypt-utils.d.ts +3 -0
  193. package/dist/types/util/math-utils.d.ts +4 -0
  194. package/dist/types/util/object-utils.d.ts +3 -0
  195. package/dist/types/util/path-utils.d.ts +5 -0
  196. package/dist/types/util/url-utils.d.ts +20 -0
  197. package/package.json +75 -0
@@ -0,0 +1,13 @@
1
+ import { AbstractApi } from "./abstract-api";
2
+ import { Api } from "./api";
3
+ export declare class IdmApi extends AbstractApi {
4
+ private baseUrl;
5
+ private env;
6
+ constructor(env?: Api.Env);
7
+ private setBaseUrl;
8
+ GetBaseUrl(): string;
9
+ GET(url: string, params?: Api.IReqParams): Promise<any>;
10
+ DELETE(url: string, params?: Api.IReqParams): Promise<any>;
11
+ POST(url: string, data: any, params?: Api.IReqParams): Promise<any>;
12
+ UPLOAD(url: string, blob: Blob, params?: Api.IUploadReqParams): Promise<any>;
13
+ }
@@ -0,0 +1,59 @@
1
+ export * from "./ann-document/ann-document";
2
+ export * from "./api/abstract-api";
3
+ export * from "./api/api";
4
+ export * from "./api/bruce-api";
5
+ export * from "./api/cam-api";
6
+ export * from "./api/idm-api";
7
+ export * from "./calculator/calculator";
8
+ export * from "./common/bounds";
9
+ export * from "./common/bruce-event";
10
+ export * from "./common/cache";
11
+ export * from "./common/camera";
12
+ export * from "./common/cartes";
13
+ export * from "./common/carto";
14
+ export * from "./common/color";
15
+ export * from "./common/delay-queue";
16
+ export * from "./common/dictionary";
17
+ export * from "./common/geometry";
18
+ export * from "./common/transform";
19
+ export * from "./common/utc";
20
+ export * from "./entity/entity-attachment-type";
21
+ export * from "./entity/entity-attachment";
22
+ export * from "./entity/entity-comment";
23
+ export * from "./entity/entity-link";
24
+ export * from "./entity/entity-lod";
25
+ export * from "./entity/entity-relation-type";
26
+ export * from "./entity/entity-relation";
27
+ export * from "./entity/entity-source";
28
+ export * from "./entity/entity-tag";
29
+ export * from "./entity/entity-type";
30
+ export * from "./entity/entity";
31
+ export * from "./entity/getters/view-monitor";
32
+ export * from "./entity/getters/entity-globe";
33
+ export * from "./entity/getters/entity-filter-getter";
34
+ export * from "./file/client-file";
35
+ export * from "./program-key/program-key";
36
+ export * from "./project/menu-item-zoom-control";
37
+ export * from "./project/menu-item";
38
+ export * from "./project/project-view-bookmark";
39
+ export * from "./project/project-view";
40
+ export * from "./server/pending-action";
41
+ export * from "./style/style";
42
+ export * from "./tileset/tileset-cad";
43
+ export * from "./tileset/tileset-entities-map-tiles";
44
+ export * from "./tileset/tileset-entities";
45
+ export * from "./tileset/tileset-ext-map-tiles";
46
+ export * from "./tileset/tileset-ext-terrain-tiles";
47
+ export * from "./tileset/tileset-map-tiles";
48
+ export * from "./tileset/tileset-pointcloud";
49
+ export * from "./tileset/tileset-terrain-tiles";
50
+ export * from "./tileset/tileset";
51
+ export * from "./ucs/ucs";
52
+ export * from "./user/permission";
53
+ export * from "./user/session";
54
+ export * from "./user/user-group";
55
+ export * from "./user/user";
56
+ export * from "./util/encrypt-utils";
57
+ export * from "./util/math-utils";
58
+ export * from "./util/object-utils";
59
+ export * from "./util/path-utils";
@@ -0,0 +1,38 @@
1
+ import { Color } from "../common/color";
2
+ import { Entity } from "../entity/entity";
3
+ export declare namespace Calculator {
4
+ enum EValueType {
5
+ Color = 0,
6
+ Input = 1,
7
+ Gradient = 2,
8
+ Mapping = 3,
9
+ TagColor = 4,
10
+ RandomColor = 5
11
+ }
12
+ interface IMappingOption {
13
+ fieldValue: string;
14
+ appliedValue: string;
15
+ }
16
+ interface IMappingValue {
17
+ field: string;
18
+ values: IMappingOption[];
19
+ }
20
+ interface IGradientPoint {
21
+ position: number;
22
+ color: string;
23
+ }
24
+ interface IGradientValue {
25
+ field: string;
26
+ min: number;
27
+ max: number;
28
+ points: IGradientPoint[];
29
+ }
30
+ interface IField {
31
+ value: IGradientValue | IMappingValue | string | number;
32
+ type: EValueType;
33
+ }
34
+ function GetValue(fields: IField[], entity: Entity.IEntity, tags: any[]): string | number | Color.IColor;
35
+ function GetMappingValue(value: IMappingValue, entity: Entity.IEntity): string | number;
36
+ function GetGradientValue(value: IGradientValue, entity: Entity.IEntity): Color.IColor;
37
+ function GetInputValue(value: string, entity: Entity.IEntity): string | number;
38
+ }
@@ -0,0 +1,17 @@
1
+ export declare namespace Bounds {
2
+ interface IBounds {
3
+ maxLatitude: number;
4
+ maxLongitude: number;
5
+ minLatitude: number;
6
+ minLongitude: number;
7
+ maxAltitude: number;
8
+ minAltitude: number;
9
+ }
10
+ interface IReqBounds {
11
+ south: number;
12
+ west: number;
13
+ north: number;
14
+ east: number;
15
+ alt?: number;
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ export declare class BruceEvent<TArgs> {
2
+ private _counter;
3
+ private callbacks;
4
+ Subscribe(callback: (data: TArgs) => void): (() => void);
5
+ Unsubscribe(id: number): void;
6
+ Trigger(data?: TArgs): void;
7
+ Clear(): void;
8
+ }
@@ -0,0 +1,4 @@
1
+ import { Entity } from "../entity/entity";
2
+ export declare namespace BruceVariable {
3
+ function SwapValues(str: string, data: Entity.IEntity, legacyParse?: boolean): string;
4
+ }
@@ -0,0 +1,13 @@
1
+ declare type Key = string | number;
2
+ export declare class CacheControl<T> {
3
+ private data;
4
+ Set(id: Key, data: T, duration?: number): void;
5
+ Get(id: Key): T;
6
+ Clear(): void;
7
+ Remove(id: Key): void;
8
+ RemoveByStartsWith(text: string): void;
9
+ RemoveByContains(text: string): void;
10
+ GetKeys(): string[];
11
+ GetValues(): T[];
12
+ }
13
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare namespace Camera {
2
+ enum EFrustum {
3
+ Perspective = 0,
4
+ Orthographic = 1
5
+ }
6
+ }
@@ -0,0 +1,11 @@
1
+ export declare namespace Cartes {
2
+ interface ICartes2 {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ interface ICartes3 extends ICartes2 {
7
+ z: number;
8
+ }
9
+ function ValidateCartes2(cartes: ICartes2): boolean;
10
+ function ValidateCartes3(cartes: ICartes3): boolean;
11
+ }
@@ -0,0 +1,8 @@
1
+ export declare namespace Carto {
2
+ interface ICarto {
3
+ latitude: number;
4
+ longitude: number;
5
+ altitude: number;
6
+ }
7
+ function ValidateCarto(carto: ICarto): boolean;
8
+ }
@@ -0,0 +1,19 @@
1
+ export declare namespace Color {
2
+ interface IColor {
3
+ red: number;
4
+ green: number;
5
+ blue: number;
6
+ alpha: number;
7
+ }
8
+ enum EBlendMode {
9
+ HIGHLIGHT = 0,
10
+ REPLACE = 1,
11
+ MIX = 2
12
+ }
13
+ interface IBlendSettings {
14
+ blendMode?: EBlendMode;
15
+ blendPercent?: number;
16
+ }
17
+ function RandomColor(): IColor;
18
+ function ColorFromStr(str: string): IColor;
19
+ }
@@ -0,0 +1,10 @@
1
+ export declare class DelayQueue {
2
+ private callback;
3
+ delay: number;
4
+ private lastCallTime;
5
+ private delayTimeout;
6
+ constructor(callback: () => void, delay?: number);
7
+ Call(force?: boolean): void;
8
+ private doCall;
9
+ Dispose(): void;
10
+ }
@@ -0,0 +1,3 @@
1
+ export interface IDictionary<T> {
2
+ [key: string]: T;
3
+ }
@@ -0,0 +1,14 @@
1
+ import { Carto } from "./carto";
2
+ export declare namespace Geometry {
3
+ interface IGeometry {
4
+ Polygon?: any[];
5
+ MultiGeometry?: IGeometry[];
6
+ Point?: string;
7
+ LineString?: string;
8
+ MultiSurface?: string;
9
+ }
10
+ function LineStrFromPoints(points: Carto.ICarto[]): string;
11
+ function RemoveRepeatPoints(positions: Carto.ICarto[]): Carto.ICarto[];
12
+ function ParsePoints(data: string): Carto.ICarto[];
13
+ function ParseGeometry(geometry: any): IGeometry;
14
+ }
@@ -0,0 +1,8 @@
1
+ export declare namespace Transform {
2
+ interface ITransform {
3
+ heading: number;
4
+ pitch: number;
5
+ roll: number;
6
+ scale: number;
7
+ }
8
+ }
@@ -0,0 +1,26 @@
1
+ export declare namespace UTC {
2
+ enum EMonth {
3
+ January = 1,
4
+ February = 2,
5
+ March = 3,
6
+ April = 4,
7
+ May = 5,
8
+ June = 6,
9
+ July = 7,
10
+ August = 8,
11
+ September = 9,
12
+ October = 10,
13
+ November = 11,
14
+ December = 12
15
+ }
16
+ interface IUTC {
17
+ d: number;
18
+ hh: number;
19
+ m: EMonth | number;
20
+ mm: number;
21
+ ss: number;
22
+ y: number;
23
+ }
24
+ function ToDate(utc: IUTC): Date;
25
+ function FromDate(date: Date): IUTC;
26
+ }
@@ -0,0 +1,22 @@
1
+ import { BruceApi } from "../api/bruce-api";
2
+ declare type Type = EntityAttachmentType.EType | string;
3
+ export declare namespace EntityAttachmentType {
4
+ function GetCacheKey(id: Type): string;
5
+ function GetListCacheKey(): string;
6
+ interface IType {
7
+ Description: string;
8
+ ID: string | EType;
9
+ Name: string;
10
+ }
11
+ enum EType {
12
+ Photo = "photo",
13
+ Document = "document",
14
+ Video = "video",
15
+ Drawing = "drawing",
16
+ Model = "model"
17
+ }
18
+ function Delete(api: BruceApi, id: Type): Promise<void>;
19
+ function Update(api: BruceApi, data: IType): Promise<IType>;
20
+ function GetList(api: BruceApi): Promise<IType[]>;
21
+ }
22
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BruceApi } from "../bruce-models";
2
+ import { ClientFile } from "../file/client-file";
3
+ import { EntityAttachmentType } from "./entity-attachment-type";
4
+ declare type Type = EntityAttachmentType.EType | string;
5
+ export declare namespace EntityAttachment {
6
+ function GetCacheKey(entityId: string, typeId: Type, fileId: string): string;
7
+ function GetListCacheKey(entityId: string): string;
8
+ interface IAttachment {
9
+ ClientFile: ClientFile.IClientFile;
10
+ Group: string;
11
+ "ClientFile.ID": string;
12
+ DisplayOrder: number;
13
+ "Entity.ID": string;
14
+ "EntityAttachmentType.ID": Type;
15
+ }
16
+ function Update(api: BruceApi, data: IAttachment): Promise<IAttachment>;
17
+ function UpdateOrder(api: BruceApi, entityId: string, typeId: Type, fileIds: string[]): Promise<void>;
18
+ function Delete(api: BruceApi, data: IAttachment): Promise<void>;
19
+ function DeleteByFileIds(api: BruceApi, entityId: string, typeId: Type, fileIds: string[]): Promise<void>;
20
+ function GetListByEntityId(api: BruceApi, entityId: string): Promise<IAttachment[]>;
21
+ function Upload(api: BruceApi, file: Blob, entityId: string, typeId: Type, onProgress?: (e: ProgressEvent) => void): Promise<IAttachment>;
22
+ }
23
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BruceApi, UTC } from "../bruce-models";
2
+ export declare namespace EntityComment {
3
+ function GetCacheKey(id: number): string;
4
+ function GetListCacheKey(entityId: string): string;
5
+ interface IComment {
6
+ Comment: string;
7
+ "Created.ByUser.ID": string;
8
+ "Created.Date": UTC.IUTC;
9
+ ID: number;
10
+ RepliesCount: number;
11
+ "ReplyTo.Comment.ID": number;
12
+ "TargetObject.ID": string;
13
+ "TargetObject.Type": string;
14
+ }
15
+ function Update(api: BruceApi, data: IComment): Promise<IComment>;
16
+ function Delete(api: BruceApi, entityId: string, commentId: number): Promise<void>;
17
+ function GetListByEntityId(api: BruceApi, entityId: string): Promise<IComment[]>;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { BruceApi } from "../bruce-models";
2
+ export declare namespace EntityLink {
3
+ function GetCacheKey(id: number): string;
4
+ function GetListCacheKey(entityId: string): string;
5
+ interface ILink {
6
+ DisplayName: string;
7
+ ID?: number;
8
+ "Entity.ID": string;
9
+ URL: string;
10
+ }
11
+ function Update(api: BruceApi, data: ILink): Promise<ILink>;
12
+ function Delete(api: BruceApi, entityId: string, linkId: number): Promise<void>;
13
+ function GetListByEntityId(api: BruceApi, entityId: string): Promise<ILink[]>;
14
+ }
@@ -0,0 +1,31 @@
1
+ import { BruceApi } from "../bruce-models";
2
+ export declare namespace EntityLod {
3
+ function GetCacheKey(url: string): string;
4
+ interface ILod {
5
+ "ClientFile.ID": string;
6
+ "Entity.ID": string;
7
+ "LODCategory.Key": string;
8
+ Level: number;
9
+ }
10
+ function GetUrl(api: BruceApi, entityId: string, categoryId: string, level: number, strict?: boolean): string;
11
+ function GetUrlFileId(api: BruceApi, url: string): Promise<string>;
12
+ function GetLods(api: BruceApi, params: Filter.IListParams): Promise<Filter.IListResItem[]>;
13
+ namespace Filter {
14
+ interface IListParamsItem {
15
+ "entityId": string;
16
+ "categoryId": string;
17
+ "group"?: string;
18
+ "level"?: number;
19
+ }
20
+ interface IListParams {
21
+ "strict": boolean;
22
+ "externalSources": boolean;
23
+ "Items": IListParamsItem[];
24
+ }
25
+ interface IListResItem {
26
+ clientFileId: string;
27
+ entityId: string;
28
+ accountId: string;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,18 @@
1
+ import { BruceApi } from "../api/bruce-api";
2
+ export declare namespace EntityRelationType {
3
+ function GetCacheKey(id: string): string;
4
+ function GetListCacheKey(): string;
5
+ interface IType {
6
+ ID: string;
7
+ ForwardName: string;
8
+ ReverseName: string;
9
+ Name: string;
10
+ FlipDisplayDirection?: boolean;
11
+ EntityDisplaySettingID?: string;
12
+ "Relation.EntityType.ID"?: string;
13
+ }
14
+ function Get(api: BruceApi, typeId: string): Promise<IType>;
15
+ function Delete(api: BruceApi, typeId: string): Promise<void>;
16
+ function GetList(api: BruceApi): Promise<IType[]>;
17
+ function Update(api: BruceApi, data: IType): Promise<IType>;
18
+ }
@@ -0,0 +1,24 @@
1
+ import { BruceApi } from "../api/bruce-api";
2
+ import { Entity } from "./entity";
3
+ export declare namespace EntityRelation {
4
+ function GetCacheKey(entityA: string, entityB: string, typeId: string): string;
5
+ function GetEntityCacheKey(entityId: string): string;
6
+ function GetListCacheKey(params: IListParams): string;
7
+ interface IRelation {
8
+ "Principal.Entity.ID": string;
9
+ "Related.Entity.ID": string;
10
+ RelatedEntity?: Entity.IEntity;
11
+ PrincipalEntity?: Entity.IEntity;
12
+ "Relation.Type.ID": string;
13
+ RelationType: any;
14
+ "Data.Entity.ID"?: string;
15
+ }
16
+ interface IListParams {
17
+ typeId?: string;
18
+ oneWayOnly?: boolean;
19
+ loadEntityData?: boolean;
20
+ }
21
+ function Update(api: BruceApi, data: IRelation): Promise<IRelation>;
22
+ function GetList(api: BruceApi, entityId: string, params: IListParams): Promise<IRelation[]>;
23
+ function GetByDataEntityId(api: BruceApi, entityId: string): Promise<IRelation>;
24
+ }
@@ -0,0 +1,12 @@
1
+ import { BruceApi, IDictionary } from "../bruce-models";
2
+ export declare namespace EntitySource {
3
+ function GetCacheKey(sourceId: number, sourceKey: string): string;
4
+ interface ISource {
5
+ "Entity.ID": string;
6
+ "Source.ID": number;
7
+ "SourceRecord.Key": string;
8
+ }
9
+ function Get(api: BruceApi, sourceId: number, sourceKey: string): Promise<ISource>;
10
+ function GetListByKeys(api: BruceApi, sourceId: number, sourceKeys: string[]): Promise<ISource[]>;
11
+ function GetEntityIdsBySourceKeys(api: BruceApi, sourceId: number, sourceKeys: string[]): Promise<IDictionary<string>>;
12
+ }
@@ -0,0 +1,18 @@
1
+ import { BruceApi } from "../api/bruce-api";
2
+ export declare namespace EntityTag {
3
+ function GetCacheKey(tagId: number): string;
4
+ function GetListCacheKey(entityTypeId?: string): string;
5
+ interface ITag {
6
+ ID: number;
7
+ Name?: string;
8
+ Description?: string;
9
+ IsAccessRestricted?: boolean;
10
+ "EntityType.ID"?: string;
11
+ Color?: string;
12
+ }
13
+ function Get(api: BruceApi, tagId: number): Promise<ITag>;
14
+ function GetListByIds(api: BruceApi, tagIds: number[]): Promise<ITag[]>;
15
+ function GetList(api: BruceApi, entityTypeId?: string): Promise<ITag[]>;
16
+ function Delete(api: BruceApi, tagId: number): Promise<void>;
17
+ function Update(api: BruceApi, data: ITag): Promise<ITag>;
18
+ }
@@ -0,0 +1,48 @@
1
+ import { BruceApi } from "../api/bruce-api";
2
+ import { UTC } from "../bruce-models";
3
+ export declare namespace EntityType {
4
+ function GetCacheKey(typeId: string): string;
5
+ function GetListCacheKey(): string;
6
+ interface IEntityType {
7
+ ID?: string;
8
+ IsDeleted?: boolean;
9
+ Name: string;
10
+ Description?: string;
11
+ Data?: any;
12
+ DataSchema?: IAttribute;
13
+ DisplayNameAttributePath?: string;
14
+ "DisplaySetting.ID"?: number;
15
+ AuthoringSettings?: {
16
+ enabledTools: string[];
17
+ defaultTool: string;
18
+ };
19
+ "LastUpdate.Time"?: UTC.IUTC;
20
+ "Parent.EntityType.ID"?: string;
21
+ }
22
+ interface IAttribute {
23
+ Key: string;
24
+ Name?: string;
25
+ Type?: EAttributeType;
26
+ Size?: number;
27
+ IsIndexed?: boolean;
28
+ IsArray?: boolean;
29
+ IsImportant?: boolean;
30
+ Description?: string;
31
+ Structure?: IAttribute[];
32
+ IsFamilyAttribute?: boolean;
33
+ IsFamilyAttributeDefault?: boolean;
34
+ Sources?: string[];
35
+ }
36
+ enum EAttributeType {
37
+ String = "String",
38
+ Double = "Double",
39
+ Integer = "Integer",
40
+ Datetime = "Datetime",
41
+ Structure = "Structure",
42
+ Geometry = "Geometry"
43
+ }
44
+ function Get(api: BruceApi, typeId: string): Promise<IEntityType>;
45
+ function Delete(api: BruceApi, typeId: string): Promise<void>;
46
+ function GetList(api: BruceApi): Promise<IEntityType[]>;
47
+ function Update(api: BruceApi, data: IEntityType): Promise<IEntityType>;
48
+ }
@@ -0,0 +1,51 @@
1
+ import { Api } from "../api/api";
2
+ import { BruceApi } from "../api/bruce-api";
3
+ import { Bounds } from "../common/bounds";
4
+ import { Carto } from "../common/carto";
5
+ import { Geometry } from "../common/geometry";
6
+ import { Transform } from "../common/transform";
7
+ import { UTC } from "../common/utc";
8
+ import { IDictionary } from "../bruce-models";
9
+ declare type _any = any;
10
+ export declare namespace Entity {
11
+ function GetCacheKey(entityId: string): string;
12
+ interface IEntity extends _any {
13
+ Bruce: {
14
+ "CreatedBy.User.ID"?: string;
15
+ CreatedTime?: UTC.IUTC;
16
+ "EntityType.ID": string;
17
+ ID?: string;
18
+ "Layer.ID"?: number[];
19
+ };
20
+ location?: Carto.ICarto;
21
+ boundaries?: Bounds.IBounds;
22
+ transform?: Transform.ITransform;
23
+ position?: number[][];
24
+ geometry?: Geometry.IGeometry;
25
+ }
26
+ function Get(api: BruceApi, entityId: string): Promise<IEntity>;
27
+ function GetListByIds(api: BruceApi, entityIds: string[]): Promise<IEntity[]>;
28
+ function Delete(api: BruceApi, entityId: string): Promise<void>;
29
+ function Update(api: BruceApi, data: IEntity, override: boolean): Promise<IEntity>;
30
+ function RemoveTag(data: IEntity, tagId: number): void;
31
+ function AddTag(data: IEntity, tagId: number): void;
32
+ function SetValue(data: IEntity, path: string[], value: any): void;
33
+ function GetValue(data: IEntity, path: string[]): any;
34
+ namespace Filter {
35
+ namespace V1 {
36
+ interface IFilter {
37
+ orderBy?: any;
38
+ entityTypeId?: string;
39
+ layerIds?: number[];
40
+ bounds?: Bounds.IReqBounds;
41
+ pageSize?: number;
42
+ pageIndex?: number;
43
+ lodCategoryId?: string;
44
+ sortOrder?: Api.ESortOrder;
45
+ entityTypeConditions?: IDictionary<any>;
46
+ }
47
+ function GetList(api: BruceApi, filter: IFilter): Promise<IEntity[]>;
48
+ }
49
+ }
50
+ }
51
+ export {};
@@ -0,0 +1,46 @@
1
+ import { BruceApi } from "../../api/bruce-api";
2
+ import { BruceEvent } from "../../common/bruce-event";
3
+ import { IDictionary } from "../../common/dictionary";
4
+ import { Entity } from "../entity";
5
+ import { ViewMonitor } from "./view-monitor";
6
+ export declare namespace EntityFilterGetter {
7
+ enum EStatus {
8
+ Scanning = "SCANNING",
9
+ Loading = "LOADING"
10
+ }
11
+ interface IStatusUpdate {
12
+ msg: EStatus;
13
+ revoking: boolean;
14
+ }
15
+ class Getter {
16
+ private onUpdate;
17
+ get OnUpdate(): BruceEvent<Entity.IEntity[]>;
18
+ LastStateUpdates: IDictionary<IStatusUpdate>;
19
+ private onStateUpdate;
20
+ get OnStateUpdate(): BruceEvent<IStatusUpdate>;
21
+ private api;
22
+ private viewPort;
23
+ private viewPortChangeRemoval;
24
+ private cells;
25
+ private registeredItems;
26
+ private getterLoopId;
27
+ private typeId;
28
+ private batchSize;
29
+ private tagIds;
30
+ private minHeight;
31
+ private maxHeight;
32
+ private attrFilter;
33
+ private viewRect;
34
+ private viewCenter;
35
+ constructor(api: BruceApi, viewPort: ViewMonitor.IMonitor, typeId: string, batchSize: number, attrFilter: IDictionary<any>);
36
+ private viewAreaSub;
37
+ private viewAreaDispose;
38
+ GetMenuItems(): string[];
39
+ IncludeMenuItem(menuItemId: string, layerIds: number[], minHeight: number, maxHeight: number): void;
40
+ ExcludeMenuItem(menuItemId: string): void;
41
+ private updateBounds;
42
+ private updateState;
43
+ private postStatus;
44
+ private startGetterLoop;
45
+ }
46
+ }
@@ -0,0 +1,15 @@
1
+ import { Bounds } from "../../bruce-models";
2
+ declare class Cell {
3
+ Fetched: boolean;
4
+ IsFetched: () => boolean;
5
+ FetchPageIndex: number;
6
+ Boundaries: Bounds.IBounds;
7
+ GetBounds(): Bounds.IReqBounds;
8
+ }
9
+ export declare namespace EntityGlobe {
10
+ class Grid {
11
+ private cells;
12
+ GetCellsForView(viewRect: Bounds.IReqBounds): Cell[];
13
+ }
14
+ }
15
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Bounds, BruceEvent, Carto } from "../../bruce-models";
2
+ export declare namespace ViewMonitor {
3
+ interface IArea {
4
+ area: Bounds.IReqBounds;
5
+ poi: Carto.ICarto;
6
+ }
7
+ interface IMonitor {
8
+ Updated(): BruceEvent<IArea>;
9
+ GetArea(): Bounds.IReqBounds;
10
+ GetTarget(): Carto.ICarto;
11
+ DoUpdate(): void;
12
+ }
13
+ }