@postpeer/node 0.8.5 → 0.8.6
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 +7 -0
- package/dist/index.cjs +64 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +551 -6
- package/dist/index.d.ts +551 -6
- package/dist/index.js +64 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.6
|
|
4
|
+
|
|
5
|
+
- Added retrying failed platform targets for a post.
|
|
6
|
+
- Added Instagram follower statistics, account insights, and audience demographics.
|
|
7
|
+
- Added Trial Reels, Reel audio names, and idempotency keys for post creation.
|
|
8
|
+
- Added integration insight-permission status and profile names.
|
|
9
|
+
|
|
3
10
|
## 0.8.5
|
|
4
11
|
|
|
5
12
|
- Added listing, creating, replying to, hiding, unhiding, and deleting comments on supported Meta platforms.
|
package/dist/index.cjs
CHANGED
|
@@ -1142,6 +1142,8 @@ var Notifications = class extends HeyApiClient {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
/**
|
|
1144
1144
|
* Create a notification subscription
|
|
1145
|
+
*
|
|
1146
|
+
* Create an email or webhook subscription. See the [webhook guide](/docs/webhooks) for request headers, payload fields, and signature verification.
|
|
1145
1147
|
*/
|
|
1146
1148
|
create(options) {
|
|
1147
1149
|
return (options.client ?? this.client).post({
|
|
@@ -1291,6 +1293,22 @@ var Posts = class extends HeyApiClient {
|
|
|
1291
1293
|
}
|
|
1292
1294
|
});
|
|
1293
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Retry the failed platforms of a post
|
|
1298
|
+
*
|
|
1299
|
+
* 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.
|
|
1300
|
+
*/
|
|
1301
|
+
retry(options) {
|
|
1302
|
+
return (options.client ?? this.client).post({
|
|
1303
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1304
|
+
url: "/v1/posts/{postId}/retry",
|
|
1305
|
+
...options,
|
|
1306
|
+
headers: {
|
|
1307
|
+
"Content-Type": "application/json",
|
|
1308
|
+
...options.headers
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1294
1312
|
/**
|
|
1295
1313
|
* Delete a post by ID
|
|
1296
1314
|
*/
|
|
@@ -1335,6 +1353,47 @@ var Media = class extends HeyApiClient {
|
|
|
1335
1353
|
});
|
|
1336
1354
|
}
|
|
1337
1355
|
};
|
|
1356
|
+
var Instagram = class extends HeyApiClient {
|
|
1357
|
+
static {
|
|
1358
|
+
__name(this, "Instagram");
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Get Instagram follower count
|
|
1362
|
+
*
|
|
1363
|
+
* 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.
|
|
1364
|
+
*/
|
|
1365
|
+
getFollowerStats(options) {
|
|
1366
|
+
return (options.client ?? this.client).get({
|
|
1367
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1368
|
+
url: "/v1/analytics/instagram/follower-stats",
|
|
1369
|
+
...options
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Get Instagram account insights
|
|
1374
|
+
*
|
|
1375
|
+
* 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.
|
|
1376
|
+
*/
|
|
1377
|
+
getAccountInsights(options) {
|
|
1378
|
+
return (options.client ?? this.client).get({
|
|
1379
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1380
|
+
url: "/v1/analytics/instagram/account-insights",
|
|
1381
|
+
...options
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Get Instagram demographics
|
|
1386
|
+
*
|
|
1387
|
+
* 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.
|
|
1388
|
+
*/
|
|
1389
|
+
getDemographics(options) {
|
|
1390
|
+
return (options.client ?? this.client).get({
|
|
1391
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1392
|
+
url: "/v1/analytics/instagram/demographics",
|
|
1393
|
+
...options
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1338
1397
|
var Analytics = class extends HeyApiClient {
|
|
1339
1398
|
static {
|
|
1340
1399
|
__name(this, "Analytics");
|
|
@@ -1351,6 +1410,10 @@ var Analytics = class extends HeyApiClient {
|
|
|
1351
1410
|
...options
|
|
1352
1411
|
});
|
|
1353
1412
|
}
|
|
1413
|
+
_instagram;
|
|
1414
|
+
get instagram() {
|
|
1415
|
+
return this._instagram ??= new Instagram({ client: this.client });
|
|
1416
|
+
}
|
|
1354
1417
|
};
|
|
1355
1418
|
var Usage = class extends HeyApiClient {
|
|
1356
1419
|
static {
|
|
@@ -1750,7 +1813,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
|
|
|
1750
1813
|
}, "createAPIError");
|
|
1751
1814
|
|
|
1752
1815
|
// src/version.ts
|
|
1753
|
-
var VERSION = "0.8.
|
|
1816
|
+
var VERSION = "0.8.6";
|
|
1754
1817
|
|
|
1755
1818
|
// src/client.ts
|
|
1756
1819
|
var DEFAULT_BASE_URL = "https://api.postpeer.dev";
|