@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.
Files changed (163) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +34 -0
  3. package/dist/account/index.d.ts +7 -0
  4. package/dist/account/index.d.ts.map +1 -0
  5. package/dist/account/index.js +24 -0
  6. package/dist/account/index.js.map +1 -0
  7. package/dist/answer/index.d.ts +11 -0
  8. package/dist/answer/index.d.ts.map +1 -0
  9. package/dist/answer/index.js +35 -0
  10. package/dist/answer/index.js.map +1 -0
  11. package/dist/auth/index.d.ts +6 -0
  12. package/dist/auth/index.d.ts.map +1 -0
  13. package/dist/auth/index.js +16 -0
  14. package/dist/auth/index.js.map +1 -0
  15. package/dist/client.d.ts +42 -0
  16. package/dist/client.d.ts.map +1 -0
  17. package/dist/client.js +150 -0
  18. package/dist/client.js.map +1 -0
  19. package/dist/drawing/index.d.ts +8 -0
  20. package/dist/drawing/index.d.ts.map +1 -0
  21. package/dist/drawing/index.js +28 -0
  22. package/dist/drawing/index.js.map +1 -0
  23. package/dist/enums.d.ts +11 -0
  24. package/dist/enums.d.ts.map +1 -0
  25. package/dist/enums.js +17 -0
  26. package/dist/enums.js.map +1 -0
  27. package/dist/extensions/ask.d.ts +10 -0
  28. package/dist/extensions/ask.d.ts.map +1 -0
  29. package/dist/extensions/ask.js +25 -0
  30. package/dist/extensions/ask.js.map +1 -0
  31. package/dist/forum/index.d.ts +10 -0
  32. package/dist/forum/index.d.ts.map +1 -0
  33. package/dist/forum/index.js +42 -0
  34. package/dist/forum/index.js.map +1 -0
  35. package/dist/generated/client.d.ts +36 -0
  36. package/dist/generated/client.d.ts.map +1 -0
  37. package/dist/generated/client.js +115 -0
  38. package/dist/generated/client.js.map +1 -0
  39. package/dist/generated/decoders.d.ts +6 -0
  40. package/dist/generated/decoders.d.ts.map +1 -0
  41. package/dist/generated/decoders.js +41 -0
  42. package/dist/generated/decoders.js.map +1 -0
  43. package/dist/generated/enums.d.ts +11 -0
  44. package/dist/generated/enums.d.ts.map +1 -0
  45. package/dist/generated/enums.js +17 -0
  46. package/dist/generated/enums.js.map +1 -0
  47. package/dist/generated/index.d.ts +20 -0
  48. package/dist/generated/index.d.ts.map +1 -0
  49. package/dist/generated/index.js +37 -0
  50. package/dist/generated/index.js.map +1 -0
  51. package/dist/generated/modules/account.d.ts +7 -0
  52. package/dist/generated/modules/account.d.ts.map +1 -0
  53. package/dist/generated/modules/account.js +30 -0
  54. package/dist/generated/modules/account.js.map +1 -0
  55. package/dist/generated/modules/answer.d.ts +11 -0
  56. package/dist/generated/modules/answer.d.ts.map +1 -0
  57. package/dist/generated/modules/answer.js +50 -0
  58. package/dist/generated/modules/answer.js.map +1 -0
  59. package/dist/generated/modules/ask.d.ts +30 -0
  60. package/dist/generated/modules/ask.d.ts.map +1 -0
  61. package/dist/generated/modules/ask.js +61 -0
  62. package/dist/generated/modules/ask.js.map +1 -0
  63. package/dist/generated/modules/auth.d.ts +7 -0
  64. package/dist/generated/modules/auth.d.ts.map +1 -0
  65. package/dist/generated/modules/auth.js +27 -0
  66. package/dist/generated/modules/auth.js.map +1 -0
  67. package/dist/generated/modules/dashboard.d.ts +11 -0
  68. package/dist/generated/modules/dashboard.d.ts.map +1 -0
  69. package/dist/generated/modules/dashboard.js +20 -0
  70. package/dist/generated/modules/dashboard.js.map +1 -0
  71. package/dist/generated/modules/drawing.d.ts +33 -0
  72. package/dist/generated/modules/drawing.d.ts.map +1 -0
  73. package/dist/generated/modules/drawing.js +69 -0
  74. package/dist/generated/modules/drawing.js.map +1 -0
  75. package/dist/generated/modules/feed.d.ts +22 -0
  76. package/dist/generated/modules/feed.d.ts.map +1 -0
  77. package/dist/generated/modules/feed.js +43 -0
  78. package/dist/generated/modules/feed.js.map +1 -0
  79. package/dist/generated/modules/forum.d.ts +26 -0
  80. package/dist/generated/modules/forum.d.ts.map +1 -0
  81. package/dist/generated/modules/forum.js +101 -0
  82. package/dist/generated/modules/forum.js.map +1 -0
  83. package/dist/generated/modules/images.d.ts +27 -0
  84. package/dist/generated/modules/images.d.ts.map +1 -0
  85. package/dist/generated/modules/images.js +53 -0
  86. package/dist/generated/modules/images.js.map +1 -0
  87. package/dist/generated/modules/messages.d.ts +9 -0
  88. package/dist/generated/modules/messages.d.ts.map +1 -0
  89. package/dist/generated/modules/messages.js +45 -0
  90. package/dist/generated/modules/messages.js.map +1 -0
  91. package/dist/generated/modules/navbar.d.ts +11 -0
  92. package/dist/generated/modules/navbar.d.ts.map +1 -0
  93. package/dist/generated/modules/navbar.js +20 -0
  94. package/dist/generated/modules/navbar.js.map +1 -0
  95. package/dist/generated/modules/notify.d.ts +14 -0
  96. package/dist/generated/modules/notify.d.ts.map +1 -0
  97. package/dist/generated/modules/notify.js +38 -0
  98. package/dist/generated/modules/notify.js.map +1 -0
  99. package/dist/generated/modules/profile.d.ts +34 -0
  100. package/dist/generated/modules/profile.d.ts.map +1 -0
  101. package/dist/generated/modules/profile.js +69 -0
  102. package/dist/generated/modules/profile.js.map +1 -0
  103. package/dist/generated/modules/qa.d.ts +12 -0
  104. package/dist/generated/modules/qa.d.ts.map +1 -0
  105. package/dist/generated/modules/qa.js +23 -0
  106. package/dist/generated/modules/qa.js.map +1 -0
  107. package/dist/generated/modules/settings.d.ts +23 -0
  108. package/dist/generated/modules/settings.d.ts.map +1 -0
  109. package/dist/generated/modules/settings.js +44 -0
  110. package/dist/generated/modules/settings.js.map +1 -0
  111. package/dist/generated/modules/stories.d.ts +18 -0
  112. package/dist/generated/modules/stories.d.ts.map +1 -0
  113. package/dist/generated/modules/stories.js +35 -0
  114. package/dist/generated/modules/stories.js.map +1 -0
  115. package/dist/generated/types.d.ts +528 -0
  116. package/dist/generated/types.d.ts.map +1 -0
  117. package/dist/generated/types.js +4 -0
  118. package/dist/generated/types.js.map +1 -0
  119. package/dist/index.d.ts +3 -0
  120. package/dist/index.d.ts.map +1 -0
  121. package/dist/index.js +19 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/messages/index.d.ts +9 -0
  124. package/dist/messages/index.d.ts.map +1 -0
  125. package/dist/messages/index.js +33 -0
  126. package/dist/messages/index.js.map +1 -0
  127. package/dist/module.d.ts +7 -0
  128. package/dist/module.d.ts.map +1 -0
  129. package/dist/module.js +27 -0
  130. package/dist/module.js.map +1 -0
  131. package/dist/notify/index.d.ts +8 -0
  132. package/dist/notify/index.d.ts.map +1 -0
  133. package/dist/notify/index.js +19 -0
  134. package/dist/notify/index.js.map +1 -0
  135. package/dist/runtime/call.d.ts +19 -0
  136. package/dist/runtime/call.d.ts.map +1 -0
  137. package/dist/runtime/call.js +26 -0
  138. package/dist/runtime/call.js.map +1 -0
  139. package/dist/runtime/client.d.ts +26 -0
  140. package/dist/runtime/client.d.ts.map +1 -0
  141. package/dist/runtime/client.js +87 -0
  142. package/dist/runtime/client.js.map +1 -0
  143. package/dist/runtime/index.d.ts +5 -0
  144. package/dist/runtime/index.d.ts.map +1 -0
  145. package/dist/runtime/index.js +21 -0
  146. package/dist/runtime/index.js.map +1 -0
  147. package/dist/runtime/join.d.ts +2 -0
  148. package/dist/runtime/join.d.ts.map +1 -0
  149. package/dist/runtime/join.js +14 -0
  150. package/dist/runtime/join.js.map +1 -0
  151. package/dist/runtime/module.d.ts +7 -0
  152. package/dist/runtime/module.d.ts.map +1 -0
  153. package/dist/runtime/module.js +27 -0
  154. package/dist/runtime/module.js.map +1 -0
  155. package/dist/runtime/types.d.ts +19 -0
  156. package/dist/runtime/types.d.ts.map +1 -0
  157. package/dist/runtime/types.js +3 -0
  158. package/dist/runtime/types.js.map +1 -0
  159. package/dist/types.d.ts +19 -0
  160. package/dist/types.d.ts.map +1 -0
  161. package/dist/types.js +3 -0
  162. package/dist/types.js.map +1 -0
  163. package/package.json +36 -0
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _Client_account, _Client_answer, _Client_ask, _Client_auth, _Client_dashboard, _Client_drawing, _Client_feed, _Client_forum, _Client_images, _Client_messages, _Client_navbar, _Client_notify, _Client_profile, _Client_qa, _Client_settings;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Client = void 0;
16
+ /* Generated by pecans-spec. Do not edit. */
17
+ const runtime_1 = require("../runtime");
18
+ const account_1 = require("./modules/account");
19
+ const answer_1 = require("./modules/answer");
20
+ const ask_1 = require("./modules/ask");
21
+ const auth_1 = require("./modules/auth");
22
+ const dashboard_1 = require("./modules/dashboard");
23
+ const drawing_1 = require("./modules/drawing");
24
+ const feed_1 = require("./modules/feed");
25
+ const forum_1 = require("./modules/forum");
26
+ const images_1 = require("./modules/images");
27
+ const messages_1 = require("./modules/messages");
28
+ const navbar_1 = require("./modules/navbar");
29
+ const notify_1 = require("./modules/notify");
30
+ const profile_1 = require("./modules/profile");
31
+ const qa_1 = require("./modules/qa");
32
+ const settings_1 = require("./modules/settings");
33
+ class Client extends runtime_1.BaseClient {
34
+ constructor(auth) {
35
+ super(auth);
36
+ _Client_account.set(this, void 0);
37
+ _Client_answer.set(this, void 0);
38
+ _Client_ask.set(this, void 0);
39
+ _Client_auth.set(this, void 0);
40
+ _Client_dashboard.set(this, void 0);
41
+ _Client_drawing.set(this, void 0);
42
+ _Client_feed.set(this, void 0);
43
+ _Client_forum.set(this, void 0);
44
+ _Client_images.set(this, void 0);
45
+ _Client_messages.set(this, void 0);
46
+ _Client_navbar.set(this, void 0);
47
+ _Client_notify.set(this, void 0);
48
+ _Client_profile.set(this, void 0);
49
+ _Client_qa.set(this, void 0);
50
+ _Client_settings.set(this, void 0);
51
+ __classPrivateFieldSet(this, _Client_account, new account_1.AccountModule(this), "f");
52
+ __classPrivateFieldSet(this, _Client_answer, new answer_1.AnswerModule(this), "f");
53
+ __classPrivateFieldSet(this, _Client_ask, new ask_1.AskModule(this), "f");
54
+ __classPrivateFieldSet(this, _Client_auth, new auth_1.AuthModule(this), "f");
55
+ __classPrivateFieldSet(this, _Client_dashboard, new dashboard_1.DashboardModule(this), "f");
56
+ __classPrivateFieldSet(this, _Client_drawing, new drawing_1.DrawingModule(this), "f");
57
+ __classPrivateFieldSet(this, _Client_feed, new feed_1.FeedModule(this), "f");
58
+ __classPrivateFieldSet(this, _Client_forum, new forum_1.ForumModule(this), "f");
59
+ __classPrivateFieldSet(this, _Client_images, new images_1.ImagesModule(this), "f");
60
+ __classPrivateFieldSet(this, _Client_messages, new messages_1.MessagesModule(this), "f");
61
+ __classPrivateFieldSet(this, _Client_navbar, new navbar_1.NavbarModule(this), "f");
62
+ __classPrivateFieldSet(this, _Client_notify, new notify_1.NotifyModule(this), "f");
63
+ __classPrivateFieldSet(this, _Client_profile, new profile_1.ProfileModule(this), "f");
64
+ __classPrivateFieldSet(this, _Client_qa, new qa_1.QaModule(this), "f");
65
+ __classPrivateFieldSet(this, _Client_settings, new settings_1.SettingsModule(this), "f");
66
+ }
67
+ get account() {
68
+ return __classPrivateFieldGet(this, _Client_account, "f");
69
+ }
70
+ get answer() {
71
+ return __classPrivateFieldGet(this, _Client_answer, "f");
72
+ }
73
+ get ask() {
74
+ return __classPrivateFieldGet(this, _Client_ask, "f");
75
+ }
76
+ get auth() {
77
+ return __classPrivateFieldGet(this, _Client_auth, "f");
78
+ }
79
+ get dashboard() {
80
+ return __classPrivateFieldGet(this, _Client_dashboard, "f");
81
+ }
82
+ get drawing() {
83
+ return __classPrivateFieldGet(this, _Client_drawing, "f");
84
+ }
85
+ get feed() {
86
+ return __classPrivateFieldGet(this, _Client_feed, "f");
87
+ }
88
+ get forum() {
89
+ return __classPrivateFieldGet(this, _Client_forum, "f");
90
+ }
91
+ get images() {
92
+ return __classPrivateFieldGet(this, _Client_images, "f");
93
+ }
94
+ get messages() {
95
+ return __classPrivateFieldGet(this, _Client_messages, "f");
96
+ }
97
+ get navbar() {
98
+ return __classPrivateFieldGet(this, _Client_navbar, "f");
99
+ }
100
+ get notify() {
101
+ return __classPrivateFieldGet(this, _Client_notify, "f");
102
+ }
103
+ get profile() {
104
+ return __classPrivateFieldGet(this, _Client_profile, "f");
105
+ }
106
+ get qa() {
107
+ return __classPrivateFieldGet(this, _Client_qa, "f");
108
+ }
109
+ get settings() {
110
+ return __classPrivateFieldGet(this, _Client_settings, "f");
111
+ }
112
+ }
113
+ exports.Client = Client;
114
+ _Client_account = new WeakMap(), _Client_answer = new WeakMap(), _Client_ask = new WeakMap(), _Client_auth = new WeakMap(), _Client_dashboard = new WeakMap(), _Client_drawing = new WeakMap(), _Client_feed = new WeakMap(), _Client_forum = new WeakMap(), _Client_images = new WeakMap(), _Client_messages = new WeakMap(), _Client_navbar = new WeakMap(), _Client_notify = new WeakMap(), _Client_profile = new WeakMap(), _Client_qa = new WeakMap(), _Client_settings = new WeakMap();
115
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/generated/client.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { ListDataResponse, QuestionMetadata, QuestionText, QuestionTextResponse } from "./types";
2
+ export declare function decodeListDataResponse(raw: any): ListDataResponse;
3
+ export declare function decodeQuestionMetadata(raw: any): QuestionMetadata;
4
+ export declare function decodeQuestionText(raw: any): QuestionText;
5
+ export declare function decodeQuestionTextResponse(raw: any): QuestionTextResponse;
6
+ //# sourceMappingURL=decoders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decoders.d.ts","sourceRoot":"","sources":["../../src/generated/decoders.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEjG,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAOjE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAWjE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,YAAY,CAKzD;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,GAAG,GAAG,oBAAoB,CAOzE"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeListDataResponse = decodeListDataResponse;
4
+ exports.decodeQuestionMetadata = decodeQuestionMetadata;
5
+ exports.decodeQuestionText = decodeQuestionText;
6
+ exports.decodeQuestionTextResponse = decodeQuestionTextResponse;
7
+ function decodeListDataResponse(raw) {
8
+ return {
9
+ ok: raw["ok"],
10
+ error: raw["error"],
11
+ profiles: raw["profiles"],
12
+ questions: (raw["questions"] ?? []).map(decodeQuestionMetadata),
13
+ };
14
+ }
15
+ function decodeQuestionMetadata(raw) {
16
+ return {
17
+ id: raw["id"],
18
+ isActive: raw["ia"],
19
+ replyCount: raw["r"],
20
+ newReplyCount: raw["nr"],
21
+ expireTime: raw["it"],
22
+ creationTime: raw["at"],
23
+ isPinned: raw["p"],
24
+ questionType: raw["t"],
25
+ };
26
+ }
27
+ function decodeQuestionText(raw) {
28
+ return {
29
+ id: raw["id"],
30
+ text: raw["b"],
31
+ };
32
+ }
33
+ function decodeQuestionTextResponse(raw) {
34
+ return {
35
+ ok: raw["ok"],
36
+ error: raw["error"],
37
+ profiles: raw["profiles"],
38
+ questions: (raw["questions"] ?? []).map(decodeQuestionText),
39
+ };
40
+ }
41
+ //# sourceMappingURL=decoders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decoders.js","sourceRoot":"","sources":["../../src/generated/decoders.ts"],"names":[],"mappings":";;AAGA,wDAOC;AAED,wDAWC;AAED,gDAKC;AAED,gEAOC;AApCD,SAAgB,sBAAsB,CAAC,GAAQ;IAC3C,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;KAClE,CAAC;AACN,CAAC;AAED,SAAgB,sBAAsB,CAAC,GAAQ;IAC3C,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC;QACnB,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC;QACpB,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC;QACxB,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC;QACrB,YAAY,EAAE,GAAG,CAAC,IAAI,CAAC;QACvB,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC;QAClB,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC;KACzB,CAAC;AACN,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAQ;IACvC,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC;KACjB,CAAC;AACN,CAAC;AAED,SAAgB,0BAA0B,CAAC,GAAQ;IAC/C,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;KAC9D,CAAC;AACN,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare enum Feature {
2
+ FEED = "feed",
3
+ ASK = "ask",
4
+ FORUM = "forum",
5
+ CHAT = "chat"
6
+ }
7
+ export declare enum DismissAction {
8
+ SNOOZE = "SNOOZE",
9
+ DISCARD = "DISCARD"
10
+ }
11
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/generated/enums.ts"],"names":[],"mappings":"AACA,oBAAY,OAAO;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,IAAI,SAAS;CAChB;AAED,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DismissAction = exports.Feature = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ var Feature;
6
+ (function (Feature) {
7
+ Feature["FEED"] = "feed";
8
+ Feature["ASK"] = "ask";
9
+ Feature["FORUM"] = "forum";
10
+ Feature["CHAT"] = "chat";
11
+ })(Feature || (exports.Feature = Feature = {}));
12
+ var DismissAction;
13
+ (function (DismissAction) {
14
+ DismissAction["SNOOZE"] = "SNOOZE";
15
+ DismissAction["DISCARD"] = "DISCARD";
16
+ })(DismissAction || (exports.DismissAction = DismissAction = {}));
17
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/generated/enums.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,IAAY,OAKX;AALD,WAAY,OAAO;IACf,wBAAa,CAAA;IACb,sBAAW,CAAA;IACX,0BAAe,CAAA;IACf,wBAAa,CAAA;AACjB,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
@@ -0,0 +1,20 @@
1
+ export * from "./types";
2
+ export * from "./enums";
3
+ export * from "./decoders";
4
+ export * from "./client";
5
+ export * from "./modules/account";
6
+ export * from "./modules/answer";
7
+ export * from "./modules/ask";
8
+ export * from "./modules/auth";
9
+ export * from "./modules/dashboard";
10
+ export * from "./modules/drawing";
11
+ export * from "./modules/feed";
12
+ export * from "./modules/forum";
13
+ export * from "./modules/images";
14
+ export * from "./modules/messages";
15
+ export * from "./modules/navbar";
16
+ export * from "./modules/notify";
17
+ export * from "./modules/profile";
18
+ export * from "./modules/qa";
19
+ export * from "./modules/settings";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,37 @@
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
+ /* Generated by pecans-spec. Do not edit. */
18
+ __exportStar(require("./types"), exports);
19
+ __exportStar(require("./enums"), exports);
20
+ __exportStar(require("./decoders"), exports);
21
+ __exportStar(require("./client"), exports);
22
+ __exportStar(require("./modules/account"), exports);
23
+ __exportStar(require("./modules/answer"), exports);
24
+ __exportStar(require("./modules/ask"), exports);
25
+ __exportStar(require("./modules/auth"), exports);
26
+ __exportStar(require("./modules/dashboard"), exports);
27
+ __exportStar(require("./modules/drawing"), exports);
28
+ __exportStar(require("./modules/feed"), exports);
29
+ __exportStar(require("./modules/forum"), exports);
30
+ __exportStar(require("./modules/images"), exports);
31
+ __exportStar(require("./modules/messages"), exports);
32
+ __exportStar(require("./modules/navbar"), exports);
33
+ __exportStar(require("./modules/notify"), exports);
34
+ __exportStar(require("./modules/profile"), exports);
35
+ __exportStar(require("./modules/qa"), exports);
36
+ __exportStar(require("./modules/settings"), exports);
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA4C;AAC5C,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,oDAAkC;AAClC,mDAAiC;AACjC,gDAA8B;AAC9B,iDAA+B;AAC/B,sDAAoC;AACpC,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,mDAAiC;AACjC,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,+CAA6B;AAC7B,qDAAmC"}
@@ -0,0 +1,7 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { TCResponse } from "../types";
3
+ export declare class AccountModule extends Module {
4
+ register(email: string, username: string, password: string): Call<TCResponse>;
5
+ activate(token: string): Call<TCResponse>;
6
+ }
7
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,qBAAa,aAAc,SAAQ,MAAM;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAc7E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;CAQnD"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountModule = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ const runtime_1 = require("../../runtime");
6
+ class AccountModule extends runtime_1.Module {
7
+ register(email, username, password) {
8
+ return new runtime_1.Call(this.client, {
9
+ fn: "account.register",
10
+ payload: {
11
+ email: email,
12
+ username: username,
13
+ password1: password,
14
+ password2: password,
15
+ age: true,
16
+ tos: true,
17
+ },
18
+ });
19
+ }
20
+ activate(token) {
21
+ return new runtime_1.Call(this.client, {
22
+ fn: "account.activate",
23
+ payload: {
24
+ token: token,
25
+ },
26
+ });
27
+ }
28
+ }
29
+ exports.AccountModule = AccountModule;
30
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/generated/modules/account.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,aAAc,SAAQ,gBAAM;IAC9B,QAAQ,CAAC,KAAa,EAAE,QAAgB,EAAE,QAAgB;QAC7D,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE;gBACL,KAAK,EAAE,KAAK;gBACZ,QAAQ,EAAE,QAAQ;gBAClB,SAAS,EAAE,QAAQ;gBACnB,SAAS,EAAE,QAAQ;gBACnB,GAAG,EAAE,IAAI;gBACT,GAAG,EAAE,IAAI;aACZ;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,QAAQ,CAAC,KAAa;QACzB,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE;gBACL,KAAK,EAAE,KAAK;aACf;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAvBD,sCAuBC"}
@@ -0,0 +1,11 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { AnswerQueueQuestionResponse, AnswerReplyResponse, QuestionFetchResponse, TCResponse } from "../types";
3
+ import { DismissAction } from "../enums";
4
+ export declare class AnswerModule extends Module {
5
+ fetchNext(): Call<QuestionFetchResponse>;
6
+ dismissQuestion(questionId: number, action: DismissAction): Call<TCResponse>;
7
+ pollVote(questionId: number, optionNum: number): Call<TCResponse>;
8
+ queueQuestion(questionId: number): Call<AnswerQueueQuestionResponse>;
9
+ reply(questionId: number, text: string): Call<AnswerReplyResponse>;
10
+ }
11
+ //# sourceMappingURL=answer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/answer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,qBAAa,YAAa,SAAQ,MAAM;IAC7B,SAAS,IAAI,IAAI,CAAC,qBAAqB,CAAC;IAOxC,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC;IAU5E,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAUjE,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC,2BAA2B,CAAC;IASpE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC;CAS5E"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnswerModule = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ const runtime_1 = require("../../runtime");
6
+ class AnswerModule extends runtime_1.Module {
7
+ fetchNext() {
8
+ return new runtime_1.Call(this.client, {
9
+ fn: "answer.getnext",
10
+ payload: {},
11
+ });
12
+ }
13
+ dismissQuestion(questionId, action) {
14
+ return new runtime_1.Call(this.client, {
15
+ fn: "answer.dismissquestion",
16
+ payload: {
17
+ questionId: questionId,
18
+ action: action,
19
+ },
20
+ });
21
+ }
22
+ pollVote(questionId, optionNum) {
23
+ return new runtime_1.Call(this.client, {
24
+ fn: "answer.pollvote",
25
+ payload: {
26
+ questionId: questionId,
27
+ optionNum: optionNum,
28
+ },
29
+ });
30
+ }
31
+ queueQuestion(questionId) {
32
+ return new runtime_1.Call(this.client, {
33
+ fn: "answer.queuequestion",
34
+ payload: {
35
+ questionId: questionId,
36
+ },
37
+ });
38
+ }
39
+ reply(questionId, text) {
40
+ return new runtime_1.Call(this.client, {
41
+ fn: "answer.reply",
42
+ payload: {
43
+ questionId: questionId,
44
+ text: text,
45
+ },
46
+ });
47
+ }
48
+ }
49
+ exports.AnswerModule = AnswerModule;
50
+ //# sourceMappingURL=answer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.js","sourceRoot":"","sources":["../../../src/generated/modules/answer.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAS7C,MAAa,YAAa,SAAQ,gBAAM;IAC7B,SAAS;QACZ,OAAO,IAAI,cAAI,CAAwB,IAAI,CAAC,MAAM,EAAE;YAChD,EAAE,EAAE,gBAAgB;YACpB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;IAEM,eAAe,CAAC,UAAkB,EAAE,MAAqB;QAC5D,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,wBAAwB;YAC5B,OAAO,EAAE;gBACL,UAAU,EAAE,UAAU;gBACtB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,QAAQ,CAAC,UAAkB,EAAE,SAAiB;QACjD,OAAO,IAAI,cAAI,CAAa,IAAI,CAAC,MAAM,EAAE;YACrC,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE;gBACL,UAAU,EAAE,UAAU;gBACtB,SAAS,EAAE,SAAS;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,aAAa,CAAC,UAAkB;QACnC,OAAO,IAAI,cAAI,CAA8B,IAAI,CAAC,MAAM,EAAE;YACtD,EAAE,EAAE,sBAAsB;YAC1B,OAAO,EAAE;gBACL,UAAU,EAAE,UAAU;aACzB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,UAAkB,EAAE,IAAY;QACzC,OAAO,IAAI,cAAI,CAAsB,IAAI,CAAC,MAAM,EAAE;YAC9C,EAAE,EAAE,cAAc;YAClB,OAAO,EAAE;gBACL,UAAU,EAAE,UAAU;gBACtB,IAAI,EAAE,IAAI;aACb;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA9CD,oCA8CC"}
@@ -0,0 +1,30 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { ListDataResponse, QuestionData, QuestionMetadata, QuestionTextResponse } from "../types";
3
+ export declare class AskModule extends Module {
4
+ /**
5
+ * List all question headers without body text.
6
+ *
7
+ * Use `fetchQuestions` to also pull the bodies in one step.
8
+ *
9
+ * @returns The question headers.
10
+ */
11
+ listData(): Call<ListDataResponse>;
12
+ /**
13
+ * Fetch the body text for a batch of questions by id.
14
+ *
15
+ * @param ids - Question ids to fetch bodies for.
16
+ * @returns The requested question bodies.
17
+ */
18
+ qtext(ids: number[]): Call<QuestionTextResponse>;
19
+ /**
20
+ * Fetch each question's body and zip it onto its header, keyed by id.
21
+ *
22
+ * A convenience method for fetching a batch of questions in one step, rather
23
+ * than calling `listData` and then `qtext` separately.
24
+ *
25
+ * @param metadata - Question headers to hydrate, e.g. from `listData`.
26
+ * @returns Each header paired with its body text.
27
+ */
28
+ fetchQuestions(metadata: QuestionMetadata[]): Promise<QuestionData[]>;
29
+ }
30
+ //# sourceMappingURL=ask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/ask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGlG,qBAAa,SAAU,SAAQ,MAAM;IACjC;;;;;;OAMG;IACI,QAAQ,IAAI,IAAI,CAAC,gBAAgB,CAAC;IAiBzC;;;;;OAKG;IACI,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC;IAiBvD;;;;;;;;OAQG;IACU,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAWrF"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AskModule = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ const runtime_1 = require("../../runtime");
6
+ const join_1 = require("../../runtime/join");
7
+ const decoders_1 = require("../decoders");
8
+ class AskModule extends runtime_1.Module {
9
+ /**
10
+ * List all question headers without body text.
11
+ *
12
+ * Use `fetchQuestions` to also pull the bodies in one step.
13
+ *
14
+ * @returns The question headers.
15
+ */
16
+ listData() {
17
+ return new runtime_1.Call(this.client, {
18
+ fn: "legacy.askapi",
19
+ payload: {
20
+ name: "listdata",
21
+ arg1: "0",
22
+ arg2: "none",
23
+ arg3: "0",
24
+ rawEmbeddedJsonLolInternalTechDebt: null,
25
+ },
26
+ }, decoders_1.decodeListDataResponse);
27
+ }
28
+ /**
29
+ * Fetch the body text for a batch of questions by id.
30
+ *
31
+ * @param ids - Question ids to fetch bodies for.
32
+ * @returns The requested question bodies.
33
+ */
34
+ qtext(ids) {
35
+ return new runtime_1.Call(this.client, {
36
+ fn: "legacy.askapi",
37
+ payload: {
38
+ arg1: ids.join("x"),
39
+ name: "qtext",
40
+ arg2: "0",
41
+ arg3: "0",
42
+ rawEmbeddedJsonLolInternalTechDebt: null,
43
+ },
44
+ }, decoders_1.decodeQuestionTextResponse);
45
+ }
46
+ /**
47
+ * Fetch each question's body and zip it onto its header, keyed by id.
48
+ *
49
+ * A convenience method for fetching a batch of questions in one step, rather
50
+ * than calling `listData` and then `qtext` separately.
51
+ *
52
+ * @param metadata - Question headers to hydrate, e.g. from `listData`.
53
+ * @returns Each header paired with its body text.
54
+ */
55
+ async fetchQuestions(metadata) {
56
+ const res = await this.qtext(metadata.map((x) => x.id));
57
+ return (0, join_1.joinBy)(metadata, res.questions ?? [], (input) => input.id, (r) => r.id, (r, input) => ({ body: r.text, header: input }));
58
+ }
59
+ }
60
+ exports.AskModule = AskModule;
61
+ //# sourceMappingURL=ask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask.js","sourceRoot":"","sources":["../../../src/generated/modules/ask.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAC7C,6CAA4C;AAE5C,0CAAiF;AAEjF,MAAa,SAAU,SAAQ,gBAAM;IACjC;;;;;;OAMG;IACI,QAAQ;QACX,OAAO,IAAI,cAAI,CACX,IAAI,CAAC,MAAM,EACX;YACI,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE;gBACL,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG;gBACT,kCAAkC,EAAE,IAAI;aAC3C;SACJ,EACD,iCAAsB,CACzB,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,GAAa;QACtB,OAAO,IAAI,cAAI,CACX,IAAI,CAAC,MAAM,EACX;YACI,EAAE,EAAE,eAAe;YACnB,OAAO,EAAE;gBACL,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;gBACnB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,GAAG;gBACT,IAAI,EAAE,GAAG;gBACT,kCAAkC,EAAE,IAAI;aAC3C;SACJ,EACD,qCAA0B,CAC7B,CAAC;IACN,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,cAAc,CAAC,QAA4B;QACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAExD,OAAO,IAAA,aAAM,EACT,QAAQ,EACR,GAAG,CAAC,SAAS,IAAI,EAAE,EACnB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EACnB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EACX,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAClD,CAAC;IACN,CAAC;CACJ;AApED,8BAoEC"}
@@ -0,0 +1,7 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { ExistingCookieResponse, LoginResponse } from "../types";
3
+ export declare class AuthModule extends Module {
4
+ login(username: string, password: string, client?: string): Call<LoginResponse>;
5
+ existingCookie(cookie: string): Call<ExistingCookieResponse>;
6
+ }
7
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,UAAW,SAAQ,MAAM;IAC3B,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAc,GAAG,IAAI,CAAC,aAAa,CAAC;IAWtF,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC;CAQtE"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthModule = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ const runtime_1 = require("../../runtime");
6
+ class AuthModule extends runtime_1.Module {
7
+ login(username, password, client = "web") {
8
+ return new runtime_1.Call(this.client, {
9
+ fn: "auth.login",
10
+ payload: {
11
+ nameOrEmail: username,
12
+ password: password,
13
+ client: client,
14
+ },
15
+ });
16
+ }
17
+ existingCookie(cookie) {
18
+ return new runtime_1.Call(this.client, {
19
+ fn: "auth.existingcookie",
20
+ payload: {
21
+ cookie: cookie,
22
+ },
23
+ });
24
+ }
25
+ }
26
+ exports.AuthModule = AuthModule;
27
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/generated/modules/auth.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,UAAW,SAAQ,gBAAM;IAC3B,KAAK,CAAC,QAAgB,EAAE,QAAgB,EAAE,SAAiB,KAAK;QACnE,OAAO,IAAI,cAAI,CAAgB,IAAI,CAAC,MAAM,EAAE;YACxC,EAAE,EAAE,YAAY;YAChB,OAAO,EAAE;gBACL,WAAW,EAAE,QAAQ;gBACrB,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,cAAc,CAAC,MAAc;QAChC,OAAO,IAAI,cAAI,CAAyB,IAAI,CAAC,MAAM,EAAE;YACjD,EAAE,EAAE,qBAAqB;YACzB,OAAO,EAAE;gBACL,MAAM,EAAE,MAAM;aACjB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AApBD,gCAoBC"}
@@ -0,0 +1,11 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { DashboardResponse } from "../types";
3
+ export declare class DashboardModule extends Module {
4
+ /**
5
+ * Fetch the home dashboard summary, currently the most recent questions.
6
+ *
7
+ * @returns The recent-questions summary.
8
+ */
9
+ get(): Call<DashboardResponse>;
10
+ }
11
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/dashboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,eAAgB,SAAQ,MAAM;IACvC;;;;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.DashboardModule = void 0;
4
+ /* Generated by pecans-spec. Do not edit. */
5
+ const runtime_1 = require("../../runtime");
6
+ class DashboardModule extends runtime_1.Module {
7
+ /**
8
+ * Fetch the home dashboard summary, currently the most recent questions.
9
+ *
10
+ * @returns The recent-questions summary.
11
+ */
12
+ get() {
13
+ return new runtime_1.Call(this.client, {
14
+ fn: "legacy.dashboard",
15
+ payload: {},
16
+ });
17
+ }
18
+ }
19
+ exports.DashboardModule = DashboardModule;
20
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/generated/modules/dashboard.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2CAA6C;AAG7C,MAAa,eAAgB,SAAQ,gBAAM;IACvC;;;;OAIG;IACI,GAAG;QACN,OAAO,IAAI,cAAI,CAAoB,IAAI,CAAC,MAAM,EAAE;YAC5C,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,0CAYC"}
@@ -0,0 +1,33 @@
1
+ import { Call, Module } from "../../runtime";
2
+ import { SaveDrawingResponse, TCResponse, ViewDrawingDataResponse } from "../types";
3
+ export declare class DrawingModule extends Module {
4
+ /**
5
+ * Save a drawing and return its image id.
6
+ *
7
+ * @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.
8
+ * @param makeActive - Set this drawing as your active image immediately on save.
9
+ * @returns The id of the newly-created image.
10
+ */
11
+ saveDrawing(data: string, makeActive?: boolean): Call<SaveDrawingResponse>;
12
+ /**
13
+ * Fetch the raw pixel data for an existing image, for editing or inspection.
14
+ *
15
+ * @param imageId - The image to load, e.g. `img45790`.
16
+ * @returns The image's flat hex pixel data.
17
+ */
18
+ viewDrawingData(imageId: string): Call<ViewDrawingDataResponse>;
19
+ /**
20
+ * Send one of your drawings to another user.
21
+ *
22
+ * @param imageId - The image to send.
23
+ * @param receiver - Username of the recipient.
24
+ */
25
+ sendDrawing(imageId: string, receiver: string): Call<TCResponse>;
26
+ /**
27
+ * Set which of your saved images is the active one.
28
+ *
29
+ * @param imageId - The image to make active.
30
+ */
31
+ setActive(imageId: string): Call<TCResponse>;
32
+ }
33
+ //# sourceMappingURL=drawing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawing.d.ts","sourceRoot":"","sources":["../../../src/generated/modules/drawing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEpF,qBAAa,aAAc,SAAQ,MAAM;IACrC;;;;;;OAMG;IACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,GAAE,OAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC;IAWxF;;;;;OAKG;IACI,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,uBAAuB,CAAC;IAUtE;;;;;OAKG;IACI,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;IAUvE;;;;OAIG;IACI,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;CAQtD"}