@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/dist/index.js CHANGED
@@ -1443,6 +1443,116 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1443
1443
  super(args);
1444
1444
  _PostPeer.__registry.set(this, args?.key);
1445
1445
  }
1446
+ /**
1447
+ * Move an integration to another profile
1448
+ *
1449
+ * 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.
1450
+ */
1451
+ moveIntegration(options) {
1452
+ return (options.client ?? this.client).patch({
1453
+ security: [{ name: "x-access-key", type: "apiKey" }],
1454
+ url: "/v1/connect/integrations/{id}",
1455
+ ...options,
1456
+ headers: {
1457
+ "Content-Type": "application/json",
1458
+ ...options.headers
1459
+ }
1460
+ });
1461
+ }
1462
+ /**
1463
+ * List comments on a post
1464
+ *
1465
+ * 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).
1466
+ */
1467
+ listComments(options) {
1468
+ return (options.client ?? this.client).get({
1469
+ security: [{ name: "x-access-key", type: "apiKey" }],
1470
+ url: "/v1/comments/",
1471
+ ...options
1472
+ });
1473
+ }
1474
+ /**
1475
+ * Create a comment or reply
1476
+ *
1477
+ * 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`).
1478
+ */
1479
+ createComment(options) {
1480
+ return (options.client ?? this.client).post({
1481
+ security: [{ name: "x-access-key", type: "apiKey" }],
1482
+ url: "/v1/comments/",
1483
+ ...options,
1484
+ headers: {
1485
+ "Content-Type": "application/json",
1486
+ ...options.headers
1487
+ }
1488
+ });
1489
+ }
1490
+ /**
1491
+ * Delete a comment
1492
+ *
1493
+ * Delete a comment on a Facebook Page post or Instagram Business post. Not supported on Threads (the API does not allow deleting others' replies).
1494
+ */
1495
+ deleteComment(options) {
1496
+ return (options.client ?? this.client).delete({
1497
+ security: [{ name: "x-access-key", type: "apiKey" }],
1498
+ url: "/v1/comments/{commentId}",
1499
+ ...options
1500
+ });
1501
+ }
1502
+ /**
1503
+ * Hide or unhide a comment
1504
+ *
1505
+ * Hide or unhide a comment on an Instagram Business post. Pass `hidden: true` to hide, `hidden: false` to unhide. Instagram only.
1506
+ */
1507
+ hideComment(options) {
1508
+ return (options.client ?? this.client).patch({
1509
+ security: [{ name: "x-access-key", type: "apiKey" }],
1510
+ url: "/v1/comments/{commentId}",
1511
+ ...options,
1512
+ headers: {
1513
+ "Content-Type": "application/json",
1514
+ ...options.headers
1515
+ }
1516
+ });
1517
+ }
1518
+ /**
1519
+ * List conversations
1520
+ *
1521
+ * List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
1522
+ */
1523
+ listConversations(options) {
1524
+ return (options.client ?? this.client).get({
1525
+ security: [{ name: "x-access-key", type: "apiKey" }],
1526
+ url: "/v1/messages/",
1527
+ ...options
1528
+ });
1529
+ }
1530
+ /**
1531
+ * Send a message
1532
+ *
1533
+ * Send a DM reply on Instagram.
1534
+ */
1535
+ sendMessage(options) {
1536
+ return (options.client ?? this.client).post({
1537
+ security: [{ name: "x-access-key", type: "apiKey" }],
1538
+ url: "/v1/messages/",
1539
+ ...options,
1540
+ headers: {
1541
+ "Content-Type": "application/json",
1542
+ ...options.headers
1543
+ }
1544
+ });
1545
+ }
1546
+ /**
1547
+ * Get messages in a conversation
1548
+ */
1549
+ getConversationMessages(options) {
1550
+ return (options.client ?? this.client).get({
1551
+ security: [{ name: "x-access-key", type: "apiKey" }],
1552
+ url: "/v1/messages/{conversationId}",
1553
+ ...options
1554
+ });
1555
+ }
1446
1556
  _health;
1447
1557
  get health() {
1448
1558
  return this._health ??= new Health({ client: this.client });
@@ -1636,7 +1746,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
1636
1746
  }, "createAPIError");
1637
1747
 
1638
1748
  // src/version.ts
1639
- var VERSION = "0.8.3";
1749
+ var VERSION = "0.8.5";
1640
1750
 
1641
1751
  // src/client.ts
1642
1752
  var DEFAULT_BASE_URL = "https://api.postpeer.dev";