lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
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
- MarkCommentAsRead = 12,
19
- SaveComment = 13,
20
- CreateCommentLike = 14,
21
- GetPosts = 15,
22
- CreatePostLike = 16,
23
- EditPost = 17,
24
- DeletePost = 18,
25
- RemovePost = 19,
26
- LockPost = 20,
27
- StickyPost = 21,
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
- GetModlog = 31,
38
- BanFromCommunity = 32,
39
- AddModToCommunity = 33,
40
- CreateSite = 34,
41
- EditSite = 35,
42
- GetSite = 36,
43
- AddAdmin = 37,
44
- GetUnreadRegistrationApplicationCount = 38,
45
- ListRegistrationApplications = 39,
46
- ApproveRegistrationApplication = 40,
47
- BanPerson = 41,
48
- GetBannedPersons = 42,
49
- Search = 43,
50
- ResolveObject = 44,
51
- MarkAllAsRead = 45,
52
- SaveUserSettings = 46,
53
- TransferCommunity = 47,
54
- LeaveAdmin = 48,
55
- DeleteAccount = 49,
56
- PasswordReset = 50,
57
- PasswordChange = 51,
58
- CreatePrivateMessage = 52,
59
- EditPrivateMessage = 53,
60
- DeletePrivateMessage = 54,
61
- MarkPrivateMessageAsRead = 55,
62
- GetPrivateMessages = 56,
63
- UserJoin = 57,
64
- GetComments = 58,
65
- GetSiteConfig = 59,
66
- SaveSiteConfig = 60,
67
- PostJoin = 61,
68
- CommunityJoin = 62,
69
- ChangePassword = 63,
70
- GetSiteMetadata = 64,
71
- BlockCommunity = 65,
72
- BlockPerson = 66,
73
- CreateCommentReport = 67,
74
- ResolveCommentReport = 68,
75
- ListCommentReports = 69,
76
- CreatePostReport = 70,
77
- ResolvePostReport = 71,
78
- ListPostReports = 72,
79
- GetReportCount = 73,
80
- GetUnreadCount = 74,
81
- VerifyEmail = 75
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 the most recent comment.
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 the published time.
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
- * A websocket response. Includes the return type.
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 interface WebSocketResponse<ResponseType> {
156
- op: UserOperation;
157
- /**
158
- * This contains the data for a websocket response.
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 interface SiteMetadata {
182
- title?: string;
183
- description?: string;
184
- image?: string;
185
- html?: string;
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["MarkCommentAsRead"] = 12] = "MarkCommentAsRead";
23
- UserOperation[UserOperation["SaveComment"] = 13] = "SaveComment";
24
- UserOperation[UserOperation["CreateCommentLike"] = 14] = "CreateCommentLike";
25
- UserOperation[UserOperation["GetPosts"] = 15] = "GetPosts";
26
- UserOperation[UserOperation["CreatePostLike"] = 16] = "CreatePostLike";
27
- UserOperation[UserOperation["EditPost"] = 17] = "EditPost";
28
- UserOperation[UserOperation["DeletePost"] = 18] = "DeletePost";
29
- UserOperation[UserOperation["RemovePost"] = 19] = "RemovePost";
30
- UserOperation[UserOperation["LockPost"] = 20] = "LockPost";
31
- UserOperation[UserOperation["StickyPost"] = 21] = "StickyPost";
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["GetModlog"] = 31] = "GetModlog";
42
- UserOperation[UserOperation["BanFromCommunity"] = 32] = "BanFromCommunity";
43
- UserOperation[UserOperation["AddModToCommunity"] = 33] = "AddModToCommunity";
44
- UserOperation[UserOperation["CreateSite"] = 34] = "CreateSite";
45
- UserOperation[UserOperation["EditSite"] = 35] = "EditSite";
46
- UserOperation[UserOperation["GetSite"] = 36] = "GetSite";
47
- UserOperation[UserOperation["AddAdmin"] = 37] = "AddAdmin";
48
- UserOperation[UserOperation["GetUnreadRegistrationApplicationCount"] = 38] = "GetUnreadRegistrationApplicationCount";
49
- UserOperation[UserOperation["ListRegistrationApplications"] = 39] = "ListRegistrationApplications";
50
- UserOperation[UserOperation["ApproveRegistrationApplication"] = 40] = "ApproveRegistrationApplication";
51
- UserOperation[UserOperation["BanPerson"] = 41] = "BanPerson";
52
- UserOperation[UserOperation["GetBannedPersons"] = 42] = "GetBannedPersons";
53
- UserOperation[UserOperation["Search"] = 43] = "Search";
54
- UserOperation[UserOperation["ResolveObject"] = 44] = "ResolveObject";
55
- UserOperation[UserOperation["MarkAllAsRead"] = 45] = "MarkAllAsRead";
56
- UserOperation[UserOperation["SaveUserSettings"] = 46] = "SaveUserSettings";
57
- UserOperation[UserOperation["TransferCommunity"] = 47] = "TransferCommunity";
58
- UserOperation[UserOperation["LeaveAdmin"] = 48] = "LeaveAdmin";
59
- UserOperation[UserOperation["DeleteAccount"] = 49] = "DeleteAccount";
60
- UserOperation[UserOperation["PasswordReset"] = 50] = "PasswordReset";
61
- UserOperation[UserOperation["PasswordChange"] = 51] = "PasswordChange";
62
- UserOperation[UserOperation["CreatePrivateMessage"] = 52] = "CreatePrivateMessage";
63
- UserOperation[UserOperation["EditPrivateMessage"] = 53] = "EditPrivateMessage";
64
- UserOperation[UserOperation["DeletePrivateMessage"] = 54] = "DeletePrivateMessage";
65
- UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 55] = "MarkPrivateMessageAsRead";
66
- UserOperation[UserOperation["GetPrivateMessages"] = 56] = "GetPrivateMessages";
67
- UserOperation[UserOperation["UserJoin"] = 57] = "UserJoin";
68
- UserOperation[UserOperation["GetComments"] = 58] = "GetComments";
69
- UserOperation[UserOperation["GetSiteConfig"] = 59] = "GetSiteConfig";
70
- UserOperation[UserOperation["SaveSiteConfig"] = 60] = "SaveSiteConfig";
71
- UserOperation[UserOperation["PostJoin"] = 61] = "PostJoin";
72
- UserOperation[UserOperation["CommunityJoin"] = 62] = "CommunityJoin";
73
- UserOperation[UserOperation["ChangePassword"] = 63] = "ChangePassword";
74
- UserOperation[UserOperation["GetSiteMetadata"] = 64] = "GetSiteMetadata";
75
- UserOperation[UserOperation["BlockCommunity"] = 65] = "BlockCommunity";
76
- UserOperation[UserOperation["BlockPerson"] = 66] = "BlockPerson";
77
- UserOperation[UserOperation["CreateCommentReport"] = 67] = "CreateCommentReport";
78
- UserOperation[UserOperation["ResolveCommentReport"] = 68] = "ResolveCommentReport";
79
- UserOperation[UserOperation["ListCommentReports"] = 69] = "ListCommentReports";
80
- UserOperation[UserOperation["CreatePostReport"] = 70] = "CreatePostReport";
81
- UserOperation[UserOperation["ResolvePostReport"] = 71] = "ResolvePostReport";
82
- UserOperation[UserOperation["ListPostReports"] = 72] = "ListPostReports";
83
- UserOperation[UserOperation["GetReportCount"] = 73] = "GetReportCount";
84
- UserOperation[UserOperation["GetUnreadCount"] = 74] = "GetUnreadCount";
85
- UserOperation[UserOperation["VerifyEmail"] = 75] = "VerifyEmail";
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 the most recent comment.
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 the published time.
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;