Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/post-for-me-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -37,7 +37,7 @@ jobs:
build:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/post-for-me-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
permissions:
contents: read
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down Expand Up @@ -88,15 +88,15 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/post-for-me-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
node-version: '24'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: '20'
node-version: '24'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.0"
".": "2.9.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development/post-for-me-b4207c01320058903d7a081df1d83e7c750eebce2c8cb1dbfc73514bf318ea87.yml
openapi_spec_hash: ffccc75cdb734af5746192289c4fce9b
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development/post-for-me-04c0892827f2117f5c5f9695f01c32a90d82cbde12dbb395eaabe2ccee11fee0.yml
openapi_spec_hash: 150dc8541a9a47afe9154eac3c8caa6d
config_hash: 600d71be044aa28b6759ce7f55a86948
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## 2.9.0 (2026-07-29)

Full Changelog: [v2.8.0...v2.9.0](https://github.com/DayMoonDevelopment/post-for-me-typescript/compare/v2.8.0...v2.9.0)

### Features

* **api:** api update ([3e96512](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/3e96512831aceba16ed224aa25c1d66dba9d68f6))
* **api:** api update ([86a2b08](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/86a2b08089c02d909ec02851e2a0fcbe6b87548d))
* **api:** api update ([3dd19af](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/3dd19af28899826b58d2922906c1836cd87ef8ac))
* **api:** api update ([91beba7](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/91beba7ffb724a8c75504189f73776dedee7e900))
* **api:** api update ([2abbb5e](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/2abbb5e618b6a59ca1ded5b2bd610f339d4dfe52))
* **api:** api update ([5652693](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/56526937dc045cc9b5dd297b81aeccccf779218f))
* **api:** api update ([21e9488](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/21e9488f63102e92e75200acb4343b77f8765485))
* **api:** api update ([cc28a78](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/cc28a7832f0c56fd07817ed386871a9779a4fdc0))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([e8a8060](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/e8a8060d9a6b67f3b8987d54fdfddc17fb65f22e))


### Bug Fixes

* **ci:** bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 ([7b9a9b2](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/7b9a9b2904ea68bef2fd18c408671d4bdc7dbaa9))
* **client:** send content-type header for requests with an omitted optional body ([4f26e8e](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/4f26e8e7cf86948a6cd6ee90f4645e4a8e91ff0f))
* **mcp:** use `pure-lockfile` when building mcp server ([3d5a8d0](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/3d5a8d041457afffa047e23a904f8e49835f0e11))
* **typescript:** upgrade tsc-multi so that it works with Node 26 ([206f798](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/206f798375a765344d1938e0bb40d66472c3d2c6))


### Chores

* **internal:** codegen related update ([3a47c78](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/3a47c787ed0a361b97dbf9b8d55040a39f6354de))
* **tests:** remove redundant File import ([4e03418](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/4e03418ea827fa73887313f50a4ad2a1cd98dd3c))

## 2.8.0 (2026-05-13)

Full Changelog: [v2.7.2...v2.8.0](https://github.com/DayMoonDevelopment/post-for-me-typescript/compare/v2.7.2...v2.8.0)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "post-for-me",
"version": "2.8.0",
"version": "2.9.0",
"description": "The official TypeScript library for the Post For Me API",
"author": "Post For Me <postforme@daymoon.dev>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@arethetypeswrong/cli": "^0.18.0",
"@swc/core": "^1.3.102",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.4.0",
Expand All @@ -43,7 +43,7 @@
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "5.8.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "post-for-me-mcp",
"version": "2.8.0",
"version": "2.9.0",
"description": "The official MCP Server for the Post For Me API",
"author": {
"name": "Post For Me",
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "post-for-me-mcp",
"version": "2.8.0",
"version": "2.9.0",
"description": "The official MCP Server for the Post For Me API",
"author": "Post For Me <postforme@daymoon.dev>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -74,7 +74,7 @@
"ts-jest": "^29.1.0",
"ts-morph": "^19.0.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0"
},
"imports": {
Expand Down
28 changes: 14 additions & 14 deletions packages/mcp-server/src/local-docs-search.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'post_for_me_api',
version: '2.8.0',
version: '2.9.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
6 changes: 3 additions & 3 deletions packages/mcp-server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3921,9 +3921,9 @@ ts-node@^10.5.0:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"

"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz":
version "1.1.9"
resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd"
"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz":
version "1.1.11"
resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz#010247051be13b55abdc98f787c017285149f4f2"
dependencies:
debug "^4.3.7"
fast-glob "^3.3.2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ fi
# build all sub-packages
for dir in packages/*; do
if [ -d "$dir" ]; then
(cd "$dir" && yarn install && yarn build)
(cd "$dir" && yarn install --pure-lockfile && yarn build)
fi
done
15 changes: 12 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,19 @@ export class PostForMe {
return () => controller.abort();
}

private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
private buildBody({ options }: { options: FinalRequestOptions }): {
bodyHeaders: HeadersLike;
body: BodyInit | undefined;
} {
const { body, headers: rawHeaders } = options;
if (!body) {
// A resource method always passes a `body` key when its operation defines a
// request body, even if the caller omitted an optional body param. Keep the
// content-type for those, and only elide it for operations with no body at
// all (e.g. GET/DELETE).
if (body == null && 'body' in options) {
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
}
return { bodyHeaders: undefined, body: undefined };
}
const headers = buildHeaders([rawHeaders]);
Expand Down Expand Up @@ -839,8 +847,9 @@ export class PostForMe {
* Use this endpoint to get the platform details for any post made under the connected account. To use this endpoint accounts must be connected with the **"feeds" permission**.
*
* Details will include:
* - Post information including caption, url, media, etc..
* - When passing **expand=metrics**, Metrics information including views, likes, follows, etc..
* - Post information including caption, url, media, etc..
* - When passing **expand=metrics**, Metrics information including views, likes, follows, etc..
* - For **Facebook** feeds with **expand=metrics**, page size is capped by the server-side **FacebookFeedMetricsLimitCap** setting (default: **10**) to protect API memory usage.
*
* Note: Currently the following platforms are supported:
* - **Instagram**, may take up to 48 hours for some metrics to be avaialbe
Expand Down
48 changes: 4 additions & 44 deletions src/resources/social-account-feeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { path } from '../internal/utils/path';
* Use this endpoint to get the platform details for any post made under the connected account. To use this endpoint accounts must be connected with the **"feeds" permission**.
*
* Details will include:
* - Post information including caption, url, media, etc..
* - When passing **expand=metrics**, Metrics information including views, likes, follows, etc..
* - Post information including caption, url, media, etc..
* - When passing **expand=metrics**, Metrics information including views, likes, follows, etc..
* - For **Facebook** feeds with **expand=metrics**, page size is capped by the server-side **FacebookFeedMetricsLimitCap** setting (default: **10**) to protect API memory usage.
*
* Note: Currently the following platforms are supported:
* - **Instagram**, may take up to 48 hours for some metrics to be avaialbe
Expand Down Expand Up @@ -667,33 +668,13 @@ export namespace PlatformPost {
*/
comments?: number;

/**
* Number of fans who saw the post
*/
fan_reach?: number;

/**
* Number of times the photo or video was viewed
*/
media_views?: number;

/**
* Number of people who saw the post via non-viral distribution
*/
nonviral_reach?: number;

/**
* Number of people who saw the post via organic distribution
*/
organic_reach?: number;

/**
* Number of people who saw the post via paid distribution
*/
paid_reach?: number;

/**
* Total number of unique people who saw the post
* Total number of unique people who viewed the post media
*/
reach?: number;

Expand Down Expand Up @@ -853,36 +834,15 @@ export namespace PlatformPost {
*/
video_views_organic?: number;

/**
* Number of unique people who viewed the video for 3+ seconds organically
*/
video_views_organic_unique?: number;

/**
* Number of times video was viewed for 3+ seconds via paid distribution
*/
video_views_paid?: number;

/**
* Number of unique people who viewed the video for 3+ seconds via paid
* distribution
*/
video_views_paid_unique?: number;

/**
* Number of times video was viewed with sound on
*/
video_views_sound_on?: number;

/**
* Number of unique people who viewed the video for 3+ seconds
*/
video_views_unique?: number;

/**
* Number of people who saw the post in News Feed via viral reach
*/
viral_reach?: number;
}

export interface TwitterPostMetricsDto {
Expand Down
Loading
Loading