Skip to content

Commit 812250d

Browse files
feat: add subscriptionLimits field to Call interface
Add a new optional `subscriptionLimits` field to the `Call` interface that exposes the organization's subscription limits at the time of the call, including concurrency limit information. Key changes: - `Call.subscriptionLimits` added as an optional `SubscriptionLimits | undefined` field - Field carries org-level subscription and concurrency limit data captured at call time 🌿 Generated with Fern
1 parent f651d96 commit 812250d

9 files changed

Lines changed: 93 additions & 47 deletions

File tree

.fern/metadata.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cliVersion": "4.65.1",
2+
"cliVersion": "4.86.2",
33
"generatorName": "fernapi/fern-typescript-sdk",
44
"generatorVersion": "3.63.0",
55
"generatorConfig": {
@@ -11,6 +11,10 @@
1111
"omitUndefined": true,
1212
"enableInlineTypes": false
1313
},
14-
"originGitCommit": "46b109d88752307f8952db91eaa642f61c3875b4",
15-
"sdkVersion": "1.1.0"
14+
"originGitCommit": "7dc5137b61f1c65ebff4ce5d2fb11de2d945a1cf",
15+
"originGitCommitIsDirty": true,
16+
"invokedBy": "ci",
17+
"requestedVersion": "AUTO",
18+
"ciProvider": "unknown",
19+
"sdkVersion": "1.2.0"
1620
}

.github/workflows/ci.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: ci
22

3-
on:
4-
push:
5-
workflow_dispatch: {}
3+
on: [push]
64

75
concurrency:
86
group: ${{ github.workflow }}-${{ github.ref }}
@@ -37,7 +35,7 @@ jobs:
3735

3836
- name: Set up node
3937
uses: actions/setup-node@v6
40-
38+
4139
- name: Install pnpm
4240
uses: pnpm/action-setup@v4
4341

@@ -49,21 +47,18 @@ jobs:
4947

5048
publish:
5149
needs: [ compile, test ]
52-
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'refs/tags/') }}
50+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
5351
runs-on: ubuntu-latest
5452
permissions:
55-
contents: read
56-
id-token: write
53+
contents: read # Required for checkout
54+
id-token: write # Required for OIDC
5755
steps:
5856
- name: Checkout repo
5957
uses: actions/checkout@v6
6058

6159
- name: Set up node
6260
uses: actions/setup-node@v6
6361

64-
- name: Update npm
65-
run: sudo npm install -g npm@11.5.1
66-
6762
- name: Install pnpm
6863
uses: pnpm/action-setup@v4
6964

@@ -75,10 +70,21 @@ jobs:
7570

7671
- name: Publish to npm
7772
run: |
78-
if [[ ${GITHUB_REF} == *alpha* ]]; then
79-
npm publish --access public --tag alpha
80-
elif [[ ${GITHUB_REF} == *beta* ]]; then
81-
npm publish --access public --tag beta
82-
else
83-
npm publish --access public
84-
fi
73+
publish() { # use latest npm to ensure OIDC support
74+
npx -y npm@latest publish "$@"
75+
}
76+
if [[ ${GITHUB_REF} == *alpha* ]]; then
77+
publish --access public --tag alpha
78+
elif [[ ${GITHUB_REF} == *beta* ]]; then
79+
publish --access public --tag beta
80+
else
81+
PKG_NAME=$(node -p "require('./package.json').name")
82+
PKG_VERSION=$(node -p "require('./package.json').version")
83+
CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0")
84+
if npx -y semver "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then
85+
echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})"
86+
publish --access public --tag backport
87+
else
88+
publish --access public
89+
fi
90+
fi

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.0 - 2026-04-22
2+
### Added
3+
* **`Call.subscriptionLimits`** — new optional field exposing the organization's subscription limits (including concurrency limits) at the time of the call.
4+
15
## 1.1.0 - 2026-04-10
26
* The `VapiError` and `VapiTimeoutError` classes now expose an optional `cause` property that carries the original underlying error, making it easier to diagnose root causes of network failures and timeouts. `BasicAuth.username` and `BasicAuth.password` are now optional fields; if both are absent or empty, no `Authorization` header is sent.
37

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vapi-ai/server-sdk",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"private": false,
55
"repository": {
66
"type": "git",

pnpm-lock.yaml

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
5252
{
5353
"X-Fern-Language": "JavaScript",
5454
"X-Fern-SDK-Name": "@vapi-ai/server-sdk",
55-
"X-Fern-SDK-Version": "1.1.0",
56-
"User-Agent": "@vapi-ai/server-sdk/1.1.0",
55+
"X-Fern-SDK-Version": "1.2.0",
56+
"User-Agent": "@vapi-ai/server-sdk/1.2.0",
5757
"X-Fern-Runtime": core.RUNTIME.type,
5858
"X-Fern-Runtime-Version": core.RUNTIME.version,
5959
},

src/api/types/Call.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,6 @@ export interface Call {
155155
schedulePlan?: Vapi.SchedulePlan | undefined;
156156
/** This is the transport of the call. */
157157
transport?: Record<string, unknown> | undefined;
158+
/** These are the subscription limits for the org at the time of the call. Includes concurrency limit information. */
159+
subscriptionLimits?: Vapi.SubscriptionLimits | undefined;
158160
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "1.1.0";
1+
export const SDK_VERSION = "1.2.0";

tests/wire/calls.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3417,6 +3417,7 @@ describe("CallsClient", () => {
34173417
name: "name",
34183418
schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
34193419
transport: { key: "value" },
3420+
subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
34203421
},
34213422
];
34223423

@@ -7726,6 +7727,11 @@ describe("CallsClient", () => {
77267727
transport: {
77277728
key: "value",
77287729
},
7730+
subscriptionLimits: {
7731+
concurrencyBlocked: true,
7732+
concurrencyLimit: 1.1,
7733+
remainingConcurrentCalls: 1.1,
7734+
},
77297735
},
77307736
]);
77317737
});
@@ -11345,6 +11351,7 @@ describe("CallsClient", () => {
1134511351
name: "name",
1134611352
schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
1134711353
transport: { key: "value" },
11354+
subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
1134811355
};
1134911356

1135011357
server
@@ -16027,6 +16034,11 @@ describe("CallsClient", () => {
1602716034
transport: {
1602816035
key: "value",
1602916036
},
16037+
subscriptionLimits: {
16038+
concurrencyBlocked: true,
16039+
concurrencyLimit: 1.1,
16040+
remainingConcurrentCalls: 1.1,
16041+
},
1603016042
});
1603116043
});
1603216044

@@ -19645,6 +19657,7 @@ describe("CallsClient", () => {
1964519657
name: "name",
1964619658
schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
1964719659
transport: { key: "value" },
19660+
subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
1964819661
};
1964919662

1965019663
server.mockEndpoint().get("/call/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
@@ -24322,6 +24335,11 @@ describe("CallsClient", () => {
2432224335
transport: {
2432324336
key: "value",
2432424337
},
24338+
subscriptionLimits: {
24339+
concurrencyBlocked: true,
24340+
concurrencyLimit: 1.1,
24341+
remainingConcurrentCalls: 1.1,
24342+
},
2432524343
});
2432624344
});
2432724345

@@ -27940,6 +27958,7 @@ describe("CallsClient", () => {
2794027958
name: "name",
2794127959
schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
2794227960
transport: { key: "value" },
27961+
subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
2794327962
};
2794427963

2794527964
server
@@ -32624,6 +32643,11 @@ describe("CallsClient", () => {
3262432643
transport: {
3262532644
key: "value",
3262632645
},
32646+
subscriptionLimits: {
32647+
concurrencyBlocked: true,
32648+
concurrencyLimit: 1.1,
32649+
remainingConcurrentCalls: 1.1,
32650+
},
3262732651
});
3262832652
});
3262932653

@@ -36242,6 +36266,7 @@ describe("CallsClient", () => {
3624236266
name: "name",
3624336267
schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
3624436268
transport: { key: "value" },
36269+
subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
3624536270
};
3624636271

3624736272
server
@@ -40926,6 +40951,11 @@ describe("CallsClient", () => {
4092640951
transport: {
4092740952
key: "value",
4092840953
},
40954+
subscriptionLimits: {
40955+
concurrencyBlocked: true,
40956+
concurrencyLimit: 1.1,
40957+
remainingConcurrentCalls: 1.1,
40958+
},
4092940959
});
4093040960
});
4093140961
});

0 commit comments

Comments
 (0)