@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/dist/index.js
CHANGED
|
@@ -1138,6 +1138,8 @@ var Notifications = class extends HeyApiClient {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
/**
|
|
1140
1140
|
* Create a notification subscription
|
|
1141
|
+
*
|
|
1142
|
+
* Create an email or webhook subscription. See the [webhook guide](/docs/webhooks) for request headers, payload fields, and signature verification.
|
|
1141
1143
|
*/
|
|
1142
1144
|
create(options) {
|
|
1143
1145
|
return (options.client ?? this.client).post({
|
|
@@ -1287,6 +1289,22 @@ var Posts = class extends HeyApiClient {
|
|
|
1287
1289
|
}
|
|
1288
1290
|
});
|
|
1289
1291
|
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Retry the failed platforms of a post
|
|
1294
|
+
*
|
|
1295
|
+
* 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.
|
|
1296
|
+
*/
|
|
1297
|
+
retry(options) {
|
|
1298
|
+
return (options.client ?? this.client).post({
|
|
1299
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1300
|
+
url: "/v1/posts/{postId}/retry",
|
|
1301
|
+
...options,
|
|
1302
|
+
headers: {
|
|
1303
|
+
"Content-Type": "application/json",
|
|
1304
|
+
...options.headers
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1290
1308
|
/**
|
|
1291
1309
|
* Delete a post by ID
|
|
1292
1310
|
*/
|
|
@@ -1331,6 +1349,47 @@ var Media = class extends HeyApiClient {
|
|
|
1331
1349
|
});
|
|
1332
1350
|
}
|
|
1333
1351
|
};
|
|
1352
|
+
var Instagram = class extends HeyApiClient {
|
|
1353
|
+
static {
|
|
1354
|
+
__name(this, "Instagram");
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Get Instagram follower count
|
|
1358
|
+
*
|
|
1359
|
+
* 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.
|
|
1360
|
+
*/
|
|
1361
|
+
getFollowerStats(options) {
|
|
1362
|
+
return (options.client ?? this.client).get({
|
|
1363
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1364
|
+
url: "/v1/analytics/instagram/follower-stats",
|
|
1365
|
+
...options
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Get Instagram account insights
|
|
1370
|
+
*
|
|
1371
|
+
* 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.
|
|
1372
|
+
*/
|
|
1373
|
+
getAccountInsights(options) {
|
|
1374
|
+
return (options.client ?? this.client).get({
|
|
1375
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1376
|
+
url: "/v1/analytics/instagram/account-insights",
|
|
1377
|
+
...options
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Get Instagram demographics
|
|
1382
|
+
*
|
|
1383
|
+
* 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.
|
|
1384
|
+
*/
|
|
1385
|
+
getDemographics(options) {
|
|
1386
|
+
return (options.client ?? this.client).get({
|
|
1387
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1388
|
+
url: "/v1/analytics/instagram/demographics",
|
|
1389
|
+
...options
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1334
1393
|
var Analytics = class extends HeyApiClient {
|
|
1335
1394
|
static {
|
|
1336
1395
|
__name(this, "Analytics");
|
|
@@ -1347,6 +1406,10 @@ var Analytics = class extends HeyApiClient {
|
|
|
1347
1406
|
...options
|
|
1348
1407
|
});
|
|
1349
1408
|
}
|
|
1409
|
+
_instagram;
|
|
1410
|
+
get instagram() {
|
|
1411
|
+
return this._instagram ??= new Instagram({ client: this.client });
|
|
1412
|
+
}
|
|
1350
1413
|
};
|
|
1351
1414
|
var Usage = class extends HeyApiClient {
|
|
1352
1415
|
static {
|
|
@@ -1746,7 +1809,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
|
|
|
1746
1809
|
}, "createAPIError");
|
|
1747
1810
|
|
|
1748
1811
|
// src/version.ts
|
|
1749
|
-
var VERSION = "0.8.
|
|
1812
|
+
var VERSION = "0.8.6";
|
|
1750
1813
|
|
|
1751
1814
|
// src/client.ts
|
|
1752
1815
|
var DEFAULT_BASE_URL = "https://api.postpeer.dev";
|