Skip to content

Commit 05791d6

Browse files
8.0.0-beta.1 update (#56)
1 parent 36fafdf commit 05791d6

202 files changed

Lines changed: 4717 additions & 1054 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-beta.1] - 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-beta.1] - 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: 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/v2023-12-15/reference/api-overview#sparse-fieldsets
71+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets
7272
*/
7373
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; }> {
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/v2023-12-15/reference/api-overview#sparse-fieldsets
131+
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets
132132
*/
133133
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; }> {
134134

api/apis.ts

Lines changed: 7 additions & 3 deletions
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';
@@ -33,8 +35,8 @@ import {AxiosRequestConfig, AxiosResponse, AxiosHeaders, isAxiosError} from "axi
3335

3436
export { RequestFile } from '../model/models';
3537

36-
const revision = "2023-12-15";
37-
const userAgent = "klaviyo-api-node/7.2.0-beta.1";
38+
const revision = "2024-02-15";
39+
const userAgent = "klaviyo-api-node/8.0.0-beta.1";
3840

3941
export class RetryOptions {
4042

@@ -498,6 +500,8 @@ export namespace Pkce {
498500

499501
export const Profiles = new ProfilesApi(new GlobalApiKeySession())
500502

503+
export const Reporting = new ReportingApi(new GlobalApiKeySession())
504+
501505
export const Segments = new SegmentsApi(new GlobalApiKeySession())
502506

503507
export const Tags = new TagsApi(new GlobalApiKeySession())
@@ -516,4 +520,4 @@ export const Auth = {
516520
Pkce,
517521
}
518522

519-
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 };
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 };

0 commit comments

Comments
 (0)