├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── config.yml │ └── feature_request.yaml ├── dependabot.yml └── workflows │ ├── build-test.yml │ ├── check-semver.yml │ ├── linting.yml │ ├── publish.yml │ └── release-on-push.yml ├── .gitignore ├── .prettierrc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── UPGRADING.md ├── babel.config.js ├── eslint.config.mjs ├── jest.config.js ├── package.json ├── pnpm-lock.yaml ├── scripts └── update-env-vars.js ├── src ├── __tests__ │ ├── helpers │ │ └── test-client.ts │ ├── internal │ │ ├── logger.test.ts │ │ └── paddle.test.ts │ ├── mocks │ │ ├── notifications │ │ │ ├── address-created.mock.ts │ │ │ ├── address-imported.mock.ts │ │ │ ├── address-updated.mock.ts │ │ │ ├── adjustment-created.mock.ts │ │ │ ├── adjustment-updated.mock.ts │ │ │ ├── business-created.mock.ts │ │ │ ├── business-imported.mock.ts │ │ │ ├── business-updated.mock.ts │ │ │ ├── customer-created.mock.ts │ │ │ ├── customer-imported.mock.ts │ │ │ ├── customer-updated.mock.ts │ │ │ ├── discount-created.mock.ts │ │ │ ├── discount-imported.mock.ts │ │ │ ├── discount-updated.mock.ts │ │ │ ├── invoice-paid.mock.ts │ │ │ ├── payment-method-deleted.mock.ts │ │ │ ├── payment-method-saved.mock.ts │ │ │ ├── payout-created.mock.ts │ │ │ ├── payout-paid.mock.ts │ │ │ ├── price-created.mock.ts │ │ │ ├── price-imported.mock.ts │ │ │ ├── price-updated.mock.ts │ │ │ ├── product-created.mock.ts │ │ │ ├── product-imported.mock.ts │ │ │ ├── product-updated.mock.ts │ │ │ ├── report-created.mock.ts │ │ │ ├── report-updated.mock.ts │ │ │ ├── subscription-activated.mock.ts │ │ │ ├── subscription-canceled.mock.ts │ │ │ ├── subscription-created.mock.ts │ │ │ ├── subscription-imported.mock.ts │ │ │ ├── subscription-past-due.mock.ts │ │ │ ├── subscription-paused.mock.ts │ │ │ ├── subscription-resumed.mock.ts │ │ │ ├── subscription-trialing.mock.ts │ │ │ ├── subscription-updated.mock.ts │ │ │ ├── transaction-billed.mock.ts │ │ │ ├── transaction-canceled.mock.ts │ │ │ ├── transaction-completed.mock.ts │ │ │ ├── transaction-created.mock.ts │ │ │ ├── transaction-paid.mock.ts │ │ │ ├── transaction-past-due.mock.ts │ │ │ ├── transaction-payment-failed.mock.ts │ │ │ ├── transaction-ready.mock.ts │ │ │ ├── transaction-revised.mock.ts │ │ │ └── transaction-updated.mock.ts │ │ └── resources │ │ │ ├── addresses.mock.ts │ │ │ ├── adjustments.mock.ts │ │ │ ├── businesses.mock.ts │ │ │ ├── customer-portal-sessions.mock.ts │ │ │ ├── customers.mock.ts │ │ │ ├── discounts.mock.ts │ │ │ ├── event-types.mock.ts │ │ │ ├── events.mock.ts │ │ │ ├── notification-settings.mock.ts │ │ │ ├── notifications.mock.ts │ │ │ ├── payment-methods.mock.ts │ │ │ ├── prices.mock.ts │ │ │ ├── pricing-preview.mock.ts │ │ │ ├── products.mock.ts │ │ │ ├── reports.mock.ts │ │ │ ├── simulation-run-events.mock.ts │ │ │ ├── simulation-runs.mock.ts │ │ │ ├── simulation-types.mock.ts │ │ │ ├── simulations.mock.ts │ │ │ ├── subscriptions.mock.ts │ │ │ └── transactions.mock.ts │ ├── notifications │ │ ├── notifications-parser.test.ts │ │ ├── webhooks-validator.edge.test.ts │ │ └── webhooks-validator.node.test.ts │ └── resources │ │ ├── addresses.test.ts │ │ ├── adjustments.test.ts │ │ ├── businesses.test.ts │ │ ├── customer-portal-sessions.test.ts │ │ ├── customers.test.ts │ │ ├── discounts.test.ts │ │ ├── event-types.test.ts │ │ ├── events.test.ts │ │ ├── notification-settings.test.ts │ │ ├── notifications.test.ts │ │ ├── payment-methods.test.ts │ │ ├── prices.test.ts │ │ ├── pricing-preview.test.ts │ │ ├── products.test.ts │ │ ├── reports.test.ts │ │ ├── simulation-run-events.test.ts │ │ ├── simulation-runs.test.ts │ │ ├── simulation-types.test.ts │ │ ├── simulations.test.ts │ │ ├── subscriptions.test.ts │ │ └── transactions.test.ts ├── entities │ ├── address │ │ ├── address-collection.ts │ │ ├── address.ts │ │ └── index.ts │ ├── adjustment │ │ ├── adjustment-collection.ts │ │ ├── adjustment-credit-note-pdf.ts │ │ ├── adjustment-item-totals.ts │ │ ├── adjustment-item.ts │ │ ├── adjustment-proration.ts │ │ ├── adjustment-time-period.ts │ │ ├── adjustment.ts │ │ └── index.ts │ ├── business │ │ ├── business-collection.ts │ │ ├── business.ts │ │ ├── contacts.ts │ │ └── index.ts │ ├── customer-portal-session │ │ ├── customer-portal-session.ts │ │ ├── customer-portal-subscription-url.ts │ │ ├── general.ts │ │ ├── index.ts │ │ └── urls.ts │ ├── customer │ │ ├── auth-token.ts │ │ ├── credit-balance.ts │ │ ├── customer-balance.ts │ │ ├── customer-collection.ts │ │ ├── customer.ts │ │ └── index.ts │ ├── discount │ │ ├── discount-collection.ts │ │ ├── discount.ts │ │ └── index.ts │ ├── event-types │ │ ├── event-type.ts │ │ └── index.ts │ ├── events │ │ ├── event-collection.ts │ │ ├── event.ts │ │ └── index.ts │ ├── index.ts │ ├── notification-settings │ │ ├── index.ts │ │ └── notification-settings.ts │ ├── notifications │ │ ├── index.ts │ │ ├── notification-collection.ts │ │ ├── notification-log-collection.ts │ │ ├── notification-log.ts │ │ ├── notification.ts │ │ └── replay-notification.ts │ ├── payment-method │ │ ├── index.ts │ │ ├── payment-method-collection.ts │ │ └── payment-method.ts │ ├── payout │ │ ├── index.ts │ │ └── payout.ts │ ├── price │ │ ├── index.ts │ │ ├── price-collection.ts │ │ ├── price-quantity.ts │ │ └── price.ts │ ├── pricing-preview │ │ ├── index.ts │ │ ├── pricing-preview-details.ts │ │ ├── pricing-preview-discounts.ts │ │ ├── pricing-preview-line-item.ts │ │ └── pricing-preview.ts │ ├── product │ │ ├── index.ts │ │ ├── product-collection.ts │ │ └── product.ts │ ├── report │ │ ├── index.ts │ │ ├── report-collection.ts │ │ ├── report-csv.ts │ │ ├── report-filters.ts │ │ └── report.ts │ ├── shared │ │ ├── adjustment-original-amount.ts │ │ ├── billing-details.ts │ │ ├── chargeback-fee.ts │ │ ├── import-meta.ts │ │ ├── index.ts │ │ ├── money.ts │ │ ├── payment-card.ts │ │ ├── payment-method-details.ts │ │ ├── payout-totals-adjustment.ts │ │ ├── paypal.ts │ │ ├── simulation-event-request.ts │ │ ├── simulation-event-response.ts │ │ ├── tax-rates-used.ts │ │ ├── time-period.ts │ │ ├── total-adjustments.ts │ │ ├── totals.ts │ │ ├── transaction-checkout.ts │ │ ├── transaction-payment-attempt.ts │ │ ├── transaction-payout-totals-adjusted.ts │ │ ├── transaction-payout-totals.ts │ │ ├── transaction-totals-adjusted.ts │ │ ├── transaction-totals.ts │ │ ├── unit-price-override.ts │ │ └── unit-totals.ts │ ├── simulation-run-event │ │ ├── index.ts │ │ ├── simulation-run-event-collection.ts │ │ └── simulation-run-event.ts │ ├── simulation-run │ │ ├── index.ts │ │ ├── simulation-run-collection.ts │ │ └── simulation-run.ts │ ├── simulation-types │ │ ├── index.ts │ │ └── simulation-type.ts │ ├── simulation │ │ ├── index.ts │ │ ├── simulation-collection.ts │ │ ├── simulation-scenario-config │ │ │ ├── index.ts │ │ │ ├── simulation-scenario-config.ts │ │ │ ├── subscription-cancellation-details.ts │ │ │ ├── subscription-cancellation-entities.ts │ │ │ ├── subscription-cancellation-options.ts │ │ │ ├── subscription-creation-details.ts │ │ │ ├── subscription-creation-entities.ts │ │ │ ├── subscription-creation-item.ts │ │ │ ├── subscription-creation-options.ts │ │ │ ├── subscription-pause-details.ts │ │ │ ├── subscription-pause-entities.ts │ │ │ ├── subscription-pause-options.ts │ │ │ ├── subscription-renewal-details.ts │ │ │ ├── subscription-renewal-entities.ts │ │ │ ├── subscription-renewal-options.ts │ │ │ ├── subscription-resume-details.ts │ │ │ ├── subscription-resume-entities.ts │ │ │ └── subscription-resume-options.ts │ │ └── simulation.ts │ ├── subscription │ │ ├── index.ts │ │ ├── next-transaction-adjustment-item.ts │ │ ├── next-transaction-adjustment-preview.ts │ │ ├── next-transaction.ts │ │ ├── subscription-collection.ts │ │ ├── subscription-discount.ts │ │ ├── subscription-item.ts │ │ ├── subscription-management.ts │ │ ├── subscription-preview-summary-result.ts │ │ ├── subscription-preview-update-summary.ts │ │ ├── subscription-preview.ts │ │ ├── subscription-scheduled-change.ts │ │ ├── subscription-time-period.ts │ │ ├── subscription.ts │ │ ├── transaction-details-preview.ts │ │ └── transaction-line-item-preview.ts │ └── transaction │ │ ├── address-preview.ts │ │ ├── adjustment-totals-breakdown.ts │ │ ├── adjustment-totals.ts │ │ ├── index.ts │ │ ├── proration.ts │ │ ├── transaction-adjustment-item.ts │ │ ├── transaction-adjustment.ts │ │ ├── transaction-collection.ts │ │ ├── transaction-details.ts │ │ ├── transaction-invoice-pdf.ts │ │ ├── transaction-item-preview.ts │ │ ├── transaction-item.ts │ │ ├── transaction-line-item.ts │ │ ├── transaction-preview.ts │ │ ├── transaction-proration.ts │ │ ├── transaction.ts │ │ └── transactions-time-period.ts ├── enums │ ├── adjustment │ │ ├── adjustment-action-type.ts │ │ ├── adjustment-action.ts │ │ ├── adjustment-currency-code.ts │ │ ├── adjustment-status.ts │ │ ├── adjustment-tax-mode.ts │ │ ├── adjustment-type.ts │ │ └── index.ts │ ├── discount │ │ ├── discount-status.ts │ │ ├── discount-type.ts │ │ └── index.ts │ ├── index.ts │ ├── notification-settings │ │ ├── index.ts │ │ ├── notification-settings-type.ts │ │ └── traffic-source.ts │ ├── notification │ │ ├── index.ts │ │ ├── notification-status.ts │ │ └── origin.ts │ ├── payment-method │ │ ├── deletion-reason.ts │ │ ├── index.ts │ │ ├── origin.ts │ │ └── type.ts │ ├── payout │ │ ├── index.ts │ │ └── payout-status.ts │ ├── report │ │ ├── index.ts │ │ ├── report-filter-name.ts │ │ ├── report-filter-operator.ts │ │ ├── report-status.ts │ │ └── report-type.ts │ ├── shared │ │ ├── available-payment-methods.ts │ │ ├── catalog-type.ts │ │ ├── collection-mode.ts │ │ ├── country-code.ts │ │ ├── currency-code.ts │ │ ├── disposition.ts │ │ ├── error-code.ts │ │ ├── index.ts │ │ ├── interval.ts │ │ ├── payment-attempt-status.ts │ │ ├── payment-type.ts │ │ ├── payout-currency-code.ts │ │ ├── status.ts │ │ ├── tax-category.ts │ │ ├── tax-mode.ts │ │ ├── transaction-origin.ts │ │ └── transaction-status.ts │ ├── simulation-run-event │ │ ├── index.ts │ │ └── simulation-run-event-status.ts │ ├── simulation-run │ │ ├── index.ts │ │ └── simulation-run-status.ts │ ├── simulation-type │ │ ├── index.ts │ │ └── simulation-kind.ts │ ├── simulation │ │ ├── index.ts │ │ └── simulation-scenario-type.ts │ ├── subscription │ │ ├── index.ts │ │ ├── proration-billing-mode.ts │ │ ├── scheduled-change-action.ts │ │ ├── subscription-effective-from.ts │ │ ├── subscription-item-status.ts │ │ ├── subscription-on-payment-failure.ts │ │ ├── subscription-on-resume.ts │ │ └── subscription-status.ts │ └── transaction │ │ ├── index.ts │ │ └── payment-card-type.ts ├── index.cjs.edge.ts ├── index.cjs.node.ts ├── index.esm.edge.ts ├── index.esm.node.ts ├── internal │ ├── api │ │ ├── case-helpers.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── environment.ts │ │ ├── index.ts │ │ └── log-level.ts │ ├── base │ │ ├── base-resource.ts │ │ ├── collection.ts │ │ ├── index.ts │ │ ├── logger.ts │ │ ├── path-parameters.ts │ │ ├── query-parameters.ts │ │ └── transform.ts │ ├── errors │ │ └── generic.ts │ ├── index.ts │ ├── providers │ │ ├── crypto │ │ │ ├── crypto-provider.ts │ │ │ ├── edge-crypto.ts │ │ │ └── node-crypto.ts │ │ ├── runtime-provider.ts │ │ └── runtime │ │ │ ├── edge-runtime.ts │ │ │ └── node-runtime.ts │ └── types │ │ ├── config.ts │ │ └── response.ts ├── notifications │ ├── entities │ │ ├── address │ │ │ ├── address-notification.ts │ │ │ └── index.ts │ │ ├── adjustment │ │ │ ├── adjustment-item-notification.ts │ │ │ ├── adjustment-item-totals-notification.ts │ │ │ ├── adjustment-notification.ts │ │ │ ├── adjustment-proration-notification.ts │ │ │ ├── adjustment-time-period-notification.ts │ │ │ └── index.ts │ │ ├── business │ │ │ ├── business-notification.ts │ │ │ ├── contacts-notification.ts │ │ │ └── index.ts │ │ ├── customer │ │ │ ├── customer-notification.ts │ │ │ └── index.ts │ │ ├── discount │ │ │ ├── discount-notification.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── payment-method │ │ │ ├── index.ts │ │ │ ├── payment-method-deleted-notification.ts │ │ │ └── payment-method-notification.ts │ │ ├── payout │ │ │ ├── index.ts │ │ │ └── payout-notification.ts │ │ ├── price │ │ │ ├── index.ts │ │ │ ├── price-notification.ts │ │ │ └── price-quantity-notification.ts │ │ ├── product │ │ │ ├── index.ts │ │ │ └── product-notification.ts │ │ ├── report │ │ │ ├── index.ts │ │ │ ├── report-filters-notification.ts │ │ │ └── report-notification.ts │ │ ├── shared │ │ │ ├── adjustment-original-amount-notification.ts │ │ │ ├── billing-details-notification.ts │ │ │ ├── chargeback-fee-notification.ts │ │ │ ├── import-meta-notification.ts │ │ │ ├── index.ts │ │ │ ├── money-notification.ts │ │ │ ├── payment-card-notification.ts │ │ │ ├── payment-method-details-notification.ts │ │ │ ├── payout-totals-adjustment-notification.ts │ │ │ ├── tax-rates-used-notification.ts │ │ │ ├── time-period-notification.ts │ │ │ ├── total-adjustments-notification.ts │ │ │ ├── totals-notification.ts │ │ │ ├── transaction-checkout-notification.ts │ │ │ ├── transaction-payment-attempt-notification.ts │ │ │ ├── transaction-payout-totals-adjusted-notification.ts │ │ │ ├── transaction-payout-totals-notification.ts │ │ │ ├── transaction-totals-adjusted-notification.ts │ │ │ ├── transaction-totals-notification.ts │ │ │ ├── unit-price-override-notification.ts │ │ │ └── unit-totals-notification.ts │ │ ├── subscription │ │ │ ├── index.ts │ │ │ ├── subscription-created-notification.ts │ │ │ ├── subscription-discount-notification.ts │ │ │ ├── subscription-item-notification.ts │ │ │ ├── subscription-notification.ts │ │ │ ├── subscription-price-notification.ts │ │ │ ├── subscription-scheduled-change-notification.ts │ │ │ └── subscription-time-period-notification.ts │ │ └── transaction │ │ │ ├── index.ts │ │ │ ├── transaction-details-notification.ts │ │ │ ├── transaction-item-notification.ts │ │ │ ├── transaction-line-item-notification.ts │ │ │ ├── transaction-notification.ts │ │ │ ├── transaction-proration-notification.ts │ │ │ └── transactions-time-period-notification.ts │ ├── events │ │ ├── address │ │ │ ├── address-created-event.ts │ │ │ ├── address-imported-event.ts │ │ │ ├── address-updated-event.ts │ │ │ └── index.ts │ │ ├── adjustment │ │ │ ├── adjustment-created-event.ts │ │ │ ├── adjustment-updated-event.ts │ │ │ └── index.ts │ │ ├── business │ │ │ ├── business-created-event.ts │ │ │ ├── business-imported-event.ts │ │ │ ├── business-updated-event.ts │ │ │ └── index.ts │ │ ├── customer │ │ │ ├── customer-created-event.ts │ │ │ ├── customer-imported-event.ts │ │ │ ├── customer-updated-event.ts │ │ │ └── index.ts │ │ ├── discount │ │ │ ├── discount-created-event.ts │ │ │ ├── discount-imported-event.ts │ │ │ ├── discount-updated-event.ts │ │ │ └── index.ts │ │ ├── generic │ │ │ ├── generic-event.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── payment-method │ │ │ ├── index.ts │ │ │ ├── payment-method-deleted-event.ts │ │ │ └── payment-method-saved-event.ts │ │ ├── payout │ │ │ ├── index.ts │ │ │ ├── payout-created-event.ts │ │ │ └── payout-paid-event.ts │ │ ├── price │ │ │ ├── index.ts │ │ │ ├── price-created-event.ts │ │ │ ├── price-imported-event.ts │ │ │ └── price-updated-event.ts │ │ ├── product │ │ │ ├── index.ts │ │ │ ├── product-created-event.ts │ │ │ ├── product-imported-event.ts │ │ │ └── product-updated-event.ts │ │ ├── report │ │ │ ├── index.ts │ │ │ ├── report-created-event.ts │ │ │ └── report-updated-event.ts │ │ ├── subscription │ │ │ ├── index.ts │ │ │ ├── subscription-activated-event.ts │ │ │ ├── subscription-canceled-event.ts │ │ │ ├── subscription-created-event.ts │ │ │ ├── subscription-imported-event.ts │ │ │ ├── subscription-past-due-event.ts │ │ │ ├── subscription-paused-event.ts │ │ │ ├── subscription-resumed-event.ts │ │ │ ├── subscription-trialing-event.ts │ │ │ └── subscription-updated-event.ts │ │ └── transaction │ │ │ ├── index.ts │ │ │ ├── transaction-billed-event.ts │ │ │ ├── transaction-canceled-event.ts │ │ │ ├── transaction-completed-event.ts │ │ │ ├── transaction-created-event.ts │ │ │ ├── transaction-paid-event.ts │ │ │ ├── transaction-past-due-event.ts │ │ │ ├── transaction-payment-failed-event.ts │ │ │ ├── transaction-ready-event.ts │ │ │ ├── transaction-revised-event.ts │ │ │ └── transaction-updated-event.ts │ ├── helpers │ │ ├── index.ts │ │ ├── types.ts │ │ ├── webhooks-validator.ts │ │ └── webhooks.ts │ ├── index.ts │ └── types │ │ ├── address │ │ ├── address-notification-response.ts │ │ └── index.ts │ │ ├── adjustment │ │ ├── adjustment-item-notification-response.ts │ │ ├── adjustment-notification-response.ts │ │ ├── adjustment-totals-breakdown-notification.ts │ │ ├── adjustment-totals-notification-response.ts │ │ ├── adjustments-proration-notification-response.ts │ │ ├── adjustments-time-period-notification-response.ts │ │ └── index.ts │ │ ├── business │ │ ├── business-notification-response.ts │ │ ├── businesses-contacts-notification.ts │ │ └── index.ts │ │ ├── customer │ │ ├── customer-notification-response.ts │ │ └── index.ts │ │ ├── discount │ │ ├── discount-notification-response.ts │ │ └── index.ts │ │ ├── index.ts │ │ ├── payment-method │ │ ├── index.ts │ │ ├── payment-method-deleted-notification-response.ts │ │ └── payment-method-notification-response.ts │ │ ├── payout │ │ ├── index.ts │ │ └── payout-notification-response.ts │ │ ├── price │ │ ├── index.ts │ │ ├── price-notification-response.ts │ │ └── price-quantity-notification.ts │ │ ├── product │ │ ├── index.ts │ │ └── product-notification-response.ts │ │ ├── report │ │ ├── index.ts │ │ ├── report-filters-notification-response.ts │ │ └── report-notification-response.ts │ │ ├── shared │ │ ├── adjustment-original-amount-notification-response.ts │ │ ├── billing-details-notification-response.ts │ │ ├── chargeback-fee.ts │ │ ├── import-meta-notification-response.ts │ │ ├── index.ts │ │ ├── money-notification-response.ts │ │ ├── payment-card-notification-response.ts │ │ ├── payment-method-details.ts │ │ ├── payout-totals-adjustment-notification-response.ts │ │ ├── shared-price-notification-response.ts │ │ ├── shared-product-notification-response.ts │ │ ├── tax-rates-used-notification-response.ts │ │ ├── time-period-notification.ts │ │ ├── total-adjustments-notification-response.ts │ │ ├── totals.ts │ │ ├── transaction-checkout-notification.ts │ │ ├── transaction-payment-attempt-notification-response.ts │ │ ├── transaction-payout-totals-adjusted-notification-response.ts │ │ ├── transaction-payout-totals-notification-response.ts │ │ ├── transaction-totals-adjusted-notification-response.ts │ │ ├── transaction-totals-notification-response.ts │ │ ├── unit-price-override-notification-response.ts │ │ └── unit-totals.ts │ │ ├── subscription │ │ ├── index.ts │ │ ├── subscription-created-notification-response.ts │ │ ├── subscription-discount-notification-response.ts │ │ ├── subscription-item-notification-response.ts │ │ ├── subscription-notification-response.ts │ │ ├── subscription-price-notification-response.ts │ │ ├── subscription-scheduled-change-notification-response.ts │ │ └── subscription-time-period-notification-response.ts │ │ └── transaction │ │ ├── index.ts │ │ ├── transaction-details-notification-response.ts │ │ ├── transaction-item-notification-response.ts │ │ ├── transaction-line-item-notification-response.ts │ │ ├── transaction-notification-response.ts │ │ ├── transaction-proration-notification-response.ts │ │ └── transactions-time-period-notification-response.ts ├── paddle.ts ├── resources │ ├── addresses │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-address-request-body.ts │ │ │ ├── index.ts │ │ │ ├── list-address-query-parameters.ts │ │ │ └── update-address-request-body.ts │ ├── adjustments │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-adjustment-request-body.ts │ │ │ ├── get-adjustment-credit-note-query-parameters.ts │ │ │ ├── index.ts │ │ │ └── list-adjustment-query-parameters.ts │ ├── businesses │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-business-request-body.ts │ │ │ ├── index.ts │ │ │ ├── list-business-query-parameters.ts │ │ │ └── update-business-request-body.ts │ ├── customer-portal-sessions │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-customer-portal-session-request-object.ts │ │ │ └── index.ts │ ├── customers │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-customer-request-body.ts │ │ │ ├── get-credit-balance-query-parameters.ts │ │ │ ├── index.ts │ │ │ ├── list-customer-query-parameters.ts │ │ │ └── update-customer-request-body.ts │ ├── discounts │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-discount-request-body.ts │ │ │ ├── index.ts │ │ │ ├── list-discount-query-parameters.ts │ │ │ └── update-discount-request-body.ts │ ├── event-types │ │ └── index.ts │ ├── events │ │ ├── index.ts │ │ └── operations │ │ │ ├── index.ts │ │ │ └── list-events-query-parameters.ts │ ├── index.ts │ ├── notification-settings │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-notification-settings-request-body.ts │ │ │ ├── index.ts │ │ │ ├── list-notification-settings-query-parameters.ts │ │ │ └── update-notification-settings-request-body.ts │ ├── notifications │ │ ├── index.ts │ │ └── operations │ │ │ ├── index.ts │ │ │ ├── list-notification-log-query-parameters.ts │ │ │ └── list-notification-query-parameters.ts │ ├── payment-methods │ │ ├── index.ts │ │ └── operations │ │ │ ├── index.ts │ │ │ └── list-customer-payment-method-query-parameters.ts │ ├── prices │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-price-request-body.ts │ │ │ ├── get-price-query-parameters.ts │ │ │ ├── index.ts │ │ │ ├── list-price-query-parameters.ts │ │ │ └── update-price-request-body.ts │ ├── pricing-preview │ │ ├── index.ts │ │ └── operations │ │ │ ├── index.ts │ │ │ └── pricing-preview-request-body.ts │ ├── products │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-product-request-body.ts │ │ │ ├── get-product-query-parameters.ts │ │ │ ├── index.ts │ │ │ ├── list-product-query-parameters.ts │ │ │ └── update-product-request-body.ts │ ├── reports │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-report-request-object.ts │ │ │ ├── index.ts │ │ │ └── list-report-query-parameters.ts │ ├── simulation-run-events │ │ ├── index.ts │ │ └── operations │ │ │ ├── index.ts │ │ │ └── list-simulation-run-events-query-parameters.ts │ ├── simulation-runs │ │ ├── index.ts │ │ └── operations │ │ │ ├── get-simulation-run-query-parameters.ts │ │ │ ├── index.ts │ │ │ └── list-simulation-run-query-parameters.ts │ ├── simulation-types │ │ └── index.ts │ ├── simulations │ │ ├── index.ts │ │ └── operations │ │ │ ├── create-simulation-request-body.ts │ │ │ ├── index.ts │ │ │ ├── list-simulation-query-parameters.ts │ │ │ └── update-simulation-request-body.ts │ ├── subscriptions │ │ ├── index.ts │ │ └── operations │ │ │ ├── cancel-subscription-request-object.ts │ │ │ ├── create-subscription-charge-request-object.ts │ │ │ ├── get-subscription-query-parameters.ts │ │ │ ├── index.ts │ │ │ ├── list-subscription-query-parameters.ts │ │ │ ├── pause-subscription-request-object.ts │ │ │ ├── resume-subscription-request-object.ts │ │ │ └── update-subscription-request-body.ts │ └── transactions │ │ ├── index.ts │ │ └── operations │ │ ├── create-transaction-query-parameters.ts │ │ ├── create-transaction-request-body.ts │ │ ├── get-transaction-invoice-pdf-query-parameters.ts │ │ ├── get-transaction-query-parameters.ts │ │ ├── index.ts │ │ ├── list-transaction-query-parameters.ts │ │ ├── revise-transaction-request-body.ts │ │ ├── transaction-preview-request-body.ts │ │ ├── update-transaction-query-parameters.ts │ │ └── update-transaction-request-body.ts └── types │ ├── address │ ├── address-response.ts │ └── index.ts │ ├── adjustment │ ├── adjustment-credit-note-pdf.ts │ ├── adjustment-item-response.ts │ ├── adjustment-response.ts │ ├── adjustments-proration-response.ts │ ├── adjustments-time-period-response.ts │ └── index.ts │ ├── business │ ├── business-response.ts │ ├── businesses-contacts.ts │ └── index.ts │ ├── customer-portal-session │ ├── customer-portal-session-response.ts │ ├── customer-portal-subscription-url.ts │ ├── general.ts │ ├── index.ts │ └── urls.ts │ ├── customer │ ├── auth-token-response.ts │ ├── credit-balance-response.ts │ ├── customer-balance.ts │ ├── customer-response.ts │ └── index.ts │ ├── discount │ ├── discount-response.ts │ └── index.ts │ ├── event-types │ ├── event-type-response.ts │ └── index.ts │ ├── events │ ├── events-response.ts │ └── index.ts │ ├── index.ts │ ├── notification-settings │ ├── index.ts │ └── notification-settings-response.ts │ ├── notifications │ ├── index.ts │ ├── notification-log.ts │ ├── notification.ts │ └── replay-notification.ts │ ├── payment-method │ ├── index.ts │ └── payment-method.ts │ ├── payout │ ├── index.ts │ └── payout-response.ts │ ├── price │ ├── index.ts │ ├── non-catalog-price-request.ts │ ├── price-response.ts │ └── subscription-non-catalog-price-request.ts │ ├── pricing-preview │ ├── index.ts │ ├── pricing-preview-details-response.ts │ ├── pricing-preview-discounts-response.ts │ ├── pricing-preview-item-response.ts │ ├── pricing-preview-line-item-response.ts │ └── pricing-preview-response.ts │ ├── product │ ├── index.ts │ └── product-response.ts │ ├── report │ ├── index.ts │ ├── report-filters.ts │ ├── report.ts │ └── reports-csv.ts │ ├── shared │ ├── adjustment-item-totals.ts │ ├── adjustment-original-amount-response.ts │ ├── billing-details-create.ts │ ├── billing-details-response.ts │ ├── billing-details-update.ts │ ├── chargeback-fee.ts │ ├── custom-data.ts │ ├── import-meta-response.ts │ ├── index.ts │ ├── money-response.ts │ ├── money.ts │ ├── payment-card-response.ts │ ├── payment-method-details.ts │ ├── payout-totals-adjustment-response.ts │ ├── paypal.ts │ ├── price-quantity.ts │ ├── simulation-event-request.ts │ ├── simulation-event-response.ts │ ├── simulation-payload.ts │ ├── tax-rates-used-response.ts │ ├── time-period.ts │ ├── total-adjustments-response.ts │ ├── totals.ts │ ├── transaction-checkout.ts │ ├── transaction-details-preview-response.ts │ ├── transaction-line-item-preview-response.ts │ ├── transaction-payment-attempt-response.ts │ ├── transaction-payout-totals-adjusted-response.ts │ ├── transaction-payout-totals-response.ts │ ├── transaction-totals-adjusted-response.ts │ ├── transaction-totals-response.ts │ ├── unit-price-override-response.ts │ ├── unit-price-override.ts │ └── unit-totals.ts │ ├── simulation-run-event │ ├── index.ts │ └── simulation-run-event-response.ts │ ├── simulation-run │ ├── index.ts │ └── simulation-run-response.ts │ ├── simulation-type │ ├── index.ts │ └── simulation-type.ts │ ├── simulation │ ├── index.ts │ ├── simulation-response.ts │ └── simulation-scenario-config.ts │ ├── subscription │ ├── index.ts │ ├── next-transaction-response.ts │ ├── subscription-discount-response.ts │ ├── subscription-item-response.ts │ ├── subscription-management-response.ts │ ├── subscription-preview-response.ts │ ├── subscription-preview-update-summary.ts │ ├── subscription-response.ts │ ├── subscription-result-response.ts │ ├── subscription-scheduled-change-response.ts │ ├── subscription-time-period-response.ts │ ├── subscription-update-item.ts │ └── subscription-update-non-catalog-price-request.ts │ └── transaction │ ├── adjustment-totals-breakdown.ts │ ├── adjustment-totals-response.ts │ ├── index.ts │ ├── transaction-adjustment-item-response.ts │ ├── transaction-adjustment-response.ts │ ├── transaction-details-response.ts │ ├── transaction-invoice-pdf.ts │ ├── transaction-item-response.ts │ ├── transaction-item.ts │ ├── transaction-line-item-response.ts │ ├── transaction-preview-item.ts │ ├── transaction-preview-response.ts │ ├── transaction-proration-response.ts │ ├── transaction-response.ts │ ├── transactions-time-period-response.ts │ └── transactions-time-period.ts ├── tsconfig.base.json ├── tsconfig.cjs.json ├── tsconfig.esm.json └── tsconfig.types.json /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @PaddleHQ/developer-experience -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Get help 4 | url: https://developer.paddle.com/ 5 | about: For help with the Paddle Node.js SDK or building your integration, contact our support team at [sellers@paddle.com](mailto:sellers@paddle.com). 6 | - name: Report a vulnerability 7 | url: https://vdp.paddle.com/p/Report-a-Vulnerability 8 | about: Please see the [Paddle Vulnerability Disclosure Policy](https://www.paddle.com/vulnerability-disclosure-policy) and report any vulnerabilities using https://vdp.paddle.com/p/Report-a-Vulnerability. 9 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: / 5 | labels: 6 | - dependencies 7 | - javascript 8 | - norelease 9 | schedule: 10 | interval: "weekly" 11 | day: "monday" 12 | time: "08:00" 13 | groups: 14 | npm: 15 | patterns: 16 | - "*" 17 | -------------------------------------------------------------------------------- /.github/workflows/check-semver.yml: -------------------------------------------------------------------------------- 1 | name: Label Checker 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - opened 7 | - synchronize 8 | - reopened 9 | - labeled 10 | - unlabeled 11 | 12 | jobs: 13 | check_labels: 14 | name: Check labels 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: docker://agilepathway/pull-request-label-checker:v1.6.13 18 | with: 19 | one_of: norelease,release:major,release:minor,release:patch 20 | repo_token: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/release-on-push.yml: -------------------------------------------------------------------------------- 1 | name: Release on Push 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - v1.x 8 | 9 | jobs: 10 | release_on_push: 11 | runs-on: ubuntu-latest 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | steps: 15 | - uses: rymndhng/release-on-push-action@aebba2bbce07a9474bf95e8710e5ee8a9e922fe2 # v0.28.0 16 | with: 17 | bump_version_scheme: norelease 18 | use_github_release_notes: true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | *.pem 17 | .idea 18 | 19 | # debug 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | # local env files 25 | .env 26 | .env.local 27 | .env.development.local 28 | .env.test.local 29 | .env.production.local 30 | src/version.ts 31 | # Sentry 32 | .sentryclirc 33 | 34 | *.tsbuildinfo 35 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": true, 4 | "tabWidth": 2, 5 | "printWidth": 120, 6 | "trailingComma": "all", 7 | "bracketSpacing": true, 8 | } 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | If you've spotted a problem with this package or have a new feature request please open an issue. 4 | 5 | For help with the Paddle API or building your integration, contact our support team at [sellers@paddle.com](mailto:sellers@paddle.com). -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | - [Security Policy](#security-policy) 2 | - [Reporting a Vulnerability](#reporting-a-vulnerability) 3 | 4 | # Security policy 5 | 6 | ## Reporting a vulnerability 7 | 8 | Please see the [Paddle Vulnerability Disclosure Policy](https://www.paddle.com/vulnerability-disclosure-policy) and 9 | report any vulnerabilities using https://vdp.paddle.com/p/Report-a-Vulnerability. 10 | 11 | > [!WARNING] 12 | > Do not create issues for potential security vulnerabilities. Issues are public and can be seen by potentially malicious actors. 13 | 14 | Thanks for helping to make the Paddle platform safe for everyone. -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | ['@babel/preset-env', { targets: { node: 'current' } }], 4 | '@babel/preset-typescript', 5 | ], 6 | }; 7 | -------------------------------------------------------------------------------- /scripts/update-env-vars.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | fs.writeFileSync('./src/version.ts', `export const SDK_VERSION = '${process.env.npm_package_version}';`); 4 | -------------------------------------------------------------------------------- /src/__tests__/helpers/test-client.ts: -------------------------------------------------------------------------------- 1 | import { Client } from '../../internal/api/client.js'; 2 | import { Environment } from '../../internal/index.js'; 3 | 4 | export function getPaddleTestClient() { 5 | return new Client('TEST_API_KEY', { environment: Environment.sandbox }); 6 | } 7 | -------------------------------------------------------------------------------- /src/__tests__/internal/paddle.test.ts: -------------------------------------------------------------------------------- 1 | import { Environment, Paddle } from '../../index.cjs.node.js'; 2 | 3 | describe('Paddle', () => { 4 | test('Paddle class can be constructed', () => { 5 | expect(new Paddle('...')).toBeInstanceOf(Paddle); 6 | }); 7 | test('Paddle class can be constructed with options', () => { 8 | expect(new Paddle('...', { environment: Environment.sandbox })).toBeInstanceOf(Paddle); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /src/entities/address/address-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAddressResponse } from '../../types/index.js'; 8 | import { Collection } from '../../internal/base/index.js'; 9 | import { Address } from './address.js'; 10 | 11 | export class AddressCollection extends Collection { 12 | override fromJson(data: IAddressResponse): Address { 13 | return new Address(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/address/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address-collection.js'; 8 | export * from './address.js'; 9 | -------------------------------------------------------------------------------- /src/entities/adjustment/adjustment-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type IAdjustmentResponse } from '../../types/index.js'; 9 | import { Adjustment } from './adjustment.js'; 10 | 11 | export class AdjustmentCollection extends Collection { 12 | override fromJson(data: IAdjustmentResponse): Adjustment { 13 | return new Adjustment(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/adjustment/adjustment-credit-note-pdf.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentCreditNotePDF } from '../../types/index.js'; 8 | 9 | export class AdjustmentCreditNotePDF { 10 | public readonly url: string; 11 | 12 | constructor(adjustment: IAdjustmentCreditNotePDF) { 13 | this.url = adjustment.url; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/adjustment/adjustment-item-totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentItemTotals } from '../../types/index.js'; 8 | 9 | export class AdjustmentItemTotals { 10 | public readonly subtotal: string; 11 | public readonly tax: string; 12 | public readonly total: string; 13 | 14 | constructor(adjustmentItemTotals: IAdjustmentItemTotals) { 15 | this.subtotal = adjustmentItemTotals.subtotal; 16 | this.tax = adjustmentItemTotals.tax; 17 | this.total = adjustmentItemTotals.total; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/entities/adjustment/adjustment-time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentsTimePeriodResponse } from '../../types/index.js'; 8 | 9 | export class AdjustmentTimePeriod { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(adjustmentsTimePeriod: IAdjustmentsTimePeriodResponse) { 14 | this.startsAt = adjustmentsTimePeriod.starts_at; 15 | this.endsAt = adjustmentsTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustment-time-period.js'; 8 | export * from './adjustment-proration.js'; 9 | export * from './adjustment-item.js'; 10 | export * from './adjustment.js'; 11 | export * from './adjustment-collection.js'; 12 | export * from './adjustment-item-totals.js'; 13 | export * from './adjustment-credit-note-pdf.js'; 14 | -------------------------------------------------------------------------------- /src/entities/business/business-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IBusinessResponse } from '../../types/index.js'; 8 | import { Collection } from '../../internal/base/index.js'; 9 | import { Business } from './business.js'; 10 | 11 | export class BusinessCollection extends Collection { 12 | override fromJson(data: IBusinessResponse): Business { 13 | return new Business(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/business/contacts.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IBusinessContacts } from '../../types/index.js'; 8 | 9 | export class Contacts { 10 | public readonly name: string | null; 11 | public readonly email: string; 12 | 13 | constructor(contacts: IBusinessContacts) { 14 | this.name = contacts.name ? contacts.name : null; 15 | this.email = contacts.email; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/business/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './business-collection.js'; 8 | export * from './contacts.js'; 9 | export * from './business.js'; 10 | -------------------------------------------------------------------------------- /src/entities/customer-portal-session/general.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IGeneralResponse } from '../../types/index.js'; 8 | 9 | export class General { 10 | public readonly overview: string; 11 | 12 | constructor(generalResponse: IGeneralResponse) { 13 | this.overview = generalResponse.overview; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/customer-portal-session/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './customer-portal-subscription-url.js'; 8 | export * from './customer-portal-session.js'; 9 | -------------------------------------------------------------------------------- /src/entities/customer/auth-token.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAuthTokenResponse } from '../../types/index.js'; 8 | 9 | export class AuthToken { 10 | public readonly customerAuthToken: string; 11 | public readonly expiresAt: string; 12 | 13 | constructor(authToken: IAuthTokenResponse) { 14 | this.customerAuthToken = authToken.customer_auth_token; 15 | this.expiresAt = authToken.expires_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/customer/customer-balance.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ICustomerBalance } from '../../types/index.js'; 8 | 9 | export class CustomerBalance { 10 | public readonly available: string; 11 | public readonly reserved: string; 12 | public readonly used: string; 13 | 14 | constructor(customerBalance: ICustomerBalance) { 15 | this.available = customerBalance.available; 16 | this.reserved = customerBalance.reserved; 17 | this.used = customerBalance.used; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/entities/customer/customer-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type ICustomerResponse } from '../../types/index.js'; 9 | import { Customer } from './customer.js'; 10 | 11 | export class CustomerCollection extends Collection { 12 | override fromJson(data: ICustomerResponse): Customer { 13 | return new Customer(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/customer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './auth-token.js'; 8 | export * from './customer-collection.js'; 9 | export * from './customer.js'; 10 | export * from './credit-balance.js'; 11 | export * from './customer-balance.js'; 12 | -------------------------------------------------------------------------------- /src/entities/discount/discount-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IDiscountResponse } from '../../types/index.js'; 8 | import { Collection } from '../../internal/base/index.js'; 9 | import { Discount } from './discount.js'; 10 | 11 | export class DiscountCollection extends Collection { 12 | override fromJson(data: IDiscountResponse): Discount { 13 | return new Discount(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-collection.js'; 8 | export * from './discount.js'; 9 | -------------------------------------------------------------------------------- /src/entities/event-types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './event-type.js'; 8 | -------------------------------------------------------------------------------- /src/entities/events/event-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IEvents, type IEventsResponse } from '../../types/index.js'; 8 | import { Collection } from '../../internal/base/index.js'; 9 | import { type EventEntity, Webhooks } from '../../notifications/index.js'; 10 | 11 | export class EventCollection extends Collection { 12 | override fromJson(data: IEvents): EventEntity { 13 | return Webhooks.fromJson(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/events/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './event-collection.js'; 8 | -------------------------------------------------------------------------------- /src/entities/notification-settings/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification-settings.js'; 8 | -------------------------------------------------------------------------------- /src/entities/notifications/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification.js'; 8 | export * from './notification-log.js'; 9 | export * from './notification-collection.js'; 10 | export * from './replay-notification.js'; 11 | export * from './notification-log-collection.js'; 12 | -------------------------------------------------------------------------------- /src/entities/notifications/notification-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type INotificationResponse } from '../../types/index.js'; 8 | import { Notification } from './notification.js'; 9 | import { Collection } from '../../internal/base/index.js'; 10 | 11 | export class NotificationCollection extends Collection { 12 | override fromJson(data: INotificationResponse): Notification { 13 | return new Notification(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/notifications/notification-log-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type INotificationLogResponse } from '../../types/index.js'; 9 | import { NotificationLog } from './notification-log.js'; 10 | 11 | export class NotificationLogCollection extends Collection { 12 | override fromJson(data: INotificationLogResponse): NotificationLog { 13 | return new NotificationLog(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/notifications/replay-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IReplayNotificationResponse } from '../../types/index.js'; 8 | 9 | export class ReplayNotification { 10 | public readonly notificationId: string; 11 | 12 | constructor(notificationResponse: IReplayNotificationResponse) { 13 | this.notificationId = notificationResponse.notification_id; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-method.js'; 8 | export * from './payment-method-collection.js'; 9 | -------------------------------------------------------------------------------- /src/entities/payment-method/payment-method-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { PaymentMethod } from '../../entities/index.js'; 8 | import { type IPaymentMethodResponse } from '../../types/index.js'; 9 | import { Collection } from '../../internal/base/index.js'; 10 | 11 | export class PaymentMethodCollection extends Collection { 12 | override fromJson(data: IPaymentMethodResponse): PaymentMethod { 13 | return new PaymentMethod(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout.js'; 8 | -------------------------------------------------------------------------------- /src/entities/price/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './price-collection.js'; 8 | export * from './price-quantity.js'; 9 | export * from './price.js'; 10 | -------------------------------------------------------------------------------- /src/entities/price/price-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type IPriceResponse } from '../../types/index.js'; 9 | import { Price } from './price.js'; 10 | 11 | export class PriceCollection extends Collection { 12 | override fromJson(data: IPriceResponse): Price { 13 | return new Price(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/price/price-quantity.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPriceQuantity } from '../../types/index.js'; 8 | 9 | export class PriceQuantity { 10 | public readonly minimum: number; 11 | public readonly maximum: number; 12 | 13 | constructor(priceQuantity: IPriceQuantity) { 14 | this.minimum = priceQuantity.minimum; 15 | this.maximum = priceQuantity.maximum; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/pricing-preview/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './pricing-preview-discounts.js'; 8 | export * from './pricing-preview-line-item.js'; 9 | export * from './pricing-preview-details.js'; 10 | export * from './pricing-preview.js'; 11 | -------------------------------------------------------------------------------- /src/entities/pricing-preview/pricing-preview-details.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { PricingPreviewLineItem } from './pricing-preview-line-item.js'; 8 | import { type IPricingPreviewDetailsResponse } from '../../types/index.js'; 9 | 10 | export class PricingPreviewDetails { 11 | public readonly lineItems: PricingPreviewLineItem[]; 12 | 13 | constructor(details: IPricingPreviewDetailsResponse) { 14 | this.lineItems = details.line_items.map((line_item) => new PricingPreviewLineItem(line_item)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/entities/product/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product-collection.js'; 8 | export * from './product.js'; 9 | -------------------------------------------------------------------------------- /src/entities/product/product-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type IProductResponse } from '../../types/index.js'; 9 | import { Product } from './product.js'; 10 | 11 | export class ProductCollection extends Collection { 12 | override fromJson(data: IProductResponse): Product { 13 | return new Product(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-filters.js'; 8 | export * from './report.js'; 9 | export * from './report-csv.js'; 10 | export * from './report-collection.js'; 11 | -------------------------------------------------------------------------------- /src/entities/report/report-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { Report } from './report.js'; 9 | import { type IReportResponse } from '../../types/index.js'; 10 | 11 | export class ReportCollection extends Collection { 12 | override fromJson(data: IReportResponse): Report { 13 | return new Report(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/report/report-csv.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IReportCsvResponse } from '../../types/index.js'; 8 | 9 | export class ReportCsv { 10 | public readonly url: string; 11 | 12 | constructor(response: IReportCsvResponse) { 13 | this.url = response.url; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/shared/adjustment-original-amount.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentCurrencyCode } from '../../enums/index.js'; 8 | import { type IAdjustmentOriginalAmountResponse } from '../../types/index.js'; 9 | 10 | export class AdjustmentOriginalAmount { 11 | public readonly amount: string; 12 | public readonly currencyCode: AdjustmentCurrencyCode; 13 | 14 | constructor(originalAmount: IAdjustmentOriginalAmountResponse) { 15 | this.amount = originalAmount.amount; 16 | this.currencyCode = originalAmount.currency_code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/shared/chargeback-fee.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { AdjustmentOriginalAmount } from './adjustment-original-amount.js'; 8 | import { type IChargebackFee } from '../../types/index.js'; 9 | 10 | export class ChargebackFee { 11 | public readonly amount: string; 12 | public readonly original: AdjustmentOriginalAmount | null; 13 | 14 | constructor(chargebackFee: IChargebackFee) { 15 | this.amount = chargebackFee.amount; 16 | this.original = chargebackFee.original ? new AdjustmentOriginalAmount(chargebackFee.original) : null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/shared/import-meta.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IImportMetaResponse } from '../../types/index.js'; 8 | 9 | export class ImportMeta { 10 | public readonly externalId: string | null; 11 | public readonly importedFrom: string; 12 | 13 | constructor(importMeta: IImportMetaResponse) { 14 | this.externalId = importMeta.external_id ? importMeta.external_id : null; 15 | this.importedFrom = importMeta.imported_from; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/shared/money.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | import { type IMoneyResponse } from '../../types/index.js'; 9 | 10 | export class Money { 11 | public readonly amount: string; 12 | public readonly currencyCode: CurrencyCode; 13 | 14 | constructor(money: IMoneyResponse) { 15 | this.amount = money.amount; 16 | this.currencyCode = money.currency_code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/shared/paypal.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPayPalResponse } from '../../types/index.js'; 8 | 9 | export class PayPal { 10 | public readonly email: string; 11 | public readonly reference: string; 12 | 13 | constructor(payPalResponse: IPayPalResponse) { 14 | this.email = payPalResponse.email; 15 | this.reference = payPalResponse.reference; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/shared/simulation-event-request.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ISimulationEventRequest } from '../../types/index.js'; 8 | 9 | export class SimulationEventRequest { 10 | public readonly body: string; 11 | 12 | constructor(simulationEventRequestResponse: ISimulationEventRequest) { 13 | this.body = simulationEventRequestResponse.body; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/shared/simulation-event-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ISimulationEventResponse } from '../../types/index.js'; 8 | 9 | export class SimulationEventResponse { 10 | public readonly body: string; 11 | public readonly statusCode: number; 12 | 13 | constructor(simulationEventResponse: ISimulationEventResponse) { 14 | this.body = simulationEventResponse.body; 15 | this.statusCode = simulationEventResponse.status_code; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/shared/tax-rates-used.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Totals } from './totals.js'; 8 | import { type ITaxRatesUsedResponse } from '../../types/index.js'; 9 | 10 | export class TaxRatesUsed { 11 | public readonly taxRate: string; 12 | public readonly totals: Totals | null; 13 | 14 | constructor(taxRatesUsed: ITaxRatesUsedResponse) { 15 | this.taxRate = taxRatesUsed.tax_rate; 16 | this.totals = taxRatesUsed.totals ? new Totals(taxRatesUsed.totals) : null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/shared/time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Interval } from '../../enums/index.js'; 8 | import { type ITimePeriod } from '../../types/index.js'; 9 | 10 | export class TimePeriod { 11 | public readonly interval: Interval; 12 | public readonly frequency: number; 13 | 14 | constructor(timePeriod: ITimePeriod) { 15 | this.interval = timePeriod.interval; 16 | this.frequency = timePeriod.frequency; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/shared/totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITotals } from '../../types/index.js'; 8 | 9 | export class Totals { 10 | public readonly subtotal: string; 11 | public readonly discount: string; 12 | public readonly tax: string; 13 | public readonly total: string; 14 | 15 | constructor(totals: ITotals) { 16 | this.subtotal = totals.subtotal; 17 | this.discount = totals.discount; 18 | this.tax = totals.tax; 19 | this.total = totals.total; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/entities/shared/transaction-checkout.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionCheckout } from '../../types/index.js'; 8 | 9 | export class TransactionCheckout { 10 | public readonly url: string | null; 11 | 12 | constructor(transactionCheckout: ITransactionCheckout) { 13 | this.url = transactionCheckout.url ? transactionCheckout.url : null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/shared/unit-price-override.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../enums/index.js'; 8 | import { Money } from './money.js'; 9 | import { type IUnitPriceOverrideResponse } from '../../types/index.js'; 10 | 11 | export class UnitPriceOverride { 12 | public readonly countryCodes: CountryCode[]; 13 | public readonly unitPrice: Money; 14 | 15 | constructor(unitPriceOverride: IUnitPriceOverrideResponse) { 16 | this.countryCodes = unitPriceOverride.country_codes; 17 | this.unitPrice = new Money(unitPriceOverride.unit_price); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/entities/shared/unit-totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IUnitTotals } from '../../types/index.js'; 8 | 9 | export class UnitTotals { 10 | public readonly subtotal: string; 11 | public readonly discount: string; 12 | public readonly tax: string; 13 | public readonly total: string; 14 | 15 | constructor(unitTotals: IUnitTotals) { 16 | this.subtotal = unitTotals.subtotal; 17 | this.discount = unitTotals.discount; 18 | this.tax = unitTotals.tax; 19 | this.total = unitTotals.total; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/entities/simulation-run-event/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run-event.js'; 8 | export * from './simulation-run-event-collection.js'; 9 | -------------------------------------------------------------------------------- /src/entities/simulation-run-event/simulation-run-event-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { SimulationRunEvent } from '../../entities/index.js'; 8 | import { type ISimulationRunEventResponse } from '../../types/index.js'; 9 | import { Collection } from '../../internal/base/index.js'; 10 | 11 | export class SimulationRunEventCollection extends Collection { 12 | override fromJson(data: ISimulationRunEventResponse): SimulationRunEvent { 13 | return new SimulationRunEvent(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/simulation-run/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run.js'; 8 | export * from './simulation-run-collection.js'; 9 | -------------------------------------------------------------------------------- /src/entities/simulation-run/simulation-run-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { SimulationRun } from '../../entities/index.js'; 8 | import { type ISimulationRunResponse } from '../../types/index.js'; 9 | import { Collection } from '../../internal/base/index.js'; 10 | 11 | export class SimulationRunCollection extends Collection { 12 | override fromJson(data: ISimulationRunResponse): SimulationRun { 13 | return new SimulationRun(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/simulation-types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-type.js'; 8 | -------------------------------------------------------------------------------- /src/entities/simulation/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation.js'; 8 | export * from './simulation-collection.js'; 9 | export * from './simulation-scenario-config/index.js'; 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Simulation } from '../../entities/index.js'; 8 | import { type ISimulationResponse } from '../../types/index.js'; 9 | import { Collection } from '../../internal/base/index.js'; 10 | 11 | export class SimulationCollection extends Collection { 12 | override fromJson(data: ISimulationResponse): Simulation { 13 | return new Simulation(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-scenario-config.js'; 8 | export * from './subscription-cancellation-details.js'; 9 | export * from './subscription-creation-details.js'; 10 | export * from './subscription-pause-details.js'; 11 | export * from './subscription-renewal-details.js'; 12 | export * from './subscription-resume-details.js'; 13 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-cancellation-entities.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionCancellationConfig } from '../../../types/index.js'; 2 | 3 | export class SubscriptionCancellationEntities { 4 | public readonly subscriptionId?: string | null; 5 | 6 | constructor(entities: SimulationSubscriptionCancellationConfig['entities']) { 7 | this.subscriptionId = entities?.subscription_id ?? null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-cancellation-options.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionCancellationConfig } from '../../../types/index.js'; 2 | import { type EffectiveFromType } from '../../../enums/index.js'; 3 | 4 | export class SubscriptionCancellationOptions { 5 | public readonly effectiveFrom?: EffectiveFromType | null; 6 | public readonly hasPastDueTransaction?: boolean | null; 7 | 8 | constructor(options: SimulationSubscriptionCancellationConfig['options']) { 9 | this.effectiveFrom = options?.effective_from ?? null; 10 | this.hasPastDueTransaction = options?.has_past_due_transaction ?? null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-creation-item.ts: -------------------------------------------------------------------------------- 1 | export class SubscriptionCreationItem { 2 | public readonly priceId: string; 3 | public readonly quantity: number; 4 | 5 | constructor(item: { price_id: string; quantity: number }) { 6 | this.priceId = item.price_id; 7 | this.quantity = item.quantity; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-pause-entities.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionPauseConfig } from '../../../types/index.js'; 2 | 3 | export class SubscriptionPauseEntities { 4 | public readonly subscriptionId?: string | null; 5 | 6 | constructor(entities: SimulationSubscriptionPauseConfig['entities']) { 7 | this.subscriptionId = entities?.subscription_id ?? null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-pause-options.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionPauseConfig } from '../../../types/index.js'; 2 | import { type EffectiveFromType } from '../../../enums/index.js'; 3 | 4 | export class SubscriptionPauseOptions { 5 | public readonly effectiveFrom?: EffectiveFromType | null; 6 | public readonly hasPastDueTransaction?: boolean | null; 7 | 8 | constructor(options: SimulationSubscriptionPauseConfig['options']) { 9 | this.effectiveFrom = options?.effective_from ?? null; 10 | this.hasPastDueTransaction = options?.has_past_due_transaction ?? null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-renewal-entities.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionRenewalConfig } from '../../../types/index.js'; 2 | 3 | export class SubscriptionRenewalEntities { 4 | public readonly subscriptionId?: string | null; 5 | 6 | constructor(entities: SimulationSubscriptionRenewalConfig['entities']) { 7 | this.subscriptionId = entities?.subscription_id ?? null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-renewal-options.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionRenewalConfig } from '../../../types/index.js'; 2 | import { type PaymentOutcomeType, type DunningExhaustedActionType } from '../../../enums/index.js'; 3 | 4 | export class SubscriptionRenewalOptions { 5 | public readonly paymentOutcome?: PaymentOutcomeType | null; 6 | public readonly dunningExhaustedAction?: DunningExhaustedActionType | null; 7 | 8 | constructor(options: SimulationSubscriptionRenewalConfig['options']) { 9 | this.paymentOutcome = options?.payment_outcome ?? null; 10 | this.dunningExhaustedAction = options?.dunning_exhausted_action ?? null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-resume-entities.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionResumeConfig } from '../../../types/index.js'; 2 | 3 | export class SubscriptionResumeEntities { 4 | public readonly subscriptionId?: string | null; 5 | 6 | constructor(entities: SimulationSubscriptionResumeConfig['entities']) { 7 | this.subscriptionId = entities?.subscription_id ?? null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/entities/simulation/simulation-scenario-config/subscription-resume-options.ts: -------------------------------------------------------------------------------- 1 | import { type SimulationSubscriptionResumeConfig } from '../../../types/index.js'; 2 | import { type PaymentOutcomeType, type DunningExhaustedActionType } from '../../../enums/index.js'; 3 | 4 | export class SubscriptionResumeOptions { 5 | public readonly paymentOutcome?: PaymentOutcomeType | null; 6 | public readonly dunningExhaustedAction?: DunningExhaustedActionType | null; 7 | 8 | constructor(options: SimulationSubscriptionResumeConfig['options']) { 9 | this.paymentOutcome = options?.payment_outcome ?? null; 10 | this.dunningExhaustedAction = options?.dunning_exhausted_action ?? null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/entities/subscription/subscription-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type ISubscriptionResponse } from '../../types/index.js'; 9 | import { Subscription } from './subscription.js'; 10 | 11 | export class SubscriptionCollection extends Collection { 12 | override fromJson(data: ISubscriptionResponse): Subscription { 13 | return new Subscription(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/subscription/subscription-discount.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ISubscriptionDiscountResponse } from '../../types/index.js'; 8 | 9 | export class SubscriptionDiscount { 10 | public readonly id: string; 11 | public readonly startsAt: string | null; 12 | public readonly endsAt: string | null; 13 | 14 | constructor(subscriptionDiscount: ISubscriptionDiscountResponse) { 15 | this.id = subscriptionDiscount.id; 16 | this.startsAt = subscriptionDiscount.starts_at ?? null; 17 | this.endsAt = subscriptionDiscount.ends_at ?? null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/entities/subscription/subscription-time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ISubscriptionTimePeriodResponse } from '../../types/index.js'; 8 | 9 | export class SubscriptionTimePeriod { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(subscriptionTimePeriod: ISubscriptionTimePeriodResponse) { 14 | this.startsAt = subscriptionTimePeriod.starts_at; 15 | this.endsAt = subscriptionTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/entities/transaction/address-preview.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../enums/index.js'; 8 | import { type IAddressPreviewResponse } from '../../resources/index.js'; 9 | 10 | export class AddressPreview { 11 | public readonly postalCode: string | null; 12 | public readonly countryCode: CountryCode; 13 | 14 | constructor(address: IAddressPreviewResponse) { 15 | this.postalCode = address.postal_code ? address.postal_code : null; 16 | this.countryCode = address.country_code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/transaction/adjustment-totals-breakdown.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentTotalsBreakdown } from '../../types/index.js'; 8 | 9 | export class AdjustmentTotalsBreakdown { 10 | public readonly credit: string; 11 | public readonly refund: string; 12 | public readonly chargeback: string; 13 | 14 | constructor(adjustmentTotalsBreakdown: IAdjustmentTotalsBreakdown) { 15 | this.credit = adjustmentTotalsBreakdown.credit; 16 | this.refund = adjustmentTotalsBreakdown.refund; 17 | this.chargeback = adjustmentTotalsBreakdown.chargeback; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/entities/transaction/proration.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { TransactionsTimePeriod } from './transactions-time-period.js'; 8 | import { type IProrationResponse } from '../../types/index.js'; 9 | 10 | export class Proration { 11 | public readonly rate: string; 12 | public readonly billingPeriod: TransactionsTimePeriod; 13 | 14 | constructor(prorationResponse: IProrationResponse) { 15 | this.rate = prorationResponse.rate; 16 | this.billingPeriod = new TransactionsTimePeriod(prorationResponse.billing_period); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/entities/transaction/transaction-collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { Collection } from '../../internal/base/index.js'; 8 | import { type ITransactionResponse } from '../../types/index.js'; 9 | import { Transaction } from './transaction.js'; 10 | 11 | export class TransactionCollection extends Collection { 12 | override fromJson(data: ITransactionResponse): Transaction { 13 | return new Transaction(data); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/transaction/transaction-invoice-pdf.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionInvoicePDF } from '../../types/index.js'; 8 | 9 | export class TransactionInvoicePDF { 10 | public readonly url: string; 11 | 12 | constructor(transaction: ITransactionInvoicePDF) { 13 | this.url = transaction.url; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/transaction/transactions-time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionsTimePeriodResponse } from '../../types/index.js'; 8 | 9 | export class TransactionsTimePeriod { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(transactionsTimePeriod: ITransactionsTimePeriodResponse) { 14 | this.startsAt = transactionsTimePeriod.starts_at; 15 | this.endsAt = transactionsTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-action-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentActionType = 'full' | 'partial'; 8 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-action.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentAction = 8 | | 'credit' 9 | | 'credit_reverse' 10 | | 'refund' 11 | | 'chargeback' 12 | | 'chargeback_reverse' 13 | | 'chargeback_warning'; 14 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-currency-code.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentCurrencyCode = 'EUR' | 'GBP' | 'USD'; 8 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentStatus = 'pending_approval' | 'approved' | 'rejected' | 'reversed'; 8 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-tax-mode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentTaxMode = 'external' | 'internal'; 8 | -------------------------------------------------------------------------------- /src/enums/adjustment/adjustment-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AdjustmentType = 'full' | 'partial' | 'tax' | 'proration'; 8 | -------------------------------------------------------------------------------- /src/enums/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustment-action-type.js'; 8 | export * from './adjustment-action.js'; 9 | export * from './adjustment-currency-code.js'; 10 | export * from './adjustment-status.js'; 11 | export * from './adjustment-tax-mode.js'; 12 | export * from './adjustment-type.js'; 13 | -------------------------------------------------------------------------------- /src/enums/discount/discount-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type DiscountStatus = 'active' | 'archived' | 'expired' | 'used'; 8 | -------------------------------------------------------------------------------- /src/enums/discount/discount-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type DiscountType = 'flat' | 'flat_per_seat' | 'percentage'; 8 | -------------------------------------------------------------------------------- /src/enums/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-status.js'; 8 | export * from './discount-type.js'; 9 | -------------------------------------------------------------------------------- /src/enums/notification-settings/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification-settings-type.js'; 8 | export * from './traffic-source.js'; 9 | -------------------------------------------------------------------------------- /src/enums/notification-settings/notification-settings-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type NotificationSettingsType = 'email' | 'url'; 8 | -------------------------------------------------------------------------------- /src/enums/notification-settings/traffic-source.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type TrafficSource = 'platform' | 'simulation' | 'all'; 8 | -------------------------------------------------------------------------------- /src/enums/notification/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification-status.js'; 8 | export * from './origin.js'; 9 | -------------------------------------------------------------------------------- /src/enums/notification/notification-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type NotificationStatus = 'not_attempted' | 'needs_retry' | 'delivered' | 'failed'; 8 | -------------------------------------------------------------------------------- /src/enums/notification/origin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type Origin = 'event' | 'replay'; 8 | -------------------------------------------------------------------------------- /src/enums/payment-method/deletion-reason.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SavedPaymentDeletionReason = 'replaced_by_newer_version' | 'api'; 8 | -------------------------------------------------------------------------------- /src/enums/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './deletion-reason.js'; 8 | export * from './type.js'; 9 | export * from './origin.js'; 10 | -------------------------------------------------------------------------------- /src/enums/payment-method/origin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SavedPaymentOrigin = 'saved_during_purchase' | 'subscription'; 8 | -------------------------------------------------------------------------------- /src/enums/payment-method/type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SavedPaymentMethodType = 'alipay' | 'apple_pay' | 'card' | 'google_pay' | 'korea_local' | 'paypal'; 8 | -------------------------------------------------------------------------------- /src/enums/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout-status.js'; 8 | -------------------------------------------------------------------------------- /src/enums/payout/payout-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type PayoutStatus = 'paid' | 'unpaid'; 8 | -------------------------------------------------------------------------------- /src/enums/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-status.js'; 8 | export * from './report-type.js'; 9 | export * from './report-filter-name.js'; 10 | export * from './report-filter-operator.js'; 11 | -------------------------------------------------------------------------------- /src/enums/report/report-filter-name.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ReportFilterName = 8 | | 'action' 9 | | 'collection_mode' 10 | | 'currency_code' 11 | | 'origin' 12 | | 'status' 13 | | 'updated_at' 14 | | 'type' 15 | | 'product_status' 16 | | 'price_status' 17 | | 'product_type' 18 | | 'price_type' 19 | | 'product_updated_at' 20 | | 'price_updated_at'; 21 | -------------------------------------------------------------------------------- /src/enums/report/report-filter-operator.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ReportFilterOperator = 'lt' | 'gte'; 8 | -------------------------------------------------------------------------------- /src/enums/report/report-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ReportStatus = 'pending' | 'ready' | 'failed' | 'expired'; 8 | -------------------------------------------------------------------------------- /src/enums/report/report-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ReportType = 8 | | 'adjustments' 9 | | 'adjustment_line_items' 10 | | 'transactions' 11 | | 'transaction_line_items' 12 | | 'discounts' 13 | | 'products_prices'; 14 | -------------------------------------------------------------------------------- /src/enums/shared/available-payment-methods.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type AvailablePaymentMethod = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'paypal'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/catalog-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type CatalogType = 'standard' | 'custom'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/collection-mode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type CollectionMode = 'automatic' | 'manual'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/currency-code.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type CurrencyCode = 8 | | 'USD' 9 | | 'EUR' 10 | | 'GBP' 11 | | 'JPY' 12 | | 'AUD' 13 | | 'CAD' 14 | | 'CHF' 15 | | 'HKD' 16 | | 'SGD' 17 | | 'SEK' 18 | | 'ARS' 19 | | 'BRL' 20 | | 'CNY' 21 | | 'COP' 22 | | 'CZK' 23 | | 'DKK' 24 | | 'HUF' 25 | | 'ILS' 26 | | 'INR' 27 | | 'KRW' 28 | | 'MXN' 29 | | 'NOK' 30 | | 'NZD' 31 | | 'PLN' 32 | | 'RUB' 33 | | 'THB' 34 | | 'TRY' 35 | | 'TWD' 36 | | 'UAH' 37 | | 'VND' 38 | | 'ZAR'; 39 | -------------------------------------------------------------------------------- /src/enums/shared/disposition.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type Disposition = 'attachment' | 'inline'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/error-code.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ErrorCode = 8 | | 'already_canceled' 9 | | 'already_refunded' 10 | | 'authentication_failed' 11 | | 'blocked_card' 12 | | 'canceled' 13 | | 'declined' 14 | | 'declined_not_retryable' 15 | | 'expired_card' 16 | | 'fraud' 17 | | 'invalid_amount' 18 | | 'invalid_payment_details' 19 | | 'issuer_unavailable' 20 | | 'not_enough_balance' 21 | | 'psp_error' 22 | | 'redacted_payment_method' 23 | | 'system_error' 24 | | 'transaction_not_permitted' 25 | | 'unknown'; 26 | -------------------------------------------------------------------------------- /src/enums/shared/interval.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type Interval = 'day' | 'week' | 'month' | 'year'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/payment-attempt-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type PaymentAttemptStatus = 8 | | 'authorized' 9 | | 'authorized_flagged' 10 | | 'canceled' 11 | | 'captured' 12 | | 'error' 13 | | 'action_required' 14 | | 'pending_no_action_required' 15 | | 'created' 16 | | 'unknown' 17 | | 'dropped'; 18 | -------------------------------------------------------------------------------- /src/enums/shared/payment-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type PaymentType = 8 | | 'alipay' 9 | | 'apple_pay' 10 | | 'bancontact' 11 | | 'card' 12 | | 'google_pay' 13 | | 'ideal' 14 | | 'offline' 15 | | 'paypal' 16 | | 'unknown' 17 | | 'wire_transfer'; 18 | -------------------------------------------------------------------------------- /src/enums/shared/payout-currency-code.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type PayoutCurrencyCode = 8 | | 'AUD' 9 | | 'CAD' 10 | | 'CHF' 11 | | 'CNY' 12 | | 'CZK' 13 | | 'DKK' 14 | | 'EUR' 15 | | 'GBP' 16 | | 'HUF' 17 | | 'PLN' 18 | | 'SEK' 19 | | 'USD' 20 | | 'ZAR'; 21 | -------------------------------------------------------------------------------- /src/enums/shared/status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type Status = 'active' | 'archived'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/tax-category.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type TaxCategory = 8 | | 'digital-goods' 9 | | 'ebooks' 10 | | 'implementation-services' 11 | | 'professional-services' 12 | | 'saas' 13 | | 'software-programming-services' 14 | | 'standard' 15 | | 'training-services' 16 | | 'website-hosting'; 17 | -------------------------------------------------------------------------------- /src/enums/shared/tax-mode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type TaxMode = 'account_setting' | 'external' | 'internal'; 8 | -------------------------------------------------------------------------------- /src/enums/shared/transaction-origin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type TransactionOrigin = 8 | | 'api' 9 | | 'subscription_charge' 10 | | 'subscription_payment_method_change' 11 | | 'subscription_recurring' 12 | | 'subscription_update' 13 | | 'web'; 14 | -------------------------------------------------------------------------------- /src/enums/shared/transaction-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type TransactionStatus = 'draft' | 'ready' | 'billed' | 'paid' | 'completed' | 'canceled' | 'past_due'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-run-event/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run-event-status.js'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-run-event/simulation-run-event-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SimulationRunEventStatus = 'pending' | 'success' | 'failed' | 'aborted'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-run/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run-status.js'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-run/simulation-run-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SimulationRunStatus = 'pending' | 'completed' | 'canceled'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-type/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-kind.js'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation-type/simulation-kind.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SimulationKind = 'single_event' | 'scenario'; 8 | -------------------------------------------------------------------------------- /src/enums/simulation/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-scenario-type.js'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './subscription-effective-from.js'; 8 | export * from './proration-billing-mode.js'; 9 | export * from './scheduled-change-action.js'; 10 | export * from './subscription-status.js'; 11 | export * from './subscription-item-status.js'; 12 | export * from './subscription-on-payment-failure.js'; 13 | export * from './subscription-on-resume.js'; 14 | -------------------------------------------------------------------------------- /src/enums/subscription/proration-billing-mode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ProrationBillingMode = 8 | | 'prorated_immediately' 9 | | 'prorated_next_billing_period' 10 | | 'full_immediately' 11 | | 'full_next_billing_period' 12 | | 'do_not_bill'; 13 | -------------------------------------------------------------------------------- /src/enums/subscription/scheduled-change-action.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ScheduledChangeAction = 'cancel' | 'pause' | 'resume'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/subscription-effective-from.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SubscriptionEffectiveFrom = 'next_billing_period' | 'immediately'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/subscription-item-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SubscriptionItemStatus = 'active' | 'inactive' | 'trialing'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/subscription-on-payment-failure.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SubscriptionOnPaymentFailure = 'prevent_change' | 'apply_change'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/subscription-on-resume.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SubscriptionOnResume = 'continue_existing_billing_period' | 'start_new_billing_period'; 8 | -------------------------------------------------------------------------------- /src/enums/subscription/subscription-status.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type SubscriptionStatus = 'active' | 'canceled' | 'past_due' | 'paused' | 'trialing'; 8 | -------------------------------------------------------------------------------- /src/enums/transaction/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-card-type.js'; 8 | -------------------------------------------------------------------------------- /src/enums/transaction/payment-card-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type PaymentCardType = 8 | | 'american_express' 9 | | 'diners_club' 10 | | 'discover' 11 | | 'jcb' 12 | | 'mada' 13 | | 'maestro' 14 | | 'mastercard' 15 | | 'union_pay' 16 | | 'unknown' 17 | | 'visa'; 18 | -------------------------------------------------------------------------------- /src/internal/api/constants.ts: -------------------------------------------------------------------------------- 1 | import { Environment } from './environment.js'; 2 | 3 | export const API_ENVIRONMENT_TO_BASE_URL_MAP: Record = { 4 | [Environment.production]: 'https://api.paddle.com', 5 | [Environment.sandbox]: 'https://sandbox-api.paddle.com', 6 | } as const; 7 | -------------------------------------------------------------------------------- /src/internal/api/environment.ts: -------------------------------------------------------------------------------- 1 | export enum Environment { 2 | sandbox = 'sandbox', 3 | production = 'production', 4 | } 5 | -------------------------------------------------------------------------------- /src/internal/api/index.ts: -------------------------------------------------------------------------------- 1 | export { Environment } from './environment.js'; 2 | export { convertToSnakeCase } from './case-helpers.js'; 3 | export { LogLevel } from './log-level.js'; 4 | -------------------------------------------------------------------------------- /src/internal/api/log-level.ts: -------------------------------------------------------------------------------- 1 | export enum LogLevel { 2 | verbose = 'verbose', 3 | warn = 'warn', 4 | error = 'error', 5 | none = 'none', 6 | } 7 | -------------------------------------------------------------------------------- /src/internal/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from './base-resource.js'; 2 | export * from './query-parameters.js'; 3 | export * from './path-parameters.js'; 4 | export * from './collection.js'; 5 | export * from './transform.js'; 6 | -------------------------------------------------------------------------------- /src/internal/base/path-parameters.ts: -------------------------------------------------------------------------------- 1 | export class PathParameters { 2 | constructor( 3 | private readonly url: string, 4 | private readonly pathParameters: Record, 5 | ) {} 6 | 7 | public deriveUrl() { 8 | let updatedUrl = this.url; 9 | for (const key in this.pathParameters) { 10 | const value = this.pathParameters[key]; 11 | if (key && value) { 12 | updatedUrl = updatedUrl.split(`{${key}}`).join(value.toString()); 13 | } 14 | } 15 | return updatedUrl; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/internal/errors/generic.ts: -------------------------------------------------------------------------------- 1 | import { type ErrorDetail, type ErrorField } from '../types/response.js'; 2 | 3 | export class ApiError extends Error { 4 | public readonly type: string; 5 | public readonly code: string; 6 | public readonly detail: string; 7 | public readonly documentationUrl: string; 8 | public readonly errors: ErrorField[] | null; 9 | 10 | constructor(errorDetail: ErrorDetail) { 11 | super(errorDetail.detail); 12 | 13 | this.type = errorDetail.type; 14 | this.code = errorDetail.code; 15 | this.detail = errorDetail.detail; 16 | this.documentationUrl = errorDetail.documentation_url; 17 | this.errors = errorDetail.errors ? errorDetail.errors : null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/internal/index.ts: -------------------------------------------------------------------------------- 1 | export type { ErrorResponse, ResponsePaginated, Response, ErrorDetail, ErrorField } from './types/response.js'; 2 | export type { PaddleOptions } from './types/config.js'; 3 | export * from './api/index.js'; 4 | export { ApiError } from './errors/generic.js'; 5 | -------------------------------------------------------------------------------- /src/internal/providers/crypto/crypto-provider.ts: -------------------------------------------------------------------------------- 1 | export abstract class CryptoProvider { 2 | randomUUID(): string { 3 | throw new Error('randomUUID not implemented.'); 4 | } 5 | 6 | /* eslint-disable @typescript-eslint/no-unused-vars */ 7 | // @ts-expect-error - unused params. 8 | async computeHmac(payload: string, secret: string): Promise { 9 | throw new Error('computeHmac not implemented.'); 10 | } 11 | /* eslint-enable @typescript-eslint/no-unused-vars */ 12 | } 13 | -------------------------------------------------------------------------------- /src/internal/providers/crypto/node-crypto.ts: -------------------------------------------------------------------------------- 1 | import { createHmac, randomUUID } from 'node:crypto'; 2 | import { type CryptoProvider } from './crypto-provider.js'; 3 | 4 | export class NodeCrypto implements CryptoProvider { 5 | randomUUID(): string { 6 | return randomUUID(); 7 | } 8 | 9 | async computeHmac(payload: string, secret: string): Promise { 10 | const hmac = createHmac('sha256', secret); 11 | hmac.update(payload); 12 | 13 | return await new Promise((resolve) => { 14 | resolve(hmac.digest('hex')); 15 | }); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/internal/providers/runtime-provider.ts: -------------------------------------------------------------------------------- 1 | import { type CryptoProvider } from './crypto/crypto-provider.js'; 2 | 3 | export interface IRuntimeProvider { 4 | crypto: CryptoProvider; 5 | } 6 | 7 | export class RuntimeProvider { 8 | static provider: IRuntimeProvider | undefined; 9 | static setProvider(provider: IRuntimeProvider) { 10 | this.provider = provider; 11 | } 12 | 13 | static getProvider(): IRuntimeProvider | undefined { 14 | return this.provider; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/internal/providers/runtime/edge-runtime.ts: -------------------------------------------------------------------------------- 1 | import { RuntimeProvider } from '../runtime-provider.js'; 2 | import { EdgeCrypto } from '../crypto/edge-crypto.js'; 3 | 4 | export class EdgeRuntime { 5 | static initialize() { 6 | RuntimeProvider.setProvider({ 7 | crypto: new EdgeCrypto(), 8 | }); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/internal/providers/runtime/node-runtime.ts: -------------------------------------------------------------------------------- 1 | import { RuntimeProvider } from '../runtime-provider.js'; 2 | import { NodeCrypto } from '../crypto/node-crypto.js'; 3 | 4 | export class NodeRuntime { 5 | static initialize() { 6 | RuntimeProvider.setProvider({ 7 | crypto: new NodeCrypto(), 8 | }); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/internal/types/config.ts: -------------------------------------------------------------------------------- 1 | import { type Environment, type LogLevel } from '../api/index.js'; 2 | 3 | export interface PaddleOptions { 4 | environment?: Environment; 5 | logLevel?: LogLevel; 6 | customHeaders?: Record; 7 | } 8 | -------------------------------------------------------------------------------- /src/notifications/entities/address/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address-notification.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/entities/adjustment/adjustment-time-period-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentsTimePeriodNotificationResponse } from '../../types/index.js'; 8 | 9 | export class AdjustmentTimePeriodNotification { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(adjustmentsTimePeriod: IAdjustmentsTimePeriodNotificationResponse) { 14 | this.startsAt = adjustmentsTimePeriod.starts_at; 15 | this.endsAt = adjustmentsTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/entities/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustment-time-period-notification.js'; 8 | export * from './adjustment-proration-notification.js'; 9 | export * from './adjustment-item-notification.js'; 10 | export * from './adjustment-item-totals-notification.js'; 11 | export * from './adjustment-notification.js'; 12 | -------------------------------------------------------------------------------- /src/notifications/entities/business/contacts-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IBusinessContactsNotification } from '../../types/index.js'; 8 | 9 | export class ContactsNotification { 10 | public readonly name: string | null; 11 | public readonly email: string; 12 | 13 | constructor(contacts: IBusinessContactsNotification) { 14 | this.name = contacts.name ? contacts.name : null; 15 | this.email = contacts.email; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/entities/business/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './contacts-notification.js'; 8 | export * from './business-notification.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/entities/customer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './customer-notification.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/entities/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-notification.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/entities/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-method-deleted-notification.js'; 8 | export * from './payment-method-notification.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/entities/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout-notification.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/entities/price/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './price-quantity-notification.js'; 8 | export * from './price-notification.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/entities/price/price-quantity-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPriceQuantityNotification } from '../../types/index.js'; 8 | 9 | export class PriceQuantityNotification { 10 | public readonly minimum: number; 11 | public readonly maximum: number; 12 | 13 | constructor(priceQuantity: IPriceQuantityNotification) { 14 | this.minimum = priceQuantity.minimum; 15 | this.maximum = priceQuantity.maximum; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/entities/product/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product-notification.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/entities/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-filters-notification.js'; 8 | export * from './report-notification.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/entities/shared/import-meta-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IImportMetaNotificationResponse } from '../../types/index.js'; 8 | 9 | export class ImportMetaNotification { 10 | public readonly externalId: string | null; 11 | public readonly importedFrom: string; 12 | 13 | constructor(importMeta: IImportMetaNotificationResponse) { 14 | this.externalId = importMeta.external_id ? importMeta.external_id : null; 15 | this.importedFrom = importMeta.imported_from; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/entities/shared/money-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | import { type IMoneyNotificationResponse } from '../../types/index.js'; 9 | 10 | export class MoneyNotification { 11 | public readonly amount: string; 12 | public readonly currencyCode: CurrencyCode; 13 | 14 | constructor(money: IMoneyNotificationResponse) { 15 | this.amount = money.amount; 16 | this.currencyCode = money.currency_code; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/entities/shared/time-period-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Interval } from '../../../enums/index.js'; 8 | import { type ITimePeriodNotification } from '../../types/index.js'; 9 | 10 | export class TimePeriodNotification { 11 | public readonly interval: Interval; 12 | public readonly frequency: number; 13 | 14 | constructor(timePeriod: ITimePeriodNotification) { 15 | this.interval = timePeriod.interval; 16 | this.frequency = timePeriod.frequency; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/entities/shared/totals-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITotalsNotification } from '../../types/index.js'; 8 | 9 | export class TotalsNotification { 10 | public readonly subtotal: string; 11 | public readonly discount: string; 12 | public readonly tax: string; 13 | public readonly total: string; 14 | 15 | constructor(totals: ITotalsNotification) { 16 | this.subtotal = totals.subtotal; 17 | this.discount = totals.discount; 18 | this.tax = totals.tax; 19 | this.total = totals.total; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/notifications/entities/shared/transaction-checkout-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionCheckoutNotification } from '../../types/index.js'; 8 | 9 | export class TransactionCheckoutNotification { 10 | public readonly url: string | null; 11 | 12 | constructor(transactionCheckout: ITransactionCheckoutNotification) { 13 | this.url = transactionCheckout.url ? transactionCheckout.url : null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/notifications/entities/subscription/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './subscription-created-notification.js'; 8 | export * from './subscription-discount-notification.js'; 9 | export * from './subscription-time-period-notification.js'; 10 | export * from './subscription-scheduled-change-notification.js'; 11 | export * from './subscription-price-notification.js'; 12 | export * from './subscription-item-notification.js'; 13 | export * from './subscription-notification.js'; 14 | -------------------------------------------------------------------------------- /src/notifications/entities/subscription/subscription-time-period-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ISubscriptionTimePeriodNotificationResponse } from '../../types/index.js'; 8 | 9 | export class SubscriptionTimePeriodNotification { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(subscriptionTimePeriod: ISubscriptionTimePeriodNotificationResponse) { 14 | this.startsAt = subscriptionTimePeriod.starts_at; 15 | this.endsAt = subscriptionTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/entities/transaction/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './transactions-time-period-notification.js'; 8 | export * from './transaction-proration-notification.js'; 9 | export * from './transaction-item-notification.js'; 10 | export * from './transaction-line-item-notification.js'; 11 | export * from './transaction-details-notification.js'; 12 | export * from './transaction-notification.js'; 13 | -------------------------------------------------------------------------------- /src/notifications/entities/transaction/transactions-time-period-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionsTimePeriodNotificationResponse } from '../../types/index.js'; 8 | 9 | export class TransactionsTimePeriodNotification { 10 | public readonly startsAt: string; 11 | public readonly endsAt: string; 12 | 13 | constructor(transactionsTimePeriod: ITransactionsTimePeriodNotificationResponse) { 14 | this.startsAt = transactionsTimePeriod.starts_at; 15 | this.endsAt = transactionsTimePeriod.ends_at; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/events/address/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address-created-event.js'; 8 | export * from './address-updated-event.js'; 9 | export * from './address-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustment-created-event.js'; 8 | export * from './adjustment-updated-event.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/events/business/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './business-created-event.js'; 8 | export * from './business-updated-event.js'; 9 | export * from './business-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/customer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './customer-created-event.js'; 8 | export * from './customer-updated-event.js'; 9 | export * from './customer-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-created-event.js'; 8 | export * from './discount-updated-event.js'; 9 | export * from './discount-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/generic/generic-event.ts: -------------------------------------------------------------------------------- 1 | import { Event } from '../../../entities/events/event.js'; 2 | import { convertKeysToCamelCase } from '../../../internal/base/index.js'; 3 | import { type IEventsResponse } from '../../../types/index.js'; 4 | 5 | export class GenericEvent extends Event { 6 | public override readonly data: object; 7 | 8 | constructor(response: IEventsResponse) { 9 | super(response); 10 | this.data = convertKeysToCamelCase(response.data); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/events/generic/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generic-event.js'; 2 | -------------------------------------------------------------------------------- /src/notifications/events/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address/index.js'; 8 | export * from './adjustment/index.js'; 9 | export * from './business/index.js'; 10 | export * from './customer/index.js'; 11 | export * from './discount/index.js'; 12 | export * from './generic/index.js'; 13 | export * from './payment-method/index.js'; 14 | export * from './payout/index.js'; 15 | export * from './price/index.js'; 16 | export * from './product/index.js'; 17 | export * from './subscription/index.js'; 18 | export * from './transaction/index.js'; 19 | export * from './report/index.js'; 20 | -------------------------------------------------------------------------------- /src/notifications/events/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-method-deleted-event.js'; 8 | export * from './payment-method-saved-event.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/events/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout-created-event.js'; 8 | export * from './payout-paid-event.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/events/price/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './price-created-event.js'; 8 | export * from './price-updated-event.js'; 9 | export * from './price-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/product/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product-created-event.js'; 8 | export * from './product-updated-event.js'; 9 | export * from './product-imported-event.js'; 10 | -------------------------------------------------------------------------------- /src/notifications/events/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-created-event.js'; 8 | export * from './report-updated-event.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/events/subscription/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './subscription-activated-event.js'; 8 | export * from './subscription-canceled-event.js'; 9 | export * from './subscription-created-event.js'; 10 | export * from './subscription-imported-event.js'; 11 | export * from './subscription-past-due-event.js'; 12 | export * from './subscription-paused-event.js'; 13 | export * from './subscription-resumed-event.js'; 14 | export * from './subscription-trialing-event.js'; 15 | export * from './subscription-updated-event.js'; 16 | -------------------------------------------------------------------------------- /src/notifications/events/transaction/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './transaction-billed-event.js'; 8 | export * from './transaction-canceled-event.js'; 9 | export * from './transaction-created-event.js'; 10 | export * from './transaction-completed-event.js'; 11 | export * from './transaction-paid-event.js'; 12 | export * from './transaction-past-due-event.js'; 13 | export * from './transaction-payment-failed-event.js'; 14 | export * from './transaction-ready-event.js'; 15 | export * from './transaction-updated-event.js'; 16 | export * from './transaction-revised-event.js'; 17 | -------------------------------------------------------------------------------- /src/notifications/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types.js'; 2 | export * from './webhooks.js'; 3 | export * from './webhooks-validator.js'; 4 | -------------------------------------------------------------------------------- /src/notifications/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './helpers/index.js'; 8 | export * from './events/index.js'; 9 | export * from './types/index.js'; 10 | export * from './entities/index.js'; 11 | -------------------------------------------------------------------------------- /src/notifications/types/address/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address-notification-response.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/types/adjustment/adjustment-totals-breakdown-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentTotalsBreakdownNotification { 8 | credit: string; 9 | refund: string; 10 | chargeback: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/notifications/types/adjustment/adjustment-totals-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentTotalsBreakdownNotification } from './adjustment-totals-breakdown-notification.js'; 8 | import { type CurrencyCode } from '../../../enums/index.js'; 9 | 10 | export interface IAdjustmentItemTotalsNotificationResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | earnings: string; 16 | breakdown?: IAdjustmentTotalsBreakdownNotification | null; 17 | currency_code: CurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/types/adjustment/adjustments-proration-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentsTimePeriodNotificationResponse } from './adjustments-time-period-notification-response.js'; 8 | 9 | export interface IAdjustmentsProrationNotificationResponse { 10 | rate: string; 11 | billing_period?: IAdjustmentsTimePeriodNotificationResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/adjustment/adjustments-time-period-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentsTimePeriodNotificationResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/notifications/types/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustments-time-period-notification-response.js'; 8 | export * from './adjustments-proration-notification-response.js'; 9 | export * from './adjustment-item-notification-response.js'; 10 | export * from './adjustment-notification-response.js'; 11 | export * from './adjustment-totals-breakdown-notification.js'; 12 | export * from './adjustment-totals-notification-response.js'; 13 | -------------------------------------------------------------------------------- /src/notifications/types/business/businesses-contacts-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IBusinessContactsNotification { 8 | name?: string | null; 9 | email: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/notifications/types/business/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './businesses-contacts-notification.js'; 8 | export * from './business-notification-response.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/types/customer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './customer-notification-response.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/types/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-notification-response.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product/index.js'; 8 | export * from './price/index.js'; 9 | export * from './transaction/index.js'; 10 | export * from './adjustment/index.js'; 11 | export * from './customer/index.js'; 12 | export * from './business/index.js'; 13 | export * from './subscription/index.js'; 14 | export * from './address/index.js'; 15 | export * from './discount/index.js'; 16 | export * from './payment-method/index.js'; 17 | export * from './payout/index.js'; 18 | export * from './report/index.js'; 19 | export * from './shared/index.js'; 20 | -------------------------------------------------------------------------------- /src/notifications/types/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-method-deleted-notification-response.js'; 8 | export * from './payment-method-notification-response.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/types/payment-method/payment-method-deleted-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { 8 | type SavedPaymentDeletionReason, 9 | type SavedPaymentMethodType, 10 | type SavedPaymentOrigin, 11 | } from '../../../enums/index.js'; 12 | 13 | export interface IPaymentMethodDeletedNotificationResponse { 14 | id: string; 15 | customer_id: string; 16 | address_id: string; 17 | deletion_reason: SavedPaymentDeletionReason; 18 | type: SavedPaymentMethodType; 19 | origin: SavedPaymentOrigin; 20 | saved_at: string; 21 | updated_at: string; 22 | } 23 | -------------------------------------------------------------------------------- /src/notifications/types/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout-notification-response.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/types/payout/payout-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode, type PayoutStatus } from '../../../enums/index.js'; 8 | 9 | export interface IPayoutNotificationResponse { 10 | id: string; 11 | status: PayoutStatus; 12 | amount: string; 13 | currency_code: CurrencyCode; 14 | } 15 | -------------------------------------------------------------------------------- /src/notifications/types/price/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './price-notification-response.js'; 8 | export * from './price-quantity-notification.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/types/price/price-quantity-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IPriceQuantityNotification { 8 | minimum: number; 9 | maximum: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/notifications/types/product/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product-notification-response.js'; 8 | -------------------------------------------------------------------------------- /src/notifications/types/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-filters-notification-response.js'; 8 | export * from './report-notification-response.js'; 9 | -------------------------------------------------------------------------------- /src/notifications/types/report/report-filters-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportFilterName, type ReportFilterOperator } from '../../../enums/index.js'; 8 | 9 | export interface IReportFiltersNotification { 10 | name: ReportFilterName; 11 | operator?: null | ReportFilterOperator; 12 | value: string[] | string; 13 | } 14 | -------------------------------------------------------------------------------- /src/notifications/types/report/report-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportStatus, type ReportType } from '../../../enums/index.js'; 8 | import { type IReportFiltersNotification } from './report-filters-notification-response.js'; 9 | 10 | export interface IReportNotificationResponse { 11 | id: string; 12 | status: ReportStatus; 13 | rows?: number | null; 14 | type: ReportType; 15 | filters: IReportFiltersNotification[]; 16 | expires_at?: string | null; 17 | created_at: string; 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/types/shared/adjustment-original-amount-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentCurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface IAdjustmentOriginalAmountNotificationResponse { 10 | amount: string; 11 | currency_code: AdjustmentCurrencyCode; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/billing-details-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITimePeriodNotification } from './time-period-notification.js'; 8 | 9 | export interface IBillingDetailsNotificationResponse { 10 | enable_checkout?: boolean | null; 11 | purchase_order_number?: string | null; 12 | additional_information?: string | null; 13 | payment_terms: ITimePeriodNotification; 14 | } 15 | -------------------------------------------------------------------------------- /src/notifications/types/shared/chargeback-fee.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentOriginalAmountNotificationResponse } from './adjustment-original-amount-notification-response.js'; 8 | 9 | export interface IChargebackFeeNotification { 10 | amount: string; 11 | original?: IAdjustmentOriginalAmountNotificationResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/import-meta-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IImportMetaNotificationResponse { 8 | external_id?: string | null; 9 | imported_from: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/notifications/types/shared/money-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface IMoneyNotificationResponse { 10 | amount: string; 11 | currency_code: CurrencyCode; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/payment-card-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PaymentCardType } from '../../../enums/index.js'; 8 | 9 | export interface IPaymentCardNotificationResponse { 10 | type: PaymentCardType; 11 | last4: string; 12 | expiry_month: number; 13 | expiry_year: number; 14 | cardholder_name: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/notifications/types/shared/payment-method-details.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PaymentType } from '../../../enums/index.js'; 8 | import { type IPaymentCardNotificationResponse } from './payment-card-notification-response.js'; 9 | 10 | export interface IPaymentMethodDetailsNotification { 11 | type: PaymentType; 12 | card?: IPaymentCardNotificationResponse | null; 13 | } 14 | -------------------------------------------------------------------------------- /src/notifications/types/shared/payout-totals-adjustment-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IChargebackFeeNotification } from './chargeback-fee.js'; 8 | import { type PayoutCurrencyCode } from '../../../enums/index.js'; 9 | 10 | export interface IPayoutTotalsAdjustmentNotificationResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | chargeback_fee?: IChargebackFeeNotification | null; 16 | earnings: string; 17 | currency_code: PayoutCurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/types/shared/tax-rates-used-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITotalsNotification } from './totals.js'; 8 | 9 | export interface ITaxRatesUsedNotificationResponse { 10 | tax_rate: string; 11 | totals?: ITotalsNotification | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/time-period-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Interval } from '../../../enums/index.js'; 8 | 9 | export interface ITimePeriodNotification { 10 | interval: Interval; 11 | frequency: number; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/total-adjustments-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface ITotalAdjustmentsNotificationResponse { 10 | subtotal: string; 11 | tax: string; 12 | total: string; 13 | fee: string; 14 | earnings: string; 15 | currency_code: CurrencyCode; 16 | } 17 | -------------------------------------------------------------------------------- /src/notifications/types/shared/totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITotalsNotification { 8 | subtotal: string; 9 | discount: string; 10 | tax: string; 11 | total: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/shared/transaction-checkout-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionCheckoutNotification { 8 | url?: string | null; 9 | } 10 | -------------------------------------------------------------------------------- /src/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IChargebackFeeNotification } from './chargeback-fee.js'; 8 | import { type PayoutCurrencyCode } from '../../../enums/index.js'; 9 | 10 | export interface ITransactionPayoutTotalsAdjustedNotificationResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | chargeback_fee?: IChargebackFeeNotification | null; 16 | earnings: string; 17 | currency_code: PayoutCurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/notifications/types/shared/transaction-payout-totals-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PayoutCurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface ITransactionPayoutTotalsNotificationResponse { 10 | subtotal: string; 11 | discount: string; 12 | tax: string; 13 | total: string; 14 | credit: string; 15 | balance: string; 16 | grand_total: string; 17 | credit_to_balance: string; 18 | fee: string; 19 | earnings: string; 20 | currency_code: PayoutCurrencyCode; 21 | exchange_rate: string; 22 | fee_rate: string; 23 | } 24 | -------------------------------------------------------------------------------- /src/notifications/types/shared/transaction-totals-adjusted-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface ITransactionTotalsAdjustedNotificationResponse { 10 | subtotal: string; 11 | tax: string; 12 | total: string; 13 | grand_total: string; 14 | fee?: string | null; 15 | earnings?: string | null; 16 | currency_code: CurrencyCode; 17 | } 18 | -------------------------------------------------------------------------------- /src/notifications/types/shared/transaction-totals-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface ITransactionTotalsNotificationResponse { 10 | subtotal: string; 11 | discount: string; 12 | tax: string; 13 | total: string; 14 | credit: string; 15 | credit_to_balance: string; 16 | balance: string; 17 | grand_total: string; 18 | fee?: string | null; 19 | earnings?: string | null; 20 | currency_code: CurrencyCode; 21 | } 22 | -------------------------------------------------------------------------------- /src/notifications/types/shared/unit-price-override-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../../enums/index.js'; 8 | import { type IMoneyNotificationResponse } from './money-notification-response.js'; 9 | 10 | export interface IUnitPriceOverrideNotificationResponse { 11 | country_codes: CountryCode[]; 12 | unit_price: IMoneyNotificationResponse; 13 | } 14 | -------------------------------------------------------------------------------- /src/notifications/types/shared/unit-totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IUnitTotalsNotification { 8 | subtotal: string; 9 | discount: string; 10 | tax: string; 11 | total: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/subscription/subscription-discount-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISubscriptionDiscountNotificationResponse { 8 | id: string; 9 | starts_at: string; 10 | ends_at?: string | null; 11 | } 12 | -------------------------------------------------------------------------------- /src/notifications/types/subscription/subscription-scheduled-change-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ScheduledChangeAction } from '../../../enums/index.js'; 8 | 9 | export interface ISubscriptionScheduledChangeNotificationResponse { 10 | action: ScheduledChangeAction; 11 | effective_at: string; 12 | resume_at?: string | null; 13 | } 14 | -------------------------------------------------------------------------------- /src/notifications/types/subscription/subscription-time-period-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISubscriptionTimePeriodNotificationResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/notifications/types/transaction/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './transactions-time-period-notification-response.js'; 8 | export * from './transaction-proration-notification-response.js'; 9 | export * from './transaction-item-notification-response.js'; 10 | export * from './transaction-line-item-notification-response.js'; 11 | export * from './transaction-details-notification-response.js'; 12 | export * from './transaction-notification-response.js'; 13 | -------------------------------------------------------------------------------- /src/notifications/types/transaction/transaction-item-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPriceNotificationResponse } from '../price/index.js'; 8 | import { type ITransactionProrationNotificationResponse } from './transaction-proration-notification-response.js'; 9 | 10 | export interface ITransactionItemNotificationResponse { 11 | price_id?: string | null; 12 | price?: IPriceNotificationResponse | null; 13 | quantity: number; 14 | proration?: ITransactionProrationNotificationResponse | null; 15 | } 16 | -------------------------------------------------------------------------------- /src/notifications/types/transaction/transaction-proration-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionsTimePeriodNotificationResponse } from './transactions-time-period-notification-response.js'; 8 | 9 | export interface ITransactionProrationNotificationResponse { 10 | rate: string; 11 | billing_period?: ITransactionsTimePeriodNotificationResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/notifications/types/transaction/transactions-time-period-notification-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionsTimePeriodNotificationResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/resources/addresses/operations/create-address-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../../enums/index.js'; 8 | import { type ICustomData } from '../../../types/index.js'; 9 | 10 | export interface CreateAddressRequestBody { 11 | countryCode: CountryCode; 12 | description?: string | null; 13 | firstLine?: string | null; 14 | secondLine?: string | null; 15 | city?: string | null; 16 | postalCode?: string | null; 17 | region?: string | null; 18 | customData?: ICustomData | null; 19 | } 20 | -------------------------------------------------------------------------------- /src/resources/addresses/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-address-query-parameters.js'; 8 | export * from './create-address-request-body.js'; 9 | export * from './update-address-request-body.js'; 10 | -------------------------------------------------------------------------------- /src/resources/addresses/operations/list-address-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../../enums/index.js'; 8 | 9 | export interface ListAddressQueryParameters { 10 | after?: string; 11 | id?: string[]; 12 | orderBy?: string; 13 | perPage?: number; 14 | search?: string; 15 | status?: Status[]; 16 | } 17 | -------------------------------------------------------------------------------- /src/resources/addresses/operations/update-address-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode, type Status } from '../../../enums/index.js'; 8 | import { type ICustomData } from '../../../types/index.js'; 9 | 10 | export interface UpdateAddressRequestBody { 11 | description?: string | null; 12 | firstLine?: string | null; 13 | secondLine?: string | null; 14 | city?: string | null; 15 | postalCode?: string | null; 16 | region?: string | null; 17 | countryCode?: CountryCode; 18 | customData?: ICustomData | null; 19 | status?: Status; 20 | } 21 | -------------------------------------------------------------------------------- /src/resources/adjustments/operations/get-adjustment-credit-note-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Disposition } from '../../../enums/index.js'; 8 | 9 | export interface GetAdjustmentCreditNoteQueryParameters { 10 | disposition?: Disposition; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/adjustments/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-adjustment-query-parameters.js'; 8 | export * from './create-adjustment-request-body.js'; 9 | export * from './get-adjustment-credit-note-query-parameters.js'; 10 | -------------------------------------------------------------------------------- /src/resources/adjustments/operations/list-adjustment-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentAction, type AdjustmentStatus } from '../../../enums/index.js'; 8 | 9 | export interface ListAdjustmentQueryParameters { 10 | action?: AdjustmentAction; 11 | after?: string; 12 | customerId?: string[]; 13 | orderBy?: string; 14 | perPage?: number; 15 | status?: AdjustmentStatus[]; 16 | subscriptionId?: string[]; 17 | transactionId?: string[]; 18 | id?: string[]; 19 | } 20 | -------------------------------------------------------------------------------- /src/resources/businesses/operations/create-business-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IBusinessContacts, type ICustomData } from '../../../types/index.js'; 8 | 9 | export interface CreateBusinessRequestBody { 10 | name: string; 11 | companyNumber?: string | null; 12 | taxIdentifier?: string | null; 13 | contacts?: IBusinessContacts[] | null; 14 | customData?: ICustomData | null; 15 | } 16 | -------------------------------------------------------------------------------- /src/resources/businesses/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-business-query-parameters.js'; 8 | export * from './create-business-request-body.js'; 9 | export * from './update-business-request-body.js'; 10 | -------------------------------------------------------------------------------- /src/resources/businesses/operations/list-business-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../../enums/index.js'; 8 | 9 | export interface ListBusinessQueryParameters { 10 | after?: string; 11 | id?: string[]; 12 | orderBy?: string; 13 | perPage?: number; 14 | search?: string; 15 | status?: Status[]; 16 | } 17 | -------------------------------------------------------------------------------- /src/resources/businesses/operations/update-business-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IBusinessContacts, type ICustomData } from '../../../types/index.js'; 8 | import { type Status } from '../../../enums/index.js'; 9 | 10 | export interface UpdateBusinessRequestBody { 11 | name?: string; 12 | companyNumber?: string | null; 13 | taxIdentifier?: string | null; 14 | status?: Status; 15 | contacts?: IBusinessContacts[] | null; 16 | customData?: ICustomData | null; 17 | } 18 | -------------------------------------------------------------------------------- /src/resources/customer-portal-sessions/operations/create-customer-portal-session-request-object.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface CreateCustomerPortalSessionRequestBody { 8 | subscriptionIds: string[]; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/customer-portal-sessions/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './create-customer-portal-session-request-object.js'; 8 | -------------------------------------------------------------------------------- /src/resources/customers/operations/create-customer-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ICustomData } from '../../../types/index.js'; 8 | 9 | export interface CreateCustomerRequestBody { 10 | email: string; 11 | name?: string | null; 12 | customData?: ICustomData | null; 13 | locale?: string; 14 | } 15 | -------------------------------------------------------------------------------- /src/resources/customers/operations/get-credit-balance-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../../enums/index.js'; 8 | 9 | export interface GetCreditBalanceQueryParameters { 10 | currencyCode?: CurrencyCode[]; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/customers/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-customer-query-parameters.js'; 8 | export * from './create-customer-request-body.js'; 9 | export * from './update-customer-request-body.js'; 10 | export * from './get-credit-balance-query-parameters.js'; 11 | -------------------------------------------------------------------------------- /src/resources/customers/operations/list-customer-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../../enums/index.js'; 8 | 9 | export interface ListCustomerQueryParameters { 10 | after?: string; 11 | id?: string[]; 12 | orderBy?: string; 13 | perPage?: number; 14 | search?: string; 15 | status?: Status[]; 16 | email?: string[]; 17 | } 18 | -------------------------------------------------------------------------------- /src/resources/customers/operations/update-customer-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../../enums/index.js'; 8 | import { type ICustomData } from '../../../types/index.js'; 9 | 10 | export interface UpdateCustomerRequestBody { 11 | name?: string | null; 12 | email?: string; 13 | status?: Status; 14 | customData?: ICustomData | null; 15 | locale?: string; 16 | } 17 | -------------------------------------------------------------------------------- /src/resources/discounts/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-discount-query-parameters.js'; 8 | export * from './create-discount-request-body.js'; 9 | export * from './update-discount-request-body.js'; 10 | -------------------------------------------------------------------------------- /src/resources/discounts/operations/list-discount-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type DiscountStatus } from '../../../enums/index.js'; 8 | 9 | export interface ListDiscountQueryParameters { 10 | after?: string; 11 | code?: string[]; 12 | id?: string[]; 13 | orderBy?: string; 14 | perPage?: number; 15 | status?: DiscountStatus[]; 16 | } 17 | -------------------------------------------------------------------------------- /src/resources/events/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-events-query-parameters.js'; 8 | -------------------------------------------------------------------------------- /src/resources/events/operations/list-events-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ListEventsQueryParameters { 8 | after?: string; 9 | orderBy?: string; 10 | perPage?: number; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/notification-settings/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './create-notification-settings-request-body.js'; 8 | export * from './update-notification-settings-request-body.js'; 9 | export * from './list-notification-settings-query-parameters.js'; 10 | -------------------------------------------------------------------------------- /src/resources/notification-settings/operations/list-notification-settings-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type TrafficSource } from '../../../enums/index.js'; 8 | 9 | export interface ListNotificationSettingsQueryParameters { 10 | after?: string; 11 | perPage?: number; 12 | orderBy?: string; 13 | active?: boolean; 14 | trafficSource?: TrafficSource; 15 | } 16 | -------------------------------------------------------------------------------- /src/resources/notification-settings/operations/update-notification-settings-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type TrafficSource } from '../../../enums/index.js'; 8 | import { type IEventName } from '../../../notifications/index.js'; 9 | 10 | export interface UpdateNotificationSettingsRequestBody { 11 | description?: string; 12 | destination?: string; 13 | active?: boolean; 14 | apiVersion?: number; 15 | includeSensitiveFields?: boolean; 16 | subscribedEvents?: IEventName[]; 17 | trafficSource?: TrafficSource; 18 | } 19 | -------------------------------------------------------------------------------- /src/resources/notifications/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-notification-query-parameters.js'; 8 | export * from './list-notification-log-query-parameters.js'; 9 | -------------------------------------------------------------------------------- /src/resources/notifications/operations/list-notification-log-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ListNotificationLogQueryParameters { 8 | after: string; 9 | perPage: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/resources/notifications/operations/list-notification-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type NotificationStatus } from '../../../enums/index.js'; 8 | 9 | export interface ListNotificationQueryParameters { 10 | after?: string; 11 | notificationSettingId?: string[]; 12 | orderBy?: string; 13 | perPage?: number; 14 | search?: string; 15 | status?: NotificationStatus[]; 16 | filter?: string; 17 | to?: string; 18 | from?: string; 19 | } 20 | -------------------------------------------------------------------------------- /src/resources/payment-methods/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-customer-payment-method-query-parameters.js'; 8 | -------------------------------------------------------------------------------- /src/resources/payment-methods/operations/list-customer-payment-method-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ListCustomerPaymentMethodQueryParameters { 8 | addressId?: string[]; 9 | after?: string; 10 | orderBy?: string; 11 | perPage?: number; 12 | supportsCheckout?: boolean; 13 | } 14 | -------------------------------------------------------------------------------- /src/resources/prices/operations/get-price-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface GetPriceQueryParameters { 8 | include?: string[]; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/prices/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-price-query-parameters.js'; 8 | export * from './create-price-request-body.js'; 9 | export * from './get-price-query-parameters.js'; 10 | export * from './update-price-request-body.js'; 11 | -------------------------------------------------------------------------------- /src/resources/prices/operations/list-price-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CatalogType, type Status } from '../../../enums/index.js'; 8 | 9 | export interface ListPriceQueryParameters { 10 | after?: string; 11 | id?: string[]; 12 | type?: CatalogType[]; 13 | include?: string[]; 14 | orderBy?: string; 15 | perPage?: number; 16 | productId?: string[]; 17 | status?: Status[]; 18 | recurring?: boolean; 19 | } 20 | -------------------------------------------------------------------------------- /src/resources/pricing-preview/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './pricing-preview-request-body.js'; 8 | -------------------------------------------------------------------------------- /src/resources/products/operations/create-product-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CatalogType, type TaxCategory } from '../../../enums/index.js'; 8 | import { type ICustomData } from '../../../types/index.js'; 9 | 10 | export interface CreateProductRequestBody { 11 | name: string; 12 | taxCategory: TaxCategory; 13 | type?: CatalogType | null; 14 | description?: string | null; 15 | imageUrl?: string | null; 16 | customData?: ICustomData | null; 17 | } 18 | -------------------------------------------------------------------------------- /src/resources/products/operations/get-product-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface GetProductQueryParameters { 8 | include?: string[]; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/products/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-product-query-parameters.js'; 8 | export * from './create-product-request-body.js'; 9 | export * from './get-product-query-parameters.js'; 10 | export * from './update-product-request-body.js'; 11 | -------------------------------------------------------------------------------- /src/resources/products/operations/list-product-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; 8 | 9 | export interface ListProductQueryParameters { 10 | after?: string; 11 | type?: CatalogType[]; 12 | id?: string[]; 13 | include?: string[]; 14 | orderBy?: string; 15 | perPage?: number; 16 | status?: Status[]; 17 | taxCategory?: TaxCategory[]; 18 | } 19 | -------------------------------------------------------------------------------- /src/resources/products/operations/update-product-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; 8 | import { type ICustomData } from '../../../types/index.js'; 9 | 10 | export interface UpdateProductRequestBody { 11 | name?: string; 12 | description?: string | null; 13 | type?: CatalogType | null; 14 | taxCategory?: TaxCategory; 15 | imageUrl?: string | null; 16 | customData?: ICustomData | null; 17 | status?: Status; 18 | } 19 | -------------------------------------------------------------------------------- /src/resources/reports/operations/create-report-request-object.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportType } from '../../../enums/index.js'; 8 | import { type IReportFilters } from '../../../types/index.js'; 9 | 10 | export interface CreateReportRequestBody { 11 | type: ReportType; 12 | filters?: IReportFilters[] | null; 13 | } 14 | -------------------------------------------------------------------------------- /src/resources/reports/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-report-query-parameters.js'; 8 | export * from './create-report-request-object.js'; 9 | -------------------------------------------------------------------------------- /src/resources/reports/operations/list-report-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportStatus } from '../../../enums/index.js'; 8 | 9 | export interface ListReportQueryParameters { 10 | after?: string; 11 | orderBy?: string; 12 | perPage?: number; 13 | status?: ReportStatus[]; 14 | } 15 | -------------------------------------------------------------------------------- /src/resources/simulation-run-events/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './list-simulation-run-events-query-parameters.js'; 8 | -------------------------------------------------------------------------------- /src/resources/simulation-run-events/operations/list-simulation-run-events-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ListSimulationRunEventsQueryParameters { 8 | after?: string; 9 | orderBy?: string; 10 | perPage?: number; 11 | id?: string[]; 12 | } 13 | -------------------------------------------------------------------------------- /src/resources/simulation-runs/operations/get-simulation-run-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface GetSimulationRunQueryParameters { 8 | include: Array<'events'>; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/simulation-runs/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './get-simulation-run-query-parameters.js'; 8 | export * from './list-simulation-run-query-parameters.js'; 9 | -------------------------------------------------------------------------------- /src/resources/simulation-runs/operations/list-simulation-run-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ListSimulationRunQueryParameters { 8 | after?: string; 9 | include?: Array<'events'>; 10 | orderBy?: string; 11 | perPage?: number; 12 | id?: string[]; 13 | } 14 | -------------------------------------------------------------------------------- /src/resources/simulations/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './create-simulation-request-body.js'; 8 | export * from './list-simulation-query-parameters.js'; 9 | export * from './update-simulation-request-body.js'; 10 | -------------------------------------------------------------------------------- /src/resources/simulations/operations/list-simulation-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../../enums/index.js'; 8 | 9 | export interface ListSimulationQueryParameters { 10 | after?: string; 11 | notificationSettingId?: string[]; 12 | orderBy?: string; 13 | perPage?: number; 14 | id?: string[]; 15 | status?: Status[]; 16 | } 17 | -------------------------------------------------------------------------------- /src/resources/simulations/operations/update-simulation-request-body.ts: -------------------------------------------------------------------------------- 1 | import type { DiscriminatedSimulationEventResponse } from '../../../types/index.js'; 2 | import type { Status } from '../../../enums/index.js'; 3 | 4 | interface BaseUpdateSimulationRequestBody { 5 | notificationSettingId?: string; 6 | name?: string; 7 | status?: Status; 8 | } 9 | 10 | type RawUpdateSimulationRequestBody = DiscriminatedSimulationEventResponse; 11 | 12 | // Map all properties to be optional 13 | export type UpdateSimulationRequestBody = { 14 | [Key in keyof RawUpdateSimulationRequestBody]?: RawUpdateSimulationRequestBody[Key]; 15 | }; 16 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/cancel-subscription-request-object.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type SubscriptionEffectiveFrom } from '../../../enums/index.js'; 8 | 9 | export interface CancelSubscription { 10 | effectiveFrom?: SubscriptionEffectiveFrom | null; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/get-subscription-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface GetSubscriptionQueryParameters { 8 | include?: Array<'next_transaction' | 'recurring_transaction_details'>; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './get-subscription-query-parameters.js'; 8 | export * from './update-subscription-request-body.js'; 9 | export * from './list-subscription-query-parameters.js'; 10 | export * from './pause-subscription-request-object.js'; 11 | export * from './resume-subscription-request-object.js'; 12 | export * from './cancel-subscription-request-object.js'; 13 | export * from './create-subscription-charge-request-object.js'; 14 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/list-subscription-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CollectionMode, type ScheduledChangeAction, type SubscriptionStatus } from '../../../enums/index.js'; 8 | 9 | export interface ListSubscriptionQueryParameters { 10 | addressId?: string[]; 11 | after?: string; 12 | collectionMode?: CollectionMode; 13 | customerId?: string[]; 14 | id?: string[]; 15 | orderBy?: string; 16 | perPage?: number; 17 | priceId?: string[]; 18 | scheduledChangeAction?: ScheduledChangeAction[]; 19 | status?: SubscriptionStatus[]; 20 | } 21 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/pause-subscription-request-object.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type SubscriptionOnResume, type SubscriptionEffectiveFrom } from '../../../enums/index.js'; 8 | 9 | export interface PauseSubscription { 10 | effectiveFrom?: SubscriptionEffectiveFrom | null; 11 | resumeAt?: null | string; 12 | onResume?: SubscriptionOnResume; 13 | } 14 | -------------------------------------------------------------------------------- /src/resources/subscriptions/operations/resume-subscription-request-object.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type SubscriptionOnResume } from '../../../enums/index.js'; 8 | 9 | export interface ResumeSubscription { 10 | effectiveFrom: 'immediately' | string; 11 | onResume?: SubscriptionOnResume; 12 | } 13 | -------------------------------------------------------------------------------- /src/resources/transactions/operations/create-transaction-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface CreateTransactionQueryParameters { 8 | include?: Array< 9 | 'address' | 'adjustment' | 'adjustments_totals' | 'available_payment_methods' | 'business' | 'customer' | 'discount' 10 | >; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/transactions/operations/get-transaction-invoice-pdf-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Disposition } from '../../../enums/index.js'; 8 | 9 | export interface GetTransactionInvoicePdfQueryParameters { 10 | disposition?: Disposition; 11 | } 12 | -------------------------------------------------------------------------------- /src/resources/transactions/operations/get-transaction-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface GetTransactionQueryParameters { 8 | include?: Array<'address' | 'adjustment' | 'adjustments_totals' | 'business' | 'customer' | 'discount'>; 9 | } 10 | -------------------------------------------------------------------------------- /src/resources/transactions/operations/revise-transaction-request-body.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ReviseTransactionRequestBody { 8 | customer?: { 9 | name?: string; 10 | }; 11 | business?: { 12 | name?: string; 13 | taxIdentifier?: string; 14 | }; 15 | address?: { 16 | firstLine?: string; 17 | secondLine?: string | null; 18 | city?: string; 19 | region?: string; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /src/resources/transactions/operations/update-transaction-query-parameters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface UpdateTransactionQueryParameters { 8 | include?: Array< 9 | 'address' | 'adjustment' | 'adjustments_totals' | 'available_payment_methods' | 'business' | 'customer' | 'discount' 10 | >; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/address/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './address-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/adjustment/adjustment-credit-note-pdf.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentCreditNotePDF { 8 | url: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/adjustment/adjustment-item-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentType } from '../../enums/index.js'; 8 | import { type IAdjustmentsProrationResponse } from './adjustments-proration-response.js'; 9 | import { type IAdjustmentItemTotals } from '../shared/index.js'; 10 | 11 | export interface IAdjustmentItemResponse { 12 | id: string; 13 | item_id: string; 14 | type: AdjustmentType; 15 | amount?: string | null; 16 | proration?: IAdjustmentsProrationResponse | null; 17 | totals?: IAdjustmentItemTotals | null; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/adjustment/adjustments-proration-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentsTimePeriodResponse } from './adjustments-time-period-response.js'; 8 | 9 | export interface IAdjustmentsProrationResponse { 10 | rate: string; 11 | billing_period?: IAdjustmentsTimePeriodResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/adjustment/adjustments-time-period-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentsTimePeriodResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/adjustment/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './adjustments-time-period-response.js'; 8 | export * from './adjustments-proration-response.js'; 9 | export * from './adjustment-item-response.js'; 10 | export * from './adjustment-response.js'; 11 | export * from './adjustment-credit-note-pdf.js'; 12 | -------------------------------------------------------------------------------- /src/types/business/businesses-contacts.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IBusinessContacts { 8 | name?: string | null; 9 | email: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/business/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './businesses-contacts.js'; 8 | export * from './business-response.js'; 9 | -------------------------------------------------------------------------------- /src/types/customer-portal-session/customer-portal-session-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IUrlsResponse } from './urls.js'; 8 | 9 | export interface ICustomerPortalSessionResponse { 10 | id: string; 11 | customer_id: string; 12 | urls: IUrlsResponse; 13 | created_at: string; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/customer-portal-session/customer-portal-subscription-url.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ICustomerPortalSubscriptionUrl { 8 | id: string; 9 | cancel_subscription: string; 10 | update_subscription_payment_method: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/customer-portal-session/general.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IGeneralResponse { 8 | overview: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/customer-portal-session/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './general.js'; 8 | export * from './customer-portal-subscription-url.js'; 9 | export * from './urls.js'; 10 | export * from './customer-portal-session-response.js'; 11 | -------------------------------------------------------------------------------- /src/types/customer-portal-session/urls.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IGeneralResponse } from './general.js'; 8 | import { type ICustomerPortalSubscriptionUrl } from './customer-portal-subscription-url.js'; 9 | 10 | export interface IUrlsResponse { 11 | general: IGeneralResponse; 12 | subscriptions: ICustomerPortalSubscriptionUrl[]; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/customer/auth-token-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAuthTokenResponse { 8 | customer_auth_token: string; 9 | expires_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/customer/credit-balance-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | import { type ICustomerBalance } from './customer-balance.js'; 9 | 10 | export interface ICreditBalanceResponse { 11 | customer_id?: string | null; 12 | currency_code?: CurrencyCode | null; 13 | balance?: ICustomerBalance | null; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/customer/customer-balance.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ICustomerBalance { 8 | available: string; 9 | reserved: string; 10 | used: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/customer/customer-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Status } from '../../enums/index.js'; 8 | import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; 9 | 10 | export interface ICustomerResponse { 11 | id: string; 12 | name?: string | null; 13 | email: string; 14 | marketing_consent: boolean; 15 | status: Status; 16 | custom_data?: ICustomData | null; 17 | locale: string; 18 | created_at: string; 19 | updated_at: string; 20 | import_meta?: IImportMetaResponse | null; 21 | } 22 | -------------------------------------------------------------------------------- /src/types/customer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './auth-token-response.js'; 8 | export * from './customer-response.js'; 9 | export * from './credit-balance-response.js'; 10 | export * from './customer-balance.js'; 11 | -------------------------------------------------------------------------------- /src/types/discount/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './discount-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/event-types/event-type-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IEventName } from '../../notifications/index.js'; 8 | 9 | export interface IEventTypeResponse { 10 | name: IEventName; 11 | description: string; 12 | group: string; 13 | available_versions: number[]; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/event-types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './event-type-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/events/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './events-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/notification-settings/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification-settings-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/notifications/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './notification.js'; 8 | export * from './notification-log.js'; 9 | export * from './replay-notification.js'; 10 | -------------------------------------------------------------------------------- /src/types/notifications/notification-log.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface INotificationLogResponse { 8 | id: string; 9 | response_code: number; 10 | response_content_type?: string | null; 11 | response_body: string; 12 | attempted_at: string; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/notifications/replay-notification.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IReplayNotificationResponse { 8 | notification_id: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payment-method.js'; 8 | -------------------------------------------------------------------------------- /src/types/payment-method/payment-method.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPaymentCardResponse, type IPayPalResponse } from '../index.js'; 8 | import { type SavedPaymentMethodType, type SavedPaymentOrigin } from '../../enums/index.js'; 9 | 10 | export interface IPaymentMethodResponse { 11 | id: string; 12 | customer_id: string; 13 | address_id: string; 14 | type: SavedPaymentMethodType; 15 | card?: IPaymentCardResponse | null; 16 | paypal?: IPayPalResponse | null; 17 | origin: SavedPaymentOrigin; 18 | saved_at: string; 19 | updated_at: string; 20 | } 21 | -------------------------------------------------------------------------------- /src/types/payout/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './payout-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/payout/payout-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode, type PayoutStatus } from '../../enums/index.js'; 8 | 9 | export interface IPayoutResponse { 10 | id: string; 11 | status: PayoutStatus; 12 | amount: string; 13 | currency_code: CurrencyCode; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/price/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './price-response.js'; 8 | export * from './subscription-non-catalog-price-request.js'; 9 | export * from './non-catalog-price-request.js'; 10 | -------------------------------------------------------------------------------- /src/types/pricing-preview/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './pricing-preview-response.js'; 8 | export * from './pricing-preview-details-response.js'; 9 | export * from './pricing-preview-discounts-response.js'; 10 | export * from './pricing-preview-item-response.js'; 11 | export * from './pricing-preview-line-item-response.js'; 12 | -------------------------------------------------------------------------------- /src/types/pricing-preview/pricing-preview-details-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPricingPreviewLineItemResponse } from './pricing-preview-line-item-response.js'; 8 | 9 | export interface IPricingPreviewDetailsResponse { 10 | line_items: IPricingPreviewLineItemResponse[]; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/pricing-preview/pricing-preview-discounts-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IDiscountResponse } from '../discount/index.js'; 8 | 9 | export interface IPricingPreviewDiscountsResponse { 10 | discount: IDiscountResponse; 11 | total: string; 12 | formatted_total: string; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/pricing-preview/pricing-preview-item-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IPricingPreviewItemResponse { 8 | price_id?: string | null; 9 | quantity: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/product/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './product-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/report/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './report-filters.js'; 8 | export * from './report.js'; 9 | export * from './reports-csv.js'; 10 | -------------------------------------------------------------------------------- /src/types/report/report-filters.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportFilterName, type ReportFilterOperator } from '../../enums/index.js'; 8 | 9 | export interface IReportFilters { 10 | name: ReportFilterName; 11 | operator?: null | ReportFilterOperator; 12 | value: string[] | string; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/report/report.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ReportStatus, type ReportType } from '../../enums/index.js'; 8 | import { type IReportFilters } from './report-filters.js'; 9 | 10 | export interface IReportResponse { 11 | id: string; 12 | status: ReportStatus; 13 | rows?: number | null; 14 | type: ReportType; 15 | filters: IReportFilters[]; 16 | expires_at?: string | null; 17 | created_at: string; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/report/reports-csv.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IReportCsvResponse { 8 | url: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/shared/adjustment-item-totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentItemTotals { 8 | subtotal: string; 9 | tax: string; 10 | total: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/shared/adjustment-original-amount-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentCurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface IAdjustmentOriginalAmountResponse { 10 | amount: string; 11 | currency_code: AdjustmentCurrencyCode; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/billing-details-create.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITimePeriod } from './time-period.js'; 8 | 9 | export interface IBillingDetailsCreate { 10 | enableCheckout?: boolean; 11 | purchaseOrderNumber?: string; 12 | additionalInformation?: string | null; 13 | paymentTerms: ITimePeriod; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/shared/billing-details-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITimePeriod } from './time-period.js'; 8 | 9 | export interface IBillingDetailsResponse { 10 | enable_checkout?: boolean | null; 11 | purchase_order_number?: string | null; 12 | additional_information?: string | null; 13 | payment_terms: ITimePeriod; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/shared/billing-details-update.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITimePeriod } from './time-period.js'; 8 | 9 | export interface IBillingDetailsUpdate { 10 | enableCheckout: boolean; 11 | purchaseOrderNumber: string; 12 | additionalInformation: string; 13 | paymentTerms: ITimePeriod; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/shared/chargeback-fee.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentOriginalAmountResponse } from './adjustment-original-amount-response.js'; 8 | 9 | export interface IChargebackFee { 10 | amount: string; 11 | original?: IAdjustmentOriginalAmountResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/custom-data.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export type ICustomData = object; 8 | -------------------------------------------------------------------------------- /src/types/shared/import-meta-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IImportMetaResponse { 8 | external_id?: string | null; 9 | imported_from: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/shared/money-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface IMoneyResponse { 10 | amount: string; 11 | currency_code: CurrencyCode; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/money.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface IMoney { 10 | amount: string; 11 | currencyCode: CurrencyCode; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/payment-card-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PaymentCardType } from '../../enums/index.js'; 8 | 9 | export interface IPaymentCardResponse { 10 | type: PaymentCardType; 11 | last4: string; 12 | expiry_month: number; 13 | expiry_year: number; 14 | cardholder_name: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/types/shared/payment-method-details.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PaymentType } from '../../enums/index.js'; 8 | import { type IPaymentCardResponse } from './payment-card-response.js'; 9 | 10 | export interface IPaymentMethodDetails { 11 | type: PaymentType; 12 | card?: IPaymentCardResponse | null; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/shared/payout-totals-adjustment-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IChargebackFee } from './chargeback-fee.js'; 8 | import { type PayoutCurrencyCode } from '../../enums/index.js'; 9 | 10 | export interface IPayoutTotalsAdjustmentResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | chargeback_fee?: IChargebackFee | null; 16 | earnings: string; 17 | currency_code: PayoutCurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/shared/paypal.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IPayPalResponse { 8 | email: string; 9 | reference: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/shared/price-quantity.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IPriceQuantity { 8 | minimum: number; 9 | maximum: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/shared/simulation-event-request.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISimulationEventRequest { 8 | body: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/shared/simulation-event-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISimulationEventResponse { 8 | body: string; 9 | status_code: number; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/shared/tax-rates-used-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITotals } from './totals.js'; 8 | 9 | export interface ITaxRatesUsedResponse { 10 | tax_rate: string; 11 | totals?: ITotals | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type Interval } from '../../enums/index.js'; 8 | 9 | export interface ITimePeriod { 10 | interval: Interval; 11 | frequency: number; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/total-adjustments-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface ITotalAdjustmentsResponse { 10 | subtotal: string; 11 | tax: string; 12 | total: string; 13 | fee: string; 14 | earnings: string; 15 | currency_code: CurrencyCode; 16 | } 17 | -------------------------------------------------------------------------------- /src/types/shared/totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITotals { 8 | subtotal: string; 9 | discount: string; 10 | tax: string; 11 | total: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/shared/transaction-checkout.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionCheckout { 8 | url?: string | null; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/shared/transaction-details-preview-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITaxRatesUsedResponse } from './tax-rates-used-response.js'; 8 | import { type ITransactionTotalsResponse } from './transaction-totals-response.js'; 9 | import { type ITransactionLineItemPreviewResponse } from './transaction-line-item-preview-response.js'; 10 | 11 | export interface ITransactionDetailsPreviewResponse { 12 | tax_rates_used: ITaxRatesUsedResponse[]; 13 | totals: ITransactionTotalsResponse; 14 | line_items: ITransactionLineItemPreviewResponse[]; 15 | } 16 | -------------------------------------------------------------------------------- /src/types/shared/transaction-line-item-preview-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IUnitTotals } from './unit-totals.js'; 8 | import { type ITotals } from './totals.js'; 9 | import { type IProductResponse } from '../product/index.js'; 10 | import { type IProrationResponse } from '../index.js'; 11 | 12 | export interface ITransactionLineItemPreviewResponse { 13 | price_id: string; 14 | quantity: number; 15 | tax_rate: string; 16 | unit_totals: IUnitTotals; 17 | totals: ITotals; 18 | product: IProductResponse; 19 | proration?: IProrationResponse | null; 20 | } 21 | -------------------------------------------------------------------------------- /src/types/shared/transaction-payout-totals-adjusted-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IChargebackFee } from './chargeback-fee.js'; 8 | import { type PayoutCurrencyCode } from '../../enums/index.js'; 9 | 10 | export interface ITransactionPayoutTotalsAdjustedResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | chargeback_fee?: IChargebackFee | null; 16 | earnings: string; 17 | currency_code: PayoutCurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/shared/transaction-payout-totals-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type PayoutCurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface ITransactionPayoutTotalsResponse { 10 | subtotal: string; 11 | discount: string; 12 | tax: string; 13 | total: string; 14 | credit: string; 15 | balance: string; 16 | grand_total: string; 17 | credit_to_balance: string; 18 | fee: string; 19 | earnings: string; 20 | currency_code: PayoutCurrencyCode; 21 | } 22 | -------------------------------------------------------------------------------- /src/types/shared/transaction-totals-adjusted-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface ITransactionTotalsAdjustedResponse { 10 | subtotal: string; 11 | tax: string; 12 | total: string; 13 | grand_total: string; 14 | fee?: string | null; 15 | earnings?: string | null; 16 | currency_code: CurrencyCode; 17 | } 18 | -------------------------------------------------------------------------------- /src/types/shared/transaction-totals-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CurrencyCode } from '../../enums/index.js'; 8 | 9 | export interface ITransactionTotalsResponse { 10 | subtotal: string; 11 | discount: string; 12 | tax: string; 13 | total: string; 14 | credit: string; 15 | credit_to_balance: string; 16 | balance: string; 17 | grand_total: string; 18 | fee?: string | null; 19 | earnings?: string | null; 20 | currency_code: CurrencyCode; 21 | } 22 | -------------------------------------------------------------------------------- /src/types/shared/unit-price-override-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../enums/index.js'; 8 | import { type IMoneyResponse } from './money-response.js'; 9 | 10 | export interface IUnitPriceOverrideResponse { 11 | country_codes: CountryCode[]; 12 | unit_price: IMoneyResponse; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/shared/unit-price-override.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type CountryCode } from '../../enums/index.js'; 8 | import { type IMoney } from './money.js'; 9 | 10 | export interface IUnitPriceOverride { 11 | countryCodes: CountryCode[]; 12 | unitPrice: IMoney; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/shared/unit-totals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IUnitTotals { 8 | subtotal: string; 9 | discount: string; 10 | tax: string; 11 | total: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/simulation-run-event/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run-event-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/simulation-run/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-run-response.js'; 8 | -------------------------------------------------------------------------------- /src/types/simulation-run/simulation-run-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import type { SimulationRunStatus, SimulationScenarioType } from '../../enums/index.js'; 8 | import type { IEventName } from '../../notifications/index.js'; 9 | import type { ISimulationRunEventResponse } from '../index.js'; 10 | 11 | export interface ISimulationRunResponse { 12 | id: string; 13 | status: SimulationRunStatus; 14 | created_at: string; 15 | updated_at: string; 16 | type: IEventName | SimulationScenarioType; 17 | events?: ISimulationRunEventResponse[]; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/simulation-type/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-type.js'; 8 | -------------------------------------------------------------------------------- /src/types/simulation-type/simulation-type.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type SimulationKind } from '../../enums/index.js'; 8 | import { type IEventName } from '../../notifications/index.js'; 9 | 10 | export interface ISimulationTypeResponse { 11 | name: string; 12 | label: string; 13 | description: string; 14 | group: string; 15 | type: SimulationKind; 16 | events: IEventName[]; 17 | } 18 | -------------------------------------------------------------------------------- /src/types/simulation/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export * from './simulation-response.js'; 8 | export * from './simulation-scenario-config.js'; 9 | -------------------------------------------------------------------------------- /src/types/simulation/simulation-response.ts: -------------------------------------------------------------------------------- 1 | import type { Status } from '../../enums/index.js'; 2 | import { ISimulationScenarioConfigResponse } from '../index.js'; 3 | import type { DiscriminatedSimulationEventResponse } from '../shared/simulation-payload.js'; 4 | 5 | export type ISimulationResponse = DiscriminatedSimulationEventResponse; 6 | 7 | interface BaseSimulationResponse { 8 | id: string; 9 | status: Status; 10 | notification_setting_id: string; 11 | name: string; 12 | last_run_at?: string | null; 13 | created_at: string; 14 | updated_at: string; 15 | config: ISimulationScenarioConfigResponse | null; 16 | } 17 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-discount-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISubscriptionDiscountResponse { 8 | id: string; 9 | starts_at: string | null; 10 | ends_at?: string | null; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-management-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISubscriptionManagementResponse { 8 | update_payment_method?: string | null; 9 | cancel: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-preview-update-summary.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IMoneyResponse } from '../shared/index.js'; 8 | import { type ISubscriptionResultResponse } from './subscription-result-response.js'; 9 | 10 | export interface ISubscriptionPreviewUpdateSummary { 11 | credit: IMoneyResponse; 12 | charge: IMoneyResponse; 13 | result: ISubscriptionResultResponse; 14 | } 15 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-result-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IMoneyResponse } from '../shared/index.js'; 8 | 9 | export interface ISubscriptionResultResponse extends IMoneyResponse { 10 | action: 'credit' | 'charge'; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-scheduled-change-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ScheduledChangeAction } from '../../enums/index.js'; 8 | 9 | export interface ISubscriptionScheduledChangeResponse { 10 | action: ScheduledChangeAction; 11 | effective_at: string; 12 | resume_at?: string | null; 13 | } 14 | -------------------------------------------------------------------------------- /src/types/subscription/subscription-time-period-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ISubscriptionTimePeriodResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/transaction/adjustment-totals-breakdown.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface IAdjustmentTotalsBreakdown { 8 | credit: string; 9 | refund: string; 10 | chargeback: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/types/transaction/adjustment-totals-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IAdjustmentTotalsBreakdown } from './adjustment-totals-breakdown.js'; 8 | import { type CurrencyCode } from '../../enums/index.js'; 9 | 10 | export interface IAdjustmentTotalsResponse { 11 | subtotal: string; 12 | tax: string; 13 | total: string; 14 | fee: string; 15 | earnings: string; 16 | breakdown?: IAdjustmentTotalsBreakdown | null; 17 | currency_code: CurrencyCode; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/transaction/transaction-adjustment-item-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type AdjustmentType } from '../../enums/index.js'; 8 | import { type ITransactionProrationResponse } from './transaction-proration-response.js'; 9 | import { type IAdjustmentItemTotals } from '../shared/index.js'; 10 | 11 | export interface ITransactionAdjustmentItemResponse { 12 | id?: string | null; 13 | item_id: string; 14 | type: AdjustmentType; 15 | amount?: string | null; 16 | proration?: ITransactionProrationResponse | null; 17 | totals?: IAdjustmentItemTotals | null; 18 | } 19 | -------------------------------------------------------------------------------- /src/types/transaction/transaction-invoice-pdf.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionInvoicePDF { 8 | url: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/transaction/transaction-item-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type IPriceResponse } from '../price/index.js'; 8 | import { type ITransactionProrationResponse } from './transaction-proration-response.js'; 9 | 10 | export interface ITransactionItemResponse { 11 | price_id?: string | null; 12 | price?: IPriceResponse | null; 13 | quantity: number; 14 | proration?: ITransactionProrationResponse | null; 15 | } 16 | -------------------------------------------------------------------------------- /src/types/transaction/transaction-item.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type INonCatalogPriceRequestBody } from '../price/index.js'; 8 | 9 | export interface ITransactionItemWithPriceId { 10 | priceId: string; 11 | price?: never; 12 | quantity: number; 13 | } 14 | 15 | export interface ITransactionItemWithPrice { 16 | priceId?: never; 17 | price: INonCatalogPriceRequestBody; 18 | quantity: number; 19 | } 20 | 21 | export type ITransactionItemWithNonCatalogPrice = ITransactionItemWithPriceId | ITransactionItemWithPrice; 22 | -------------------------------------------------------------------------------- /src/types/transaction/transaction-proration-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response.js'; 8 | 9 | export interface ITransactionProrationResponse { 10 | rate: string; 11 | billing_period?: ITransactionsTimePeriodResponse | null; 12 | } 13 | -------------------------------------------------------------------------------- /src/types/transaction/transactions-time-period-response.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionsTimePeriodResponse { 8 | starts_at: string; 9 | ends_at: string; 10 | } 11 | -------------------------------------------------------------------------------- /src/types/transaction/transactions-time-period.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ! Autogenerated code ! 3 | * Do not make changes to this file. 4 | * Changes may be overwritten as part of auto-generation. 5 | */ 6 | 7 | export interface ITransactionsTimePeriod { 8 | startsAt: string; 9 | endsAt: string; 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist/cjs", 5 | "module": "commonjs" 6 | }, 7 | "exclude": ["**/__tests__/**", "./src/index.esm.node.ts", "./src/index.esm.edge.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist/esm", 5 | "module": "esnext" 6 | }, 7 | "exclude": ["**/__tests__/**", "src/index.cjs.edge.ts", "src/index.cjs.node.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.types.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist/types", 5 | "declaration": true, 6 | "moduleResolution": "NodeNext", 7 | "emitDeclarationOnly": true 8 | }, 9 | "exclude": ["**/__tests__/**", "./src/index.cjs.edge.ts", "./src/index.esm.node.ts", "./src/index.esm.edge.ts"] 10 | } 11 | --------------------------------------------------------------------------------