@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,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DrawingModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class DrawingModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Save a drawing and return its image id.
|
|
9
|
+
*
|
|
10
|
+
* @param data - Flat hex pixel string: 32×32, RGB, 6 hex chars per pixel, row-major (1024 pixels = 6144 chars), left-to-right then top-to-bottom.
|
|
11
|
+
* @param makeActive - Set this drawing as your active image immediately on save.
|
|
12
|
+
* @returns The id of the newly-created image.
|
|
13
|
+
*/
|
|
14
|
+
saveDrawing(data, makeActive = false) {
|
|
15
|
+
return new runtime_1.Call(this.client, {
|
|
16
|
+
fn: "legacy.drawing",
|
|
17
|
+
payload: {
|
|
18
|
+
data: data,
|
|
19
|
+
makeActive: makeActive,
|
|
20
|
+
action: "save",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Fetch the raw pixel data for an existing image, for editing or inspection.
|
|
26
|
+
*
|
|
27
|
+
* @param imageId - The image to load, e.g. `img45790`.
|
|
28
|
+
* @returns The image's flat hex pixel data.
|
|
29
|
+
*/
|
|
30
|
+
viewDrawingData(imageId) {
|
|
31
|
+
return new runtime_1.Call(this.client, {
|
|
32
|
+
fn: "legacy.drawing",
|
|
33
|
+
payload: {
|
|
34
|
+
imageId: imageId,
|
|
35
|
+
action: "initial-image-data",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Send one of your drawings to another user.
|
|
41
|
+
*
|
|
42
|
+
* @param imageId - The image to send.
|
|
43
|
+
* @param receiver - Username of the recipient.
|
|
44
|
+
*/
|
|
45
|
+
sendDrawing(imageId, receiver) {
|
|
46
|
+
return new runtime_1.Call(this.client, {
|
|
47
|
+
fn: "drawing.send",
|
|
48
|
+
payload: {
|
|
49
|
+
imageId: imageId,
|
|
50
|
+
receiver: receiver,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Set which of your saved images is the active one.
|
|
56
|
+
*
|
|
57
|
+
* @param imageId - The image to make active.
|
|
58
|
+
*/
|
|
59
|
+
setActive(imageId) {
|
|
60
|
+
return new runtime_1.Call(this.client, {
|
|
61
|
+
fn: "drawing.setactive",
|
|
62
|
+
payload: {
|
|
63
|
+
imageId: imageId,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.DrawingModule = DrawingModule;
|
|
69
|
+
//# sourceMappingURL=drawing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing.js","sourceRoot":"","sources":["../../../src/generated/modules/drawing.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,aAAc,SAAQ,gBAAM;IACrC;;;;;;OAMG;IACI,WAAW,CAAC,IAAY,EAAE,aAAsB,KAAK;QACxD,OAAO,IAAI,cAAI,CAAsB,IAAI,CAAC,MAAM,EAAE;YAC9C,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,UAAU;gBACtB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,OAAe;QAClC,OAAO,IAAI,cAAI,CAA0B,IAAI,CAAC,MAAM,EAAE;YAClD,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,MAAM,EAAE,oBAAoB;aAC/B;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,WAAW,CAAC,OAAe,EAAE,QAAgB;QAChD,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,cAAc;YAClB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,QAAQ;aACrB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,OAAe;QAC5B,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,mBAAmB;YACvB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAhED,sCAgEC"}
|
|
@@ -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,26 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { ForumCategoriesResponse, ForumSearchResponse, GetQuoteTextResponse, TCResponse, ThreadListResponse, ViewPostsResponse } from "../types";
|
|
3
|
+
export declare class ForumModule extends Module {
|
|
4
|
+
viewPosts(threadId: number, fetchType: string, postId?: number, reverse?: boolean, includePost?: boolean): Call<ViewPostsResponse>;
|
|
5
|
+
replyThread(text: string, threadId: number): Call<TCResponse>;
|
|
6
|
+
readThread(postId: number, threadId: number): Call<TCResponse>;
|
|
7
|
+
editPost(postId: number, text: string): Call<TCResponse>;
|
|
8
|
+
search(query: string): Call<ForumSearchResponse>;
|
|
9
|
+
categoriesGet(): Call<ForumCategoriesResponse>;
|
|
10
|
+
threadList(category: string, offset?: number): Call<ThreadListResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch a post's text and author, for building a quote reply.
|
|
13
|
+
*
|
|
14
|
+
* @param id - Id of the post to quote.
|
|
15
|
+
* @returns The post's original text and author.
|
|
16
|
+
*/
|
|
17
|
+
getQuoteText(id: number): Call<GetQuoteTextResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Follow or unfollow a thread to control notifications for new replies.
|
|
20
|
+
*
|
|
21
|
+
* @param threadId - Thread to follow or unfollow.
|
|
22
|
+
* @param follow - True to follow, false to unfollow.
|
|
23
|
+
*/
|
|
24
|
+
followThread(threadId: number, follow: boolean): Call<TCResponse>;
|
|
25
|
+
}
|
|
26
|
+
//# 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,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,UAAU,CAAC;AAElB,qBAAa,WAAY,SAAQ,MAAM;IAC5B,SAAS,CACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,MAAU,EAClB,OAAO,GAAE,OAAe,EACxB,WAAW,GAAE,OAAc,GAC5B,IAAI,CAAC,iBAAiB,CAAC;IAcnB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAU7D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAU9D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAUxD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC;IAShD,aAAa,IAAI,IAAI,CAAC,uBAAuB,CAAC;IAO9C,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAUjF;;;;;OAKG;IACI,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC;IAS3D;;;;;OAKG;IACI,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;CAS3E"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
viewPosts(threadId, fetchType, postId = 0, reverse = false, includePost = true) {
|
|
8
|
+
return new runtime_1.Call(this.client, {
|
|
9
|
+
fn: "forum.viewposts",
|
|
10
|
+
payload: {
|
|
11
|
+
threadId: threadId,
|
|
12
|
+
type: fetchType,
|
|
13
|
+
postId: postId,
|
|
14
|
+
getSomeBackscroll: reverse,
|
|
15
|
+
includePost: includePost,
|
|
16
|
+
includeThreadMetadata: true,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
replyThread(text, threadId) {
|
|
21
|
+
return new runtime_1.Call(this.client, {
|
|
22
|
+
fn: "forum.replythread",
|
|
23
|
+
payload: {
|
|
24
|
+
text: text,
|
|
25
|
+
threadId: threadId,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
readThread(postId, threadId) {
|
|
30
|
+
return new runtime_1.Call(this.client, {
|
|
31
|
+
fn: "forum.readthread",
|
|
32
|
+
payload: {
|
|
33
|
+
postId: postId,
|
|
34
|
+
threadId: threadId,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
editPost(postId, text) {
|
|
39
|
+
return new runtime_1.Call(this.client, {
|
|
40
|
+
fn: "forum.editpost",
|
|
41
|
+
payload: {
|
|
42
|
+
postId: postId,
|
|
43
|
+
text: text,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
search(query) {
|
|
48
|
+
return new runtime_1.Call(this.client, {
|
|
49
|
+
fn: "forum.search",
|
|
50
|
+
payload: {
|
|
51
|
+
query: query,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
categoriesGet() {
|
|
56
|
+
return new runtime_1.Call(this.client, {
|
|
57
|
+
fn: "forum.categoriesget",
|
|
58
|
+
payload: {},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
threadList(category, offset = 0) {
|
|
62
|
+
return new runtime_1.Call(this.client, {
|
|
63
|
+
fn: "forum.threadlist",
|
|
64
|
+
payload: {
|
|
65
|
+
category: category,
|
|
66
|
+
offset: offset,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Fetch a post's text and author, for building a quote reply.
|
|
72
|
+
*
|
|
73
|
+
* @param id - Id of the post to quote.
|
|
74
|
+
* @returns The post's original text and author.
|
|
75
|
+
*/
|
|
76
|
+
getQuoteText(id) {
|
|
77
|
+
return new runtime_1.Call(this.client, {
|
|
78
|
+
fn: "forum.getquotetext",
|
|
79
|
+
payload: {
|
|
80
|
+
id: id,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Follow or unfollow a thread to control notifications for new replies.
|
|
86
|
+
*
|
|
87
|
+
* @param threadId - Thread to follow or unfollow.
|
|
88
|
+
* @param follow - True to follow, false to unfollow.
|
|
89
|
+
*/
|
|
90
|
+
followThread(threadId, follow) {
|
|
91
|
+
return new runtime_1.Call(this.client, {
|
|
92
|
+
fn: "forum.followthread",
|
|
93
|
+
payload: {
|
|
94
|
+
threadId: threadId,
|
|
95
|
+
follow: follow,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.ForumModule = ForumModule;
|
|
101
|
+
//# 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;AAU7C,MAAa,WAAY,SAAQ,gBAAM;IAC5B,SAAS,CACZ,QAAgB,EAChB,SAAiB,EACjB,SAAiB,CAAC,EAClB,UAAmB,KAAK,EACxB,cAAuB,IAAI;QAE3B,OAAO,IAAI,cAAI,CAAoB,IAAI,CAAC,MAAM,EAAE;YAC5C,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE;gBACL,QAAQ,EAAE,QAAQ;gBAClB,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,MAAM;gBACd,iBAAiB,EAAE,OAAO;gBAC1B,WAAW,EAAE,WAAW;gBACxB,qBAAqB,EAAE,IAAI;aAC9B;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,WAAW,CAAC,IAAY,EAAE,QAAgB;QAC7C,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,mBAAmB;YACvB,OAAO,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,QAAQ,EAAE,QAAQ;aACrB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,UAAU,CAAC,MAAc,EAAE,QAAgB;QAC9C,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,QAAQ;aACrB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,QAAQ,CAAC,MAAc,EAAE,IAAY;QACxC,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI;aACb;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,KAAa;QACvB,OAAO,IAAI,cAAI,CAAsB,IAAI,CAAC,MAAM,EAAE;YAC9C,EAAE,EAAE,cAAc;YAClB,OAAO,EAAE;gBACL,KAAK,EAAE,KAAK;aACf;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,aAAa;QAChB,OAAO,IAAI,cAAI,CAA0B,IAAI,CAAC,MAAM,EAAE;YAClD,EAAE,EAAE,qBAAqB;YACzB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;IAEM,UAAU,CAAC,QAAgB,EAAE,SAAiB,CAAC;QAClD,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE;gBACL,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,EAAU;QAC1B,OAAO,IAAI,cAAI,CAAuB,IAAI,CAAC,MAAM,EAAE;YAC/C,EAAE,EAAE,oBAAoB;YACxB,OAAO,EAAE;gBACL,EAAE,EAAE,EAAE;aACT;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,QAAgB,EAAE,MAAe;QACjD,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,oBAAoB;YACxB,OAAO,EAAE;gBACL,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA3GD,kCA2GC"}
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { FolderListResponse, FolderViewResponse, MessageViewResponse, TCResponse } from "../types";
|
|
3
|
+
export declare class MessagesModule extends Module {
|
|
4
|
+
folderView(folder?: string, page?: number): Call<FolderViewResponse>;
|
|
5
|
+
view(conversationId: string, includeHeader?: boolean, markAsRead?: boolean, page?: number): Call<MessageViewResponse>;
|
|
6
|
+
reply(conversationId: string, text: string, unanonymize?: boolean): Call<TCResponse>;
|
|
7
|
+
folderList(): Call<FolderListResponse>;
|
|
8
|
+
}
|
|
9
|
+
//# 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;IAC/B,UAAU,CAAC,MAAM,GAAE,MAAgB,EAAE,IAAI,GAAE,MAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAUhF,IAAI,CACP,cAAc,EAAE,MAAM,EACtB,aAAa,GAAE,OAAc,EAC7B,UAAU,GAAE,OAAc,EAC1B,IAAI,GAAE,MAAU,GACjB,IAAI,CAAC,mBAAmB,CAAC;IAYrB,KAAK,CACR,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,OAAe,GAC7B,IAAI,CAAC,UAAU,CAAC;IAWZ,UAAU,IAAI,IAAI,CAAC,kBAAkB,CAAC;CAMhD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
folderView(folder = "inbox", page = 1) {
|
|
8
|
+
return new runtime_1.Call(this.client, {
|
|
9
|
+
fn: "messages.folderview",
|
|
10
|
+
payload: {
|
|
11
|
+
folder: folder,
|
|
12
|
+
page: page,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
view(conversationId, includeHeader = true, markAsRead = true, page = 1) {
|
|
17
|
+
return new runtime_1.Call(this.client, {
|
|
18
|
+
fn: "messages.view",
|
|
19
|
+
payload: {
|
|
20
|
+
conversationId: conversationId,
|
|
21
|
+
includeHeader: includeHeader,
|
|
22
|
+
markAsRead: markAsRead,
|
|
23
|
+
page: page,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
reply(conversationId, text, unanonymize = false) {
|
|
28
|
+
return new runtime_1.Call(this.client, {
|
|
29
|
+
fn: "messages.reply",
|
|
30
|
+
payload: {
|
|
31
|
+
conversationId: conversationId,
|
|
32
|
+
text: text,
|
|
33
|
+
unanonymize: unanonymize,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
folderList() {
|
|
38
|
+
return new runtime_1.Call(this.client, {
|
|
39
|
+
fn: "messages.folderlist",
|
|
40
|
+
payload: {},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.MessagesModule = MessagesModule;
|
|
45
|
+
//# 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;AAG7C,MAAa,cAAe,SAAQ,gBAAM;IAC/B,UAAU,CAAC,SAAiB,OAAO,EAAE,OAAe,CAAC;QACxD,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,qBAAqB;YACzB,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI;aACb;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,IAAI,CACP,cAAsB,EACtB,gBAAyB,IAAI,EAC7B,aAAsB,IAAI,EAC1B,OAAe,CAAC;QAEhB,OAAO,IAAI,cAAI,CAAsB,IAAI,CAAC,MAAM,EAAE;YAC9C,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE;gBACL,cAAc,EAAE,cAAc;gBAC9B,aAAa,EAAE,aAAa;gBAC5B,UAAU,EAAE,UAAU;gBACtB,IAAI,EAAE,IAAI;aACb;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CACR,cAAsB,EACtB,IAAY,EACZ,cAAuB,KAAK;QAE5B,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE;gBACL,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE,IAAI;gBACV,WAAW,EAAE,WAAW;aAC3B;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,qBAAqB;YACzB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AAjDD,wCAiDC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavbarModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class NavbarModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Fetch the site navigation items for the current user.
|
|
9
|
+
*
|
|
10
|
+
* @returns The navigation items, in display order.
|
|
11
|
+
*/
|
|
12
|
+
get() {
|
|
13
|
+
return new runtime_1.Call(this.client, {
|
|
14
|
+
fn: "navbar.get",
|
|
15
|
+
payload: {},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.NavbarModule = NavbarModule;
|
|
20
|
+
//# sourceMappingURL=navbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar.js","sourceRoot":"","sources":["../../../src/generated/modules/navbar.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,YAAa,SAAQ,gBAAM;IACpC;;;;OAIG;IACI,GAAG;QACN,OAAO,IAAI,cAAI,CAAoB,IAAI,CAAC,MAAM,EAAE;YAC5C,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,oCAYC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { NotifySyncResponse, TCResponse, WhosOnlineResponse } from "../types";
|
|
3
|
+
import { Feature } from "../enums";
|
|
4
|
+
export declare class NotifyModule extends Module {
|
|
5
|
+
sync(feature: Feature): Call<NotifySyncResponse>;
|
|
6
|
+
fetchOnlineUsers(feature: Feature): Call<WhosOnlineResponse>;
|
|
7
|
+
/**
|
|
8
|
+
* Register that you're viewing a page, for presence and read-tracking.
|
|
9
|
+
*
|
|
10
|
+
* @param url - Path of the page being viewed, e.g. `/forum/general`.
|
|
11
|
+
*/
|
|
12
|
+
activity(url: string): Call<TCResponse>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=notify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/notify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,YAAa,SAAQ,MAAM;IAC7B,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAShD,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC;IASnE;;;;OAIG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;CAQjD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifyModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class NotifyModule extends runtime_1.Module {
|
|
7
|
+
sync(feature) {
|
|
8
|
+
return new runtime_1.Call(this.client, {
|
|
9
|
+
fn: "notify.sync",
|
|
10
|
+
payload: {
|
|
11
|
+
feature: feature,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
fetchOnlineUsers(feature) {
|
|
16
|
+
return new runtime_1.Call(this.client, {
|
|
17
|
+
fn: "notify.whosonline",
|
|
18
|
+
payload: {
|
|
19
|
+
feature: feature,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Register that you're viewing a page, for presence and read-tracking.
|
|
25
|
+
*
|
|
26
|
+
* @param url - Path of the page being viewed, e.g. `/forum/general`.
|
|
27
|
+
*/
|
|
28
|
+
activity(url) {
|
|
29
|
+
return new runtime_1.Call(this.client, {
|
|
30
|
+
fn: "notify.activity",
|
|
31
|
+
payload: {
|
|
32
|
+
url: url,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.NotifyModule = NotifyModule;
|
|
38
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/generated/modules/notify.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAI7C,MAAa,YAAa,SAAQ,gBAAM;IAC7B,IAAI,CAAC,OAAgB;QACxB,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,gBAAgB,CAAC,OAAgB;QACpC,OAAO,IAAI,cAAI,CAAqB,IAAI,CAAC,MAAM,EAAE;YAC7C,EAAE,EAAE,mBAAmB;YACvB,OAAO,EAAE;gBACL,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,GAAW;QACvB,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE;gBACL,GAAG,EAAE,GAAG;aACX;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAhCD,oCAgCC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Call, Module } from "../../runtime";
|
|
2
|
+
import { ProfileDetailsResponse, ProfileGetResponse, TCResponse } from "../types";
|
|
3
|
+
export declare class ProfileModule extends Module {
|
|
4
|
+
/**
|
|
5
|
+
* Check whether a profile exists and resolve its canonical id.
|
|
6
|
+
*
|
|
7
|
+
* @param id - Username to look up.
|
|
8
|
+
* @returns The user's id, or `ok: false` with error `NOT_FOUND`.
|
|
9
|
+
*/
|
|
10
|
+
get(id: string): Call<ProfileGetResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch one field of a user's profile.
|
|
13
|
+
*
|
|
14
|
+
* @param user - Username whose profile to read.
|
|
15
|
+
* @param field - Field name, e.g. `blurb`, `title`, `followers`, `joinTime`, `contact.discord`.
|
|
16
|
+
* @returns The field name and its value.
|
|
17
|
+
*/
|
|
18
|
+
details(user: string, field: string): Call<ProfileDetailsResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Set one field on your own profile.
|
|
21
|
+
*
|
|
22
|
+
* @param field - Field name, e.g. `blurb`, `contact.web`.
|
|
23
|
+
* @param value - New value for the field.
|
|
24
|
+
*/
|
|
25
|
+
edit(field: string, value: string): Call<TCResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Follow or unfollow another user.
|
|
28
|
+
*
|
|
29
|
+
* @param id - Username to follow or unfollow.
|
|
30
|
+
* @param follow - True to follow, false to unfollow.
|
|
31
|
+
*/
|
|
32
|
+
toggleFollow(id: string, follow: boolean): Call<TCResponse>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/profile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAElF,qBAAa,aAAc,SAAQ,MAAM;IACrC;;;;;OAKG;IACI,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAShD;;;;;;OAMG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC;IAUzE;;;;;OAKG;IACI,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAU3D;;;;;OAKG;IACI,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;CASrE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProfileModule = void 0;
|
|
4
|
+
/* Generated by pecans-spec. Do not edit. */
|
|
5
|
+
const runtime_1 = require("../../runtime");
|
|
6
|
+
class ProfileModule extends runtime_1.Module {
|
|
7
|
+
/**
|
|
8
|
+
* Check whether a profile exists and resolve its canonical id.
|
|
9
|
+
*
|
|
10
|
+
* @param id - Username to look up.
|
|
11
|
+
* @returns The user's id, or `ok: false` with error `NOT_FOUND`.
|
|
12
|
+
*/
|
|
13
|
+
get(id) {
|
|
14
|
+
return new runtime_1.Call(this.client, {
|
|
15
|
+
fn: "profile.get",
|
|
16
|
+
payload: {
|
|
17
|
+
id: id,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Fetch one field of a user's profile.
|
|
23
|
+
*
|
|
24
|
+
* @param user - Username whose profile to read.
|
|
25
|
+
* @param field - Field name, e.g. `blurb`, `title`, `followers`, `joinTime`, `contact.discord`.
|
|
26
|
+
* @returns The field name and its value.
|
|
27
|
+
*/
|
|
28
|
+
details(user, field) {
|
|
29
|
+
return new runtime_1.Call(this.client, {
|
|
30
|
+
fn: "profile.details",
|
|
31
|
+
payload: {
|
|
32
|
+
user: user,
|
|
33
|
+
field: field,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Set one field on your own profile.
|
|
39
|
+
*
|
|
40
|
+
* @param field - Field name, e.g. `blurb`, `contact.web`.
|
|
41
|
+
* @param value - New value for the field.
|
|
42
|
+
*/
|
|
43
|
+
edit(field, value) {
|
|
44
|
+
return new runtime_1.Call(this.client, {
|
|
45
|
+
fn: "profile.edit",
|
|
46
|
+
payload: {
|
|
47
|
+
field: field,
|
|
48
|
+
value: value,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Follow or unfollow another user.
|
|
54
|
+
*
|
|
55
|
+
* @param id - Username to follow or unfollow.
|
|
56
|
+
* @param follow - True to follow, false to unfollow.
|
|
57
|
+
*/
|
|
58
|
+
toggleFollow(id, follow) {
|
|
59
|
+
return new runtime_1.Call(this.client, {
|
|
60
|
+
fn: "profile.togglefollow",
|
|
61
|
+
payload: {
|
|
62
|
+
id: id,
|
|
63
|
+
follow: follow,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.ProfileModule = ProfileModule;
|
|
69
|
+
//# sourceMappingURL=profile.js.map
|