Skip to content

Commit 7c8cb85

Browse files
8.0.0 release (#57)
1 parent 85fb8d8 commit 7c8cb85

203 files changed

Lines changed: 4722 additions & 1080 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.

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [8.0.0] - revision 2024-02-15
5+
6+
### Added:
7+
8+
- New `ReportingApi` allows you to request campaign and flow performance data that you can view in the Klaviyo UI.
9+
10+
- `campaignValuesQuery`
11+
- Request campaign analytics data, for example, a campaign performance report on the open rate over the past 30 days.
12+
13+
- `flowValuesQuery`
14+
- Request flow analytics data, for example, a flow performance report on the revenue per recipient value over the past 3 months.
15+
16+
- `flowSeriesQuery`
17+
- Fetch flow series data for a specific interval and timeframe, for example, a flow performance report on weekly click rates over the past 12 months.
18+
19+
20+
- New `ProfilesApi` endpoint allows you to create or update a profile with a set of profile attributes.
21+
22+
- `createOrUpdateProfile`
23+
- This endpoint operates synchronously and offers an upsert pattern similar to the [v1/v2 Identify API](https://developers.klaviyo.com/en/docs/apis_comparison_chart).
24+
25+
### Changed:
26+
27+
- Removed the $attribution field from event_properties in get_event and get_events (breaking change).
28+
29+
- To include this data in your request, add include=attributions to your request.
30+
31+
432
## [7.2.0] - revision 2023-12-15
533

634
### Added

README.md

Lines changed: 240 additions & 209 deletions
Large diffs are not rendered by default.

api/accountsApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export class AccountsApi {
3838

3939
protected _basePath = defaultBasePath;
4040
protected _defaultHeaders : any = {
41-
revision: "2023-12-15",
42-
"User-Agent": "klaviyo-api-node/7.2.0"
41+
revision: "2024-02-15",
42+
"User-Agent": "klaviyo-api-node/8.0.0"
4343
};
4444
protected _useQuerystring : boolean = false;
4545

@@ -71,7 +71,7 @@ export class AccountsApi {
7171
* 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`
7272
* @summary Get Account
7373
* @param id The ID of the account
74-
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#sparse-fieldsets
74+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets
7575
*/
7676
public async getAccount (id: string, options: { fieldsAccount?: Array<'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'>, } = {}): Promise<{ response: AxiosResponse; body: GetAccountResponse; }> {
7777

@@ -125,7 +125,7 @@ export class AccountsApi {
125125
* 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`
126126
* @summary Get Accounts
127127
128-
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#sparse-fieldsets
128+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets
129129
*/
130130
public async getAccounts (options: { fieldsAccount?: Array<'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'>, } = {}): Promise<{ response: AxiosResponse; body: GetAccountResponseCollection; }> {
131131

api/apis.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export * from './metricsApi';
2121
import { MetricsApi } from './metricsApi';
2222
export * from './profilesApi';
2323
import { ProfilesApi } from './profilesApi';
24+
export * from './reportingApi';
25+
import { ReportingApi } from './reportingApi';
2426
export * from './segmentsApi';
2527
import { SegmentsApi } from './segmentsApi';
2628
export * from './tagsApi';
@@ -185,6 +187,8 @@ export function ConfigWrapper(apiKey: string, opts: {numOfAttempts?: number, tim
185187

186188
export const Profiles = new ProfilesApi(new GlobalApiKeySession())
187189

190+
export const Reporting = new ReportingApi(new GlobalApiKeySession())
191+
188192
export const Segments = new SegmentsApi(new GlobalApiKeySession())
189193

190194
export const Tags = new TagsApi(new GlobalApiKeySession())
@@ -194,4 +198,4 @@ export function ConfigWrapper(apiKey: string, opts: {numOfAttempts?: number, tim
194198

195199
export const Auth = { ApiKeySession, GlobalApiKeySession, GlobalApiKeySettings}
196200

197-
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, SegmentsApi, Segments, TagsApi, Tags, TemplatesApi, Templates };
201+
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 };

0 commit comments

Comments
 (0)