@sandvichxyz/pecans 1.0.0
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/LICENSE +661 -0
- package/README.md +34 -0
- package/dist/account/index.d.ts +7 -0
- package/dist/account/index.d.ts.map +1 -0
- package/dist/account/index.js +24 -0
- package/dist/account/index.js.map +1 -0
- package/dist/answer/index.d.ts +11 -0
- package/dist/answer/index.d.ts.map +1 -0
- package/dist/answer/index.js +35 -0
- package/dist/answer/index.js.map +1 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +16 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/client.d.ts +42 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +150 -0
- package/dist/client.js.map +1 -0
- package/dist/drawing/index.d.ts +8 -0
- package/dist/drawing/index.d.ts.map +1 -0
- package/dist/drawing/index.js +28 -0
- package/dist/drawing/index.js.map +1 -0
- package/dist/enums.d.ts +11 -0
- package/dist/enums.d.ts.map +1 -0
- package/dist/enums.js +17 -0
- package/dist/enums.js.map +1 -0
- package/dist/extensions/ask.d.ts +10 -0
- package/dist/extensions/ask.d.ts.map +1 -0
- package/dist/extensions/ask.js +25 -0
- package/dist/extensions/ask.js.map +1 -0
- package/dist/forum/index.d.ts +10 -0
- package/dist/forum/index.d.ts.map +1 -0
- package/dist/forum/index.js +42 -0
- package/dist/forum/index.js.map +1 -0
- package/dist/generated/client.d.ts +36 -0
- package/dist/generated/client.d.ts.map +1 -0
- package/dist/generated/client.js +115 -0
- package/dist/generated/client.js.map +1 -0
- package/dist/generated/decoders.d.ts +6 -0
- package/dist/generated/decoders.d.ts.map +1 -0
- package/dist/generated/decoders.js +41 -0
- package/dist/generated/decoders.js.map +1 -0
- package/dist/generated/enums.d.ts +11 -0
- package/dist/generated/enums.d.ts.map +1 -0
- package/dist/generated/enums.js +17 -0
- package/dist/generated/enums.js.map +1 -0
- package/dist/generated/index.d.ts +20 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +37 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/modules/account.d.ts +7 -0
- package/dist/generated/modules/account.d.ts.map +1 -0
- package/dist/generated/modules/account.js +30 -0
- package/dist/generated/modules/account.js.map +1 -0
- package/dist/generated/modules/answer.d.ts +11 -0
- package/dist/generated/modules/answer.d.ts.map +1 -0
- package/dist/generated/modules/answer.js +50 -0
- package/dist/generated/modules/answer.js.map +1 -0
- package/dist/generated/modules/ask.d.ts +30 -0
- package/dist/generated/modules/ask.d.ts.map +1 -0
- package/dist/generated/modules/ask.js +61 -0
- package/dist/generated/modules/ask.js.map +1 -0
- package/dist/generated/modules/auth.d.ts +7 -0
- package/dist/generated/modules/auth.d.ts.map +1 -0
- package/dist/generated/modules/auth.js +27 -0
- package/dist/generated/modules/auth.js.map +1 -0
- package/dist/generated/modules/dashboard.d.ts +11 -0
- package/dist/generated/modules/dashboard.d.ts.map +1 -0
- package/dist/generated/modules/dashboard.js +20 -0
- package/dist/generated/modules/dashboard.js.map +1 -0
- package/dist/generated/modules/drawing.d.ts +33 -0
- package/dist/generated/modules/drawing.d.ts.map +1 -0
- package/dist/generated/modules/drawing.js +69 -0
- package/dist/generated/modules/drawing.js.map +1 -0
- package/dist/generated/modules/feed.d.ts +22 -0
- package/dist/generated/modules/feed.d.ts.map +1 -0
- package/dist/generated/modules/feed.js +43 -0
- package/dist/generated/modules/feed.js.map +1 -0
- package/dist/generated/modules/forum.d.ts +26 -0
- package/dist/generated/modules/forum.d.ts.map +1 -0
- package/dist/generated/modules/forum.js +101 -0
- package/dist/generated/modules/forum.js.map +1 -0
- package/dist/generated/modules/images.d.ts +27 -0
- package/dist/generated/modules/images.d.ts.map +1 -0
- package/dist/generated/modules/images.js +53 -0
- package/dist/generated/modules/images.js.map +1 -0
- package/dist/generated/modules/messages.d.ts +9 -0
- package/dist/generated/modules/messages.d.ts.map +1 -0
- package/dist/generated/modules/messages.js +45 -0
- package/dist/generated/modules/messages.js.map +1 -0
- package/dist/generated/modules/navbar.d.ts +11 -0
- package/dist/generated/modules/navbar.d.ts.map +1 -0
- package/dist/generated/modules/navbar.js +20 -0
- package/dist/generated/modules/navbar.js.map +1 -0
- package/dist/generated/modules/notify.d.ts +14 -0
- package/dist/generated/modules/notify.d.ts.map +1 -0
- package/dist/generated/modules/notify.js +38 -0
- package/dist/generated/modules/notify.js.map +1 -0
- package/dist/generated/modules/profile.d.ts +34 -0
- package/dist/generated/modules/profile.d.ts.map +1 -0
- package/dist/generated/modules/profile.js +69 -0
- package/dist/generated/modules/profile.js.map +1 -0
- package/dist/generated/modules/qa.d.ts +12 -0
- package/dist/generated/modules/qa.d.ts.map +1 -0
- package/dist/generated/modules/qa.js +23 -0
- package/dist/generated/modules/qa.js.map +1 -0
- package/dist/generated/modules/settings.d.ts +23 -0
- package/dist/generated/modules/settings.d.ts.map +1 -0
- package/dist/generated/modules/settings.js +44 -0
- package/dist/generated/modules/settings.js.map +1 -0
- package/dist/generated/modules/stories.d.ts +18 -0
- package/dist/generated/modules/stories.d.ts.map +1 -0
- package/dist/generated/modules/stories.js +35 -0
- package/dist/generated/modules/stories.js.map +1 -0
- package/dist/generated/types.d.ts +528 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +4 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/messages/index.d.ts +9 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +33 -0
- package/dist/messages/index.js.map +1 -0
- package/dist/module.d.ts +7 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +27 -0
- package/dist/module.js.map +1 -0
- package/dist/notify/index.d.ts +8 -0
- package/dist/notify/index.d.ts.map +1 -0
- package/dist/notify/index.js +19 -0
- package/dist/notify/index.js.map +1 -0
- package/dist/runtime/call.d.ts +19 -0
- package/dist/runtime/call.d.ts.map +1 -0
- package/dist/runtime/call.js +26 -0
- package/dist/runtime/call.js.map +1 -0
- package/dist/runtime/client.d.ts +26 -0
- package/dist/runtime/client.d.ts.map +1 -0
- package/dist/runtime/client.js +87 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +21 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/join.d.ts +2 -0
- package/dist/runtime/join.d.ts.map +1 -0
- package/dist/runtime/join.js +14 -0
- package/dist/runtime/join.js.map +1 -0
- package/dist/runtime/module.d.ts +7 -0
- package/dist/runtime/module.d.ts.map +1 -0
- package/dist/runtime/module.js +27 -0
- package/dist/runtime/module.js.map +1 -0
- package/dist/runtime/types.d.ts +19 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +3 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
export type ThreadListResponse = TCResponse & {
|
|
2
|
+
name: string;
|
|
3
|
+
totalThreads: number;
|
|
4
|
+
category: string;
|
|
5
|
+
canCreate: boolean;
|
|
6
|
+
threads: ForumThread[];
|
|
7
|
+
};
|
|
8
|
+
export type ViewPostsResponse = TCResponse & {
|
|
9
|
+
posts: ForumPost[];
|
|
10
|
+
numPostsBefore: number;
|
|
11
|
+
numPostsAfter: number;
|
|
12
|
+
jumpTo: number;
|
|
13
|
+
thread: ViewThread;
|
|
14
|
+
};
|
|
15
|
+
export type ForumSearchResponse = TCResponse & {
|
|
16
|
+
results: ForumSearchResult[];
|
|
17
|
+
};
|
|
18
|
+
export type GetQuoteTextResponse = TCResponse & {
|
|
19
|
+
/**
|
|
20
|
+
* The raw text of the post being quoted.
|
|
21
|
+
*/
|
|
22
|
+
originalText: string;
|
|
23
|
+
/**
|
|
24
|
+
* Username of the post's author.
|
|
25
|
+
*/
|
|
26
|
+
user: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A newly-created forum thread.
|
|
30
|
+
*/
|
|
31
|
+
export type ForumThreadFeedItem = FeedItemBase & {
|
|
32
|
+
type: "forum.thread";
|
|
33
|
+
data: {
|
|
34
|
+
/**
|
|
35
|
+
* First line(s) of the thread's opening post.
|
|
36
|
+
*/
|
|
37
|
+
preview: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A newly-asked Q&A question.
|
|
42
|
+
*/
|
|
43
|
+
export type QaNewQuestionFeedItem = FeedItemBase & {
|
|
44
|
+
type: "qa.newquestion";
|
|
45
|
+
data: {
|
|
46
|
+
/**
|
|
47
|
+
* First line(s) of the question body.
|
|
48
|
+
*/
|
|
49
|
+
preview: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* An account being registered.
|
|
54
|
+
*/
|
|
55
|
+
export type AccountRegisterFeedItem = FeedItemBase & {
|
|
56
|
+
type: "account.register";
|
|
57
|
+
data: unknown[];
|
|
58
|
+
};
|
|
59
|
+
export type FeedResponse = TCResponse & {
|
|
60
|
+
/**
|
|
61
|
+
* Server-side cursor for pagination.
|
|
62
|
+
*/
|
|
63
|
+
feedId: string;
|
|
64
|
+
/**
|
|
65
|
+
* The first page of feed items, newest first.
|
|
66
|
+
*/
|
|
67
|
+
items: FeedItem[];
|
|
68
|
+
};
|
|
69
|
+
export type FeedItem = ForumThreadFeedItem | QaNewQuestionFeedItem | AccountRegisterFeedItem;
|
|
70
|
+
export type FeedScrollResponse = TCResponse & {
|
|
71
|
+
/**
|
|
72
|
+
* The next page of items; absent once the feed is exhausted.
|
|
73
|
+
*/
|
|
74
|
+
items?: FeedItem[];
|
|
75
|
+
/**
|
|
76
|
+
* True when there are no more items to load.
|
|
77
|
+
*/
|
|
78
|
+
end?: boolean;
|
|
79
|
+
};
|
|
80
|
+
export type FolderViewResponse = TCResponse & {
|
|
81
|
+
hasMore: boolean;
|
|
82
|
+
hasPrevious: boolean;
|
|
83
|
+
messages: MessagePreview[];
|
|
84
|
+
};
|
|
85
|
+
export type MessageViewResponse = TCResponse & {
|
|
86
|
+
messages: Message[];
|
|
87
|
+
header: MessageThreadHeader;
|
|
88
|
+
};
|
|
89
|
+
export type FolderListResponse = TCResponse & {
|
|
90
|
+
folders: Folder[];
|
|
91
|
+
};
|
|
92
|
+
export type SaveDrawingResponse = TCResponse & {
|
|
93
|
+
/**
|
|
94
|
+
* Id of the newly-created image, e.g. `img45790`.
|
|
95
|
+
*/
|
|
96
|
+
newImageId: string;
|
|
97
|
+
};
|
|
98
|
+
export type ViewDrawingDataResponse = TCResponse & {
|
|
99
|
+
/**
|
|
100
|
+
* The raw pixel data: a flat hex string, 32×32, RGB, 6 hex chars per pixel, row-major.
|
|
101
|
+
*/
|
|
102
|
+
data: string;
|
|
103
|
+
};
|
|
104
|
+
export type ImageBatchGetResponse = TCResponse & {
|
|
105
|
+
/**
|
|
106
|
+
* The requested images, in no guaranteed order.
|
|
107
|
+
*/
|
|
108
|
+
items: ImageData[];
|
|
109
|
+
};
|
|
110
|
+
export type ImageGalleryListResponse = TCResponse & {
|
|
111
|
+
/**
|
|
112
|
+
* Ids of the images on this page.
|
|
113
|
+
*/
|
|
114
|
+
images: ImageRef[];
|
|
115
|
+
/**
|
|
116
|
+
* Whether further pages exist beyond this one.
|
|
117
|
+
*/
|
|
118
|
+
hasMore: boolean;
|
|
119
|
+
};
|
|
120
|
+
export type ImageInfoResponse = TCResponse & {
|
|
121
|
+
imageId: string;
|
|
122
|
+
/**
|
|
123
|
+
* Username of the image's owner.
|
|
124
|
+
*/
|
|
125
|
+
owner: string;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the active account owns this image.
|
|
128
|
+
*/
|
|
129
|
+
isYours: boolean;
|
|
130
|
+
};
|
|
131
|
+
export type NotifySyncResponse = TCResponse & {
|
|
132
|
+
count: number;
|
|
133
|
+
};
|
|
134
|
+
export type WhosOnlineResponse = TCResponse & {
|
|
135
|
+
users: TruncatedUser[];
|
|
136
|
+
};
|
|
137
|
+
export type LoginResponse = TCResponse & {
|
|
138
|
+
success: boolean;
|
|
139
|
+
authToken: string;
|
|
140
|
+
yourId: string;
|
|
141
|
+
};
|
|
142
|
+
export type ExistingCookieResponse = TCResponse & {
|
|
143
|
+
success: boolean;
|
|
144
|
+
yourId: string;
|
|
145
|
+
};
|
|
146
|
+
export type AnswerReplyResponse = TCResponse & {
|
|
147
|
+
id: number;
|
|
148
|
+
time: number;
|
|
149
|
+
text: string;
|
|
150
|
+
};
|
|
151
|
+
export type QuestionFetchResponse = TCResponse & {
|
|
152
|
+
id: number;
|
|
153
|
+
time: number;
|
|
154
|
+
text: string;
|
|
155
|
+
author?: string;
|
|
156
|
+
poll?: Poll;
|
|
157
|
+
};
|
|
158
|
+
export type AnswerQueueQuestionResponse = TCResponse & {
|
|
159
|
+
id: number;
|
|
160
|
+
time: number;
|
|
161
|
+
text: string;
|
|
162
|
+
author?: string;
|
|
163
|
+
poll?: Poll;
|
|
164
|
+
};
|
|
165
|
+
export type ListDataResponse = TCResponse & {
|
|
166
|
+
/**
|
|
167
|
+
* Question headers, without their body text.
|
|
168
|
+
*/
|
|
169
|
+
questions: QuestionMetadata[];
|
|
170
|
+
};
|
|
171
|
+
export type QuestionTextResponse = TCResponse & {
|
|
172
|
+
/**
|
|
173
|
+
* Question bodies, keyed by id.
|
|
174
|
+
*/
|
|
175
|
+
questions: QuestionText[];
|
|
176
|
+
};
|
|
177
|
+
export type ProfileGetResponse = TCResponse & {
|
|
178
|
+
/**
|
|
179
|
+
* The looked-up user's id. `ok` is false with error `NOT_FOUND` if no such user.
|
|
180
|
+
*/
|
|
181
|
+
id: string;
|
|
182
|
+
};
|
|
183
|
+
export type ProfileDetailsResponse = TCResponse & {
|
|
184
|
+
/**
|
|
185
|
+
* Echoes back the requested field name.
|
|
186
|
+
*/
|
|
187
|
+
type: string;
|
|
188
|
+
/**
|
|
189
|
+
* The field's value; a string for text fields, a number for counts like `followers`.
|
|
190
|
+
*/
|
|
191
|
+
value: {
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
export type QaGetPinnedResponse = TCResponse & {
|
|
196
|
+
/**
|
|
197
|
+
* The questions the user has pinned to their profile.
|
|
198
|
+
*/
|
|
199
|
+
pinned: PinnedQuestion[];
|
|
200
|
+
};
|
|
201
|
+
export type NavbarGetResponse = TCResponse & {
|
|
202
|
+
/**
|
|
203
|
+
* The navigation items, in display order.
|
|
204
|
+
*/
|
|
205
|
+
nav: NavItem[];
|
|
206
|
+
};
|
|
207
|
+
export type DashboardResponse = TCResponse & {
|
|
208
|
+
/**
|
|
209
|
+
* The most recently asked questions across the site.
|
|
210
|
+
*/
|
|
211
|
+
recentQuestions: DashboardQuestion[];
|
|
212
|
+
};
|
|
213
|
+
export type SettingsGetResponse = TCResponse & {
|
|
214
|
+
/**
|
|
215
|
+
* The account's email address.
|
|
216
|
+
*/
|
|
217
|
+
email: string;
|
|
218
|
+
/**
|
|
219
|
+
* Whether to send notifications for new private messages.
|
|
220
|
+
*/
|
|
221
|
+
msgNotify: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Whether to hide the sender identity on anonymous messages.
|
|
224
|
+
*/
|
|
225
|
+
msgHideAnon: boolean;
|
|
226
|
+
};
|
|
227
|
+
export interface TCFollowInfo {
|
|
228
|
+
in: number;
|
|
229
|
+
out: number;
|
|
230
|
+
}
|
|
231
|
+
export interface TCProfile {
|
|
232
|
+
id: string;
|
|
233
|
+
name: string;
|
|
234
|
+
online: number;
|
|
235
|
+
avatar: string;
|
|
236
|
+
subs: TCFollowInfo;
|
|
237
|
+
}
|
|
238
|
+
export interface TCResponse {
|
|
239
|
+
ok: boolean;
|
|
240
|
+
error?: string;
|
|
241
|
+
profiles?: TCProfile[];
|
|
242
|
+
}
|
|
243
|
+
export interface TCUser {
|
|
244
|
+
id?: string;
|
|
245
|
+
anon?: boolean;
|
|
246
|
+
}
|
|
247
|
+
export interface ForumCategory {
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
description: string;
|
|
251
|
+
threads: number;
|
|
252
|
+
posts: number;
|
|
253
|
+
newThreads: number;
|
|
254
|
+
}
|
|
255
|
+
export interface ForumCategoriesResponse {
|
|
256
|
+
categories: ForumCategory[];
|
|
257
|
+
}
|
|
258
|
+
export interface ThreadListPost {
|
|
259
|
+
id: number;
|
|
260
|
+
author: string;
|
|
261
|
+
text: string;
|
|
262
|
+
time: number;
|
|
263
|
+
category: string;
|
|
264
|
+
thread: number;
|
|
265
|
+
}
|
|
266
|
+
export interface ForumThread {
|
|
267
|
+
id: number;
|
|
268
|
+
views: number;
|
|
269
|
+
replies: number;
|
|
270
|
+
title: string;
|
|
271
|
+
category: string;
|
|
272
|
+
new: boolean;
|
|
273
|
+
firstPost: ThreadListPost;
|
|
274
|
+
lastPost: ThreadListPost;
|
|
275
|
+
}
|
|
276
|
+
export interface ForumPost {
|
|
277
|
+
id: number;
|
|
278
|
+
user: string;
|
|
279
|
+
text: string;
|
|
280
|
+
ucpText: string;
|
|
281
|
+
ucpEnabled: boolean;
|
|
282
|
+
time: number;
|
|
283
|
+
new: boolean;
|
|
284
|
+
}
|
|
285
|
+
export interface ViewThread {
|
|
286
|
+
id: number;
|
|
287
|
+
lastPostId: number;
|
|
288
|
+
title: string;
|
|
289
|
+
locked: boolean;
|
|
290
|
+
}
|
|
291
|
+
export interface ForumSearchResult {
|
|
292
|
+
id: number;
|
|
293
|
+
author: string;
|
|
294
|
+
text: string;
|
|
295
|
+
time: number;
|
|
296
|
+
category: string;
|
|
297
|
+
thread: number;
|
|
298
|
+
}
|
|
299
|
+
export interface FeedItemBase {
|
|
300
|
+
id: number;
|
|
301
|
+
/**
|
|
302
|
+
* Unix time the activity happened.
|
|
303
|
+
*/
|
|
304
|
+
time: number;
|
|
305
|
+
/**
|
|
306
|
+
* Username of the account the item belongs to.
|
|
307
|
+
*/
|
|
308
|
+
owner: string;
|
|
309
|
+
/**
|
|
310
|
+
* Relative path to the item on the site, e.g. `/forum/blogs/11894`.
|
|
311
|
+
*/
|
|
312
|
+
url: string;
|
|
313
|
+
/**
|
|
314
|
+
* Display title for the item (may be empty for questions).
|
|
315
|
+
*/
|
|
316
|
+
title: string;
|
|
317
|
+
}
|
|
318
|
+
export interface MessagePreview {
|
|
319
|
+
id: string;
|
|
320
|
+
subject: string;
|
|
321
|
+
preview: string;
|
|
322
|
+
time: number;
|
|
323
|
+
users: TCUser[];
|
|
324
|
+
new?: boolean;
|
|
325
|
+
}
|
|
326
|
+
export interface Message {
|
|
327
|
+
id: number;
|
|
328
|
+
member: number;
|
|
329
|
+
time: number;
|
|
330
|
+
type: string;
|
|
331
|
+
html: string;
|
|
332
|
+
new?: boolean;
|
|
333
|
+
}
|
|
334
|
+
export interface MessageFolder {
|
|
335
|
+
id: string;
|
|
336
|
+
name: string;
|
|
337
|
+
}
|
|
338
|
+
export interface MessageThreadMember {
|
|
339
|
+
mid: number;
|
|
340
|
+
anon?: boolean;
|
|
341
|
+
readTo: number;
|
|
342
|
+
id?: string;
|
|
343
|
+
you?: boolean;
|
|
344
|
+
}
|
|
345
|
+
export interface MessageThreadHeader {
|
|
346
|
+
title: string;
|
|
347
|
+
members: MessageThreadMember[];
|
|
348
|
+
folder: MessageFolder;
|
|
349
|
+
}
|
|
350
|
+
export interface Folder {
|
|
351
|
+
id: string;
|
|
352
|
+
name: string;
|
|
353
|
+
}
|
|
354
|
+
export interface ImageData {
|
|
355
|
+
/**
|
|
356
|
+
* Image id, e.g. `img45788`.
|
|
357
|
+
*/
|
|
358
|
+
id: string;
|
|
359
|
+
/**
|
|
360
|
+
* Base64-encoded PNG, prefixed with the literal string `B64`.
|
|
361
|
+
*/
|
|
362
|
+
data: string;
|
|
363
|
+
}
|
|
364
|
+
export interface ImageRef {
|
|
365
|
+
/**
|
|
366
|
+
* Image id, e.g. `img45788`.
|
|
367
|
+
*/
|
|
368
|
+
id: string;
|
|
369
|
+
}
|
|
370
|
+
export interface TruncatedUser {
|
|
371
|
+
id: string;
|
|
372
|
+
}
|
|
373
|
+
export interface PollOption {
|
|
374
|
+
text: string;
|
|
375
|
+
color: string;
|
|
376
|
+
votes?: number;
|
|
377
|
+
yours?: boolean;
|
|
378
|
+
}
|
|
379
|
+
export interface Poll {
|
|
380
|
+
options: PollOption[];
|
|
381
|
+
answered: boolean;
|
|
382
|
+
}
|
|
383
|
+
export interface PollOptionRaw {
|
|
384
|
+
/**
|
|
385
|
+
* Number of votes this option has received.
|
|
386
|
+
*/
|
|
387
|
+
n: number;
|
|
388
|
+
/**
|
|
389
|
+
* Option index / choice id.
|
|
390
|
+
*/
|
|
391
|
+
c: number;
|
|
392
|
+
}
|
|
393
|
+
export interface PollMetadataRaw {
|
|
394
|
+
id: number;
|
|
395
|
+
options: PollOptionRaw[];
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* The header for one question: everything except the question body itself.
|
|
399
|
+
* Returned by `listData`; the body is fetched separately via `qtext`.
|
|
400
|
+
*/
|
|
401
|
+
export interface QuestionMetadata {
|
|
402
|
+
id: number;
|
|
403
|
+
/**
|
|
404
|
+
* Whether the question is still activate.
|
|
405
|
+
*/
|
|
406
|
+
isActive: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Total number of replies.
|
|
409
|
+
*/
|
|
410
|
+
replyCount: number;
|
|
411
|
+
/**
|
|
412
|
+
* Total number of new replies (not yet marked as read).
|
|
413
|
+
*/
|
|
414
|
+
newReplyCount: number;
|
|
415
|
+
/**
|
|
416
|
+
* Unix time at which the question closes.
|
|
417
|
+
*/
|
|
418
|
+
expireTime: number;
|
|
419
|
+
/**
|
|
420
|
+
* Unix time at which the question was asked.
|
|
421
|
+
*/
|
|
422
|
+
creationTime: number;
|
|
423
|
+
/**
|
|
424
|
+
* Whether the question is pinned to the user's profile.
|
|
425
|
+
*/
|
|
426
|
+
isPinned: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Whether this is a free-text question or a poll.
|
|
429
|
+
*/
|
|
430
|
+
questionType: "text" | "poll";
|
|
431
|
+
}
|
|
432
|
+
export interface QuestionText {
|
|
433
|
+
id: number;
|
|
434
|
+
/**
|
|
435
|
+
* The question's body text.
|
|
436
|
+
*/
|
|
437
|
+
text: string;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* A fully populated question with metadata and body text.
|
|
441
|
+
*/
|
|
442
|
+
export interface QuestionData {
|
|
443
|
+
/**
|
|
444
|
+
* The question's body text.
|
|
445
|
+
*/
|
|
446
|
+
body: string;
|
|
447
|
+
header: QuestionMetadata1;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The header for one question: everything except the question body itself.
|
|
451
|
+
* Returned by `listData`; the body is fetched separately via `qtext`.
|
|
452
|
+
*/
|
|
453
|
+
export interface QuestionMetadata1 {
|
|
454
|
+
id: number;
|
|
455
|
+
/**
|
|
456
|
+
* Whether the question is still activate.
|
|
457
|
+
*/
|
|
458
|
+
isActive: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Total number of replies.
|
|
461
|
+
*/
|
|
462
|
+
replyCount: number;
|
|
463
|
+
/**
|
|
464
|
+
* Total number of new replies (not yet marked as read).
|
|
465
|
+
*/
|
|
466
|
+
newReplyCount: number;
|
|
467
|
+
/**
|
|
468
|
+
* Unix time at which the question closes.
|
|
469
|
+
*/
|
|
470
|
+
expireTime: number;
|
|
471
|
+
/**
|
|
472
|
+
* Unix time at which the question was asked.
|
|
473
|
+
*/
|
|
474
|
+
creationTime: number;
|
|
475
|
+
/**
|
|
476
|
+
* Whether the question is pinned to the user's profile.
|
|
477
|
+
*/
|
|
478
|
+
isPinned: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Whether this is a free-text question or a poll.
|
|
481
|
+
*/
|
|
482
|
+
questionType: "text" | "poll";
|
|
483
|
+
}
|
|
484
|
+
export interface PinnedQuestion {
|
|
485
|
+
id: number;
|
|
486
|
+
/**
|
|
487
|
+
* First line(s) of the question body.
|
|
488
|
+
*/
|
|
489
|
+
preview: string;
|
|
490
|
+
/**
|
|
491
|
+
* Unix time the question was asked.
|
|
492
|
+
*/
|
|
493
|
+
time: number;
|
|
494
|
+
}
|
|
495
|
+
export interface NavItem {
|
|
496
|
+
/**
|
|
497
|
+
* Stable id for the destination, e.g. `feed`, `forum`.
|
|
498
|
+
*/
|
|
499
|
+
id: string;
|
|
500
|
+
/**
|
|
501
|
+
* Path the item links to, e.g. `/forum`.
|
|
502
|
+
*/
|
|
503
|
+
url: string;
|
|
504
|
+
/**
|
|
505
|
+
* Human-readable label, e.g. `Home Feed`.
|
|
506
|
+
*/
|
|
507
|
+
label: string;
|
|
508
|
+
/**
|
|
509
|
+
* Image id for the item's icon.
|
|
510
|
+
*/
|
|
511
|
+
icon: string;
|
|
512
|
+
/**
|
|
513
|
+
* Notification feature key to badge this item against, if any.
|
|
514
|
+
*/
|
|
515
|
+
notify?: string;
|
|
516
|
+
}
|
|
517
|
+
export interface DashboardQuestion {
|
|
518
|
+
id: number;
|
|
519
|
+
/**
|
|
520
|
+
* Unix time the question was asked.
|
|
521
|
+
*/
|
|
522
|
+
time: number;
|
|
523
|
+
/**
|
|
524
|
+
* First line(s) of the question body.
|
|
525
|
+
*/
|
|
526
|
+
preview: string;
|
|
527
|
+
}
|
|
528
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/generated/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO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B,CAAC;CAC7B;AACD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AACD,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/generated/types.ts"],"names":[],"mappings":";AAAA,4CAA4C"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./runtime"), exports);
|
|
18
|
+
__exportStar(require("./generated"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Module } from "../module";
|
|
2
|
+
import { FolderListResponse, FolderViewResponse, MessageViewResponse, TCResponse } from "../generated/types";
|
|
3
|
+
export declare class MessagesModule extends Module {
|
|
4
|
+
folderView(folder?: string, page?: number): Promise<FolderViewResponse>;
|
|
5
|
+
view(conversationId: string, includeHeader?: boolean, markAsRead?: boolean, page?: number): Promise<MessageViewResponse>;
|
|
6
|
+
reply(conversationId: string, text: string, unanonymize?: boolean): Promise<TCResponse>;
|
|
7
|
+
folderList(): Promise<FolderListResponse>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE7G,qBAAa,cAAe,SAAQ,MAAM;IACzB,UAAU,CAAC,MAAM,GAAE,MAAgB,EAAE,IAAI,GAAE,MAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAUnF,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,GAAE,OAAc,EAAE,UAAU,GAAE,OAAc,EAAE,IAAI,GAAE,MAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAYvI,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,OAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IAW9F,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAMzD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessagesModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const module_1 = require("../module");
|
|
6
|
+
class MessagesModule extends module_1.Module {
|
|
7
|
+
async folderView(folder = "inbox", page = 1) {
|
|
8
|
+
return await this.client._call("messages.folderview", {
|
|
9
|
+
"folder": folder,
|
|
10
|
+
"page": page,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
async view(conversationId, includeHeader = true, markAsRead = true, page = 1) {
|
|
14
|
+
return await this.client._call("messages.view", {
|
|
15
|
+
"conversationId": conversationId,
|
|
16
|
+
"includeHeader": includeHeader,
|
|
17
|
+
"markAsRead": markAsRead,
|
|
18
|
+
"page": page,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async reply(conversationId, text, unanonymize = false) {
|
|
22
|
+
return await this.client._call("messages.reply", {
|
|
23
|
+
"conversationId": conversationId,
|
|
24
|
+
"text": text,
|
|
25
|
+
"unanonymize": unanonymize,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
async folderList() {
|
|
29
|
+
return await this.client._call("messages.folderlist", {});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.MessagesModule = MessagesModule;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAmC;AAGnC,MAAa,cAAe,SAAQ,eAAM;IAC/B,KAAK,CAAC,UAAU,CAAC,SAAiB,OAAO,EAAE,OAAe,CAAC;QAC9D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC1B,qBAAqB,EACrB;YACI,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,IAAI;SACf,CACJ,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,cAAsB,EAAE,gBAAyB,IAAI,EAAE,aAAsB,IAAI,EAAE,OAAe,CAAC;QACjH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC1B,eAAe,EACf;YACI,gBAAgB,EAAE,cAAc;YAChC,eAAe,EAAE,aAAa;YAC9B,YAAY,EAAE,UAAU;YACxB,MAAM,EAAE,IAAI;SACf,CACJ,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,cAAsB,EAAE,IAAY,EAAE,cAAuB,KAAK;QACjF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC1B,gBAAgB,EAChB;YACI,gBAAgB,EAAE,cAAc;YAChC,MAAM,EAAE,IAAI;YACZ,aAAa,EAAE,WAAW;SAC7B,CACJ,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC1B,qBAAqB,EACrB,EAAE,CACL,CAAC;IACN,CAAC;CACJ;AAxCD,wCAwCC"}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,qBAAa,MAAM;;IAGf,SAAS,KAAK,MAAM,IAAI,MAAM,CAE7B;gBAEkB,MAAM,EAAE,MAAM;CAGpC"}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var _Module_client;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Module = void 0;
|
|
16
|
+
class Module {
|
|
17
|
+
get client() {
|
|
18
|
+
return __classPrivateFieldGet(this, _Module_client, "f");
|
|
19
|
+
}
|
|
20
|
+
constructor(client) {
|
|
21
|
+
_Module_client.set(this, void 0);
|
|
22
|
+
__classPrivateFieldSet(this, _Module_client, client, "f");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Module = Module;
|
|
26
|
+
_Module_client = new WeakMap();
|
|
27
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,MAAM;IAGf,IAAc,MAAM;QAChB,OAAO,uBAAA,IAAI,sBAAQ,CAAC;IACxB,CAAC;IAED,YAAmB,MAAc;QANjC,iCAAgB;QAOZ,uBAAA,IAAI,kBAAW,MAAM,MAAA,CAAC;IAC1B,CAAC;CACJ;AAVD,wBAUC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Module } from "../module";
|
|
2
|
+
import { NotifySyncResponse, WhosOnlineResponse } from "../generated/types";
|
|
3
|
+
import { Feature } from "../enums";
|
|
4
|
+
export declare class NotifyModule extends Module {
|
|
5
|
+
sync(feature: Feature): Promise<NotifySyncResponse>;
|
|
6
|
+
fetchOnlineUsers(feature: Feature): Promise<WhosOnlineResponse>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|