bruce-models 3.5.1 → 3.5.2

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 (37) hide show
  1. package/README.md +31 -0
  2. package/dist/bruce-models.es5.js +232 -216
  3. package/dist/bruce-models.es5.js.map +1 -1
  4. package/dist/bruce-models.umd.js +221 -205
  5. package/dist/bruce-models.umd.js.map +1 -1
  6. package/dist/lib/account/account.js +45 -45
  7. package/dist/lib/account/account.js.map +1 -1
  8. package/dist/lib/ann-document/ann-document.js +28 -28
  9. package/dist/lib/ann-document/ann-document.js.map +1 -1
  10. package/dist/lib/bruce-models.js +2 -1
  11. package/dist/lib/bruce-models.js.map +1 -1
  12. package/dist/lib/client-file/client-file.js +14 -14
  13. package/dist/lib/client-file/client-file.js.map +1 -1
  14. package/dist/lib/custom-form/custom-form.js +31 -31
  15. package/dist/lib/custom-form/custom-form.js.map +1 -1
  16. package/dist/lib/data-lab/data-lab.js.map +1 -1
  17. package/dist/lib/data-source/data-source.js +27 -27
  18. package/dist/lib/data-source/data-source.js.map +1 -1
  19. package/dist/lib/entity/entity-attachment-type.js +28 -28
  20. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  21. package/dist/lib/entity/entity-attachment.js +28 -28
  22. package/dist/lib/entity/entity-attachment.js.map +1 -1
  23. package/dist/lib/entity/entity-attribute.js.map +1 -1
  24. package/dist/lib/entity/entity-tag.js +17 -2
  25. package/dist/lib/entity/entity-tag.js.map +1 -1
  26. package/dist/lib/plugin/plugin.js +32 -32
  27. package/dist/types/account/account.d.ts +47 -47
  28. package/dist/types/ann-document/ann-document.d.ts +42 -42
  29. package/dist/types/bruce-models.d.ts +1 -1
  30. package/dist/types/client-file/client-file.d.ts +11 -11
  31. package/dist/types/custom-form/custom-form.d.ts +22 -22
  32. package/dist/types/data-lab/data-lab.d.ts +4 -4
  33. package/dist/types/data-source/data-source.d.ts +21 -21
  34. package/dist/types/entity/entity-attachment-type.d.ts +22 -22
  35. package/dist/types/entity/entity-attachment.d.ts +22 -22
  36. package/dist/types/entity/entity-attribute.d.ts +9 -9
  37. package/package.json +78 -78
package/README.md CHANGED
@@ -0,0 +1,31 @@
1
+ # bruce-models
2
+
3
+ This is a library which defines data-models for the Nextspace API and provides functions for communicating with the endpoints.
4
+
5
+ <br>
6
+
7
+ ### Local build
8
+
9
+ - `npm i`
10
+
11
+ - `npm run build`
12
+
13
+ <br>
14
+
15
+ ### Running tests
16
+
17
+ - `npm i` (ignore if already run)
18
+
19
+ - `npm run test` (running all tests)
20
+
21
+ - `npx run jest ./test/unit/util` (example for testing just one test folder)
22
+
23
+ <br>
24
+
25
+ ### Publishing new versions
26
+
27
+ - Increase version inside `package.json` and push the change.
28
+
29
+ - Bitbucket will run a build and test step.
30
+
31
+ - Manually click `NPM Release` in Bitbucket Pipelines.
@@ -806,51 +806,6 @@ const ACCOUNT_EXCLUSIONS = ["hyperportal", "hypeportal", "bviewer"];
806
806
  */
807
807
  var Account;
808
808
  (function (Account) {
809
- /**
810
- * Returns cache identifier for an account by ID.
811
- * Example: {
812
- * const api: BruceApi.Api = ...;
813
- * const key = GetCacheKey(1);
814
- * api.Cache.Remove(key);
815
- * }
816
- * @param accountId
817
- * @param appSettingsId
818
- * @returns
819
- */
820
- function GetCacheKey(accountId, appSettingsId) {
821
- if (appSettingsId) {
822
- return Api.ECacheKey.Account + Api.ECacheKey.Id + accountId + Api.ECacheKey + appSettingsId;
823
- }
824
- return Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
825
- }
826
- Account.GetCacheKey = GetCacheKey;
827
- /**
828
- * Returns cache identifier for a list of accounts by session ID.
829
- * Example: {
830
- * const api: BruceApi.Api = ...;
831
- * const key = GetListCacheKey(api.GetSessionId());
832
- * api.Cache.Remove(key);
833
- * }
834
- * @param ssid
835
- * @returns
836
- */
837
- function GetListCacheKey(ssid) {
838
- return Api.ECacheKey.Account + Api.ECacheKey.Session + Api.ECacheKey.Id + ssid;
839
- }
840
- Account.GetListCacheKey = GetListCacheKey;
841
- /**
842
- * Returns cache identifier for a list of database regions.
843
- * Example: {
844
- * const api: BruceApi.Api = ...;
845
- * const key = GetDbRegionListCacheKey();
846
- * api.Cache.Remove(key);
847
- * }
848
- * @returns
849
- */
850
- function GetDbRegionListCacheKey() {
851
- return Api.ECacheKey.DatabaseRegion;
852
- }
853
- Account.GetDbRegionListCacheKey = GetDbRegionListCacheKey;
854
809
  /**
855
810
  * Known Nextspace applications we store settings for.
856
811
  */
@@ -1081,6 +1036,51 @@ var Account;
1081
1036
  });
1082
1037
  }
1083
1038
  Account.Create = Create;
1039
+ /**
1040
+ * Returns cache identifier for an account by ID.
1041
+ * Example: {
1042
+ * const api: BruceApi.Api = ...;
1043
+ * const key = GetCacheKey(1);
1044
+ * api.Cache.Remove(key);
1045
+ * }
1046
+ * @param accountId
1047
+ * @param appSettingsId
1048
+ * @returns
1049
+ */
1050
+ function GetCacheKey(accountId, appSettingsId) {
1051
+ if (appSettingsId) {
1052
+ return Api.ECacheKey.Account + Api.ECacheKey.Id + accountId + Api.ECacheKey + appSettingsId;
1053
+ }
1054
+ return Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
1055
+ }
1056
+ Account.GetCacheKey = GetCacheKey;
1057
+ /**
1058
+ * Returns cache identifier for a list of accounts by session ID.
1059
+ * Example: {
1060
+ * const api: BruceApi.Api = ...;
1061
+ * const key = GetListCacheKey(api.GetSessionId());
1062
+ * api.Cache.Remove(key);
1063
+ * }
1064
+ * @param ssid
1065
+ * @returns
1066
+ */
1067
+ function GetListCacheKey(ssid) {
1068
+ return Api.ECacheKey.Account + Api.ECacheKey.Session + Api.ECacheKey.Id + ssid;
1069
+ }
1070
+ Account.GetListCacheKey = GetListCacheKey;
1071
+ /**
1072
+ * Returns cache identifier for a list of database regions.
1073
+ * Example: {
1074
+ * const api: BruceApi.Api = ...;
1075
+ * const key = GetDbRegionListCacheKey();
1076
+ * api.Cache.Remove(key);
1077
+ * }
1078
+ * @returns
1079
+ */
1080
+ function GetDbRegionListCacheKey() {
1081
+ return Api.ECacheKey.DatabaseRegion;
1082
+ }
1083
+ Account.GetDbRegionListCacheKey = GetDbRegionListCacheKey;
1084
1084
  })(Account || (Account = {}));
1085
1085
 
1086
1086
  /**
@@ -1949,34 +1949,6 @@ var ENVIRONMENT;
1949
1949
  */
1950
1950
  var AnnDocument;
1951
1951
  (function (AnnDocument) {
1952
- /**
1953
- * Returns cache identifier for an annotated document by ID.
1954
- * Example: {
1955
- * const api: BruceApi.Api = ...;
1956
- * const key = GetCacheKey(1);
1957
- * api.Cache.Remove(key);
1958
- * }
1959
- * @param id
1960
- * @returns
1961
- */
1962
- function GetCacheKey(id) {
1963
- return `${Api.ECacheKey.AnnDocument}${Api.ECacheKey.Id}${id}`;
1964
- }
1965
- AnnDocument.GetCacheKey = GetCacheKey;
1966
- /**
1967
- * Returns cache identifier for a list of annotated documents by type.
1968
- * Example: {
1969
- * const api: BruceApi.Api = ...;
1970
- * const key = GetListCacheKey("SVG");
1971
- * api.Cache.Remove(key);
1972
- * }
1973
- * @param type
1974
- * @returns
1975
- */
1976
- function GetListCacheKey(type) {
1977
- return Api.ECacheKey.AnnDocument + type;
1978
- }
1979
- AnnDocument.GetListCacheKey = GetListCacheKey;
1980
1952
  /**
1981
1953
  * The types of supported annotated documents.
1982
1954
  */
@@ -2062,16 +2034,8 @@ var AnnDocument;
2062
2034
  });
2063
2035
  }
2064
2036
  AnnDocument.GetList = GetList;
2065
- })(AnnDocument || (AnnDocument = {}));
2066
-
2067
- /**
2068
- * Describes the "Custom Form" concept within Nextspace.
2069
- * Custom forms are dynamic dialogs that get populated with Entity data.
2070
- */
2071
- var CustomForm;
2072
- (function (CustomForm) {
2073
2037
  /**
2074
- * Returns cache identifier for a Custom Form by ID.
2038
+ * Returns cache identifier for an annotated document by ID.
2075
2039
  * Example: {
2076
2040
  * const api: BruceApi.Api = ...;
2077
2041
  * const key = GetCacheKey(1);
@@ -2081,26 +2045,31 @@ var CustomForm;
2081
2045
  * @returns
2082
2046
  */
2083
2047
  function GetCacheKey(id) {
2084
- return Api.ECacheKey.CustomForm + Api.ECacheKey.Id + id;
2048
+ return `${Api.ECacheKey.AnnDocument}${Api.ECacheKey.Id}${id}`;
2085
2049
  }
2086
- CustomForm.GetCacheKey = GetCacheKey;
2050
+ AnnDocument.GetCacheKey = GetCacheKey;
2087
2051
  /**
2088
- * Returns cache identifier for a list of Custom Forms by Entity Type ID.
2052
+ * Returns cache identifier for a list of annotated documents by type.
2089
2053
  * Example: {
2090
- * const api: BruceApi.Api = ...;
2091
- * const key = GetListCacheKey("123");
2092
- * api.Cache.Remove(key);
2054
+ * const api: BruceApi.Api = ...;
2055
+ * const key = GetListCacheKey("SVG");
2056
+ * api.Cache.Remove(key);
2093
2057
  * }
2094
- * @param typeId
2058
+ * @param type
2095
2059
  * @returns
2096
2060
  */
2097
- function GetListCacheKey(typeId) {
2098
- if (typeId) {
2099
- return Api.ECacheKey.CustomForm + Api.ECacheKey.EntityType + Api.ECacheKey.Id + typeId;
2100
- }
2101
- return Api.ECacheKey.CustomForm;
2061
+ function GetListCacheKey(type) {
2062
+ return Api.ECacheKey.AnnDocument + type;
2102
2063
  }
2103
- CustomForm.GetListCacheKey = GetListCacheKey;
2064
+ AnnDocument.GetListCacheKey = GetListCacheKey;
2065
+ })(AnnDocument || (AnnDocument = {}));
2066
+
2067
+ /**
2068
+ * Describes the "Custom Form" concept within Nextspace.
2069
+ * Custom forms are dynamic dialogs that get populated with Entity data.
2070
+ */
2071
+ var CustomForm;
2072
+ (function (CustomForm) {
2104
2073
  /**
2105
2074
  * Types of custom forms available.
2106
2075
  */
@@ -2221,6 +2190,37 @@ var CustomForm;
2221
2190
  });
2222
2191
  }
2223
2192
  CustomForm.Update = Update;
2193
+ /**
2194
+ * Returns cache identifier for a Custom Form by ID.
2195
+ * Example: {
2196
+ * const api: BruceApi.Api = ...;
2197
+ * const key = GetCacheKey(1);
2198
+ * api.Cache.Remove(key);
2199
+ * }
2200
+ * @param id
2201
+ * @returns
2202
+ */
2203
+ function GetCacheKey(id) {
2204
+ return Api.ECacheKey.CustomForm + Api.ECacheKey.Id + id;
2205
+ }
2206
+ CustomForm.GetCacheKey = GetCacheKey;
2207
+ /**
2208
+ * Returns cache identifier for a list of Custom Forms by Entity Type ID.
2209
+ * Example: {
2210
+ * const api: BruceApi.Api = ...;
2211
+ * const key = GetListCacheKey("123");
2212
+ * api.Cache.Remove(key);
2213
+ * }
2214
+ * @param typeId
2215
+ * @returns
2216
+ */
2217
+ function GetListCacheKey(typeId) {
2218
+ if (typeId) {
2219
+ return Api.ECacheKey.CustomForm + Api.ECacheKey.EntityType + Api.ECacheKey.Id + typeId;
2220
+ }
2221
+ return Api.ECacheKey.CustomForm;
2222
+ }
2223
+ CustomForm.GetListCacheKey = GetListCacheKey;
2224
2224
  })(CustomForm || (CustomForm = {}));
2225
2225
 
2226
2226
  /**
@@ -4491,34 +4491,6 @@ class LRUCache {
4491
4491
  */
4492
4492
  var EntityAttachmentType;
4493
4493
  (function (EntityAttachmentType) {
4494
- /**
4495
- * Returns cache identifier for an attachment type by ID.
4496
- * Example: {
4497
- * const api: BruceApi.Api = ...;
4498
- * const key = GetCacheKey("123");
4499
- * api.Cache.Remove(key);
4500
- * }
4501
- * @param id
4502
- * @returns
4503
- */
4504
- function GetCacheKey(id) {
4505
- return Api.ECacheKey.AttachmentType + Api.ECacheKey.Id + id;
4506
- }
4507
- EntityAttachmentType.GetCacheKey = GetCacheKey;
4508
- /**
4509
- * Returns cache identifier for a list of attachment types.
4510
- * Example: {
4511
- * const api: BruceApi.Api = ...;
4512
- * const key = GetListCacheKey();
4513
- * api.Cache.Remove(key);
4514
- * }
4515
- * @param typeId
4516
- * @returns
4517
- */
4518
- function GetListCacheKey() {
4519
- return Api.ECacheKey.AttachmentType;
4520
- }
4521
- EntityAttachmentType.GetListCacheKey = GetListCacheKey;
4522
4494
  // Known attachment types.
4523
4495
  let EType;
4524
4496
  (function (EType) {
@@ -4603,17 +4575,8 @@ var EntityAttachmentType;
4603
4575
  });
4604
4576
  }
4605
4577
  EntityAttachmentType.GetList = GetList;
4606
- })(EntityAttachmentType || (EntityAttachmentType = {}));
4607
-
4608
- /**
4609
- * Describes the "Entity Attachment" concept within Nextspace.
4610
- * An entity attachment is an arbitrary file record that is linked to an entity record.
4611
- * The same file can be attached to multiple entities.
4612
- */
4613
- var EntityAttachment;
4614
- (function (EntityAttachment) {
4615
4578
  /**
4616
- * Returns cache identifier for an attachment by ID.
4579
+ * Returns cache identifier for an attachment type by ID.
4617
4580
  * Example: {
4618
4581
  * const api: BruceApi.Api = ...;
4619
4582
  * const key = GetCacheKey("123");
@@ -4623,23 +4586,32 @@ var EntityAttachment;
4623
4586
  * @returns
4624
4587
  */
4625
4588
  function GetCacheKey(id) {
4626
- return Api.ECacheKey.Attachment + Api.ECacheKey.Id + id;
4589
+ return Api.ECacheKey.AttachmentType + Api.ECacheKey.Id + id;
4627
4590
  }
4628
- EntityAttachment.GetCacheKey = GetCacheKey;
4591
+ EntityAttachmentType.GetCacheKey = GetCacheKey;
4629
4592
  /**
4630
- * Returns cache identifier for a list of attachments for an entity.
4593
+ * Returns cache identifier for a list of attachment types.
4631
4594
  * Example: {
4632
4595
  * const api: BruceApi.Api = ...;
4633
- * const key = GetListCacheKey("abc");
4596
+ * const key = GetListCacheKey();
4634
4597
  * api.Cache.Remove(key);
4635
4598
  * }
4636
4599
  * @param typeId
4637
4600
  * @returns
4638
4601
  */
4639
- function GetListCacheKey(entityId) {
4640
- return Api.ECacheKey.Attachment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
4602
+ function GetListCacheKey() {
4603
+ return Api.ECacheKey.AttachmentType;
4641
4604
  }
4642
- EntityAttachment.GetListCacheKey = GetListCacheKey;
4605
+ EntityAttachmentType.GetListCacheKey = GetListCacheKey;
4606
+ })(EntityAttachmentType || (EntityAttachmentType = {}));
4607
+
4608
+ /**
4609
+ * Describes the "Entity Attachment" concept within Nextspace.
4610
+ * An entity attachment is an arbitrary file record that is linked to an entity record.
4611
+ * The same file can be attached to multiple entities.
4612
+ */
4613
+ var EntityAttachment;
4614
+ (function (EntityAttachment) {
4643
4615
  /**
4644
4616
  * Updates one or many attachment records.
4645
4617
  * @param params
@@ -4780,6 +4752,34 @@ var EntityAttachment;
4780
4752
  });
4781
4753
  }
4782
4754
  EntityAttachment.Upload = Upload;
4755
+ /**
4756
+ * Returns cache identifier for an attachment by ID.
4757
+ * Example: {
4758
+ * const api: BruceApi.Api = ...;
4759
+ * const key = GetCacheKey("123");
4760
+ * api.Cache.Remove(key);
4761
+ * }
4762
+ * @param id
4763
+ * @returns
4764
+ */
4765
+ function GetCacheKey(id) {
4766
+ return Api.ECacheKey.Attachment + Api.ECacheKey.Id + id;
4767
+ }
4768
+ EntityAttachment.GetCacheKey = GetCacheKey;
4769
+ /**
4770
+ * Returns cache identifier for a list of attachments for an entity.
4771
+ * Example: {
4772
+ * const api: BruceApi.Api = ...;
4773
+ * const key = GetListCacheKey("abc");
4774
+ * api.Cache.Remove(key);
4775
+ * }
4776
+ * @param typeId
4777
+ * @returns
4778
+ */
4779
+ function GetListCacheKey(entityId) {
4780
+ return Api.ECacheKey.Attachment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
4781
+ }
4782
+ EntityAttachment.GetListCacheKey = GetListCacheKey;
4783
4783
  })(EntityAttachment || (EntityAttachment = {}));
4784
4784
 
4785
4785
  /**
@@ -6065,9 +6065,24 @@ var EntityTag;
6065
6065
  const reqs = [];
6066
6066
  for (let i = 0; i < tagIds.length; i++) {
6067
6067
  const tagId = tagIds[i];
6068
- const cache = yield api.GetCacheItem(GetCacheKey(tagId), reqParams);
6068
+ const cache = api.GetCacheItem(GetCacheKey(tagId), reqParams);
6069
6069
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6070
- reqs.push(cache.data);
6070
+ if (cache.data instanceof Promise) {
6071
+ // Request that is in progress.
6072
+ reqs.push(cache.data);
6073
+ }
6074
+ else if (cache.data) {
6075
+ // Direct tag record.
6076
+ if (cache.data.ID) {
6077
+ reqs.push({
6078
+ tag: cache.data
6079
+ });
6080
+ }
6081
+ // Resolved promise. So an object with a "tag" property that contains the record.
6082
+ else {
6083
+ reqs.push(cache.data);
6084
+ }
6085
+ }
6071
6086
  }
6072
6087
  else {
6073
6088
  reqIds.push(tagId);
@@ -6620,20 +6635,6 @@ var Uploader;
6620
6635
  */
6621
6636
  var ClientFile;
6622
6637
  (function (ClientFile) {
6623
- /**
6624
- * Returns cache identifier for a client file by ID.
6625
- * Example: {
6626
- * const api: BruceApi.Api = ...;
6627
- * const key = GetCacheKey("123");
6628
- * api.Cache.Remove(key);
6629
- * }
6630
- * @param fileId
6631
- * @returns
6632
- */
6633
- function GetCacheKey(fileId) {
6634
- return `${Api.ECacheKey.ClientFile}${Api.ECacheKey.Id}${fileId}`;
6635
- }
6636
- ClientFile.GetCacheKey = GetCacheKey;
6637
6638
  let EPurpose;
6638
6639
  (function (EPurpose) {
6639
6640
  // Use this purpose for uploading bookmark thumbnail images.
@@ -6955,6 +6956,20 @@ var ClientFile;
6955
6956
  }
6956
6957
  Processor.ConvertFormat = ConvertFormat;
6957
6958
  })(Processor = ClientFile.Processor || (ClientFile.Processor = {}));
6959
+ /**
6960
+ * Returns cache identifier for a client file by ID.
6961
+ * Example: {
6962
+ * const api: BruceApi.Api = ...;
6963
+ * const key = GetCacheKey("123");
6964
+ * api.Cache.Remove(key);
6965
+ * }
6966
+ * @param fileId
6967
+ * @returns
6968
+ */
6969
+ function GetCacheKey(fileId) {
6970
+ return `${Api.ECacheKey.ClientFile}${Api.ECacheKey.Id}${fileId}`;
6971
+ }
6972
+ ClientFile.GetCacheKey = GetCacheKey;
6958
6973
  })(ClientFile || (ClientFile = {}));
6959
6974
 
6960
6975
  /**
@@ -10617,40 +10632,40 @@ var Plugin;
10617
10632
  window[paramsId] = pluginParams ? pluginParams : {};
10618
10633
  const disposeId = ObjectUtils.UId();
10619
10634
  const elementId = ObjectUtils.UId();
10620
- let script = `
10621
- function run() {
10622
- ${fileContent}
10623
-
10624
- const paramsId = "${paramsId}";
10625
- const containerId = "${containerId}";
10626
- let container;
10627
- if (containerId) {
10628
- container = document.getElementById("${containerId}");
10629
- }
10630
-
10631
- let pluginHTML = null;
10632
- if (container) {
10633
- pluginHTML = document.createElement("div");
10634
- pluginHTML.id = "${elementId}";
10635
- container.appendChild(pluginHTML);
10636
- }
10637
-
10638
- {TEMPLATE_CODE}
10639
- const params = window["${paramsId}"];
10640
-
10641
- window["${disposeId}"] = Run({
10642
- element: pluginHTML,
10643
- container: container,
10644
- pluginParams: params
10645
- });
10646
- }
10647
- run();
10635
+ let script = `
10636
+ function run() {
10637
+ ${fileContent}
10638
+
10639
+ const paramsId = "${paramsId}";
10640
+ const containerId = "${containerId}";
10641
+ let container;
10642
+ if (containerId) {
10643
+ container = document.getElementById("${containerId}");
10644
+ }
10645
+
10646
+ let pluginHTML = null;
10647
+ if (container) {
10648
+ pluginHTML = document.createElement("div");
10649
+ pluginHTML.id = "${elementId}";
10650
+ container.appendChild(pluginHTML);
10651
+ }
10652
+
10653
+ {TEMPLATE_CODE}
10654
+ const params = window["${paramsId}"];
10655
+
10656
+ window["${disposeId}"] = Run({
10657
+ element: pluginHTML,
10658
+ container: container,
10659
+ pluginParams: params
10660
+ });
10661
+ }
10662
+ run();
10648
10663
  `;
10649
10664
  if (script.includes("var template")) {
10650
- script = script.replace("{TEMPLATE_CODE}", `
10651
- if (pluginHTML && template) {
10652
- pluginHTML.innerHTML = template;
10653
- }
10665
+ script = script.replace("{TEMPLATE_CODE}", `
10666
+ if (pluginHTML && template) {
10667
+ pluginHTML.innerHTML = template;
10668
+ }
10654
10669
  `);
10655
10670
  }
10656
10671
  else {
@@ -10679,33 +10694,6 @@ var Plugin;
10679
10694
 
10680
10695
  var DataSource;
10681
10696
  (function (DataSource) {
10682
- /**
10683
- * Returns cache identifier for a data source by ID.
10684
- * Example: {
10685
- * const api: BruceApi.Api = ...;
10686
- * const key = GetCacheKey(1);
10687
- * api.Cache.Remove(key);
10688
- * }
10689
- * @param id
10690
- * @returns
10691
- */
10692
- function GetCacheKey(id) {
10693
- return Api.ECacheKey.DataSource + Api.ECacheKey.Id + id;
10694
- }
10695
- DataSource.GetCacheKey = GetCacheKey;
10696
- /**
10697
- * Returns cache identifier for a list of data sources.
10698
- * Example: {
10699
- * const api: BruceApi.Api = ...;
10700
- * const key = GetListCacheKey();
10701
- * api.Cache.Remove(key);
10702
- * }
10703
- * @returns
10704
- */
10705
- function GetListCacheKey() {
10706
- return Api.ECacheKey.DataSource;
10707
- }
10708
- DataSource.GetListCacheKey = GetListCacheKey;
10709
10697
  // Known data source types.
10710
10698
  let EType;
10711
10699
  (function (EType) {
@@ -10822,9 +10810,37 @@ var DataSource;
10822
10810
  });
10823
10811
  }
10824
10812
  DataSource.GetList = GetList;
10813
+ /**
10814
+ * Returns cache identifier for a data source by ID.
10815
+ * Example: {
10816
+ * const api: BruceApi.Api = ...;
10817
+ * const key = GetCacheKey(1);
10818
+ * api.Cache.Remove(key);
10819
+ * }
10820
+ * @param id
10821
+ * @returns
10822
+ */
10823
+ function GetCacheKey(id) {
10824
+ return Api.ECacheKey.DataSource + Api.ECacheKey.Id + id;
10825
+ }
10826
+ DataSource.GetCacheKey = GetCacheKey;
10827
+ /**
10828
+ * Returns cache identifier for a list of data sources.
10829
+ * Example: {
10830
+ * const api: BruceApi.Api = ...;
10831
+ * const key = GetListCacheKey();
10832
+ * api.Cache.Remove(key);
10833
+ * }
10834
+ * @returns
10835
+ */
10836
+ function GetListCacheKey() {
10837
+ return Api.ECacheKey.DataSource;
10838
+ }
10839
+ DataSource.GetListCacheKey = GetListCacheKey;
10825
10840
  })(DataSource || (DataSource = {}));
10826
10841
 
10827
- const VERSION = "3.5.1";
10842
+ // This is updated with the package.json version on build.
10843
+ const VERSION = "3.5.2";
10828
10844
 
10829
10845
  export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
10830
10846
  //# sourceMappingURL=bruce-models.es5.js.map