Skip to content

Commit 2b04fb7

Browse files
SDK regeneration
Unable to analyze changes with AI, incrementing PATCH version.
1 parent 78aa3f8 commit 2b04fb7

54 files changed

Lines changed: 1301 additions & 285 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,28 @@
33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fbeehiiv%2Ftypescript-sdk)
44
[![npm shield](https://img.shields.io/npm/v/@beehiiv/sdk)](https://www.npmjs.com/package/@beehiiv/sdk)
55

6-
The Beehiiv TypeScript library provides convenient access to the Beehiiv API from TypeScript.
6+
The Beehiiv TypeScript library provides convenient access to the Beehiiv APIs from TypeScript.
7+
8+
## Table of Contents
9+
10+
- [Documentation](#documentation)
11+
- [Installation](#installation)
12+
- [Reference](#reference)
13+
- [Usage](#usage)
14+
- [Request and Response Types](#request-and-response-types)
15+
- [Exception Handling](#exception-handling)
16+
- [Advanced](#advanced)
17+
- [Additional Headers](#additional-headers)
18+
- [Retries](#retries)
19+
- [Timeouts](#timeouts)
20+
- [Aborting Requests](#aborting-requests)
21+
- [Access Raw Response Data](#access-raw-response-data)
22+
- [Runtime Compatibility](#runtime-compatibility)
23+
- [Retries](#retries)
24+
- [Timeouts](#timeouts)
25+
- [Runtime Compatiblity](#runtime-compatiblity)
26+
- [Beta Status](#beta-status)
27+
- [Contributing](#contributing)
728

829
## Documentation
930

@@ -37,7 +58,7 @@ await client.automationJourneys.create(
3758
);
3859
```
3960

40-
## Request And Response Types
61+
## Request and Response Types
4162

4263
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
4364
following namespace:

‎changelog.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 0.1.8 - 2025-11-20
2+
* SDK regeneration
3+
* Unable to analyze changes with AI, incrementing PATCH version.
4+

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@beehiiv/sdk",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"private": false,
55
"repository": "github:beehiiv/typescript-sdk",
66
"type": "commonjs",

‎reference.md‎

Lines changed: 231 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ await client.automationJourneys.create(
8989
</dl>
9090
</details>
9191

92-
<details><summary><code>client.automationJourneys.<a href="/src/api/resources/automationJourneys/client/Client.ts">index</a>(publicationId, automationId) -> Beehiiv.AutomationJourneysIndexResponse</code></summary>
92+
<details><summary><code>client.automationJourneys.<a href="/src/api/resources/automationJourneys/client/Client.ts">index</a>(publicationId, automationId, { ...params }) -> Beehiiv.AutomationJourneysIndexResponse</code></summary>
9393
<dl>
9494
<dd>
9595

@@ -152,6 +152,14 @@ await client.automationJourneys.index(
152152
<dl>
153153
<dd>
154154

155+
**request:** `Beehiiv.AutomationJourneysIndexRequest`
156+
157+
</dd>
158+
</dl>
159+
160+
<dl>
161+
<dd>
162+
155163
**requestOptions:** `AutomationJourneys.RequestOptions`
156164

157165
</dd>
@@ -2676,6 +2684,88 @@ await client.segments.recalculate(
26762684
</dl>
26772685
</details>
26782686

2687+
<details><summary><code>client.segments.<a href="/src/api/resources/segments/client/Client.ts">listMembers</a>(publicationId, segmentId, { ...params }) -> Beehiiv.SegmentMembersResponse</code></summary>
2688+
<dl>
2689+
<dd>
2690+
2691+
#### 📝 Description
2692+
2693+
<dl>
2694+
<dd>
2695+
2696+
<dl>
2697+
<dd>
2698+
2699+
List all members in a segment with full subscription data. Each member is returned as a subscription object containing complete subscriber information and their subscription details. Supports optional expansions for stats, custom fields, tags, referrals, and premium tiers. <br><br> **Use this endpoint when you need detailed subscriber information.** If you only need subscriber IDs, use `/segments/{segmentId}/results` for a lighter-weight response.
2700+
2701+
</dd>
2702+
</dl>
2703+
</dd>
2704+
</dl>
2705+
2706+
#### 🔌 Usage
2707+
2708+
<dl>
2709+
<dd>
2710+
2711+
<dl>
2712+
<dd>
2713+
2714+
```typescript
2715+
await client.segments.listMembers(
2716+
"pub_00000000-0000-0000-0000-000000000000",
2717+
"seg_00000000-0000-0000-0000-000000000000",
2718+
);
2719+
```
2720+
2721+
</dd>
2722+
</dl>
2723+
</dd>
2724+
</dl>
2725+
2726+
#### ⚙️ Parameters
2727+
2728+
<dl>
2729+
<dd>
2730+
2731+
<dl>
2732+
<dd>
2733+
2734+
**publicationId:** `Beehiiv.PublicationId` — The prefixed ID of the publication object
2735+
2736+
</dd>
2737+
</dl>
2738+
2739+
<dl>
2740+
<dd>
2741+
2742+
**segmentId:** `Beehiiv.SegmentId` — The prefixed ID of the segment object
2743+
2744+
</dd>
2745+
</dl>
2746+
2747+
<dl>
2748+
<dd>
2749+
2750+
**request:** `Beehiiv.SegmentMembersRequest`
2751+
2752+
</dd>
2753+
</dl>
2754+
2755+
<dl>
2756+
<dd>
2757+
2758+
**requestOptions:** `Segments.RequestOptions`
2759+
2760+
</dd>
2761+
</dl>
2762+
</dd>
2763+
</dl>
2764+
2765+
</dd>
2766+
</dl>
2767+
</details>
2768+
26792769
<details><summary><code>client.segments.<a href="/src/api/resources/segments/client/Client.ts">expandResults</a>(publicationId, segmentId, { ...params }) -> Beehiiv.SegmentsGetResponse</code></summary>
26802770
<dl>
26812771
<dd>
@@ -2688,7 +2778,7 @@ await client.segments.recalculate(
26882778
<dl>
26892779
<dd>
26902780

2691-
List the Subscriber Ids from the most recent calculation of a specific publication.
2781+
List subscriber IDs for a segment. Returns a lightweight array of subscription IDs only, without additional subscriber details. <br><br> **Use this endpoint when you only need subscriber IDs** (e.g., for counting, ID-based lookups, or integrations with external systems). If you need full subscriber details (email, status, custom fields, etc.), use `/segments/{segmentId}/members` instead.
26922782

26932783
</dd>
26942784
</dl>
@@ -4393,6 +4483,88 @@ await client.webhooks.show("pub_00000000-0000-0000-0000-000000000000", "ep_00000
43934483
</dl>
43944484
</details>
43954485

4486+
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">update</a>(publicationId, endpointId, { ...params }) -> Beehiiv.WebhookResponse</code></summary>
4487+
<dl>
4488+
<dd>
4489+
4490+
#### 📝 Description
4491+
4492+
<dl>
4493+
<dd>
4494+
4495+
<dl>
4496+
<dd>
4497+
4498+
Update a webhook subscription for a publication.
4499+
4500+
</dd>
4501+
</dl>
4502+
</dd>
4503+
</dl>
4504+
4505+
#### 🔌 Usage
4506+
4507+
<dl>
4508+
<dd>
4509+
4510+
<dl>
4511+
<dd>
4512+
4513+
```typescript
4514+
await client.webhooks.update("pub_00000000-0000-0000-0000-000000000000", "ep_0000000000000000000000000000", {
4515+
event_types: ["post.sent", "subscription.confirmed"],
4516+
description: "A webhook to receive new posts data and new subscription confirmations.",
4517+
});
4518+
```
4519+
4520+
</dd>
4521+
</dl>
4522+
</dd>
4523+
</dl>
4524+
4525+
#### ⚙️ Parameters
4526+
4527+
<dl>
4528+
<dd>
4529+
4530+
<dl>
4531+
<dd>
4532+
4533+
**publicationId:** `Beehiiv.PublicationId` — The prefixed ID of the publication object
4534+
4535+
</dd>
4536+
</dl>
4537+
4538+
<dl>
4539+
<dd>
4540+
4541+
**endpointId:** `Beehiiv.EndpointId` — The prefixed ID of the webhook object
4542+
4543+
</dd>
4544+
</dl>
4545+
4546+
<dl>
4547+
<dd>
4548+
4549+
**request:** `Beehiiv.UpdateWebhookRequest`
4550+
4551+
</dd>
4552+
</dl>
4553+
4554+
<dl>
4555+
<dd>
4556+
4557+
**requestOptions:** `Webhooks.RequestOptions`
4558+
4559+
</dd>
4560+
</dl>
4561+
</dd>
4562+
</dl>
4563+
4564+
</dd>
4565+
</dl>
4566+
</details>
4567+
43964568
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">delete</a>(publicationId, endpointId) -> Beehiiv.WebhooksDeleteResponse</code></summary>
43974569
<dl>
43984570
<dd>
@@ -4534,3 +4706,60 @@ await client.webhooks.test("pub_00000000-0000-0000-0000-000000000000", "ep_00000
45344706
</dd>
45354707
</dl>
45364708
</details>
4709+
4710+
## Workspaces
4711+
4712+
<details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">identify</a>() -> Beehiiv.WorkspaceIdentifyResponse</code></summary>
4713+
<dl>
4714+
<dd>
4715+
4716+
#### 📝 Description
4717+
4718+
<dl>
4719+
<dd>
4720+
4721+
<dl>
4722+
<dd>
4723+
4724+
Retrieve information about the workspace the OAuth or API token is associated with.
4725+
4726+
</dd>
4727+
</dl>
4728+
</dd>
4729+
</dl>
4730+
4731+
#### 🔌 Usage
4732+
4733+
<dl>
4734+
<dd>
4735+
4736+
<dl>
4737+
<dd>
4738+
4739+
```typescript
4740+
await client.workspaces.identify();
4741+
```
4742+
4743+
</dd>
4744+
</dl>
4745+
</dd>
4746+
</dl>
4747+
4748+
#### ⚙️ Parameters
4749+
4750+
<dl>
4751+
<dd>
4752+
4753+
<dl>
4754+
<dd>
4755+
4756+
**requestOptions:** `Workspaces.RequestOptions`
4757+
4758+
</dd>
4759+
</dl>
4760+
</dd>
4761+
</dl>
4762+
4763+
</dd>
4764+
</dl>
4765+
</details>

‎src/Client.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { Subscriptions } from "./api/resources/subscriptions/client/Client.js";
2020
import { SubscriptionTags } from "./api/resources/subscriptionTags/client/Client.js";
2121
import { Tiers } from "./api/resources/tiers/client/Client.js";
2222
import { Webhooks } from "./api/resources/webhooks/client/Client.js";
23+
import { Workspaces } from "./api/resources/workspaces/client/Client.js";
2324

2425
export declare namespace BeehiivClient {
2526
export interface Options {
@@ -61,6 +62,7 @@ export class BeehiivClient {
6162
protected _subscriptionTags: SubscriptionTags | undefined;
6263
protected _tiers: Tiers | undefined;
6364
protected _webhooks: Webhooks | undefined;
65+
protected _workspaces: Workspaces | undefined;
6466

6567
constructor(_options: BeehiivClient.Options) {
6668
this._options = {
@@ -69,8 +71,8 @@ export class BeehiivClient {
6971
{
7072
"X-Fern-Language": "JavaScript",
7173
"X-Fern-SDK-Name": "@beehiiv/sdk",
72-
"X-Fern-SDK-Version": "0.1.7",
73-
"User-Agent": "@beehiiv/sdk/0.1.7",
74+
"X-Fern-SDK-Version": "0.1.8",
75+
"User-Agent": "@beehiiv/sdk/AUTO",
7476
"X-Fern-Runtime": core.RUNTIME.type,
7577
"X-Fern-Runtime-Version": core.RUNTIME.version,
7678
},
@@ -138,4 +140,8 @@ export class BeehiivClient {
138140
public get webhooks(): Webhooks {
139141
return (this._webhooks ??= new Webhooks(this._options));
140142
}
143+
144+
public get workspaces(): Workspaces {
145+
return (this._workspaces ??= new Workspaces(this._options));
146+
}
141147
}

0 commit comments

Comments
 (0)