@esri/hub-discussions
Advanced tools
Comparing version 24.3.0 to 24.4.0
@@ -82,2 +82,3 @@ /** | ||
DiscussionType["CONTENT"] = "content"; | ||
DiscussionType["BOARD"] = "board"; | ||
})(DiscussionType || (DiscussionType = {})); | ||
@@ -84,0 +85,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
export const CANNOT_DISCUSS = "cannotDiscuss"; | ||
export { CANNOT_DISCUSS } from "@esri/hub-common"; | ||
export const MENTION_ATTRIBUTE = "data-mention"; | ||
//# sourceMappingURL=constants.js.map |
import { parseDatasetId } from "@esri/hub-common"; | ||
import { canModifyChannel } from "../channels"; | ||
import { CANNOT_DISCUSS, MENTION_ATTRIBUTE } from "../constants"; | ||
import { MENTION_ATTRIBUTE } from "../constants"; | ||
export { canModifyPost } from "./can-modify-post"; | ||
export { canModifyPostStatus } from "./can-modify-post-status"; | ||
export { isDiscussable } from "@esri/hub-common"; | ||
/** | ||
@@ -43,13 +44,2 @@ * Utility that parses a discussion URI string into its component parts | ||
/** | ||
* Utility to determine if a given IGroup, IItem, IHubContent, or IHubItemEntity | ||
* is discussable. | ||
* @export | ||
* @param {IGroup|IItem|IHubContent|IHubItemEntity} The subject to evaluate | ||
* @return {boolean} | ||
*/ | ||
export function isDiscussable(subject) { | ||
var _a; | ||
return !((_a = subject.typeKeywords) !== null && _a !== void 0 ? _a : []).includes(CANNOT_DISCUSS); | ||
} | ||
/** | ||
* Determines if the given user has sufficient privileges to delete the given post | ||
@@ -56,0 +46,0 @@ * @param post An IPost object |
@@ -85,2 +85,3 @@ "use strict"; | ||
DiscussionType["CONTENT"] = "content"; | ||
DiscussionType["BOARD"] = "board"; | ||
})(DiscussionType = exports.DiscussionType || (exports.DiscussionType = {})); | ||
@@ -87,0 +88,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MENTION_ATTRIBUTE = exports.CANNOT_DISCUSS = void 0; | ||
exports.CANNOT_DISCUSS = "cannotDiscuss"; | ||
exports.MENTION_ATTRIBUTE = void 0; | ||
var hub_common_1 = require("@esri/hub-common"); | ||
Object.defineProperty(exports, "CANNOT_DISCUSS", { enumerable: true, get: function () { return hub_common_1.CANNOT_DISCUSS; } }); | ||
exports.MENTION_ATTRIBUTE = "data-mention"; | ||
//# sourceMappingURL=constants.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseMentionedUsers = exports.canDeletePost = exports.isDiscussable = exports.parseDiscussionURI = void 0; | ||
exports.parseMentionedUsers = exports.canDeletePost = exports.parseDiscussionURI = void 0; | ||
const hub_common_1 = require("@esri/hub-common"); | ||
@@ -11,2 +11,4 @@ const channels_1 = require("../channels"); | ||
Object.defineProperty(exports, "canModifyPostStatus", { enumerable: true, get: function () { return can_modify_post_status_1.canModifyPostStatus; } }); | ||
var hub_common_2 = require("@esri/hub-common"); | ||
Object.defineProperty(exports, "isDiscussable", { enumerable: true, get: function () { return hub_common_2.isDiscussable; } }); | ||
/** | ||
@@ -50,14 +52,2 @@ * Utility that parses a discussion URI string into its component parts | ||
/** | ||
* Utility to determine if a given IGroup, IItem, IHubContent, or IHubItemEntity | ||
* is discussable. | ||
* @export | ||
* @param {IGroup|IItem|IHubContent|IHubItemEntity} The subject to evaluate | ||
* @return {boolean} | ||
*/ | ||
function isDiscussable(subject) { | ||
var _a; | ||
return !((_a = subject.typeKeywords) !== null && _a !== void 0 ? _a : []).includes(constants_1.CANNOT_DISCUSS); | ||
} | ||
exports.isDiscussable = isDiscussable; | ||
/** | ||
* Determines if the given user has sufficient privileges to delete the given post | ||
@@ -64,0 +54,0 @@ * @param post An IPost object |
@@ -91,3 +91,4 @@ import { IPagingParams, IPagedResponse as IRestPagedResponse, IUser } from "@esri/arcgis-rest-types"; | ||
GROUP = "group", | ||
CONTENT = "content" | ||
CONTENT = "content", | ||
BOARD = "board" | ||
} | ||
@@ -94,0 +95,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export declare const CANNOT_DISCUSS = "cannotDiscuss"; | ||
export { CANNOT_DISCUSS } from "@esri/hub-common"; | ||
export declare const MENTION_ATTRIBUTE = "data-mention"; |
@@ -1,3 +0,1 @@ | ||
import { IGroup, IItem } from "@esri/arcgis-rest-portal"; | ||
import { IHubContent, IHubItemEntity } from "@esri/hub-common"; | ||
import { IChannel, IDiscussionParams, IDiscussionsUser, IPost } from "../../types"; | ||
@@ -7,2 +5,3 @@ import { IUser } from "@esri/arcgis-rest-auth"; | ||
export { canModifyPostStatus } from "./can-modify-post-status"; | ||
export { isDiscussable } from "@esri/hub-common"; | ||
/** | ||
@@ -17,10 +16,2 @@ * Utility that parses a discussion URI string into its component parts | ||
/** | ||
* Utility to determine if a given IGroup, IItem, IHubContent, or IHubItemEntity | ||
* is discussable. | ||
* @export | ||
* @param {IGroup|IItem|IHubContent|IHubItemEntity} The subject to evaluate | ||
* @return {boolean} | ||
*/ | ||
export declare function isDiscussable(subject: IGroup | IItem | IHubContent | IHubItemEntity): boolean; | ||
/** | ||
* Determines if the given user has sufficient privileges to delete the given post | ||
@@ -27,0 +18,0 @@ * @param post An IPost object |
{ | ||
"name": "@esri/hub-discussions", | ||
"version": "24.3.0", | ||
"version": "24.4.0", | ||
"description": "Module to interact with ArcGIS Hub Discussions API in Node.js and modern browsers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
196360
478
3839
0