/
feedObject.ts
57 lines (55 loc) · 1.42 KB
/
feedObject.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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[];
}
/**
* 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;
}