beamsocial 0.9.0 → 0.10.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/lib/index.d.ts +2 -1
- package/lib/index.js +3 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -14,10 +14,11 @@ export declare class Client {
|
|
|
14
14
|
/*************************************/
|
|
15
15
|
getUser(name: string): Promise<User | null>;
|
|
16
16
|
/*************************************/
|
|
17
|
-
writePost(content: string, visibility?: "me" | "friends" | "followers" | "everyone"): Promise<Post>;
|
|
17
|
+
writePost(content: string, visibility?: "me" | "friends" | "followers" | "everyone", answers_to?: string): Promise<Post>;
|
|
18
18
|
getPost(id: string): Promise<Post>;
|
|
19
19
|
fetchUserPosts(name: string): Promise<Post[]>;
|
|
20
20
|
}
|
|
21
21
|
export { User } from './models/users.js';
|
|
22
22
|
export { Session } from './models/auth.js';
|
|
23
23
|
export { Post } from './models/posts.js';
|
|
24
|
+
export type { Notification, NotificationGroup, NotificationSingle, NotificationWarn, NotificationBan } from './models/types/inbox.js';
|
package/lib/index.js
CHANGED
|
@@ -142,11 +142,12 @@ export class Client {
|
|
|
142
142
|
}
|
|
143
143
|
/*************************************/
|
|
144
144
|
writePost(content_1) {
|
|
145
|
-
return __awaiter(this, arguments, void 0, function* (content, visibility = "followers") {
|
|
145
|
+
return __awaiter(this, arguments, void 0, function* (content, visibility = "followers", answers_to) {
|
|
146
146
|
try {
|
|
147
147
|
const res = yield axios.post(this.baseURL + '/posts/new', {
|
|
148
148
|
content: content,
|
|
149
|
-
visibility: visibility
|
|
149
|
+
visibility: visibility,
|
|
150
|
+
answers_to: answers_to || undefined
|
|
150
151
|
}, {
|
|
151
152
|
headers: {
|
|
152
153
|
Authorization: this.token ? `Bearer ${this.token}` : undefined,
|