Skip to content

Commit bd60c68

Browse files
initial commit of typescript beta
0 parents  commit bd60c68

632 files changed

Lines changed: 41802 additions & 0 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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
wwwroot/*.js
2+
node_modules
3+
typings
4+
dist
5+
.idea/
6+
.openapi-generator
7+
sample/dist

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
## [5.0.0-beta.1] - revision 2023-07-15
5+
### Added
6+
- Types - This is a complete rework of our node sdk to add native type support in package
7+
- ConfigWrapper is now optional
8+
- Pass your api key and optional retry data directly into API objects `new campaignsApi("<YOUR API KEY HERE>")`
9+
- Optional `Klaviyo` scope
10+
- Instead of accessing items apis like `new campaignsApi()` you can also use `new Klaviyo.campaignsApi()` to keep your application organized.

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing
2+
3+
### SDK creation process
4+
5+
This repo is created by a two-step process: first, an OpenAPI Specification (OAS) is generated from the Klaviyo API source code.
6+
You can check out the raw OAS on [GitHub](https://github.com/klaviyo/openapi/blob/main/openapi/stable.json).
7+
Then a modified version of the OpenAPI-Generator typescript node generator is used to create the SDK itself.
8+
This process allows us to have an SDK release ready the same day as new endpoints are added.
9+
10+
### What this means for contributing
11+
12+
Due to the SDK being generated, we won't merge new code without updating the generator.
13+
However, feel free to make a pr against our code, while we won't merge your pull request as is, it's still very helpful for correcting the generator, as we can merge your changes upstream into our private generator.
14+
Some changes will take longer than others to fix, depending on whether the issues are caused by a bug in the SDK generator or in the generated OAS itself.
15+
16+
You can also report bugs by opening an issue in this GitHub repo.
17+
18+
Lastly, if you have any feedback that you would like to share outside of a public forum, feel free to use our [feedback form](https://docs.google.com/forms/d/e/1FAIpQLSckdxPXezeY6SludpOGpJ2nNZU280tEnSwuRnEyx0XNS02zdA/viewform).
19+
20+
### Testing
21+
22+
Our unit tests are set up to hit a specific test account and are not included in this repo,
23+
but if you want to test anything without a consuming app there is an included `sample.ts` file.
24+
You can build the project and then execute the contents of the file with `npm run sample --pk=<your private key here>`

MIGRATION.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Migration
2+
3+
### Steps
4+
- Swap to the new version:
5+
- updating your `package.json` manually to the current beta version
6+
- currently, there are no known breaking changes from moving from the node sdk to the TypeScript Beta sdk
7+
8+
9+
### Work done to make migration easier
10+
- Most current imports should still work.
11+
- ConfigWrapper has been recreated, is now optional, and it now works differently under the hood. However, you can still use it to set a global api key, or pass it into an API constructor
12+
- Optional params should all have the same names, but now they have type support, letting you know which optional params are used on which endpoints
13+
14+
### Known manual migration issues
15+
- We will update this list with any know difference between the current node repo and this beta one.

0 commit comments

Comments
 (0)