lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +178 -14
- package/dist/http.js +296 -98
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/dist/interfaces/aggregates.d.ts +1 -0
- package/dist/interfaces/api/comment.d.ts +47 -45
- package/dist/interfaces/api/comment.js +349 -0
- package/dist/interfaces/api/community.d.ts +56 -48
- package/dist/interfaces/api/community.js +433 -0
- package/dist/interfaces/api/index.js +5 -1
- package/dist/interfaces/api/person.d.ts +132 -102
- package/dist/interfaces/api/person.js +910 -0
- package/dist/interfaces/api/post.d.ts +71 -54
- package/dist/interfaces/api/post.js +453 -0
- package/dist/interfaces/api/site.d.ts +127 -98
- package/dist/interfaces/api/site.js +985 -0
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +101 -93
- package/dist/interfaces/others.js +162 -59
- package/dist/interfaces/source.d.ts +113 -77
- package/dist/interfaces/source.js +809 -0
- package/dist/interfaces/views.d.ts +79 -40
- package/dist/interfaces/views.js +599 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +18 -0
- package/dist/websocket.d.ts +33 -14
- package/dist/websocket.js +49 -19
- package/package.json +17 -14
package/dist/interfaces/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Option } from "@sniptt/monads";
|
1
2
|
export declare const VERSION = "v3";
|
2
3
|
/**
|
3
4
|
* All of the websocket operations available.
|
@@ -15,16 +16,16 @@ export declare enum UserOperation {
|
|
15
16
|
EditComment = 9,
|
16
17
|
DeleteComment = 10,
|
17
18
|
RemoveComment = 11,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
SaveComment = 12,
|
20
|
+
CreateCommentLike = 13,
|
21
|
+
GetPosts = 14,
|
22
|
+
CreatePostLike = 15,
|
23
|
+
EditPost = 16,
|
24
|
+
DeletePost = 17,
|
25
|
+
RemovePost = 18,
|
26
|
+
LockPost = 19,
|
27
|
+
StickyPost = 20,
|
28
|
+
MarkPostAsRead = 21,
|
28
29
|
SavePost = 22,
|
29
30
|
EditCommunity = 23,
|
30
31
|
DeleteCommunity = 24,
|
@@ -34,65 +35,75 @@ export declare enum UserOperation {
|
|
34
35
|
GetReplies = 28,
|
35
36
|
GetPersonMentions = 29,
|
36
37
|
MarkPersonMentionAsRead = 30,
|
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
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
38
|
+
MarkCommentReplyAsRead = 31,
|
39
|
+
GetModlog = 32,
|
40
|
+
BanFromCommunity = 33,
|
41
|
+
AddModToCommunity = 34,
|
42
|
+
CreateSite = 35,
|
43
|
+
EditSite = 36,
|
44
|
+
GetSite = 37,
|
45
|
+
AddAdmin = 38,
|
46
|
+
GetUnreadRegistrationApplicationCount = 39,
|
47
|
+
ListRegistrationApplications = 40,
|
48
|
+
ApproveRegistrationApplication = 41,
|
49
|
+
BanPerson = 42,
|
50
|
+
GetBannedPersons = 43,
|
51
|
+
Search = 44,
|
52
|
+
ResolveObject = 45,
|
53
|
+
MarkAllAsRead = 46,
|
54
|
+
SaveUserSettings = 47,
|
55
|
+
TransferCommunity = 48,
|
56
|
+
LeaveAdmin = 49,
|
57
|
+
DeleteAccount = 50,
|
58
|
+
PasswordReset = 51,
|
59
|
+
PasswordChange = 52,
|
60
|
+
CreatePrivateMessage = 53,
|
61
|
+
EditPrivateMessage = 54,
|
62
|
+
DeletePrivateMessage = 55,
|
63
|
+
MarkPrivateMessageAsRead = 56,
|
64
|
+
GetPrivateMessages = 57,
|
65
|
+
UserJoin = 58,
|
66
|
+
GetComments = 59,
|
67
|
+
PostJoin = 60,
|
68
|
+
CommunityJoin = 61,
|
69
|
+
ChangePassword = 62,
|
70
|
+
GetSiteMetadata = 63,
|
71
|
+
BlockCommunity = 64,
|
72
|
+
BlockPerson = 65,
|
73
|
+
PurgePerson = 66,
|
74
|
+
PurgeCommunity = 67,
|
75
|
+
PurgePost = 68,
|
76
|
+
PurgeComment = 69,
|
77
|
+
CreateCommentReport = 70,
|
78
|
+
ResolveCommentReport = 71,
|
79
|
+
ListCommentReports = 72,
|
80
|
+
CreatePostReport = 73,
|
81
|
+
ResolvePostReport = 74,
|
82
|
+
ListPostReports = 75,
|
83
|
+
GetReportCount = 76,
|
84
|
+
GetUnreadCount = 77,
|
85
|
+
VerifyEmail = 78
|
82
86
|
}
|
83
87
|
/**
|
84
|
-
* Different sort types used in lemmy.
|
88
|
+
* Different post sort types used in lemmy.
|
85
89
|
*/
|
86
90
|
export declare enum SortType {
|
87
91
|
/**
|
88
|
-
* Posts sorted by
|
92
|
+
* Posts sorted by hot, but bumped by new comments up to 2 days
|
89
93
|
*/
|
90
94
|
Active = "Active",
|
91
95
|
/**
|
92
|
-
* Posts sorted by
|
96
|
+
* Posts sorted by a decaying rank.
|
93
97
|
*/
|
94
98
|
Hot = "Hot",
|
99
|
+
/**
|
100
|
+
* Posts sorted by the published time.
|
101
|
+
*/
|
95
102
|
New = "New",
|
103
|
+
/**
|
104
|
+
* Posts sorted by the published time ascending
|
105
|
+
*/
|
106
|
+
Old = "Old",
|
96
107
|
/**
|
97
108
|
* The top posts for this last day.
|
98
109
|
*/
|
@@ -122,6 +133,27 @@ export declare enum SortType {
|
|
122
133
|
*/
|
123
134
|
NewComments = "NewComments"
|
124
135
|
}
|
136
|
+
/**
|
137
|
+
* Different comment sort types used in lemmy.
|
138
|
+
*/
|
139
|
+
export declare enum CommentSortType {
|
140
|
+
/**
|
141
|
+
* Comments sorted by a decaying rank.
|
142
|
+
*/
|
143
|
+
Hot = "Hot",
|
144
|
+
/**
|
145
|
+
* Comments sorted by top score.
|
146
|
+
*/
|
147
|
+
Top = "Top",
|
148
|
+
/**
|
149
|
+
* Comments sorted by new.
|
150
|
+
*/
|
151
|
+
New = "New",
|
152
|
+
/**
|
153
|
+
* Comments sorted by old.
|
154
|
+
*/
|
155
|
+
Old = "Old"
|
156
|
+
}
|
125
157
|
/**
|
126
158
|
* The different listing types for post and comment fetches.
|
127
159
|
*/
|
@@ -143,44 +175,20 @@ export declare enum SearchType {
|
|
143
175
|
Url = "Url"
|
144
176
|
}
|
145
177
|
/**
|
146
|
-
*
|
147
|
-
* Can be used like:
|
148
|
-
*
|
149
|
-
* ```ts
|
150
|
-
* if (op == UserOperation.Search) {
|
151
|
-
* let data = wsJsonToRes<SearchResponse>(msg).data;
|
152
|
-
* }
|
153
|
-
* ```
|
178
|
+
* Different Subscribed states
|
154
179
|
*/
|
155
|
-
export
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
*
|
160
|
-
* The correct response type if given is in [[LemmyHttp]].
|
161
|
-
*/
|
162
|
-
data: ResponseType;
|
163
|
-
}
|
164
|
-
/**
|
165
|
-
* A websocket JSON response that includes the errors.
|
166
|
-
*/
|
167
|
-
export interface WebSocketJsonResponse<ResponseType> {
|
168
|
-
op?: string;
|
169
|
-
/**
|
170
|
-
* This contains the data for a websocket response.
|
171
|
-
*
|
172
|
-
* The correct response type if given is in [[LemmyHttp]].
|
173
|
-
*/
|
174
|
-
data?: ResponseType;
|
175
|
-
error?: string;
|
176
|
-
reconnect?: boolean;
|
180
|
+
export declare enum SubscribedType {
|
181
|
+
Subscribed = "Subscribed",
|
182
|
+
NotSubscribed = "NotSubscribed",
|
183
|
+
Pending = "Pending"
|
177
184
|
}
|
178
185
|
/**
|
179
186
|
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
180
187
|
*/
|
181
|
-
export
|
182
|
-
title
|
183
|
-
description
|
184
|
-
image
|
185
|
-
html
|
188
|
+
export declare class SiteMetadata {
|
189
|
+
title: Option<string>;
|
190
|
+
description: Option<string>;
|
191
|
+
image: Option<string>;
|
192
|
+
html: Option<string>;
|
193
|
+
constructor(init: SiteMetadata);
|
186
194
|
}
|
@@ -1,6 +1,14 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
9
|
+
exports.SiteMetadata = exports.SubscribedType = exports.SearchType = exports.ListingType = exports.CommentSortType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
10
|
+
var class_transformer_1 = require("class-transformer");
|
11
|
+
var utils_1 = require("../utils");
|
4
12
|
exports.VERSION = "v3";
|
5
13
|
/**
|
6
14
|
* All of the websocket operations available.
|
@@ -19,16 +27,16 @@ var UserOperation;
|
|
19
27
|
UserOperation[UserOperation["EditComment"] = 9] = "EditComment";
|
20
28
|
UserOperation[UserOperation["DeleteComment"] = 10] = "DeleteComment";
|
21
29
|
UserOperation[UserOperation["RemoveComment"] = 11] = "RemoveComment";
|
22
|
-
UserOperation[UserOperation["
|
23
|
-
UserOperation[UserOperation["
|
24
|
-
UserOperation[UserOperation["
|
25
|
-
UserOperation[UserOperation["
|
26
|
-
UserOperation[UserOperation["
|
27
|
-
UserOperation[UserOperation["
|
28
|
-
UserOperation[UserOperation["
|
29
|
-
UserOperation[UserOperation["
|
30
|
-
UserOperation[UserOperation["
|
31
|
-
UserOperation[UserOperation["
|
30
|
+
UserOperation[UserOperation["SaveComment"] = 12] = "SaveComment";
|
31
|
+
UserOperation[UserOperation["CreateCommentLike"] = 13] = "CreateCommentLike";
|
32
|
+
UserOperation[UserOperation["GetPosts"] = 14] = "GetPosts";
|
33
|
+
UserOperation[UserOperation["CreatePostLike"] = 15] = "CreatePostLike";
|
34
|
+
UserOperation[UserOperation["EditPost"] = 16] = "EditPost";
|
35
|
+
UserOperation[UserOperation["DeletePost"] = 17] = "DeletePost";
|
36
|
+
UserOperation[UserOperation["RemovePost"] = 18] = "RemovePost";
|
37
|
+
UserOperation[UserOperation["LockPost"] = 19] = "LockPost";
|
38
|
+
UserOperation[UserOperation["StickyPost"] = 20] = "StickyPost";
|
39
|
+
UserOperation[UserOperation["MarkPostAsRead"] = 21] = "MarkPostAsRead";
|
32
40
|
UserOperation[UserOperation["SavePost"] = 22] = "SavePost";
|
33
41
|
UserOperation[UserOperation["EditCommunity"] = 23] = "EditCommunity";
|
34
42
|
UserOperation[UserOperation["DeleteCommunity"] = 24] = "DeleteCommunity";
|
@@ -38,66 +46,76 @@ var UserOperation;
|
|
38
46
|
UserOperation[UserOperation["GetReplies"] = 28] = "GetReplies";
|
39
47
|
UserOperation[UserOperation["GetPersonMentions"] = 29] = "GetPersonMentions";
|
40
48
|
UserOperation[UserOperation["MarkPersonMentionAsRead"] = 30] = "MarkPersonMentionAsRead";
|
41
|
-
UserOperation[UserOperation["
|
42
|
-
UserOperation[UserOperation["
|
43
|
-
UserOperation[UserOperation["
|
44
|
-
UserOperation[UserOperation["
|
45
|
-
UserOperation[UserOperation["
|
46
|
-
UserOperation[UserOperation["
|
47
|
-
UserOperation[UserOperation["
|
48
|
-
UserOperation[UserOperation["
|
49
|
-
UserOperation[UserOperation["
|
50
|
-
UserOperation[UserOperation["
|
51
|
-
UserOperation[UserOperation["
|
52
|
-
UserOperation[UserOperation["
|
53
|
-
UserOperation[UserOperation["
|
54
|
-
UserOperation[UserOperation["
|
55
|
-
UserOperation[UserOperation["
|
56
|
-
UserOperation[UserOperation["
|
57
|
-
UserOperation[UserOperation["
|
58
|
-
UserOperation[UserOperation["
|
59
|
-
UserOperation[UserOperation["
|
60
|
-
UserOperation[UserOperation["
|
61
|
-
UserOperation[UserOperation["
|
62
|
-
UserOperation[UserOperation["
|
63
|
-
UserOperation[UserOperation["
|
64
|
-
UserOperation[UserOperation["
|
65
|
-
UserOperation[UserOperation["
|
66
|
-
UserOperation[UserOperation["
|
67
|
-
UserOperation[UserOperation["
|
68
|
-
UserOperation[UserOperation["
|
69
|
-
UserOperation[UserOperation["
|
70
|
-
UserOperation[UserOperation["
|
71
|
-
UserOperation[UserOperation["
|
72
|
-
UserOperation[UserOperation["
|
73
|
-
UserOperation[UserOperation["
|
74
|
-
UserOperation[UserOperation["
|
75
|
-
UserOperation[UserOperation["
|
76
|
-
UserOperation[UserOperation["
|
77
|
-
UserOperation[UserOperation["
|
78
|
-
UserOperation[UserOperation["
|
79
|
-
UserOperation[UserOperation["
|
80
|
-
UserOperation[UserOperation["
|
81
|
-
UserOperation[UserOperation["
|
82
|
-
UserOperation[UserOperation["
|
83
|
-
UserOperation[UserOperation["
|
84
|
-
UserOperation[UserOperation["
|
85
|
-
UserOperation[UserOperation["
|
49
|
+
UserOperation[UserOperation["MarkCommentReplyAsRead"] = 31] = "MarkCommentReplyAsRead";
|
50
|
+
UserOperation[UserOperation["GetModlog"] = 32] = "GetModlog";
|
51
|
+
UserOperation[UserOperation["BanFromCommunity"] = 33] = "BanFromCommunity";
|
52
|
+
UserOperation[UserOperation["AddModToCommunity"] = 34] = "AddModToCommunity";
|
53
|
+
UserOperation[UserOperation["CreateSite"] = 35] = "CreateSite";
|
54
|
+
UserOperation[UserOperation["EditSite"] = 36] = "EditSite";
|
55
|
+
UserOperation[UserOperation["GetSite"] = 37] = "GetSite";
|
56
|
+
UserOperation[UserOperation["AddAdmin"] = 38] = "AddAdmin";
|
57
|
+
UserOperation[UserOperation["GetUnreadRegistrationApplicationCount"] = 39] = "GetUnreadRegistrationApplicationCount";
|
58
|
+
UserOperation[UserOperation["ListRegistrationApplications"] = 40] = "ListRegistrationApplications";
|
59
|
+
UserOperation[UserOperation["ApproveRegistrationApplication"] = 41] = "ApproveRegistrationApplication";
|
60
|
+
UserOperation[UserOperation["BanPerson"] = 42] = "BanPerson";
|
61
|
+
UserOperation[UserOperation["GetBannedPersons"] = 43] = "GetBannedPersons";
|
62
|
+
UserOperation[UserOperation["Search"] = 44] = "Search";
|
63
|
+
UserOperation[UserOperation["ResolveObject"] = 45] = "ResolveObject";
|
64
|
+
UserOperation[UserOperation["MarkAllAsRead"] = 46] = "MarkAllAsRead";
|
65
|
+
UserOperation[UserOperation["SaveUserSettings"] = 47] = "SaveUserSettings";
|
66
|
+
UserOperation[UserOperation["TransferCommunity"] = 48] = "TransferCommunity";
|
67
|
+
UserOperation[UserOperation["LeaveAdmin"] = 49] = "LeaveAdmin";
|
68
|
+
UserOperation[UserOperation["DeleteAccount"] = 50] = "DeleteAccount";
|
69
|
+
UserOperation[UserOperation["PasswordReset"] = 51] = "PasswordReset";
|
70
|
+
UserOperation[UserOperation["PasswordChange"] = 52] = "PasswordChange";
|
71
|
+
UserOperation[UserOperation["CreatePrivateMessage"] = 53] = "CreatePrivateMessage";
|
72
|
+
UserOperation[UserOperation["EditPrivateMessage"] = 54] = "EditPrivateMessage";
|
73
|
+
UserOperation[UserOperation["DeletePrivateMessage"] = 55] = "DeletePrivateMessage";
|
74
|
+
UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 56] = "MarkPrivateMessageAsRead";
|
75
|
+
UserOperation[UserOperation["GetPrivateMessages"] = 57] = "GetPrivateMessages";
|
76
|
+
UserOperation[UserOperation["UserJoin"] = 58] = "UserJoin";
|
77
|
+
UserOperation[UserOperation["GetComments"] = 59] = "GetComments";
|
78
|
+
UserOperation[UserOperation["PostJoin"] = 60] = "PostJoin";
|
79
|
+
UserOperation[UserOperation["CommunityJoin"] = 61] = "CommunityJoin";
|
80
|
+
UserOperation[UserOperation["ChangePassword"] = 62] = "ChangePassword";
|
81
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
|
82
|
+
UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
|
83
|
+
UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
|
84
|
+
UserOperation[UserOperation["PurgePerson"] = 66] = "PurgePerson";
|
85
|
+
UserOperation[UserOperation["PurgeCommunity"] = 67] = "PurgeCommunity";
|
86
|
+
UserOperation[UserOperation["PurgePost"] = 68] = "PurgePost";
|
87
|
+
UserOperation[UserOperation["PurgeComment"] = 69] = "PurgeComment";
|
88
|
+
UserOperation[UserOperation["CreateCommentReport"] = 70] = "CreateCommentReport";
|
89
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 71] = "ResolveCommentReport";
|
90
|
+
UserOperation[UserOperation["ListCommentReports"] = 72] = "ListCommentReports";
|
91
|
+
UserOperation[UserOperation["CreatePostReport"] = 73] = "CreatePostReport";
|
92
|
+
UserOperation[UserOperation["ResolvePostReport"] = 74] = "ResolvePostReport";
|
93
|
+
UserOperation[UserOperation["ListPostReports"] = 75] = "ListPostReports";
|
94
|
+
UserOperation[UserOperation["GetReportCount"] = 76] = "GetReportCount";
|
95
|
+
UserOperation[UserOperation["GetUnreadCount"] = 77] = "GetUnreadCount";
|
96
|
+
UserOperation[UserOperation["VerifyEmail"] = 78] = "VerifyEmail";
|
86
97
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
87
98
|
/**
|
88
|
-
* Different sort types used in lemmy.
|
99
|
+
* Different post sort types used in lemmy.
|
89
100
|
*/
|
90
101
|
var SortType;
|
91
102
|
(function (SortType) {
|
92
103
|
/**
|
93
|
-
* Posts sorted by
|
104
|
+
* Posts sorted by hot, but bumped by new comments up to 2 days
|
94
105
|
*/
|
95
106
|
SortType["Active"] = "Active";
|
96
107
|
/**
|
97
|
-
* Posts sorted by
|
108
|
+
* Posts sorted by a decaying rank.
|
98
109
|
*/
|
99
110
|
SortType["Hot"] = "Hot";
|
111
|
+
/**
|
112
|
+
* Posts sorted by the published time.
|
113
|
+
*/
|
100
114
|
SortType["New"] = "New";
|
115
|
+
/**
|
116
|
+
* Posts sorted by the published time ascending
|
117
|
+
*/
|
118
|
+
SortType["Old"] = "Old";
|
101
119
|
/**
|
102
120
|
* The top posts for this last day.
|
103
121
|
*/
|
@@ -127,6 +145,28 @@ var SortType;
|
|
127
145
|
*/
|
128
146
|
SortType["NewComments"] = "NewComments";
|
129
147
|
})(SortType = exports.SortType || (exports.SortType = {}));
|
148
|
+
/**
|
149
|
+
* Different comment sort types used in lemmy.
|
150
|
+
*/
|
151
|
+
var CommentSortType;
|
152
|
+
(function (CommentSortType) {
|
153
|
+
/**
|
154
|
+
* Comments sorted by a decaying rank.
|
155
|
+
*/
|
156
|
+
CommentSortType["Hot"] = "Hot";
|
157
|
+
/**
|
158
|
+
* Comments sorted by top score.
|
159
|
+
*/
|
160
|
+
CommentSortType["Top"] = "Top";
|
161
|
+
/**
|
162
|
+
* Comments sorted by new.
|
163
|
+
*/
|
164
|
+
CommentSortType["New"] = "New";
|
165
|
+
/**
|
166
|
+
* Comments sorted by old.
|
167
|
+
*/
|
168
|
+
CommentSortType["Old"] = "Old";
|
169
|
+
})(CommentSortType = exports.CommentSortType || (exports.CommentSortType = {}));
|
130
170
|
/**
|
131
171
|
* The different listing types for post and comment fetches.
|
132
172
|
*/
|
@@ -149,3 +189,66 @@ var SearchType;
|
|
149
189
|
SearchType["Users"] = "Users";
|
150
190
|
SearchType["Url"] = "Url";
|
151
191
|
})(SearchType = exports.SearchType || (exports.SearchType = {}));
|
192
|
+
/**
|
193
|
+
* Different Subscribed states
|
194
|
+
*/
|
195
|
+
var SubscribedType;
|
196
|
+
(function (SubscribedType) {
|
197
|
+
SubscribedType["Subscribed"] = "Subscribed";
|
198
|
+
SubscribedType["NotSubscribed"] = "NotSubscribed";
|
199
|
+
SubscribedType["Pending"] = "Pending";
|
200
|
+
})(SubscribedType = exports.SubscribedType || (exports.SubscribedType = {}));
|
201
|
+
/**
|
202
|
+
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
203
|
+
*/
|
204
|
+
var SiteMetadata = /** @class */ (function () {
|
205
|
+
function SiteMetadata(init) {
|
206
|
+
Object.assign(this, init);
|
207
|
+
}
|
208
|
+
__decorate([
|
209
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
210
|
+
var value = _a.value;
|
211
|
+
return (0, utils_1.toOption)(value);
|
212
|
+
}, { toClassOnly: true }),
|
213
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
214
|
+
var value = _a.value;
|
215
|
+
return (0, utils_1.toUndefined)(value);
|
216
|
+
}, { toPlainOnly: true }),
|
217
|
+
(0, class_transformer_1.Expose)()
|
218
|
+
], SiteMetadata.prototype, "title", void 0);
|
219
|
+
__decorate([
|
220
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
221
|
+
var value = _a.value;
|
222
|
+
return (0, utils_1.toOption)(value);
|
223
|
+
}, { toClassOnly: true }),
|
224
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
225
|
+
var value = _a.value;
|
226
|
+
return (0, utils_1.toUndefined)(value);
|
227
|
+
}, { toPlainOnly: true }),
|
228
|
+
(0, class_transformer_1.Expose)()
|
229
|
+
], SiteMetadata.prototype, "description", void 0);
|
230
|
+
__decorate([
|
231
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
232
|
+
var value = _a.value;
|
233
|
+
return (0, utils_1.toOption)(value);
|
234
|
+
}, { toClassOnly: true }),
|
235
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
236
|
+
var value = _a.value;
|
237
|
+
return (0, utils_1.toUndefined)(value);
|
238
|
+
}, { toPlainOnly: true }),
|
239
|
+
(0, class_transformer_1.Expose)()
|
240
|
+
], SiteMetadata.prototype, "image", void 0);
|
241
|
+
__decorate([
|
242
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
243
|
+
var value = _a.value;
|
244
|
+
return (0, utils_1.toOption)(value);
|
245
|
+
}, { toClassOnly: true }),
|
246
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
247
|
+
var value = _a.value;
|
248
|
+
return (0, utils_1.toUndefined)(value);
|
249
|
+
}, { toPlainOnly: true }),
|
250
|
+
(0, class_transformer_1.Expose)()
|
251
|
+
], SiteMetadata.prototype, "html", void 0);
|
252
|
+
return SiteMetadata;
|
253
|
+
}());
|
254
|
+
exports.SiteMetadata = SiteMetadata;
|