@sandvichxyz/pecans 1.1.2 → 1.1.3
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/generated/client.d.ts +38 -0
- package/dist/generated/client.d.ts.map +1 -0
- package/dist/generated/client.js +121 -0
- package/dist/generated/client.js.map +1 -0
- package/dist/generated/decoders.d.ts +14 -0
- package/dist/generated/decoders.d.ts.map +1 -0
- package/dist/generated/decoders.js +120 -0
- package/dist/generated/decoders.js.map +1 -0
- package/dist/generated/encoders.d.ts +4 -0
- package/dist/generated/encoders.d.ts.map +1 -0
- package/dist/generated/encoders.js +25 -0
- package/dist/generated/encoders.js.map +1 -0
- package/dist/generated/enums.d.ts +12 -0
- package/dist/generated/enums.d.ts.map +1 -0
- package/dist/generated/enums.js +18 -0
- package/dist/generated/enums.js.map +1 -0
- package/dist/generated/index.d.ts +22 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +39 -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 +38 -0
- package/dist/generated/modules/answer.d.ts.map +1 -0
- package/dist/generated/modules/answer.js +89 -0
- package/dist/generated/modules/answer.js.map +1 -0
- package/dist/generated/modules/ask.d.ts +95 -0
- package/dist/generated/modules/ask.d.ts.map +1 -0
- package/dist/generated/modules/ask.js +226 -0
- package/dist/generated/modules/ask.js.map +1 -0
- package/dist/generated/modules/auth.d.ts +28 -0
- package/dist/generated/modules/auth.d.ts.map +1 -0
- package/dist/generated/modules/auth.js +53 -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 +96 -0
- package/dist/generated/modules/forum.d.ts.map +1 -0
- package/dist/generated/modules/forum.js +193 -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 +59 -0
- package/dist/generated/modules/messages.d.ts.map +1 -0
- package/dist/generated/modules/messages.js +119 -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 +27 -0
- package/dist/generated/modules/notify.d.ts.map +1 -0
- package/dist/generated/modules/notify.js +51 -0
- package/dist/generated/modules/notify.js.map +1 -0
- package/dist/generated/modules/profile.d.ts +42 -0
- package/dist/generated/modules/profile.d.ts.map +1 -0
- package/dist/generated/modules/profile.js +87 -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 +16 -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 +956 -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/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 +27 -0
- package/dist/runtime/client.d.ts.map +1 -0
- package/dist/runtime/client.js +90 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +22 -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/transform.d.ts +19 -0
- package/dist/runtime/transform.d.ts.map +1 -0
- package/dist/runtime/transform.js +40 -0
- package/dist/runtime/transform.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/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { FeedResponse, FeedScrollResponse } from "../types";
|
|
3
|
+
export declare class FeedModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Open a feed and return its first page.
|
|
6
|
+
*
|
|
7
|
+
* @param user - Username to fetch the activity feed for, or `null` for the global site feed.
|
|
8
|
+
* @param size - Number of items to return on this first page.
|
|
9
|
+
* @returns A cursor (`feedId`) and the first page of items.
|
|
10
|
+
*/
|
|
11
|
+
start(user: string | null, size?: number): Call<FeedResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Fetch the next page of a feed opened with `start`.
|
|
14
|
+
*
|
|
15
|
+
* @param feedId - Cursor returned by `start`.
|
|
16
|
+
* @param numItems - Number of further items to fetch.
|
|
17
|
+
* @param lastId - Id of the last item you've already seen.
|
|
18
|
+
* @returns The next page of items, or `end: true` once exhausted.
|
|
19
|
+
*/
|
|
20
|
+
scroll(feedId: string, numItems: number, lastId: number): Call<FeedScrollResponse>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=feed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/feed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE5D,qBAAa,UAAW,SAAQ,MAAM;IAClC;;;;;;OAMG;IACI,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,MAAW,GAAG,IAAI,CAAC,YAAY,CAAC;IAUxE;;;;;;;OAOG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC;CAU5F"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeedModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class FeedModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Open a feed and return its first page.
|
|
9
|
+
*
|
|
10
|
+
* @param user - Username to fetch the activity feed for, or `null` for the global site feed.
|
|
11
|
+
* @param size - Number of items to return on this first page.
|
|
12
|
+
* @returns A cursor (`feedId`) and the first page of items.
|
|
13
|
+
*/
|
|
14
|
+
start(user, size = 10) {
|
|
15
|
+
return new runtime_1.Call(this.client, {
|
|
16
|
+
fn: "feed.start",
|
|
17
|
+
payload: {
|
|
18
|
+
user: user,
|
|
19
|
+
size: size,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Fetch the next page of a feed opened with `start`.
|
|
25
|
+
*
|
|
26
|
+
* @param feedId - Cursor returned by `start`.
|
|
27
|
+
* @param numItems - Number of further items to fetch.
|
|
28
|
+
* @param lastId - Id of the last item you've already seen.
|
|
29
|
+
* @returns The next page of items, or `end: true` once exhausted.
|
|
30
|
+
*/
|
|
31
|
+
scroll(feedId, numItems, lastId) {
|
|
32
|
+
return new runtime_1.Call(this.client, {
|
|
33
|
+
fn: "feed.scroll",
|
|
34
|
+
payload: {
|
|
35
|
+
feedId: feedId,
|
|
36
|
+
numItems: numItems,
|
|
37
|
+
lastId: lastId,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.FeedModule = FeedModule;
|
|
43
|
+
//# sourceMappingURL=feed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed.js","sourceRoot":"","sources":["../../../src/generated/modules/feed.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,UAAW,SAAQ,gBAAM;IAClC;;;;;;OAMG;IACI,KAAK,CAAC,IAAmB,EAAE,OAAe,EAAE;QAC/C,OAAO,IAAI,cAAI,CAAe,IAAI,CAAC,MAAM,EAAE;YACvC,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,IAAI;aACb;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,MAAc,EAAE,QAAgB,EAAE,MAAc;QAC1D,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AApCD,gCAoCC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { ForumCategoriesResponse, ForumSearchResponse, GetQuoteTextResponse, NewThreadResponse, TCResponse, ThreadListResponse, ViewPostsResponse } from "../types";
|
|
3
|
+
export declare class ForumModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new thread in a category.
|
|
6
|
+
*
|
|
7
|
+
* @param category - Id of the category to post the thread in.
|
|
8
|
+
* @param title - Thread title.
|
|
9
|
+
* @param text - Body text of the opening post (UCP markup).
|
|
10
|
+
* @returns The new thread's id.
|
|
11
|
+
*/
|
|
12
|
+
newThread(category: string, title: string, text: string): Call<NewThreadResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* View posts in a thread.
|
|
15
|
+
*
|
|
16
|
+
* @param threadId - Id of the thread to view.
|
|
17
|
+
* @param fetchType - "new" to fetch new posts, "backscroll" to fetch older posts.
|
|
18
|
+
* @param postId - Id of the post to start fetching from. Defaults to 0 (the first post).
|
|
19
|
+
* @param reverse - If true, fetch posts in reverse order (newest first). Defaults to false.
|
|
20
|
+
* @param includePost - If true, include the post with id `postId` in the results. Defaults to true.
|
|
21
|
+
* @returns A ViewPostsResponse object containing the requested posts and thread metadata.
|
|
22
|
+
*/
|
|
23
|
+
viewPosts(threadId: number, fetchType: string, postId?: number, reverse?: boolean, includePost?: boolean): Call<ViewPostsResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Reply to a thread with a new post.
|
|
26
|
+
*
|
|
27
|
+
* @param text - Body text of the reply (UCP markup).
|
|
28
|
+
* @param threadId - Id of the thread to reply to.
|
|
29
|
+
* @returns A TCResponse object indicating the result of the reply attempt.
|
|
30
|
+
*/
|
|
31
|
+
replyThread(text: string, threadId: number): Call<TCResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Mark a thread as read, clearing the new-post indicator for that thread.
|
|
34
|
+
*
|
|
35
|
+
* @param postId - Id of the last post read in the thread.
|
|
36
|
+
* @param threadId - Id of the thread to mark as read.
|
|
37
|
+
* @returns A TCResponse object indicating the result of the operation.
|
|
38
|
+
*/
|
|
39
|
+
readThread(postId: number, threadId: number): Call<TCResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Edit a post's text.
|
|
42
|
+
*
|
|
43
|
+
* @param postId - Id of the post to edit.
|
|
44
|
+
* @param text - New body text for the post (UCP markup).
|
|
45
|
+
* @returns A TCResponse object indicating the result of the edit attempt.
|
|
46
|
+
*/
|
|
47
|
+
editPost(postId: number, text: string): Call<TCResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Search the forum for posts matching a query.
|
|
50
|
+
*
|
|
51
|
+
* @param query - Search query string.
|
|
52
|
+
* @returns A ForumSearchResponse object containing the search results.
|
|
53
|
+
*/
|
|
54
|
+
search(query: string): Call<ForumSearchResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Get the list of forum categories.
|
|
57
|
+
*
|
|
58
|
+
* @returns A ForumCategoriesResponse object containing the list of categories.
|
|
59
|
+
*/
|
|
60
|
+
categoriesGet(): Call<ForumCategoriesResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Get the list of threads in a category.
|
|
63
|
+
*
|
|
64
|
+
* @param category - Id of the category to fetch threads from.
|
|
65
|
+
* @param offset - Number of threads to skip (for pagination). Defaults to 0.
|
|
66
|
+
* @returns A ThreadListResponse object containing the list of threads in the category.
|
|
67
|
+
*/
|
|
68
|
+
threadList(category: string, offset?: number): Call<ThreadListResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Fetch a post's text and author, for building a quote reply.
|
|
71
|
+
*
|
|
72
|
+
* @param id - Id of the post to quote.
|
|
73
|
+
* @returns The post's original text and author.
|
|
74
|
+
*/
|
|
75
|
+
getQuoteText(id: number): Call<GetQuoteTextResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Follow or unfollow a thread to control notifications for new replies.
|
|
78
|
+
*
|
|
79
|
+
* @param threadId - Thread to follow or unfollow.
|
|
80
|
+
* @param follow - True to follow, false to unfollow.
|
|
81
|
+
*/
|
|
82
|
+
followThread(threadId: number, follow: boolean): Call<TCResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Flag a post for mod attention.
|
|
85
|
+
*
|
|
86
|
+
* @param postId - Id of the post being flagged.
|
|
87
|
+
* @param comment - Reason the post is being flagged.
|
|
88
|
+
*/
|
|
89
|
+
flagPost(postId: number, comment: string): Call<TCResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Mark every thread as read, clearing all new-post indicators. This is
|
|
92
|
+
* irreversible and sets `ForumCategory.newThreads` to 0 for every category.
|
|
93
|
+
*/
|
|
94
|
+
readAll(): Call<TCResponse>;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=forum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forum.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/forum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,UAAU,CAAC;AAElB,qBAAa,WAAY,SAAQ,MAAM;IACnC;;;;;;;OAOG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI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|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForumModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class ForumModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new thread in a category.
|
|
9
|
+
*
|
|
10
|
+
* @param category - Id of the category to post the thread in.
|
|
11
|
+
* @param title - Thread title.
|
|
12
|
+
* @param text - Body text of the opening post (UCP markup).
|
|
13
|
+
* @returns The new thread's id.
|
|
14
|
+
*/
|
|
15
|
+
newThread(category, title, text) {
|
|
16
|
+
return new runtime_1.Call(this.client, {
|
|
17
|
+
fn: "forum.newthread",
|
|
18
|
+
payload: {
|
|
19
|
+
category: category,
|
|
20
|
+
title: title,
|
|
21
|
+
text: text,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* View posts in a thread.
|
|
27
|
+
*
|
|
28
|
+
* @param threadId - Id of the thread to view.
|
|
29
|
+
* @param fetchType - "new" to fetch new posts, "backscroll" to fetch older posts.
|
|
30
|
+
* @param postId - Id of the post to start fetching from. Defaults to 0 (the first post).
|
|
31
|
+
* @param reverse - If true, fetch posts in reverse order (newest first). Defaults to false.
|
|
32
|
+
* @param includePost - If true, include the post with id `postId` in the results. Defaults to true.
|
|
33
|
+
* @returns A ViewPostsResponse object containing the requested posts and thread metadata.
|
|
34
|
+
*/
|
|
35
|
+
viewPosts(threadId, fetchType, postId = 0, reverse = false, includePost = true) {
|
|
36
|
+
return new runtime_1.Call(this.client, {
|
|
37
|
+
fn: "forum.viewposts",
|
|
38
|
+
payload: {
|
|
39
|
+
threadId: threadId,
|
|
40
|
+
type: fetchType,
|
|
41
|
+
postId: postId,
|
|
42
|
+
getSomeBackscroll: reverse,
|
|
43
|
+
includePost: includePost,
|
|
44
|
+
includeThreadMetadata: true,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Reply to a thread with a new post.
|
|
50
|
+
*
|
|
51
|
+
* @param text - Body text of the reply (UCP markup).
|
|
52
|
+
* @param threadId - Id of the thread to reply to.
|
|
53
|
+
* @returns A TCResponse object indicating the result of the reply attempt.
|
|
54
|
+
*/
|
|
55
|
+
replyThread(text, threadId) {
|
|
56
|
+
return new runtime_1.Call(this.client, {
|
|
57
|
+
fn: "forum.replythread",
|
|
58
|
+
payload: {
|
|
59
|
+
text: text,
|
|
60
|
+
threadId: threadId,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Mark a thread as read, clearing the new-post indicator for that thread.
|
|
66
|
+
*
|
|
67
|
+
* @param postId - Id of the last post read in the thread.
|
|
68
|
+
* @param threadId - Id of the thread to mark as read.
|
|
69
|
+
* @returns A TCResponse object indicating the result of the operation.
|
|
70
|
+
*/
|
|
71
|
+
readThread(postId, threadId) {
|
|
72
|
+
return new runtime_1.Call(this.client, {
|
|
73
|
+
fn: "forum.readthread",
|
|
74
|
+
payload: {
|
|
75
|
+
postId: postId,
|
|
76
|
+
threadId: threadId,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Edit a post's text.
|
|
82
|
+
*
|
|
83
|
+
* @param postId - Id of the post to edit.
|
|
84
|
+
* @param text - New body text for the post (UCP markup).
|
|
85
|
+
* @returns A TCResponse object indicating the result of the edit attempt.
|
|
86
|
+
*/
|
|
87
|
+
editPost(postId, text) {
|
|
88
|
+
return new runtime_1.Call(this.client, {
|
|
89
|
+
fn: "forum.editpost",
|
|
90
|
+
payload: {
|
|
91
|
+
postId: postId,
|
|
92
|
+
text: text,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Search the forum for posts matching a query.
|
|
98
|
+
*
|
|
99
|
+
* @param query - Search query string.
|
|
100
|
+
* @returns A ForumSearchResponse object containing the search results.
|
|
101
|
+
*/
|
|
102
|
+
search(query) {
|
|
103
|
+
return new runtime_1.Call(this.client, {
|
|
104
|
+
fn: "forum.search",
|
|
105
|
+
payload: {
|
|
106
|
+
query: query,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get the list of forum categories.
|
|
112
|
+
*
|
|
113
|
+
* @returns A ForumCategoriesResponse object containing the list of categories.
|
|
114
|
+
*/
|
|
115
|
+
categoriesGet() {
|
|
116
|
+
return new runtime_1.Call(this.client, {
|
|
117
|
+
fn: "forum.categoriesget",
|
|
118
|
+
payload: {},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get the list of threads in a category.
|
|
123
|
+
*
|
|
124
|
+
* @param category - Id of the category to fetch threads from.
|
|
125
|
+
* @param offset - Number of threads to skip (for pagination). Defaults to 0.
|
|
126
|
+
* @returns A ThreadListResponse object containing the list of threads in the category.
|
|
127
|
+
*/
|
|
128
|
+
threadList(category, offset = 0) {
|
|
129
|
+
return new runtime_1.Call(this.client, {
|
|
130
|
+
fn: "forum.threadlist",
|
|
131
|
+
payload: {
|
|
132
|
+
category: category,
|
|
133
|
+
offset: offset,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Fetch a post's text and author, for building a quote reply.
|
|
139
|
+
*
|
|
140
|
+
* @param id - Id of the post to quote.
|
|
141
|
+
* @returns The post's original text and author.
|
|
142
|
+
*/
|
|
143
|
+
getQuoteText(id) {
|
|
144
|
+
return new runtime_1.Call(this.client, {
|
|
145
|
+
fn: "forum.getquotetext",
|
|
146
|
+
payload: {
|
|
147
|
+
id: id,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Follow or unfollow a thread to control notifications for new replies.
|
|
153
|
+
*
|
|
154
|
+
* @param threadId - Thread to follow or unfollow.
|
|
155
|
+
* @param follow - True to follow, false to unfollow.
|
|
156
|
+
*/
|
|
157
|
+
followThread(threadId, follow) {
|
|
158
|
+
return new runtime_1.Call(this.client, {
|
|
159
|
+
fn: "forum.followthread",
|
|
160
|
+
payload: {
|
|
161
|
+
threadId: threadId,
|
|
162
|
+
follow: follow,
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Flag a post for mod attention.
|
|
168
|
+
*
|
|
169
|
+
* @param postId - Id of the post being flagged.
|
|
170
|
+
* @param comment - Reason the post is being flagged.
|
|
171
|
+
*/
|
|
172
|
+
flagPost(postId, comment) {
|
|
173
|
+
return new runtime_1.Call(this.client, {
|
|
174
|
+
fn: "forum.flagpost",
|
|
175
|
+
payload: {
|
|
176
|
+
postId: postId,
|
|
177
|
+
comment: comment,
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Mark every thread as read, clearing all new-post indicators. This is
|
|
183
|
+
* irreversible and sets `ForumCategory.newThreads` to 0 for every category.
|
|
184
|
+
*/
|
|
185
|
+
readAll() {
|
|
186
|
+
return new runtime_1.Call(this.client, {
|
|
187
|
+
fn: "forum.readall",
|
|
188
|
+
payload: {},
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.ForumModule = ForumModule;
|
|
193
|
+
//# sourceMappingURL=forum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forum.js","sourceRoot":"","sources":["../../../src/generated/modules/forum.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAW7C,MAAa,WAAY,SAAQ,gBAAM;IACnC;;;;;;;OAOG;IACI,SAAS,CAAC,QAAgB,EAAE,KAAa,EAAE,IAAY;QAC1D,OAAO,IAAI,cAAI,CAAoB,IAAI,CAAC,MAAM,EAAE;YAC5C,EAAE,EAAE,i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AM;gBACd,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACI,OAAO;QACV,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AA1MD,kCA0MC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { ImageBatchGetResponse, ImageGalleryListResponse, ImageInfoResponse } from "../types";
|
|
3
|
+
export declare class ImagesModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Fetch one or more images by id as base64-encoded PNGs.
|
|
6
|
+
*
|
|
7
|
+
* @param ids - Image ids to fetch, e.g. `["img45788"]`.
|
|
8
|
+
* @returns The matching images with their base64 PNG data.
|
|
9
|
+
*/
|
|
10
|
+
batchGet(ids: string[]): Call<ImageBatchGetResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* List the active account's own saved images, most-recent first.
|
|
13
|
+
*
|
|
14
|
+
* @param page - 1-based page number.
|
|
15
|
+
* @param deleted - Whether to list deleted images instead of live ones.
|
|
16
|
+
* @returns A page of image ids and a flag for whether more pages remain.
|
|
17
|
+
*/
|
|
18
|
+
galleryList(page?: number, deleted?: boolean): Call<ImageGalleryListResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Look up ownership metadata for a single image.
|
|
21
|
+
*
|
|
22
|
+
* @param imageId - The image to inspect.
|
|
23
|
+
* @returns The image's owner and whether the active account owns it.
|
|
24
|
+
*/
|
|
25
|
+
info(imageId: string): Call<ImageInfoResponse>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/images.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE9F,qBAAa,YAAa,SAAQ,MAAM;IACpC;;;;;OAKG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,qBAAqB,CAAC;IAS3D;;;;;;OAMG;IACI,WAAW,CAAC,IAAI,GAAE,MAAU,EAAE,OAAO,GAAE,OAAe,GAAG,IAAI,CAAC,wBAAwB,CAAC;IAU9F;;;;;OAKG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;CAQxD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImagesModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class ImagesModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Fetch one or more images by id as base64-encoded PNGs.
|
|
9
|
+
*
|
|
10
|
+
* @param ids - Image ids to fetch, e.g. `["img45788"]`.
|
|
11
|
+
* @returns The matching images with their base64 PNG data.
|
|
12
|
+
*/
|
|
13
|
+
batchGet(ids) {
|
|
14
|
+
return new runtime_1.Call(this.client, {
|
|
15
|
+
fn: "images.batchget",
|
|
16
|
+
payload: {
|
|
17
|
+
ids: ids,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* List the active account's own saved images, most-recent first.
|
|
23
|
+
*
|
|
24
|
+
* @param page - 1-based page number.
|
|
25
|
+
* @param deleted - Whether to list deleted images instead of live ones.
|
|
26
|
+
* @returns A page of image ids and a flag for whether more pages remain.
|
|
27
|
+
*/
|
|
28
|
+
galleryList(page = 1, deleted = false) {
|
|
29
|
+
return new runtime_1.Call(this.client, {
|
|
30
|
+
fn: "images.gallerylist",
|
|
31
|
+
payload: {
|
|
32
|
+
page: page,
|
|
33
|
+
deleted: deleted,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Look up ownership metadata for a single image.
|
|
39
|
+
*
|
|
40
|
+
* @param imageId - The image to inspect.
|
|
41
|
+
* @returns The image's owner and whether the active account owns it.
|
|
42
|
+
*/
|
|
43
|
+
info(imageId) {
|
|
44
|
+
return new runtime_1.Call(this.client, {
|
|
45
|
+
fn: "images.info",
|
|
46
|
+
payload: {
|
|
47
|
+
imageId: imageId,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ImagesModule = ImagesModule;
|
|
53
|
+
//# sourceMappingURL=images.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.js","sourceRoot":"","sources":["../../../src/generated/modules/images.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,YAAa,SAAQ,gBAAM;IACpC;;;;;OAKG;IACI,QAAQ,CAAC,GAAa;QACzB,OAAO,IAAI,cAAI,CAAwB,IAAI,CAAC,MAAM,EAAE;YAChD,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE;gBACL,GAAG,EAAE,GAAG;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,OAAe,CAAC,EAAE,UAAmB,KAAK;QACzD,OAAO,IAAI,cAAI,CAA2B,IAAI,CAAC,MAAM,EAAE;YACnD,EAAE,EAAE,oBAAoB;YACxB,OAAO,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,OAAe;QACvB,OAAO,IAAI,cAAI,CAAoB,IAAI,CAAC,MAAM,EAAE;YAC5C,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA/CD,oCA+CC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { FolderListResponse, FolderViewResponse, MessageViewResponse, TCResponse } from "../types";
|
|
3
|
+
export declare class MessagesModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Get a list of messages in a folder.
|
|
6
|
+
*
|
|
7
|
+
* @param folder - The folder to view. Defaults to "inbox".
|
|
8
|
+
* @param page - The page number to view. Defaults to 1.
|
|
9
|
+
* @returns A FolderViewResponse object containing the messages in the folder.
|
|
10
|
+
*/
|
|
11
|
+
folderView(folder?: string, page?: number): Call<FolderViewResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* View a conversation thread.
|
|
14
|
+
*
|
|
15
|
+
* @param conversationId - The id of the conversation to view.
|
|
16
|
+
* @param includeHeader - Whether to include the conversation header in the response. Defaults to true.
|
|
17
|
+
* @param markAsRead - Whether to mark the conversation as read. Defaults to true.
|
|
18
|
+
* @param page - The page number of messages to view. Defaults to 1.
|
|
19
|
+
* @returns A MessageViewResponse object containing the messages in the conversation and the header if requested.
|
|
20
|
+
*/
|
|
21
|
+
view(conversationId: string, includeHeader?: boolean, markAsRead?: boolean, page?: number): Call<MessageViewResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Reply to a conversation thread.
|
|
24
|
+
*
|
|
25
|
+
* @param conversationId - The id of the conversation to reply to.
|
|
26
|
+
* @param text - The body text of the reply (UCP markup).
|
|
27
|
+
* @param unanonymize - Whether to send the reply as your real username instead of anonymously. Defaults to false.
|
|
28
|
+
* @returns A TCResponse object indicating the result of the reply attempt.
|
|
29
|
+
*/
|
|
30
|
+
reply(conversationId: string, text: string, unanonymize?: boolean): Call<TCResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Get a list of the user's message folders.
|
|
33
|
+
*
|
|
34
|
+
* @returns A FolderListResponse object containing the user's message folders.
|
|
35
|
+
*/
|
|
36
|
+
folderList(): Call<FolderListResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Start a new conversation with one or more recipients.
|
|
39
|
+
*
|
|
40
|
+
* @param title - Conversation title / subject.
|
|
41
|
+
* @param body - Body text of the opening message (UCP markup).
|
|
42
|
+
* @param recipients - Usernames to send the conversation to.
|
|
43
|
+
*/
|
|
44
|
+
startConversation(title: string, body: string, recipients: string[]): Call<TCResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Delete a conversation from the current user's view.
|
|
47
|
+
*
|
|
48
|
+
* @param conversationId - Id of the conversation to delete.
|
|
49
|
+
*/
|
|
50
|
+
delete(conversationId: string): Call<TCResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Move a conversation into a folder.
|
|
53
|
+
*
|
|
54
|
+
* @param conversationId - Id of the conversation to move.
|
|
55
|
+
* @param folder - Id of the destination folder.
|
|
56
|
+
*/
|
|
57
|
+
moveToFolder(conversationId: string, folder: string): Call<TCResponse>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/messages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEnG,qBAAa,cAAe,SAAQ,MAAM;IACtC;;;;;;OAMG;IACI,UAAU,CAAC,MAAM,GAAE,MAAgB,EAAE,IAAI,GAAE,MAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAUvF;;;;;;;;OAQG;IACI,IAAI,CACP,cAAc,EAAE,MAAM,EACtB,aAAa,GAAE,OAAc,EAC7B,UAAU,GAAE,OAAc,EAC1B,IAAI,GAAE,MAAU,GACjB,IAAI,CAAC,mBAAmB,CAAC;IAY5B;;;;;;;OAOG;IACI,KAAK,CACR,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,OAAe,GAC7B,IAAI,CAAC,UAAU,CAAC;IAWnB;;;;OAIG;IACI,UAAU,IAAI,IAAI,CAAC,kBAAkB,CAAC;IAO7C;;;;;;OAMG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;IAW7F;;;;OAIG;IACI,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IASvD;;;;;OAKG;IACI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;CAShF"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 runtime_1 = require("../../runtime");
|
|
6
|
+
class MessagesModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Get a list of messages in a folder.
|
|
9
|
+
*
|
|
10
|
+
* @param folder - The folder to view. Defaults to "inbox".
|
|
11
|
+
* @param page - The page number to view. Defaults to 1.
|
|
12
|
+
* @returns A FolderViewResponse object containing the messages in the folder.
|
|
13
|
+
*/
|
|
14
|
+
folderView(folder = "inbox", page = 1) {
|
|
15
|
+
return new runtime_1.Call(this.client, {
|
|
16
|
+
fn: "messages.folderview",
|
|
17
|
+
payload: {
|
|
18
|
+
folder: folder,
|
|
19
|
+
page: page,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* View a conversation thread.
|
|
25
|
+
*
|
|
26
|
+
* @param conversationId - The id of the conversation to view.
|
|
27
|
+
* @param includeHeader - Whether to include the conversation header in the response. Defaults to true.
|
|
28
|
+
* @param markAsRead - Whether to mark the conversation as read. Defaults to true.
|
|
29
|
+
* @param page - The page number of messages to view. Defaults to 1.
|
|
30
|
+
* @returns A MessageViewResponse object containing the messages in the conversation and the header if requested.
|
|
31
|
+
*/
|
|
32
|
+
view(conversationId, includeHeader = true, markAsRead = true, page = 1) {
|
|
33
|
+
return new runtime_1.Call(this.client, {
|
|
34
|
+
fn: "messages.view",
|
|
35
|
+
payload: {
|
|
36
|
+
conversationId: conversationId,
|
|
37
|
+
includeHeader: includeHeader,
|
|
38
|
+
markAsRead: markAsRead,
|
|
39
|
+
page: page,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Reply to a conversation thread.
|
|
45
|
+
*
|
|
46
|
+
* @param conversationId - The id of the conversation to reply to.
|
|
47
|
+
* @param text - The body text of the reply (UCP markup).
|
|
48
|
+
* @param unanonymize - Whether to send the reply as your real username instead of anonymously. Defaults to false.
|
|
49
|
+
* @returns A TCResponse object indicating the result of the reply attempt.
|
|
50
|
+
*/
|
|
51
|
+
reply(conversationId, text, unanonymize = false) {
|
|
52
|
+
return new runtime_1.Call(this.client, {
|
|
53
|
+
fn: "messages.reply",
|
|
54
|
+
payload: {
|
|
55
|
+
conversationId: conversationId,
|
|
56
|
+
text: text,
|
|
57
|
+
unanonymize: unanonymize,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get a list of the user's message folders.
|
|
63
|
+
*
|
|
64
|
+
* @returns A FolderListResponse object containing the user's message folders.
|
|
65
|
+
*/
|
|
66
|
+
folderList() {
|
|
67
|
+
return new runtime_1.Call(this.client, {
|
|
68
|
+
fn: "messages.folderlist",
|
|
69
|
+
payload: {},
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Start a new conversation with one or more recipients.
|
|
74
|
+
*
|
|
75
|
+
* @param title - Conversation title / subject.
|
|
76
|
+
* @param body - Body text of the opening message (UCP markup).
|
|
77
|
+
* @param recipients - Usernames to send the conversation to.
|
|
78
|
+
*/
|
|
79
|
+
startConversation(title, body, recipients) {
|
|
80
|
+
return new runtime_1.Call(this.client, {
|
|
81
|
+
fn: "messages.startconversation",
|
|
82
|
+
payload: {
|
|
83
|
+
title: title,
|
|
84
|
+
body: body,
|
|
85
|
+
recipients: recipients,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Delete a conversation from the current user's view.
|
|
91
|
+
*
|
|
92
|
+
* @param conversationId - Id of the conversation to delete.
|
|
93
|
+
*/
|
|
94
|
+
delete(conversationId) {
|
|
95
|
+
return new runtime_1.Call(this.client, {
|
|
96
|
+
fn: "messages.delete",
|
|
97
|
+
payload: {
|
|
98
|
+
conversationId: conversationId,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Move a conversation into a folder.
|
|
104
|
+
*
|
|
105
|
+
* @param conversationId - Id of the conversation to move.
|
|
106
|
+
* @param folder - Id of the destination folder.
|
|
107
|
+
*/
|
|
108
|
+
moveToFolder(conversationId, folder) {
|
|
109
|
+
return new runtime_1.Call(this.client, {
|
|
110
|
+
fn: "messages.movetofolder",
|
|
111
|
+
payload: {
|
|
112
|
+
conversationId: conversationId,
|
|
113
|
+
folder: folder,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.MessagesModule = MessagesModule;
|
|
119
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/generated/modules/messages.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AA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KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,UAAU;aACzB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,cAAsB;QAChC,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE;gBACL,cAAc,EAAE,cAAc;aACjC;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,cAAsB,EAAE,MAAc;QACtD,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,uBAAuB;YAC3B,OAAO,EAAE;gBACL,cAAc,EAAE,cAAc;gBAC9B,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA9HD,wCA8HC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { NavbarGetResponse } from "../types";
|
|
3
|
+
export declare class NavbarModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Fetch the site navigation items for the current user.
|
|
6
|
+
*
|
|
7
|
+
* @returns The navigation items, in display order.
|
|
8
|
+
*/
|
|
9
|
+
get(): Call<NavbarGetResponse>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=navbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/navbar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,YAAa,SAAQ,MAAM;IACpC;;;;OAIG;IACI,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC;CAMxC"}
|