@esri/hub-common 18.10.0 → 18.11.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 (114) hide show
  1. package/dist/esm/channels/_internal/ChannelBusinessRules.js +9 -0
  2. package/dist/esm/channels/_internal/ChannelBusinessRules.js.map +1 -1
  3. package/dist/esm/channels/_internal/ChannelSchema.js +9 -0
  4. package/dist/esm/channels/_internal/ChannelSchema.js.map +1 -1
  5. package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js +65 -1
  6. package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js.map +1 -1
  7. package/dist/esm/channels/_internal/transformChannelToEntity.js +2 -1
  8. package/dist/esm/channels/_internal/transformChannelToEntity.js.map +1 -1
  9. package/dist/esm/channels/_internal/transformEditorToEntity.js +1 -0
  10. package/dist/esm/channels/_internal/transformEditorToEntity.js.map +1 -1
  11. package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +1 -2
  12. package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -1
  13. package/dist/esm/channels/_internal/transformEntityToEditor.js +1 -1
  14. package/dist/esm/channels/_internal/transformEntityToEditor.js.map +1 -1
  15. package/dist/esm/content/compose.js +1 -0
  16. package/dist/esm/content/compose.js.map +1 -1
  17. package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +105 -102
  18. package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -1
  19. package/dist/esm/discussions/_internal/DiscussionBusinessRules.js +0 -8
  20. package/dist/esm/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
  21. package/dist/esm/discussions/api/posts/posts.js +17 -4
  22. package/dist/esm/discussions/api/posts/posts.js.map +1 -1
  23. package/dist/esm/discussions/api/utils/channel-permission.js +11 -2
  24. package/dist/esm/discussions/api/utils/channel-permission.js.map +1 -1
  25. package/dist/esm/discussions/api/utils/channels/derive-user-role-v2.js +12 -0
  26. package/dist/esm/discussions/api/utils/channels/derive-user-role-v2.js.map +1 -0
  27. package/dist/esm/discussions/api/utils/channels/index.js +1 -0
  28. package/dist/esm/discussions/api/utils/channels/index.js.map +1 -1
  29. package/dist/esm/discussions/api/utils/posts/cannot-create-post-groups-blocked-v2.js +25 -0
  30. package/dist/esm/discussions/api/utils/posts/cannot-create-post-groups-blocked-v2.js.map +1 -0
  31. package/dist/esm/discussions/api/utils/posts/index.js +1 -0
  32. package/dist/esm/discussions/api/utils/posts/index.js.map +1 -1
  33. package/dist/esm/discussions/edit.js +5 -5
  34. package/dist/esm/discussions/edit.js.map +1 -1
  35. package/dist/esm/discussions/fetch.js +2 -2
  36. package/dist/esm/discussions/fetch.js.map +1 -1
  37. package/dist/esm/discussions/utils.js +95 -40
  38. package/dist/esm/discussions/utils.js.map +1 -1
  39. package/dist/esm/permissions/HubPermissionPolicies.js +2 -0
  40. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  41. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +71 -9
  42. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -1
  43. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +5 -2
  44. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -1
  45. package/dist/esm/search/_internal/hubEventsHelpers/processFilters.js +3 -15
  46. package/dist/esm/search/_internal/hubEventsHelpers/processFilters.js.map +1 -1
  47. package/dist/esm/search/_internal/hubSearchChannels.js +20 -3
  48. package/dist/esm/search/_internal/hubSearchChannels.js.map +1 -1
  49. package/dist/esm/search/_internal/hubSearchEvents.js +2 -1
  50. package/dist/esm/search/_internal/hubSearchEvents.js.map +1 -1
  51. package/dist/node/channels/_internal/ChannelBusinessRules.js +10 -1
  52. package/dist/node/channels/_internal/ChannelBusinessRules.js.map +1 -1
  53. package/dist/node/channels/_internal/ChannelSchema.js +9 -0
  54. package/dist/node/channels/_internal/ChannelSchema.js.map +1 -1
  55. package/dist/node/channels/_internal/ChannelUiSchemaCreate.js +65 -1
  56. package/dist/node/channels/_internal/ChannelUiSchemaCreate.js.map +1 -1
  57. package/dist/node/channels/_internal/transformChannelToEntity.js +2 -1
  58. package/dist/node/channels/_internal/transformChannelToEntity.js.map +1 -1
  59. package/dist/node/channels/_internal/transformEditorToEntity.js +1 -0
  60. package/dist/node/channels/_internal/transformEditorToEntity.js.map +1 -1
  61. package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +1 -2
  62. package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -1
  63. package/dist/node/channels/_internal/transformEntityToEditor.js +1 -1
  64. package/dist/node/channels/_internal/transformEntityToEditor.js.map +1 -1
  65. package/dist/node/content/compose.js +1 -0
  66. package/dist/node/content/compose.js.map +1 -1
  67. package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +105 -102
  68. package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -1
  69. package/dist/node/discussions/_internal/DiscussionBusinessRules.js +0 -8
  70. package/dist/node/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
  71. package/dist/node/discussions/api/posts/posts.js +17 -4
  72. package/dist/node/discussions/api/posts/posts.js.map +1 -1
  73. package/dist/node/discussions/api/utils/channel-permission.js +28 -19
  74. package/dist/node/discussions/api/utils/channel-permission.js.map +1 -1
  75. package/dist/node/discussions/api/utils/channels/derive-user-role-v2.js +16 -0
  76. package/dist/node/discussions/api/utils/channels/derive-user-role-v2.js.map +1 -0
  77. package/dist/node/discussions/api/utils/channels/index.js +2 -0
  78. package/dist/node/discussions/api/utils/channels/index.js.map +1 -1
  79. package/dist/node/discussions/api/utils/posts/cannot-create-post-groups-blocked-v2.js +29 -0
  80. package/dist/node/discussions/api/utils/posts/cannot-create-post-groups-blocked-v2.js.map +1 -0
  81. package/dist/node/discussions/api/utils/posts/index.js +2 -0
  82. package/dist/node/discussions/api/utils/posts/index.js.map +1 -1
  83. package/dist/node/discussions/edit.js +4 -4
  84. package/dist/node/discussions/edit.js.map +1 -1
  85. package/dist/node/discussions/fetch.js +1 -1
  86. package/dist/node/discussions/fetch.js.map +1 -1
  87. package/dist/node/discussions/utils.js +95 -40
  88. package/dist/node/discussions/utils.js.map +1 -1
  89. package/dist/node/permissions/HubPermissionPolicies.js +2 -0
  90. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  91. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +72 -10
  92. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -1
  93. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +4 -1
  94. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -1
  95. package/dist/node/search/_internal/hubEventsHelpers/processFilters.js +2 -14
  96. package/dist/node/search/_internal/hubEventsHelpers/processFilters.js.map +1 -1
  97. package/dist/node/search/_internal/hubSearchChannels.js +19 -2
  98. package/dist/node/search/_internal/hubSearchChannels.js.map +1 -1
  99. package/dist/node/search/_internal/hubSearchEvents.js +2 -1
  100. package/dist/node/search/_internal/hubSearchEvents.js.map +1 -1
  101. package/dist/types/channels/_internal/ChannelBusinessRules.d.ts +2 -0
  102. package/dist/types/channels/_internal/ChannelUiSchemaCreate.d.ts +1 -1
  103. package/dist/types/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.d.ts +2 -2
  104. package/dist/types/discussions/_internal/DiscussionBusinessRules.d.ts +1 -1
  105. package/dist/types/discussions/api/utils/channel-permission.d.ts +10 -1
  106. package/dist/types/discussions/api/utils/channels/derive-user-role-v2.d.ts +9 -0
  107. package/dist/types/discussions/api/utils/channels/index.d.ts +1 -0
  108. package/dist/types/discussions/api/utils/posts/cannot-create-post-groups-blocked-v2.d.ts +3 -0
  109. package/dist/types/discussions/api/utils/posts/index.d.ts +1 -0
  110. package/dist/types/discussions/utils.d.ts +5 -4
  111. package/dist/types/search/_internal/hubDiscussionsHelpers/processChannelFilters.d.ts +15 -1
  112. package/dist/types/search/_internal/hubSearchChannels.d.ts +18 -1
  113. package/dist/types/search/_internal/hubSearchEvents.d.ts +2 -1
  114. package/package.json +1 -1
@@ -7,6 +7,7 @@ const eventToSearchResult_1 = require("./hubEventsHelpers/eventToSearchResult");
7
7
  const processOptions_1 = require("./hubEventsHelpers/processOptions");
8
8
  const processFilters_1 = require("./hubEventsHelpers/processFilters");
9
9
  /**
10
+ * @private
10
11
  * Searches for events against the Events 3 API using the given `query` and `options`.
11
12
  * Currently supported filters include:
12
13
  * - access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'private'>;
@@ -37,7 +38,7 @@ const processFilters_1 = require("./hubEventsHelpers/processFilters");
37
38
  * - startDate
38
39
  * @param query An IQuery object
39
40
  * @param options An IHubSearchOptions object
40
- * @returns a promise that resolves a <IHubSearchResponse<IHubSearchResult> object
41
+ * @returns a promise that resolves an IHubSearchResponse<IHubSearchResult> object
41
42
  */
42
43
  async function hubSearchEvents(query, options) {
43
44
  const processedFilters = processFilters_1.processFilters(query.filters);
@@ -1 +1 @@
1
- {"version":3,"file":"hubSearchEvents.js","sourceRoot":"","sources":["../../../../src/search/_internal/hubSearchEvents.ts"],"names":[],"mappings":";;;AAIA,oDAAuD;AACvD,0EAGiD;AACjD,gFAA6E;AAC7E,sEAAmE;AACnE,sEAAmE;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACI,KAAK,UAAU,eAAe,CACnC,KAAa,EACb,OAA0B;IAE1B,MAAM,gBAAgB,GAAG,+BAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,IAAI,iDACL,gBAAgB,GAChB,gBAAgB,KACnB,OAAO,EAAE,CAAC,+BAAgB,CAAC,OAAO,EAAE,+BAAgB,CAAC,QAAQ,CAAC,GAC/D,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,qBAAY,iCACjD,OAAO,CAAC,cAAc,KACzB,IAAI,IACJ,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yCAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAC1D,CAAC;IACF,MAAM,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;IAC/B,OAAO;QACL,KAAK;QACL,OAAO;QACP,OAAO;QACP,IAAI,EAAE,GAAG,EAAE;YACT,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;aACvE;YACD,OAAO,eAAe,CAAC,KAAK,kCACvB,OAAO,KACV,KAAK,EAAE,SAAS,IAChB,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAjCD,0CAiCC"}
1
+ {"version":3,"file":"hubSearchEvents.js","sourceRoot":"","sources":["../../../../src/search/_internal/hubSearchEvents.ts"],"names":[],"mappings":";;;AAIA,oDAAuD;AACvD,0EAGiD;AACjD,gFAA6E;AAC7E,sEAAmE;AACnE,sEAAmE;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACI,KAAK,UAAU,eAAe,CACnC,KAAa,EACb,OAA0B;IAE1B,MAAM,gBAAgB,GAAG,+BAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,IAAI,iDACL,gBAAgB,GAChB,gBAAgB,KACnB,OAAO,EAAE,CAAC,+BAAgB,CAAC,OAAO,EAAE,+BAAgB,CAAC,QAAQ,CAAC,GAC/D,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,qBAAY,iCACjD,OAAO,CAAC,cAAc,KACzB,IAAI,IACJ,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yCAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAC1D,CAAC;IACF,MAAM,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;IAC/B,OAAO;QACL,KAAK;QACL,OAAO;QACP,OAAO;QACP,IAAI,EAAE,GAAG,EAAE;YACT,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;aACvE;YACD,OAAO,eAAe,CAAC,KAAK,kCACvB,OAAO,KACV,KAAK,EAAE,SAAS,IAChB,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAjCD,0CAiCC"}
@@ -1,3 +1,4 @@
1
+ import { IPermissionPolicy } from "../../permissions/types/IPermissionPolicy";
1
2
  /**
2
3
  * @private
3
4
  * An array of all supported channel permissions
@@ -17,3 +18,4 @@ export declare const ChannelNonePermission = "hub:channel:none";
17
18
  * A map of all supported channel permissions
18
19
  */
19
20
  export declare const CHANNEL_PERMISSIONS: Record<"channelRoot" | "channelCreate" | "channelDelete" | "channelEdit" | "channelView" | "channelOwner" | "channelManage" | "channelRead" | "channelWrite" | "channelReadWrite" | "channelModerate", ChannelPermission>;
21
+ export declare const ChannelPermissionPolicies: IPermissionPolicy[];
@@ -7,4 +7,4 @@ import { IHubChannel } from "../../core/types";
7
7
  * This defines how the schema properties should be
8
8
  * rendered in the channel editing experience
9
9
  */
10
- export declare const buildUiSchema: (i18nScope: string, _options: Partial<IHubChannel>, context: IArcGISContext) => Promise<IUiSchema>;
10
+ export declare const buildUiSchema: (i18nScope: string, options: Partial<IHubChannel>, context: IArcGISContext) => Promise<IUiSchema>;
@@ -4,8 +4,8 @@ import { EntityEditorOptions } from "../EditorOptions";
4
4
  /**
5
5
  * Builds the UI Schema for the "settings => discussions" workspace pane
6
6
  * @param i18nScope the i18n scope for translations
7
- * @param options an EntityEditorOptions object
7
+ * @param _options an EntityEditorOptions object
8
8
  * @param context an IArcGISContext object
9
9
  * @returns a promise that resolves a UI Schema object
10
10
  */
11
- export declare const buildUiSchema: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
11
+ export declare const buildUiSchema: (i18nScope: string, _options: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
@@ -4,7 +4,7 @@ import { IPermissionPolicy } from "../../permissions";
4
4
  * These define the requirements any user must meet to perform related actions
5
5
  * @private
6
6
  */
7
- export declare const DiscussionPermissions: readonly ["hub:discussion", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:discussion:owner", "hub:discussion:canChangeAccess", "hub:discussion:workspace:overview", "hub:discussion:workspace:dashboard", "hub:discussion:workspace:details", "hub:discussion:workspace:settings", "hub:discussion:workspace:collaborators", "hub:discussion:workspace:discussion", "hub:discussion:workspace:metrics", "hub:discussion:workspace:settings:discussions", "hub:discussion:manage", "temp:hub:discussion:create"];
7
+ export declare const DiscussionPermissions: readonly ["hub:discussion", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:discussion:owner", "hub:discussion:canChangeAccess", "hub:discussion:workspace:overview", "hub:discussion:workspace:dashboard", "hub:discussion:workspace:details", "hub:discussion:workspace:settings", "hub:discussion:workspace:collaborators", "hub:discussion:workspace:metrics", "hub:discussion:workspace:settings:discussions", "hub:discussion:manage", "temp:hub:discussion:create"];
8
8
  /**
9
9
  * Discussion permission policies
10
10
  * @private
@@ -1,4 +1,12 @@
1
- import { IChannel, IDiscussionsUser, IUpdateChannelV2 } from "../types";
1
+ import { IChannel, IDiscussionsUser, IUpdateChannelV2, Role } from "../types";
2
+ /**
3
+ * A map of update operations & ACL roles where the key is the update operation
4
+ * and the value is an array of roles that are permitted to perform the update operation.
5
+ * See confluence for privs documentation: https://confluencewikidev.esri.com/pages/viewpage.action?pageId=153747776#Roles&Privileges-ApplicationtoChannels
6
+ * @internal
7
+ * @hidden
8
+ */
9
+ export declare const CHANNEL_ACTION_PRIVS: Record<string, Role[]>;
2
10
  /**
3
11
  * @internal
4
12
  * @hidden
@@ -9,6 +17,7 @@ export declare class ChannelPermission {
9
17
  private existingChannel;
10
18
  private permissionsByCategory;
11
19
  constructor(channel: IChannel);
20
+ deriveUserRole(user: IDiscussionsUser): Role;
12
21
  canPostToChannel(user: IDiscussionsUser): boolean;
13
22
  canCreateChannel(user: IDiscussionsUser): boolean;
14
23
  canModerateChannel(user: IDiscussionsUser): boolean;
@@ -0,0 +1,9 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, Role } from "../../types";
3
+ /**
4
+ * Derives the user role for the given channel and user
5
+ * @param channel an IChannel object
6
+ * @param user An IUser or IDiscussionUser object
7
+ * @returns the appropriate Role for the given user relative to the given channel
8
+ */
9
+ export declare function deriveUserRoleV2(channel: IChannel, user?: IUser | IDiscussionsUser): Role;
@@ -8,3 +8,4 @@ export { canCreateChannelV2 } from "./can-create-channel-v2";
8
8
  export { canDeleteChannelV2 } from "./can-delete-channel-v2";
9
9
  export { canEditChannelV2 } from "./can-edit-channel-v2";
10
10
  export { canReadChannelV2 } from "./can-read-channel-v2";
11
+ export { deriveUserRoleV2 } from "./derive-user-role-v2";
@@ -0,0 +1,3 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ export declare function cannotCreatePostGroupsBlockedV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -10,3 +10,4 @@ export { canCreateReplyV2 } from "./can-create-reply-v2";
10
10
  export { canDeletePostV2 } from "./can-delete-post-v2";
11
11
  export { canEditPostStatusV2 } from "./can-edit-post-status-v2";
12
12
  export { canEditPostV2 } from "./can-edit-post-v2";
13
+ export { cannotCreatePostGroupsBlockedV2 } from "./cannot-create-post-groups-blocked-v2";
@@ -1,4 +1,5 @@
1
1
  import type { IGroup, IItem } from "@esri/arcgis-rest-portal";
2
+ import type { IRequestOptions } from "@esri/arcgis-rest-request";
2
3
  import { IHubContent, IHubItemEntity } from "../core";
3
4
  import { IChannel, SharingAccess } from "./api/types";
4
5
  import { IHubSearchResult, IQuery } from "../search";
@@ -60,13 +61,13 @@ export declare function getChannelOrgIds(channel: IChannel): string[];
60
61
  export declare function getChannelGroupIds(channel: IChannel): string[];
61
62
  /**
62
63
  * A utility method used to build an IQuery to search for users that are permitted to be at-mentioned for the given channel.
63
- * @param input An array of strings to search for. Each string is mapped to `username` and `fullname`, filters as an OR condition
64
+ * @param terms An array of strings to search for. Each string is mapped to `username` and `fullname`, filters as an OR condition
64
65
  * @param channel An IChannel record
65
66
  * @param currentUsername The currently authenticated user's username
66
- * @param options An IHubSearchOptions object
67
- * @returns a promise that resolves an IHubSearchResponse<IHubSearchResult>
67
+ * @param requestOptions An IRequestOptions object
68
+ * @returns a promise that resolves an IQuery
68
69
  */
69
- export declare function getChannelUsersQuery(inputs: string[], channel: IChannel, currentUsername?: string): IQuery;
70
+ export declare function getChannelUsersQuery(terms: string[], channel: IChannel, currentUsername?: string, requestOptions?: IRequestOptions): Promise<IQuery>;
70
71
  /**
71
72
  * Transforms a given channel and optional channel groups array into a IHubSearchResult
72
73
  * @param channel
@@ -1,6 +1,20 @@
1
1
  import { ISearchChannels } from "../../../discussions/api/types";
2
2
  import { IFilter } from "../../types/IHubCatalog";
3
3
  /**
4
+ * @private
5
+ *
6
+ * Transforms an array of unknown values into an object containing `ids` and `notIds` arrays.
7
+ *
8
+ * @param values An array of unknown values
9
+ * @returns and object containing an `ids` and `notIds` array
10
+ */
11
+ export declare const parseIdsAndNotIds: (values: unknown[]) => {
12
+ ids: string[];
13
+ notIds: string[];
14
+ };
15
+ /**
16
+ * @private
17
+ *
4
18
  * Flattens an array of IFilter objects into a map of key/value pairs where the key is the name of the
5
19
  * predicate and the value is a unique array of all values for that predicate name spanning all collections
6
20
  * and predicates. Uniqueness is only guaranteed for primitives (i.e. strings, boolean, number, etc). E.g.
@@ -21,7 +35,7 @@ import { IFilter } from "../../types/IHubCatalog";
21
35
  * @param filters An array of IFilter objects
22
36
  * @returns an object containing key/value pairs of parameter values
23
37
  */
24
- export declare function flattenFilters(filters: IFilter[]): Record<string, any[]>;
38
+ export declare function flattenFilters(filters: IFilter[]): Record<string, unknown[]>;
25
39
  /**
26
40
  * @private
27
41
  * Converts an IFilter array into a partial ISearchChannels
@@ -2,8 +2,25 @@ import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from
2
2
  /**
3
3
  * @private
4
4
  * Executes a Discussions API channel search and resolves an IHubSearchResponse<IHubSearchResult> for the channel results
5
+ * Currently supported filters include:
6
+ * - term: string;
7
+ * - group: string | string[];
8
+ * - access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'private'>
9
+ * - id: string | string[] | { not: string } | { not: string[] };
10
+ * - orgId: string;
11
+ * - hasUserPosts: boolean;
12
+ * - discussion: string;
13
+ * - owner: string;
14
+ * - createdDateRange: IDateRange<string | number>;
15
+ * - updatedDateRange: IDateRange<string | number>;
16
+ * - role: 'read' | 'write' | 'readWrite' | 'moderate' | 'manage' | 'owner' | Array<'read' | 'write' | 'readWrite' | 'moderate' | 'manage' | 'owner'>
17
+ * Currently supported sort fields include:
18
+ * - created
19
+ * - modified
20
+ * - owner
21
+ * - lastActivity
5
22
  * @param query an IQuery object
6
23
  * @param options an IHubSearchOptions object
7
- * @returns a promise that resolves an HubSearchResponse<IHubSearchResult> object
24
+ * @returns a promise that resolves an IHubSearchResponse<IHubSearchResult> object
8
25
  */
9
26
  export declare const hubSearchChannels: (query: IQuery, searchOptions: IHubSearchOptions) => Promise<IHubSearchResponse<IHubSearchResult>>;
@@ -3,6 +3,7 @@ import { IHubSearchOptions } from "../types/IHubSearchOptions";
3
3
  import { IHubSearchResponse } from "../types/IHubSearchResponse";
4
4
  import { IHubSearchResult } from "../types/IHubSearchResult";
5
5
  /**
6
+ * @private
6
7
  * Searches for events against the Events 3 API using the given `query` and `options`.
7
8
  * Currently supported filters include:
8
9
  * - access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'private'>;
@@ -33,6 +34,6 @@ import { IHubSearchResult } from "../types/IHubSearchResult";
33
34
  * - startDate
34
35
  * @param query An IQuery object
35
36
  * @param options An IHubSearchOptions object
36
- * @returns a promise that resolves a <IHubSearchResponse<IHubSearchResult> object
37
+ * @returns a promise that resolves an IHubSearchResponse<IHubSearchResult> object
37
38
  */
38
39
  export declare function hubSearchEvents(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "18.10.0",
3
+ "version": "18.11.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",