Skip to content

Commit 2b88ce3

Browse files
11.0.0 (#72)
* 11.0.0 * fix file formats
1 parent 0fababa commit 2b88ce3

84 files changed

Lines changed: 3731 additions & 465 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ dist
55
.idea/
66
.openapi-generator
77
sample/dist
8-
test/filterBuilder.integration.test.ts
8+
test/api/

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [11.0.0] - revision 2024-07-15
5+
6+
### Added
7+
8+
- Forms API
9+
- New `FormsApi` class with methods to get forms, form versions and relationships.
10+
- Webhooks API
11+
- New `WebooksApi` class containing CRUD operations for webhooks.
12+
- FilterBuilder class
13+
- New class to help build filters in the correct format for endpoints that use them.
14+
- See the README for more information and usage examples.
15+
16+
### Changed
17+
- `ProfilesApi.subscribe()`
18+
- added `historical_import` flag for importing historically consented profiles can now be optionally supplied in the payload for the Subscribe Profiles endpoint.
19+
- When using this flag, a `consented_at` date must be provided and must be in the past.
20+
21+
422
## [10.1.0] - revision 2024-06-15
523

624
### Added
725
- Segments Api
826
- New create segment endpoint `SegmentsApi.createSegment()`.
927
- New delete segment endpoint `SegementsApi.deleteSegment()`.
10-
- Updated exisiting segments endpoints to include the segment definition
28+
- Updated existing segments endpoints to include the segment definition
1129
- For more information, see our [Segments API overview](https://developers.klaviyo.com/en/reference/segments_api_overview).
1230

1331
- Flows Api

README.md

Lines changed: 343 additions & 220 deletions
Large diffs are not rendered by default.

api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// This is the entrypoint for the package
22
export * from './api/apis';
3-
export * from './model/models';
3+
export * from './model/models';
4+
export * from './util/utils'

api/accountsApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class AccountsApi {
6868
* Retrieve a single account object by its account ID. You can only request the account by which the private API key was generated.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m` **Scopes:** `accounts:read`
6969
* @summary Get Account
7070
* @param id The ID of the account
71-
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-06-15/reference/api-overview#sparse-fieldsets
71+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
7272
*/
7373
public async getAccount (id: string, options: { fieldsAccount?: Array<'test_account' | 'contact_information' | 'contact_information.default_sender_name' | 'contact_information.default_sender_email' | 'contact_information.website_url' | 'contact_information.organization_name' | 'contact_information.street_address' | 'contact_information.street_address.address1' | 'contact_information.street_address.address2' | 'contact_information.street_address.city' | 'contact_information.street_address.region' | 'contact_information.street_address.country' | 'contact_information.street_address.zip' | 'industry' | 'timezone' | 'preferred_currency' | 'public_api_key' | 'locale'>, } = {}): Promise<{ response: AxiosResponse; body: GetAccountResponse; }> {
7474

@@ -128,7 +128,7 @@ export class AccountsApi {
128128
* Retrieve the account(s) associated with a given private API key. This will return 1 account object within the array. You can use this to retrieve account-specific data (contact information, timezone, currency, Public API key, etc.) or test if a Private API Key belongs to the correct account prior to performing subsequent actions with the API.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m` **Scopes:** `accounts:read`
129129
* @summary Get Accounts
130130
131-
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-06-15/reference/api-overview#sparse-fieldsets
131+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
132132
*/
133133
public async getAccounts (options: { fieldsAccount?: Array<'test_account' | 'contact_information' | 'contact_information.default_sender_name' | 'contact_information.default_sender_email' | 'contact_information.website_url' | 'contact_information.organization_name' | 'contact_information.street_address' | 'contact_information.street_address.address1' | 'contact_information.street_address.address2' | 'contact_information.street_address.city' | 'contact_information.street_address.region' | 'contact_information.street_address.country' | 'contact_information.street_address.zip' | 'industry' | 'timezone' | 'preferred_currency' | 'public_api_key' | 'locale'>, } = {}): Promise<{ response: AxiosResponse; body: GetAccountResponseCollection; }> {
134134

api/apis.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export * from './eventsApi';
1313
import { EventsApi } from './eventsApi';
1414
export * from './flowsApi';
1515
import { FlowsApi } from './flowsApi';
16+
export * from './formsApi';
17+
import { FormsApi } from './formsApi';
1618
export * from './imagesApi';
1719
import { ImagesApi } from './imagesApi';
1820
export * from './listsApi';
@@ -29,14 +31,16 @@ export * from './tagsApi';
2931
import { TagsApi } from './tagsApi';
3032
export * from './templatesApi';
3133
import { TemplatesApi } from './templatesApi';
34+
export * from './webhooksApi';
35+
import { WebhooksApi } from './webhooksApi';
3236

3337
const axios = require('axios')
3438
import {AxiosRequestConfig, AxiosResponse, AxiosHeaders, isAxiosError} from "axios";
3539

3640
export { RequestFile } from '../model/models';
3741

38-
const revision = "2024-06-15";
39-
const userAgent = "klaviyo-api-node/10.1.0";
42+
const revision = "2024-07-15";
43+
const userAgent = "klaviyo-api-node/11.0.0";
4044

4145
export class RetryOptions {
4246

@@ -492,6 +496,8 @@ export namespace Pkce {
492496

493497
export const Flows = new FlowsApi(new GlobalApiKeySession())
494498

499+
export const Forms = new FormsApi(new GlobalApiKeySession())
500+
495501
export const Images = new ImagesApi(new GlobalApiKeySession())
496502

497503
export const Lists = new ListsApi(new GlobalApiKeySession())
@@ -508,6 +514,8 @@ export namespace Pkce {
508514

509515
export const Templates = new TemplatesApi(new GlobalApiKeySession())
510516

517+
export const Webhooks = new WebhooksApi(new GlobalApiKeySession())
518+
511519

512520
export const Auth = {
513521
ApiKeySession,
@@ -520,4 +528,4 @@ export const Auth = {
520528
Pkce,
521529
}
522530

523-
export const Klaviyo = { Auth, AccountsApi, Accounts, CampaignsApi, Campaigns, CatalogsApi, Catalogs, CouponsApi, Coupons, DataPrivacyApi, DataPrivacy, EventsApi, Events, FlowsApi, Flows, ImagesApi, Images, ListsApi, Lists, MetricsApi, Metrics, ProfilesApi, Profiles, ReportingApi, Reporting, SegmentsApi, Segments, TagsApi, Tags, TemplatesApi, Templates };
531+
export const Klaviyo = { Auth, AccountsApi, Accounts, CampaignsApi, Campaigns, CatalogsApi, Catalogs, CouponsApi, Coupons, DataPrivacyApi, DataPrivacy, EventsApi, Events, FlowsApi, Flows, FormsApi, Forms, ImagesApi, Images, ListsApi, Lists, MetricsApi, Metrics, ProfilesApi, Profiles, ReportingApi, Reporting, SegmentsApi, Segments, TagsApi, Tags, TemplatesApi, Templates, WebhooksApi, Webhooks };

0 commit comments

Comments
 (0)