Skip to content

Commit 6eb7935

Browse files
committed
Release 0.1.2
1 parent 9a16da1 commit 6eb7935

File tree

25 files changed

+77
-77
lines changed

25 files changed

+77
-77
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"private": false,
55
"repository": "https://github.com/fern-demo/beehiiv-typescript",
66
"main": "./index.js",

reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ await beehiiv.subscriptions.list("pub_00000000-0000-0000-0000-000000000000", {
626626
</details>
627627

628628

629-
<details><summary> <code>beehiiv.subscriptions.<a href="./src/api/resources/subscriptions/client/Client.ts">post</a>(publicationId, { ...params }) -> Beehiiv.SubscriptionsPostResponse</code> </summary>
629+
<details><summary> <code>beehiiv.subscriptions.<a href="./src/api/resources/subscriptions/client/Client.ts">create</a>(publicationId, { ...params }) -> Beehiiv.SubscriptionsCreateResponse</code> </summary>
630630

631631
<dl>
632632

@@ -663,7 +663,7 @@ Create new subscriptions for a publication.
663663
<dd>
664664

665665
```ts
666-
await beehiiv.subscriptions.post("pub_00000000-0000-0000-0000-000000000000", {
666+
await beehiiv.subscriptions.create("pub_00000000-0000-0000-0000-000000000000", {
667667
email: "bruce.wayne@wayneenterprise.com",
668668
reactivateExisting: false,
669669
sendWelcomeEmail: false,
@@ -713,7 +713,7 @@ await beehiiv.subscriptions.post("pub_00000000-0000-0000-0000-000000000000", {
713713
<dd>
714714

715715

716-
**request: `Beehiiv.SubscriptionsPostRequest`**
716+
**request: `Beehiiv.SubscriptionsCreateRequest`**
717717

718718

719719
</dd>

src/api/resources/automationJourneys/client/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class AutomationJourneys {
5050
Authorization: await this._getAuthorizationHeader(),
5151
"X-Fern-Language": "JavaScript",
5252
"X-Fern-SDK-Name": "",
53-
"X-Fern-SDK-Version": "0.1.1",
53+
"X-Fern-SDK-Version": "0.1.2",
5454
"X-Fern-Runtime": core.RUNTIME.type,
5555
"X-Fern-Runtime-Version": core.RUNTIME.version,
5656
},
@@ -167,7 +167,7 @@ export class AutomationJourneys {
167167
Authorization: await this._getAuthorizationHeader(),
168168
"X-Fern-Language": "JavaScript",
169169
"X-Fern-SDK-Name": "",
170-
"X-Fern-SDK-Version": "0.1.1",
170+
"X-Fern-SDK-Version": "0.1.2",
171171
"X-Fern-Runtime": core.RUNTIME.type,
172172
"X-Fern-Runtime-Version": core.RUNTIME.version,
173173
},

src/api/resources/automations/client/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Automations {
5959
Authorization: await this._getAuthorizationHeader(),
6060
"X-Fern-Language": "JavaScript",
6161
"X-Fern-SDK-Name": "",
62-
"X-Fern-SDK-Version": "0.1.1",
62+
"X-Fern-SDK-Version": "0.1.2",
6363
"X-Fern-Runtime": core.RUNTIME.type,
6464
"X-Fern-Runtime-Version": core.RUNTIME.version,
6565
},
@@ -167,7 +167,7 @@ export class Automations {
167167
Authorization: await this._getAuthorizationHeader(),
168168
"X-Fern-Language": "JavaScript",
169169
"X-Fern-SDK-Name": "",
170-
"X-Fern-SDK-Version": "0.1.1",
170+
"X-Fern-SDK-Version": "0.1.2",
171171
"X-Fern-Runtime": core.RUNTIME.type,
172172
"X-Fern-Runtime-Version": core.RUNTIME.version,
173173
},

src/api/resources/bulkSubscriptionUpdates/client/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class BulkSubscriptionUpdates {
4949
Authorization: await this._getAuthorizationHeader(),
5050
"X-Fern-Language": "JavaScript",
5151
"X-Fern-SDK-Name": "",
52-
"X-Fern-SDK-Version": "0.1.1",
52+
"X-Fern-SDK-Version": "0.1.2",
5353
"X-Fern-Runtime": core.RUNTIME.type,
5454
"X-Fern-Runtime-Version": core.RUNTIME.version,
5555
},
@@ -157,7 +157,7 @@ export class BulkSubscriptionUpdates {
157157
Authorization: await this._getAuthorizationHeader(),
158158
"X-Fern-Language": "JavaScript",
159159
"X-Fern-SDK-Name": "",
160-
"X-Fern-SDK-Version": "0.1.1",
160+
"X-Fern-SDK-Version": "0.1.2",
161161
"X-Fern-Runtime": core.RUNTIME.type,
162162
"X-Fern-Runtime-Version": core.RUNTIME.version,
163163
},

src/api/resources/customFields/client/Client.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class CustomFields {
5050
Authorization: await this._getAuthorizationHeader(),
5151
"X-Fern-Language": "JavaScript",
5252
"X-Fern-SDK-Name": "",
53-
"X-Fern-SDK-Version": "0.1.1",
53+
"X-Fern-SDK-Version": "0.1.2",
5454
"X-Fern-Runtime": core.RUNTIME.type,
5555
"X-Fern-Runtime-Version": core.RUNTIME.version,
5656
},
@@ -161,7 +161,7 @@ export class CustomFields {
161161
Authorization: await this._getAuthorizationHeader(),
162162
"X-Fern-Language": "JavaScript",
163163
"X-Fern-SDK-Name": "",
164-
"X-Fern-SDK-Version": "0.1.1",
164+
"X-Fern-SDK-Version": "0.1.2",
165165
"X-Fern-Runtime": core.RUNTIME.type,
166166
"X-Fern-Runtime-Version": core.RUNTIME.version,
167167
},
@@ -271,7 +271,7 @@ export class CustomFields {
271271
Authorization: await this._getAuthorizationHeader(),
272272
"X-Fern-Language": "JavaScript",
273273
"X-Fern-SDK-Name": "",
274-
"X-Fern-SDK-Version": "0.1.1",
274+
"X-Fern-SDK-Version": "0.1.2",
275275
"X-Fern-Runtime": core.RUNTIME.type,
276276
"X-Fern-Runtime-Version": core.RUNTIME.version,
277277
},
@@ -380,7 +380,7 @@ export class CustomFields {
380380
Authorization: await this._getAuthorizationHeader(),
381381
"X-Fern-Language": "JavaScript",
382382
"X-Fern-SDK-Name": "",
383-
"X-Fern-SDK-Version": "0.1.1",
383+
"X-Fern-SDK-Version": "0.1.2",
384384
"X-Fern-Runtime": core.RUNTIME.type,
385385
"X-Fern-Runtime-Version": core.RUNTIME.version,
386386
},
@@ -489,7 +489,7 @@ export class CustomFields {
489489
Authorization: await this._getAuthorizationHeader(),
490490
"X-Fern-Language": "JavaScript",
491491
"X-Fern-SDK-Name": "",
492-
"X-Fern-SDK-Version": "0.1.1",
492+
"X-Fern-SDK-Version": "0.1.2",
493493
"X-Fern-Runtime": core.RUNTIME.type,
494494
"X-Fern-Runtime-Version": core.RUNTIME.version,
495495
},

src/api/resources/emailBlasts/client/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class EmailBlasts {
7676
Authorization: await this._getAuthorizationHeader(),
7777
"X-Fern-Language": "JavaScript",
7878
"X-Fern-SDK-Name": "",
79-
"X-Fern-SDK-Version": "0.1.1",
79+
"X-Fern-SDK-Version": "0.1.2",
8080
"X-Fern-Runtime": core.RUNTIME.type,
8181
"X-Fern-Runtime-Version": core.RUNTIME.version,
8282
},
@@ -196,7 +196,7 @@ export class EmailBlasts {
196196
Authorization: await this._getAuthorizationHeader(),
197197
"X-Fern-Language": "JavaScript",
198198
"X-Fern-SDK-Name": "",
199-
"X-Fern-SDK-Version": "0.1.1",
199+
"X-Fern-SDK-Version": "0.1.2",
200200
"X-Fern-Runtime": core.RUNTIME.type,
201201
"X-Fern-Runtime-Version": core.RUNTIME.version,
202202
},

src/api/resources/posts/client/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class Posts {
101101
Authorization: await this._getAuthorizationHeader(),
102102
"X-Fern-Language": "JavaScript",
103103
"X-Fern-SDK-Name": "",
104-
"X-Fern-SDK-Version": "0.1.1",
104+
"X-Fern-SDK-Version": "0.1.2",
105105
"X-Fern-Runtime": core.RUNTIME.type,
106106
"X-Fern-Runtime-Version": core.RUNTIME.version,
107107
},
@@ -221,7 +221,7 @@ export class Posts {
221221
Authorization: await this._getAuthorizationHeader(),
222222
"X-Fern-Language": "JavaScript",
223223
"X-Fern-SDK-Name": "",
224-
"X-Fern-SDK-Version": "0.1.1",
224+
"X-Fern-SDK-Version": "0.1.2",
225225
"X-Fern-Runtime": core.RUNTIME.type,
226226
"X-Fern-Runtime-Version": core.RUNTIME.version,
227227
},
@@ -330,7 +330,7 @@ export class Posts {
330330
Authorization: await this._getAuthorizationHeader(),
331331
"X-Fern-Language": "JavaScript",
332332
"X-Fern-SDK-Name": "",
333-
"X-Fern-SDK-Version": "0.1.1",
333+
"X-Fern-SDK-Version": "0.1.2",
334334
"X-Fern-Runtime": core.RUNTIME.type,
335335
"X-Fern-Runtime-Version": core.RUNTIME.version,
336336
},

src/api/resources/publications/client/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class Publications {
7575
Authorization: await this._getAuthorizationHeader(),
7676
"X-Fern-Language": "JavaScript",
7777
"X-Fern-SDK-Name": "",
78-
"X-Fern-SDK-Version": "0.1.1",
78+
"X-Fern-SDK-Version": "0.1.2",
7979
"X-Fern-Runtime": core.RUNTIME.type,
8080
"X-Fern-Runtime-Version": core.RUNTIME.version,
8181
},
@@ -194,7 +194,7 @@ export class Publications {
194194
Authorization: await this._getAuthorizationHeader(),
195195
"X-Fern-Language": "JavaScript",
196196
"X-Fern-SDK-Name": "",
197-
"X-Fern-SDK-Version": "0.1.1",
197+
"X-Fern-SDK-Version": "0.1.2",
198198
"X-Fern-Runtime": core.RUNTIME.type,
199199
"X-Fern-Runtime-Version": core.RUNTIME.version,
200200
},

src/api/resources/referralProgram/client/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class ReferralProgram {
6060
Authorization: await this._getAuthorizationHeader(),
6161
"X-Fern-Language": "JavaScript",
6262
"X-Fern-SDK-Name": "",
63-
"X-Fern-SDK-Version": "0.1.1",
63+
"X-Fern-SDK-Version": "0.1.2",
6464
"X-Fern-Runtime": core.RUNTIME.type,
6565
"X-Fern-Runtime-Version": core.RUNTIME.version,
6666
},

src/api/resources/segments/client/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class Segments {
7676
Authorization: await this._getAuthorizationHeader(),
7777
"X-Fern-Language": "JavaScript",
7878
"X-Fern-SDK-Name": "",
79-
"X-Fern-SDK-Version": "0.1.1",
79+
"X-Fern-SDK-Version": "0.1.2",
8080
"X-Fern-Runtime": core.RUNTIME.type,
8181
"X-Fern-Runtime-Version": core.RUNTIME.version,
8282
},
@@ -196,7 +196,7 @@ export class Segments {
196196
Authorization: await this._getAuthorizationHeader(),
197197
"X-Fern-Language": "JavaScript",
198198
"X-Fern-SDK-Name": "",
199-
"X-Fern-SDK-Version": "0.1.1",
199+
"X-Fern-SDK-Version": "0.1.2",
200200
"X-Fern-Runtime": core.RUNTIME.type,
201201
"X-Fern-Runtime-Version": core.RUNTIME.version,
202202
},
@@ -304,7 +304,7 @@ export class Segments {
304304
Authorization: await this._getAuthorizationHeader(),
305305
"X-Fern-Language": "JavaScript",
306306
"X-Fern-SDK-Name": "",
307-
"X-Fern-SDK-Version": "0.1.1",
307+
"X-Fern-SDK-Version": "0.1.2",
308308
"X-Fern-Runtime": core.RUNTIME.type,
309309
"X-Fern-Runtime-Version": core.RUNTIME.version,
310310
},

src/api/resources/subscriptionTags/client/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class SubscriptionTags {
5353
Authorization: await this._getAuthorizationHeader(),
5454
"X-Fern-Language": "JavaScript",
5555
"X-Fern-SDK-Name": "",
56-
"X-Fern-SDK-Version": "0.1.1",
56+
"X-Fern-SDK-Version": "0.1.2",
5757
"X-Fern-Runtime": core.RUNTIME.type,
5858
"X-Fern-Runtime-Version": core.RUNTIME.version,
5959
},

src/api/resources/subscriptions/client/Client.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class Subscriptions {
9090
Authorization: await this._getAuthorizationHeader(),
9191
"X-Fern-Language": "JavaScript",
9292
"X-Fern-SDK-Name": "",
93-
"X-Fern-SDK-Version": "0.1.1",
93+
"X-Fern-SDK-Version": "0.1.2",
9494
"X-Fern-Runtime": core.RUNTIME.type,
9595
"X-Fern-Runtime-Version": core.RUNTIME.version,
9696
},
@@ -182,7 +182,7 @@ export class Subscriptions {
182182
* @throws {@link Beehiiv.InternalServerError}
183183
*
184184
* @example
185-
* await beehiiv.subscriptions.post("pub_00000000-0000-0000-0000-000000000000", {
185+
* await beehiiv.subscriptions.create("pub_00000000-0000-0000-0000-000000000000", {
186186
* email: "bruce.wayne@wayneenterprise.com",
187187
* reactivateExisting: false,
188188
* sendWelcomeEmail: false,
@@ -200,11 +200,11 @@ export class Subscriptions {
200200
* automationIds: ["aut_00000000-0000-0000-0000-000000000000"]
201201
* })
202202
*/
203-
public async post(
203+
public async create(
204204
publicationId: string,
205-
request: Beehiiv.SubscriptionsPostRequest,
205+
request: Beehiiv.SubscriptionsCreateRequest,
206206
requestOptions?: Subscriptions.RequestOptions
207-
): Promise<Beehiiv.SubscriptionsPostResponse> {
207+
): Promise<Beehiiv.SubscriptionsCreateResponse> {
208208
const { undefined, ..._body } = request;
209209
const _queryParams: Record<string, string | string[] | object | object[]> = {};
210210
if (undefined != null) {
@@ -221,18 +221,18 @@ export class Subscriptions {
221221
Authorization: await this._getAuthorizationHeader(),
222222
"X-Fern-Language": "JavaScript",
223223
"X-Fern-SDK-Name": "",
224-
"X-Fern-SDK-Version": "0.1.1",
224+
"X-Fern-SDK-Version": "0.1.2",
225225
"X-Fern-Runtime": core.RUNTIME.type,
226226
"X-Fern-Runtime-Version": core.RUNTIME.version,
227227
},
228228
contentType: "application/json",
229229
queryParameters: _queryParams,
230-
body: await serializers.SubscriptionsPostRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
230+
body: await serializers.SubscriptionsCreateRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
231231
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
232232
maxRetries: requestOptions?.maxRetries,
233233
});
234234
if (_response.ok) {
235-
return await serializers.SubscriptionsPostResponse.parseOrThrow(_response.body, {
235+
return await serializers.SubscriptionsCreateResponse.parseOrThrow(_response.body, {
236236
unrecognizedObjectKeys: "passthrough",
237237
allowUnrecognizedUnionMembers: true,
238238
allowUnrecognizedEnumValues: true,
@@ -331,7 +331,7 @@ export class Subscriptions {
331331
Authorization: await this._getAuthorizationHeader(),
332332
"X-Fern-Language": "JavaScript",
333333
"X-Fern-SDK-Name": "",
334-
"X-Fern-SDK-Version": "0.1.1",
334+
"X-Fern-SDK-Version": "0.1.2",
335335
"X-Fern-Runtime": core.RUNTIME.type,
336336
"X-Fern-Runtime-Version": core.RUNTIME.version,
337337
},
@@ -440,7 +440,7 @@ export class Subscriptions {
440440
Authorization: await this._getAuthorizationHeader(),
441441
"X-Fern-Language": "JavaScript",
442442
"X-Fern-SDK-Name": "",
443-
"X-Fern-SDK-Version": "0.1.1",
443+
"X-Fern-SDK-Version": "0.1.2",
444444
"X-Fern-Runtime": core.RUNTIME.type,
445445
"X-Fern-Runtime-Version": core.RUNTIME.version,
446446
},
@@ -560,7 +560,7 @@ export class Subscriptions {
560560
Authorization: await this._getAuthorizationHeader(),
561561
"X-Fern-Language": "JavaScript",
562562
"X-Fern-SDK-Name": "",
563-
"X-Fern-SDK-Version": "0.1.1",
563+
"X-Fern-SDK-Version": "0.1.2",
564564
"X-Fern-Runtime": core.RUNTIME.type,
565565
"X-Fern-Runtime-Version": core.RUNTIME.version,
566566
},
@@ -673,7 +673,7 @@ export class Subscriptions {
673673
Authorization: await this._getAuthorizationHeader(),
674674
"X-Fern-Language": "JavaScript",
675675
"X-Fern-SDK-Name": "",
676-
"X-Fern-SDK-Version": "0.1.1",
676+
"X-Fern-SDK-Version": "0.1.2",
677677
"X-Fern-Runtime": core.RUNTIME.type,
678678
"X-Fern-Runtime-Version": core.RUNTIME.version,
679679
},

src/api/resources/subscriptions/client/requests/SubscriptionsPostRequest.ts renamed to src/api/resources/subscriptions/client/requests/SubscriptionsCreateRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import * as Beehiiv from "../../../..";
2424
* automationIds: ["aut_00000000-0000-0000-0000-000000000000"]
2525
* }
2626
*/
27-
export interface SubscriptionsPostRequest {
27+
export interface SubscriptionsCreateRequest {
2828
undefined?: string;
2929
/** The email address of the subscription. */
3030
email: string;
@@ -44,9 +44,9 @@ export interface SubscriptionsPostRequest {
4444
/** The custom fields must already exist for the publication. Any new custom fields here will be discarded. */
4545
customFields?: Beehiiv.CustomFieldValue[];
4646
/** Override publication double-opt settings for this subscription. */
47-
doubleOptOverride?: Beehiiv.SubscriptionsPostRequestDoubleOptOverride;
47+
doubleOptOverride?: Beehiiv.SubscriptionsCreateRequestDoubleOptOverride;
4848
/** The tier for this subscription. */
49-
tier?: Beehiiv.SubscriptionsPostRequestTier;
49+
tier?: Beehiiv.SubscriptionsCreateRequestTier;
5050
/** Enroll the subscriber into automations after their subscription has been created. Requires the automations to have an active *Add by API* trigger. */
5151
automationIds?: string[];
5252
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export { SubscriptionsListRequest } from "./SubscriptionsListRequest";
2-
export { SubscriptionsPostRequest } from "./SubscriptionsPostRequest";
2+
export { SubscriptionsCreateRequest } from "./SubscriptionsCreateRequest";
33
export { SubscriptionsPutRequest } from "./SubscriptionsPutRequest";
44
export { SubscriptionsPatchRequest } from "./SubscriptionsPatchRequest";
55
export { SubscriptionsGetRequest } from "./SubscriptionsGetRequest";

src/api/resources/subscriptions/types/SubscriptionsPostRequestDoubleOptOverride.ts renamed to src/api/resources/subscriptions/types/SubscriptionsCreateRequestDoubleOptOverride.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
/**
66
* Override publication double-opt settings for this subscription.
77
*/
8-
export type SubscriptionsPostRequestDoubleOptOverride = "on" | "off" | "not_set";
8+
export type SubscriptionsCreateRequestDoubleOptOverride = "on" | "off" | "not_set";
99

10-
export const SubscriptionsPostRequestDoubleOptOverride = {
10+
export const SubscriptionsCreateRequestDoubleOptOverride = {
1111
On: "on",
1212
Off: "off",
1313
NotSet: "not_set",

src/api/resources/subscriptions/types/SubscriptionsPostRequestTier.ts renamed to src/api/resources/subscriptions/types/SubscriptionsCreateRequestTier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
/**
66
* The tier for this subscription.
77
*/
8-
export type SubscriptionsPostRequestTier = "free" | "premium";
8+
export type SubscriptionsCreateRequestTier = "free" | "premium";
99

10-
export const SubscriptionsPostRequestTier = {
10+
export const SubscriptionsCreateRequestTier = {
1111
Free: "free",
1212
Premium: "premium",
1313
} as const;

src/api/resources/subscriptions/types/SubscriptionsPostResponse.ts renamed to src/api/resources/subscriptions/types/SubscriptionsCreateResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
import * as Beehiiv from "../../..";
66

7-
export interface SubscriptionsPostResponse {
7+
export interface SubscriptionsCreateResponse {
88
data: Beehiiv.Subscription;
99
}

0 commit comments

Comments
 (0)