@postpeer/node 0.8.3 → 0.8.5
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +111 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +676 -4
- package/dist/index.d.ts +676 -4
- package/dist/index.js +111 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.5
|
|
4
|
+
|
|
5
|
+
- Added listing, creating, replying to, hiding, unhiding, and deleting comments on supported Meta platforms.
|
|
6
|
+
- Added listing Instagram conversations, fetching their messages, and sending DM replies.
|
|
7
|
+
|
|
8
|
+
## 0.8.4
|
|
9
|
+
|
|
10
|
+
- Added moving connected integrations between profiles.
|
|
11
|
+
- Added authentication status and failure-reason fields to connected integrations.
|
|
12
|
+
- Added Instagram collaborator invitations for feed posts, carousels, and Reels.
|
|
13
|
+
- Added exact integration-ID matching when searching connected integrations.
|
|
14
|
+
|
|
3
15
|
## 0.8.3
|
|
4
16
|
|
|
5
17
|
- Added Facebook Page selection methods for multi-page OAuth connections.
|
package/dist/index.cjs
CHANGED
|
@@ -1447,6 +1447,116 @@ var PostPeer = class _PostPeer extends HeyApiClient {
|
|
|
1447
1447
|
super(args);
|
|
1448
1448
|
_PostPeer.__registry.set(this, args?.key);
|
|
1449
1449
|
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Move an integration to another profile
|
|
1452
|
+
*
|
|
1453
|
+
* Reassigns an existing integration to another profile in the same project. Pass profileId=null to leave the integration unassigned. OAuth credentials and existing posts are unchanged.
|
|
1454
|
+
*/
|
|
1455
|
+
moveIntegration(options) {
|
|
1456
|
+
return (options.client ?? this.client).patch({
|
|
1457
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1458
|
+
url: "/v1/connect/integrations/{id}",
|
|
1459
|
+
...options,
|
|
1460
|
+
headers: {
|
|
1461
|
+
"Content-Type": "application/json",
|
|
1462
|
+
...options.headers
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* List comments on a post
|
|
1468
|
+
*
|
|
1469
|
+
* Fetch comments (and first-level replies) on a post from a connected Facebook Page, Instagram Business account, or Threads account. Requires the account to have the relevant Meta permissions approved (pages_read_user_content for Facebook, instagram_business_manage_comments for Instagram, threads_manage_replies for Threads).
|
|
1470
|
+
*/
|
|
1471
|
+
listComments(options) {
|
|
1472
|
+
return (options.client ?? this.client).get({
|
|
1473
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1474
|
+
url: "/v1/comments/",
|
|
1475
|
+
...options
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* Create a comment or reply
|
|
1480
|
+
*
|
|
1481
|
+
* Post a top-level comment on an Instagram or Facebook post, or a top-level post on Threads (provide `postId`), or reply to an existing comment on Facebook, Instagram, or Threads (provide `commentId`).
|
|
1482
|
+
*/
|
|
1483
|
+
createComment(options) {
|
|
1484
|
+
return (options.client ?? this.client).post({
|
|
1485
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1486
|
+
url: "/v1/comments/",
|
|
1487
|
+
...options,
|
|
1488
|
+
headers: {
|
|
1489
|
+
"Content-Type": "application/json",
|
|
1490
|
+
...options.headers
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Delete a comment
|
|
1496
|
+
*
|
|
1497
|
+
* Delete a comment on a Facebook Page post or Instagram Business post. Not supported on Threads (the API does not allow deleting others' replies).
|
|
1498
|
+
*/
|
|
1499
|
+
deleteComment(options) {
|
|
1500
|
+
return (options.client ?? this.client).delete({
|
|
1501
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1502
|
+
url: "/v1/comments/{commentId}",
|
|
1503
|
+
...options
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* Hide or unhide a comment
|
|
1508
|
+
*
|
|
1509
|
+
* Hide or unhide a comment on an Instagram Business post. Pass `hidden: true` to hide, `hidden: false` to unhide. Instagram only.
|
|
1510
|
+
*/
|
|
1511
|
+
hideComment(options) {
|
|
1512
|
+
return (options.client ?? this.client).patch({
|
|
1513
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1514
|
+
url: "/v1/comments/{commentId}",
|
|
1515
|
+
...options,
|
|
1516
|
+
headers: {
|
|
1517
|
+
"Content-Type": "application/json",
|
|
1518
|
+
...options.headers
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* List conversations
|
|
1524
|
+
*
|
|
1525
|
+
* List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
|
|
1526
|
+
*/
|
|
1527
|
+
listConversations(options) {
|
|
1528
|
+
return (options.client ?? this.client).get({
|
|
1529
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1530
|
+
url: "/v1/messages/",
|
|
1531
|
+
...options
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Send a message
|
|
1536
|
+
*
|
|
1537
|
+
* Send a DM reply on Instagram.
|
|
1538
|
+
*/
|
|
1539
|
+
sendMessage(options) {
|
|
1540
|
+
return (options.client ?? this.client).post({
|
|
1541
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1542
|
+
url: "/v1/messages/",
|
|
1543
|
+
...options,
|
|
1544
|
+
headers: {
|
|
1545
|
+
"Content-Type": "application/json",
|
|
1546
|
+
...options.headers
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Get messages in a conversation
|
|
1552
|
+
*/
|
|
1553
|
+
getConversationMessages(options) {
|
|
1554
|
+
return (options.client ?? this.client).get({
|
|
1555
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1556
|
+
url: "/v1/messages/{conversationId}",
|
|
1557
|
+
...options
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1450
1560
|
_health;
|
|
1451
1561
|
get health() {
|
|
1452
1562
|
return this._health ??= new Health({ client: this.client });
|
|
@@ -1640,7 +1750,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
|
|
|
1640
1750
|
}, "createAPIError");
|
|
1641
1751
|
|
|
1642
1752
|
// src/version.ts
|
|
1643
|
-
var VERSION = "0.8.
|
|
1753
|
+
var VERSION = "0.8.5";
|
|
1644
1754
|
|
|
1645
1755
|
// src/client.ts
|
|
1646
1756
|
var DEFAULT_BASE_URL = "https://api.postpeer.dev";
|