Developer-friendly & type-safe Typescript SDK specifically catered to leverage [Polar](https://polar.sh) API.
npm install @polar-sh/sdkDeveloper-friendly & type-safe Typescript SDK specifically catered to leverage Polar API.
> [!WARNING]
> Starting version >v0.6.0, we changed our SDK generator. It's not backward compatible with previous versions.
Polar API: Polar HTTP and Webhooks API
Read the docs at https://polar.sh/docs/api-reference
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
``bash`
npm add @polar-sh/sdk
`bash`
pnpm add @polar-sh/sdk
`bash`
bun add @polar-sh/sdk
`bash`
yarn add @polar-sh/sdk
> [!NOTE]
> This package is published with CommonJS and ES Modules (ESM) support.
For supported JavaScript runtimes, please consult RUNTIMES.md.
`typescript
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`
The SDK has built-in support to validate webhook events. Here is an example with Express.js:
`ts
import express, { Request, Response } from "express";
import { validateEvent, WebhookVerificationError } from "@polar-sh/sdk/webhooks";
const app = express();
app.post("/webhook", express.raw({ type: "application/json" }), (req: Request, res: Response) => {
try {
const event = validateEvent(req.body, req.headers, process.env["POLAR_WEBHOOK_SECRET"] ?? "");
// Process the event
res.status(202).send('')
} catch (error) {
if (error instanceof WebhookVerificationError) {
res.status(403).send('')
}
throw error
}
});
`
Available methods
* list - List Benefit Grants
* list - List Benefits
* create - Create Benefit
* get - Get Benefit
* update - Update Benefit
* delete - Delete Benefit
* grants - List Benefit Grants
* list - List Checkout Links
* create - Create Checkout Link
* get - Get Checkout Link
* update - Update Checkout Link
* delete - Delete Checkout Link
* list - List Checkout Sessions
* create - Create Checkout Session
* get - Get Checkout Session
* update - Update Checkout Session
* clientGet - Get Checkout Session from Client
* clientUpdate - Update Checkout Session from Client
* clientConfirm - Confirm Checkout Session from Client
* list - List Custom Fields
* create - Create Custom Field
* get - Get Custom Field
* update - Update Custom Field
* delete - Delete Custom Field
* list - List Customer Meters
* get - Get Customer Meter
* list - List Benefit Grants
* get - Get Benefit Grant
* update - Update Benefit Grant
* list - List Meters
* get - Get Customer Meter
* introspect - Introspect Customer Session
* getAuthenticatedUser - Get Authenticated Portal User
* get - Get Customer
* update - Update Customer
* listPaymentMethods - List Customer Payment Methods
* addPaymentMethod - Add Customer Payment Method
* confirmPaymentMethod - Confirm Customer Payment Method
* deletePaymentMethod - Delete Customer Payment Method
* list - List Downloadables
* list - List License Keys
* get - Get License Key
* validate - Validate License Key
* activate - Activate License Key
* deactivate - Deactivate License Key
* list - List Orders
* get - Get Order
* update - Update Order
* generateInvoice - Generate Order Invoice
* invoice - Get Order Invoice
* getPaymentStatus - Get Order Payment Status
* confirmRetryPayment - Confirm Retry Payment
* get - Get Organization
* listSeats - List Seats
* assignSeat - Assign Seat
* revokeSeat - Revoke Seat
* resendInvitation - Resend Invitation
* listClaimedSubscriptions - List Claimed Subscriptions
* list - List Subscriptions
* get - Get Subscription
* update - Update Subscription
* cancel - Cancel Subscription
* list - List Wallets
* get - Get Wallet
* assignSeat - Assign Seat
* listSeats - List Seats
* revokeSeat - Revoke Seat
* resendInvitation - Resend Invitation
* getClaimInfo - Get Claim Info
* claimSeat - Claim Seat
* create - Create Customer Session
* list - List Customers
* create - Create Customer
* export - Export Customers
* get - Get Customer
* update - Update Customer
* delete - Delete Customer
* getExternal - Get Customer by External ID
* updateExternal - Update Customer by External ID
* deleteExternal - Delete Customer by External ID
* getState - Get Customer State
* getStateExternal - Get Customer State by External ID
* list - List Discounts
* create - Create Discount
* get - Get Discount
* update - Update Discount
* delete - Delete Discount
* list - List Disputes
* get - Get Dispute
* list - List Event Types
* update - Update Event Type
* list - List Events
* listNames - List Event Names
* get - Get Event
* ingest - Ingest Events
* list - List Files
* create - Create File
* uploaded - Complete File Upload
* update - Update File
* delete - Delete File
* list - List License Keys
* get - Get License Key
* update - Update License Key
* getActivation - Get Activation
* validate - Validate License Key
* activate - Activate License Key
* deactivate - Deactivate License Key
* create - Create Member Session
* listMembers - List Members
* createMember - Create Member
* getMember - Get Member
* updateMember - Update Member
* deleteMember - Delete Member
* list - List Meters
* create - Create Meter
* get - Get Meter
* update - Update Meter
* quantities - Get Meter Quantities
* get - Get Metrics
* limits - Get Metrics Limits
* authorize - Authorize
* token - Request Token
* revoke - Revoke Token
* introspect - Introspect Token
* userinfo - Get User Info
#### Oauth2.Clients
* create - Create Client
* get - Get Client
* update - Update Client
* delete - Delete Client
* list - List Orders
* export - Export Subscriptions
* get - Get Order
* update - Update Order
* generateInvoice - Generate Order Invoice
* invoice - Get Order Invoice
* list - List
* create - Create
* update - Update
* delete - Delete
* list - List Organizations
* create - Create Organization
* get - Get Organization
* update - Update Organization
* list - List Payments
* get - Get Payment
* list - List Products
* create - Create Product
* get - Get Product
* update - Update Product
* updateBenefits - Update Product Benefits
* list - List Refunds
* create - Create Refund
* list - List Subscriptions
* create - Create Subscription
* export - Export Subscriptions
* get - Get Subscription
* update - Update Subscription
* revoke - Revoke Subscription
* listWebhookEndpoints - List Webhook Endpoints
* createWebhookEndpoint - Create Webhook Endpoint
* getWebhookEndpoint - Get Webhook Endpoint
* updateWebhookEndpoint - Update Webhook Endpoint
* deleteWebhookEndpoint - Delete Webhook Endpoint
* resetWebhookEndpointSecret - Reset Webhook Endpoint Secret
* listWebhookDeliveries - List Webhook Deliveries
* redeliverWebhookEvent - Redeliver Webhook Event
All the methods listed above are available as standalone functions. These
functions are ideal for use in applications running in the browser, serverless
runtimes or other environments where application bundle size is a primary
concern. When using a bundler to build your application, all unused
functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
- benefitGrantsList - List Benefit Grants
- benefitsCreate - Create Benefit
- benefitsDelete - Delete Benefit
- benefitsGet - Get Benefit
- benefitsGrants - List Benefit Grants
- benefitsList - List Benefits
- benefitsUpdate - Update Benefit
- checkoutLinksCreate - Create Checkout Link
- checkoutLinksDelete - Delete Checkout Link
- checkoutLinksGet - Get Checkout Link
- checkoutLinksList - List Checkout Links
- checkoutLinksUpdate - Update Checkout Link
- checkoutsClientConfirm - Confirm Checkout Session from Client
- checkoutsClientGet - Get Checkout Session from Client
- checkoutsClientUpdate - Update Checkout Session from Client
- checkoutsCreate - Create Checkout Session
- checkoutsGet - Get Checkout Session
- checkoutsList - List Checkout Sessions
- checkoutsUpdate - Update Checkout Session
- customerMetersGet - Get Customer Meter
- customerMetersList - List Customer Meters
- customerPortalBenefitGrantsGet - Get Benefit Grant
- customerPortalBenefitGrantsList - List Benefit Grants
- customerPortalBenefitGrantsUpdate - Update Benefit Grant
- customerPortalCustomerMetersGet - Get Customer Meter
- customerPortalCustomerMetersList - List Meters
- customerPortalCustomersAddPaymentMethod - Add Customer Payment Method
- customerPortalCustomersConfirmPaymentMethod - Confirm Customer Payment Method
- customerPortalCustomersDeletePaymentMethod - Delete Customer Payment Method
- customerPortalCustomerSessionGetAuthenticatedUser - Get Authenticated Portal User
- customerPortalCustomerSessionIntrospect - Introspect Customer Session
- customerPortalCustomersGet - Get Customer
- customerPortalCustomersListPaymentMethods - List Customer Payment Methods
- customerPortalCustomersUpdate - Update Customer
- customerPortalDownloadablesList - List Downloadables
- customerPortalLicenseKeysActivate - Activate License Key
- customerPortalLicenseKeysDeactivate - Deactivate License Key
- customerPortalLicenseKeysGet - Get License Key
- customerPortalLicenseKeysList - List License Keys
- customerPortalLicenseKeysValidate - Validate License Key
- customerPortalOrdersConfirmRetryPayment - Confirm Retry Payment
- customerPortalOrdersGenerateInvoice - Generate Order Invoice
- customerPortalOrdersGet - Get Order
- customerPortalOrdersGetPaymentStatus - Get Order Payment Status
- customerPortalOrdersInvoice - Get Order Invoice
- customerPortalOrdersList - List Orders
- customerPortalOrdersUpdate - Update Order
- customerPortalOrganizationsGet - Get Organization
- customerPortalSeatsAssignSeat - Assign Seat
- customerPortalSeatsListClaimedSubscriptions - List Claimed Subscriptions
- customerPortalSeatsListSeats - List Seats
- customerPortalSeatsResendInvitation - Resend Invitation
- customerPortalSeatsRevokeSeat - Revoke Seat
- customerPortalSubscriptionsCancel - Cancel Subscription
- customerPortalSubscriptionsGet - Get Subscription
- customerPortalSubscriptionsList - List Subscriptions
- customerPortalSubscriptionsUpdate - Update Subscription
- customerPortalWalletsGet - Get Wallet
- customerPortalWalletsList - List Wallets
- customersCreate - Create Customer
- customersDelete - Delete Customer
- customersDeleteExternal - Delete Customer by External ID
- customerSeatsAssignSeat - Assign Seat
- customerSeatsClaimSeat - Claim Seat
- customerSeatsGetClaimInfo - Get Claim Info
- customerSeatsListSeats - List Seats
- customerSeatsResendInvitation - Resend Invitation
- customerSeatsRevokeSeat - Revoke Seat
- customerSessionsCreate - Create Customer Session
- customersExport - Export Customers
- customersGet - Get Customer
- customersGetExternal - Get Customer by External ID
- customersGetState - Get Customer State
- customersGetStateExternal - Get Customer State by External ID
- customersList - List Customers
- customersUpdate - Update Customer
- customersUpdateExternal - Update Customer by External ID
- customFieldsCreate - Create Custom Field
- customFieldsDelete - Delete Custom Field
- customFieldsGet - Get Custom Field
- customFieldsList - List Custom Fields
- customFieldsUpdate - Update Custom Field
- discountsCreate - Create Discount
- discountsDelete - Delete Discount
- discountsGet - Get Discount
- discountsList - List Discounts
- discountsUpdate - Update Discount
- disputesGet - Get Dispute
- disputesList - List Disputes
- eventsGet - Get Event
- eventsIngest - Ingest Events
- eventsList - List Events
- eventsListNames - List Event Names
- eventTypesList - List Event Types
- eventTypesUpdate - Update Event Type
- filesCreate - Create File
- filesDelete - Delete File
- filesList - List Files
- filesUpdate - Update File
- filesUploaded - Complete File Upload
- licenseKeysActivate - Activate License Key
- licenseKeysDeactivate - Deactivate License Key
- licenseKeysGet - Get License Key
- licenseKeysGetActivation - Get Activation
- licenseKeysList - List License Keys
- licenseKeysUpdate - Update License Key
- licenseKeysValidate - Validate License Key
- membersCreateMember - Create Member
- membersDeleteMember - Delete Member
- memberSessionsCreate - Create Member Session
- membersGetMember - Get Member
- membersListMembers - List Members
- membersUpdateMember - Update Member
- metersCreate - Create Meter
- metersGet - Get Meter
- metersList - List Meters
- metersQuantities - Get Meter Quantities
- metersUpdate - Update Meter
- metricsGet - Get Metrics
- metricsLimits - Get Metrics Limits
- oauth2Authorize - Authorize
- oauth2ClientsCreate - Create Client
- oauth2ClientsDelete - Delete Client
- oauth2ClientsGet - Get Client
- oauth2ClientsUpdate - Update Client
- oauth2Introspect - Introspect Token
- oauth2Revoke - Revoke Token
- oauth2Token - Request Token
- oauth2Userinfo - Get User Info
- ordersExport - Export Subscriptions
- ordersGenerateInvoice - Generate Order Invoice
- ordersGet - Get Order
- ordersInvoice - Get Order Invoice
- ordersList - List Orders
- ordersUpdate - Update Order
- organizationAccessTokensCreate - Create
- organizationAccessTokensDelete - Delete
- organizationAccessTokensList - List
- organizationAccessTokensUpdate - Update
- organizationsCreate - Create Organization
- organizationsGet - Get Organization
- organizationsList - List Organizations
- organizationsUpdate - Update Organization
- paymentsGet - Get Payment
- paymentsList - List Payments
- productsCreate - Create Product
- productsGet - Get Product
- productsList - List Products
- productsUpdate - Update Product
- productsUpdateBenefits - Update Product Benefits
- refundsCreate - Create Refund
- refundsList - List Refunds
- subscriptionsCreate - Create Subscription
- subscriptionsExport - Export Subscriptions
- subscriptionsGet - Get Subscription
- subscriptionsList - List Subscriptions
- subscriptionsRevoke - Revoke Subscription
- subscriptionsUpdate - Update Subscription
- webhooksCreateWebhookEndpoint - Create Webhook Endpoint
- webhooksDeleteWebhookEndpoint - Delete Webhook Endpoint
- webhooksGetWebhookEndpoint - Get Webhook Endpoint
- webhooksListWebhookDeliveries - List Webhook Deliveries
- webhooksListWebhookEndpoints - List Webhook Endpoints
- webhooksRedeliverWebhookEvent - Redeliver Webhook Event
- webhooksResetWebhookEndpointSecret - Reset Webhook Endpoint Secret
- webhooksUpdateWebhookEndpoint - Update Webhook Endpoint
Some of the endpoints in this SDK support pagination. To use pagination, you
make your SDK calls as usual, but the returned response object will also be an
async iterable that can be consumed using the [for await...of][for-await-of]
syntax.
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
Here's an example of one such pagination call:
`typescript
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
`typescript
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({}, {
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
for await (const page of result) {
console.log(page);
}
}
run();
`
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
`typescript
import { Polar } from "@polar-sh/sdk";
const polar = new Polar({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`
PolarError is the base class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
| error.message | string | Error message |error.statusCode
| | number | HTTP response status code eg 404 |error.headers
| | Headers | HTTP response headers |error.body
| | string | HTTP body. Can be empty string if no body is returned. |error.rawResponse
| | Response | Raw HTTP response |error.data$
| | | Optional. Some errors may contain structured data. See Error Classes. |
typescript
import { Polar } from "@polar-sh/sdk";
import { HTTPValidationError } from "@polar-sh/sdk/models/errors/httpvalidationerror.js";
import { PolarError } from "@polar-sh/sdk/models/errors/polarerror.js.js";const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
try {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
} catch (error) {
// The base class for HTTP error responses
if (error instanceof PolarError) {
console.log(error.message);
console.log(error.statusCode);
console.log(error.body);
console.log(error.headers);
// Depending on the method different errors may be thrown
if (error instanceof HTTPValidationError) {
console.log(error.data$.detail); // ValidationError[]
}
}
}
}
run();
`$3
Primary errors:
* PolarError: The base class for HTTP error responses.
HTTPValidationError: Validation Error. Status code 422. Less common errors (24)
ConnectionError: HTTP client was unable to make a request to a server.
* RequestTimeoutError: HTTP request timed out due to an AbortSignal signal.
* RequestAbortedError: HTTP request was aborted by the client.
* InvalidRequestError: Any input used to create a request is invalid.
* UnexpectedClientError: Unrecognised or unexpected error.PolarError:
ResourceNotFound: Status code 404. Applicable to 82 of 166 methods.
NotPermitted: Status code 403. Applicable to 10 of 166 methods.
Unauthorized: Not authorized to manage license key. Status code 401. Applicable to 5 of 166 methods.
AlreadyCanceledSubscription: Status code 403. Applicable to 4 of 166 methods.
AlreadyActiveSubscriptionError: The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code 403. Applicable to 3 of 166 methods.
NotOpenCheckout: The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code 403. Applicable to 3 of 166 methods.
PaymentNotReady: The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code 403. Applicable to 3 of 166 methods.
TrialAlreadyRedeemed: The checkout is expired, the customer already has an active subscription, or the organization is not ready to accept payments. Status code 403. Applicable to 3 of 166 methods.
ExpiredCheckoutError: The checkout session is expired. Status code 410. Applicable to 3 of 166 methods.
SubscriptionLocked: Subscription is pending an update. Status code 409. Applicable to 2 of 166 methods.
MissingInvoiceBillingDetails: Order is not paid or is missing billing name or address. Status code 422. Applicable to 2 of 166 methods.
NotPaidOrder: Order is not paid or is missing billing name or address. Status code 422. Applicable to 2 of 166 methods.
PaymentError: The payment failed. Status code 400. Applicable to 1 of 166 methods.
CustomerNotReady: Customer is not ready to confirm a payment method. Status code 400. Applicable to 1 of 166 methods.
PaymentMethodInUseByActiveSubscription: Payment method is used by active subscription(s). Status code 400. Applicable to 1 of 166 methods.
RefundedAlready: Order is already fully refunded. Status code 403. Applicable to 1 of 166 methods.
PaymentAlreadyInProgress: Payment already in progress. Status code 409. Applicable to 1 of 166 methods.
OrderNotEligibleForRetry: Order not eligible for retry or payment confirmation failed. Status code 422. Applicable to 1 of 166 methods.
* ResponseValidationError: Type mismatch between the data returned from the server and the structure expected by the SDK. See error.rawValue for the raw value and error.pretty() for a nicely formatted multi-line string.\* Check the method documentation to see if the error is applicable.
Server Selection
$3
You can override the default server globally by passing a server name to the
server: keyof typeof ServerList optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:| Name | Server | Description |
| ------------ | ------------------------------ | ---------------------- |
|
production | https://api.polar.sh | Production environment |
| sandbox | https://sandbox-api.polar.sh | Sandbox environment |#### Example
`typescript
import { Polar } from "@polar-sh/sdk";const polar = new Polar({
server: "production",
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`$3
The default server can also be overridden globally by passing a URL to the
serverURL: string optional parameter when initializing the SDK client instance. For example:
`typescript
import { Polar } from "@polar-sh/sdk";const polar = new Polar({
serverURL: "https://api.polar.sh",
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`
Custom HTTP Client
The TypeScript SDK makes API calls using an
HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.The
HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.The following example shows how to use the
"beforeRequest" hook to to add a
custom header and a timeout to requests and how to use the "requestError" hook
to log errors:`typescript
import { Polar } from "@polar-sh/sdk";
import { HTTPClient } from "@polar-sh/sdk/lib/http";const httpClient = new HTTPClient({
// fetcher takes a function that has the same signature as native
fetch.
fetcher: (request) => {
return fetch(request);
}
});httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:",
${error});
console.log("Endpoint:", ${request.method} ${request.url});
console.groupEnd();
});const sdk = new Polar({ httpClient: httpClient });
`
Authentication
$3
This SDK supports the following security scheme globally:
| Name | Type | Scheme | Environment Variable |
| ------------- | ---- | ----------- | -------------------- |
|
accessToken | http | HTTP Bearer | POLAR_ACCESS_TOKEN |To authenticate with the API the
accessToken parameter must be set when initializing the SDK client instance. For example:
`typescript
import { Polar } from "@polar-sh/sdk";const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
const result = await polar.organizations.list({});
for await (const page of result) {
console.log(page);
}
}
run();
`$3
Some operations in this SDK require the security scheme to be specified at the request level. For example:
`typescript
import { Polar } from "@polar-sh/sdk";const polar = new Polar();
async function run() {
const result = await polar.customerPortal.benefitGrants.list({}, {});
for await (const page of result) {
console.log(page);
}
}
run();
`
Debugging
You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches
console's interface as an SDK option.> [!WARNING]
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
`typescript
import { Polar } from "@polar-sh/sdk";const sdk = new Polar({ debugLogger: console });
`You can also enable a default debug logger by setting an environment variable
POLAR_DEBUG` to true.This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.