-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathnews_item.py
More file actions
77 lines (54 loc) · 2.44 KB
/
news_item.py
File metadata and controls
77 lines (54 loc) · 2.44 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["NewsItem", "NewsfeedAssignment"]
class NewsfeedAssignment(BaseModel):
newsfeed_id: Optional[int] = None
"""The unique identifier for the newsfeed which is given by Intercom.
Publish dates cannot be in the future, to schedule news items use the dedicated
feature in app (see this article).
"""
published_at: Optional[int] = None
"""
Publish date of the news item on the newsfeed, use this field if you want to set
a publish date in the past (e.g. when importing existing news items). On write,
this field will be ignored if the news item state is "draft".
"""
class NewsItem(BaseModel):
id: Optional[str] = None
"""The unique identifier for the news item which is given by Intercom."""
body: Optional[str] = None
"""The news item body, which may contain HTML."""
cover_image_url: Optional[str] = None
"""URL of the image used as cover. Must have .jpg or .png extension."""
created_at: Optional[int] = None
"""Timestamp for when the news item was created."""
deliver_silently: Optional[bool] = None
"""
When set to true, the news item will appear in the messenger newsfeed without
showing a notification badge.
"""
labels: Optional[List[Optional[str]]] = None
"""Label names displayed to users to categorize the news item."""
newsfeed_assignments: Optional[List[NewsfeedAssignment]] = None
"""A list of newsfeed_assignments to assign to the specified newsfeed."""
reactions: Optional[List[Optional[str]]] = None
"""Ordered list of emoji reactions to the news item.
When empty, reactions are disabled.
"""
sender_id: Optional[int] = None
"""The id of the sender of the news item. Must be a teammate on the workspace."""
state: Optional[Literal["draft", "live"]] = None
"""
News items will not be visible to your users in the assigned newsfeeds until
they are set live.
"""
title: Optional[str] = None
"""The title of the news item."""
type: Optional[Literal["news-item"]] = None
"""The type of object."""
updated_at: Optional[int] = None
"""Timestamp for when the news item was last updated."""
workspace_id: Optional[str] = None
"""The id of the workspace which the news item belongs to."""