@postpeer/node 0.8.1 → 0.8.2
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 +5 -0
- package/README.md +15 -0
- package/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -3
- package/dist/index.d.ts +239 -3
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.2
|
|
4
|
+
|
|
5
|
+
- Added scheduled-post editing through `client.posts.scheduled.edit()`.
|
|
6
|
+
- Added LinkedIn company-page mentions and Instagram Story publishing options.
|
|
7
|
+
|
|
3
8
|
## 0.8.1
|
|
4
9
|
|
|
5
10
|
- Standardized the public SDK class name as `PostPeer` throughout generated code and documentation.
|
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ client.posts.list({ query });
|
|
|
64
64
|
client.posts.get({ path: { postId } });
|
|
65
65
|
client.posts.delete({ path: { postId } });
|
|
66
66
|
client.posts.scheduled.list();
|
|
67
|
+
client.posts.scheduled.edit({ path: { postId }, body });
|
|
67
68
|
client.posts.scheduled.cancel({ path: { postId } });
|
|
68
69
|
client.posts.scheduled.reschedule({ path: { postId }, body });
|
|
69
70
|
|
|
@@ -86,6 +87,20 @@ client.ai.generateImage({ body });
|
|
|
86
87
|
|
|
87
88
|
Request parameters are grouped under `body`, `path`, `query`, and `headers`. Responses include `data`, `request`, and `response`, giving you access to the parsed result and the native Fetch objects.
|
|
88
89
|
|
|
90
|
+
### Instagram Stories
|
|
91
|
+
|
|
92
|
+
The generated `InstagramConfigurations` type now supports Story publishing:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import type { InstagramConfigurations } from '@postpeer/node';
|
|
96
|
+
|
|
97
|
+
const platformSpecificData: InstagramConfigurations = {
|
|
98
|
+
contentType: 'story',
|
|
99
|
+
};
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Pass `platformSpecificData` on an Instagram platform entry when creating or editing a post. Omit `contentType` to keep the existing behavior: images publish to Feed and videos publish as Reels.
|
|
103
|
+
|
|
89
104
|
## Error handling
|
|
90
105
|
|
|
91
106
|
```ts
|
package/dist/index.cjs
CHANGED
|
@@ -1200,6 +1200,22 @@ var Scheduled = class extends HeyApiClient {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
});
|
|
1202
1202
|
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Edit a scheduled post (content, media, platforms, time)
|
|
1205
|
+
*
|
|
1206
|
+
* 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.
|
|
1207
|
+
*/
|
|
1208
|
+
edit(options) {
|
|
1209
|
+
return (options.client ?? this.client).put({
|
|
1210
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1211
|
+
url: "/v1/posts/scheduled/{postId}",
|
|
1212
|
+
...options,
|
|
1213
|
+
headers: {
|
|
1214
|
+
"Content-Type": "application/json",
|
|
1215
|
+
...options.headers
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1203
1219
|
};
|
|
1204
1220
|
var Posts = class extends HeyApiClient {
|
|
1205
1221
|
static {
|
|
@@ -1580,7 +1596,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
|
|
|
1580
1596
|
}, "createAPIError");
|
|
1581
1597
|
|
|
1582
1598
|
// src/version.ts
|
|
1583
|
-
var VERSION = "0.8.
|
|
1599
|
+
var VERSION = "0.8.2";
|
|
1584
1600
|
|
|
1585
1601
|
// src/client.ts
|
|
1586
1602
|
var DEFAULT_BASE_URL = "https://api.postpeer.dev";
|