Skip to content

Commit

Permalink
11.0.0 (#72)
Browse files Browse the repository at this point in the history
* 11.0.0

* fix file formats
  • Loading branch information
Ian-Montgomery-Klaviyo authored Jul 15, 2024
1 parent 0fababa commit 2b88ce3
Show file tree
Hide file tree
Showing 84 changed files with 3,731 additions and 465 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dist
.idea/
.openapi-generator
sample/dist
test/filterBuilder.integration.test.ts
test/api/
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
# Changelog
All notable changes to this project will be documented in this file.

## [11.0.0] - revision 2024-07-15

### Added

- Forms API
- New `FormsApi` class with methods to get forms, form versions and relationships.
- Webhooks API
- New `WebooksApi` class containing CRUD operations for webhooks.
- FilterBuilder class
- New class to help build filters in the correct format for endpoints that use them.
- See the README for more information and usage examples.

### Changed
- `ProfilesApi.subscribe()`
- added `historical_import` flag for importing historically consented profiles can now be optionally supplied in the payload for the Subscribe Profiles endpoint.
- When using this flag, a `consented_at` date must be provided and must be in the past.


## [10.1.0] - revision 2024-06-15

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

- Flows Api
Expand Down
563 changes: 343 additions & 220 deletions README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This is the entrypoint for the package
export * from './api/apis';
export * from './model/models';
export * from './model/models';
export * from './util/utils'
4 changes: 2 additions & 2 deletions api/accountsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class AccountsApi {
* 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`
* @summary Get Account
* @param id The ID of the account
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-06-15/reference/api-overview#sparse-fieldsets
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
*/
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; }> {

Expand Down Expand Up @@ -128,7 +128,7 @@ export class AccountsApi {
* 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`
* @summary Get Accounts
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-06-15/reference/api-overview#sparse-fieldsets
* @param fieldsAccount For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
*/
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; }> {

Expand Down
14 changes: 11 additions & 3 deletions api/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export * from './eventsApi';
import { EventsApi } from './eventsApi';
export * from './flowsApi';
import { FlowsApi } from './flowsApi';
export * from './formsApi';
import { FormsApi } from './formsApi';
export * from './imagesApi';
import { ImagesApi } from './imagesApi';
export * from './listsApi';
Expand All @@ -29,14 +31,16 @@ export * from './tagsApi';
import { TagsApi } from './tagsApi';
export * from './templatesApi';
import { TemplatesApi } from './templatesApi';
export * from './webhooksApi';
import { WebhooksApi } from './webhooksApi';

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

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

const revision = "2024-06-15";
const userAgent = "klaviyo-api-node/10.1.0";
const revision = "2024-07-15";
const userAgent = "klaviyo-api-node/11.0.0";

export class RetryOptions {

Expand Down Expand Up @@ -492,6 +496,8 @@ export namespace Pkce {

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

export const Forms = new FormsApi(new GlobalApiKeySession())

export const Images = new ImagesApi(new GlobalApiKeySession())

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

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

export const Webhooks = new WebhooksApi(new GlobalApiKeySession())


export const Auth = {
ApiKeySession,
Expand All @@ -520,4 +528,4 @@ export const Auth = {
Pkce,
}

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

0 comments on commit 2b88ce3

Please sign in to comment.