@esri/hub-common 14.169.0 → 14.170.0

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 (139) hide show
  1. package/dist/esm/content/_internal/ContentBusinessRules.js +6 -0
  2. package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
  3. package/dist/esm/core/_internal/getBasePropertyMap.js +1 -1
  4. package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -1
  5. package/dist/esm/core/types/IHubProject.js.map +1 -1
  6. package/dist/esm/discussions/defaults.js +2 -0
  7. package/dist/esm/discussions/defaults.js.map +1 -1
  8. package/dist/esm/events/defaults.js +1 -1
  9. package/dist/esm/events/defaults.js.map +1 -1
  10. package/dist/esm/index.js +5 -0
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/initiatives/defaults.js +2 -0
  13. package/dist/esm/initiatives/defaults.js.map +1 -1
  14. package/dist/esm/permissions/HubPermissionPolicies.js +4 -0
  15. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  16. package/dist/esm/permissions/checkPermission.js +16 -14
  17. package/dist/esm/permissions/checkPermission.js.map +1 -1
  18. package/dist/esm/permissions/types/Permission.js +1 -0
  19. package/dist/esm/permissions/types/Permission.js.map +1 -1
  20. package/dist/esm/projects/defaults.js +2 -0
  21. package/dist/esm/projects/defaults.js.map +1 -1
  22. package/dist/esm/search/Catalog.js +85 -54
  23. package/dist/esm/search/Catalog.js.map +1 -1
  24. package/dist/esm/search/_internal/getCatalogGroups.js +51 -0
  25. package/dist/esm/search/_internal/getCatalogGroups.js.map +1 -0
  26. package/dist/esm/search/_internal/getEntityTypeFromType.js +1 -1
  27. package/dist/esm/search/_internal/getUserGroupsFromQuery.js +46 -0
  28. package/dist/esm/search/_internal/getUserGroupsFromQuery.js.map +1 -0
  29. package/dist/esm/search/_internal/getWorkflowForType.js +211 -0
  30. package/dist/esm/search/_internal/getWorkflowForType.js.map +1 -0
  31. package/dist/esm/search/_internal/index.js +2 -0
  32. package/dist/esm/search/_internal/index.js.map +1 -1
  33. package/dist/esm/search/_internal/negateGroupPredicates.js +2 -2
  34. package/dist/esm/search/_internal/negateGroupPredicates.js.map +1 -1
  35. package/dist/esm/search/_internal/portalSearchItems.js +12 -2
  36. package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
  37. package/dist/esm/search/getAddContentConfig.js +230 -0
  38. package/dist/esm/search/getAddContentConfig.js.map +1 -0
  39. package/dist/esm/search/getPredicateValues.js +32 -0
  40. package/dist/esm/search/getPredicateValues.js.map +1 -0
  41. package/dist/esm/search/searchCatalogs.js +66 -0
  42. package/dist/esm/search/searchCatalogs.js.map +1 -0
  43. package/dist/esm/search/searchEntityCatalogs.js +19 -0
  44. package/dist/esm/search/searchEntityCatalogs.js.map +1 -0
  45. package/dist/esm/search/serializeQueryForPortal.js +4 -4
  46. package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
  47. package/dist/esm/search/types/AddContentWorkflowTypes.js +1 -0
  48. package/dist/esm/search/types/AddContentWorkflowTypes.js.map +1 -0
  49. package/dist/esm/search/types/IGroupsByMembership.js +4 -0
  50. package/dist/esm/search/types/IGroupsByMembership.js.map +1 -0
  51. package/dist/esm/search/types/index.js +1 -1
  52. package/dist/esm/search/types/index.js.map +1 -1
  53. package/dist/esm/sites/defaults.js +2 -0
  54. package/dist/esm/sites/defaults.js.map +1 -1
  55. package/dist/node/content/_internal/ContentBusinessRules.js +6 -0
  56. package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
  57. package/dist/node/core/_internal/getBasePropertyMap.js +1 -1
  58. package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -1
  59. package/dist/node/core/types/IHubProject.js.map +1 -1
  60. package/dist/node/discussions/defaults.js +2 -0
  61. package/dist/node/discussions/defaults.js.map +1 -1
  62. package/dist/node/events/defaults.js +1 -1
  63. package/dist/node/events/defaults.js.map +1 -1
  64. package/dist/node/index.js +5 -0
  65. package/dist/node/index.js.map +1 -1
  66. package/dist/node/initiatives/defaults.js +2 -0
  67. package/dist/node/initiatives/defaults.js.map +1 -1
  68. package/dist/node/permissions/HubPermissionPolicies.js +4 -0
  69. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  70. package/dist/node/permissions/checkPermission.js +16 -14
  71. package/dist/node/permissions/checkPermission.js.map +1 -1
  72. package/dist/node/permissions/types/Permission.js +1 -0
  73. package/dist/node/permissions/types/Permission.js.map +1 -1
  74. package/dist/node/projects/defaults.js +2 -0
  75. package/dist/node/projects/defaults.js.map +1 -1
  76. package/dist/node/search/Catalog.js +85 -54
  77. package/dist/node/search/Catalog.js.map +1 -1
  78. package/dist/node/search/_internal/getCatalogGroups.js +55 -0
  79. package/dist/node/search/_internal/getCatalogGroups.js.map +1 -0
  80. package/dist/node/search/_internal/getEntityTypeFromType.js +1 -1
  81. package/dist/node/search/_internal/getUserGroupsFromQuery.js +50 -0
  82. package/dist/node/search/_internal/getUserGroupsFromQuery.js.map +1 -0
  83. package/dist/node/search/_internal/getWorkflowForType.js +216 -0
  84. package/dist/node/search/_internal/getWorkflowForType.js.map +1 -0
  85. package/dist/node/search/_internal/index.js +2 -0
  86. package/dist/node/search/_internal/index.js.map +1 -1
  87. package/dist/node/search/_internal/negateGroupPredicates.js +1 -1
  88. package/dist/node/search/_internal/negateGroupPredicates.js.map +1 -1
  89. package/dist/node/search/_internal/portalSearchItems.js +15 -4
  90. package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
  91. package/dist/node/search/getAddContentConfig.js +234 -0
  92. package/dist/node/search/getAddContentConfig.js.map +1 -0
  93. package/dist/node/search/getPredicateValues.js +36 -0
  94. package/dist/node/search/getPredicateValues.js.map +1 -0
  95. package/dist/node/search/searchCatalogs.js +70 -0
  96. package/dist/node/search/searchCatalogs.js.map +1 -0
  97. package/dist/node/search/searchEntityCatalogs.js +23 -0
  98. package/dist/node/search/searchEntityCatalogs.js.map +1 -0
  99. package/dist/node/search/serializeQueryForPortal.js +4 -4
  100. package/dist/node/search/serializeQueryForPortal.js.map +1 -1
  101. package/dist/node/search/types/{ISearchResponseHash.js → AddContentWorkflowTypes.js} +1 -1
  102. package/dist/node/search/types/AddContentWorkflowTypes.js.map +1 -0
  103. package/dist/node/search/types/IGroupsByMembership.js +6 -0
  104. package/dist/node/search/types/IGroupsByMembership.js.map +1 -0
  105. package/dist/node/search/types/index.js +1 -1
  106. package/dist/node/search/types/index.js.map +1 -1
  107. package/dist/node/sites/defaults.js +2 -0
  108. package/dist/node/sites/defaults.js.map +1 -1
  109. package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
  110. package/dist/types/core/traits/IWithCatalog.d.ts +9 -0
  111. package/dist/types/core/types/IHubDiscussion.d.ts +4 -2
  112. package/dist/types/core/types/IHubEvent.d.ts +4 -2
  113. package/dist/types/core/types/IHubInitiative.d.ts +5 -2
  114. package/dist/types/core/types/IHubItemEntity.d.ts +3 -1
  115. package/dist/types/core/types/IHubProject.d.ts +3 -2
  116. package/dist/types/core/types/IHubSite.d.ts +6 -2
  117. package/dist/types/index.d.ts +5 -0
  118. package/dist/types/search/Catalog.d.ts +15 -12
  119. package/dist/types/search/_internal/getCatalogGroups.d.ts +11 -0
  120. package/dist/types/search/_internal/getEntityTypeFromType.d.ts +1 -1
  121. package/dist/types/search/_internal/getUserGroupsFromQuery.d.ts +13 -0
  122. package/dist/types/search/_internal/getWorkflowForType.d.ts +61 -0
  123. package/dist/types/search/_internal/index.d.ts +2 -0
  124. package/dist/types/search/_internal/portalSearchItems.d.ts +7 -0
  125. package/dist/types/search/getAddContentConfig.d.ts +11 -0
  126. package/dist/types/search/getPredicateValues.d.ts +8 -0
  127. package/dist/types/search/searchCatalogs.d.ts +15 -0
  128. package/dist/types/search/searchEntityCatalogs.d.ts +15 -0
  129. package/dist/types/search/types/AddContentWorkflowTypes.d.ts +36 -0
  130. package/dist/types/search/types/IGroupsByMembership.d.ts +22 -0
  131. package/dist/types/search/types/IHubCatalog.d.ts +14 -0
  132. package/dist/types/search/types/IHubSearchOptions.d.ts +29 -17
  133. package/dist/types/search/types/index.d.ts +1 -1
  134. package/dist/types/search/types/types.d.ts +16 -0
  135. package/package.json +1 -1
  136. package/dist/esm/search/types/ISearchResponseHash.js +0 -1
  137. package/dist/esm/search/types/ISearchResponseHash.js.map +0 -1
  138. package/dist/node/search/types/ISearchResponseHash.js.map +0 -1
  139. package/dist/types/search/types/ISearchResponseHash.d.ts +0 -7
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchCatalogs = void 0;
4
+ const Catalog_1 = require("./Catalog");
5
+ const util_1 = require("../util");
6
+ const map_by_1 = require("../utils/map-by");
7
+ /**
8
+ * Given an array of catalog json objects, execute a search on all the collections
9
+ * in all the catalogs. If a scope exists without any associated collections in the catalog,
10
+ * the scope will be searched as well.
11
+ * If passed an IQuery, only collections using the same targetEntity will be searched
12
+ * If passed a string, a query will be executed on all collections in all catalogs
13
+ * @param catalogs
14
+ * @param query - string or IQuery
15
+ * @param options - IPagingOptions & ISortOptions - only num is used
16
+ * @param context
17
+ * @returns
18
+ */
19
+ async function searchCatalogs(catalogs, query, options, context) {
20
+ // instantiate Catalog instances
21
+ const instances = catalogs.map((catalog) => Catalog_1.Catalog.fromJson(catalog, context));
22
+ // Behavior:
23
+ // Query all the collections in all the catalogs
24
+ // if there is a scope which does not have a collection, query the scope
25
+ const promises = instances.map(async (cat) => {
26
+ // search the collections
27
+ const collectionPromise = cat
28
+ .searchCollections(query, options)
29
+ .then((response) => {
30
+ return {
31
+ catalogTitle: cat.title,
32
+ collectionResults: response,
33
+ };
34
+ });
35
+ const promiseArray = [collectionPromise];
36
+ // for this catalog, get a list of the unique targetEntities from the collections
37
+ const collectionTargets = map_by_1.mapBy("targetEntity", cat.collections).filter(util_1.unique);
38
+ // Now, find the catalog scopes that do not have entries in the collectionTargets
39
+ // leaving the scopes that need to be directly queries
40
+ const scopesToQuery = cat.availableScopes.filter((scope) => !collectionTargets.includes(scope));
41
+ // if there are scopes to query, query them
42
+ if (scopesToQuery.length) {
43
+ const scopePromise = cat
44
+ .searchScopes(query, options, scopesToQuery)
45
+ .then((response) => {
46
+ // convert the response to a hash
47
+ return {
48
+ catalogTitle: `${cat.title}`,
49
+ scopeResults: response,
50
+ };
51
+ });
52
+ promiseArray.push(scopePromise);
53
+ }
54
+ return await Promise.all(promiseArray).then((responses) => {
55
+ // merge into a single response
56
+ return responses.reduce((acc, response) => {
57
+ return {
58
+ catalogTitle: response.catalogTitle,
59
+ collectionResults: Object.assign(Object.assign({}, acc.collectionResults), response.collectionResults),
60
+ scopeResults: Object.assign(Object.assign({}, acc.scopeResults), response.scopeResults),
61
+ };
62
+ }, {});
63
+ });
64
+ });
65
+ // return the results
66
+ // each catalog will have a single ICatalogSearchResponse
67
+ return Promise.all(promises);
68
+ }
69
+ exports.searchCatalogs = searchCatalogs;
70
+ //# sourceMappingURL=searchCatalogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchCatalogs.js","sourceRoot":"","sources":["../../../src/search/searchCatalogs.ts"],"names":[],"mappings":";;;AACA,uCAAoC;AAQpC,kCAAiC;AACjC,4CAAwC;AAExC;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,cAAc,CAClC,QAAuB,EACvB,KAAsB,EACtB,OAAsC,EACtC,OAAuB;IAEvB,gCAAgC;IAChC,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CACzC,iBAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CACnC,CAAC;IAEF,YAAY;IACZ,gDAAgD;IAChD,wEAAwE;IACxE,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC3C,yBAAyB;QACzB,MAAM,iBAAiB,GAAG,GAAG;aAC1B,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC;aACjC,IAAI,CAAC,CAAC,QAA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,CACzB;iBACwB,CAAC;YAC9B,CAAC,EAAE,EAA4B,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,qBAAqB;IACrB,yDAAyD;IACzD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AArED,wCAqEC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchEntityCatalogs = void 0;
4
+ const get_with_default_1 = require("../objects/get-with-default");
5
+ const searchCatalogs_1 = require("./searchCatalogs");
6
+ /**
7
+ * Given an entity, execute a search on all the catalogs, and their associated with the entity
8
+ * If the entity has no catalogs, an empty array is returned
9
+ * If passed an IQuery, only collections using the same targetEntity will be searched
10
+ * If passed a string, a query will be executed on all collections in all catalogs
11
+ * @param entity
12
+ * @param query - string or IQuery
13
+ * @param options - IPagingOptions & ISortOptions - only num is used
14
+ * @param context
15
+ * @returns
16
+ */
17
+ async function searchEntityCatalogs(entity, query, options, context) {
18
+ // collect all the catalogs from the entity, and search them
19
+ const catalogs = get_with_default_1.getWithDefault(entity, "catalogs", []);
20
+ return searchCatalogs_1.searchCatalogs(catalogs, query, options, context);
21
+ }
22
+ exports.searchEntityCatalogs = searchEntityCatalogs;
23
+ //# sourceMappingURL=searchEntityCatalogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchEntityCatalogs.js","sourceRoot":"","sources":["../../../src/search/searchEntityCatalogs.ts"],"names":[],"mappings":";;;AAEA,kEAA6D;AAC7D,qDAAkD;AASlD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB,CACxC,MAAiB,EACjB,KAAsB,EACtB,OAAsC,EACtC,OAAuB;IAEvB,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,iCAAc,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAkB,CAAC;IACzE,OAAO,+BAAc,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AATD,oDASC"}
@@ -189,15 +189,15 @@ function serializePredicate(predicate) {
189
189
  */
190
190
  function serializeMatchOptions(key, value) {
191
191
  let result = "";
192
- if (value.any) {
192
+ if (value.any && value.any.length) {
193
193
  result = `${serializeStringOrArray("OR", key, value.any)}`;
194
194
  }
195
- if (value.all) {
195
+ if (value.all && value.not.length) {
196
196
  result =
197
197
  (result ? result + " AND " : "") +
198
198
  `${serializeStringOrArray("AND", key, value.all)}`;
199
199
  }
200
- if (value.not) {
200
+ if (value.not && value.not.length) {
201
201
  // negate the entries if they are not
202
202
  result =
203
203
  (result ? result + " AND " : "") +
@@ -223,7 +223,7 @@ function serializeRange(key, range) {
223
223
  */
224
224
  function serializeStringOrArray(join, key, value) {
225
225
  let q = "";
226
- if (Array.isArray(value)) {
226
+ if (Array.isArray(value) && value.length) {
227
227
  q = `${key}:"${value.join(`" ${join} ${key}:"`)}"`;
228
228
  if (value.length > 1) {
229
229
  q = `(${q})`;
@@ -1 +1 @@
1
- {"version":3,"file":"serializeQueryForPortal.js","sourceRoot":"","sources":["../../../src/search/serializeQueryForPortal.ts"],"names":[],"mappings":";;;AAQA,yFAAsF;AACtF,iEAA8D;AAE9D;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,KAAa;IACnD,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC/D,2BAA2B;IAC3B,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,kBAAkB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAE1D,MAAM,aAAa,GAAG,2CAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAClE,IAAI,aAAa,EAAE;QACjB,MAAM,CAAC,MAAM,GAAG,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE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,GAAG,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,sBAAsB,CAC7B,IAAkB,EAClB,GAAW,EACX,KAAwB;IAExB,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,CAAC,GAAG,GAAG,GAAG,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QACnD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACpB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;SACd;KACF;SAAM;QACL,CAAC,GAAG,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC;KACzB;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAU;IACzB,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC,CACjE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"serializeQueryForPortal.js","sourceRoot":"","sources":["../../../src/search/serializeQueryForPortal.ts"],"names":[],"mappings":";;;AAQA,yFAAsF;AACtF,iEAA8D;AAE9D;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,KAAa;IACnD,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC/D,2BAA2B;IAC3B,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,kBAAkB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAE1D,MAAM,aAAa,GAAG,2CAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,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AAG,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;KAC3D;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,KAAyB;IAC5D,OAAO,GAAG,GAAG,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,EAAE,GAAG,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,sBAAsB,CAC7B,IAAkB,EAClB,GAAW,EACX,KAAwB;IAExB,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE;QACxC,CAAC,GAAG,GAAG,GAAG,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QACnD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACpB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;SACd;KACF;SAAM;QACL,CAAC,GAAG,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC;KACzB;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAU;IACzB,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC,CACjE,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISearchResponseHash.js.map
3
+ //# sourceMappingURL=AddContentWorkflowTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddContentWorkflowTypes.js","sourceRoot":"","sources":["../../../../src/search/types/AddContentWorkflowTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Arrays of groupId's, based on the user's membership in the group
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=IGroupsByMembership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGroupsByMembership.js","sourceRoot":"","sources":["../../../../src/search/types/IGroupsByMembership.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -7,5 +7,5 @@ tslib_1.__exportStar(require("./IHubSearchResult"), exports);
7
7
  tslib_1.__exportStar(require("./IHubSearchResponse"), exports);
8
8
  tslib_1.__exportStar(require("./types"), exports);
9
9
  tslib_1.__exportStar(require("./IHubCatalog"), exports);
10
- tslib_1.__exportStar(require("./ISearchResponseHash"), exports);
10
+ tslib_1.__exportStar(require("./AddContentWorkflowTypes"), exports);
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAElC,8DAAoC;AACpC,6DAAmC;AACnC,+DAAqC;AACrC,kDAAwB;AACxB,wDAA8B;AAC9B,gEAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,8DAAoC;AACpC,6DAAmC;AACnC,+DAAqC;AACrC,kDAAwB;AACxB,wDAA8B;AAC9B,oEAA0C"}
@@ -12,6 +12,7 @@ exports.DEFAULT_SITE = {
12
12
  typeKeywords: ["Hub Site", "hubSite"],
13
13
  catalog: { schemaVersion: 0 },
14
14
  permissions: [],
15
+ catalogs: [],
15
16
  schemaVersion: 1,
16
17
  features: SiteBusinessRules_1.SiteDefaultFeatures,
17
18
  };
@@ -32,6 +33,7 @@ exports.DEFAULT_SITE_MODEL = {
32
33
  },
33
34
  },
34
35
  data: {
36
+ catalogs: [],
35
37
  layout: {},
36
38
  },
37
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/sites/defaults.ts"],"names":[],"mappings":";;;AAEA,qEAAoE;AAEvD,QAAA,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD;;GAEG;AACU,QAAA,YAAY,GAAsB;IAC7C,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,YAAY,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;IACrC,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;IAC7B,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,uCAAmB;CAC9B,CAAC;AAEF;;GAEG;AACU,QAAA,kBAAkB,GAAW;IACxC,IAAI,EAAE;QACJ,IAAI,EAAE,0BAAkB;QACxB,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,YAAY,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACrC,UAAU,EAAE;YACV,IAAI,EAAE,EAAE;YACR,aAAa,EAAE,CAAC;SACjB;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,EAAE;KACX;CACmB,CAAC"}
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/sites/defaults.ts"],"names":[],"mappings":";;;AAEA,qEAAoE;AAEvD,QAAA,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD;;GAEG;AACU,QAAA,YAAY,GAAsB;IAC7C,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,YAAY,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;IACrC,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;IAC7B,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,uCAAmB;CAC9B,CAAC;AAEF;;GAEG;AACU,QAAA,kBAAkB,GAAW;IACxC,IAAI,EAAE;QACJ,IAAI,EAAE,0BAAkB;QACxB,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,YAAY,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACrC,UAAU,EAAE;YACV,IAAI,EAAE,EAAE;YACR,aAAa,EAAE,CAAC;SACjB;KACF;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;KACX;CACmB,CAAC"}
@@ -8,7 +8,7 @@ export declare const ContentDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "temp:hub:content:downloads:unifiedList"];
11
+ export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "temp:hub:content:downloads:unifiedList", "hub:content:document:create"];
12
12
  /**
13
13
  * Content permission policies
14
14
  * No need to specify license for permissions that are available to all licenses
@@ -5,3 +5,12 @@ export interface IWithCatalog {
5
5
  */
6
6
  catalog: IHubCatalog;
7
7
  }
8
+ /**
9
+ * Expose a set of catalogs on an entity
10
+ */
11
+ export interface IWithCatalogs {
12
+ /**
13
+ * Catalogs
14
+ */
15
+ catalogs: IHubCatalog[];
16
+ }
@@ -1,9 +1,11 @@
1
- import { IWithPermissions, IWithSlug } from "../traits";
1
+ import { IWithCatalogs } from "../traits/IWithCatalog";
2
+ import { IWithPermissions } from "../traits/IWithPermissions";
3
+ import { IWithSlug } from "../traits/IWithSlug";
2
4
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
3
5
  /**
4
6
  * DRAFT: Under development and more properties will likely be added
5
7
  * @internal
6
8
  */
7
- export interface IHubDiscussion extends IHubItemEntity, IWithSlug, IWithPermissions {
9
+ export interface IHubDiscussion extends IHubItemEntity, IWithSlug, IWithCatalogs, IWithPermissions {
8
10
  }
9
11
  export declare type IHubDiscussionEditor = IHubItemEntityEditor<IHubDiscussion> & {};
@@ -1,11 +1,13 @@
1
1
  import { HubEventAttendanceType, HubEventCapacityType } from "../../events/types";
2
- import { IWithPermissions, IWithSlug } from "../traits";
2
+ import { IWithCatalogs } from "../traits/IWithCatalog";
3
+ import { IWithPermissions } from "../traits/IWithPermissions";
4
+ import { IWithSlug } from "../traits/IWithSlug";
3
5
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
4
6
  /**
5
7
  * DRAFT: Under development and more properties will likely be added
6
8
  * @internal
7
9
  */
8
- export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug {
10
+ export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug, IWithCatalogs {
9
11
  /**
10
12
  * True when users can be registered to attend the event
11
13
  */
@@ -1,11 +1,14 @@
1
- import { IWithSlug, IWithPermissions, IWithCatalog } from "../traits";
1
+ import { IWithCatalog, IWithCatalogs } from "../traits/IWithCatalog";
2
2
  import { IWithMetrics } from "../traits/IWithMetrics";
3
+ import { IWithPermissions } from "../traits/IWithPermissions";
4
+ import { IWithSlug } from "../traits/IWithSlug";
3
5
  import { IWithStatus } from "../traits/IWithStatus";
4
6
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
5
7
  /**
6
8
  * DRAFT: Under development and more properties will likely be added
7
9
  * @internal
8
10
  */
9
- export interface IHubInitiative extends IHubItemEntity, IWithSlug, IWithCatalog, IWithMetrics, IWithPermissions, IWithStatus {
11
+ export interface IHubInitiative extends IHubItemEntity, IWithSlug, IWithCatalog, // DEPRECATED: Use IWithCatalogs instead
12
+ IWithCatalogs, IWithMetrics, IWithPermissions, IWithStatus {
10
13
  }
11
14
  export declare type IHubInitiativeEditor = IHubItemEntityEditor<IHubInitiative> & {};
@@ -1,11 +1,13 @@
1
1
  import { IHubEntityBase } from "./IHubEntityBase";
2
2
  import { IHubGeography } from "../../types";
3
3
  import { AccessLevel, MembershipAccess } from "./types";
4
- import { IWithPermissions, IWithViewSettings, IWithDiscussions } from "../traits";
5
4
  import { IHubLocation } from "./IHubLocation";
6
5
  import { IWithFollowers } from "../traits/IWithFollowers";
7
6
  import { IWithAssociations } from "../traits/IWithAssociations";
8
7
  import { IMetricEditorValues } from "./Metrics";
8
+ import { IWithPermissions } from "../traits/IWithPermissions";
9
+ import { IWithDiscussions } from "../traits/IWithDiscussions";
10
+ import { IWithViewSettings } from "../traits/IWithViewSettings";
9
11
  /**
10
12
  * Properties exposed by Entities that are backed by Items
11
13
  */
@@ -1,4 +1,4 @@
1
- import { IWithCatalog } from "../traits/IWithCatalog";
1
+ import { IWithCatalog, IWithCatalogs } from "../traits/IWithCatalog";
2
2
  import { IWithLayout } from "../traits/IWithLayout";
3
3
  import { IWithMetrics } from "../traits/IWithMetrics";
4
4
  import { IWithPermissions } from "../traits/IWithPermissions";
@@ -9,7 +9,8 @@ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
9
9
  /**
10
10
  * Defines the properties of a Hub Project object
11
11
  */
12
- export interface IHubProject extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithMetrics, IWithPermissions, IWithEvents, IWithContent, IWithStatus {
12
+ export interface IHubProject extends IHubItemEntity, IWithSlug, IWithCatalog, // DEPRECATED: Use IWithCatalogs instead
13
+ IWithCatalogs, IWithLayout, IWithMetrics, IWithPermissions, IWithEvents, IWithContent, IWithStatus {
13
14
  }
14
15
  /**
15
16
  * This type redefines the IHubProject interface in such a way
@@ -1,12 +1,16 @@
1
1
  import { IExtent } from "@esri/arcgis-rest-feature-layer";
2
2
  import { IWithVersioningBehavior } from "../behaviors";
3
- import { IWithCatalog, IWithLayout, IWithPermissions, IWithSlug } from "../traits/index";
4
3
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
4
+ import { IWithSlug } from "../traits/IWithSlug";
5
+ import { IWithCatalog, IWithCatalogs } from "../traits/IWithCatalog";
6
+ import { IWithLayout } from "../traits/IWithLayout";
7
+ import { IWithPermissions } from "../traits/IWithPermissions";
5
8
  /**
6
9
  * DRAFT: Under development and more properties will likely be added
7
10
  * @internal
8
11
  */
9
- export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior {
12
+ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, // DEPRECATED: Use IWithCatalogs instead
13
+ IWithCatalogs, IWithLayout, IWithPermissions, IWithVersioningBehavior {
10
14
  /**
11
15
  * Array of minimal page objects
12
16
  */
@@ -39,6 +39,11 @@ export * from "./core/updateHubEntity";
39
39
  export * from "./urls/getCardModelUrl";
40
40
  export * from "./core/EntityEditor";
41
41
  export * from "./search/explainQueryResult";
42
+ export * from "./search/searchEntityCatalogs";
43
+ export * from "./search/searchCatalogs";
44
+ export * from "./search/getAddContentConfig";
45
+ export * from "./search/_internal/getCatalogGroups";
46
+ export * from "./search/getPredicateValues";
42
47
  export * from "./core/hubHistory";
43
48
  import OperationStack from "./OperationStack";
44
49
  import OperationError from "./OperationError";
@@ -108,7 +108,7 @@ export declare class Catalog implements IHubCatalog {
108
108
  /**
109
109
  * Search for Items
110
110
  * Will throw if the Catalog does not have a scope defined for items
111
- * @param query
111
+ * @param query - string or IQuery
112
112
  * @param options
113
113
  * @returns
114
114
  */
@@ -123,7 +123,7 @@ export declare class Catalog implements IHubCatalog {
123
123
  /**
124
124
  * Search for Groups
125
125
  * Will throw if the Catalog does not have a scope defined for groups
126
- * @param query
126
+ * @param query - string or IQuery
127
127
  * @param options
128
128
  * @returns
129
129
  */
@@ -131,29 +131,32 @@ export declare class Catalog implements IHubCatalog {
131
131
  /**
132
132
  * Search for Users
133
133
  * Will throw if the Catalog does not have a scope defined for users
134
- * @param query
134
+ * @param query - string or IQuery
135
135
  * @param options
136
136
  * @returns
137
137
  */
138
138
  searchUsers(query: string | IQuery, options?: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
139
139
  /**
140
- * Execute a search against all the collections in the Catalog
141
- * @param query
140
+ * Execute a term search against all the collections in the Catalog
141
+ * or an IQuery against all collections that match the targetEntity.
142
+ * Note: This will not search scopes which do not have corresponding collections.
143
+ * If you want that behavior, use `searchCatalogs` function instead.
144
+ * @param query - string or IQuery
142
145
  * @param options
143
146
  * @returns
144
147
  */
145
- searchCollections(query: string, options?: IHubSearchOptions): Promise<ISearchResponseHash>;
148
+ searchCollections(query: string | IQuery, options?: IHubSearchOptions): Promise<ISearchResponseHash>;
146
149
  /**
147
- * Execute a search against all the scopes in the Catalog
148
- * @param query
150
+ * Execute a term search against all the scopes in the Catalog
151
+ * @param query - term or IQuery
149
152
  * @param options
150
153
  * @returns
151
154
  */
152
- searchScopes(query: string, options?: IHubSearchOptions): Promise<ISearchResponseHash>;
155
+ searchScopes(query: string | IQuery, options?: IHubSearchOptions, limitTo?: EntityType[]): Promise<ISearchResponseHash>;
153
156
  /**
154
- * Execute a search against the Catalog as a whole
155
- * @param query
156
- * @param targetEntity
157
+ * Execute a term search or IQuery search against the Catalog.
158
+ * @param query - term or IQuery
159
+ * @param options
157
160
  * @returns
158
161
  */
159
162
  private search;
@@ -0,0 +1,11 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { IGroupsByMembership } from "../types/IGroupsByMembership";
3
+ import { IHubCatalog } from "../types/IHubCatalog";
4
+ /**
5
+ * Return an IGroupsByMembership object that contains all the groups, from all the
6
+ * collections/scopes in the catalog, which the current user is an owner/member/admin of.
7
+ * @param catalog
8
+ * @param context
9
+ * @returns
10
+ */
11
+ export declare function getCatalogGroups(catalog: IHubCatalog, context: IArcGISContext): IGroupsByMembership;
@@ -1,7 +1,7 @@
1
1
  import { EntityType } from "../types";
2
2
  /**
3
3
  * @private
4
- * Given a type (e.g. Hub Site Application) return the appropriate entity type
4
+ * Given a type (e.g. "Hub Site Application") return the appropriate entity type
5
5
  * that can be used as a `targetEntity` in an `IQuery`
6
6
  * @param type
7
7
  * @returns
@@ -0,0 +1,13 @@
1
+ import { IUser } from "@esri/arcgis-rest-types";
2
+ import { IGroupsByMembership } from "../types/IGroupsByMembership";
3
+ import { IQuery } from "../types/IHubCatalog";
4
+ /**
5
+ * Given a query and a user, return an object with the set of groups
6
+ * that are in the Query, and which the user is a member of, split by
7
+ * membership type.
8
+ * NOTE: This excludes viewOnly groups the user is just a member of.
9
+ * @param query
10
+ * @param user
11
+ * @returns
12
+ */
13
+ export declare function getUserGroupsFromQuery(query: IQuery, user: IUser): IGroupsByMembership;
@@ -0,0 +1,61 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { Permission } from "../../permissions/types/Permission";
3
+ import { EntityType } from "../types/IHubCatalog";
4
+ /**
5
+ * @internal
6
+ * Define the workflows that are available for each content type
7
+ */
8
+ export interface ITypeWorkflow {
9
+ /**
10
+ * The "type" the workflow applies to. This is not strictly an Item Type,
11
+ * it can also be an abstraction like "document", as well as things like Group
12
+ * or Event which are not item-backed.
13
+ */
14
+ type: string;
15
+ /**
16
+ * The target entity type for the type
17
+ */
18
+ targetEntity: EntityType;
19
+ /**
20
+ * The workflows that are available for the type
21
+ */
22
+ workflows: ContentWorkflow[];
23
+ /**
24
+ * Additional properties that may apply to some workflows
25
+ * e.g. upload file types for the type
26
+ */
27
+ properties?: Record<string, any>;
28
+ }
29
+ /**
30
+ * @internal
31
+ * Structure that defines the permission checks and workflows for each content type
32
+ */
33
+ export interface ITypeWorkflowDefinition extends ITypeWorkflow {
34
+ /**
35
+ * The permission required to create content of this type
36
+ */
37
+ permission: Permission;
38
+ }
39
+ /**
40
+ * @internal
41
+ * Define the workflows
42
+ */
43
+ export declare type ContentWorkflow = "create" | "upload" | "existing";
44
+ /**
45
+ * Given a type and context, return the workflows that are available to the user.
46
+ * This checks the permissions for defined for the type, and if the user has the
47
+ * permission, returns the workflows defined for the type.
48
+ * @param type
49
+ * @param context
50
+ * @returns
51
+ */
52
+ export declare function getWorkflowForType(type: string, context: IArcGISContext): ITypeWorkflow;
53
+ /**
54
+ * Return a list of types to use as the "default" types a user could possibly
55
+ * create / add (depending on permissions and group access).
56
+ * This list is used when an IQuery does not have type predicates, which
57
+ * we interpret as "all types", which is this list.
58
+ * @param context
59
+ * @returns
60
+ */
61
+ export declare function getDefaultCreateableTypes(context: IArcGISContext, limitTo?: EntityType[]): string[];
@@ -5,3 +5,5 @@ export * from "./portalSearchUsers";
5
5
  export * from "./hubSearchChannels";
6
6
  export * from "./hubSearchEvents";
7
7
  export * from "./hubSearchEventAttendees";
8
+ export * from "./getWorkflowForType";
9
+ export * from "./getCatalogGroups";
@@ -25,6 +25,13 @@ export declare function portalSearchItemsAsItems(query: IQuery, options: IHubSea
25
25
  * @returns IQuery
26
26
  */
27
27
  export declare function expandQuery(query: IQuery): IQuery;
28
+ /**
29
+ * Expand the predicates in a query without applying
30
+ * the well-known type expansions
31
+ * @param query
32
+ * @returns
33
+ */
34
+ export declare function expandPredicates(query: IQuery): IQuery;
28
35
  /**
29
36
  * Convert an `IItem` to a `IHubSearchResult`
30
37
  * Fetches the enrichments, and attaches them as directed in the `include` list
@@ -0,0 +1,11 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ import { IHubCatalog, IQuery } from "./types/IHubCatalog";
3
+ import { IAddContentWorkflowConfig } from "./types/AddContentWorkflowTypes";
4
+ /**
5
+ * Get the add content configuration, given nothing, or a catalog or query.
6
+ * Delegates to the appropriate function based on the type of the input.
7
+ * @param context
8
+ * @param catalogOrQuery
9
+ * @returns
10
+ */
11
+ export declare function getAddContentConfig(context: IArcGISContext, catalogOrQuery?: IQuery | IHubCatalog): IAddContentWorkflowConfig;
@@ -0,0 +1,8 @@
1
+ import { IQuery } from "..";
2
+ /**
3
+ * Get all the values for a predicate in a query
4
+ * @param predicateProp The predicate property to get the values for
5
+ * @param query The query to get the values from
6
+ * @returns An array of all the values for the predicate
7
+ */
8
+ export declare function getPredicateValues(predicateProp: string, query: IQuery, props?: string[]): string[];
@@ -0,0 +1,15 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ import { ICatalogSearchResponse, IHubCatalog, IPagingOptions, IQuery, ISortOptions } from "./types";
3
+ /**
4
+ * Given an array of catalog json objects, execute a search on all the collections
5
+ * in all the catalogs. If a scope exists without any associated collections in the catalog,
6
+ * the scope will be searched as well.
7
+ * If passed an IQuery, only collections using the same targetEntity will be searched
8
+ * If passed a string, a query will be executed on all collections in all catalogs
9
+ * @param catalogs
10
+ * @param query - string or IQuery
11
+ * @param options - IPagingOptions & ISortOptions - only num is used
12
+ * @param context
13
+ * @returns
14
+ */
15
+ export declare function searchCatalogs(catalogs: IHubCatalog[], query: string | IQuery, options: IPagingOptions & ISortOptions, context: IArcGISContext): Promise<ICatalogSearchResponse[]>;
@@ -0,0 +1,15 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ import { HubEntity } from "../core";
3
+ import { ICatalogSearchResponse, IPagingOptions, IQuery, ISortOptions } from "./types";
4
+ /**
5
+ * Given an entity, execute a search on all the catalogs, and their associated with the entity
6
+ * If the entity has no catalogs, an empty array is returned
7
+ * If passed an IQuery, only collections using the same targetEntity will be searched
8
+ * If passed a string, a query will be executed on all collections in all catalogs
9
+ * @param entity
10
+ * @param query - string or IQuery
11
+ * @param options - IPagingOptions & ISortOptions - only num is used
12
+ * @param context
13
+ * @returns
14
+ */
15
+ export declare function searchEntityCatalogs(entity: HubEntity, query: string | IQuery, options: IPagingOptions & ISortOptions, context: IArcGISContext): Promise<ICatalogSearchResponse[]>;