@postpeer/node 0.8.5 → 0.9.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/dist/index.js CHANGED
@@ -926,6 +926,22 @@ var Integrations = class extends HeyApiClient {
926
926
  ...options
927
927
  });
928
928
  }
929
+ /**
930
+ * Move an integration to another profile
931
+ *
932
+ * 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.
933
+ */
934
+ move(options) {
935
+ return (options.client ?? this.client).patch({
936
+ security: [{ name: "x-access-key", type: "apiKey" }],
937
+ url: "/v1/connect/integrations/{id}",
938
+ ...options,
939
+ headers: {
940
+ "Content-Type": "application/json",
941
+ ...options.headers
942
+ }
943
+ });
944
+ }
929
945
  };
930
946
  var Connect = class extends HeyApiClient {
931
947
  static {
@@ -1005,7 +1021,7 @@ var Profiles = class extends HeyApiClient {
1005
1021
  /**
1006
1022
  * Delete a profile
1007
1023
  *
1008
- * Soft-deletes the profile. Existing integrations bound to it keep their profileId — they are not orphaned, but listing /v1/profiles will no longer surface this row.
1024
+ * Soft-deletes an empty profile. Move or disconnect active integrations before deleting their profile.
1009
1025
  */
1010
1026
  delete(options) {
1011
1027
  return (options.client ?? this.client).delete({
@@ -1138,6 +1154,8 @@ var Notifications = class extends HeyApiClient {
1138
1154
  }
1139
1155
  /**
1140
1156
  * Create a notification subscription
1157
+ *
1158
+ * Create an email or webhook subscription. See the [webhook guide](/docs/webhooks) for request headers, payload fields, and signature verification.
1141
1159
  */
1142
1160
  create(options) {
1143
1161
  return (options.client ?? this.client).post({
@@ -1243,7 +1261,9 @@ var Scheduled = class extends HeyApiClient {
1243
1261
  /**
1244
1262
  * Edit a scheduled post (content, media, platforms, time)
1245
1263
  *
1246
- * Replaces the editable fields of a scheduled post: text content, media attachments, target platforms + platform-specific data, and optionally the scheduled time/timezone. Re-validates each platform and reconciles the credit difference. Only works while the post is still scheduled.
1264
+ * Deprecated: use PUT /v1/posts/:postId. Replaces the editable fields of a scheduled post and reconciles credits.
1265
+ *
1266
+ * @deprecated
1247
1267
  */
1248
1268
  edit(options) {
1249
1269
  return (options.client ?? this.client).put({
@@ -1274,7 +1294,9 @@ var Posts = class extends HeyApiClient {
1274
1294
  });
1275
1295
  }
1276
1296
  /**
1277
- * Publish a post to one or more social media platforms
1297
+ * Create, publish, or schedule a post
1298
+ *
1299
+ * Set saveAsDraft=true to save without accounts or credits, publishNow=true to publish immediately, or provide scheduledFor to schedule it.
1278
1300
  */
1279
1301
  create(options) {
1280
1302
  return (options.client ?? this.client).post({
@@ -1287,6 +1309,22 @@ var Posts = class extends HeyApiClient {
1287
1309
  }
1288
1310
  });
1289
1311
  }
1312
+ /**
1313
+ * Retry the failed platforms of a post
1314
+ *
1315
+ * Re-publish only the platform targets that failed on a post. Omit scheduledFor to retry immediately, or pass scheduledFor (ISO 8601) to schedule the retry. Retried platforms are charged credits (they were refunded when they failed) and refunded again if they fail. Already-published platforms are never re-posted.
1316
+ */
1317
+ retry(options) {
1318
+ return (options.client ?? this.client).post({
1319
+ security: [{ name: "x-access-key", type: "apiKey" }],
1320
+ url: "/v1/posts/{postId}/retry",
1321
+ ...options,
1322
+ headers: {
1323
+ "Content-Type": "application/json",
1324
+ ...options.headers
1325
+ }
1326
+ });
1327
+ }
1290
1328
  /**
1291
1329
  * Delete a post by ID
1292
1330
  */
@@ -1307,6 +1345,38 @@ var Posts = class extends HeyApiClient {
1307
1345
  ...options
1308
1346
  });
1309
1347
  }
1348
+ /**
1349
+ * Edit a draft or scheduled post
1350
+ *
1351
+ * Replaces an editable post. Drafts remain drafts with saveAsDraft=true, publish immediately with publishNow=true, or become scheduled with scheduledFor. Scheduled posts keep their schedule.
1352
+ */
1353
+ edit(options) {
1354
+ return (options.client ?? this.client).put({
1355
+ security: [{ name: "x-access-key", type: "apiKey" }],
1356
+ url: "/v1/posts/{postId}",
1357
+ ...options,
1358
+ headers: {
1359
+ "Content-Type": "application/json",
1360
+ ...options.headers
1361
+ }
1362
+ });
1363
+ }
1364
+ /**
1365
+ * Sync recent posts published outside PostPeer
1366
+ *
1367
+ * Fetches at most the 50 most recent posts from one connected account and stores posts published outside PostPeer. Existing PostPeer posts are updated instead of duplicated. Provide url or postId to verify one post. Requests are debounced per account for 15 seconds. Supported accounts: Twitter, YouTube, Pinterest, LinkedIn organization pages, TikTok, Facebook, Instagram, Threads, and Google Business.
1368
+ */
1369
+ syncExternal(options) {
1370
+ return (options.client ?? this.client).post({
1371
+ security: [{ name: "x-access-key", type: "apiKey" }],
1372
+ url: "/v1/posts/sync-external",
1373
+ ...options,
1374
+ headers: {
1375
+ "Content-Type": "application/json",
1376
+ ...options.headers
1377
+ }
1378
+ });
1379
+ }
1310
1380
  _scheduled;
1311
1381
  get scheduled() {
1312
1382
  return this._scheduled ??= new Scheduled({ client: this.client });
@@ -1331,85 +1401,93 @@ var Media = class extends HeyApiClient {
1331
1401
  });
1332
1402
  }
1333
1403
  };
1334
- var Analytics = class extends HeyApiClient {
1404
+ var Instagram = class extends HeyApiClient {
1335
1405
  static {
1336
- __name(this, "Analytics");
1406
+ __name(this, "Instagram");
1337
1407
  }
1338
1408
  /**
1339
- * Get post analytics
1409
+ * Get Instagram follower count
1340
1410
  *
1341
- * With postId, returns analytics for a single post. Without postId, returns a paginated list of published posts with analytics. Accepts both PostPeer post IDs and external platform post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Each call costs 1 credit.
1411
+ * Returns the connected Instagram professional account's live follower count. Historical growth requires daily snapshots and is not included. Each successful call costs 1 credit.
1342
1412
  */
1343
- get(options) {
1344
- return (options?.client ?? this.client).get({
1413
+ getFollowerStats(options) {
1414
+ return (options.client ?? this.client).get({
1345
1415
  security: [{ name: "x-access-key", type: "apiKey" }],
1346
- url: "/v1/analytics/",
1416
+ url: "/v1/analytics/instagram/follower-stats",
1347
1417
  ...options
1348
1418
  });
1349
1419
  }
1350
- };
1351
- var Usage = class extends HeyApiClient {
1352
- static {
1353
- __name(this, "Usage");
1420
+ /**
1421
+ * Get Instagram account insights
1422
+ *
1423
+ * Returns account-wide Instagram insights across feed, stories, explore, and profile activity. The date range defaults to the last 30 days and cannot exceed 90 days. Only reach supports daily time-series output. Missing Meta metrics are omitted rather than reported as zero. Each successful call costs 1 credit.
1424
+ */
1425
+ getAccountInsights(options) {
1426
+ return (options.client ?? this.client).get({
1427
+ security: [{ name: "x-access-key", type: "apiKey" }],
1428
+ url: "/v1/analytics/instagram/account-insights",
1429
+ ...options
1430
+ });
1354
1431
  }
1355
1432
  /**
1356
- * Get credit usage
1433
+ * Get Instagram demographics
1357
1434
  *
1358
- * Returns credit usage history for the project. Without filters, returns project-level totals. Add `profileId` to scope to a specific profile, or `integrationId` to scope to a specific connected account. Use `from`/`to` (YYYY-MM) to slice the history. Each entry contains the monthly credit count and a per-platform breakdown.
1435
+ * Returns Instagram follower, engaged-audience, or reached-audience demographics by age, city, country, and/or gender. Meta returns at most 45 entries per dimension, requires a sufficient audience, and may delay data by up to 48 hours. Each call costs 1 credit.
1359
1436
  */
1360
- get(options) {
1361
- return (options?.client ?? this.client).get({
1437
+ getDemographics(options) {
1438
+ return (options.client ?? this.client).get({
1362
1439
  security: [{ name: "x-access-key", type: "apiKey" }],
1363
- url: "/v1/usage/",
1440
+ url: "/v1/analytics/instagram/demographics",
1364
1441
  ...options
1365
1442
  });
1366
1443
  }
1367
1444
  };
1368
- var Pinterest = class extends HeyApiClient {
1445
+ var Analytics = class extends HeyApiClient {
1369
1446
  static {
1370
- __name(this, "Pinterest");
1447
+ __name(this, "Analytics");
1371
1448
  }
1372
1449
  /**
1373
- * List Pinterest boards for a connected account
1450
+ * Get post analytics
1451
+ *
1452
+ * With postId, returns analytics for a single post. Without postId, returns a paginated list of published posts with analytics. Accepts both PostPeer post IDs and external platform post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Each call costs 1 credit.
1374
1453
  */
1375
- getBoards(options) {
1454
+ get(options) {
1376
1455
  return (options?.client ?? this.client).get({
1377
1456
  security: [{ name: "x-access-key", type: "apiKey" }],
1378
- url: "/v1/pinterest/boards",
1457
+ url: "/v1/analytics/",
1379
1458
  ...options
1380
1459
  });
1381
1460
  }
1461
+ _instagram;
1462
+ get instagram() {
1463
+ return this._instagram ??= new Instagram({ client: this.client });
1464
+ }
1382
1465
  };
1383
- var Tiktok = class extends HeyApiClient {
1466
+ var Comments = class extends HeyApiClient {
1384
1467
  static {
1385
- __name(this, "Tiktok");
1468
+ __name(this, "Comments");
1386
1469
  }
1387
1470
  /**
1388
- * Fetch TikTok creator info for a connected account
1471
+ * List comments on a post
1389
1472
  *
1390
- * Proxies TikTok's /v2/post/publish/creator_info/query/ endpoint. Use the returned `privacyLevelOptions`, `commentDisabled`, `duetDisabled`, `stitchDisabled`, and `maxVideoPostDurationSec` to build a compliant "Post to TikTok" UX.
1473
+ * Fetch comments (and first-level replies) on a post from a connected Facebook Page, Instagram Business account, Threads account, or LinkedIn account. Requires the account to have the relevant permissions approved (pages_read_user_content for Facebook, instagram_business_manage_comments for Instagram, threads_manage_replies for Threads, Community Management social-feed scopes for LinkedIn).
1391
1474
  */
1392
- getCreatorInfo(options) {
1393
- return (options?.client ?? this.client).get({
1475
+ list(options) {
1476
+ return (options.client ?? this.client).get({
1394
1477
  security: [{ name: "x-access-key", type: "apiKey" }],
1395
- url: "/v1/tiktok/creator-info",
1478
+ url: "/v1/comments/",
1396
1479
  ...options
1397
1480
  });
1398
1481
  }
1399
- };
1400
- var Ai = class extends HeyApiClient {
1401
- static {
1402
- __name(this, "Ai");
1403
- }
1404
1482
  /**
1405
- * Generate a social media caption from a description
1483
+ * Create a comment or reply
1406
1484
  *
1407
- * Generates a caption tailored to the platforms you'll post to. Costs 2 credits per successful generation. Failed calls do not deduct credits.
1485
+ * Post a top-level comment on an Instagram, Facebook, or LinkedIn post, or a top-level post on Threads (provide `postId`), or reply to an existing comment on Facebook, Instagram, Threads, or LinkedIn (provide `commentId`).
1408
1486
  */
1409
- write(options) {
1487
+ create(options) {
1410
1488
  return (options.client ?? this.client).post({
1411
1489
  security: [{ name: "x-access-key", type: "apiKey" }],
1412
- url: "/v1/ai/write",
1490
+ url: "/v1/comments/",
1413
1491
  ...options,
1414
1492
  headers: {
1415
1493
  "Content-Type": "application/json",
@@ -1418,14 +1496,26 @@ var Ai = class extends HeyApiClient {
1418
1496
  });
1419
1497
  }
1420
1498
  /**
1421
- * Generate a social media image from a description
1499
+ * Delete a comment
1422
1500
  *
1423
- * Generates a square or vertical image suitable for social media. Costs 10 credits per successful generation. Failed calls do not deduct credits.
1501
+ * Delete a comment on a Facebook Page post, Instagram Business post, or LinkedIn post. Not supported on Threads (the API does not allow deleting others' replies).
1424
1502
  */
1425
- generateImage(options) {
1426
- return (options.client ?? this.client).post({
1503
+ delete(options) {
1504
+ return (options.client ?? this.client).delete({
1427
1505
  security: [{ name: "x-access-key", type: "apiKey" }],
1428
- url: "/v1/ai/image",
1506
+ url: "/v1/comments/{commentId}",
1507
+ ...options
1508
+ });
1509
+ }
1510
+ /**
1511
+ * Hide or unhide a comment
1512
+ *
1513
+ * Hide or unhide a comment on an Instagram Business post. Pass `hidden: true` to hide, `hidden: false` to unhide. Instagram only.
1514
+ */
1515
+ hide(options) {
1516
+ return (options.client ?? this.client).patch({
1517
+ security: [{ name: "x-access-key", type: "apiKey" }],
1518
+ url: "/v1/comments/{commentId}",
1429
1519
  ...options,
1430
1520
  headers: {
1431
1521
  "Content-Type": "application/json",
@@ -1434,24 +1524,31 @@ var Ai = class extends HeyApiClient {
1434
1524
  });
1435
1525
  }
1436
1526
  };
1437
- var PostPeer = class _PostPeer extends HeyApiClient {
1527
+ var Messages = class extends HeyApiClient {
1438
1528
  static {
1439
- __name(this, "PostPeer");
1529
+ __name(this, "Messages");
1440
1530
  }
1441
- static __registry = new HeyApiRegistry();
1442
- constructor(args) {
1443
- super(args);
1444
- _PostPeer.__registry.set(this, args?.key);
1531
+ /**
1532
+ * List conversations
1533
+ *
1534
+ * List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
1535
+ */
1536
+ listConversations(options) {
1537
+ return (options.client ?? this.client).get({
1538
+ security: [{ name: "x-access-key", type: "apiKey" }],
1539
+ url: "/v1/messages/",
1540
+ ...options
1541
+ });
1445
1542
  }
1446
1543
  /**
1447
- * Move an integration to another profile
1544
+ * Send a message
1448
1545
  *
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.
1546
+ * Send a DM reply on Instagram.
1450
1547
  */
1451
- moveIntegration(options) {
1452
- return (options.client ?? this.client).patch({
1548
+ send(options) {
1549
+ return (options.client ?? this.client).post({
1453
1550
  security: [{ name: "x-access-key", type: "apiKey" }],
1454
- url: "/v1/connect/integrations/{id}",
1551
+ url: "/v1/messages/",
1455
1552
  ...options,
1456
1553
  headers: {
1457
1554
  "Content-Type": "application/json",
@@ -1460,26 +1557,55 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1460
1557
  });
1461
1558
  }
1462
1559
  /**
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).
1560
+ * Get messages in a conversation
1466
1561
  */
1467
- listComments(options) {
1562
+ getConversation(options) {
1468
1563
  return (options.client ?? this.client).get({
1469
1564
  security: [{ name: "x-access-key", type: "apiKey" }],
1470
- url: "/v1/comments/",
1565
+ url: "/v1/messages/{conversationId}",
1471
1566
  ...options
1472
1567
  });
1473
1568
  }
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) {
1569
+ };
1570
+ var Posts2 = class extends HeyApiClient {
1571
+ static {
1572
+ __name(this, "Posts2");
1573
+ }
1574
+ list(options) {
1575
+ return (options.client ?? this.client).get({
1576
+ security: [{ name: "x-access-key", type: "apiKey" }],
1577
+ url: "/v1/comment-automations/posts",
1578
+ ...options
1579
+ });
1580
+ }
1581
+ };
1582
+ var Logs = class extends HeyApiClient {
1583
+ static {
1584
+ __name(this, "Logs");
1585
+ }
1586
+ list(options) {
1587
+ return (options.client ?? this.client).get({
1588
+ security: [{ name: "x-access-key", type: "apiKey" }],
1589
+ url: "/v1/comment-automations/{id}/logs",
1590
+ ...options
1591
+ });
1592
+ }
1593
+ };
1594
+ var CommentAutomations = class extends HeyApiClient {
1595
+ static {
1596
+ __name(this, "CommentAutomations");
1597
+ }
1598
+ list(options) {
1599
+ return (options?.client ?? this.client).get({
1600
+ security: [{ name: "x-access-key", type: "apiKey" }],
1601
+ url: "/v1/comment-automations/",
1602
+ ...options
1603
+ });
1604
+ }
1605
+ create(options) {
1480
1606
  return (options.client ?? this.client).post({
1481
1607
  security: [{ name: "x-access-key", type: "apiKey" }],
1482
- url: "/v1/comments/",
1608
+ url: "/v1/comment-automations/",
1483
1609
  ...options,
1484
1610
  headers: {
1485
1611
  "Content-Type": "application/json",
@@ -1487,27 +1613,17 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1487
1613
  }
1488
1614
  });
1489
1615
  }
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) {
1616
+ delete(options) {
1496
1617
  return (options.client ?? this.client).delete({
1497
1618
  security: [{ name: "x-access-key", type: "apiKey" }],
1498
- url: "/v1/comments/{commentId}",
1619
+ url: "/v1/comment-automations/{id}",
1499
1620
  ...options
1500
1621
  });
1501
1622
  }
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) {
1623
+ update(options) {
1508
1624
  return (options.client ?? this.client).patch({
1509
1625
  security: [{ name: "x-access-key", type: "apiKey" }],
1510
- url: "/v1/comments/{commentId}",
1626
+ url: "/v1/comment-automations/{id}",
1511
1627
  ...options,
1512
1628
  headers: {
1513
1629
  "Content-Type": "application/json",
@@ -1515,27 +1631,92 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1515
1631
  }
1516
1632
  });
1517
1633
  }
1634
+ _posts;
1635
+ get posts() {
1636
+ return this._posts ??= new Posts2({ client: this.client });
1637
+ }
1638
+ _logs;
1639
+ get logs() {
1640
+ return this._logs ??= new Logs({ client: this.client });
1641
+ }
1642
+ };
1643
+ var Usage = class extends HeyApiClient {
1644
+ static {
1645
+ __name(this, "Usage");
1646
+ }
1518
1647
  /**
1519
- * List conversations
1648
+ * Get credit usage
1520
1649
  *
1521
- * List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
1650
+ * Returns credit usage history for the project. Without filters, returns project-level totals. Add `profileId` to scope to a specific profile, or `integrationId` to scope to a specific connected account. Use `from`/`to` (YYYY-MM) to slice the history. Each entry contains the monthly credit count and a per-platform breakdown.
1522
1651
  */
1523
- listConversations(options) {
1652
+ get(options) {
1653
+ return (options?.client ?? this.client).get({
1654
+ security: [{ name: "x-access-key", type: "apiKey" }],
1655
+ url: "/v1/usage/",
1656
+ ...options
1657
+ });
1658
+ }
1659
+ };
1660
+ var Pinterest = class extends HeyApiClient {
1661
+ static {
1662
+ __name(this, "Pinterest");
1663
+ }
1664
+ /**
1665
+ * List Pinterest boards for a connected account
1666
+ */
1667
+ getBoards(options) {
1668
+ return (options?.client ?? this.client).get({
1669
+ security: [{ name: "x-access-key", type: "apiKey" }],
1670
+ url: "/v1/pinterest/boards",
1671
+ ...options
1672
+ });
1673
+ }
1674
+ };
1675
+ var Tiktok = class extends HeyApiClient {
1676
+ static {
1677
+ __name(this, "Tiktok");
1678
+ }
1679
+ /**
1680
+ * Fetch TikTok creator info for a connected account
1681
+ *
1682
+ * Proxies TikTok's /v2/post/publish/creator_info/query/ endpoint. Use the returned `privacyLevelOptions`, `commentDisabled`, `duetDisabled`, `stitchDisabled`, and `maxVideoPostDurationSec` to build a compliant "Post to TikTok" UX.
1683
+ */
1684
+ getCreatorInfo(options) {
1685
+ return (options?.client ?? this.client).get({
1686
+ security: [{ name: "x-access-key", type: "apiKey" }],
1687
+ url: "/v1/tiktok/creator-info",
1688
+ ...options
1689
+ });
1690
+ }
1691
+ };
1692
+ var Linkedin2 = class extends HeyApiClient {
1693
+ static {
1694
+ __name(this, "Linkedin2");
1695
+ }
1696
+ /**
1697
+ * Find a LinkedIn organization ID and URN by company URL or slug
1698
+ */
1699
+ lookupOrganization(options) {
1524
1700
  return (options.client ?? this.client).get({
1525
1701
  security: [{ name: "x-access-key", type: "apiKey" }],
1526
- url: "/v1/messages/",
1702
+ url: "/v1/linkedin/organization-lookup",
1527
1703
  ...options
1528
1704
  });
1529
1705
  }
1706
+ };
1707
+ var Ai = class extends HeyApiClient {
1708
+ static {
1709
+ __name(this, "Ai");
1710
+ }
1530
1711
  /**
1531
- * Send a message
1712
+ * Generate a social media caption from a description
1532
1713
  *
1533
- * Send a DM reply on Instagram.
1714
+ * Generates a caption tailored to the platforms you'll post to. Costs 2 credits per successful generation. Failed calls do not deduct credits.
1534
1715
  */
1535
- sendMessage(options) {
1716
+ write(options) {
1536
1717
  return (options.client ?? this.client).post({
1537
1718
  security: [{ name: "x-access-key", type: "apiKey" }],
1538
- url: "/v1/messages/",
1719
+ url: "/v1/ai/write",
1539
1720
  ...options,
1540
1721
  headers: {
1541
1722
  "Content-Type": "application/json",
@@ -1544,15 +1725,31 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1544
1725
  });
1545
1726
  }
1546
1727
  /**
1547
- * Get messages in a conversation
1728
+ * Generate a social media image from a description
1729
+ *
1730
+ * Generates a square or vertical image suitable for social media. Costs 10 credits per successful generation. Failed calls do not deduct credits.
1548
1731
  */
1549
- getConversationMessages(options) {
1550
- return (options.client ?? this.client).get({
1732
+ generateImage(options) {
1733
+ return (options.client ?? this.client).post({
1551
1734
  security: [{ name: "x-access-key", type: "apiKey" }],
1552
- url: "/v1/messages/{conversationId}",
1553
- ...options
1735
+ url: "/v1/ai/image",
1736
+ ...options,
1737
+ headers: {
1738
+ "Content-Type": "application/json",
1739
+ ...options.headers
1740
+ }
1554
1741
  });
1555
1742
  }
1743
+ };
1744
+ var PostPeer = class _PostPeer extends HeyApiClient {
1745
+ static {
1746
+ __name(this, "PostPeer");
1747
+ }
1748
+ static __registry = new HeyApiRegistry();
1749
+ constructor(args) {
1750
+ super(args);
1751
+ _PostPeer.__registry.set(this, args?.key);
1752
+ }
1556
1753
  _health;
1557
1754
  get health() {
1558
1755
  return this._health ??= new Health({ client: this.client });
@@ -1589,6 +1786,18 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1589
1786
  get analytics() {
1590
1787
  return this._analytics ??= new Analytics({ client: this.client });
1591
1788
  }
1789
+ _comments;
1790
+ get comments() {
1791
+ return this._comments ??= new Comments({ client: this.client });
1792
+ }
1793
+ _messages;
1794
+ get messages() {
1795
+ return this._messages ??= new Messages({ client: this.client });
1796
+ }
1797
+ _commentAutomations;
1798
+ get commentAutomations() {
1799
+ return this._commentAutomations ??= new CommentAutomations({ client: this.client });
1800
+ }
1592
1801
  _usage;
1593
1802
  get usage() {
1594
1803
  return this._usage ??= new Usage({ client: this.client });
@@ -1601,6 +1810,10 @@ var PostPeer = class _PostPeer extends HeyApiClient {
1601
1810
  get tiktok() {
1602
1811
  return this._tiktok ??= new Tiktok({ client: this.client });
1603
1812
  }
1813
+ _linkedin;
1814
+ get linkedin() {
1815
+ return this._linkedin ??= new Linkedin2({ client: this.client });
1816
+ }
1604
1817
  _ai;
1605
1818
  get ai() {
1606
1819
  return this._ai ??= new Ai({ client: this.client });
@@ -1746,7 +1959,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
1746
1959
  }, "createAPIError");
1747
1960
 
1748
1961
  // src/version.ts
1749
- var VERSION = "0.8.5";
1962
+ var VERSION = "0.9.0";
1750
1963
 
1751
1964
  // src/client.ts
1752
1965
  var DEFAULT_BASE_URL = "https://api.postpeer.dev";