UNPKG

@selfcommunity/api-services

Version:
73 lines (72 loc) 1.93 kB
import { BaseGetParams } from './baseParams'; import { SCContributionLocation, SCPollType } from '@selfcommunity/types'; /** * FeedObjGetParams interface */ export interface FeedObjGetParams extends BaseGetParams { /** * Which field to use when ordering the results. For sorting desc use - in front of the field name. Default to -added_at. Available values are added_at, last_activity_at */ ordering?: string; } export interface FeedObjCreateParams { /** * The title of the feed obj (type discussion or post). */ title: string; /** * This field replaces title field for feed objs of type 'status'. */ action?: string; /** * The content of the feed obj in html format, it can contain some mentions. */ text?: string; /** * List of category ids */ categories: number[]; /** * List o media ids */ medias?: number[]; /** * The Locality object to associate to the feed obj. */ location: SCContributionLocation; /** * The poll to associate to the feed obj. * IMPORTANT: it can be used only for feed obj types: 'discussion' or 'post'. */ poll?: SCPollType | null; /** * The list of tag ids. */ addressing?: number[]; /** * If the feed obj is not published yet */ draft?: boolean; } /** * FeedObjectPollVotesSearch interface */ export interface FeedObjectPollVotesSearch extends BaseGetParams { /** * The choice id of the poll. If is specified the endpoint retrieves the votes of only that choice */ choice?: number; } /** * ScheduledFeedObjParams interface */ export interface ScheduledFeedObjParams { /** * Includes posts that were scheduled and already published */ include_published?: boolean; /** * Show only posts that were scheduled and already published */ only_published?: boolean; }