Socket
Socket
Sign inDemoInstall

@esri/hub-discussions

Package Overview
Dependencies
21
Maintainers
43
Versions
276
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 25.6.0 to 25.7.0

12

dist/esm/channels/channels.js
import { request } from "../request";
export { searchChannels } from "@esri/hub-common";
/**
* search channels
*
* @export
* @param {ISearchChannelsParams} options
* @return {*} {Promise<IPagedResponse<IChannel>>}
*/
export function searchChannels(options) {
options.httpMethod = "GET";
return request(`/channels`, options);
}
/**
* create channel

@@ -15,0 +5,0 @@ *

@@ -1,244 +0,2 @@

/**
* sort orders
*
* @export
* @enum {string}
*/
export var SortOrder;
(function (SortOrder) {
SortOrder["ASC"] = "ASC";
SortOrder["DESC"] = "DESC";
})(SortOrder || (SortOrder = {}));
/**
* reactions to posts
*
* @export
* @enum {string}
*/
export var PostReaction;
(function (PostReaction) {
PostReaction["CLAPPING_HANDS"] = "clapping_hands";
PostReaction["CONFUSED"] = "confused";
PostReaction["DOWN_ARROW"] = "down_arrow";
PostReaction["EYES"] = "eyes";
PostReaction["FACE_WITH_TEARS_OF_JOY"] = "face_with_tears_of_joy";
PostReaction["FIRE"] = "fire";
PostReaction["GRINNING"] = "grinning";
PostReaction["HEART"] = "heart";
PostReaction["LAUGH"] = "laugh";
PostReaction["ONE_HUNDRED"] = "one_hundred";
PostReaction["PARTYING"] = "partying";
PostReaction["PARTY_POPPER"] = "party_popper";
PostReaction["RAISING_HANDS"] = "raising_hands";
PostReaction["ROCKET"] = "rocket";
PostReaction["SAD"] = "sad";
PostReaction["SLIGHTLY_SMILING"] = "slightly_smiling";
PostReaction["SURPRISED"] = "surprised";
PostReaction["THINKING"] = "thinking";
PostReaction["THUMBS_UP"] = "thumbs_up";
PostReaction["THUMBS_DOWN"] = "thumbs_down";
PostReaction["TROPHY"] = "trophy";
PostReaction["UP_ARROW"] = "up_arrow";
PostReaction["WAVING_HAND"] = "waving_hand";
PostReaction["WINKING"] = "winking";
PostReaction["WORLD_MAP"] = "world_map";
})(PostReaction || (PostReaction = {}));
/**
* platform sharing access values
*
* @export
* @enum {string}
*/
export var SharingAccess;
(function (SharingAccess) {
SharingAccess["PUBLIC"] = "public";
SharingAccess["ORG"] = "org";
SharingAccess["PRIVATE"] = "private";
})(SharingAccess || (SharingAccess = {}));
/**
* possible statuses of a post
*
* @export
* @enum {string}
*/
export var PostStatus;
(function (PostStatus) {
PostStatus["PENDING"] = "pending";
PostStatus["APPROVED"] = "approved";
PostStatus["REJECTED"] = "rejected";
PostStatus["DELETED"] = "deleted";
PostStatus["HIDDEN"] = "hidden";
})(PostStatus || (PostStatus = {}));
/**
* possible discussionn content types, i.e. a post can be about an item, dataset, or group
*
* @export
* @enum {string}
*/
export var DiscussionType;
(function (DiscussionType) {
DiscussionType["GROUP"] = "group";
DiscussionType["CONTENT"] = "content";
DiscussionType["BOARD"] = "board";
})(DiscussionType || (DiscussionType = {}));
/**
* source of a post, i.e. app context
*
* @export
* @enum {string}
*/
export var DiscussionSource;
(function (DiscussionSource) {
DiscussionSource["HUB"] = "hub";
DiscussionSource["AGO"] = "ago";
DiscussionSource["URBAN"] = "urban";
})(DiscussionSource || (DiscussionSource = {}));
/**
* relations of post entity
*
* @export
* @enum {string}
*/
export var PostRelation;
(function (PostRelation) {
PostRelation["REPLIES"] = "replies";
PostRelation["REACTIONS"] = "reactions";
PostRelation["PARENT"] = "parent";
PostRelation["CHANNEL"] = "channel";
})(PostRelation || (PostRelation = {}));
/**
* relations of reaction entity
*
* @export
* @enum {string}
*/
export var ReactionRelation;
(function (ReactionRelation) {
ReactionRelation["POST"] = "post";
})(ReactionRelation || (ReactionRelation = {}));
/**
* filters of channel entity
*
* @export
* @enum {string}
*/
export var ChannelFilter;
(function (ChannelFilter) {
ChannelFilter["HAS_USER_POSTS"] = "has_user_posts";
})(ChannelFilter || (ChannelFilter = {}));
/**
* @export
* @enum {string}
*/
export var CommonSort;
(function (CommonSort) {
CommonSort["CREATED_AT"] = "createdAt";
CommonSort["CREATOR"] = "creator";
CommonSort["EDITOR"] = "editor";
CommonSort["ID"] = "id";
CommonSort["UPDATED_AT"] = "updatedAt";
})(CommonSort || (CommonSort = {}));
/**
* Role types
*
* @export
* @enum {string}
*/
export var Role;
(function (Role) {
Role["READ"] = "read";
Role["WRITE"] = "write";
Role["READWRITE"] = "readWrite";
Role["MODERATE"] = "moderate";
Role["MANAGE"] = "manage";
Role["OWNER"] = "owner";
})(Role || (Role = {}));
/**
* Post sorting fields
*
* @export
* @enum {string}
*/
export var PostSort;
(function (PostSort) {
PostSort["BODY"] = "body";
PostSort["CHANNEL_ID"] = "channelId";
PostSort["CREATED_AT"] = "createdAt";
PostSort["CREATOR"] = "creator";
PostSort["DISCUSSION"] = "discussion";
PostSort["EDITOR"] = "editor";
PostSort["ID"] = "id";
PostSort["PARENT_ID"] = "parentId";
PostSort["STATUS"] = "status";
PostSort["TITLE"] = "title";
PostSort["UPDATED_AT"] = "updatedAt";
})(PostSort || (PostSort = {}));
/**
* Post types
*
* @export
* @enum{string}
*/
export var PostType;
(function (PostType) {
PostType["Text"] = "text";
PostType["Announcement"] = "announcement";
PostType["Poll"] = "poll";
PostType["Question"] = "question";
})(PostType || (PostType = {}));
/**
* Channel sorting fields
*
* @export
* @enum {string}
*/
export var ChannelSort;
(function (ChannelSort) {
ChannelSort["ACCESS"] = "access";
ChannelSort["CREATED_AT"] = "createdAt";
ChannelSort["CREATOR"] = "creator";
ChannelSort["EDITOR"] = "editor";
ChannelSort["ID"] = "id";
ChannelSort["LAST_ACTIVITY"] = "last_activity";
ChannelSort["UPDATED_AT"] = "updatedAt";
})(ChannelSort || (ChannelSort = {}));
/**
* relations of channel entity
*
* @export
* @enum {string}
*/
export var ChannelRelation;
(function (ChannelRelation) {
ChannelRelation["CHANNEL_ACL"] = "channelAcl";
})(ChannelRelation || (ChannelRelation = {}));
/**
* @export
* @enum {string}
*/
export var AclCategory;
(function (AclCategory) {
AclCategory["GROUP"] = "group";
AclCategory["ORG"] = "org";
AclCategory["USER"] = "user";
AclCategory["ANONYMOUS_USER"] = "anonymousUser";
AclCategory["AUTHENTICATED_USER"] = "authenticatedUser";
})(AclCategory || (AclCategory = {}));
/**
* @export
* @enum {string}
*/
export var AclSubCategory;
(function (AclSubCategory) {
AclSubCategory["ADMIN"] = "admin";
AclSubCategory["MEMBER"] = "member";
})(AclSubCategory || (AclSubCategory = {}));
/**
* @export
* @enum {string}
*/
export var DiscussionSettingType;
(function (DiscussionSettingType) {
DiscussionSettingType["CONTENT"] = "content";
})(DiscussionSettingType || (DiscussionSettingType = {}));
export { SortOrder, PostReaction, SharingAccess, PostStatus, DiscussionType, DiscussionSource, PostRelation, ReactionRelation, ChannelFilter, CommonSort, Role, PostSort, PostType, ChannelSort, ChannelRelation, AclCategory, AclSubCategory, DiscussionSettingType, } from "@esri/hub-common";
//# sourceMappingURL=types.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeChannelActivity = exports.removeChannelNotificationOptOut = exports.createChannelNotificationOptOut = exports.fetchChannelNotifcationOptOut = exports.removeChannel = exports.updateChannel = exports.fetchChannel = exports.createChannel = exports.searchChannels = void 0;
exports.removeChannelActivity = exports.removeChannelNotificationOptOut = exports.createChannelNotificationOptOut = exports.fetchChannelNotifcationOptOut = exports.removeChannel = exports.updateChannel = exports.fetchChannel = exports.createChannel = void 0;
const request_1 = require("../request");
var hub_common_1 = require("@esri/hub-common");
Object.defineProperty(exports, "searchChannels", { enumerable: true, get: function () { return hub_common_1.searchChannels; } });
/**
* search channels
*
* @export
* @param {ISearchChannelsParams} options
* @return {*} {Promise<IPagedResponse<IChannel>>}
*/
function searchChannels(options) {
options.httpMethod = "GET";
return request_1.request(`/channels`, options);
}
exports.searchChannels = searchChannels;
/**
* create channel

@@ -19,0 +9,0 @@ *

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DiscussionSettingType = exports.AclSubCategory = exports.AclCategory = exports.ChannelRelation = exports.ChannelSort = exports.PostType = exports.PostSort = exports.Role = exports.CommonSort = exports.ChannelFilter = exports.ReactionRelation = exports.PostRelation = exports.DiscussionSource = exports.DiscussionType = exports.PostStatus = exports.SharingAccess = exports.PostReaction = exports.SortOrder = void 0;
/**
* sort orders
*
* @export
* @enum {string}
*/
var SortOrder;
(function (SortOrder) {
SortOrder["ASC"] = "ASC";
SortOrder["DESC"] = "DESC";
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
/**
* reactions to posts
*
* @export
* @enum {string}
*/
var PostReaction;
(function (PostReaction) {
PostReaction["CLAPPING_HANDS"] = "clapping_hands";
PostReaction["CONFUSED"] = "confused";
PostReaction["DOWN_ARROW"] = "down_arrow";
PostReaction["EYES"] = "eyes";
PostReaction["FACE_WITH_TEARS_OF_JOY"] = "face_with_tears_of_joy";
PostReaction["FIRE"] = "fire";
PostReaction["GRINNING"] = "grinning";
PostReaction["HEART"] = "heart";
PostReaction["LAUGH"] = "laugh";
PostReaction["ONE_HUNDRED"] = "one_hundred";
PostReaction["PARTYING"] = "partying";
PostReaction["PARTY_POPPER"] = "party_popper";
PostReaction["RAISING_HANDS"] = "raising_hands";
PostReaction["ROCKET"] = "rocket";
PostReaction["SAD"] = "sad";
PostReaction["SLIGHTLY_SMILING"] = "slightly_smiling";
PostReaction["SURPRISED"] = "surprised";
PostReaction["THINKING"] = "thinking";
PostReaction["THUMBS_UP"] = "thumbs_up";
PostReaction["THUMBS_DOWN"] = "thumbs_down";
PostReaction["TROPHY"] = "trophy";
PostReaction["UP_ARROW"] = "up_arrow";
PostReaction["WAVING_HAND"] = "waving_hand";
PostReaction["WINKING"] = "winking";
PostReaction["WORLD_MAP"] = "world_map";
})(PostReaction = exports.PostReaction || (exports.PostReaction = {}));
/**
* platform sharing access values
*
* @export
* @enum {string}
*/
var SharingAccess;
(function (SharingAccess) {
SharingAccess["PUBLIC"] = "public";
SharingAccess["ORG"] = "org";
SharingAccess["PRIVATE"] = "private";
})(SharingAccess = exports.SharingAccess || (exports.SharingAccess = {}));
/**
* possible statuses of a post
*
* @export
* @enum {string}
*/
var PostStatus;
(function (PostStatus) {
PostStatus["PENDING"] = "pending";
PostStatus["APPROVED"] = "approved";
PostStatus["REJECTED"] = "rejected";
PostStatus["DELETED"] = "deleted";
PostStatus["HIDDEN"] = "hidden";
})(PostStatus = exports.PostStatus || (exports.PostStatus = {}));
/**
* possible discussionn content types, i.e. a post can be about an item, dataset, or group
*
* @export
* @enum {string}
*/
var DiscussionType;
(function (DiscussionType) {
DiscussionType["GROUP"] = "group";
DiscussionType["CONTENT"] = "content";
DiscussionType["BOARD"] = "board";
})(DiscussionType = exports.DiscussionType || (exports.DiscussionType = {}));
/**
* source of a post, i.e. app context
*
* @export
* @enum {string}
*/
var DiscussionSource;
(function (DiscussionSource) {
DiscussionSource["HUB"] = "hub";
DiscussionSource["AGO"] = "ago";
DiscussionSource["URBAN"] = "urban";
})(DiscussionSource = exports.DiscussionSource || (exports.DiscussionSource = {}));
/**
* relations of post entity
*
* @export
* @enum {string}
*/
var PostRelation;
(function (PostRelation) {
PostRelation["REPLIES"] = "replies";
PostRelation["REACTIONS"] = "reactions";
PostRelation["PARENT"] = "parent";
PostRelation["CHANNEL"] = "channel";
})(PostRelation = exports.PostRelation || (exports.PostRelation = {}));
/**
* relations of reaction entity
*
* @export
* @enum {string}
*/
var ReactionRelation;
(function (ReactionRelation) {
ReactionRelation["POST"] = "post";
})(ReactionRelation = exports.ReactionRelation || (exports.ReactionRelation = {}));
/**
* filters of channel entity
*
* @export
* @enum {string}
*/
var ChannelFilter;
(function (ChannelFilter) {
ChannelFilter["HAS_USER_POSTS"] = "has_user_posts";
})(ChannelFilter = exports.ChannelFilter || (exports.ChannelFilter = {}));
/**
* @export
* @enum {string}
*/
var CommonSort;
(function (CommonSort) {
CommonSort["CREATED_AT"] = "createdAt";
CommonSort["CREATOR"] = "creator";
CommonSort["EDITOR"] = "editor";
CommonSort["ID"] = "id";
CommonSort["UPDATED_AT"] = "updatedAt";
})(CommonSort = exports.CommonSort || (exports.CommonSort = {}));
/**
* Role types
*
* @export
* @enum {string}
*/
var Role;
(function (Role) {
Role["READ"] = "read";
Role["WRITE"] = "write";
Role["READWRITE"] = "readWrite";
Role["MODERATE"] = "moderate";
Role["MANAGE"] = "manage";
Role["OWNER"] = "owner";
})(Role = exports.Role || (exports.Role = {}));
/**
* Post sorting fields
*
* @export
* @enum {string}
*/
var PostSort;
(function (PostSort) {
PostSort["BODY"] = "body";
PostSort["CHANNEL_ID"] = "channelId";
PostSort["CREATED_AT"] = "createdAt";
PostSort["CREATOR"] = "creator";
PostSort["DISCUSSION"] = "discussion";
PostSort["EDITOR"] = "editor";
PostSort["ID"] = "id";
PostSort["PARENT_ID"] = "parentId";
PostSort["STATUS"] = "status";
PostSort["TITLE"] = "title";
PostSort["UPDATED_AT"] = "updatedAt";
})(PostSort = exports.PostSort || (exports.PostSort = {}));
/**
* Post types
*
* @export
* @enum{string}
*/
var PostType;
(function (PostType) {
PostType["Text"] = "text";
PostType["Announcement"] = "announcement";
PostType["Poll"] = "poll";
PostType["Question"] = "question";
})(PostType = exports.PostType || (exports.PostType = {}));
/**
* Channel sorting fields
*
* @export
* @enum {string}
*/
var ChannelSort;
(function (ChannelSort) {
ChannelSort["ACCESS"] = "access";
ChannelSort["CREATED_AT"] = "createdAt";
ChannelSort["CREATOR"] = "creator";
ChannelSort["EDITOR"] = "editor";
ChannelSort["ID"] = "id";
ChannelSort["LAST_ACTIVITY"] = "last_activity";
ChannelSort["UPDATED_AT"] = "updatedAt";
})(ChannelSort = exports.ChannelSort || (exports.ChannelSort = {}));
/**
* relations of channel entity
*
* @export
* @enum {string}
*/
var ChannelRelation;
(function (ChannelRelation) {
ChannelRelation["CHANNEL_ACL"] = "channelAcl";
})(ChannelRelation = exports.ChannelRelation || (exports.ChannelRelation = {}));
/**
* @export
* @enum {string}
*/
var AclCategory;
(function (AclCategory) {
AclCategory["GROUP"] = "group";
AclCategory["ORG"] = "org";
AclCategory["USER"] = "user";
AclCategory["ANONYMOUS_USER"] = "anonymousUser";
AclCategory["AUTHENTICATED_USER"] = "authenticatedUser";
})(AclCategory = exports.AclCategory || (exports.AclCategory = {}));
/**
* @export
* @enum {string}
*/
var AclSubCategory;
(function (AclSubCategory) {
AclSubCategory["ADMIN"] = "admin";
AclSubCategory["MEMBER"] = "member";
})(AclSubCategory = exports.AclSubCategory || (exports.AclSubCategory = {}));
/**
* @export
* @enum {string}
*/
var DiscussionSettingType;
(function (DiscussionSettingType) {
DiscussionSettingType["CONTENT"] = "content";
})(DiscussionSettingType = exports.DiscussionSettingType || (exports.DiscussionSettingType = {}));
var hub_common_1 = require("@esri/hub-common");
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return hub_common_1.SortOrder; } });
Object.defineProperty(exports, "PostReaction", { enumerable: true, get: function () { return hub_common_1.PostReaction; } });
Object.defineProperty(exports, "SharingAccess", { enumerable: true, get: function () { return hub_common_1.SharingAccess; } });
Object.defineProperty(exports, "PostStatus", { enumerable: true, get: function () { return hub_common_1.PostStatus; } });
Object.defineProperty(exports, "DiscussionType", { enumerable: true, get: function () { return hub_common_1.DiscussionType; } });
Object.defineProperty(exports, "DiscussionSource", { enumerable: true, get: function () { return hub_common_1.DiscussionSource; } });
Object.defineProperty(exports, "PostRelation", { enumerable: true, get: function () { return hub_common_1.PostRelation; } });
Object.defineProperty(exports, "ReactionRelation", { enumerable: true, get: function () { return hub_common_1.ReactionRelation; } });
Object.defineProperty(exports, "ChannelFilter", { enumerable: true, get: function () { return hub_common_1.ChannelFilter; } });
Object.defineProperty(exports, "CommonSort", { enumerable: true, get: function () { return hub_common_1.CommonSort; } });
Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return hub_common_1.Role; } });
Object.defineProperty(exports, "PostSort", { enumerable: true, get: function () { return hub_common_1.PostSort; } });
Object.defineProperty(exports, "PostType", { enumerable: true, get: function () { return hub_common_1.PostType; } });
Object.defineProperty(exports, "ChannelSort", { enumerable: true, get: function () { return hub_common_1.ChannelSort; } });
Object.defineProperty(exports, "ChannelRelation", { enumerable: true, get: function () { return hub_common_1.ChannelRelation; } });
Object.defineProperty(exports, "AclCategory", { enumerable: true, get: function () { return hub_common_1.AclCategory; } });
Object.defineProperty(exports, "AclSubCategory", { enumerable: true, get: function () { return hub_common_1.AclSubCategory; } });
Object.defineProperty(exports, "DiscussionSettingType", { enumerable: true, get: function () { return hub_common_1.DiscussionSettingType; } });
//# sourceMappingURL=types.js.map

@@ -1,11 +0,4 @@

import { ISearchChannelsParams, ICreateChannelParams, IFetchChannelParams, IUpdateChannelParams, IRemoveChannelParams, IChannel, IRemoveChannelResponse, IFetchChannelNotificationOptOutParams, ICreateChannelNotificationOptOutParams, IRemoveChannelNotificationOptOutParams, IRemoveChannelActivityParams, IPagedResponse, IRemoveChannelNotificationOptOutResult, IRemoveChannelActivityResult, IChannelNotificationOptOut } from "../types";
import { ICreateChannelParams, IFetchChannelParams, IUpdateChannelParams, IRemoveChannelParams, IChannel, IRemoveChannelResponse, IFetchChannelNotificationOptOutParams, ICreateChannelNotificationOptOutParams, IRemoveChannelNotificationOptOutParams, IRemoveChannelActivityParams, IRemoveChannelNotificationOptOutResult, IRemoveChannelActivityResult, IChannelNotificationOptOut } from "../types";
export { searchChannels } from "@esri/hub-common";
/**
* search channels
*
* @export
* @param {ISearchChannelsParams} options
* @return {*} {Promise<IPagedResponse<IChannel>>}
*/
export declare function searchChannels(options: ISearchChannelsParams): Promise<IPagedResponse<IChannel>>;
/**
* create channel

@@ -12,0 +5,0 @@ *

@@ -1,986 +0,1 @@

import { IPagingParams, IPagedResponse as IRestPagedResponse, IUser } from "@esri/arcgis-rest-types";
import { IHubRequestOptions } from "@esri/hub-common";
import { Geometry } from "geojson";
/**
* sort orders
*
* @export
* @enum {string}
*/
export declare enum SortOrder {
ASC = "ASC",
DESC = "DESC"
}
/**
* reactions to posts
*
* @export
* @enum {string}
*/
export declare enum PostReaction {
CLAPPING_HANDS = "clapping_hands",
CONFUSED = "confused",
DOWN_ARROW = "down_arrow",
EYES = "eyes",
FACE_WITH_TEARS_OF_JOY = "face_with_tears_of_joy",
FIRE = "fire",
GRINNING = "grinning",
HEART = "heart",
LAUGH = "laugh",
ONE_HUNDRED = "one_hundred",
PARTYING = "partying",
PARTY_POPPER = "party_popper",
RAISING_HANDS = "raising_hands",
ROCKET = "rocket",
SAD = "sad",
SLIGHTLY_SMILING = "slightly_smiling",
SURPRISED = "surprised",
THINKING = "thinking",
THUMBS_UP = "thumbs_up",
THUMBS_DOWN = "thumbs_down",
TROPHY = "trophy",
UP_ARROW = "up_arrow",
WAVING_HAND = "waving_hand",
WINKING = "winking",
WORLD_MAP = "world_map"
}
/**
* platform sharing access values
*
* @export
* @enum {string}
*/
export declare enum SharingAccess {
PUBLIC = "public",
ORG = "org",
PRIVATE = "private"
}
/**
* representation of AGOL platform sharing ACL
* NOTE: orgs is an array to enable future org-org sharing/discussion
*
* @export
* @interface IPlatformSharing
*/
export interface IPlatformSharing {
groups: string[];
orgs: string[];
access: SharingAccess;
}
/**
* possible statuses of a post
*
* @export
* @enum {string}
*/
export declare enum PostStatus {
PENDING = "pending",
APPROVED = "approved",
REJECTED = "rejected",
DELETED = "deleted",
HIDDEN = "hidden"
}
/**
* possible discussionn content types, i.e. a post can be about an item, dataset, or group
*
* @export
* @enum {string}
*/
export declare enum DiscussionType {
GROUP = "group",
CONTENT = "content",
BOARD = "board"
}
/**
* source of a post, i.e. app context
*
* @export
* @enum {string}
*/
export declare enum DiscussionSource {
HUB = "hub",
AGO = "ago",
URBAN = "urban"
}
/**
* named parts of a discussion URI, follows this convention:
* ${source}://${type}/${id}_${layer}?features=${...features}&attribute=${attribute}
*
* coarse-grained uri - hub://item/ab3 -- commenting from hub about item ab3
* --
* fine-grained uri - hub://dataset/3ef_0?features=10,32&attribute=species -- commenting from
* hub about species attribute of features id 10 & 32 in dataset 3ef layer 0
*
* @export
* @interface IDiscussionParams
*/
export interface IDiscussionParams {
source: string | null;
type: string | null;
id: string | null;
layer: string | null;
features: string[] | null;
attribute: string | null;
}
/**
* relations of post entity
*
* @export
* @enum {string}
*/
export declare enum PostRelation {
REPLIES = "replies",
REACTIONS = "reactions",
PARENT = "parent",
CHANNEL = "channel"
}
/**
* relations of reaction entity
*
* @export
* @enum {string}
*/
export declare enum ReactionRelation {
POST = "post"
}
/**
* filters of channel entity
*
* @export
* @enum {string}
*/
export declare enum ChannelFilter {
HAS_USER_POSTS = "has_user_posts"
}
/**
* @export
* @enum {string}
*/
export declare enum CommonSort {
CREATED_AT = "createdAt",
CREATOR = "creator",
EDITOR = "editor",
ID = "id",
UPDATED_AT = "updatedAt"
}
/**
* creator property
*
* @export
* @interface IWithAuthor
*/
export interface IWithAuthor {
creator: string;
}
/**
* editor property
*
* @export
* @interface IWithEditor
*/
export interface IWithEditor {
editor: string;
}
/**
* sorting properties
*
* @export
* @interface IWithSorting
*/
export interface IWithSorting<SortEnum> {
sortBy: SortEnum;
sortOrder: SortOrder;
}
/**
* filtering properties
*
* @export
* @interface IWithFiltering
*/
export interface IWithFiltering<FilterEnum> {
filterBy: FilterEnum;
}
/**
* properties that enable temporal querying
*
* @export
* @interface IWithTimeQueries
*/
export interface IWithTimeQueries {
createdBefore: Date;
createdAfter: Date;
updatedBefore: Date;
updatedAfter: Date;
}
/**
* temporal properties
*
* @export
* @interface IWithTimestamps
*/
export interface IWithTimestamps {
createdAt: Date;
updatedAt: Date;
}
/**
* paginated response properties
*
* @export
* @interface IPagedResponse
* @extends {IRestPagedResponse}
* @template PaginationObject
*/
export interface IPagedResponse<PaginationObject> extends IRestPagedResponse {
items: PaginationObject[];
}
/**
* delete notifications opt out response properties
*
* @export
* @interface IRemoveChannelNotificationOptOutResult
*/
export interface IRemoveChannelNotificationOptOutResult {
success: boolean;
channelId: string;
username: string;
}
/**
* delete channel activity response properties
*
* @export
* @interface IRemoveChannelActivityResult
*/
export interface IRemoveChannelActivityResult {
success: boolean;
channelId: string;
username: string;
}
/**
* opt out response properties
*
* @export
* @interface IChannelNotificationOptOut
*/
export interface IChannelNotificationOptOut {
channelId: string;
username: string;
}
/**
* options for making requests against Discussion API
*
* @export
* @interface IDiscussionsRequestOptions
* @extends {RequestInit}
*/
export interface IDiscussionsRequestOptions extends Omit<IHubRequestOptions, "httpMethod" | "isPortal">, Pick<RequestInit, "mode" | "cache" | "credentials"> {
httpMethod?: "GET" | "POST" | "PATCH" | "DELETE";
isPortal?: boolean;
token?: string;
data?: {
[key: string]: any;
};
}
/**
* Role types
*
* @export
* @enum {string}
*/
export declare enum Role {
READ = "read",
WRITE = "write",
READWRITE = "readWrite",
MODERATE = "moderate",
MANAGE = "manage",
OWNER = "owner"
}
/**
* Interface representing the meta data associated with a discussions
* mention email
*
* @export
* @interface IDiscussionsMentionMeta
*/
export interface IDiscussionsMentionMeta {
channelId: string;
discussion: string;
postId: string;
replyId?: string;
}
/**
* @export
* @interface IDiscussionsUser
* @extends {IUser}
*/
export interface IDiscussionsUser extends IUser {
username?: string | null;
}
/**
* representation of reaction from the service
*
* @export
* @interface IReaction
* @extends {IWithAuthor}
* @extends {IWithEditor}
* @extends {IWithTimestamps}
*/
export interface IReaction extends IWithAuthor, IWithEditor, IWithTimestamps {
id: string;
value: PostReaction;
postId?: string;
post?: IPost;
}
/**
* dto for creating a reaction
*
* @export
* @interface ICreateReaction
*/
export interface ICreateReaction {
postId: string;
value: PostReaction;
}
/**
* request options for creating a reaction to a post
*
* @export
* @interface ICreateReactionOptions
* @extends {IHubRequestOptions}
*/
export interface ICreateReactionOptions extends IDiscussionsRequestOptions {
data: ICreateReaction;
}
/**
* request options for deleting a reaction
*
* @export
* @interface IRemoveReactionOptions
* @extends {IHubRequestOptions}
*/
export interface IRemoveReactionOptions extends IDiscussionsRequestOptions {
reactionId: string;
}
/**
* delete reaction response properties
*
* @export
* @interface IRemoveReactionResponse
*/
export interface IRemoveReactionResponse {
success: boolean;
reactionId: string;
}
/**
* Post sorting fields
*
* @export
* @enum {string}
*/
export declare enum PostSort {
BODY = "body",
CHANNEL_ID = "channelId",
CREATED_AT = "createdAt",
CREATOR = "creator",
DISCUSSION = "discussion",
EDITOR = "editor",
ID = "id",
PARENT_ID = "parentId",
STATUS = "status",
TITLE = "title",
UPDATED_AT = "updatedAt"
}
/**
* Post types
*
* @export
* @enum{string}
*/
export declare enum PostType {
Text = "text",
Announcement = "announcement",
Poll = "poll",
Question = "question"
}
/**
* representation of post from service
*
* @export
* @interface IPost
* @extends {IWithAuthor}
* @extends {IWithEditor}
* @extends {IWithTimestamps}
*/
export interface IPost extends Partial<IWithAuthor>, Partial<IWithEditor>, IWithTimestamps {
id: string;
title: string | null;
body: string;
status: PostStatus;
appInfo: string | null;
discussion: string | null;
geometry: Geometry | null;
featureGeometry: Geometry | null;
postType: PostType;
channelId?: string;
channel?: IChannel;
parentId?: string;
parent?: IPost | null;
replies?: IPost[] | IPagedResponse<IPost>;
replyCount?: number;
reactions?: IReaction[];
}
/**
* base parameters for creating a post
*
* @export
* @interface IPostOptions
*/
export interface IPostOptions {
body: string;
title?: string;
discussion?: string;
geometry?: Geometry;
featureGeometry?: Geometry;
appInfo?: string;
asAnonymous?: boolean;
}
/**
* dto for creating a post in a known channel
*
* @export
* @interface ICreatePost
* @extends {IPostOptions}
*/
export interface ICreatePost extends IPostOptions {
channelId: string;
}
/**
* dto for creating a post in a unknown or not yet created channel
*
* @export
* @interface ICreateChannelPost
* @extends {IPostOptions}
* @extends {ICreateChannel}
*/
export interface ICreateChannelPost extends IPostOptions, ICreateChannel {
}
/**
* request options for creating post
*
* @export
* @interface ICreatePostParams
* @extends {IHubRequestOptions}
*/
export interface ICreatePostParams extends IDiscussionsRequestOptions {
data: ICreatePost | ICreateChannelPost;
mentionUrl?: string;
}
/**
* request options for creating reply to post
*
* @export
* @interface ICreateReplyParams
* @extends {IHubRequestOptions}
*/
export interface ICreateReplyParams extends IDiscussionsRequestOptions {
postId: string;
data: IPostOptions;
mentionUrl?: string;
}
/**
* dto for decorating found post with relations
*
* @export
* @interface IFetchPost
*/
export interface IFetchPost {
relations?: PostRelation[];
}
/**
* dto for querying posts in a single channel
*
* @export
* @interface ISearchChannelPosts
* @extends {Partial<IWithAuthor>}
* @extends {Partial<IWithEditor>}
* @extends {Partial<IPagingParams>}
* @extends {Partial<IWithSorting<PostSort>>}
* @extends {Partial<IWithTimeQueries>}
*/
export interface ISearchPosts extends Partial<IWithAuthor>, Partial<IWithEditor>, Partial<IPagingParams>, Partial<IWithSorting<PostSort>>, Partial<IWithTimeQueries> {
title?: string;
body?: string;
discussion?: string;
geometry?: Geometry;
featureGeometry?: Geometry;
parents?: Array<string | null>;
status?: PostStatus[];
relations?: PostRelation[];
groups?: string[];
access?: SharingAccess[];
channels?: string[];
}
/**
* dto for updating a post's status
*
* @export
* @interface IUpdatePostStatus
*/
export interface IUpdatePostStatus {
status: PostStatus;
}
/**
* dto for updating a post's content
*
* @export
* @interface IUpdatePost
*/
export interface IUpdatePost {
title?: string;
body?: string;
discussion?: string | null;
geometry?: Geometry | null;
featureGeometry?: Geometry | null;
appInfo?: string | null;
}
/**
* request options for querying posts
*
* @export
* @interface ISearchPostsParams
* @extends {IDiscussionsRequestOptions}
*/
export interface ISearchPostsParams extends IDiscussionsRequestOptions {
data?: ISearchPosts;
}
/**
* request params for getting post
*
* @export
* @interface IFetchPostParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IFetchPostParams extends IDiscussionsRequestOptions {
postId: string;
data?: IFetchPost;
}
/**
* request options for updating post
*
* @export
* @interface IUpdatePostParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IUpdatePostParams extends IDiscussionsRequestOptions {
postId: string;
data: IUpdatePost;
mentionUrl?: string;
}
/**
* request options for updating a post's status
*
* @export
* @interface IUpdatePostStatusParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IUpdatePostStatusParams extends IDiscussionsRequestOptions {
postId: string;
data: IUpdatePostStatus;
}
/**
* request options for deleting a post
*
* @export
* @interface IRemovePostParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IRemovePostParams extends IDiscussionsRequestOptions {
postId: string;
}
/**
* delete post response properties
*
* @export
* @interface IRemovePostResponse
*/
export interface IRemovePostResponse {
success: boolean;
postId: string;
}
/**
* Channel sorting fields
*
* @export
* @enum {string}
*/
export declare enum ChannelSort {
ACCESS = "access",
CREATED_AT = "createdAt",
CREATOR = "creator",
EDITOR = "editor",
ID = "id",
LAST_ACTIVITY = "last_activity",
UPDATED_AT = "updatedAt"
}
/**
* relations of channel entity
*
* @export
* @enum {string}
*/
export declare enum ChannelRelation {
CHANNEL_ACL = "channelAcl"
}
/**
* @export
* @enum {string}
*/
export declare enum AclCategory {
GROUP = "group",
ORG = "org",
USER = "user",
ANONYMOUS_USER = "anonymousUser",
AUTHENTICATED_USER = "authenticatedUser"
}
/**
* @export
* @enum {string}
*/
export declare enum AclSubCategory {
ADMIN = "admin",
MEMBER = "member"
}
/**
* request option for creating a channel ACL permission
*
* @export
* @interface IChannelAclPermissionDefinition
*/
export interface IChannelAclPermissionDefinition {
category: AclCategory;
subCategory?: AclSubCategory;
key?: string;
role: Role;
restrictedBefore?: string;
}
/**
* request option for updating a channel ACL permission
*
* @export
* @interface IChannelAclPermissionUpdateDefinition
* @extends {IChannelAclPermissionDefinition}
*/
export interface IChannelAclPermissionUpdateDefinition extends IChannelAclPermissionDefinition {
channelId: string;
}
/**
* representation of channel Acl permission from service
*
* @export
* @interface IChannelAclPermission
* @extends {IChannelAclDefinition}
* @extends {IWithAuthor}
* @extends {IWithEditor}
* @extends {IWithTimestamps}
*/
export interface IChannelAclPermission extends Omit<IChannelAclPermissionDefinition, "restrictedBefore">, IWithAuthor, IWithEditor, IWithTimestamps {
id: string;
restrictedBefore: string;
}
/**
* settings parameters for creating a channel
*
* @export
* @interface ICreateChannelSettings
*/
export interface ICreateChannelSettings {
allowedReactions?: PostReaction[];
allowReaction?: boolean;
allowReply?: boolean;
blockWords?: string[];
defaultPostStatus?: PostStatus;
metadata?: IChannelMetadata;
name?: string;
softDelete?: boolean;
}
/**
* @export
* @interface IChannelMetadata
*/
export interface IChannelMetadata {
guidelineUrl?: string | null;
}
/**
* permissions parameters for creating a channel
*
* @export
* @interface ICreateChannelPermissions
*/
export interface ICreateChannelPermissions {
access?: SharingAccess;
allowAnonymous?: boolean;
groups?: string[];
orgs?: string[];
/**
* Not available until the V2 Api is released
* @hidden
*/
channelAclDefinition?: IChannelAclPermissionDefinition[];
}
/**
* permissions parameters for updating a channel
*
* @export
* @interface IUpdateChannelPermissions
*/
export interface IUpdateChannelPermissions {
access?: SharingAccess;
allowAnonymous?: boolean;
}
/**
* permissions and settings options for creating a channel
*
* @export
* @interface ICreateChannel
* @extends {ICreateChannelSettings}
* @extends {ICreateChannelPermissions}
*/
export interface ICreateChannel extends ICreateChannelSettings, ICreateChannelPermissions {
}
/**
* representation of channel from service
*
* @export
* @interface IChannel
* @extends {IWithAuthor}
* @extends {IWithEditor}
* @extends {IWithTimestamps}
*/
export interface IChannel extends IWithAuthor, IWithEditor, IWithTimestamps {
access: SharingAccess;
allowAnonymous: boolean;
allowedReactions: PostReaction[] | null;
allowReaction: boolean;
allowReply: boolean;
blockWords: string[] | null;
channelAcl?: IChannelAclPermission[];
defaultPostStatus: PostStatus;
groups: string[];
metadata: IChannelMetadata | null;
id: string;
name: string | null;
orgs: string[];
posts?: IPost[];
softDelete: boolean;
}
/**
* parameters/options for updating channel settings
*
* @export
* @interface IUpdateChannel
* @extends {ICreateChannelSettings}
* @extends {IUpdateChannelPermissions}
* @extends {Partial<IWithAuthor>}
*/
export interface IUpdateChannel extends ICreateChannelSettings, IUpdateChannelPermissions, Partial<IWithAuthor> {
}
/**
* dto for decorating found channel with relations
*
* @export
* @interface IFetchChannel
*/
export interface IFetchChannel {
relations?: ChannelRelation[];
}
/**
* dto for querying channels
*
* @export
* @interface ISearchChannels
* @extends {Partial<IPagingParams>}
* @extends {Partial<IWithSorting<ChannelSort>>}
* @extends {Partial<IWithTimeQueries>}
* @extends {Partial<IWithFiltering<ChannelFilter>>}
*/
export interface ISearchChannels extends Partial<IPagingParams>, Partial<IWithSorting<ChannelSort>>, Partial<IWithTimeQueries>, Partial<IWithFiltering<ChannelFilter>> {
groups?: string[];
access?: SharingAccess[];
relations?: ChannelRelation[];
}
/**
* request params for creating a channel
*
* @export
* @interface ICreateChannelParams
* @extends {IDiscussionsRequestOptions}
*/
export interface ICreateChannelParams extends IDiscussionsRequestOptions {
data: ICreateChannel;
}
/**
* request params for getting a channel
*
* @export
* @interface IFetchChannelParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IFetchChannelParams extends IDiscussionsRequestOptions {
channelId: string;
data?: IFetchChannel;
}
/**
* request params for searching channels
*
* @export
* @interface ISearchChannelsParams
* @extends {IDiscussionsRequestOptions}
*/
export interface ISearchChannelsParams extends IDiscussionsRequestOptions {
data?: ISearchChannels;
}
/**
* request params for updating a channel's settings
*
* @export
* @interface IUpdateChannelParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IUpdateChannelParams extends IDiscussionsRequestOptions {
channelId: string;
data: IUpdateChannel;
}
/**
* request params for deleting a channel
*
* @export
* @interface IRemoveChannelParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IRemoveChannelParams extends IDiscussionsRequestOptions {
channelId: string;
}
/**
* delete channel response properties
*
* @export
* @interface IRemoveChannelResponse
*/
export interface IRemoveChannelResponse {
success: boolean;
channelId: string;
}
/**
* request params for fetching opt out status
*
* @export
* @interface IFetchChannelNotificationOptOutParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IFetchChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
channelId: string;
}
/**
* request params for opting out
*
* @export
* @interface ICreateChannelNotificationOptOutParams
* @extends {IDiscussionsRequestOptions}
*/
export interface ICreateChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
channelId: string;
}
/**
* request params for opting back in
*
* @export
* @interface IRemoveChannelNotificationOptOutParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IRemoveChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
channelId: string;
}
/**
* request params for deleting channel activity
*
* @export
* @interface IRemoveChannelActivityParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IRemoveChannelActivityParams extends IDiscussionsRequestOptions {
channelId: string;
}
/**
* representation of a discussion setting record from the service
*
* @export
* @interface IDiscussionSetting
* @extends {IWithAuthor}
* @extends {IWithEditor}
* @extends {IWithTimestamps}
*/
export interface IDiscussionSetting extends IWithAuthor, IWithEditor, IWithTimestamps {
id: string;
type: DiscussionSettingType;
settings: ISettings;
}
/**
* @export
* @enum {string}
*/
export declare enum DiscussionSettingType {
CONTENT = "content"
}
/**
* @export
* @interface ISettings
*/
export interface ISettings {
allowedChannelIds: string[] | null;
}
/**
* @export
* @interface IRemoveDiscussionSettingResponse
*/
export interface IRemoveDiscussionSettingResponse {
id: string;
success: boolean;
}
/**
* @export
* @interface ICreateDiscussionSetting
*/
export interface ICreateDiscussionSetting {
id: string;
type: DiscussionSettingType;
settings: ISettings;
}
/**
* parameters for creating a discussionSetting
*
* @export
* @interface ICreateDiscussionSettingParams
* @extends {IDiscussionsRequestOptions}
*/
export interface ICreateDiscussionSettingParams extends IDiscussionsRequestOptions {
data: ICreateDiscussionSetting;
}
/**
* parameters for fetching a discussionSetting
*
* @export
* @interface IFetchDiscussionSettingParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IFetchDiscussionSettingParams extends IDiscussionsRequestOptions {
id: string;
}
/**
* parameters for removing a discussionSetting
*
* @export
* @interface IRemoveDiscussionSettingParams
* @extends {IDiscussionsRequestOptions}
*/
export interface IRemoveDiscussionSettingParams extends IDiscussionsRequestOptions {
id: string;
}
export { SortOrder, PostReaction, SharingAccess, IPlatformSharing, PostStatus, DiscussionType, DiscussionSource, IDiscussionParams, PostRelation, ReactionRelation, ChannelFilter, CommonSort, IWithAuthor, IWithEditor, IWithSorting, IWithFiltering, IWithTimeQueries, IWithTimestamps, IPagedResponse, IRemoveChannelNotificationOptOutResult, IRemoveChannelActivityResult, IChannelNotificationOptOut, IDiscussionsRequestOptions, Role, IDiscussionsMentionMeta, IDiscussionsUser, IReaction, ICreateReaction, ICreateReactionOptions, IRemoveReactionOptions, IRemoveReactionResponse, PostSort, PostType, IPost, IPostOptions, ICreatePost, ICreateChannelPost, ICreatePostParams, ICreateReplyParams, IFetchPost, ISearchPosts, IUpdatePostStatus, IUpdatePost, ISearchPostsParams, IFetchPostParams, IUpdatePostParams, IUpdatePostStatusParams, IRemovePostParams, IRemovePostResponse, ChannelSort, ChannelRelation, AclCategory, AclSubCategory, IChannelAclPermissionDefinition, IChannelAclPermissionUpdateDefinition, IChannelAclPermission, ICreateChannelSettings, IChannelMetadata, ICreateChannelPermissions, IUpdateChannelPermissions, ICreateChannel, IChannel, IUpdateChannel, IFetchChannel, ISearchChannels, ICreateChannelParams, IFetchChannelParams, ISearchChannelsParams, IUpdateChannelParams, IRemoveChannelParams, IRemoveChannelResponse, IFetchChannelNotificationOptOutParams, ICreateChannelNotificationOptOutParams, IRemoveChannelNotificationOptOutParams, IRemoveChannelActivityParams, IDiscussionSetting, DiscussionSettingType, ISettings, IRemoveDiscussionSettingResponse, ICreateDiscussionSetting, ICreateDiscussionSettingParams, IFetchDiscussionSettingParams, IRemoveDiscussionSettingParams, } from "@esri/hub-common";

2

package.json
{
"name": "@esri/hub-discussions",
"version": "25.6.0",
"version": "25.7.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc