diff --git a/.eslintrc.yml b/.eslintrc.yml index 2720107..c74ebbf 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -22,3 +22,4 @@ rules: ignorePatterns: - 'jest.config.js' - '**/__tests__/**' + - 'index.esm.*.ts' diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..afb327f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: "weekly" + day: "monday" + time: "08:00" + groups: + npm: + patterns: + - "*" diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b8d8376..cb0546f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -4,12 +4,12 @@ on: push: branches: - main - - v1.X + - v1.x - release/beta pull_request: branches: - main - - v1.X + - v1.x - release/beta concurrency: @@ -20,19 +20,21 @@ jobs: run-build-test: name: Run Build & test runs-on: ubuntu-latest - + strategy: + matrix: + node: [ 18, 20, 22 ] permissions: contents: read actions: write steps: - name: Check out git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: lts/* + node-version: ${{ matrix.node }} cache: "yarn" - name: Install yarn dependencies diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9a2a5a9..808e2a1 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -4,12 +4,12 @@ on: push: branches: - main - - v1.X + - v1.x - release/beta pull_request: branches: - main - - v1.X + - v1.x - release/beta concurrency: @@ -27,10 +27,10 @@ jobs: steps: - name: Check out git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: lts/* cache: "yarn" diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml deleted file mode 100644 index 56cf163..0000000 --- a/.github/workflows/publish-beta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Publish to Beta Tag - -on: - push: - branches: - - release/beta - -jobs: - run-publish: - name: Run publish - runs-on: ubuntu-latest - - permissions: - contents: read - actions: write - - steps: - - name: Check out git repository - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: lts/* - cache: "yarn" - registry-url: 'https://registry.npmjs.org' - - - name: Install yarn dependencies - run: yarn install - - - name: Build - run: yarn build - - - name: Test - run: yarn test - - - name: Publish - run: yarn publish:beta - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-latest.yml b/.github/workflows/publish.yml similarity index 68% rename from .github/workflows/publish-latest.yml rename to .github/workflows/publish.yml index c0a1923..3ad75f7 100644 --- a/.github/workflows/publish-latest.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v1.x jobs: run-publish: @@ -16,10 +17,10 @@ jobs: steps: - name: Check out git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: lts/* cache: "yarn" @@ -35,6 +36,12 @@ jobs: run: yarn test - name: Publish - run: yarn publish:latest + run: | + VERSION=$(node -p "require('./package.json').version" ) + if [[ "$VERSION" =~ (rc) ]]; then + yarn publish:rc + else + yarn publish:latest + fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-on-push.yml b/.github/workflows/release-on-push.yml index 1d1a457..704b7ad 100644 --- a/.github/workflows/release-on-push.yml +++ b/.github/workflows/release-on-push.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v1.x jobs: release_on_push: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c890ed..9691d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,23 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards. +## 2.0.0-rc.0 - 2024-09-26 + +> **Breaking changes:** This version includes major improvements that introduce breaking changes. These are called out below. + +### Added + +- Added support for edge runtime. + +### Changed + +- **Breaking change:** Updated the minimum required Node.js version to v18. +- **Breaking change:** `Webhooks.unmarshal` and `Webhooks.isSignatureValid` now returns a promise. +- Enabled conditional exports based on runtimes. +- Switched from `node-fetch` to native `fetch` API. + +--- + ## 1.7.0 - 2024-09-18 ### Fixed diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 0000000..865fac3 --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,17 @@ +# Upgrading + +All breaking changes will be documented in this file to assist with upgrading to newer versions of the SDK. + +## v2.0.0 + +There are two breaking changes in this release: + +1. Minimum Node.js version is now 18.0.0. + - We had to restrict the minimum version as we would like to use native `fetch` API instead of `node-fetch` package. + - If you are using Node.js version 16 or below, you will need to upgrade to Node.js version 18 or above. + +2. `Webhooks.unmarshal` and `Webhooks.isSignatureValid` now returns a promise. + - As we started supporting edge runtimes, we had to make these methods async as the edge version of crypto returns a promise. + - If you are using these methods, you will need to update your code to handle the promise. + +--- \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 7316f68..25ddf33 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,6 +9,9 @@ const config = { testMatch: ['**/__tests__/**/*.test.ts'], testPathIgnorePatterns: ['/node_modules/', '/dist/'], cacheDirectory: process.env.JEST_CACHE_FOLDER || '/tmp/node-sdk/.jest-cache', + moduleNameMapper: { + '(.+)\\.js': '$1', + }, coveragePathIgnorePatterns: [ '/src/types/', '__tests__', diff --git a/package.json b/package.json index 8ce6101..0a0f779 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,27 @@ { "name": "@paddle/paddle-node-sdk", - "version": "1.7.0", + "version": "2.0.0-rc.0", "description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", + "main": "dist/cjs/index.cjs.node.js", + "module": "dist/esm/index.esm.node.js", + "types": "dist/types/index.cjs.node.d.ts", + "engines": { + "node": ">=18" + }, "scripts": { "test": "jest", "prebuild": "node ./scripts/update-env-vars.js", - "build": "yarn clean && tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json", + "build": "yarn clean && yarn build-esm && yarn build-cjs && yarn build-types", + "build-esm": "tsc -b tsconfig.esm.json && echo '{\"type\":\"module\"}' > ./dist/esm/package.json", + "build-cjs": "tsc -b tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", + "build-types": "tsc -b tsconfig.types.json", "prettier": "prettier --check ./src", "prettier:fix": "prettier --check ./src --write", "lint": "eslint --ext .ts,.tsx ./src", "lint:fix": "eslint --ext .ts,.tsx ./src --fix", "clean": "rm -rf ./dist", - "release:beta": "yarn version --prerelease --preid beta --no-git-tag-version --no-commit-hooks", - "publish:beta": "yarn publish --tag beta --access public", + "release:rc": "yarn version --prerelease --preid rc --no-git-tag-version --no-commit-hooks", + "publish:beta": "yarn publish --tag rc --access public", "publish:latest": "yarn publish --access public" }, "files": [ @@ -28,6 +34,11 @@ "author": "paddle.com", "license": "Apache-2.0", "homepage": "https://developer.paddle.com/api-reference/overview", + "repository": { + "type": "git", + "url": "https://github.com/PaddleHQ/paddle-node-sdk.git" + }, + "bugs": "https://github.com/PaddleHQ/paddle-node-sdk/issues", "devDependencies": { "@babel/core": "^7.23.0", "@babel/preset-env": "^7.22.20", @@ -35,7 +46,6 @@ "@types/jest": "^29.5.6", "@types/lodash": "^4.14.202", "@types/node": "^20.6.0", - "@types/node-fetch": "^2.6.6", "@typescript-eslint/eslint-plugin": "^6.4.0", "babel-jest": "^29.7.0", "dotenv": "^16.3.1", @@ -49,7 +59,17 @@ "typescript": "^5.2.2" }, "dependencies": { - "lodash": "^4.17.21", - "node-fetch": "^2.7.0" + "lodash": "^4.17.21" + }, + "exports": { + "types": "./dist/types/index.cjs.node.d.ts", + "worker": { + "import": "./dist/esm/index.esm.edge.js", + "require": "./dist/cjs/index.cjs.edge.js" + }, + "default": { + "import": "./dist/esm/index.esm.node.js", + "require": "./dist/cjs/index.cjs.node.js" + } } } diff --git a/src/__tests__/helpers/test-client.ts b/src/__tests__/helpers/test-client.ts index 1c0b450..d24b19c 100644 --- a/src/__tests__/helpers/test-client.ts +++ b/src/__tests__/helpers/test-client.ts @@ -1,5 +1,5 @@ -import { Client } from '../../internal/api/client'; -import { Environment } from '../../internal'; +import { Client } from '../../internal/api/client.js'; +import { Environment } from '../../internal/index.js'; export function getPaddleTestClient() { return new Client('TEST_API_KEY', { environment: Environment.sandbox }); diff --git a/src/__tests__/internal/logger.test.ts b/src/__tests__/internal/logger.test.ts index a91ba31..4bf4146 100644 --- a/src/__tests__/internal/logger.test.ts +++ b/src/__tests__/internal/logger.test.ts @@ -1,6 +1,6 @@ -import { LogLevel } from '../../internal'; -import { Logger } from '../../internal/base/logger'; import { type Response } from 'node-fetch'; +import { LogLevel } from '../../internal/index.js'; +import { Logger } from '../../internal/base/logger.js'; describe('logger', () => { afterEach(() => { diff --git a/src/__tests__/internal/paddle.test.ts b/src/__tests__/internal/paddle.test.ts index ae938e5..f8c5333 100644 --- a/src/__tests__/internal/paddle.test.ts +++ b/src/__tests__/internal/paddle.test.ts @@ -1,4 +1,4 @@ -import { Environment, Paddle } from '../../index'; +import { Environment, Paddle } from '../../index.cjs.node.js'; describe('Paddle', () => { test('Paddle class can be constructed', () => { diff --git a/src/__tests__/mocks/notifications/address-created.mock.ts b/src/__tests__/mocks/notifications/address-created.mock.ts index 44acfdd..c6c1ee0 100644 --- a/src/__tests__/mocks/notifications/address-created.mock.ts +++ b/src/__tests__/mocks/notifications/address-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IAddressNotificationResponse } from '../../../notifications'; +import { type IEventsResponse } from '../../../types/index.js'; +import { IAddressNotificationResponse } from '../../../notifications/index.js'; export const AddressCreatedMock: IEventsResponse = { event_id: 'evt_01h848pezaj15tkt3dsa36xe59', diff --git a/src/__tests__/mocks/notifications/address-imported.mock.ts b/src/__tests__/mocks/notifications/address-imported.mock.ts index 50ca7c3..e18f6bf 100644 --- a/src/__tests__/mocks/notifications/address-imported.mock.ts +++ b/src/__tests__/mocks/notifications/address-imported.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IAddressNotificationResponse } from '../../../notifications'; +import { IAddressNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const AddressImportedMock: IEventsResponse = { event_id: 'evt_01hhy7cva3jgaez82k6n4n3x4b', diff --git a/src/__tests__/mocks/notifications/address-updated.mock.ts b/src/__tests__/mocks/notifications/address-updated.mock.ts index 709f4f4..33fd8ed 100644 --- a/src/__tests__/mocks/notifications/address-updated.mock.ts +++ b/src/__tests__/mocks/notifications/address-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IAddressNotificationResponse } from '../../../notifications'; +import { IAddressNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const AddressUpdatedMock: IEventsResponse = { event_id: 'evt_01h849k5rs5jxgctb45s6pmkat', diff --git a/src/__tests__/mocks/notifications/adjustment-created.mock.ts b/src/__tests__/mocks/notifications/adjustment-created.mock.ts index 700834e..2ab6c82 100644 --- a/src/__tests__/mocks/notifications/adjustment-created.mock.ts +++ b/src/__tests__/mocks/notifications/adjustment-created.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IAdjustmentResponse } from '../../../types'; +import { IAdjustmentResponse, IEventsResponse } from '../../../types/index.js'; export const AdjustmentCreatedMock: IEventsResponse = { event_id: 'evt_01h8c6tc8aa58zqj6h8a13r103', diff --git a/src/__tests__/mocks/notifications/adjustment-updated.mock.ts b/src/__tests__/mocks/notifications/adjustment-updated.mock.ts index c2cf1eb..0a74ec7 100644 --- a/src/__tests__/mocks/notifications/adjustment-updated.mock.ts +++ b/src/__tests__/mocks/notifications/adjustment-updated.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IAdjustmentResponse } from '../../../types'; +import { IAdjustmentResponse, IEventsResponse } from '../../../types/index.js'; export const AdjustmentUpdatedMock: IEventsResponse = { event_id: 'evt_01h8c6wz4ac017hxdehrgdvpz4', diff --git a/src/__tests__/mocks/notifications/business-created.mock.ts b/src/__tests__/mocks/notifications/business-created.mock.ts index 80de60e..f7d605d 100644 --- a/src/__tests__/mocks/notifications/business-created.mock.ts +++ b/src/__tests__/mocks/notifications/business-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IBusinessNotificationResponse } from '../../../notifications'; +import { IBusinessNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const BusinessCreatedMock: IEventsResponse = { event_id: 'evt_01h84a7j1cpqtrcdqs63ph1pqe', diff --git a/src/__tests__/mocks/notifications/business-imported.mock.ts b/src/__tests__/mocks/notifications/business-imported.mock.ts index da75853..35062fc 100644 --- a/src/__tests__/mocks/notifications/business-imported.mock.ts +++ b/src/__tests__/mocks/notifications/business-imported.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IBusinessNotificationResponse } from '../../../notifications'; +import { IBusinessNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const BusinessImportedMock: IEventsResponse = { event_id: 'evt_01hhvz7k9kekw1wfxw8v8gbqcy', diff --git a/src/__tests__/mocks/notifications/business-updated.mock.ts b/src/__tests__/mocks/notifications/business-updated.mock.ts index 611aefa..5a7706b 100644 --- a/src/__tests__/mocks/notifications/business-updated.mock.ts +++ b/src/__tests__/mocks/notifications/business-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IBusinessNotificationResponse } from '../../../notifications'; +import { IBusinessNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const BusinessUpdatedMock: IEventsResponse = { event_id: 'evt_01h84b8sq18asjb0m3tvn4g0dn', diff --git a/src/__tests__/mocks/notifications/customer-created.mock.ts b/src/__tests__/mocks/notifications/customer-created.mock.ts index a634eac..25deed0 100644 --- a/src/__tests__/mocks/notifications/customer-created.mock.ts +++ b/src/__tests__/mocks/notifications/customer-created.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type ICustomerResponse } from '../../../types'; +import { ICustomerResponse, IEventsResponse } from '../../../types/index.js'; export const CustomerCreatedMock: IEventsResponse = { event_id: 'evt_01h8441jx8x1q971q9ksksqh82', diff --git a/src/__tests__/mocks/notifications/customer-imported.mock.ts b/src/__tests__/mocks/notifications/customer-imported.mock.ts index 94cdeaf..e209459 100644 --- a/src/__tests__/mocks/notifications/customer-imported.mock.ts +++ b/src/__tests__/mocks/notifications/customer-imported.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type ICustomerResponse } from '../../../types'; +import { ICustomerResponse, IEventsResponse } from '../../../types/index.js'; export const CustomerImportedMock: IEventsResponse = { event_id: 'evt_01hhvz7k8twkw75ez34836tj0x', diff --git a/src/__tests__/mocks/notifications/customer-updated.mock.ts b/src/__tests__/mocks/notifications/customer-updated.mock.ts index 786e585..b9c5883 100644 --- a/src/__tests__/mocks/notifications/customer-updated.mock.ts +++ b/src/__tests__/mocks/notifications/customer-updated.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type ICustomerResponse } from '../../../types'; +import { ICustomerResponse, IEventsResponse } from '../../../types/index.js'; export const CustomerUpdatedMock: IEventsResponse = { event_id: 'evt_01h845v9ynfsazmdq3wntb3dzt', diff --git a/src/__tests__/mocks/notifications/discount-created.mock.ts b/src/__tests__/mocks/notifications/discount-created.mock.ts index 89e5a14..38067c6 100644 --- a/src/__tests__/mocks/notifications/discount-created.mock.ts +++ b/src/__tests__/mocks/notifications/discount-created.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IDiscountResponse } from '../../../types'; +import { IDiscountResponse, IEventsResponse } from '../../../types/index.js'; export const DiscountCreatedMock: IEventsResponse = { event_id: 'evt_01h8441jx8x1q971q9ksksqh82', diff --git a/src/__tests__/mocks/notifications/discount-imported.mock.ts b/src/__tests__/mocks/notifications/discount-imported.mock.ts index 296af75..4a8cc08 100644 --- a/src/__tests__/mocks/notifications/discount-imported.mock.ts +++ b/src/__tests__/mocks/notifications/discount-imported.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IDiscountResponse } from '../../../types'; +import { IDiscountResponse, IEventsResponse } from '../../../types/index.js'; export const DiscountImportedMock: IEventsResponse = { event_id: 'evt_01hdnnd4x84s4r5br068y3rm6d', diff --git a/src/__tests__/mocks/notifications/discount-updated.mock.ts b/src/__tests__/mocks/notifications/discount-updated.mock.ts index 080867f..2c0f6a1 100644 --- a/src/__tests__/mocks/notifications/discount-updated.mock.ts +++ b/src/__tests__/mocks/notifications/discount-updated.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IDiscountResponse } from '../../../types'; +import { IDiscountResponse, IEventsResponse } from '../../../types/index.js'; export const DiscountUpdatedMock: IEventsResponse = { event_id: 'evt_01h90nmenze2c4yv1sfnx5ye17', diff --git a/src/__tests__/mocks/notifications/payout-created.mock.ts b/src/__tests__/mocks/notifications/payout-created.mock.ts index 620687c..f106530 100644 --- a/src/__tests__/mocks/notifications/payout-created.mock.ts +++ b/src/__tests__/mocks/notifications/payout-created.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IPayoutResponse } from '../../../types'; +import { IEventsResponse, IPayoutResponse } from '../../../types/index.js'; export const PayoutCreatedMock: IEventsResponse = { event_id: 'evt_01h2b06f69w9aw3eymqs1dfa2q', diff --git a/src/__tests__/mocks/notifications/payout-paid.mock.ts b/src/__tests__/mocks/notifications/payout-paid.mock.ts index 1803e57..4ed3f4e 100644 --- a/src/__tests__/mocks/notifications/payout-paid.mock.ts +++ b/src/__tests__/mocks/notifications/payout-paid.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IPayoutResponse } from '../../../types'; +import { IEventsResponse, IPayoutResponse } from '../../../types/index.js'; export const PayoutPaidMock: IEventsResponse = { event_id: 'evt_01h2b0tqg1xkgnkfmprsnrjn0s', diff --git a/src/__tests__/mocks/notifications/price-created.mock.ts b/src/__tests__/mocks/notifications/price-created.mock.ts index 3855218..cc1519b 100644 --- a/src/__tests__/mocks/notifications/price-created.mock.ts +++ b/src/__tests__/mocks/notifications/price-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IPriceNotificationResponse } from '../../../notifications'; +import { IPriceNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const PriceCreatedMock: IEventsResponse = { event_id: 'evt_01h7zd9n8vch227m3dgwqcvf6t', diff --git a/src/__tests__/mocks/notifications/price-imported.mock.ts b/src/__tests__/mocks/notifications/price-imported.mock.ts index 68801f7..136c134 100644 --- a/src/__tests__/mocks/notifications/price-imported.mock.ts +++ b/src/__tests__/mocks/notifications/price-imported.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IPriceNotificationResponse } from '../../../notifications'; +import { IPriceNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const PriceImportedMock: IEventsResponse = { event_id: 'evt_01hgarz844zdfws6djn9rz6qm7', diff --git a/src/__tests__/mocks/notifications/price-updated.mock.ts b/src/__tests__/mocks/notifications/price-updated.mock.ts index 41c27d6..14c0bfa 100644 --- a/src/__tests__/mocks/notifications/price-updated.mock.ts +++ b/src/__tests__/mocks/notifications/price-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IPriceNotificationResponse } from '../../../notifications'; +import { IPriceNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const PriceUpdatedMock: IEventsResponse = { event_id: 'evt_01h83wg1aqxmf897qqb47tre5s', diff --git a/src/__tests__/mocks/notifications/product-created.mock.ts b/src/__tests__/mocks/notifications/product-created.mock.ts index 6835ad2..f5b1966 100644 --- a/src/__tests__/mocks/notifications/product-created.mock.ts +++ b/src/__tests__/mocks/notifications/product-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IProductNotificationResponse } from '../../../notifications'; +import { IProductNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const ProductCreatedMock: IEventsResponse = { event_id: 'evt_01h7zcgmnv3ee9cqrj9fpww3mg', diff --git a/src/__tests__/mocks/notifications/product-imported.mock.ts b/src/__tests__/mocks/notifications/product-imported.mock.ts index 2559a5b..817c65e 100644 --- a/src/__tests__/mocks/notifications/product-imported.mock.ts +++ b/src/__tests__/mocks/notifications/product-imported.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IProductNotificationResponse } from '../../../notifications'; +import { IProductNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const ProductImportedMock: IEventsResponse = { event_id: 'evt_01hgas2cm8r02nxryp83jqvg6k', diff --git a/src/__tests__/mocks/notifications/product-updated.mock.ts b/src/__tests__/mocks/notifications/product-updated.mock.ts index 4ff2395..e2141e4 100644 --- a/src/__tests__/mocks/notifications/product-updated.mock.ts +++ b/src/__tests__/mocks/notifications/product-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { IProductNotificationResponse } from '../../../notifications'; +import { IProductNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const ProductUpdatedMock: IEventsResponse = { event_id: 'evt_01h7zcr13xte50ncas1jkgpbfk', diff --git a/src/__tests__/mocks/notifications/report-created.mock.ts b/src/__tests__/mocks/notifications/report-created.mock.ts index dac4809..9f4051b 100644 --- a/src/__tests__/mocks/notifications/report-created.mock.ts +++ b/src/__tests__/mocks/notifications/report-created.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IReportResponse } from '../../../types'; +import { IEventsResponse, IReportResponse } from '../../../types/index.js'; export const ReportCreatedMock: IEventsResponse = { event_id: 'evt_01hhq4c3nf0jrz7c46k4d8bc0x', diff --git a/src/__tests__/mocks/notifications/report-updated.mock.ts b/src/__tests__/mocks/notifications/report-updated.mock.ts index aee0640..bca54a9 100644 --- a/src/__tests__/mocks/notifications/report-updated.mock.ts +++ b/src/__tests__/mocks/notifications/report-updated.mock.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse, type IReportResponse } from '../../../types'; +import { IEventsResponse, IReportResponse } from '../../../types/index.js'; export const ReportUpdatedMock: IEventsResponse = { event_id: 'evt_01hhq4ck8bcaw47kyy3bk2vs8v', diff --git a/src/__tests__/mocks/notifications/subscription-activated.mock.ts b/src/__tests__/mocks/notifications/subscription-activated.mock.ts index 01c5e86..5a1c8c4 100644 --- a/src/__tests__/mocks/notifications/subscription-activated.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-activated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionActivatedMock: IEventsResponse = { event_id: 'evt_01h7ht60mmw6d4sf4h38g3t4yq', diff --git a/src/__tests__/mocks/notifications/subscription-canceled.mock.ts b/src/__tests__/mocks/notifications/subscription-canceled.mock.ts index 3778f00..44129d8 100644 --- a/src/__tests__/mocks/notifications/subscription-canceled.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-canceled.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionCanceledMock: IEventsResponse = { event_id: 'evt_01h7jk37p1ezj1k5b4kt83t35j', diff --git a/src/__tests__/mocks/notifications/subscription-created.mock.ts b/src/__tests__/mocks/notifications/subscription-created.mock.ts index cf3ceb8..0ee0340 100644 --- a/src/__tests__/mocks/notifications/subscription-created.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionCreatedMock: IEventsResponse = { event_id: 'evt_01h7ht60jy5hpdv5x8tfsaxje4', diff --git a/src/__tests__/mocks/notifications/subscription-imported.mock.ts b/src/__tests__/mocks/notifications/subscription-imported.mock.ts index 9adbf1d..c151107 100644 --- a/src/__tests__/mocks/notifications/subscription-imported.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-imported.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionImportedMock: IEventsResponse = { event_id: 'evt_01gxwxwnghn8xa7amfwqb0992q', diff --git a/src/__tests__/mocks/notifications/subscription-past-due.mock.ts b/src/__tests__/mocks/notifications/subscription-past-due.mock.ts index 2e51233..4d24c29 100644 --- a/src/__tests__/mocks/notifications/subscription-past-due.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-past-due.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionPastDueMock: IEventsResponse = { event_id: 'evt_01h7jagte1wnq80w5bw5gbmrwk', diff --git a/src/__tests__/mocks/notifications/subscription-paused.mock.ts b/src/__tests__/mocks/notifications/subscription-paused.mock.ts index 9526606..b2ca12f 100644 --- a/src/__tests__/mocks/notifications/subscription-paused.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-paused.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionPausedMock: IEventsResponse = { event_id: 'evt_01h7jcst3syp03dk5f0m8h204f', diff --git a/src/__tests__/mocks/notifications/subscription-resumed.mock.ts b/src/__tests__/mocks/notifications/subscription-resumed.mock.ts index 238b952..ed0430e 100644 --- a/src/__tests__/mocks/notifications/subscription-resumed.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-resumed.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionResumedMock: IEventsResponse = { event_id: 'evt_01h7je74dkvjc4b2pt8sgsfm7f', diff --git a/src/__tests__/mocks/notifications/subscription-trialing.mock.ts b/src/__tests__/mocks/notifications/subscription-trialing.mock.ts index a5c6442..882da58 100644 --- a/src/__tests__/mocks/notifications/subscription-trialing.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-trialing.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionTrialingMock: IEventsResponse = { event_id: 'evt_01h84cka4p40e737vm1ajb2bc5', diff --git a/src/__tests__/mocks/notifications/subscription-updated.mock.ts b/src/__tests__/mocks/notifications/subscription-updated.mock.ts index c80fc4d..15fe50f 100644 --- a/src/__tests__/mocks/notifications/subscription-updated.mock.ts +++ b/src/__tests__/mocks/notifications/subscription-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ISubscriptionNotificationResponse } from '../../../notifications'; +import { ISubscriptionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const SubscriptionUpdatedMock: IEventsResponse = { event_id: 'evt_01h7j296f40h99m4dcrr6h4as8', diff --git a/src/__tests__/mocks/notifications/transaction-billed.mock.ts b/src/__tests__/mocks/notifications/transaction-billed.mock.ts index 7757448..fe27921 100644 --- a/src/__tests__/mocks/notifications/transaction-billed.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-billed.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionBilledMock: IEventsResponse = { event_id: 'evt_01h8e3a5029s6xrd5qj89beawp', diff --git a/src/__tests__/mocks/notifications/transaction-canceled.mock.ts b/src/__tests__/mocks/notifications/transaction-canceled.mock.ts index 5adb309..02ac3ca 100644 --- a/src/__tests__/mocks/notifications/transaction-canceled.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-canceled.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionCanceledMock: IEventsResponse = { event_id: 'evt_01h8e3dvbz4y98ge4q3raptg16', diff --git a/src/__tests__/mocks/notifications/transaction-completed.mock.ts b/src/__tests__/mocks/notifications/transaction-completed.mock.ts index cef7ced..a26e82f 100644 --- a/src/__tests__/mocks/notifications/transaction-completed.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-completed.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionCompletedMock: IEventsResponse = { event_id: 'evt_01h8e1jxjnw9ra6zarhnz1a7y1', diff --git a/src/__tests__/mocks/notifications/transaction-created.mock.ts b/src/__tests__/mocks/notifications/transaction-created.mock.ts index fd208c5..6180623 100644 --- a/src/__tests__/mocks/notifications/transaction-created.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-created.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionCreatedMock: IEventsResponse = { event_id: 'evt_01h8dzxgzb5af0yzd0mv5v11e2', diff --git a/src/__tests__/mocks/notifications/transaction-paid.mock.ts b/src/__tests__/mocks/notifications/transaction-paid.mock.ts index 37fd34d..b2030e3 100644 --- a/src/__tests__/mocks/notifications/transaction-paid.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-paid.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionPaidMock: IEventsResponse = { data: { diff --git a/src/__tests__/mocks/notifications/transaction-past-due.mock.ts b/src/__tests__/mocks/notifications/transaction-past-due.mock.ts index a6cc5d8..01ec990 100644 --- a/src/__tests__/mocks/notifications/transaction-past-due.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-past-due.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionPastDueMock: IEventsResponse = { event_id: 'evt_01h8e2sys80rn6y8xz31mstgt9', diff --git a/src/__tests__/mocks/notifications/transaction-payment-failed.mock.ts b/src/__tests__/mocks/notifications/transaction-payment-failed.mock.ts index 22c5efb..177b264 100644 --- a/src/__tests__/mocks/notifications/transaction-payment-failed.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-payment-failed.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionPaymentFailedMock: IEventsResponse = { event_id: 'evt_01h8e1exw67n96j6n0h3k2qq5x', diff --git a/src/__tests__/mocks/notifications/transaction-ready.mock.ts b/src/__tests__/mocks/notifications/transaction-ready.mock.ts index cb7ac75..b7d2f80 100644 --- a/src/__tests__/mocks/notifications/transaction-ready.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-ready.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionReadyMock: IEventsResponse = { event_id: 'evt_01h8e18cwy7atj440tjms1k8dk', diff --git a/src/__tests__/mocks/notifications/transaction-updated.mock.ts b/src/__tests__/mocks/notifications/transaction-updated.mock.ts index f97363b..8835a31 100644 --- a/src/__tests__/mocks/notifications/transaction-updated.mock.ts +++ b/src/__tests__/mocks/notifications/transaction-updated.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { ITransactionNotificationResponse } from '../../../notifications'; +import { ITransactionNotificationResponse } from '../../../notifications/index.js'; +import { IEventsResponse } from '../../../types/index.js'; export const TransactionUpdatedMock: IEventsResponse = { event_id: 'evt_01h8e43a7vf4qxy0waredf267h', diff --git a/src/__tests__/mocks/resources/addresses.mock.ts b/src/__tests__/mocks/resources/addresses.mock.ts index 1661ea8..e4ed497 100644 --- a/src/__tests__/mocks/resources/addresses.mock.ts +++ b/src/__tests__/mocks/resources/addresses.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IAddressResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateAddressRequestBody, UpdateAddressRequestBody } from '../../../resources'; +import { CreateAddressRequestBody, UpdateAddressRequestBody } from '../../../resources/index.js'; +import { IAddressResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateAddressMock: CreateAddressRequestBody = { countryCode: 'AD', diff --git a/src/__tests__/mocks/resources/adjustments.mock.ts b/src/__tests__/mocks/resources/adjustments.mock.ts index 69f5ac6..7785e06 100644 --- a/src/__tests__/mocks/resources/adjustments.mock.ts +++ b/src/__tests__/mocks/resources/adjustments.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IAdjustmentResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateAdjustmentRequestBody } from '../../../resources'; +import { CreateAdjustmentRequestBody } from '../../../resources/index.js'; +import { IAdjustmentResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateAdjustmentMock: CreateAdjustmentRequestBody = { action: 'credit', diff --git a/src/__tests__/mocks/resources/businesses.mock.ts b/src/__tests__/mocks/resources/businesses.mock.ts index 1d681a5..ad7ce30 100644 --- a/src/__tests__/mocks/resources/businesses.mock.ts +++ b/src/__tests__/mocks/resources/businesses.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { IBusinessResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; +import { IBusinessResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const UpdateBusinessMock = { name: 'Maryjane', diff --git a/src/__tests__/mocks/resources/customers.mock.ts b/src/__tests__/mocks/resources/customers.mock.ts index afef83f..ec1b7d9 100644 --- a/src/__tests__/mocks/resources/customers.mock.ts +++ b/src/__tests__/mocks/resources/customers.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICreditBalanceResponse, ICustomerResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; +import { ICreditBalanceResponse, ICustomerResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const UpdateCustomerMock = { name: 'Casper', diff --git a/src/__tests__/mocks/resources/discounts.mock.ts b/src/__tests__/mocks/resources/discounts.mock.ts index 167f8a9..c6b43fd 100644 --- a/src/__tests__/mocks/resources/discounts.mock.ts +++ b/src/__tests__/mocks/resources/discounts.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IDiscountResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateDiscountRequestBody, UpdateDiscountRequestBody } from '../../../resources'; +import { CreateDiscountRequestBody, UpdateDiscountRequestBody } from '../../../resources/index.js'; +import { IDiscountResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateDiscountMock: CreateDiscountRequestBody = { amount: '1000', diff --git a/src/__tests__/mocks/resources/event-types.mock.ts b/src/__tests__/mocks/resources/event-types.mock.ts index 41f4c7c..d22da12 100644 --- a/src/__tests__/mocks/resources/event-types.mock.ts +++ b/src/__tests__/mocks/resources/event-types.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { IEventTypeResponse } from '../../../types'; -import { Response } from '../../../internal'; +import { IEventTypeResponse } from '../../../types/index.js'; +import { Response } from '../../../internal/index.js'; export const EventTypesMock: IEventTypeResponse[] = [ { diff --git a/src/__tests__/mocks/resources/events.mock.ts b/src/__tests__/mocks/resources/events.mock.ts index ac0d13e..df37529 100644 --- a/src/__tests__/mocks/resources/events.mock.ts +++ b/src/__tests__/mocks/resources/events.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { IEventsResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; +import { IEventsResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const EventMock: IEventsResponse = { event_id: 'evt_01hj32ak5egqkzw5hxrf3vjgw3', diff --git a/src/__tests__/mocks/resources/notification-settings.mock.ts b/src/__tests__/mocks/resources/notification-settings.mock.ts index 767abdb..0a50890 100644 --- a/src/__tests__/mocks/resources/notification-settings.mock.ts +++ b/src/__tests__/mocks/resources/notification-settings.mock.ts @@ -4,9 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ -import { INotificationSettingsResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateNotificationSettingsRequestBody, UpdateNotificationSettingsRequestBody } from '../../../resources'; +import { + CreateNotificationSettingsRequestBody, + UpdateNotificationSettingsRequestBody, +} from '../../../resources/index.js'; +import { INotificationSettingsResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateNotificationSettingsMock: CreateNotificationSettingsRequestBody = { description: 'considero conscendo tenax centum consuasor vehemens tardus cursus uxor vobis', diff --git a/src/__tests__/mocks/resources/notifications.mock.ts b/src/__tests__/mocks/resources/notifications.mock.ts index a6d3857..4ee5139 100644 --- a/src/__tests__/mocks/resources/notifications.mock.ts +++ b/src/__tests__/mocks/resources/notifications.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type INotificationLogResponse, INotificationResponse, type IReplayNotificationResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { EventName } from '../../../notifications'; +import { INotificationLogResponse, INotificationResponse, IReplayNotificationResponse } from '../../../types/index.js'; +import { EventName } from '../../../notifications/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const NotificationMock: INotificationResponse = { id: 'ntf_01ghbkd0frb9k95cnhwd1bxpvk', diff --git a/src/__tests__/mocks/resources/prices.mock.ts b/src/__tests__/mocks/resources/prices.mock.ts index 7ea9008..85c9f0a 100644 --- a/src/__tests__/mocks/resources/prices.mock.ts +++ b/src/__tests__/mocks/resources/prices.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IPriceResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreatePriceRequestBody, UpdatePriceRequestBody } from '../../../resources'; +import { CreatePriceRequestBody, UpdatePriceRequestBody } from '../../../resources/index.js'; +import { IPriceResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreatePriceMock: CreatePriceRequestBody = { description: 'calculus acsi explicabo spargo vergo cur defluo laboriosam curvo aqua', diff --git a/src/__tests__/mocks/resources/pricing-preview.mock.ts b/src/__tests__/mocks/resources/pricing-preview.mock.ts index f68d6aa..8bc0915 100644 --- a/src/__tests__/mocks/resources/pricing-preview.mock.ts +++ b/src/__tests__/mocks/resources/pricing-preview.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IPricingPreviewResponse } from '../../../types'; -import { Response } from '../../../internal'; -import { PricingPreviewRequestBody } from '../../../resources'; +import { PricingPreviewRequestBody } from '../../../resources/index.js'; +import { IPricingPreviewResponse } from '../../../types/index.js'; +import { Response } from '../../../internal/index.js'; export const PricingPreviewRequest: PricingPreviewRequestBody = { currencyCode: 'USD', diff --git a/src/__tests__/mocks/resources/products.mock.ts b/src/__tests__/mocks/resources/products.mock.ts index 0eaf956..ad5d7e7 100644 --- a/src/__tests__/mocks/resources/products.mock.ts +++ b/src/__tests__/mocks/resources/products.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { IProductResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateProductRequestBody, UpdateProductRequestBody } from '../../../resources'; +import { CreateProductRequestBody, UpdateProductRequestBody } from '../../../resources/index.js'; +import { IProductResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateProductMock: CreateProductRequestBody = { name: 'Hayley', diff --git a/src/__tests__/mocks/resources/reports.mock.ts b/src/__tests__/mocks/resources/reports.mock.ts index d6c5f3d..221b2d6 100644 --- a/src/__tests__/mocks/resources/reports.mock.ts +++ b/src/__tests__/mocks/resources/reports.mock.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportCsvResponse, IReportResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; +import { IReportCsvResponse, IReportResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const ReportMock: IReportResponse = { id: 'add_01gm302t81w94gyjpjpqypkzkf', diff --git a/src/__tests__/mocks/resources/subscriptions.mock.ts b/src/__tests__/mocks/resources/subscriptions.mock.ts index 0deb6e2..77abe28 100644 --- a/src/__tests__/mocks/resources/subscriptions.mock.ts +++ b/src/__tests__/mocks/resources/subscriptions.mock.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionPreviewResponse, ISubscriptionResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; -import { CreateSubscriptionCharge, UpdateSubscriptionRequestBody } from '../../../resources'; +import { CreateSubscriptionCharge, UpdateSubscriptionRequestBody } from '../../../resources/index.js'; +import { ISubscriptionPreviewResponse, ISubscriptionResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateSubscriptionMock: CreateSubscriptionCharge = { effectiveFrom: 'next_billing_period', diff --git a/src/__tests__/mocks/resources/transactions.mock.ts b/src/__tests__/mocks/resources/transactions.mock.ts index 4b063c2..30d47de 100644 --- a/src/__tests__/mocks/resources/transactions.mock.ts +++ b/src/__tests__/mocks/resources/transactions.mock.ts @@ -4,13 +4,13 @@ * Changes may be overwritten as part of auto-generation. */ -import { ITransactionPreviewResponse, ITransactionResponse } from '../../../types'; -import { Response, ResponsePaginated } from '../../../internal'; import { CreateTransactionRequestBody, TransactionPreviewRequestBody, UpdateTransactionRequestBody, -} from '../../../resources'; +} from '../../../resources/index.js'; +import { ITransactionPreviewResponse, ITransactionResponse } from '../../../types/index.js'; +import { Response, ResponsePaginated } from '../../../internal/index.js'; export const CreateTransactionMock: CreateTransactionRequestBody = { status: 'draft', diff --git a/src/__tests__/notifications/notifications-parser.test.ts b/src/__tests__/notifications/notifications-parser.test.ts index 6941000..cd92558 100644 --- a/src/__tests__/notifications/notifications-parser.test.ts +++ b/src/__tests__/notifications/notifications-parser.test.ts @@ -1,101 +1,113 @@ -import { AddressCreatedMock, AddressCreatedMockExpectation } from '../mocks/notifications/address-created.mock'; -import type { IEvents, IEventsResponse } from '../../types'; -import { Webhooks } from '../../notifications'; -import { AddressUpdatedMock, AddressUpdatedMockExpectation } from '../mocks/notifications/address-updated.mock'; +import { AddressCreatedMock, AddressCreatedMockExpectation } from '../mocks/notifications/address-created.mock.js'; +import { AddressUpdatedMock, AddressUpdatedMockExpectation } from '../mocks/notifications/address-updated.mock.js'; +import { AddressImportedMock, AddressImportedMockExpectation } from '../mocks/notifications/address-imported.mock.js'; import { AdjustmentCreatedMock, AdjustmentCreatedMockExpectation, -} from '../mocks/notifications/adjustment-created.mock'; +} from '../mocks/notifications/adjustment-created.mock.js'; import { AdjustmentUpdatedMock, AdjustmentUpdatedMockExpectation, -} from '../mocks/notifications/adjustment-updated.mock'; -import { BusinessCreatedMock, BusinessCreatedMockExpectation } from '../mocks/notifications/business-created.mock'; -import { BusinessUpdatedMock, BusinessUpdatedMockExpectation } from '../mocks/notifications/business-updated.mock'; -import { CustomerCreatedMock, CustomerCreatedMockExpectation } from '../mocks/notifications/customer-created.mock'; -import { CustomerUpdatedMock, CustomerUpdatedMockExpectation } from '../mocks/notifications/customer-updated.mock'; -import { DiscountCreatedMock, DiscountCreatedMockExpectation } from '../mocks/notifications/discount-created.mock'; -import { DiscountImportedMock, DiscountImportedMockExpectation } from '../mocks/notifications/discount-imported.mock'; -import { DiscountUpdatedMock, DiscountUpdatedMockExpectation } from '../mocks/notifications/discount-updated.mock'; -import { PayoutCreatedMock, PayoutCreatedMockExpectation } from '../mocks/notifications/payout-created.mock'; -import { PayoutPaidMock, PayoutPaidMockExpectation } from '../mocks/notifications/payout-paid.mock'; -import { PriceCreatedMock, PriceCreatedMockExpectation } from '../mocks/notifications/price-created.mock'; -import { PriceUpdatedMock, PriceUpdatedMockExpectation } from '../mocks/notifications/price-updated.mock'; -import { PriceImportedMock, PriceImportedMockExpectation } from '../mocks/notifications/price-imported.mock'; -import { ProductCreatedMock, ProductCreatedMockExpectation } from '../mocks/notifications/product-created.mock'; -import { ProductImportedMock, ProductImportedMockExpectation } from '../mocks/notifications/product-imported.mock'; -import { ProductUpdatedMock, ProductUpdatedMockExpectation } from '../mocks/notifications/product-updated.mock'; -import { ReportCreatedMock, ReportCreatedMockExpectation } from '../mocks/notifications/report-created.mock'; -import { ReportUpdatedMock, ReportUpdatedMockExpectation } from '../mocks/notifications/report-updated.mock'; +} from '../mocks/notifications/adjustment-updated.mock.js'; +import { BusinessCreatedMock, BusinessCreatedMockExpectation } from '../mocks/notifications/business-created.mock.js'; +import { BusinessUpdatedMock, BusinessUpdatedMockExpectation } from '../mocks/notifications/business-updated.mock.js'; +import { + BusinessImportedMock, + BusinessImportedMockExpectation, +} from '../mocks/notifications/business-imported.mock.js'; +import { CustomerCreatedMock, CustomerCreatedMockExpectation } from '../mocks/notifications/customer-created.mock.js'; +import { CustomerUpdatedMock, CustomerUpdatedMockExpectation } from '../mocks/notifications/customer-updated.mock.js'; +import { + CustomerImportedMock, + CustomerImportedMockExpectation, +} from '../mocks/notifications/customer-imported.mock.js'; +import { DiscountCreatedMock, DiscountCreatedMockExpectation } from '../mocks/notifications/discount-created.mock.js'; +import { + DiscountImportedMock, + DiscountImportedMockExpectation, +} from '../mocks/notifications/discount-imported.mock.js'; +import { DiscountUpdatedMock, DiscountUpdatedMockExpectation } from '../mocks/notifications/discount-updated.mock.js'; +import { PayoutCreatedMock, PayoutCreatedMockExpectation } from '../mocks/notifications/payout-created.mock.js'; +import { PayoutPaidMock, PayoutPaidMockExpectation } from '../mocks/notifications/payout-paid.mock.js'; +import { PriceCreatedMock, PriceCreatedMockExpectation } from '../mocks/notifications/price-created.mock.js'; +import { PriceUpdatedMock, PriceUpdatedMockExpectation } from '../mocks/notifications/price-updated.mock.js'; +import { PriceImportedMock, PriceImportedMockExpectation } from '../mocks/notifications/price-imported.mock.js'; +import { ProductCreatedMock, ProductCreatedMockExpectation } from '../mocks/notifications/product-created.mock.js'; +import { ProductImportedMock, ProductImportedMockExpectation } from '../mocks/notifications/product-imported.mock.js'; +import { ProductUpdatedMock, ProductUpdatedMockExpectation } from '../mocks/notifications/product-updated.mock.js'; +import { ReportCreatedMock, ReportCreatedMockExpectation } from '../mocks/notifications/report-created.mock.js'; +import { ReportUpdatedMock, ReportUpdatedMockExpectation } from '../mocks/notifications/report-updated.mock.js'; import { SubscriptionActivatedMock, SubscriptionActivatedMockExpectation, -} from '../mocks/notifications/subscription-activated.mock'; +} from '../mocks/notifications/subscription-activated.mock.js'; import { SubscriptionCanceledMock, SubscriptionCanceledMockExpectation, -} from '../mocks/notifications/subscription-canceled.mock'; +} from '../mocks/notifications/subscription-canceled.mock.js'; import { SubscriptionCreatedMock, SubscriptionCreatedMockExpectation, -} from '../mocks/notifications/subscription-created.mock'; +} from '../mocks/notifications/subscription-created.mock.js'; import { SubscriptionImportedMock, SubscriptionImportedMockExpectation, -} from '../mocks/notifications/subscription-imported.mock'; +} from '../mocks/notifications/subscription-imported.mock.js'; import { SubscriptionPastDueMock, SubscriptionPastDueMockExpectation, -} from '../mocks/notifications/subscription-past-due.mock'; +} from '../mocks/notifications/subscription-past-due.mock.js'; import { SubscriptionPausedMock, SubscriptionPausedMockExpectation, -} from '../mocks/notifications/subscription-paused.mock'; +} from '../mocks/notifications/subscription-paused.mock.js'; import { SubscriptionResumedMock, SubscriptionResumedMockExpectation, -} from '../mocks/notifications/subscription-resumed.mock'; +} from '../mocks/notifications/subscription-resumed.mock.js'; import { SubscriptionTrialingMock, SubscriptionTrialingMockExpectation, -} from '../mocks/notifications/subscription-trialing.mock'; +} from '../mocks/notifications/subscription-trialing.mock.js'; import { SubscriptionUpdatedMock, SubscriptionUpdatedMockExpectation, -} from '../mocks/notifications/subscription-updated.mock'; +} from '../mocks/notifications/subscription-updated.mock.js'; import { TransactionBilledMock, TransactionBilledMockExpectation, -} from '../mocks/notifications/transaction-billed.mock'; +} from '../mocks/notifications/transaction-billed.mock.js'; import { TransactionCanceledMock, TransactionCanceledMockExpectation, -} from '../mocks/notifications/transaction-canceled.mock'; +} from '../mocks/notifications/transaction-canceled.mock.js'; import { TransactionCompletedMock, TransactionCompletedMockExpectation, -} from '../mocks/notifications/transaction-completed.mock'; +} from '../mocks/notifications/transaction-completed.mock.js'; import { TransactionCreatedMock, TransactionCreatedMockExpectation, -} from '../mocks/notifications/transaction-created.mock'; -import { TransactionPaidMock, TransactionPaidMockExpectation } from '../mocks/notifications/transaction-paid.mock'; +} from '../mocks/notifications/transaction-created.mock.js'; +import { TransactionPaidMock, TransactionPaidMockExpectation } from '../mocks/notifications/transaction-paid.mock.js'; import { TransactionPastDueMock, TransactionPastDueMockExpectation, -} from '../mocks/notifications/transaction-past-due.mock'; +} from '../mocks/notifications/transaction-past-due.mock.js'; import { TransactionPaymentFailedMock, TransactionPaymentFailedMockExpectation, -} from '../mocks/notifications/transaction-payment-failed.mock'; -import { TransactionReadyMock, TransactionReadyMockExpectation } from '../mocks/notifications/transaction-ready.mock'; +} from '../mocks/notifications/transaction-payment-failed.mock.js'; +import { + TransactionReadyMock, + TransactionReadyMockExpectation, +} from '../mocks/notifications/transaction-ready.mock.js'; import { TransactionUpdatedMock, TransactionUpdatedMockExpectation, -} from '../mocks/notifications/transaction-updated.mock'; -import { AddressImportedMock, AddressImportedMockExpectation } from '../mocks/notifications/address-imported.mock'; -import { BusinessImportedMock, BusinessImportedMockExpectation } from '../mocks/notifications/business-imported.mock'; -import { CustomerImportedMock, CustomerImportedMockExpectation } from '../mocks/notifications/customer-imported.mock'; +} from '../mocks/notifications/transaction-updated.mock.js'; +import { IEvents, IEventsResponse } from '../../types/index.js'; +import { Webhooks } from '../../notifications/index.js'; describe('Notifications Parser', () => { test.each([ diff --git a/src/__tests__/notifications/webhooks-validator.edge.test.ts b/src/__tests__/notifications/webhooks-validator.edge.test.ts new file mode 100644 index 0000000..8496092 --- /dev/null +++ b/src/__tests__/notifications/webhooks-validator.edge.test.ts @@ -0,0 +1,90 @@ +// This file does not contain any secret keys. All the hashes are generated using `VALID_SECRET` as key + +import { WebhooksValidator } from '../../notifications/index.js'; +import crypto from 'crypto'; +import { EdgeRuntime } from '../../internal/providers/runtime/edge-runtime.js'; + +describe('Webhooks validator in edge runtime', () => { + beforeAll(() => { + Object.defineProperty(global, 'crypto', { + value: { + subtle: crypto.webcrypto.subtle, + }, + }); + EdgeRuntime.initialize(); + }); + test.each([ + [ + 'Valid signature', + '{"data": ["1", "2"]}', + 'ts=1698796800;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', + 'VALID_SECRET', + true, + ], + [ + 'Valid signature with multiple hashes', + '{"data": "value"}', + 'ts=1698796800;h1=28981e941fae76e53db32f3d2a83cb69db41476595e84e1970a1b5d98f62b261;h1=28981e941fae76e53db32f3d2a83cb69db41476595e84e1970a1b5d98f62b261;h2=RANDOM_HASH', + 'VALID_SECRET', + true, + ], + [ + 'Invalid secret', + '{"data": ["1", "2"]}', + 'ts=1698796800;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', + 'INVALID_VALID_SECRET', + false, + ], + [ + 'Invalid timestamp', + '{"data": ["1", "2"]}', + 'ts=9876;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', + 'VALID_SECRET', + false, + ], + [ + 'Invalid data - has more space', + '{ "data": [ "1", "2" ]}', + 'ts=1698796800;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', + 'VALID_SECRET', + false, + ], + ['Invalid signature', '{"data": ["1", "2"]}', 'ts=1234;h1=invalid_signature', 'VALID_SECRET', false], + ])('should validate %s', async (_, requestBody, signature, secretKey, expected) => { + jest.useFakeTimers(); + jest.setSystemTime(new Date('11/01/2023')); + + expect(await new WebhooksValidator().isValidSignature(requestBody, secretKey, signature)).toBe(expected); + + jest.useRealTimers(); + }); + test.each([ + ['Missing TS and H1', 'invalid_header'], + ['Missing TS', 'h1=invalid_header'], + ['Missing H1', 'ts=1234;h2=invalid_header'], + ])('validate header - %s', async (_, header: string) => { + await expect( + new WebhooksValidator().isValidSignature('{"data": ["1", "2"]}', 'VALID_SECRET', header), + ).rejects.toThrowError('[Paddle] Invalid webhook signature'); + }); + + test.each([ + ['Validates signature with correct TS within 5 seconds', '11/01/2023 00:00:01', true], + ['Validates signature at max allowed time at 5 seconds', '11/01/2023 00:00:05', true], + ['Will reject if current time is more than 5seconds', '11/01/2023 00:00:06', false], + ['Will reject if current time is more than a few days', '11/05/2023 00:00:00', false], + ])('%s', async (_: string, time: string, result: boolean) => { + jest.useFakeTimers(); + jest.setSystemTime(new Date(time)); + + expect( + await new WebhooksValidator().isValidSignature( + '{"data": ["1", "2"]}', + 'VALID_SECRET', + 'ts=1698796800;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', + ), + ).toBe(result); + + jest.useRealTimers(); + }); +}); diff --git a/src/__tests__/notifications/webhooks-validator.test.ts b/src/__tests__/notifications/webhooks-validator.node.test.ts similarity index 72% rename from src/__tests__/notifications/webhooks-validator.test.ts rename to src/__tests__/notifications/webhooks-validator.node.test.ts index 7f0d241..3038348 100644 --- a/src/__tests__/notifications/webhooks-validator.test.ts +++ b/src/__tests__/notifications/webhooks-validator.node.test.ts @@ -1,7 +1,11 @@ -import { WebhooksValidator } from '../../notifications'; - // This file does not contain any secret keys. All the hashes are generated using `VALID_SECRET` as key -describe('webhooks-validator', () => { +import { NodeRuntime } from '../../internal/providers/runtime/node-runtime.js'; +import { WebhooksValidator } from '../../notifications/index.js'; + +describe('Webhooks validator in Node runtime', () => { + beforeAll(() => { + NodeRuntime.initialize(); + }); test.each([ [ 'Valid signature', @@ -25,7 +29,7 @@ describe('webhooks-validator', () => { false, ], [ - 'InValid timestamp', + 'Invalid timestamp', '{"data": ["1", "2"]}', 'ts=9876;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', 'VALID_SECRET', @@ -39,11 +43,11 @@ describe('webhooks-validator', () => { false, ], ['Invalid signature', '{"data": ["1", "2"]}', 'ts=1234;h1=invalid_signature', 'VALID_SECRET', false], - ])('should validate %s', (_, requestBody, signature, secretKey, expected) => { + ])('should validate %s', async (_, requestBody, signature, secretKey, expected) => { jest.useFakeTimers(); jest.setSystemTime(new Date('11/01/2023')); - expect(new WebhooksValidator().isValidSignature(requestBody, secretKey, signature)).toBe(expected); + expect(await new WebhooksValidator().isValidSignature(requestBody, secretKey, signature)).toBe(expected); jest.useRealTimers(); }); @@ -51,10 +55,10 @@ describe('webhooks-validator', () => { ['Missing TS and H1', 'invalid_header'], ['Missing TS', 'h1=invalid_header'], ['Missing H1', 'ts=1234;h2=invalid_header'], - ])('validate header - %s', (_, header: string) => { - expect(() => new WebhooksValidator().isValidSignature('{"data": ["1", "2"]}', 'VALID_SECRET', header)).toThrowError( - '[Paddle] Invalid webhook signature', - ); + ])('validate header - %s', async (_, header: string) => { + await expect( + new WebhooksValidator().isValidSignature('{"data": ["1", "2"]}', 'VALID_SECRET', header), + ).rejects.toThrowError('[Paddle] Invalid webhook signature'); }); test.each([ @@ -62,12 +66,12 @@ describe('webhooks-validator', () => { ['Validates signature at max allowed time at 5 seconds', '11/01/2023 00:00:05', true], ['Will reject if current time is more than 5seconds', '11/01/2023 00:00:06', false], ['Will reject if current time is more than a few days', '11/05/2023 00:00:00', false], - ])('%s', (_: string, time: string, result: boolean) => { + ])('%s', async (_: string, time: string, result: boolean) => { jest.useFakeTimers(); jest.setSystemTime(new Date(time)); expect( - new WebhooksValidator().isValidSignature( + await new WebhooksValidator().isValidSignature( '{"data": ["1", "2"]}', 'VALID_SECRET', 'ts=1698796800;h1=a300428748dce5c70e4da19bffd60769591ea969c99dea3105d0ec9612cf43f9', diff --git a/src/__tests__/resources/addresses.test.ts b/src/__tests__/resources/addresses.test.ts index 8d12c01..4d84d52 100644 --- a/src/__tests__/resources/addresses.test.ts +++ b/src/__tests__/resources/addresses.test.ts @@ -4,13 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { - AddressesResource, - CreateAddressRequestBody, - ListAddressQueryParameters, - UpdateAddressRequestBody, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { AddressMock, AddressMockResponse, @@ -19,8 +13,14 @@ import { ListAddressMockResponse, UpdateAddressExpectation, UpdateAddressMock, -} from '../mocks/resources/addresses.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/addresses.mock.js'; +import { + AddressesResource, + CreateAddressRequestBody, + ListAddressQueryParameters, + UpdateAddressRequestBody, +} from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('AddressesResource', () => { test('should return a list of addresses', async () => { diff --git a/src/__tests__/resources/adjustments.test.ts b/src/__tests__/resources/adjustments.test.ts index 3d6854a..5d52b49 100644 --- a/src/__tests__/resources/adjustments.test.ts +++ b/src/__tests__/resources/adjustments.test.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { AdjustmentsResource, ListAdjustmentQueryParameters } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { AdjustmentMock, AdjustmentMockResponse, CreateAdjustmentExpectation, CreateAdjustmentMock, ListAdjustmentMockResponse, -} from '../mocks/resources/adjustments.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/adjustments.mock.js'; +import { AdjustmentsResource, ListAdjustmentQueryParameters } from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('AdjustmentsResource', () => { test('should return a list of adjustments', async () => { diff --git a/src/__tests__/resources/businesses.test.ts b/src/__tests__/resources/businesses.test.ts index 1770358..b88a823 100644 --- a/src/__tests__/resources/businesses.test.ts +++ b/src/__tests__/resources/businesses.test.ts @@ -4,21 +4,21 @@ * Changes may be overwritten as part of auto-generation. */ -import { - BusinessesResource, - CreateBusinessRequestBody, - ListBusinessQueryParameters, - UpdateBusinessRequestBody, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { BusinessMock, BusinessMockResponse, ListBusinessMockResponse, UpdateBusinessExpectation, UpdateBusinessMock, -} from '../mocks/resources/businesses.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/businesses.mock.js'; +import { + BusinessesResource, + CreateBusinessRequestBody, + ListBusinessQueryParameters, + UpdateBusinessRequestBody, +} from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('BusinessesResource', () => { test('should return a list of businesses', async () => { diff --git a/src/__tests__/resources/customers.test.ts b/src/__tests__/resources/customers.test.ts index 21833ef..e46fcc6 100644 --- a/src/__tests__/resources/customers.test.ts +++ b/src/__tests__/resources/customers.test.ts @@ -4,13 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { - CreateCustomerRequestBody, - CustomersResource, - ListCustomerQueryParameters, - UpdateCustomerRequestBody, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CustomerCreditBalanceMockResponse, CustomerMock, @@ -18,8 +12,14 @@ import { ListCustomerMockResponse, UpdateCustomerExpectation, UpdateCustomerMock, -} from '../mocks/resources/customers.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/customers.mock.js'; +import { + CreateCustomerRequestBody, + CustomersResource, + ListCustomerQueryParameters, + UpdateCustomerRequestBody, +} from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('CustomersResource', () => { test('should return a list of customers', async () => { diff --git a/src/__tests__/resources/discounts.test.ts b/src/__tests__/resources/discounts.test.ts index 477d265..459b380 100644 --- a/src/__tests__/resources/discounts.test.ts +++ b/src/__tests__/resources/discounts.test.ts @@ -4,8 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { CreateDiscountRequestBody, DiscountsResource, ListDiscountQueryParameters } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CreateDiscountExpectation, CreateDiscountMock, @@ -14,8 +13,9 @@ import { ListDiscountMockResponse, UpdateDiscountExpectation, UpdateDiscountMock, -} from '../mocks/resources/discounts.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/discounts.mock.js'; +import { CreateDiscountRequestBody, DiscountsResource, ListDiscountQueryParameters } from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('DiscountsResource', () => { test('should return a list of discounts', async () => { diff --git a/src/__tests__/resources/event-types.test.ts b/src/__tests__/resources/event-types.test.ts index 5a78e43..36e05a8 100644 --- a/src/__tests__/resources/event-types.test.ts +++ b/src/__tests__/resources/event-types.test.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { getPaddleTestClient } from '../helpers/test-client'; -import { EventTypesResource } from '../../resources'; -import { ListEventTypeMockResponse } from '../mocks/resources/event-types.mock'; +import { getPaddleTestClient } from '../helpers/test-client.js'; +import { ListEventTypeMockResponse } from '../mocks/resources/event-types.mock.js'; +import { EventTypesResource } from '../../resources/index.js'; describe('EventTypesResource', () => { test('should return a list of events', async () => { diff --git a/src/__tests__/resources/events.test.ts b/src/__tests__/resources/events.test.ts index 427c524..487b2f0 100644 --- a/src/__tests__/resources/events.test.ts +++ b/src/__tests__/resources/events.test.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { getPaddleTestClient } from '../helpers/test-client'; -import { ListEventMockResponse } from '../mocks/resources/events.mock'; -import { EventsResource, ListEventsQueryParameters } from '../../resources/events'; +import { getPaddleTestClient } from '../helpers/test-client.js'; +import { ListEventMockResponse } from '../mocks/resources/events.mock.js'; +import { EventsResource, ListEventsQueryParameters } from '../../resources/events/index.js'; describe('EventsResource', () => { test('should return a list of events', async () => { diff --git a/src/__tests__/resources/notification-settings.test.ts b/src/__tests__/resources/notification-settings.test.ts index 974a1d2..a96332c 100644 --- a/src/__tests__/resources/notification-settings.test.ts +++ b/src/__tests__/resources/notification-settings.test.ts @@ -4,10 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { NotificationSettingsResource } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; -import { NotificationMock } from '../mocks/resources/notifications.mock'; -import { convertToSnakeCase } from '../../internal'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CreateNotificationSettingsExpectation, CreateNotificationSettingsMock, @@ -15,7 +12,10 @@ import { NotificationSettingsMockResponse, UpdateNotificationSettingsExpectation, UpdateNotificationSettingsMock, -} from '../mocks/resources/notification-settings.mock'; +} from '../mocks/resources/notification-settings.mock.js'; +import { NotificationSettingsResource } from '../../resources/index.js'; +import { NotificationMock } from '../mocks/resources/notifications.mock.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('NotificationSettingsResource', () => { test('should return a list of notification settings', async () => { diff --git a/src/__tests__/resources/notifications.test.ts b/src/__tests__/resources/notifications.test.ts index 0789030..946893a 100644 --- a/src/__tests__/resources/notifications.test.ts +++ b/src/__tests__/resources/notifications.test.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { ListNotificationQueryParameters, NotificationsResource } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { ListNotificationLogsMockResponse, ListNotificationMockResponse, NotificationMock, NotificationMockResponse, NotificationReplayMockResponse, -} from '../mocks/resources/notifications.mock'; +} from '../mocks/resources/notifications.mock.js'; +import { ListNotificationQueryParameters, NotificationsResource } from '../../resources/index.js'; describe('NotificationsResource', () => { test('should return a list of notifications', async () => { diff --git a/src/__tests__/resources/prices.test.ts b/src/__tests__/resources/prices.test.ts index 32ad9e2..ea14d55 100644 --- a/src/__tests__/resources/prices.test.ts +++ b/src/__tests__/resources/prices.test.ts @@ -4,8 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { ListPriceQueryParameters, PricesResource } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CreatePriceExpectation, CreatePriceMock, @@ -14,8 +13,9 @@ import { PriceMockResponse, UpdatePriceExpectation, UpdatePriceMock, -} from '../mocks/resources/prices.mock'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/prices.mock.js'; +import { ListPriceQueryParameters, PricesResource } from '../../resources/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('PricesResource', () => { test('should return a list of prices', async () => { diff --git a/src/__tests__/resources/pricing-preview.test.ts b/src/__tests__/resources/pricing-preview.test.ts index 7a038de..62c7a60 100644 --- a/src/__tests__/resources/pricing-preview.test.ts +++ b/src/__tests__/resources/pricing-preview.test.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { PricingPreviewResource } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; -import { PricingPreviewMockResponse, PricingPreviewRequest } from '../mocks/resources/pricing-preview.mock'; +import { getPaddleTestClient } from '../helpers/test-client.js'; +import { PricingPreviewMockResponse, PricingPreviewRequest } from '../mocks/resources/pricing-preview.mock.js'; +import { PricingPreviewResource } from '../../resources/index.js'; describe('PricingPreviewResource', () => { test('should return a preview of the price', async () => { diff --git a/src/__tests__/resources/products.test.ts b/src/__tests__/resources/products.test.ts index ef0c190..4a2a604 100644 --- a/src/__tests__/resources/products.test.ts +++ b/src/__tests__/resources/products.test.ts @@ -4,22 +4,22 @@ * Changes may be overwritten as part of auto-generation. */ +import { getPaddleTestClient } from '../helpers/test-client.js'; import { - CreateProductRequestBody, - UpdateProductRequestBody, - ProductsResource, - ListProductQueryParameters, - GetProductQueryParameters, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; -import { - ProductMockResponse, - ProductMock, - ListProductMockResponse, CreateProductMock, + ListProductMockResponse, + ProductMock, + ProductMockResponse, UpdateProductMock, -} from '../mocks/resources/products.mock'; -import { QueryParameters } from '../../internal/base'; +} from '../mocks/resources/products.mock.js'; +import { + CreateProductRequestBody, + GetProductQueryParameters, + ListProductQueryParameters, + ProductsResource, + UpdateProductRequestBody, +} from '../../resources/index.js'; +import { QueryParameters } from '../../internal/base/index.js'; describe('ProductsResource', () => { test('should return a list of products', async () => { diff --git a/src/__tests__/resources/reports.test.ts b/src/__tests__/resources/reports.test.ts index 808cce7..6fa13de 100644 --- a/src/__tests__/resources/reports.test.ts +++ b/src/__tests__/resources/reports.test.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ -import { CreateReportRequestBody, ListReportQueryParameters, ReportsResource } from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { ListReportMockResponse, ReportCsvMockResponse, ReportMock, ReportMockResponse, -} from '../mocks/resources/reports.mock'; +} from '../mocks/resources/reports.mock.js'; +import { CreateReportRequestBody, ListReportQueryParameters, ReportsResource } from '../../resources/index.js'; describe('ReportsResource', () => { test('should return a list of reports', async () => { diff --git a/src/__tests__/resources/subscriptions.test.ts b/src/__tests__/resources/subscriptions.test.ts index 5eff9fd..404992a 100644 --- a/src/__tests__/resources/subscriptions.test.ts +++ b/src/__tests__/resources/subscriptions.test.ts @@ -4,16 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { - CancelSubscription, - GetSubscriptionQueryParameters, - ListSubscriptionQueryParameters, - type PauseSubscription, - ResumeSubscription, - SubscriptionsResource, - UpdateSubscriptionRequestBody, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CreateSubscriptionExpectation, CreateSubscriptionMock, @@ -23,10 +14,19 @@ import { SubscriptionPreviewMockResponse, UpdateSubscriptionExpectation, UpdateSubscriptionMock, -} from '../mocks/resources/subscriptions.mock'; -import { QueryParameters } from '../../internal/base'; -import { convertToSnakeCase } from '../../internal'; -import { TransactionMockResponse } from '../mocks/resources/transactions.mock'; +} from '../mocks/resources/subscriptions.mock.js'; +import { + CancelSubscription, + GetSubscriptionQueryParameters, + ListSubscriptionQueryParameters, + PauseSubscription, + ResumeSubscription, + SubscriptionsResource, + UpdateSubscriptionRequestBody, +} from '../../resources/index.js'; +import { QueryParameters } from '../../internal/base/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; +import { TransactionMockResponse } from '../mocks/resources/transactions.mock.js'; describe('SubscriptionsResource', () => { test('should return a list of subscriptions', async () => { diff --git a/src/__tests__/resources/transactions.test.ts b/src/__tests__/resources/transactions.test.ts index 51c94f7..3827731 100644 --- a/src/__tests__/resources/transactions.test.ts +++ b/src/__tests__/resources/transactions.test.ts @@ -4,14 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { - CreateTransactionRequestBody, - GetTransactionQueryParameters, - ListTransactionQueryParameters, - TransactionsResource, - UpdateTransactionRequestBody, -} from '../../resources'; -import { getPaddleTestClient } from '../helpers/test-client'; +import { getPaddleTestClient } from '../helpers/test-client.js'; import { CreateTransactionExpectation, CreateTransactionMock, @@ -22,9 +15,16 @@ import { TransactionPreviewMockResponse, UpdateTransactionExpectation, UpdateTransactionMock, -} from '../mocks/resources/transactions.mock'; -import { QueryParameters } from '../../internal/base'; -import { convertToSnakeCase } from '../../internal'; +} from '../mocks/resources/transactions.mock.js'; +import { + CreateTransactionRequestBody, + GetTransactionQueryParameters, + ListTransactionQueryParameters, + TransactionsResource, + UpdateTransactionRequestBody, +} from '../../resources/index.js'; +import { QueryParameters } from '../../internal/base/index.js'; +import { convertToSnakeCase } from '../../internal/index.js'; describe('TransactionsResource', () => { test('should return a list of transactions', async () => { diff --git a/src/entities/address/address-collection.ts b/src/entities/address/address-collection.ts index b4f55c3..d6fb4a4 100644 --- a/src/entities/address/address-collection.ts +++ b/src/entities/address/address-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Address } from './address'; -import { type IAddressResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { type IAddressResponse } from '../../types/index.js'; +import { Collection } from '../../internal/base/index.js'; +import { Address } from './address.js'; export class AddressCollection extends Collection { override fromJson(data: IAddressResponse): Address { diff --git a/src/entities/address/address.ts b/src/entities/address/address.ts index 4c70e40..e342d4c 100644 --- a/src/entities/address/address.ts +++ b/src/entities/address/address.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CustomData, ImportMeta } from '../index'; -import { type CountryCode, type Status } from '../../enums'; -import { type IAddressResponse } from '../../types'; +import { type CountryCode, type Status } from '../../enums/index.js'; +import { type CustomData, ImportMeta } from '../index.js'; +import { type IAddressResponse } from '../../types/index.js'; export class Address { public readonly id: string; diff --git a/src/entities/address/index.ts b/src/entities/address/index.ts index 43f4e10..3f8ed4b 100644 --- a/src/entities/address/index.ts +++ b/src/entities/address/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address-collection'; -export * from './address'; +export * from './address-collection.js'; +export * from './address.js'; diff --git a/src/entities/adjustment/adjustment-collection.ts b/src/entities/adjustment/adjustment-collection.ts index a64f225..df7aa8a 100644 --- a/src/entities/adjustment/adjustment-collection.ts +++ b/src/entities/adjustment/adjustment-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Adjustment } from './adjustment'; -import { type IAdjustmentResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { Collection } from '../../internal/base/index.js'; +import { type IAdjustmentResponse } from '../../types/index.js'; +import { Adjustment } from './adjustment.js'; export class AdjustmentCollection extends Collection { override fromJson(data: IAdjustmentResponse): Adjustment { diff --git a/src/entities/adjustment/adjustment-credit-note-pdf.ts b/src/entities/adjustment/adjustment-credit-note-pdf.ts index f546376..09e1e57 100644 --- a/src/entities/adjustment/adjustment-credit-note-pdf.ts +++ b/src/entities/adjustment/adjustment-credit-note-pdf.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentCreditNotePDF } from '../../types'; +import { type IAdjustmentCreditNotePDF } from '../../types/index.js'; export class AdjustmentCreditNotePDF { public readonly url: string; diff --git a/src/entities/adjustment/adjustment-item-totals.ts b/src/entities/adjustment/adjustment-item-totals.ts index 4a78f61..d55fdac 100644 --- a/src/entities/adjustment/adjustment-item-totals.ts +++ b/src/entities/adjustment/adjustment-item-totals.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemTotals } from '../../types'; +import { type IAdjustmentItemTotals } from '../../types/index.js'; export class AdjustmentItemTotals { public readonly subtotal: string; diff --git a/src/entities/adjustment/adjustment-item.ts b/src/entities/adjustment/adjustment-item.ts index 10bc5d3..48ebad7 100644 --- a/src/entities/adjustment/adjustment-item.ts +++ b/src/entities/adjustment/adjustment-item.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemResponse } from '../../types'; -import { AdjustmentItemTotals, AdjustmentProration } from '../index'; -import { type AdjustmentType } from '../../enums'; +import { type AdjustmentType } from '../../enums/index.js'; +import { AdjustmentProration } from './adjustment-proration.js'; +import { AdjustmentItemTotals } from './adjustment-item-totals.js'; +import { type IAdjustmentItemResponse } from '../../types/index.js'; export class AdjustmentItem { public readonly id: string; diff --git a/src/entities/adjustment/adjustment-proration.ts b/src/entities/adjustment/adjustment-proration.ts index 00d6b67..33f4880 100644 --- a/src/entities/adjustment/adjustment-proration.ts +++ b/src/entities/adjustment/adjustment-proration.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsProrationResponse } from '../../types'; -import { AdjustmentTimePeriod } from '../index'; +import { AdjustmentTimePeriod } from './adjustment-time-period.js'; +import { type IAdjustmentsProrationResponse } from '../../types/index.js'; export class AdjustmentProration { public readonly rate: string; diff --git a/src/entities/adjustment/adjustment-time-period.ts b/src/entities/adjustment/adjustment-time-period.ts index fb8ccde..b4ca352 100644 --- a/src/entities/adjustment/adjustment-time-period.ts +++ b/src/entities/adjustment/adjustment-time-period.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsTimePeriodResponse } from '../../types'; +import { type IAdjustmentsTimePeriodResponse } from '../../types/index.js'; export class AdjustmentTimePeriod { public readonly startsAt: string; diff --git a/src/entities/adjustment/adjustment.ts b/src/entities/adjustment/adjustment.ts index 1efcfa9..b3f5f9e 100644 --- a/src/entities/adjustment/adjustment.ts +++ b/src/entities/adjustment/adjustment.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { AdjustmentItem, PayoutTotalsAdjustment, TotalAdjustments } from '../index'; -import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums'; -import { type IAdjustmentResponse } from '../../types'; +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js'; +import { AdjustmentItem } from './adjustment-item.js'; +import { PayoutTotalsAdjustment, TotalAdjustments } from '../shared/index.js'; +import { type IAdjustmentResponse } from '../../types/index.js'; export class Adjustment { public readonly id: string; diff --git a/src/entities/adjustment/index.ts b/src/entities/adjustment/index.ts index 519efd7..5740ce2 100644 --- a/src/entities/adjustment/index.ts +++ b/src/entities/adjustment/index.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './adjustment-time-period'; -export * from './adjustment-proration'; -export * from './adjustment-item'; -export * from './adjustment'; -export * from './adjustment-collection'; -export * from './adjustment-item-totals'; -export * from './adjustment-credit-note-pdf'; +export * from './adjustment-time-period.js'; +export * from './adjustment-proration.js'; +export * from './adjustment-item.js'; +export * from './adjustment.js'; +export * from './adjustment-collection.js'; +export * from './adjustment-item-totals.js'; +export * from './adjustment-credit-note-pdf.js'; diff --git a/src/entities/business/business-collection.ts b/src/entities/business/business-collection.ts index 19bd793..03f63a6 100644 --- a/src/entities/business/business-collection.ts +++ b/src/entities/business/business-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Business } from './business'; -import { type IBusinessResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { type IBusinessResponse } from '../../types/index.js'; +import { Collection } from '../../internal/base/index.js'; +import { Business } from './business.js'; export class BusinessCollection extends Collection { override fromJson(data: IBusinessResponse): Business { diff --git a/src/entities/business/business.ts b/src/entities/business/business.ts index 363c885..c5b7efb 100644 --- a/src/entities/business/business.ts +++ b/src/entities/business/business.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { Contacts, type CustomData, ImportMeta } from '../index'; -import { type Status } from '../../enums'; -import { type IBusinessResponse } from '../../types'; +import { type Status } from '../../enums/index.js'; +import { Contacts } from './contacts.js'; +import { type CustomData, ImportMeta } from '../index.js'; +import { type IBusinessResponse } from '../../types/index.js'; export class Business { public readonly id: string; diff --git a/src/entities/business/contacts.ts b/src/entities/business/contacts.ts index e2164e8..cf6e4fc 100644 --- a/src/entities/business/contacts.ts +++ b/src/entities/business/contacts.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContacts } from '../../types'; + +import { type IBusinessContacts } from '../../types/index.js'; export class Contacts { public readonly name: string | null; diff --git a/src/entities/business/index.ts b/src/entities/business/index.ts index 98160f5..5cc1cbd 100644 --- a/src/entities/business/index.ts +++ b/src/entities/business/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './business-collection'; -export * from './contacts'; -export * from './business'; +export * from './business-collection.js'; +export * from './contacts.js'; +export * from './business.js'; diff --git a/src/entities/customer/credit-balance.ts b/src/entities/customer/credit-balance.ts index 9e97863..359de99 100644 --- a/src/entities/customer/credit-balance.ts +++ b/src/entities/customer/credit-balance.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICreditBalanceResponse } from '../../types'; -import { CustomerBalance } from '../index'; -import { type CurrencyCode } from '../../enums'; +import { type ICreditBalanceResponse } from '../../types/index.js'; +import { type CurrencyCode } from '../../enums/index.js'; +import { CustomerBalance } from './customer-balance.js'; export class CreditBalance { public readonly customerId: string | null; diff --git a/src/entities/customer/customer-balance.ts b/src/entities/customer/customer-balance.ts index 48d536e..b46d837 100644 --- a/src/entities/customer/customer-balance.ts +++ b/src/entities/customer/customer-balance.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomerBalance } from '../../types'; +import { type ICustomerBalance } from '../../types/index.js'; export class CustomerBalance { public readonly available: string; diff --git a/src/entities/customer/customer-collection.ts b/src/entities/customer/customer-collection.ts index 42e6710..cbd5f95 100644 --- a/src/entities/customer/customer-collection.ts +++ b/src/entities/customer/customer-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Customer } from './customer'; -import { type ICustomerResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { Collection } from '../../internal/base/index.js'; +import { type ICustomerResponse } from '../../types/index.js'; +import { Customer } from './customer.js'; export class CustomerCollection extends Collection { override fromJson(data: ICustomerResponse): Customer { diff --git a/src/entities/customer/customer.ts b/src/entities/customer/customer.ts index f6d826a..cc0e35c 100644 --- a/src/entities/customer/customer.ts +++ b/src/entities/customer/customer.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CustomData, ImportMeta } from '../index'; -import { type Status } from '../../enums'; -import { type ICustomerResponse } from '../../types'; +import { type Status } from '../../enums/index.js'; +import { type CustomData, ImportMeta } from '../index.js'; +import { type ICustomerResponse } from '../../types/index.js'; export class Customer { public readonly id: string; diff --git a/src/entities/customer/index.ts b/src/entities/customer/index.ts index 95fe3f3..5cc8616 100644 --- a/src/entities/customer/index.ts +++ b/src/entities/customer/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './customer-collection'; -export * from './customer'; -export * from './credit-balance'; -export * from './customer-balance'; +export * from './customer-collection.js'; +export * from './customer.js'; +export * from './credit-balance.js'; +export * from './customer-balance.js'; diff --git a/src/entities/discount/discount-collection.ts b/src/entities/discount/discount-collection.ts index 0f554b7..b27f8f9 100644 --- a/src/entities/discount/discount-collection.ts +++ b/src/entities/discount/discount-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Discount } from './discount'; -import { type IDiscountResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { type IDiscountResponse } from '../../types/index.js'; +import { Collection } from '../../internal/base/index.js'; +import { Discount } from './discount.js'; export class DiscountCollection extends Collection { override fromJson(data: IDiscountResponse): Discount { diff --git a/src/entities/discount/discount.ts b/src/entities/discount/discount.ts index 4d16f4b..7a9fe6d 100644 --- a/src/entities/discount/discount.ts +++ b/src/entities/discount/discount.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums'; -import { type IDiscountResponse } from '../../types'; -import { type CustomData, ImportMeta } from '../index'; +import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums/index.js'; +import { type CustomData, ImportMeta } from '../index.js'; +import { type IDiscountResponse } from '../../types/index.js'; export class Discount { public readonly id: string; diff --git a/src/entities/discount/index.ts b/src/entities/discount/index.ts index 067ccb5..a5400a8 100644 --- a/src/entities/discount/index.ts +++ b/src/entities/discount/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './discount-collection'; -export * from './discount'; +export * from './discount-collection.js'; +export * from './discount.js'; diff --git a/src/entities/event-types/event-type.ts b/src/entities/event-types/event-type.ts index d624ab9..ed2419f 100644 --- a/src/entities/event-types/event-type.ts +++ b/src/entities/event-types/event-type.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IEventTypeResponse } from '../../types'; -import { type IEventName } from '../../notifications'; + +import { type IEventName } from '../../notifications/index.js'; +import { type IEventTypeResponse } from '../../types/index.js'; export class EventType { public readonly name: IEventName; diff --git a/src/entities/event-types/index.ts b/src/entities/event-types/index.ts index 18595b7..2a868f7 100644 --- a/src/entities/event-types/index.ts +++ b/src/entities/event-types/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './event-type'; +export * from './event-type.js'; diff --git a/src/entities/events/event-collection.ts b/src/entities/events/event-collection.ts index 33e6ecf..ba03127 100644 --- a/src/entities/events/event-collection.ts +++ b/src/entities/events/event-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Collection } from '../../internal/base'; -import { type IEvents, type IEventsResponse } from '../../types'; -import { type EventEntity, Webhooks } from '../../notifications'; +import { type IEvents, type IEventsResponse } from '../../types/index.js'; +import { Collection } from '../../internal/base/index.js'; +import { type EventEntity, Webhooks } from '../../notifications/index.js'; export class EventCollection extends Collection { override fromJson(data: IEvents): EventEntity | null { diff --git a/src/entities/events/event.ts b/src/entities/events/event.ts index 57264a4..9da2d8f 100644 --- a/src/entities/events/event.ts +++ b/src/entities/events/event.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../types'; +import { type IEventsResponse } from '../../types/index.js'; export class Event { public eventId: string; diff --git a/src/entities/events/index.ts b/src/entities/events/index.ts index 0702380..278dad8 100644 --- a/src/entities/events/index.ts +++ b/src/entities/events/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './event-collection'; +export * from './event-collection.js'; diff --git a/src/entities/index.ts b/src/entities/index.ts index 774a192..f2d3c3f 100644 --- a/src/entities/index.ts +++ b/src/entities/index.ts @@ -4,21 +4,21 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './shared'; -export * from './product'; -export * from './price'; -export * from './transaction'; -export * from './adjustment'; -export * from './customer'; -export * from './business'; -export * from './subscription'; -export * from './address'; -export * from './discount'; -export * from './events'; -export * from './payout'; -export * from './event-types'; -export * from './notification-settings'; -export * from './notifications'; -export * from './report'; +export * from './shared/index.js'; +export * from './product/index.js'; +export * from './price/index.js'; +export * from './transaction/index.js'; +export * from './adjustment/index.js'; +export * from './customer/index.js'; +export * from './business/index.js'; +export * from './subscription/index.js'; +export * from './address/index.js'; +export * from './discount/index.js'; +export * from './events/index.js'; +export * from './payout/index.js'; +export * from './event-types/index.js'; +export * from './notification-settings/index.js'; +export * from './notifications/index.js'; +export * from './report/index.js'; export type CustomData = object; diff --git a/src/entities/notification-settings/index.ts b/src/entities/notification-settings/index.ts index f46a874..0e6001d 100644 --- a/src/entities/notification-settings/index.ts +++ b/src/entities/notification-settings/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification-settings'; +export * from './notification-settings.js'; diff --git a/src/entities/notification-settings/notification-settings.ts b/src/entities/notification-settings/notification-settings.ts index a4ec274..9486c8a 100644 --- a/src/entities/notification-settings/notification-settings.ts +++ b/src/entities/notification-settings/notification-settings.ts @@ -3,9 +3,10 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type NotificationSettingsType } from '../../enums'; -import { EventType } from '../event-types'; -import { type INotificationSettingsResponse } from '../../types/notification-settings'; + +import { type NotificationSettingsType } from '../../enums/index.js'; +import { EventType } from '../event-types/index.js'; +import { type INotificationSettingsResponse } from '../../types/index.js'; export class NotificationSettings { public readonly id: string; diff --git a/src/entities/notifications/index.ts b/src/entities/notifications/index.ts index ec88d59..0ba2984 100644 --- a/src/entities/notifications/index.ts +++ b/src/entities/notifications/index.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification'; -export * from './notification-log'; -export * from './notification-collection'; -export * from './replay-notification'; -export * from './notification-log-collection'; +export * from './notification.js'; +export * from './notification-log.js'; +export * from './notification-collection.js'; +export * from './replay-notification.js'; +export * from './notification-log-collection.js'; diff --git a/src/entities/notifications/notification-collection.ts b/src/entities/notifications/notification-collection.ts index 1d95097..fd7b597 100644 --- a/src/entities/notifications/notification-collection.ts +++ b/src/entities/notifications/notification-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Collection } from '../../internal/base'; -import { Notification } from './notification'; -import { type INotificationResponse } from '../../types/notifications'; +import { type INotificationResponse } from '../../types/index.js'; +import { Notification } from './notification.js'; +import { Collection } from '../../internal/base/index.js'; export class NotificationCollection extends Collection { override fromJson(data: INotificationResponse): Notification { diff --git a/src/entities/notifications/notification-log-collection.ts b/src/entities/notifications/notification-log-collection.ts index bbd069d..a346f5c 100644 --- a/src/entities/notifications/notification-log-collection.ts +++ b/src/entities/notifications/notification-log-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Collection } from '../../internal/base'; -import { type INotificationLogResponse } from '../../types'; -import { NotificationLog } from './notification-log'; +import { Collection } from '../../internal/base/index.js'; +import { type INotificationLogResponse } from '../../types/index.js'; +import { NotificationLog } from './notification-log.js'; export class NotificationLogCollection extends Collection { override fromJson(data: INotificationLogResponse): NotificationLog { diff --git a/src/entities/notifications/notification.ts b/src/entities/notifications/notification.ts index 0c9acf3..d267a28 100644 --- a/src/entities/notifications/notification.ts +++ b/src/entities/notifications/notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type NotificationStatus, type Origin } from '../../enums'; -import { type EventEntity, type IEventName, Webhooks } from '../../notifications'; -import { type INotificationResponse } from '../../types'; +import { type EventEntity, type IEventName, Webhooks } from '../../notifications/index.js'; +import { type NotificationStatus, type Origin } from '../../enums/index.js'; +import { type INotificationResponse } from '../../types/index.js'; export class Notification { public readonly id: string; diff --git a/src/entities/notifications/replay-notification.ts b/src/entities/notifications/replay-notification.ts index 393dc49..fd11d82 100644 --- a/src/entities/notifications/replay-notification.ts +++ b/src/entities/notifications/replay-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReplayNotificationResponse } from '../../types/notifications'; +import { type IReplayNotificationResponse } from '../../types/index.js'; export class ReplayNotification { public readonly notificationId: string; diff --git a/src/entities/payout/index.ts b/src/entities/payout/index.ts index 329c1de..74b3718 100644 --- a/src/entities/payout/index.ts +++ b/src/entities/payout/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout'; +export * from './payout.js'; diff --git a/src/entities/payout/payout.ts b/src/entities/payout/payout.ts index 9c53b8c..31631c9 100644 --- a/src/entities/payout/payout.ts +++ b/src/entities/payout/payout.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPayoutResponse } from '../../types'; -import { type CurrencyCode, type PayoutStatus } from '../../enums'; +import { type CurrencyCode, type PayoutStatus } from '../../enums/index.js'; +import { type IPayoutResponse } from '../../types/index.js'; export class Payout { public readonly id: string; diff --git a/src/entities/price/index.ts b/src/entities/price/index.ts index b9aecbb..0a06c8b 100644 --- a/src/entities/price/index.ts +++ b/src/entities/price/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './price-collection'; -export * from './price-quantity'; -export * from './price'; +export * from './price-collection.js'; +export * from './price-quantity.js'; +export * from './price.js'; diff --git a/src/entities/price/price-collection.ts b/src/entities/price/price-collection.ts index 933d538..4c2a7c7 100644 --- a/src/entities/price/price-collection.ts +++ b/src/entities/price/price-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceResponse } from '../../types'; -import { Collection } from '../../internal/base'; -import { Price } from './price'; +import { Collection } from '../../internal/base/index.js'; +import { type IPriceResponse } from '../../types/index.js'; +import { Price } from './price.js'; export class PriceCollection extends Collection { override fromJson(data: IPriceResponse): Price { diff --git a/src/entities/price/price-quantity.ts b/src/entities/price/price-quantity.ts index 28a9229..14b4ac3 100644 --- a/src/entities/price/price-quantity.ts +++ b/src/entities/price/price-quantity.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceQuantity } from '../../types'; +import { type IPriceQuantity } from '../../types/index.js'; export class PriceQuantity { public readonly minimum: number; diff --git a/src/entities/price/price.ts b/src/entities/price/price.ts index f4683c1..f718049 100644 --- a/src/entities/price/price.ts +++ b/src/entities/price/price.ts @@ -4,9 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData, type IPriceResponse } from '../../types'; -import { ImportMeta, Money, PriceQuantity, Product, TimePeriod, UnitPriceOverride } from '../index'; -import { type CatalogType, type Status, type TaxMode } from '../../enums'; +import { type CatalogType, type Status, type TaxMode } from '../../enums/index.js'; +import { ImportMeta, Money, TimePeriod, UnitPriceOverride } from '../shared/index.js'; +import { PriceQuantity } from './price-quantity.js'; +import { type ICustomData, type IPriceResponse } from '../../types/index.js'; +import { Product } from '../product/index.js'; export class Price { public readonly id: string; diff --git a/src/entities/pricing-preview/index.ts b/src/entities/pricing-preview/index.ts index b25bcec..7a38d1d 100644 --- a/src/entities/pricing-preview/index.ts +++ b/src/entities/pricing-preview/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './pricing-preview-discounts'; -export * from './pricing-preview-line-item'; -export * from './pricing-preview-details'; -export * from './pricing-preview'; +export * from './pricing-preview-discounts.js'; +export * from './pricing-preview-line-item.js'; +export * from './pricing-preview-details.js'; +export * from './pricing-preview.js'; diff --git a/src/entities/pricing-preview/pricing-preview-details.ts b/src/entities/pricing-preview/pricing-preview-details.ts index f615ecd..8486ff1 100644 --- a/src/entities/pricing-preview/pricing-preview-details.ts +++ b/src/entities/pricing-preview/pricing-preview-details.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { PricingPreviewLineItem } from './pricing-preview-line-item'; -import { type IPricingPreviewDetailsResponse } from '../../types'; + +import { PricingPreviewLineItem } from './pricing-preview-line-item.js'; +import { type IPricingPreviewDetailsResponse } from '../../types/index.js'; export class PricingPreviewDetails { public readonly lineItems: PricingPreviewLineItem[]; diff --git a/src/entities/pricing-preview/pricing-preview-discounts.ts b/src/entities/pricing-preview/pricing-preview-discounts.ts index c777193..3369b5a 100644 --- a/src/entities/pricing-preview/pricing-preview-discounts.ts +++ b/src/entities/pricing-preview/pricing-preview-discounts.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPricingPreviewDiscountsResponse } from '../../types'; -import { Discount } from '../index'; +import { Discount } from '../discount/index.js'; +import { type IPricingPreviewDiscountsResponse } from '../../types/index.js'; export class PricingPreviewDiscounts { public readonly discount: Discount; diff --git a/src/entities/pricing-preview/pricing-preview-line-item.ts b/src/entities/pricing-preview/pricing-preview-line-item.ts index 93f2dc4..b6ea47d 100644 --- a/src/entities/pricing-preview/pricing-preview-line-item.ts +++ b/src/entities/pricing-preview/pricing-preview-line-item.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Price } from '../price'; -import { Totals } from '../shared'; -import { Product } from '../product'; -import { PricingPreviewDiscounts } from './pricing-preview-discounts'; -import { type IPricingPreviewLineItemResponse } from '../../types'; +import { Price } from '../price/index.js'; +import { Totals } from '../shared/index.js'; +import { Product } from '../product/index.js'; +import { PricingPreviewDiscounts } from './pricing-preview-discounts.js'; +import { type IPricingPreviewLineItemResponse } from '../../types/index.js'; export class PricingPreviewLineItem { public readonly price: Price; diff --git a/src/entities/pricing-preview/pricing-preview.ts b/src/entities/pricing-preview/pricing-preview.ts index e27ecc9..c31dc0b 100644 --- a/src/entities/pricing-preview/pricing-preview.ts +++ b/src/entities/pricing-preview/pricing-preview.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums'; -import { type IPricingPreviewResponse } from '../../types'; -import { AddressPreview } from '../transaction'; -import { PricingPreviewDetails } from './pricing-preview-details'; +import { type AvailablePaymentMethod, type CurrencyCode } from '../../enums/index.js'; +import { AddressPreview } from '../transaction/index.js'; +import { PricingPreviewDetails } from './pricing-preview-details.js'; +import { type IPricingPreviewResponse } from '../../types/index.js'; export class PricingPreview { public readonly customerId: string | null; diff --git a/src/entities/product/index.ts b/src/entities/product/index.ts index 9a4486c..509f61f 100644 --- a/src/entities/product/index.ts +++ b/src/entities/product/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product-collection'; -export * from './product'; +export * from './product-collection.js'; +export * from './product.js'; diff --git a/src/entities/product/product-collection.ts b/src/entities/product/product-collection.ts index 1bc07f9..ec037d5 100644 --- a/src/entities/product/product-collection.ts +++ b/src/entities/product/product-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IProductResponse } from '../../types'; -import { Collection } from '../../internal/base'; -import { Product } from './product'; +import { Collection } from '../../internal/base/index.js'; +import { type IProductResponse } from '../../types/index.js'; +import { Product } from './product.js'; export class ProductCollection extends Collection { override fromJson(data: IProductResponse): Product { diff --git a/src/entities/product/product.ts b/src/entities/product/product.ts index 895e5f2..b60bf52 100644 --- a/src/entities/product/product.ts +++ b/src/entities/product/product.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IProductResponse } from '../../types'; -import { type CustomData, ImportMeta, Price } from '../index'; -import { type CatalogType, type Status, type TaxCategory } from '../../enums'; +import { type CatalogType, type Status, type TaxCategory } from '../../enums/index.js'; +import { type CustomData, ImportMeta, Price } from '../index.js'; +import { type IProductResponse } from '../../types/index.js'; export class Product { public readonly id: string; diff --git a/src/entities/report/index.ts b/src/entities/report/index.ts index 8ef34f4..e9e909c 100644 --- a/src/entities/report/index.ts +++ b/src/entities/report/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-filters'; -export * from './report'; -export * from './report-csv'; -export * from './report-collection'; +export * from './report-filters.js'; +export * from './report.js'; +export * from './report-csv.js'; +export * from './report-collection.js'; diff --git a/src/entities/report/report-collection.ts b/src/entities/report/report-collection.ts index aa2a9d5..c38ba4c 100644 --- a/src/entities/report/report-collection.ts +++ b/src/entities/report/report-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Report } from '../../entities'; -import { type IReportResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { Collection } from '../../internal/base/index.js'; +import { Report } from './report.js'; +import { type IReportResponse } from '../../types/index.js'; export class ReportCollection extends Collection { override fromJson(data: IReportResponse): Report { diff --git a/src/entities/report/report-csv.ts b/src/entities/report/report-csv.ts index d182a85..6d64bd3 100644 --- a/src/entities/report/report-csv.ts +++ b/src/entities/report/report-csv.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportCsvResponse } from '../../types'; +import { type IReportCsvResponse } from '../../types/index.js'; export class ReportCsv { public readonly url: string; diff --git a/src/entities/report/report-filters.ts b/src/entities/report/report-filters.ts index fb6d94c..dcf78c9 100644 --- a/src/entities/report/report-filters.ts +++ b/src/entities/report/report-filters.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportFilters } from '../../types'; -import { type ReportFilterName, type ReportFilterOperator } from '../../enums'; +import { type ReportFilterName, type ReportFilterOperator } from '../../enums/index.js'; +import { type IReportFilters } from '../../types/index.js'; export class ReportFilters { public readonly name: ReportFilterName; diff --git a/src/entities/report/report.ts b/src/entities/report/report.ts index a273200..46b21b0 100644 --- a/src/entities/report/report.ts +++ b/src/entities/report/report.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportResponse } from '../../types'; -import { ReportFilters } from '../index'; -import { type ReportStatus, type ReportType } from '../../enums'; +import { type ReportStatus, type ReportType } from '../../enums/index.js'; +import { ReportFilters } from './report-filters.js'; +import { type IReportResponse } from '../../types/index.js'; export class Report { public readonly id: string; diff --git a/src/entities/shared/adjustment-original-amount.ts b/src/entities/shared/adjustment-original-amount.ts index e24912a..83d2d39 100644 --- a/src/entities/shared/adjustment-original-amount.ts +++ b/src/entities/shared/adjustment-original-amount.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentOriginalAmountResponse } from '../../types'; -import { type AdjustmentCurrencyCode } from '../../enums'; +import { type AdjustmentCurrencyCode } from '../../enums/index.js'; +import { type IAdjustmentOriginalAmountResponse } from '../../types/index.js'; export class AdjustmentOriginalAmount { public readonly amount: string; diff --git a/src/entities/shared/billing-details.ts b/src/entities/shared/billing-details.ts index c875c1c..d04b523 100644 --- a/src/entities/shared/billing-details.ts +++ b/src/entities/shared/billing-details.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBillingDetailsResponse } from '../../types'; -import { TimePeriod } from '../index'; +import { TimePeriod } from './time-period.js'; +import { type IBillingDetailsResponse } from '../../types/index.js'; export class BillingDetails { public readonly enableCheckout: boolean | null; diff --git a/src/entities/shared/chargeback-fee.ts b/src/entities/shared/chargeback-fee.ts index 38ce516..ef9c637 100644 --- a/src/entities/shared/chargeback-fee.ts +++ b/src/entities/shared/chargeback-fee.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFee } from '../../types'; -import { AdjustmentOriginalAmount } from '../index'; +import { AdjustmentOriginalAmount } from './adjustment-original-amount.js'; +import { type IChargebackFee } from '../../types/index.js'; export class ChargebackFee { public readonly amount: string; diff --git a/src/entities/shared/import-meta.ts b/src/entities/shared/import-meta.ts index 5e9a6f9..9698cd1 100644 --- a/src/entities/shared/import-meta.ts +++ b/src/entities/shared/import-meta.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IImportMetaResponse } from '../../types'; +import { type IImportMetaResponse } from '../../types/index.js'; export class ImportMeta { public readonly externalId: string | null; diff --git a/src/entities/shared/index.ts b/src/entities/shared/index.ts index 8e83ffa..30542ce 100644 --- a/src/entities/shared/index.ts +++ b/src/entities/shared/index.ts @@ -4,23 +4,23 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './time-period'; -export * from './money'; -export * from './unit-price-override'; -export * from './billing-details'; -export * from './totals'; -export * from './tax-rates-used'; -export * from './transaction-totals'; -export * from './transaction-totals-adjusted'; -export * from './transaction-payout-totals'; -export * from './adjustment-original-amount'; -export * from './chargeback-fee'; -export * from './transaction-payout-totals-adjusted'; -export * from './unit-totals'; -export * from './payment-card'; -export * from './payment-method-details'; -export * from './transaction-payment-attempt'; -export * from './transaction-checkout'; -export * from './total-adjustments'; -export * from './payout-totals-adjustment'; -export * from './import-meta'; +export * from './time-period.js'; +export * from './money.js'; +export * from './unit-price-override.js'; +export * from './billing-details.js'; +export * from './totals.js'; +export * from './tax-rates-used.js'; +export * from './transaction-totals.js'; +export * from './transaction-totals-adjusted.js'; +export * from './transaction-payout-totals.js'; +export * from './adjustment-original-amount.js'; +export * from './chargeback-fee.js'; +export * from './transaction-payout-totals-adjusted.js'; +export * from './unit-totals.js'; +export * from './payment-card.js'; +export * from './payment-method-details.js'; +export * from './transaction-payment-attempt.js'; +export * from './transaction-checkout.js'; +export * from './total-adjustments.js'; +export * from './payout-totals-adjustment.js'; +export * from './import-meta.js'; diff --git a/src/entities/shared/money.ts b/src/entities/shared/money.ts index fd139df..4a75135 100644 --- a/src/entities/shared/money.ts +++ b/src/entities/shared/money.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyResponse } from '../../types'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type IMoneyResponse } from '../../types/index.js'; export class Money { public readonly amount: string; diff --git a/src/entities/shared/payment-card.ts b/src/entities/shared/payment-card.ts index cb8c64e..96ab21c 100644 --- a/src/entities/shared/payment-card.ts +++ b/src/entities/shared/payment-card.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentCardResponse } from '../../types'; -import { type PaymentCardType } from '../../enums'; +import { type PaymentCardType } from '../../enums/index.js'; +import { type IPaymentCardResponse } from '../../types/index.js'; export class PaymentCard { public readonly type: PaymentCardType; diff --git a/src/entities/shared/payment-method-details.ts b/src/entities/shared/payment-method-details.ts index 86dee4f..3b995fe 100644 --- a/src/entities/shared/payment-method-details.ts +++ b/src/entities/shared/payment-method-details.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentMethodDetails } from '../../types'; -import { PaymentCard } from '../index'; -import { type PaymentType } from '../../enums'; +import { type PaymentType } from '../../enums/index.js'; +import { PaymentCard } from './payment-card.js'; +import { type IPaymentMethodDetails } from '../../types/index.js'; export class PaymentMethodDetails { public readonly type: PaymentType; diff --git a/src/entities/shared/payout-totals-adjustment.ts b/src/entities/shared/payout-totals-adjustment.ts index 5504d77..c7285b3 100644 --- a/src/entities/shared/payout-totals-adjustment.ts +++ b/src/entities/shared/payout-totals-adjustment.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPayoutTotalsAdjustmentResponse } from '../../types'; -import { ChargebackFee } from '../index'; -import { type PayoutCurrencyCode } from '../../enums'; +import { ChargebackFee } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; +import { type IPayoutTotalsAdjustmentResponse } from '../../types/index.js'; export class PayoutTotalsAdjustment { public readonly subtotal: string; diff --git a/src/entities/shared/tax-rates-used.ts b/src/entities/shared/tax-rates-used.ts index 1bb483c..37dbd0e 100644 --- a/src/entities/shared/tax-rates-used.ts +++ b/src/entities/shared/tax-rates-used.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITaxRatesUsedResponse } from '../../types'; -import { Totals } from '../index'; +import { Totals } from './totals.js'; +import { type ITaxRatesUsedResponse } from '../../types/index.js'; export class TaxRatesUsed { public readonly taxRate: string; diff --git a/src/entities/shared/time-period.ts b/src/entities/shared/time-period.ts index 8370643..fc8e6eb 100644 --- a/src/entities/shared/time-period.ts +++ b/src/entities/shared/time-period.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriod } from '../../types'; -import { type Interval } from '../../enums'; +import { type Interval } from '../../enums/index.js'; +import { type ITimePeriod } from '../../types/index.js'; export class TimePeriod { public readonly interval: Interval; diff --git a/src/entities/shared/total-adjustments.ts b/src/entities/shared/total-adjustments.ts index 541e5f9..24f959b 100644 --- a/src/entities/shared/total-adjustments.ts +++ b/src/entities/shared/total-adjustments.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotalAdjustmentsResponse } from '../../types'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type ITotalAdjustmentsResponse } from '../../types/index.js'; export class TotalAdjustments { public readonly subtotal: string; diff --git a/src/entities/shared/totals.ts b/src/entities/shared/totals.ts index 8a2c7e3..f5e3444 100644 --- a/src/entities/shared/totals.ts +++ b/src/entities/shared/totals.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotals } from '../../types'; +import { type ITotals } from '../../types/index.js'; export class Totals { public readonly subtotal: string; diff --git a/src/entities/shared/transaction-checkout.ts b/src/entities/shared/transaction-checkout.ts index c78709f..19a96e9 100644 --- a/src/entities/shared/transaction-checkout.ts +++ b/src/entities/shared/transaction-checkout.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionCheckout } from '../../types'; +import { type ITransactionCheckout } from '../../types/index.js'; export class TransactionCheckout { public readonly url: string | null; diff --git a/src/entities/shared/transaction-payment-attempt.ts b/src/entities/shared/transaction-payment-attempt.ts index 6c7c89b..a9d441b 100644 --- a/src/entities/shared/transaction-payment-attempt.ts +++ b/src/entities/shared/transaction-payment-attempt.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPaymentAttemptResponse } from '../../types'; -import { PaymentMethodDetails } from '../index'; -import { type PaymentAttemptStatus, type ErrorCode } from '../../enums'; +import { type ErrorCode, type PaymentAttemptStatus } from '../../enums/index.js'; +import { PaymentMethodDetails } from './payment-method-details.js'; +import { type ITransactionPaymentAttemptResponse } from '../../types/index.js'; export class TransactionPaymentAttempt { public readonly paymentAttemptId: string; diff --git a/src/entities/shared/transaction-payout-totals-adjusted.ts b/src/entities/shared/transaction-payout-totals-adjusted.ts index 4c2b87f..3169345 100644 --- a/src/entities/shared/transaction-payout-totals-adjusted.ts +++ b/src/entities/shared/transaction-payout-totals-adjusted.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPayoutTotalsAdjustedResponse } from '../../types'; -import { ChargebackFee } from '../index'; -import { type PayoutCurrencyCode } from '../../enums'; +import { ChargebackFee } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; +import { type ITransactionPayoutTotalsAdjustedResponse } from '../../types/index.js'; export class TransactionPayoutTotalsAdjusted { public readonly subtotal: string; diff --git a/src/entities/shared/transaction-payout-totals.ts b/src/entities/shared/transaction-payout-totals.ts index 8d9b060..9cf5899 100644 --- a/src/entities/shared/transaction-payout-totals.ts +++ b/src/entities/shared/transaction-payout-totals.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPayoutTotalsResponse } from '../../types'; -import { type PayoutCurrencyCode } from '../../enums'; +import { type ITransactionPayoutTotalsResponse } from '../../types/index.js'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; export class TransactionPayoutTotals { public readonly subtotal: string; diff --git a/src/entities/shared/transaction-totals-adjusted.ts b/src/entities/shared/transaction-totals-adjusted.ts index 451e9e3..993a9fd 100644 --- a/src/entities/shared/transaction-totals-adjusted.ts +++ b/src/entities/shared/transaction-totals-adjusted.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionTotalsAdjustedResponse } from '../../types'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type ITransactionTotalsAdjustedResponse } from '../../types/index.js'; export class TransactionTotalsAdjusted { public readonly subtotal: string; diff --git a/src/entities/shared/transaction-totals.ts b/src/entities/shared/transaction-totals.ts index 57e056f..8cea043 100644 --- a/src/entities/shared/transaction-totals.ts +++ b/src/entities/shared/transaction-totals.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionTotalsResponse } from '../../types'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type ITransactionTotalsResponse } from '../../types/index.js'; export class TransactionTotals { public readonly subtotal: string; diff --git a/src/entities/shared/unit-price-override.ts b/src/entities/shared/unit-price-override.ts index 7950775..ceacd4c 100644 --- a/src/entities/shared/unit-price-override.ts +++ b/src/entities/shared/unit-price-override.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IUnitPriceOverrideResponse } from '../../types'; -import { Money } from '../index'; -import { type CountryCode } from '../../enums'; +import { type CountryCode } from '../../enums/index.js'; +import { Money } from './money.js'; +import { type IUnitPriceOverrideResponse } from '../../types/index.js'; export class UnitPriceOverride { public readonly countryCodes: CountryCode[]; diff --git a/src/entities/shared/unit-totals.ts b/src/entities/shared/unit-totals.ts index 2669a71..a57ff5f 100644 --- a/src/entities/shared/unit-totals.ts +++ b/src/entities/shared/unit-totals.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IUnitTotals } from '../../types'; +import { type IUnitTotals } from '../../types/index.js'; export class UnitTotals { public readonly subtotal: string; diff --git a/src/entities/subscription/index.ts b/src/entities/subscription/index.ts index 757c2ec..04fc74b 100644 --- a/src/entities/subscription/index.ts +++ b/src/entities/subscription/index.ts @@ -4,18 +4,18 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-discount'; -export * from './subscription-time-period'; -export * from './subscription-scheduled-change'; -export * from './subscription-management'; -export * from './subscription-item'; -export * from './subscription'; -export * from './subscription-collection'; -export * from './next-transaction'; -export * from './transaction-details-preview'; -export * from './transaction-line-item-preview'; -export * from './subscription-preview'; -export * from './subscription-preview-update-summary'; -export * from './subscription-preview-summary-result'; -export * from './next-transaction-adjustment-preview'; -export * from './next-transaction-adjustment-item'; +export * from './subscription-discount.js'; +export * from './subscription-time-period.js'; +export * from './subscription-scheduled-change.js'; +export * from './subscription-management.js'; +export * from './subscription-item.js'; +export * from './subscription.js'; +export * from './subscription-collection.js'; +export * from './next-transaction.js'; +export * from './transaction-details-preview.js'; +export * from './transaction-line-item-preview.js'; +export * from './subscription-preview.js'; +export * from './subscription-preview-update-summary.js'; +export * from './subscription-preview-summary-result.js'; +export * from './next-transaction-adjustment-preview.js'; +export * from './next-transaction-adjustment-item.js'; diff --git a/src/entities/subscription/next-transaction-adjustment-item.ts b/src/entities/subscription/next-transaction-adjustment-item.ts index 3d3ff61..68076b6 100644 --- a/src/entities/subscription/next-transaction-adjustment-item.ts +++ b/src/entities/subscription/next-transaction-adjustment-item.ts @@ -3,9 +3,10 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { AdjustmentItemTotals, AdjustmentProration } from '../adjustment'; -import { type AdjustmentType } from '../../enums'; -import { type IAdjustmentItemResponse } from '../../types'; + +import { type AdjustmentType } from '../../enums/index.js'; +import { AdjustmentItemTotals, AdjustmentProration } from '../adjustment/index.js'; +import { type IAdjustmentItemResponse } from '../../types/index.js'; export class NextTransactionAdjustmentItem { public readonly itemId: string; diff --git a/src/entities/subscription/next-transaction-adjustment-preview.ts b/src/entities/subscription/next-transaction-adjustment-preview.ts index f12e1cd..eecef0b 100644 --- a/src/entities/subscription/next-transaction-adjustment-preview.ts +++ b/src/entities/subscription/next-transaction-adjustment-preview.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { NextTransactionAdjustmentItem } from './next-transaction-adjustment-item'; -import { TotalAdjustments } from '../shared'; -import { type AdjustmentPreviewResponse } from '../../types'; +import { NextTransactionAdjustmentItem } from './next-transaction-adjustment-item.js'; +import { TotalAdjustments } from '../shared/index.js'; +import { type AdjustmentPreviewResponse } from '../../types/index.js'; export class NextTransactionAdjustmentPreview { public readonly transactionId: string; diff --git a/src/entities/subscription/next-transaction.ts b/src/entities/subscription/next-transaction.ts index 1106c44..97099bd 100644 --- a/src/entities/subscription/next-transaction.ts +++ b/src/entities/subscription/next-transaction.ts @@ -4,8 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type INextTransactionResponse } from '../../types'; -import { SubscriptionTimePeriod, TransactionDetailsPreview, NextTransactionAdjustmentPreview } from '../index'; +import { SubscriptionTimePeriod } from './subscription-time-period.js'; +import { TransactionDetailsPreview } from './transaction-details-preview.js'; +import { NextTransactionAdjustmentPreview } from './next-transaction-adjustment-preview.js'; +import { type INextTransactionResponse } from '../../types/index.js'; export class NextTransaction { public readonly billingPeriod: SubscriptionTimePeriod; diff --git a/src/entities/subscription/subscription-collection.ts b/src/entities/subscription/subscription-collection.ts index ba1e842..d78cb4c 100644 --- a/src/entities/subscription/subscription-collection.ts +++ b/src/entities/subscription/subscription-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Subscription } from './subscription'; -import { type ISubscriptionResponse } from '../../types'; -import { Collection } from '../../internal/base'; +import { Collection } from '../../internal/base/index.js'; +import { type ISubscriptionResponse } from '../../types/index.js'; +import { Subscription } from './subscription.js'; export class SubscriptionCollection extends Collection { override fromJson(data: ISubscriptionResponse): Subscription { diff --git a/src/entities/subscription/subscription-discount.ts b/src/entities/subscription/subscription-discount.ts index d8655e8..561ad21 100644 --- a/src/entities/subscription/subscription-discount.ts +++ b/src/entities/subscription/subscription-discount.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionDiscountResponse } from '../../types'; +import { type ISubscriptionDiscountResponse } from '../../types/index.js'; export class SubscriptionDiscount { public readonly id: string; diff --git a/src/entities/subscription/subscription-item.ts b/src/entities/subscription/subscription-item.ts index b6b7faf..5c82356 100644 --- a/src/entities/subscription/subscription-item.ts +++ b/src/entities/subscription/subscription-item.ts @@ -4,9 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionItemResponse } from '../../types'; -import { Price, Product, SubscriptionTimePeriod } from '../index'; -import { type SubscriptionItemStatus } from '../../enums'; +import { type SubscriptionItemStatus } from '../../enums/index.js'; +import { SubscriptionTimePeriod } from './subscription-time-period.js'; +import { Price } from '../price/index.js'; +import { type ISubscriptionItemResponse } from '../../types/index.js'; +import { Product } from '../product/index.js'; export class SubscriptionItem { public readonly status: SubscriptionItemStatus; diff --git a/src/entities/subscription/subscription-management.ts b/src/entities/subscription/subscription-management.ts index 3b4469a..759bd14 100644 --- a/src/entities/subscription/subscription-management.ts +++ b/src/entities/subscription/subscription-management.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionManagementResponse } from '../../types'; +import { type ISubscriptionManagementResponse } from '../../types/index.js'; export class SubscriptionManagement { public readonly updatePaymentMethod: string | null; diff --git a/src/entities/subscription/subscription-preview-summary-result.ts b/src/entities/subscription/subscription-preview-summary-result.ts index 76cde1d..50cf835 100644 --- a/src/entities/subscription/subscription-preview-summary-result.ts +++ b/src/entities/subscription/subscription-preview-summary-result.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionResultResponse } from '../../types'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type ISubscriptionResultResponse } from '../../types/index.js'; export class SubscriptionPreviewSummaryResult { public readonly action: 'credit' | 'charge'; diff --git a/src/entities/subscription/subscription-preview-update-summary.ts b/src/entities/subscription/subscription-preview-update-summary.ts index 3b21646..5c07155 100644 --- a/src/entities/subscription/subscription-preview-update-summary.ts +++ b/src/entities/subscription/subscription-preview-update-summary.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionPreviewUpdateSummary } from '../../types'; -import { Money, SubscriptionPreviewSummaryResult } from '../index'; +import { Money } from '../shared/index.js'; +import { SubscriptionPreviewSummaryResult } from './subscription-preview-summary-result.js'; +import { type ISubscriptionPreviewUpdateSummary } from '../../types/index.js'; export class SubscriptionPreviewUpdateSummary { public readonly credit: Money; diff --git a/src/entities/subscription/subscription-preview.ts b/src/entities/subscription/subscription-preview.ts index 093e92d..2c2fcc7 100644 --- a/src/entities/subscription/subscription-preview.ts +++ b/src/entities/subscription/subscription-preview.ts @@ -4,22 +4,20 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionItemResponse, type ISubscriptionPreviewResponse } from '../../types'; +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums/index.js'; +import { SubscriptionDiscount } from './subscription-discount.js'; +import { BillingDetails, ImportMeta, TimePeriod } from '../shared/index.js'; +import { SubscriptionTimePeriod } from './subscription-time-period.js'; +import { SubscriptionScheduledChange } from './subscription-scheduled-change.js'; +import { SubscriptionManagement } from './subscription-management.js'; +import { SubscriptionItem } from './subscription-item.js'; import { - BillingDetails, type CustomData, - ImportMeta, NextTransaction, - SubscriptionDiscount, - SubscriptionItem, - SubscriptionManagement, SubscriptionPreviewUpdateSummary, - SubscriptionScheduledChange, - SubscriptionTimePeriod, - TimePeriod, TransactionDetailsPreview, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums'; +} from '../index.js'; +import { type ISubscriptionItemResponse, type ISubscriptionPreviewResponse } from '../../types/index.js'; export class SubscriptionPreview { public readonly status: SubscriptionStatus; diff --git a/src/entities/subscription/subscription-scheduled-change.ts b/src/entities/subscription/subscription-scheduled-change.ts index 80eb4a9..19d1de1 100644 --- a/src/entities/subscription/subscription-scheduled-change.ts +++ b/src/entities/subscription/subscription-scheduled-change.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionScheduledChangeResponse } from '../../types'; -import { type ScheduledChangeAction } from '../../enums'; +import { type ScheduledChangeAction } from '../../enums/index.js'; +import { type ISubscriptionScheduledChangeResponse } from '../../types/index.js'; export class SubscriptionScheduledChange { public readonly action: ScheduledChangeAction; diff --git a/src/entities/subscription/subscription-time-period.ts b/src/entities/subscription/subscription-time-period.ts index 9a0634b..cb27bc6 100644 --- a/src/entities/subscription/subscription-time-period.ts +++ b/src/entities/subscription/subscription-time-period.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionTimePeriodResponse } from '../../types'; +import { type ISubscriptionTimePeriodResponse } from '../../types/index.js'; export class SubscriptionTimePeriod { public readonly startsAt: string; diff --git a/src/entities/subscription/subscription.ts b/src/entities/subscription/subscription.ts index 436bcc6..507fed4 100644 --- a/src/entities/subscription/subscription.ts +++ b/src/entities/subscription/subscription.ts @@ -4,21 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { - BillingDetails, - type CustomData, - ImportMeta, - NextTransaction, - SubscriptionDiscount, - SubscriptionItem, - SubscriptionManagement, - SubscriptionScheduledChange, - SubscriptionTimePeriod, - TimePeriod, - TransactionDetailsPreview, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums'; -import { type ISubscriptionResponse } from '../../types'; +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums/index.js'; +import { SubscriptionDiscount } from './subscription-discount.js'; +import { BillingDetails, ImportMeta, TimePeriod } from '../shared/index.js'; +import { SubscriptionTimePeriod } from './subscription-time-period.js'; +import { SubscriptionScheduledChange } from './subscription-scheduled-change.js'; +import { SubscriptionManagement } from './subscription-management.js'; +import { SubscriptionItem } from './subscription-item.js'; +import { type CustomData, NextTransaction, TransactionDetailsPreview } from '../index.js'; +import { type ISubscriptionResponse } from '../../types/index.js'; export class Subscription { public readonly id: string; diff --git a/src/entities/subscription/transaction-details-preview.ts b/src/entities/subscription/transaction-details-preview.ts index 76d1775..322fa95 100644 --- a/src/entities/subscription/transaction-details-preview.ts +++ b/src/entities/subscription/transaction-details-preview.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionDetailsPreviewResponse } from '../../types'; -import { TaxRatesUsed, TransactionTotals, TransactionLineItemPreview } from '../index'; +import { TaxRatesUsed, TransactionTotals } from '../shared/index.js'; +import { TransactionLineItemPreview } from './transaction-line-item-preview.js'; +import { type ITransactionDetailsPreviewResponse } from '../../types/index.js'; export class TransactionDetailsPreview { public readonly taxRatesUsed: TaxRatesUsed[]; diff --git a/src/entities/subscription/transaction-line-item-preview.ts b/src/entities/subscription/transaction-line-item-preview.ts index 3092159..a361487 100644 --- a/src/entities/subscription/transaction-line-item-preview.ts +++ b/src/entities/subscription/transaction-line-item-preview.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionLineItemPreviewResponse } from '../../types'; -import { UnitTotals, Totals, Product } from '../index'; +import { Totals, UnitTotals } from '../shared/index.js'; +import { Product } from '../product/index.js'; +import { type ITransactionLineItemPreviewResponse } from '../../types/index.js'; export class TransactionLineItemPreview { public readonly priceId: string; diff --git a/src/entities/transaction/address-preview.ts b/src/entities/transaction/address-preview.ts index a72fcfe..ab40f74 100644 --- a/src/entities/transaction/address-preview.ts +++ b/src/entities/transaction/address-preview.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CountryCode } from '../../enums'; -import { type IAddressPreviewResponse } from '../../resources'; +import { type CountryCode } from '../../enums/index.js'; +import { type IAddressPreviewResponse } from '../../resources/index.js'; export class AddressPreview { public readonly postalCode: string | null; diff --git a/src/entities/transaction/adjustment-totals-breakdown.ts b/src/entities/transaction/adjustment-totals-breakdown.ts index 1dfd24e..81fa14c 100644 --- a/src/entities/transaction/adjustment-totals-breakdown.ts +++ b/src/entities/transaction/adjustment-totals-breakdown.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentTotalsBreakdown } from '../../types'; +import { type IAdjustmentTotalsBreakdown } from '../../types/index.js'; export class AdjustmentTotalsBreakdown { public readonly credit: string; diff --git a/src/entities/transaction/adjustment-totals.ts b/src/entities/transaction/adjustment-totals.ts index 8ba8ced..1b861fd 100644 --- a/src/entities/transaction/adjustment-totals.ts +++ b/src/entities/transaction/adjustment-totals.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentTotalsResponse } from '../../types'; -import { AdjustmentTotalsBreakdown } from '../index'; -import { type CurrencyCode } from '../../enums'; +import { AdjustmentTotalsBreakdown } from './adjustment-totals-breakdown.js'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type IAdjustmentTotalsResponse } from '../../types/index.js'; export class AdjustmentTotals { public readonly subtotal: string; diff --git a/src/entities/transaction/index.ts b/src/entities/transaction/index.ts index 8137698..8603cba 100644 --- a/src/entities/transaction/index.ts +++ b/src/entities/transaction/index.ts @@ -4,19 +4,19 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './transactions-time-period'; -export * from './transaction-proration'; -export * from './transaction-item'; -export * from './transaction-line-item'; -export * from './transaction-details'; -export * from './transaction-adjustment-item'; -export * from './transaction-adjustment'; -export * from './adjustment-totals-breakdown'; -export * from './adjustment-totals'; -export * from './transaction'; -export * from './transaction-collection'; -export * from './transaction-invoice-pdf'; -export * from './transaction-preview'; -export * from './transaction-item-preview'; -export * from './proration'; -export * from './address-preview'; +export * from './transactions-time-period.js'; +export * from './transaction-proration.js'; +export * from './transaction-item.js'; +export * from './transaction-line-item.js'; +export * from './transaction-details.js'; +export * from './transaction-adjustment-item.js'; +export * from './transaction-adjustment.js'; +export * from './adjustment-totals-breakdown.js'; +export * from './adjustment-totals.js'; +export * from './transaction.js'; +export * from './transaction-collection.js'; +export * from './transaction-invoice-pdf.js'; +export * from './transaction-preview.js'; +export * from './transaction-item-preview.js'; +export * from './proration.js'; +export * from './address-preview.js'; diff --git a/src/entities/transaction/proration.ts b/src/entities/transaction/proration.ts index 3b9f576..f6e91e6 100644 --- a/src/entities/transaction/proration.ts +++ b/src/entities/transaction/proration.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { TransactionsTimePeriod } from '../index'; -import { type IProrationResponse } from '../../types'; +import { TransactionsTimePeriod } from './transactions-time-period.js'; +import { type IProrationResponse } from '../../types/index.js'; export class Proration { public readonly rate: string; diff --git a/src/entities/transaction/transaction-adjustment-item.ts b/src/entities/transaction/transaction-adjustment-item.ts index 2ff81ba..95a7953 100644 --- a/src/entities/transaction/transaction-adjustment-item.ts +++ b/src/entities/transaction/transaction-adjustment-item.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionAdjustmentItemResponse } from '../../types'; -import { AdjustmentItemTotals, TransactionProration } from '../index'; -import { type AdjustmentType } from '../../enums'; +import { type AdjustmentType } from '../../enums/index.js'; +import { TransactionProration } from './transaction-proration.js'; +import { AdjustmentItemTotals } from '../adjustment/index.js'; +import { type ITransactionAdjustmentItemResponse } from '../../types/index.js'; export class TransactionAdjustmentItem { public readonly id: string | null; diff --git a/src/entities/transaction/transaction-adjustment.ts b/src/entities/transaction/transaction-adjustment.ts index bcb1869..c9cace4 100644 --- a/src/entities/transaction/transaction-adjustment.ts +++ b/src/entities/transaction/transaction-adjustment.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionAdjustmentResponse } from '../../types'; -import { TransactionAdjustmentItem, TotalAdjustments, PayoutTotalsAdjustment } from '../index'; -import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../enums'; +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js'; +import { TransactionAdjustmentItem } from './transaction-adjustment-item.js'; +import { PayoutTotalsAdjustment, TotalAdjustments } from '../shared/index.js'; +import { type ITransactionAdjustmentResponse } from '../../types/index.js'; export class TransactionAdjustment { public readonly id: string; diff --git a/src/entities/transaction/transaction-collection.ts b/src/entities/transaction/transaction-collection.ts index 22836a1..9bcbaae 100644 --- a/src/entities/transaction/transaction-collection.ts +++ b/src/entities/transaction/transaction-collection.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionResponse } from '../../types'; -import { Collection } from '../../internal/base'; -import { Transaction } from './transaction'; +import { Collection } from '../../internal/base/index.js'; +import { type ITransactionResponse } from '../../types/index.js'; +import { Transaction } from './transaction.js'; export class TransactionCollection extends Collection { override fromJson(data: ITransactionResponse): Transaction { diff --git a/src/entities/transaction/transaction-details.ts b/src/entities/transaction/transaction-details.ts index 199e139..e74f826 100644 --- a/src/entities/transaction/transaction-details.ts +++ b/src/entities/transaction/transaction-details.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionDetailsResponse } from '../../types'; import { TaxRatesUsed, - TransactionTotals, - TransactionTotalsAdjusted, TransactionPayoutTotals, TransactionPayoutTotalsAdjusted, - TransactionLineItem, -} from '../index'; + TransactionTotals, + TransactionTotalsAdjusted, +} from '../shared/index.js'; +import { TransactionLineItem } from './transaction-line-item.js'; +import { type ITransactionDetailsResponse } from '../../types/index.js'; export class TransactionDetails { public readonly taxRatesUsed: TaxRatesUsed[]; diff --git a/src/entities/transaction/transaction-invoice-pdf.ts b/src/entities/transaction/transaction-invoice-pdf.ts index 5c597fb..0161027 100644 --- a/src/entities/transaction/transaction-invoice-pdf.ts +++ b/src/entities/transaction/transaction-invoice-pdf.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionInvoicePDF } from '../../types'; +import { type ITransactionInvoicePDF } from '../../types/index.js'; export class TransactionInvoicePDF { public readonly url: string; diff --git a/src/entities/transaction/transaction-item-preview.ts b/src/entities/transaction/transaction-item-preview.ts index 406ab54..95baf2f 100644 --- a/src/entities/transaction/transaction-item-preview.ts +++ b/src/entities/transaction/transaction-item-preview.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { Price, Proration } from '../index'; -import { type ITransactionItemPreviewResponse } from '../../types'; +import { Price } from '../price/index.js'; +import { Proration } from './proration.js'; +import { type ITransactionItemPreviewResponse } from '../../types/index.js'; export class TransactionItemPreview { public readonly price: Price | null; diff --git a/src/entities/transaction/transaction-item.ts b/src/entities/transaction/transaction-item.ts index c98783b..803d45f 100644 --- a/src/entities/transaction/transaction-item.ts +++ b/src/entities/transaction/transaction-item.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionItemResponse } from '../../types'; -import { Price, TransactionProration } from '../index'; +import { Price } from '../price/index.js'; +import { TransactionProration } from './transaction-proration.js'; +import { type ITransactionItemResponse } from '../../types/index.js'; export class TransactionItem { public readonly price: Price | null; diff --git a/src/entities/transaction/transaction-line-item.ts b/src/entities/transaction/transaction-line-item.ts index 829c9bd..00c23be 100644 --- a/src/entities/transaction/transaction-line-item.ts +++ b/src/entities/transaction/transaction-line-item.ts @@ -4,8 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionLineItemResponse } from '../../types'; -import { TransactionProration, UnitTotals, Totals, Product } from '../index'; +import { TransactionProration } from './transaction-proration.js'; +import { Totals, UnitTotals } from '../shared/index.js'; +import { Product } from '../product/index.js'; +import { type ITransactionLineItemResponse } from '../../types/index.js'; export class TransactionLineItem { public readonly id: string; diff --git a/src/entities/transaction/transaction-preview.ts b/src/entities/transaction/transaction-preview.ts index 95a7029..a644020 100644 --- a/src/entities/transaction/transaction-preview.ts +++ b/src/entities/transaction/transaction-preview.ts @@ -4,9 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPreviewResponse } from '../../types'; -import { AddressPreview, TransactionDetailsPreview, TransactionItemPreview } from '../index'; -import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums'; +import { type AvailablePaymentMethod, type CurrencyCode } from '../../enums/index.js'; +import { AddressPreview } from './address-preview.js'; +import { TransactionItemPreview } from './transaction-item-preview.js'; +import { TransactionDetailsPreview } from '../subscription/index.js'; +import { type ITransactionPreviewResponse } from '../../types/index.js'; export class TransactionPreview { public readonly customerId: string | null; diff --git a/src/entities/transaction/transaction-proration.ts b/src/entities/transaction/transaction-proration.ts index d6c143d..c4afb92 100644 --- a/src/entities/transaction/transaction-proration.ts +++ b/src/entities/transaction/transaction-proration.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionProrationResponse } from '../../types'; -import { TransactionsTimePeriod } from '../index'; +import { TransactionsTimePeriod } from './transactions-time-period.js'; +import { type ITransactionProrationResponse } from '../../types/index.js'; export class TransactionProration { public readonly rate: string; diff --git a/src/entities/transaction/transaction.ts b/src/entities/transaction/transaction.ts index 08f45a0..085dfdc 100644 --- a/src/entities/transaction/transaction.ts +++ b/src/entities/transaction/transaction.ts @@ -5,28 +5,28 @@ */ import { - type CustomData, - BillingDetails, - TransactionsTimePeriod, - TransactionItem, - TransactionDetails, - TransactionPaymentAttempt, - TransactionCheckout, + type AvailablePaymentMethod, + type CollectionMode, + type CurrencyCode, + type TransactionOrigin, + type TransactionStatus, +} from '../../enums/index.js'; +import { Address, - TransactionAdjustment, AdjustmentTotals, + BillingDetails, Business, + type CustomData, Customer, Discount, -} from '../index'; -import { - type TransactionStatus, - type CurrencyCode, - type TransactionOrigin, - type CollectionMode, - type AvailablePaymentMethod, -} from '../../enums'; -import { type ITransactionResponse } from '../../types'; + TransactionAdjustment, + TransactionCheckout, + TransactionDetails, + TransactionItem, + TransactionPaymentAttempt, + TransactionsTimePeriod, +} from '../index.js'; +import { type ITransactionResponse } from '../../types/index.js'; export class Transaction { public readonly id: string; diff --git a/src/entities/transaction/transactions-time-period.ts b/src/entities/transaction/transactions-time-period.ts index b434034..4d5b511 100644 --- a/src/entities/transaction/transactions-time-period.ts +++ b/src/entities/transaction/transactions-time-period.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionsTimePeriodResponse } from '../../types'; +import { type ITransactionsTimePeriodResponse } from '../../types/index.js'; export class TransactionsTimePeriod { public readonly startsAt: string; diff --git a/src/enums/adjustment/adjustment-type.ts b/src/enums/adjustment/adjustment-type.ts index bf33b68..7bfdeb1 100644 --- a/src/enums/adjustment/adjustment-type.ts +++ b/src/enums/adjustment/adjustment-type.ts @@ -1 +1,7 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + export type AdjustmentType = 'full' | 'partial' | 'tax' | 'proration'; diff --git a/src/enums/adjustment/index.ts b/src/enums/adjustment/index.ts index 4095002..b8b20a7 100644 --- a/src/enums/adjustment/index.ts +++ b/src/enums/adjustment/index.ts @@ -1,4 +1,10 @@ -export * from './adjustment-type'; -export * from './adjustment-currency-code'; -export * from './adjustment-action'; -export * from './adjustment-status'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export * from './adjustment-type.js'; +export * from './adjustment-currency-code.js'; +export * from './adjustment-action.js'; +export * from './adjustment-status.js'; diff --git a/src/enums/discount/index.ts b/src/enums/discount/index.ts index ffe4247..67dfd6b 100644 --- a/src/enums/discount/index.ts +++ b/src/enums/discount/index.ts @@ -1,2 +1,8 @@ -export * from './discount-status'; -export * from './discount-type'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export * from './discount-status.js'; +export * from './discount-type.js'; diff --git a/src/enums/index.ts b/src/enums/index.ts index 44a51ef..ca2c132 100644 --- a/src/enums/index.ts +++ b/src/enums/index.ts @@ -4,12 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './shared'; -export * from './subscription'; -export * from './discount'; -export * from './adjustment'; -export * from './transaction'; -export * from './payout'; -export * from './notification-settings'; -export * from './notification'; -export * from './report'; +export * from './shared/index.js'; +export * from './subscription/index.js'; +export * from './discount/index.js'; +export * from './adjustment/index.js'; +export * from './transaction/index.js'; +export * from './payout/index.js'; +export * from './notification-settings/index.js'; +export * from './notification/index.js'; +export * from './report/index.js'; diff --git a/src/enums/notification-settings/index.ts b/src/enums/notification-settings/index.ts index 98b9213..6731d37 100644 --- a/src/enums/notification-settings/index.ts +++ b/src/enums/notification-settings/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification-settings-type'; +export * from './notification-settings-type.js'; diff --git a/src/enums/notification/index.ts b/src/enums/notification/index.ts index f8696c2..6e0800e 100644 --- a/src/enums/notification/index.ts +++ b/src/enums/notification/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification-status'; -export * from './origin'; +export * from './notification-status.js'; +export * from './origin.js'; diff --git a/src/enums/payout/index.ts b/src/enums/payout/index.ts index b48596d..8a667d8 100644 --- a/src/enums/payout/index.ts +++ b/src/enums/payout/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout-status'; +export * from './payout-status.js'; diff --git a/src/enums/report/index.ts b/src/enums/report/index.ts index 444f757..55c66e4 100644 --- a/src/enums/report/index.ts +++ b/src/enums/report/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-status'; -export * from './report-type'; -export * from './report-filter-name'; -export * from './report-filter-operator'; +export * from './report-status.js'; +export * from './report-type.js'; +export * from './report-filter-name.js'; +export * from './report-filter-operator.js'; diff --git a/src/enums/shared/index.ts b/src/enums/shared/index.ts index 4f739f4..d408175 100644 --- a/src/enums/shared/index.ts +++ b/src/enums/shared/index.ts @@ -4,19 +4,19 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './tax-category'; -export * from './status'; -export * from './interval'; -export * from './tax-mode'; -export * from './currency-code'; -export * from './country-code'; -export * from './collection-mode'; -export * from './transaction-status'; -export * from './transaction-origin'; -export * from './payout-currency-code'; -export * from './payment-attempt-status'; -export * from './error-code'; -export * from './payment-type'; -export * from './catalog-type'; -export * from './available-payment-methods'; -export * from './disposition'; +export * from './tax-category.js'; +export * from './status.js'; +export * from './interval.js'; +export * from './tax-mode.js'; +export * from './currency-code.js'; +export * from './country-code.js'; +export * from './collection-mode.js'; +export * from './transaction-status.js'; +export * from './transaction-origin.js'; +export * from './payout-currency-code.js'; +export * from './payment-attempt-status.js'; +export * from './error-code.js'; +export * from './payment-type.js'; +export * from './catalog-type.js'; +export * from './available-payment-methods.js'; +export * from './disposition.js'; diff --git a/src/enums/subscription/index.ts b/src/enums/subscription/index.ts index 357859e..5a0df6c 100644 --- a/src/enums/subscription/index.ts +++ b/src/enums/subscription/index.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-effective-from'; -export * from './proration-billing-mode'; -export * from './scheduled-change-action'; -export * from './subscription-status'; -export * from './subscription-item-status'; -export * from './subscription-on-payment-failure'; +export * from './subscription-effective-from.js'; +export * from './proration-billing-mode.js'; +export * from './scheduled-change-action.js'; +export * from './subscription-status.js'; +export * from './subscription-item-status.js'; +export * from './subscription-on-payment-failure.js'; diff --git a/src/enums/transaction/index.ts b/src/enums/transaction/index.ts index 29d8b51..d002f02 100644 --- a/src/enums/transaction/index.ts +++ b/src/enums/transaction/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payment-card-type'; +export * from './payment-card-type.js'; diff --git a/src/index.cjs.edge.ts b/src/index.cjs.edge.ts new file mode 100644 index 0000000..c94c80e --- /dev/null +++ b/src/index.cjs.edge.ts @@ -0,0 +1,27 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +import { EdgeRuntime } from './internal/providers/runtime/edge-runtime.js'; +import { type PaddleOptions } from './internal/index.js'; +import { Paddle as PaddleBase } from './paddle.js'; + +export { Environment, LogLevel, ApiError, type PaddleOptions } from './internal/index.js'; +export { SDK_VERSION } from './version.js'; + +export * from './entities/index.js'; +export * from './enums/index.js'; +export * from './notifications/index.js'; +export * from './resources/index.js'; +export * from './types/index.js'; + +export { EdgeRuntime }; + +export class Paddle extends PaddleBase { + constructor(apiKey: string, options?: PaddleOptions) { + EdgeRuntime.initialize(); + super(apiKey, options); + } +} diff --git a/src/index.cjs.node.ts b/src/index.cjs.node.ts new file mode 100644 index 0000000..8e86a79 --- /dev/null +++ b/src/index.cjs.node.ts @@ -0,0 +1,27 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +import { type PaddleOptions } from './internal/index.js'; +import { Paddle as PaddleBase } from './paddle.js'; +import { NodeRuntime } from './internal/providers/runtime/node-runtime.js'; + +export { Environment, LogLevel, ApiError, type PaddleOptions } from './internal/index.js'; +export { SDK_VERSION } from './version.js'; + +export * from './entities/index.js'; +export * from './enums/index.js'; +export * from './notifications/index.js'; +export * from './resources/index.js'; +export * from './types/index.js'; + +export { NodeRuntime }; + +export class Paddle extends PaddleBase { + constructor(apiKey: string, options?: PaddleOptions) { + NodeRuntime.initialize(); + super(apiKey, options); + } +} diff --git a/src/index.esm.edge.ts b/src/index.esm.edge.ts new file mode 100644 index 0000000..a88ee60 --- /dev/null +++ b/src/index.esm.edge.ts @@ -0,0 +1,27 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export { Environment, LogLevel, ApiError, type PaddleOptions } from './internal/index.js'; +export { SDK_VERSION } from './version.js'; + +export * from './entities/index.js'; +export * from './enums/index.js'; +export * from './notifications/index.js'; +export * from './resources/index.js'; +export * from './types/index.js'; + +import { Paddle as PaddleBase } from './paddle.js'; +import { EdgeRuntime } from './internal/providers/runtime/edge-runtime.js'; +import { PaddleOptions } from './internal/index.js'; + +export { EdgeRuntime }; + +export class Paddle extends PaddleBase { + constructor(apiKey: string, options?: PaddleOptions) { + EdgeRuntime.initialize(); + super(apiKey, options); + } +} diff --git a/src/index.esm.node.ts b/src/index.esm.node.ts new file mode 100644 index 0000000..0f64df1 --- /dev/null +++ b/src/index.esm.node.ts @@ -0,0 +1,27 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export { Environment, LogLevel, ApiError, type PaddleOptions } from './internal/index.js'; +export { SDK_VERSION } from './version.js'; + +export * from './entities/index.js'; +export * from './enums/index.js'; +export * from './notifications/index.js'; +export * from './resources/index.js'; +export * from './types/index.js'; + +import { PaddleOptions } from './internal/index.js'; +import { Paddle as PaddleBase } from './paddle.js'; +import { NodeRuntime } from './internal/providers/runtime/node-runtime.js'; + +export { NodeRuntime }; + +export class Paddle extends PaddleBase { + constructor(apiKey: string, options?: PaddleOptions) { + NodeRuntime.initialize(); + super(apiKey, options); + } +} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 9db4626..0000000 --- a/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ! Autogenerated code ! - * Do not make changes to this file. - * Changes may be overwritten as part of auto-generation. - */ - -export { Environment, LogLevel, ApiError, type PaddleOptions } from './internal'; -export { SDK_VERSION } from './version'; - -export { Paddle } from './paddle'; -export * from './entities'; -export * from './enums'; -export * from './notifications'; -export * from './resources'; -export * from './types'; diff --git a/src/internal/api/case-helpers.ts b/src/internal/api/case-helpers.ts index 688e3c4..559c3f5 100644 --- a/src/internal/api/case-helpers.ts +++ b/src/internal/api/case-helpers.ts @@ -1,4 +1,4 @@ -import { isArray, isBoolean, isDate, isFunction, isObject, isRegExp, snakeCase } from 'lodash'; +import * as lodash from 'lodash'; interface CustomData { customData: unknown; @@ -13,7 +13,13 @@ function isTopLevelCustomDataCamel(input: any): input is CustomData { } function decamelizeKeys(obj: any): ObjectWithData { - if (!isObject(obj) || isDate(obj) || isRegExp(obj) || isBoolean(obj) || isFunction(obj)) { + if ( + !lodash.isObject(obj) || + lodash.isDate(obj) || + lodash.isRegExp(obj) || + lodash.isBoolean(obj) || + lodash.isFunction(obj) + ) { return obj; } @@ -21,7 +27,7 @@ function decamelizeKeys(obj: any): ObjectWithData { let i = 0; let l = 0; - if (isArray(obj)) { + if (lodash.isArray(obj)) { output = []; for (l = obj.length; i < l; i++) { output.push(decamelizeKeys(obj[i])); @@ -30,7 +36,7 @@ function decamelizeKeys(obj: any): ObjectWithData { output = {}; for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { - output[snakeCase(key)] = decamelizeKeys((obj as any)[key]); + output[lodash.snakeCase(key)] = decamelizeKeys((obj as any)[key]); } } } @@ -38,7 +44,7 @@ function decamelizeKeys(obj: any): ObjectWithData { } export function convertToSnakeCase(input: unknown) { - if (!input || !isObject(input)) { + if (!input || !lodash.isObject(input)) { return input; } diff --git a/src/internal/api/client.ts b/src/internal/api/client.ts index 3883291..6273181 100644 --- a/src/internal/api/client.ts +++ b/src/internal/api/client.ts @@ -1,14 +1,13 @@ -import { API_ENVIRONMENT_TO_BASE_URL_MAP } from './constants'; -import { type QueryParameters } from '../base'; -import fetch from 'node-fetch'; -import { SDK_VERSION } from '../../version'; -import { type PaddleOptions } from '../types/config'; -import { Environment } from './environment'; -import { randomUUID } from 'node:crypto'; -import { Logger } from '../base/logger'; -import { convertToSnakeCase } from './case-helpers'; -import { type ErrorResponse } from '../types/response'; -import { LogLevel } from './log-level'; +import { type PaddleOptions } from '../types/config.js'; +import { Environment } from './environment.js'; +import { API_ENVIRONMENT_TO_BASE_URL_MAP } from './constants.js'; +import { type QueryParameters } from '../base/index.js'; +import { Logger } from '../base/logger.js'; +import { LogLevel } from './log-level.js'; +import { RuntimeProvider } from '../providers/runtime-provider.js'; +import { SDK_VERSION } from '../../version.js'; +import { convertToSnakeCase } from './case-helpers.js'; +import { type ErrorResponse } from '../types/response.js'; export class Client { private readonly baseUrl: string; @@ -28,13 +27,19 @@ export class Client { } private getHeaders() { - const uuid = randomUUID(); + let uuid; + const cryptoProvider = RuntimeProvider.getProvider()?.crypto; + if (cryptoProvider) { + uuid = cryptoProvider.randomUUID(); + } else { + Logger.error('Unknown runtime. Cannot generate uuid'); + } return { Authorization: `bearer ${this.apiKey}`, 'Content-Type': 'application/json', 'user-agent': `PaddleSDK/node ${SDK_VERSION}`, - 'X-Transaction-ID': uuid, + 'X-Transaction-ID': uuid ?? '', }; } diff --git a/src/internal/api/constants.ts b/src/internal/api/constants.ts index 6923871..7431a26 100644 --- a/src/internal/api/constants.ts +++ b/src/internal/api/constants.ts @@ -1,4 +1,4 @@ -import { Environment } from './environment'; +import { Environment } from './environment.js'; export const API_ENVIRONMENT_TO_BASE_URL_MAP: Record = { [Environment.production]: 'https://api.paddle.com', diff --git a/src/internal/api/index.ts b/src/internal/api/index.ts index 11154b6..96ec707 100644 --- a/src/internal/api/index.ts +++ b/src/internal/api/index.ts @@ -1,3 +1,3 @@ -export { Environment } from './environment'; -export { convertToSnakeCase } from './case-helpers'; -export { LogLevel } from './log-level'; +export { Environment } from './environment.js'; +export { convertToSnakeCase } from './case-helpers.js'; +export { LogLevel } from './log-level.js'; diff --git a/src/internal/base/base-resource.ts b/src/internal/base/base-resource.ts index ce0545b..2aa013b 100644 --- a/src/internal/base/base-resource.ts +++ b/src/internal/base/base-resource.ts @@ -1,6 +1,6 @@ -import { type Client } from '../api/client'; -import { ApiError } from '../errors/generic'; -import { type ErrorResponse, type Response } from '../types/response'; +import { type Client } from '../api/client.js'; +import { type Response, type ErrorResponse } from '../types/response.js'; +import { ApiError } from '../errors/generic.js'; export class BaseResource { constructor(protected readonly client: Client) {} diff --git a/src/internal/base/collection.ts b/src/internal/base/collection.ts index 86e9540..fc9c101 100644 --- a/src/internal/base/collection.ts +++ b/src/internal/base/collection.ts @@ -1,6 +1,6 @@ -import { type Client } from '../api/client'; -import { ApiError } from '../errors/generic'; -import { type ErrorResponse, type ResponsePaginated } from '../types/response'; +import { type Client } from '../api/client.js'; +import { type ErrorResponse, type ResponsePaginated } from '../types/response.js'; +import { ApiError } from '../errors/generic.js'; export abstract class Collection implements AsyncIterable { public hasMore: boolean = true; diff --git a/src/internal/base/index.ts b/src/internal/base/index.ts index 22bec3c..856ca91 100644 --- a/src/internal/base/index.ts +++ b/src/internal/base/index.ts @@ -1,4 +1,4 @@ -export * from './base-resource'; -export * from './query-parameters'; -export * from './path-parameters'; -export * from './collection'; +export * from './base-resource.js'; +export * from './query-parameters.js'; +export * from './path-parameters.js'; +export * from './collection.js'; diff --git a/src/internal/base/logger.ts b/src/internal/base/logger.ts index f83bd43..7ec62a4 100644 --- a/src/internal/base/logger.ts +++ b/src/internal/base/logger.ts @@ -1,5 +1,4 @@ -import { type Response } from 'node-fetch'; -import { LogLevel } from '../api'; +import { LogLevel } from '../api/index.js'; type LogInputProps = Array; diff --git a/src/internal/errors/generic.ts b/src/internal/errors/generic.ts index dd48b3e..f8a6855 100644 --- a/src/internal/errors/generic.ts +++ b/src/internal/errors/generic.ts @@ -1,4 +1,4 @@ -import { type ErrorDetail, type ErrorField } from '../../internal'; +import { type ErrorDetail, type ErrorField } from '../types/response.js'; export class ApiError extends Error { public readonly type: string; diff --git a/src/internal/index.ts b/src/internal/index.ts index 1e4dc14..d761be3 100644 --- a/src/internal/index.ts +++ b/src/internal/index.ts @@ -1,4 +1,4 @@ -export type { ErrorResponse, ResponsePaginated, Response, ErrorDetail, ErrorField } from './types/response'; -export type { PaddleOptions } from './types/config'; -export * from './api'; -export { ApiError } from './errors/generic'; +export type { ErrorResponse, ResponsePaginated, Response, ErrorDetail, ErrorField } from './types/response.js'; +export type { PaddleOptions } from './types/config.js'; +export * from './api/index.js'; +export { ApiError } from './errors/generic.js'; diff --git a/src/internal/providers/crypto/crypto-provider.ts b/src/internal/providers/crypto/crypto-provider.ts new file mode 100644 index 0000000..4336c98 --- /dev/null +++ b/src/internal/providers/crypto/crypto-provider.ts @@ -0,0 +1,10 @@ +export abstract class CryptoProvider { + randomUUID(): string { + throw new Error('randomUUID not implemented.'); + } + + // @ts-expect-error - unused params. + async computeHmac(payload: string, secret: string): Promise { + throw new Error('computeHmac not implemented.'); + } +} diff --git a/src/internal/providers/crypto/edge-crypto.ts b/src/internal/providers/crypto/edge-crypto.ts new file mode 100644 index 0000000..4dbec9b --- /dev/null +++ b/src/internal/providers/crypto/edge-crypto.ts @@ -0,0 +1,44 @@ +import { type CryptoProvider } from './crypto-provider.js'; + +const byteHexMapping = new Array(256); +for (let i = 0; i < byteHexMapping.length; i++) { + byteHexMapping[i] = i.toString(16).padStart(2, '0'); +} + +export class EdgeCrypto implements CryptoProvider { + randomUUID(): string { + return crypto.randomUUID(); + } + + async computeHmac(payload: string, secret: string): Promise { + const encoder = new TextEncoder(); + + const key = await crypto.subtle.importKey( + 'raw', + encoder.encode(secret), + { + name: 'HMAC', + hash: { name: 'SHA-256' }, + }, + false, + ['sign'], + ); + + const signatureBuffer = await crypto.subtle.sign('hmac', key, encoder.encode(payload)); + + // crypto.subtle returns the signature in base64 format. This must be + // encoded in hex to match the CryptoProvider contract. We map each byte in + // the buffer to its corresponding hex octet and then combine into a string. + const signatureBytes = new Uint8Array(signatureBuffer); + const signatureHexCodes = new Array(signatureBytes.length); + + for (let i = 0; i < signatureBytes.length; i++) { + if (signatureBytes[i] !== undefined && signatureBytes[i] !== null) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + signatureHexCodes[i] = byteHexMapping[signatureBytes[i]!]; + } + } + + return signatureHexCodes.join(''); + } +} diff --git a/src/internal/providers/crypto/node-crypto.ts b/src/internal/providers/crypto/node-crypto.ts new file mode 100644 index 0000000..83f654d --- /dev/null +++ b/src/internal/providers/crypto/node-crypto.ts @@ -0,0 +1,17 @@ +import { createHmac, randomUUID } from 'node:crypto'; +import { type CryptoProvider } from './crypto-provider.js'; + +export class NodeCrypto implements CryptoProvider { + randomUUID(): string { + return randomUUID(); + } + + async computeHmac(payload: string, secret: string): Promise { + const hmac = createHmac('sha256', secret); + hmac.update(payload); + + return await new Promise((resolve) => { + resolve(hmac.digest('hex')); + }); + } +} diff --git a/src/internal/providers/runtime-provider.ts b/src/internal/providers/runtime-provider.ts new file mode 100644 index 0000000..69bbfc2 --- /dev/null +++ b/src/internal/providers/runtime-provider.ts @@ -0,0 +1,16 @@ +import { type CryptoProvider } from './crypto/crypto-provider.js'; + +export interface IRuntimeProvider { + crypto: CryptoProvider; +} + +export class RuntimeProvider { + static provider: IRuntimeProvider | undefined; + static setProvider(provider: IRuntimeProvider) { + this.provider = provider; + } + + static getProvider(): IRuntimeProvider | undefined { + return this.provider; + } +} diff --git a/src/internal/providers/runtime/edge-runtime.ts b/src/internal/providers/runtime/edge-runtime.ts new file mode 100644 index 0000000..b9d4e06 --- /dev/null +++ b/src/internal/providers/runtime/edge-runtime.ts @@ -0,0 +1,10 @@ +import { RuntimeProvider } from '../runtime-provider.js'; +import { EdgeCrypto } from '../crypto/edge-crypto.js'; + +export class EdgeRuntime { + static initialize() { + RuntimeProvider.setProvider({ + crypto: new EdgeCrypto(), + }); + } +} diff --git a/src/internal/providers/runtime/node-runtime.ts b/src/internal/providers/runtime/node-runtime.ts new file mode 100644 index 0000000..674e4b7 --- /dev/null +++ b/src/internal/providers/runtime/node-runtime.ts @@ -0,0 +1,10 @@ +import { RuntimeProvider } from '../runtime-provider.js'; +import { NodeCrypto } from '../crypto/node-crypto.js'; + +export class NodeRuntime { + static initialize() { + RuntimeProvider.setProvider({ + crypto: new NodeCrypto(), + }); + } +} diff --git a/src/internal/types/config.ts b/src/internal/types/config.ts index fd1a7c3..cd5734e 100644 --- a/src/internal/types/config.ts +++ b/src/internal/types/config.ts @@ -1,4 +1,4 @@ -import { type Environment, type LogLevel } from '../api'; +import { type Environment, type LogLevel } from '../api/index.js'; export interface PaddleOptions { environment?: Environment; diff --git a/src/notifications/entities/address/address-notification.ts b/src/notifications/entities/address/address-notification.ts index f05f1a3..be515cc 100644 --- a/src/notifications/entities/address/address-notification.ts +++ b/src/notifications/entities/address/address-notification.ts @@ -3,9 +3,10 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CountryCode, type Status } from '../../../enums'; -import { type CustomData, ImportMeta } from '../../../entities'; -import { type IAddressNotificationResponse } from '../../types'; + +import { type CountryCode, type Status } from '../../../enums/index.js'; +import { type CustomData, ImportMeta } from '../../../entities/index.js'; +import { type IAddressNotificationResponse } from '../../types/index.js'; export class AddressNotification { public readonly id: string; diff --git a/src/notifications/entities/address/index.ts b/src/notifications/entities/address/index.ts index 528f0db..5695735 100644 --- a/src/notifications/entities/address/index.ts +++ b/src/notifications/entities/address/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address-notification'; +export * from './address-notification.js'; diff --git a/src/notifications/entities/adjustment/adjustment-item-notification.ts b/src/notifications/entities/adjustment/adjustment-item-notification.ts index c09bf6e..ab79f35 100644 --- a/src/notifications/entities/adjustment/adjustment-item-notification.ts +++ b/src/notifications/entities/adjustment/adjustment-item-notification.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemNotificationResponse } from '../../types'; -import { AdjustmentItemTotalsNotification, AdjustmentProrationNotification } from '../index'; -import { type AdjustmentType } from '../../../enums'; +import { type AdjustmentType } from '../../../enums/index.js'; +import { AdjustmentProrationNotification } from './adjustment-proration-notification.js'; +import { AdjustmentItemTotalsNotification } from './adjustment-item-totals-notification.js'; +import { type IAdjustmentItemNotificationResponse } from '../../types/index.js'; export class AdjustmentItemNotification { public readonly id: string; diff --git a/src/notifications/entities/adjustment/adjustment-item-totals-notification.ts b/src/notifications/entities/adjustment/adjustment-item-totals-notification.ts index 40623a4..3f6f546 100644 --- a/src/notifications/entities/adjustment/adjustment-item-totals-notification.ts +++ b/src/notifications/entities/adjustment/adjustment-item-totals-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemTotalsNotificationResponse } from '../../types'; +import { type IAdjustmentItemTotalsNotificationResponse } from '../../types/index.js'; export class AdjustmentItemTotalsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/adjustment/adjustment-notification.ts b/src/notifications/entities/adjustment/adjustment-notification.ts index 91997eb..7716679 100644 --- a/src/notifications/entities/adjustment/adjustment-notification.ts +++ b/src/notifications/entities/adjustment/adjustment-notification.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { AdjustmentItemNotification, PayoutTotalsAdjustmentNotification, TotalAdjustmentsNotification } from '../index'; -import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums'; -import { type IAdjustmentNotificationResponse } from '../../types'; +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js'; +import { AdjustmentItemNotification } from './adjustment-item-notification.js'; +import { PayoutTotalsAdjustmentNotification, TotalAdjustmentsNotification } from '../shared/index.js'; +import { type IAdjustmentNotificationResponse } from '../../types/index.js'; export class AdjustmentNotification { public readonly id: string; diff --git a/src/notifications/entities/adjustment/adjustment-proration-notification.ts b/src/notifications/entities/adjustment/adjustment-proration-notification.ts index 43b511b..daca808 100644 --- a/src/notifications/entities/adjustment/adjustment-proration-notification.ts +++ b/src/notifications/entities/adjustment/adjustment-proration-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsProrationNotificationResponse } from '../../types'; -import { AdjustmentTimePeriodNotification } from '../index'; +import { AdjustmentTimePeriodNotification } from './adjustment-time-period-notification.js'; +import { type IAdjustmentsProrationNotificationResponse } from '../../types/index.js'; export class AdjustmentProrationNotification { public readonly rate: string; diff --git a/src/notifications/entities/adjustment/adjustment-time-period-notification.ts b/src/notifications/entities/adjustment/adjustment-time-period-notification.ts index 9e6fe51..31e782c 100644 --- a/src/notifications/entities/adjustment/adjustment-time-period-notification.ts +++ b/src/notifications/entities/adjustment/adjustment-time-period-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsTimePeriodNotificationResponse } from '../../types'; +import { type IAdjustmentsTimePeriodNotificationResponse } from '../../types/index.js'; export class AdjustmentTimePeriodNotification { public readonly startsAt: string; diff --git a/src/notifications/entities/adjustment/index.ts b/src/notifications/entities/adjustment/index.ts index fe586e3..f92eb45 100644 --- a/src/notifications/entities/adjustment/index.ts +++ b/src/notifications/entities/adjustment/index.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './adjustment-time-period-notification'; -export * from './adjustment-proration-notification'; -export * from './adjustment-item-notification'; -export * from './adjustment-item-totals-notification'; -export * from './adjustment-notification'; +export * from './adjustment-time-period-notification.js'; +export * from './adjustment-proration-notification.js'; +export * from './adjustment-item-notification.js'; +export * from './adjustment-item-totals-notification.js'; +export * from './adjustment-notification.js'; diff --git a/src/notifications/entities/business/business-notification.ts b/src/notifications/entities/business/business-notification.ts index b2c8ecc..fe8841d 100644 --- a/src/notifications/entities/business/business-notification.ts +++ b/src/notifications/entities/business/business-notification.ts @@ -4,10 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { ContactsNotification, ImportMetaNotification } from '../index'; -import { type Status } from '../../../enums'; -import { type IBusinessNotificationResponse } from '../../types'; -import { type CustomData } from '../../../entities'; +import { type Status } from '../../../enums/index.js'; +import { ContactsNotification } from './contacts-notification.js'; +import { type CustomData } from '../../../entities/index.js'; +import { ImportMetaNotification } from '../shared/index.js'; +import { type IBusinessNotificationResponse } from '../../types/index.js'; export class BusinessNotification { public readonly id: string; diff --git a/src/notifications/entities/business/contacts-notification.ts b/src/notifications/entities/business/contacts-notification.ts index 2ff33d9..bfdbc8e 100644 --- a/src/notifications/entities/business/contacts-notification.ts +++ b/src/notifications/entities/business/contacts-notification.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContactsNotification } from '../../types'; + +import { type IBusinessContactsNotification } from '../../types/index.js'; export class ContactsNotification { public readonly name: string | null; diff --git a/src/notifications/entities/business/index.ts b/src/notifications/entities/business/index.ts index 75156e4..9ff5338 100644 --- a/src/notifications/entities/business/index.ts +++ b/src/notifications/entities/business/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './contacts-notification'; -export * from './business-notification'; +export * from './contacts-notification.js'; +export * from './business-notification.js'; diff --git a/src/notifications/entities/customer/customer-notification.ts b/src/notifications/entities/customer/customer-notification.ts index fbb113d..139a23a 100644 --- a/src/notifications/entities/customer/customer-notification.ts +++ b/src/notifications/entities/customer/customer-notification.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { ImportMetaNotification } from '../index'; -import { type Status } from '../../../enums'; -import { type ICustomerNotificationResponse } from '../../types'; -import { type CustomData } from '../../../entities'; +import { type Status } from '../../../enums/index.js'; +import { type CustomData } from '../../../entities/index.js'; +import { ImportMetaNotification } from '../shared/index.js'; +import { type ICustomerNotificationResponse } from '../../types/index.js'; export class CustomerNotification { public readonly id: string; diff --git a/src/notifications/entities/customer/index.ts b/src/notifications/entities/customer/index.ts index a0639cc..e7dcf1e 100644 --- a/src/notifications/entities/customer/index.ts +++ b/src/notifications/entities/customer/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './customer-notification'; +export * from './customer-notification.js'; diff --git a/src/notifications/entities/discount/discount-notification.ts b/src/notifications/entities/discount/discount-notification.ts index b8afadc..771be1d 100644 --- a/src/notifications/entities/discount/discount-notification.ts +++ b/src/notifications/entities/discount/discount-notification.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums'; -import { type IDiscountNotificationResponse } from '../../types'; -import { ImportMetaNotification } from '../index'; -import { type CustomData } from '../../../entities'; +import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums/index.js'; +import { type CustomData } from '../../../entities/index.js'; +import { ImportMetaNotification } from '../shared/index.js'; +import { type IDiscountNotificationResponse } from '../../types/index.js'; export class DiscountNotification { public readonly id: string; diff --git a/src/notifications/entities/discount/index.ts b/src/notifications/entities/discount/index.ts index f68de53..9744e15 100644 --- a/src/notifications/entities/discount/index.ts +++ b/src/notifications/entities/discount/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './discount-notification'; +export * from './discount-notification.js'; diff --git a/src/notifications/entities/index.ts b/src/notifications/entities/index.ts index d9837b8..718ec10 100644 --- a/src/notifications/entities/index.ts +++ b/src/notifications/entities/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product'; -export * from './price'; -export * from './transaction'; -export * from './adjustment'; -export * from './customer'; -export * from './business'; -export * from './subscription'; -export * from './address'; -export * from './discount'; -export * from './payout'; -export * from './report'; -export * from './shared'; +export * from './product/index.js'; +export * from './price/index.js'; +export * from './transaction/index.js'; +export * from './adjustment/index.js'; +export * from './customer/index.js'; +export * from './business/index.js'; +export * from './subscription/index.js'; +export * from './address/index.js'; +export * from './discount/index.js'; +export * from './payout/index.js'; +export * from './report/index.js'; +export * from './shared/index.js'; diff --git a/src/notifications/entities/payout/index.ts b/src/notifications/entities/payout/index.ts index ccb0bbe..065ecff 100644 --- a/src/notifications/entities/payout/index.ts +++ b/src/notifications/entities/payout/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout-notification'; +export * from './payout-notification.js'; diff --git a/src/notifications/entities/payout/payout-notification.ts b/src/notifications/entities/payout/payout-notification.ts index 9d17055..49b7898 100644 --- a/src/notifications/entities/payout/payout-notification.ts +++ b/src/notifications/entities/payout/payout-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPayoutNotificationResponse } from '../../types'; -import { type CurrencyCode, type PayoutStatus } from '../../../enums'; +import { type CurrencyCode, type PayoutStatus } from '../../../enums/index.js'; +import { type IPayoutNotificationResponse } from '../../types/index.js'; export class PayoutNotification { public readonly id: string; diff --git a/src/notifications/entities/price/index.ts b/src/notifications/entities/price/index.ts index bf5638e..608a93d 100644 --- a/src/notifications/entities/price/index.ts +++ b/src/notifications/entities/price/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './price-quantity-notification'; -export * from './price-notification'; +export * from './price-quantity-notification.js'; +export * from './price-notification.js'; diff --git a/src/notifications/entities/price/price-notification.ts b/src/notifications/entities/price/price-notification.ts index 6f20c67..413fc34 100644 --- a/src/notifications/entities/price/price-notification.ts +++ b/src/notifications/entities/price/price-notification.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceNotificationResponse } from '../../types'; +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; import { ImportMetaNotification, MoneyNotification, - PriceQuantityNotification, TimePeriodNotification, UnitPriceOverrideNotification, -} from '../index'; -import { type CatalogType, type Status, type TaxMode } from '../../../enums'; -import { type ICustomData } from '../../../types'; +} from '../shared/index.js'; +import { PriceQuantityNotification } from './price-quantity-notification.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IPriceNotificationResponse } from '../../types/index.js'; export class PriceNotification { public readonly id: string; diff --git a/src/notifications/entities/price/price-quantity-notification.ts b/src/notifications/entities/price/price-quantity-notification.ts index fc8c437..9304157 100644 --- a/src/notifications/entities/price/price-quantity-notification.ts +++ b/src/notifications/entities/price/price-quantity-notification.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IPriceQuantityNotification } from '../../types'; + +import { type IPriceQuantityNotification } from '../../types/index.js'; export class PriceQuantityNotification { public readonly minimum: number; diff --git a/src/notifications/entities/product/index.ts b/src/notifications/entities/product/index.ts index 1a643c7..283c1f7 100644 --- a/src/notifications/entities/product/index.ts +++ b/src/notifications/entities/product/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product-notification'; +export * from './product-notification.js'; diff --git a/src/notifications/entities/product/product-notification.ts b/src/notifications/entities/product/product-notification.ts index 6b34613..c3ab487 100644 --- a/src/notifications/entities/product/product-notification.ts +++ b/src/notifications/entities/product/product-notification.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISharedProductNotificationResponse } from '../../types'; -import { ImportMetaNotification } from '../index'; -import { type TaxCategory, type Status, type CatalogType } from '../../../enums'; -import { type CustomData } from '../../../entities'; +import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; +import { type CustomData } from '../../../entities/index.js'; +import { ImportMetaNotification } from '../shared/index.js'; +import { type ISharedProductNotificationResponse } from '../../types/index.js'; export class ProductNotification { public readonly id: string; diff --git a/src/notifications/entities/report/index.ts b/src/notifications/entities/report/index.ts index 5bb3203..266d443 100644 --- a/src/notifications/entities/report/index.ts +++ b/src/notifications/entities/report/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-filters-notification'; -export * from './report-notification'; +export * from './report-filters-notification.js'; +export * from './report-notification.js'; diff --git a/src/notifications/entities/report/report-filters-notification.ts b/src/notifications/entities/report/report-filters-notification.ts index 977dd6a..b6cd8aa 100644 --- a/src/notifications/entities/report/report-filters-notification.ts +++ b/src/notifications/entities/report/report-filters-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportFiltersNotification } from '../../types'; -import { type ReportFilterName, type ReportFilterOperator } from '../../../enums'; +import { type ReportFilterName, type ReportFilterOperator } from '../../../enums/index.js'; +import { type IReportFiltersNotification } from '../../types/index.js'; export class ReportFiltersNotification { public readonly name: ReportFilterName; diff --git a/src/notifications/entities/report/report-notification.ts b/src/notifications/entities/report/report-notification.ts index b015d59..134e7ad 100644 --- a/src/notifications/entities/report/report-notification.ts +++ b/src/notifications/entities/report/report-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { ReportFiltersNotification } from '../index'; -import { type ReportStatus, type ReportType } from '../../../enums'; -import { type IReportNotificationResponse } from '../../types'; +import { type ReportStatus, type ReportType } from '../../../enums/index.js'; +import { ReportFiltersNotification } from './report-filters-notification.js'; +import { type IReportNotificationResponse } from '../../types/index.js'; export class ReportNotification { public readonly id: string; diff --git a/src/notifications/entities/shared/adjustment-original-amount-notification.ts b/src/notifications/entities/shared/adjustment-original-amount-notification.ts index 5471ccb..e5fb4e8 100644 --- a/src/notifications/entities/shared/adjustment-original-amount-notification.ts +++ b/src/notifications/entities/shared/adjustment-original-amount-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentOriginalAmountNotificationResponse } from '../../types'; -import { type AdjustmentCurrencyCode } from '../../../enums'; +import { type AdjustmentCurrencyCode } from '../../../enums/index.js'; +import { type IAdjustmentOriginalAmountNotificationResponse } from '../../types/index.js'; export class AdjustmentOriginalAmountNotification { public readonly amount: string; diff --git a/src/notifications/entities/shared/billing-details-notification.ts b/src/notifications/entities/shared/billing-details-notification.ts index ab55370..6ae383a 100644 --- a/src/notifications/entities/shared/billing-details-notification.ts +++ b/src/notifications/entities/shared/billing-details-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBillingDetailsNotificationResponse } from '../../types'; -import { TimePeriodNotification } from '../index'; +import { TimePeriodNotification } from './time-period-notification.js'; +import { type IBillingDetailsNotificationResponse } from '../../types/index.js'; export class BillingDetailsNotification { public readonly enableCheckout: boolean | null; diff --git a/src/notifications/entities/shared/chargeback-fee-notification.ts b/src/notifications/entities/shared/chargeback-fee-notification.ts index 1e7da90..6cfa691 100644 --- a/src/notifications/entities/shared/chargeback-fee-notification.ts +++ b/src/notifications/entities/shared/chargeback-fee-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFeeNotification } from '../../types'; -import { AdjustmentOriginalAmountNotification } from '../index'; +import { AdjustmentOriginalAmountNotification } from './adjustment-original-amount-notification.js'; +import { type IChargebackFeeNotification } from '../../types/index.js'; export class ChargebackFeeNotification { public readonly amount: string; diff --git a/src/notifications/entities/shared/import-meta-notification.ts b/src/notifications/entities/shared/import-meta-notification.ts index e81b8c5..5943cec 100644 --- a/src/notifications/entities/shared/import-meta-notification.ts +++ b/src/notifications/entities/shared/import-meta-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IImportMetaNotificationResponse } from '../../types'; +import { type IImportMetaNotificationResponse } from '../../types/index.js'; export class ImportMetaNotification { public readonly externalId: string | null; diff --git a/src/notifications/entities/shared/index.ts b/src/notifications/entities/shared/index.ts index 69b1e56..aa279fe 100644 --- a/src/notifications/entities/shared/index.ts +++ b/src/notifications/entities/shared/index.ts @@ -4,23 +4,23 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './time-period-notification'; -export * from './money-notification'; -export * from './unit-price-override-notification'; -export * from './billing-details-notification'; -export * from './totals-notification'; -export * from './tax-rates-used-notification'; -export * from './transaction-totals-notification'; -export * from './transaction-totals-adjusted-notification'; -export * from './transaction-payout-totals-notification'; -export * from './adjustment-original-amount-notification'; -export * from './chargeback-fee-notification'; -export * from './transaction-payout-totals-adjusted-notification'; -export * from './unit-totals-notification'; -export * from './payment-card-notification'; -export * from './payment-method-details-notification'; -export * from './transaction-payment-attempt-notification'; -export * from './transaction-checkout-notification'; -export * from './total-adjustments-notification'; -export * from './payout-totals-adjustment-notification'; -export * from './import-meta-notification'; +export * from './time-period-notification.js'; +export * from './money-notification.js'; +export * from './unit-price-override-notification.js'; +export * from './billing-details-notification.js'; +export * from './totals-notification.js'; +export * from './tax-rates-used-notification.js'; +export * from './transaction-totals-notification.js'; +export * from './transaction-totals-adjusted-notification.js'; +export * from './transaction-payout-totals-notification.js'; +export * from './adjustment-original-amount-notification.js'; +export * from './chargeback-fee-notification.js'; +export * from './transaction-payout-totals-adjusted-notification.js'; +export * from './unit-totals-notification.js'; +export * from './payment-card-notification.js'; +export * from './payment-method-details-notification.js'; +export * from './transaction-payment-attempt-notification.js'; +export * from './transaction-checkout-notification.js'; +export * from './total-adjustments-notification.js'; +export * from './payout-totals-adjustment-notification.js'; +export * from './import-meta-notification.js'; diff --git a/src/notifications/entities/shared/money-notification.ts b/src/notifications/entities/shared/money-notification.ts index 6a013f8..b628f7d 100644 --- a/src/notifications/entities/shared/money-notification.ts +++ b/src/notifications/entities/shared/money-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyNotificationResponse } from '../../types'; -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; +import { type IMoneyNotificationResponse } from '../../types/index.js'; export class MoneyNotification { public readonly amount: string; diff --git a/src/notifications/entities/shared/payment-card-notification.ts b/src/notifications/entities/shared/payment-card-notification.ts index cf05998..22c5510 100644 --- a/src/notifications/entities/shared/payment-card-notification.ts +++ b/src/notifications/entities/shared/payment-card-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentCardNotificationResponse } from '../../types'; -import { type PaymentCardType } from '../../../enums'; +import { type PaymentCardType } from '../../../enums/index.js'; +import { type IPaymentCardNotificationResponse } from '../../types/index.js'; export class PaymentCardNotification { public readonly type: PaymentCardType; diff --git a/src/notifications/entities/shared/payment-method-details-notification.ts b/src/notifications/entities/shared/payment-method-details-notification.ts index 75eda16..d287f70 100644 --- a/src/notifications/entities/shared/payment-method-details-notification.ts +++ b/src/notifications/entities/shared/payment-method-details-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentMethodDetailsNotification } from '../../types'; -import { type PaymentType } from '../../../enums'; -import { PaymentCardNotification } from './payment-card-notification'; +import { type PaymentType } from '../../../enums/index.js'; +import { PaymentCardNotification } from './payment-card-notification.js'; +import { type IPaymentMethodDetailsNotification } from '../../types/index.js'; export class PaymentMethodDetailsNotification { public readonly type: PaymentType; diff --git a/src/notifications/entities/shared/payout-totals-adjustment-notification.ts b/src/notifications/entities/shared/payout-totals-adjustment-notification.ts index ca0453e..8c825d2 100644 --- a/src/notifications/entities/shared/payout-totals-adjustment-notification.ts +++ b/src/notifications/entities/shared/payout-totals-adjustment-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPayoutTotalsAdjustmentNotificationResponse } from '../../types'; -import { ChargebackFeeNotification } from '../index'; -import { type PayoutCurrencyCode } from '../../../enums'; +import { ChargebackFeeNotification } from './chargeback-fee-notification.js'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; +import { type IPayoutTotalsAdjustmentNotificationResponse } from '../../types/index.js'; export class PayoutTotalsAdjustmentNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/tax-rates-used-notification.ts b/src/notifications/entities/shared/tax-rates-used-notification.ts index bd4ddde..f1149bb 100644 --- a/src/notifications/entities/shared/tax-rates-used-notification.ts +++ b/src/notifications/entities/shared/tax-rates-used-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITaxRatesUsedNotificationResponse } from '../../types'; -import { TotalsNotification } from '../index'; +import { TotalsNotification } from './totals-notification.js'; +import { type ITaxRatesUsedNotificationResponse } from '../../types/index.js'; export class TaxRatesUsedNotification { public readonly taxRate: string; diff --git a/src/notifications/entities/shared/time-period-notification.ts b/src/notifications/entities/shared/time-period-notification.ts index 8c9b8d3..7958ceb 100644 --- a/src/notifications/entities/shared/time-period-notification.ts +++ b/src/notifications/entities/shared/time-period-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriodNotification } from '../../types'; -import { type Interval } from '../../../enums'; +import { type Interval } from '../../../enums/index.js'; +import { type ITimePeriodNotification } from '../../types/index.js'; export class TimePeriodNotification { public readonly interval: Interval; diff --git a/src/notifications/entities/shared/total-adjustments-notification.ts b/src/notifications/entities/shared/total-adjustments-notification.ts index e16cd59..3e0cd4c 100644 --- a/src/notifications/entities/shared/total-adjustments-notification.ts +++ b/src/notifications/entities/shared/total-adjustments-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotalAdjustmentsNotificationResponse } from '../../types'; -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; +import { type ITotalAdjustmentsNotificationResponse } from '../../types/index.js'; export class TotalAdjustmentsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/totals-notification.ts b/src/notifications/entities/shared/totals-notification.ts index fb20a0b..46d06e8 100644 --- a/src/notifications/entities/shared/totals-notification.ts +++ b/src/notifications/entities/shared/totals-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotalsNotification } from '../../types'; +import { type ITotalsNotification } from '../../types/index.js'; export class TotalsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/transaction-checkout-notification.ts b/src/notifications/entities/shared/transaction-checkout-notification.ts index 8866e1d..23ced69 100644 --- a/src/notifications/entities/shared/transaction-checkout-notification.ts +++ b/src/notifications/entities/shared/transaction-checkout-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionCheckoutNotification } from '../../types'; +import { type ITransactionCheckoutNotification } from '../../types/index.js'; export class TransactionCheckoutNotification { public readonly url: string | null; diff --git a/src/notifications/entities/shared/transaction-payment-attempt-notification.ts b/src/notifications/entities/shared/transaction-payment-attempt-notification.ts index d98172f..469c4c8 100644 --- a/src/notifications/entities/shared/transaction-payment-attempt-notification.ts +++ b/src/notifications/entities/shared/transaction-payment-attempt-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPaymentAttemptNotificationResponse } from '../../types'; -import { PaymentMethodDetailsNotification } from '../index'; -import { type PaymentAttemptStatus, type ErrorCode } from '../../../enums'; +import { type ErrorCode, type PaymentAttemptStatus } from '../../../enums/index.js'; +import { PaymentMethodDetailsNotification } from './payment-method-details-notification.js'; +import { type ITransactionPaymentAttemptNotificationResponse } from '../../types/index.js'; export class TransactionPaymentAttemptNotification { public readonly paymentAttemptId: string; diff --git a/src/notifications/entities/shared/transaction-payout-totals-adjusted-notification.ts b/src/notifications/entities/shared/transaction-payout-totals-adjusted-notification.ts index c4db34c..c6eef4b 100644 --- a/src/notifications/entities/shared/transaction-payout-totals-adjusted-notification.ts +++ b/src/notifications/entities/shared/transaction-payout-totals-adjusted-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPayoutTotalsAdjustedNotificationResponse } from '../../types'; -import { ChargebackFeeNotification } from '../index'; -import { type PayoutCurrencyCode } from '../../../enums'; +import { ChargebackFeeNotification } from './chargeback-fee-notification.js'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; +import { type ITransactionPayoutTotalsAdjustedNotificationResponse } from '../../types/index.js'; export class TransactionPayoutTotalsAdjustedNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/transaction-payout-totals-notification.ts b/src/notifications/entities/shared/transaction-payout-totals-notification.ts index e492c2e..e3420b2 100644 --- a/src/notifications/entities/shared/transaction-payout-totals-notification.ts +++ b/src/notifications/entities/shared/transaction-payout-totals-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionPayoutTotalsNotificationResponse } from '../../types'; -import { type PayoutCurrencyCode } from '../../../enums'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; +import { type ITransactionPayoutTotalsNotificationResponse } from '../../types/index.js'; export class TransactionPayoutTotalsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/transaction-totals-adjusted-notification.ts b/src/notifications/entities/shared/transaction-totals-adjusted-notification.ts index 22edab6..8e6dd62 100644 --- a/src/notifications/entities/shared/transaction-totals-adjusted-notification.ts +++ b/src/notifications/entities/shared/transaction-totals-adjusted-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionTotalsAdjustedNotificationResponse } from '../../types'; -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; +import { type ITransactionTotalsAdjustedNotificationResponse } from '../../types/index.js'; export class TransactionTotalsAdjustedNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/transaction-totals-notification.ts b/src/notifications/entities/shared/transaction-totals-notification.ts index ed9eddc..b8b5a4e 100644 --- a/src/notifications/entities/shared/transaction-totals-notification.ts +++ b/src/notifications/entities/shared/transaction-totals-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionTotalsNotificationResponse } from '../../types'; -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; +import { type ITransactionTotalsNotificationResponse } from '../../types/index.js'; export class TransactionTotalsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/shared/unit-price-override-notification.ts b/src/notifications/entities/shared/unit-price-override-notification.ts index bc8b076..a219fed 100644 --- a/src/notifications/entities/shared/unit-price-override-notification.ts +++ b/src/notifications/entities/shared/unit-price-override-notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IUnitPriceOverrideNotificationResponse } from '../../types'; -import { MoneyNotification } from '../index'; -import { type CountryCode } from '../../../enums'; +import { type CountryCode } from '../../../enums/index.js'; +import { MoneyNotification } from './money-notification.js'; +import { type IUnitPriceOverrideNotificationResponse } from '../../types/index.js'; export class UnitPriceOverrideNotification { public readonly countryCodes: CountryCode[]; diff --git a/src/notifications/entities/shared/unit-totals-notification.ts b/src/notifications/entities/shared/unit-totals-notification.ts index 8a45738..3e3695c 100644 --- a/src/notifications/entities/shared/unit-totals-notification.ts +++ b/src/notifications/entities/shared/unit-totals-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IUnitTotalsNotification } from '../../types'; +import { type IUnitTotalsNotification } from '../../types/index.js'; export class UnitTotalsNotification { public readonly subtotal: string; diff --git a/src/notifications/entities/subscription/index.ts b/src/notifications/entities/subscription/index.ts index 9a56c55..9353b33 100644 --- a/src/notifications/entities/subscription/index.ts +++ b/src/notifications/entities/subscription/index.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-discount-notification'; -export * from './subscription-time-period-notification'; -export * from './subscription-scheduled-change-notification'; -export * from './subscription-price-notification'; -export * from './subscription-item-notification'; -export * from './subscription-notification'; +export * from './subscription-discount-notification.js'; +export * from './subscription-time-period-notification.js'; +export * from './subscription-scheduled-change-notification.js'; +export * from './subscription-price-notification.js'; +export * from './subscription-item-notification.js'; +export * from './subscription-notification.js'; diff --git a/src/notifications/entities/subscription/subscription-discount-notification.ts b/src/notifications/entities/subscription/subscription-discount-notification.ts index 9b25c4c..10a27f9 100644 --- a/src/notifications/entities/subscription/subscription-discount-notification.ts +++ b/src/notifications/entities/subscription/subscription-discount-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionDiscountNotificationResponse } from '../../types'; +import { type ISubscriptionDiscountNotificationResponse } from '../../types/index.js'; export class SubscriptionDiscountNotification { public readonly id: string; diff --git a/src/notifications/entities/subscription/subscription-item-notification.ts b/src/notifications/entities/subscription/subscription-item-notification.ts index 88518d9..080be23 100644 --- a/src/notifications/entities/subscription/subscription-item-notification.ts +++ b/src/notifications/entities/subscription/subscription-item-notification.ts @@ -4,9 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionItemNotificationResponse } from '../../types'; -import { ProductNotification, SubscriptionPriceNotification, SubscriptionTimePeriodNotification } from '../index'; -import { type SubscriptionItemStatus } from '../../../enums'; +import { type SubscriptionItemStatus } from '../../../enums/index.js'; +import { SubscriptionTimePeriodNotification } from './subscription-time-period-notification.js'; +import { SubscriptionPriceNotification } from './subscription-price-notification.js'; +import { type ISubscriptionItemNotificationResponse } from '../../types/index.js'; +import { ProductNotification } from '../product/index.js'; export class SubscriptionItemNotification { public readonly status: SubscriptionItemStatus; diff --git a/src/notifications/entities/subscription/subscription-notification.ts b/src/notifications/entities/subscription/subscription-notification.ts index 2c7f5b7..083ce18 100644 --- a/src/notifications/entities/subscription/subscription-notification.ts +++ b/src/notifications/entities/subscription/subscription-notification.ts @@ -4,18 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ -import { - BillingDetailsNotification, - ImportMetaNotification, - SubscriptionDiscountNotification, - SubscriptionItemNotification, - SubscriptionScheduledChangeNotification, - SubscriptionTimePeriodNotification, - TimePeriodNotification, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../../enums'; -import { type ISubscriptionNotificationResponse } from '../../types'; -import { type CustomData } from '../../../entities'; +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../../enums/index.js'; +import { SubscriptionDiscountNotification } from './subscription-discount-notification.js'; +import { BillingDetailsNotification, ImportMetaNotification, TimePeriodNotification } from '../shared/index.js'; +import { SubscriptionTimePeriodNotification } from './subscription-time-period-notification.js'; +import { SubscriptionScheduledChangeNotification } from './subscription-scheduled-change-notification.js'; +import { SubscriptionItemNotification } from './subscription-item-notification.js'; +import { type CustomData } from '../../../entities/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionNotification { public readonly id: string; diff --git a/src/notifications/entities/subscription/subscription-price-notification.ts b/src/notifications/entities/subscription/subscription-price-notification.ts index 76dd481..1dc9a18 100644 --- a/src/notifications/entities/subscription/subscription-price-notification.ts +++ b/src/notifications/entities/subscription/subscription-price-notification.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionPriceNotificationResponse } from '../../types'; +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; import { - type ImportMetaNotification, + ImportMetaNotification, MoneyNotification, - PriceQuantityNotification, TimePeriodNotification, UnitPriceOverrideNotification, -} from '../index'; -import { type CatalogType, type Status, type TaxMode } from '../../../enums'; -import { type CustomData, ImportMeta } from '../../../entities'; +} from '../shared/index.js'; +import { PriceQuantityNotification } from '../price/index.js'; +import { type CustomData } from '../../../entities/index.js'; +import { type ISubscriptionPriceNotificationResponse } from '../../types/index.js'; export class SubscriptionPriceNotification { public readonly id: string; @@ -47,6 +47,6 @@ export class SubscriptionPriceNotification { this.quantity = price.quantity ? new PriceQuantityNotification(price.quantity) : null; this.status = price.status ?? null; this.customData = price.custom_data ? price.custom_data : null; - this.importMeta = price.import_meta ? new ImportMeta(price.import_meta) : null; + this.importMeta = price.import_meta ? new ImportMetaNotification(price.import_meta) : null; } } diff --git a/src/notifications/entities/subscription/subscription-scheduled-change-notification.ts b/src/notifications/entities/subscription/subscription-scheduled-change-notification.ts index 415f9ff..e7b585a 100644 --- a/src/notifications/entities/subscription/subscription-scheduled-change-notification.ts +++ b/src/notifications/entities/subscription/subscription-scheduled-change-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionScheduledChangeNotificationResponse } from '../../types'; -import { type ScheduledChangeAction } from '../../../enums'; +import { type ScheduledChangeAction } from '../../../enums/index.js'; +import { type ISubscriptionScheduledChangeNotificationResponse } from '../../types/index.js'; export class SubscriptionScheduledChangeNotification { public readonly action: ScheduledChangeAction; diff --git a/src/notifications/entities/subscription/subscription-time-period-notification.ts b/src/notifications/entities/subscription/subscription-time-period-notification.ts index 4c9c9ea..60e8e06 100644 --- a/src/notifications/entities/subscription/subscription-time-period-notification.ts +++ b/src/notifications/entities/subscription/subscription-time-period-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ISubscriptionTimePeriodNotificationResponse } from '../../types'; +import { type ISubscriptionTimePeriodNotificationResponse } from '../../types/index.js'; export class SubscriptionTimePeriodNotification { public readonly startsAt: string; diff --git a/src/notifications/entities/transaction/index.ts b/src/notifications/entities/transaction/index.ts index 619c9f5..608c814 100644 --- a/src/notifications/entities/transaction/index.ts +++ b/src/notifications/entities/transaction/index.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './transactions-time-period-notification'; -export * from './transaction-proration-notification'; -export * from './transaction-item-notification'; -export * from './transaction-line-item-notification'; -export * from './transaction-details-notification'; -export * from './transaction-notification'; +export * from './transactions-time-period-notification.js'; +export * from './transaction-proration-notification.js'; +export * from './transaction-item-notification.js'; +export * from './transaction-line-item-notification.js'; +export * from './transaction-details-notification.js'; +export * from './transaction-notification.js'; diff --git a/src/notifications/entities/transaction/transaction-details-notification.ts b/src/notifications/entities/transaction/transaction-details-notification.ts index 7e57351..0dcbc3f 100644 --- a/src/notifications/entities/transaction/transaction-details-notification.ts +++ b/src/notifications/entities/transaction/transaction-details-notification.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionDetailsNotificationResponse } from '../../types'; import { TaxRatesUsedNotification, - TransactionTotalsNotification, - TransactionTotalsAdjustedNotification, - TransactionPayoutTotalsNotification, TransactionPayoutTotalsAdjustedNotification, - TransactionLineItemNotification, -} from '../index'; + TransactionPayoutTotalsNotification, + TransactionTotalsAdjustedNotification, + TransactionTotalsNotification, +} from '../shared/index.js'; +import { TransactionLineItemNotification } from './transaction-line-item-notification.js'; +import { type ITransactionDetailsNotificationResponse } from '../../types/index.js'; export class TransactionDetailsNotification { public readonly taxRatesUsed: TaxRatesUsedNotification[]; diff --git a/src/notifications/entities/transaction/transaction-item-notification.ts b/src/notifications/entities/transaction/transaction-item-notification.ts index b786ea9..5aebe9d 100644 --- a/src/notifications/entities/transaction/transaction-item-notification.ts +++ b/src/notifications/entities/transaction/transaction-item-notification.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionItemNotificationResponse } from '../../types'; -import { PriceNotification, TransactionProrationNotification } from '../index'; +import { PriceNotification } from '../price/index.js'; +import { TransactionProrationNotification } from './transaction-proration-notification.js'; +import { type ITransactionItemNotificationResponse } from '../../types/index.js'; export class TransactionItemNotification { public readonly price: PriceNotification | null; diff --git a/src/notifications/entities/transaction/transaction-line-item-notification.ts b/src/notifications/entities/transaction/transaction-line-item-notification.ts index cea871f..4d6352a 100644 --- a/src/notifications/entities/transaction/transaction-line-item-notification.ts +++ b/src/notifications/entities/transaction/transaction-line-item-notification.ts @@ -4,13 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionLineItemNotificationResponse } from '../../types'; -import { - TransactionProrationNotification, - UnitTotalsNotification, - TotalsNotification, - ProductNotification, -} from '../index'; +import { TransactionProrationNotification } from './transaction-proration-notification.js'; +import { TotalsNotification, UnitTotalsNotification } from '../shared/index.js'; +import { ProductNotification } from '../product/index.js'; +import { type ITransactionLineItemNotificationResponse } from '../../types/index.js'; export class TransactionLineItemNotification { public readonly id: string; diff --git a/src/notifications/entities/transaction/transaction-notification.ts b/src/notifications/entities/transaction/transaction-notification.ts index 5e6609b..ac1a171 100644 --- a/src/notifications/entities/transaction/transaction-notification.ts +++ b/src/notifications/entities/transaction/transaction-notification.ts @@ -4,17 +4,22 @@ * Changes may be overwritten as part of auto-generation. */ +import { + type CollectionMode, + type CurrencyCode, + type TransactionOrigin, + type TransactionStatus, +} from '../../../enums/index.js'; +import { type CustomData } from '../../../entities/index.js'; import { BillingDetailsNotification, - TransactionsTimePeriodNotification, - TransactionItemNotification, - TransactionDetailsNotification, - TransactionPaymentAttemptNotification, TransactionCheckoutNotification, -} from '../index'; -import { type TransactionStatus, type CurrencyCode, type TransactionOrigin, type CollectionMode } from '../../../enums'; -import { type ITransactionNotificationResponse } from '../../types'; -import { type CustomData } from '../../../entities'; + TransactionPaymentAttemptNotification, +} from '../shared/index.js'; +import { TransactionsTimePeriodNotification } from './transactions-time-period-notification.js'; +import { TransactionItemNotification } from './transaction-item-notification.js'; +import { TransactionDetailsNotification } from './transaction-details-notification.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionNotification { public readonly id: string; diff --git a/src/notifications/entities/transaction/transaction-proration-notification.ts b/src/notifications/entities/transaction/transaction-proration-notification.ts index 5b101d1..edb11ed 100644 --- a/src/notifications/entities/transaction/transaction-proration-notification.ts +++ b/src/notifications/entities/transaction/transaction-proration-notification.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionProrationNotificationResponse } from '../../types'; -import { TransactionsTimePeriodNotification } from '../index'; +import { TransactionsTimePeriodNotification } from './transactions-time-period-notification.js'; +import { type ITransactionProrationNotificationResponse } from '../../types/index.js'; export class TransactionProrationNotification { public readonly rate: string; diff --git a/src/notifications/entities/transaction/transactions-time-period-notification.ts b/src/notifications/entities/transaction/transactions-time-period-notification.ts index 6010e00..376657f 100644 --- a/src/notifications/entities/transaction/transactions-time-period-notification.ts +++ b/src/notifications/entities/transaction/transactions-time-period-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionsTimePeriodNotificationResponse } from '../../types'; +import { type ITransactionsTimePeriodNotificationResponse } from '../../types/index.js'; export class TransactionsTimePeriodNotification { public readonly startsAt: string; diff --git a/src/notifications/events/address/address-created-event.ts b/src/notifications/events/address/address-created-event.ts index 6fdb497..f9fc6da 100644 --- a/src/notifications/events/address/address-created-event.ts +++ b/src/notifications/events/address/address-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { Event } from '../../../entities/events/event'; -import { AddressNotification } from '../../entities'; -import { type IAddressNotificationResponse } from '../../types'; +import { EventName } from '../../helpers/index.js'; +import { Event } from '../../../entities/events/event.js'; +import { AddressNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IAddressNotificationResponse } from '../../types/index.js'; export class AddressCreatedEvent extends Event { public override readonly eventType = EventName.AddressCreated; diff --git a/src/notifications/events/address/address-imported-event.ts b/src/notifications/events/address/address-imported-event.ts index 207edd7..d75024d 100644 --- a/src/notifications/events/address/address-imported-event.ts +++ b/src/notifications/events/address/address-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { AddressNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IAddressNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { AddressNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IAddressNotificationResponse } from '../../types/index.js'; export class AddressImportedEvent extends Event { public override readonly eventType = EventName.AddressImported; diff --git a/src/notifications/events/address/address-updated-event.ts b/src/notifications/events/address/address-updated-event.ts index 19c3af8..93cfb76 100644 --- a/src/notifications/events/address/address-updated-event.ts +++ b/src/notifications/events/address/address-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { AddressNotification } from '../../entities'; -import { type IAddressNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { AddressNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IAddressNotificationResponse } from '../../types/index.js'; export class AddressUpdatedEvent extends Event { public override readonly eventType = EventName.AddressUpdated; diff --git a/src/notifications/events/address/index.ts b/src/notifications/events/address/index.ts index d3cc3d8..b748bc2 100644 --- a/src/notifications/events/address/index.ts +++ b/src/notifications/events/address/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address-created-event'; -export * from './address-updated-event'; -export * from './address-imported-event'; +export * from './address-created-event.js'; +export * from './address-updated-event.js'; +export * from './address-imported-event.js'; diff --git a/src/notifications/events/adjustment/adjustment-created-event.ts b/src/notifications/events/adjustment/adjustment-created-event.ts index 7a16cab..05b82db 100644 --- a/src/notifications/events/adjustment/adjustment-created-event.ts +++ b/src/notifications/events/adjustment/adjustment-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { AdjustmentNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IAdjustmentNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { AdjustmentNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IAdjustmentNotificationResponse } from '../../types/index.js'; export class AdjustmentCreatedEvent extends Event { public override readonly eventType = EventName.AdjustmentCreated; diff --git a/src/notifications/events/adjustment/adjustment-updated-event.ts b/src/notifications/events/adjustment/adjustment-updated-event.ts index eaa367e..a37c2e3 100644 --- a/src/notifications/events/adjustment/adjustment-updated-event.ts +++ b/src/notifications/events/adjustment/adjustment-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { AdjustmentNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IAdjustmentNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { AdjustmentNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IAdjustmentNotificationResponse } from '../../types/index.js'; export class AdjustmentUpdatedEvent extends Event { public override readonly eventType = EventName.AdjustmentUpdated; diff --git a/src/notifications/events/adjustment/index.ts b/src/notifications/events/adjustment/index.ts index b51dc8d..3f6e079 100644 --- a/src/notifications/events/adjustment/index.ts +++ b/src/notifications/events/adjustment/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './adjustment-created-event'; -export * from './adjustment-updated-event'; +export * from './adjustment-created-event.js'; +export * from './adjustment-updated-event.js'; diff --git a/src/notifications/events/business/business-created-event.ts b/src/notifications/events/business/business-created-event.ts index 0b48f82..0cb4976 100644 --- a/src/notifications/events/business/business-created-event.ts +++ b/src/notifications/events/business/business-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { BusinessNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IBusinessNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { BusinessNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IBusinessNotificationResponse } from '../../types/index.js'; export class BusinessCreatedEvent extends Event { public override readonly eventType = EventName.BusinessCreated; diff --git a/src/notifications/events/business/business-imported-event.ts b/src/notifications/events/business/business-imported-event.ts index a6a7fb1..9c42e33 100644 --- a/src/notifications/events/business/business-imported-event.ts +++ b/src/notifications/events/business/business-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { BusinessNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IBusinessNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { BusinessNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IBusinessNotificationResponse } from '../../types/index.js'; export class BusinessImportedEvent extends Event { public override readonly eventType = EventName.BusinessImported; diff --git a/src/notifications/events/business/business-updated-event.ts b/src/notifications/events/business/business-updated-event.ts index bffa1d8..19944a6 100644 --- a/src/notifications/events/business/business-updated-event.ts +++ b/src/notifications/events/business/business-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { BusinessNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IBusinessNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { BusinessNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IBusinessNotificationResponse } from '../../types/index.js'; export class BusinessUpdatedEvent extends Event { public override readonly eventType = EventName.BusinessUpdated; diff --git a/src/notifications/events/business/index.ts b/src/notifications/events/business/index.ts index f7efad2..4180ec7 100644 --- a/src/notifications/events/business/index.ts +++ b/src/notifications/events/business/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './business-created-event'; -export * from './business-updated-event'; -export * from './business-imported-event'; +export * from './business-created-event.js'; +export * from './business-updated-event.js'; +export * from './business-imported-event.js'; diff --git a/src/notifications/events/customer/customer-created-event.ts b/src/notifications/events/customer/customer-created-event.ts index 29876ae..b50d409 100644 --- a/src/notifications/events/customer/customer-created-event.ts +++ b/src/notifications/events/customer/customer-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { CustomerNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type ICustomerNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { CustomerNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ICustomerNotificationResponse } from '../../types/index.js'; export class CustomerCreatedEvent extends Event { public override readonly eventType = EventName.CustomerCreated; diff --git a/src/notifications/events/customer/customer-imported-event.ts b/src/notifications/events/customer/customer-imported-event.ts index 6953368..0f66fe0 100644 --- a/src/notifications/events/customer/customer-imported-event.ts +++ b/src/notifications/events/customer/customer-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { CustomerNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type ICustomerNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { CustomerNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ICustomerNotificationResponse } from '../../types/index.js'; export class CustomerImportedEvent extends Event { public override readonly eventType = EventName.CustomerImported; diff --git a/src/notifications/events/customer/customer-updated-event.ts b/src/notifications/events/customer/customer-updated-event.ts index f19ef8a..0d472cc 100644 --- a/src/notifications/events/customer/customer-updated-event.ts +++ b/src/notifications/events/customer/customer-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { CustomerNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type ICustomerNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { CustomerNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ICustomerNotificationResponse } from '../../types/index.js'; export class CustomerUpdatedEvent extends Event { public override readonly eventType = EventName.CustomerUpdated; diff --git a/src/notifications/events/customer/index.ts b/src/notifications/events/customer/index.ts index f967c0d..12ea5cb 100644 --- a/src/notifications/events/customer/index.ts +++ b/src/notifications/events/customer/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './customer-created-event'; -export * from './customer-updated-event'; -export * from './customer-imported-event'; +export * from './customer-created-event.js'; +export * from './customer-updated-event.js'; +export * from './customer-imported-event.js'; diff --git a/src/notifications/events/discount/discount-created-event.ts b/src/notifications/events/discount/discount-created-event.ts index 61cee74..a9e8832 100644 --- a/src/notifications/events/discount/discount-created-event.ts +++ b/src/notifications/events/discount/discount-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { DiscountNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IDiscountNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { DiscountNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IDiscountNotificationResponse } from '../../types/index.js'; export class DiscountCreatedEvent extends Event { public override readonly eventType = EventName.DiscountCreated; diff --git a/src/notifications/events/discount/discount-imported-event.ts b/src/notifications/events/discount/discount-imported-event.ts index 83edfec..f3f8e29 100644 --- a/src/notifications/events/discount/discount-imported-event.ts +++ b/src/notifications/events/discount/discount-imported-event.ts @@ -3,11 +3,12 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { DiscountNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IDiscountNotificationResponse } from '../../types'; + +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { DiscountNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IDiscountNotificationResponse } from '../../types/index.js'; export class DiscountImportedEvent extends Event { public override readonly eventType = EventName.DiscountImported; diff --git a/src/notifications/events/discount/discount-updated-event.ts b/src/notifications/events/discount/discount-updated-event.ts index d60e338..0617626 100644 --- a/src/notifications/events/discount/discount-updated-event.ts +++ b/src/notifications/events/discount/discount-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { DiscountNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IDiscountNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { DiscountNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IDiscountNotificationResponse } from '../../types/index.js'; export class DiscountUpdatedEvent extends Event { public override readonly eventType = EventName.DiscountUpdated; diff --git a/src/notifications/events/discount/index.ts b/src/notifications/events/discount/index.ts index f9abf0b..79e0ca1 100644 --- a/src/notifications/events/discount/index.ts +++ b/src/notifications/events/discount/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './discount-created-event'; -export * from './discount-updated-event'; -export * from './discount-imported-event'; +export * from './discount-created-event.js'; +export * from './discount-updated-event.js'; +export * from './discount-imported-event.js'; diff --git a/src/notifications/events/index.ts b/src/notifications/events/index.ts index 40705d3..46b82ff 100644 --- a/src/notifications/events/index.ts +++ b/src/notifications/events/index.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address'; -export * from './adjustment'; -export * from './business'; -export * from './customer'; -export * from './discount'; -export * from './payout'; -export * from './price'; -export * from './product'; -export * from './subscription'; -export * from './transaction'; -export * from './report'; +export * from './address/index.js'; +export * from './adjustment/index.js'; +export * from './business/index.js'; +export * from './customer/index.js'; +export * from './discount/index.js'; +export * from './payout/index.js'; +export * from './price/index.js'; +export * from './product/index.js'; +export * from './subscription/index.js'; +export * from './transaction/index.js'; +export * from './report/index.js'; diff --git a/src/notifications/events/payout/index.ts b/src/notifications/events/payout/index.ts index 43404ae..0075a9a 100644 --- a/src/notifications/events/payout/index.ts +++ b/src/notifications/events/payout/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout-created-event'; -export * from './payout-paid-event'; +export * from './payout-created-event.js'; +export * from './payout-paid-event.js'; diff --git a/src/notifications/events/payout/payout-created-event.ts b/src/notifications/events/payout/payout-created-event.ts index a9920d8..fa2d735 100644 --- a/src/notifications/events/payout/payout-created-event.ts +++ b/src/notifications/events/payout/payout-created-event.ts @@ -3,11 +3,12 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { PayoutNotification } from '../../entities'; -import { type IEventsResponse } from '../../../types'; -import { EventName } from '../../helpers'; -import { type IPayoutNotificationResponse } from '../../types'; + +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { PayoutNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IPayoutNotificationResponse } from '../../types/index.js'; export class PayoutCreatedEvent extends Event { public override readonly eventType = EventName.PayoutCreated; diff --git a/src/notifications/events/payout/payout-paid-event.ts b/src/notifications/events/payout/payout-paid-event.ts index e928251..505f8f1 100644 --- a/src/notifications/events/payout/payout-paid-event.ts +++ b/src/notifications/events/payout/payout-paid-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { PayoutNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IPayoutNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { PayoutNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IPayoutNotificationResponse } from '../../types/index.js'; export class PayoutPaidEvent extends Event { public override readonly eventType = EventName.PayoutPaid; diff --git a/src/notifications/events/price/index.ts b/src/notifications/events/price/index.ts index 422317c..f36bd4c 100644 --- a/src/notifications/events/price/index.ts +++ b/src/notifications/events/price/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './price-created-event'; -export * from './price-updated-event'; -export * from './price-imported-event'; +export * from './price-created-event.js'; +export * from './price-updated-event.js'; +export * from './price-imported-event.js'; diff --git a/src/notifications/events/price/price-created-event.ts b/src/notifications/events/price/price-created-event.ts index 3285e3e..3b11629 100644 --- a/src/notifications/events/price/price-created-event.ts +++ b/src/notifications/events/price/price-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { PriceNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IPriceNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { PriceNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IPriceNotificationResponse } from '../../types/index.js'; export class PriceCreatedEvent extends Event { public override readonly eventType = EventName.PriceCreated; diff --git a/src/notifications/events/price/price-imported-event.ts b/src/notifications/events/price/price-imported-event.ts index c0d3783..0884cc9 100644 --- a/src/notifications/events/price/price-imported-event.ts +++ b/src/notifications/events/price/price-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { PriceNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IPriceNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { PriceNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IPriceNotificationResponse } from '../../types/index.js'; export class PriceImportedEvent extends Event { public override readonly eventType = EventName.PriceImported; diff --git a/src/notifications/events/price/price-updated-event.ts b/src/notifications/events/price/price-updated-event.ts index 0f9fc62..df01e61 100644 --- a/src/notifications/events/price/price-updated-event.ts +++ b/src/notifications/events/price/price-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { PriceNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IPriceNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { PriceNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IPriceNotificationResponse } from '../../types/index.js'; export class PriceUpdatedEvent extends Event { public override readonly eventType = EventName.PriceUpdated; diff --git a/src/notifications/events/product/index.ts b/src/notifications/events/product/index.ts index eb660ae..d606908 100644 --- a/src/notifications/events/product/index.ts +++ b/src/notifications/events/product/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product-created-event'; -export * from './product-updated-event'; -export * from './product-imported-event'; +export * from './product-created-event.js'; +export * from './product-updated-event.js'; +export * from './product-imported-event.js'; diff --git a/src/notifications/events/product/product-created-event.ts b/src/notifications/events/product/product-created-event.ts index 22df41f..fd4e5be 100644 --- a/src/notifications/events/product/product-created-event.ts +++ b/src/notifications/events/product/product-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { ProductNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IProductNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { ProductNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IProductNotificationResponse } from '../../types/index.js'; export class ProductCreatedEvent extends Event { public override readonly eventType = EventName.ProductCreated; diff --git a/src/notifications/events/product/product-imported-event.ts b/src/notifications/events/product/product-imported-event.ts index a182a32..fab522e 100644 --- a/src/notifications/events/product/product-imported-event.ts +++ b/src/notifications/events/product/product-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { ProductNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IProductNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { ProductNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IProductNotificationResponse } from '../../types/index.js'; export class ProductImportedEvent extends Event { public override readonly eventType = EventName.ProductImported; diff --git a/src/notifications/events/product/product-updated-event.ts b/src/notifications/events/product/product-updated-event.ts index 3e66f77..1f2350a 100644 --- a/src/notifications/events/product/product-updated-event.ts +++ b/src/notifications/events/product/product-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { ProductNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IProductNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { ProductNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IProductNotificationResponse } from '../../types/index.js'; export class ProductUpdatedEvent extends Event { public override readonly eventType = EventName.ProductUpdated; diff --git a/src/notifications/events/report/index.ts b/src/notifications/events/report/index.ts index f9a5198..67b72f6 100644 --- a/src/notifications/events/report/index.ts +++ b/src/notifications/events/report/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-created-event'; -export * from './report-updated-event'; +export * from './report-created-event.js'; +export * from './report-updated-event.js'; diff --git a/src/notifications/events/report/report-created-event.ts b/src/notifications/events/report/report-created-event.ts index f1417d8..a3ac664 100644 --- a/src/notifications/events/report/report-created-event.ts +++ b/src/notifications/events/report/report-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { ReportNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IReportNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { ReportNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IReportNotificationResponse } from '../../types/index.js'; export class ReportCreatedEvent extends Event { public override readonly eventType = EventName.ReportCreated; diff --git a/src/notifications/events/report/report-updated-event.ts b/src/notifications/events/report/report-updated-event.ts index f22ad6b..3b59c01 100644 --- a/src/notifications/events/report/report-updated-event.ts +++ b/src/notifications/events/report/report-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { ReportNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type IReportNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { ReportNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type IReportNotificationResponse } from '../../types/index.js'; export class ReportUpdatedEvent extends Event { public override readonly eventType = EventName.ReportUpdated; diff --git a/src/notifications/events/subscription/index.ts b/src/notifications/events/subscription/index.ts index 956f42d..9981282 100644 --- a/src/notifications/events/subscription/index.ts +++ b/src/notifications/events/subscription/index.ts @@ -4,12 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-activated-event'; -export * from './subscription-canceled-event'; -export * from './subscription-created-event'; -export * from './subscription-imported-event'; -export * from './subscription-past-due-event'; -export * from './subscription-paused-event'; -export * from './subscription-resumed-event'; -export * from './subscription-trialing-event'; -export * from './subscription-updated-event'; +export * from './subscription-activated-event.js'; +export * from './subscription-canceled-event.js'; +export * from './subscription-created-event.js'; +export * from './subscription-imported-event.js'; +export * from './subscription-past-due-event.js'; +export * from './subscription-paused-event.js'; +export * from './subscription-resumed-event.js'; +export * from './subscription-trialing-event.js'; +export * from './subscription-updated-event.js'; diff --git a/src/notifications/events/subscription/subscription-activated-event.ts b/src/notifications/events/subscription/subscription-activated-event.ts index f5696e6..20d4f1e 100644 --- a/src/notifications/events/subscription/subscription-activated-event.ts +++ b/src/notifications/events/subscription/subscription-activated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionActivatedEvent extends Event { public override readonly eventType = EventName.SubscriptionActivated; diff --git a/src/notifications/events/subscription/subscription-canceled-event.ts b/src/notifications/events/subscription/subscription-canceled-event.ts index 1d91254..4ad0c0d 100644 --- a/src/notifications/events/subscription/subscription-canceled-event.ts +++ b/src/notifications/events/subscription/subscription-canceled-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionCanceledEvent extends Event { public override readonly eventType = EventName.SubscriptionCanceled; diff --git a/src/notifications/events/subscription/subscription-created-event.ts b/src/notifications/events/subscription/subscription-created-event.ts index dedf296..34be0df 100644 --- a/src/notifications/events/subscription/subscription-created-event.ts +++ b/src/notifications/events/subscription/subscription-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionCreatedEvent extends Event { public override readonly eventType = EventName.SubscriptionCreated; diff --git a/src/notifications/events/subscription/subscription-imported-event.ts b/src/notifications/events/subscription/subscription-imported-event.ts index 5a592c8..9280b80 100644 --- a/src/notifications/events/subscription/subscription-imported-event.ts +++ b/src/notifications/events/subscription/subscription-imported-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionImportedEvent extends Event { public override readonly eventType = EventName.SubscriptionImported; diff --git a/src/notifications/events/subscription/subscription-past-due-event.ts b/src/notifications/events/subscription/subscription-past-due-event.ts index 1bc438b..ee3313a 100644 --- a/src/notifications/events/subscription/subscription-past-due-event.ts +++ b/src/notifications/events/subscription/subscription-past-due-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionPastDueEvent extends Event { public override readonly eventType = EventName.SubscriptionPastDue; diff --git a/src/notifications/events/subscription/subscription-paused-event.ts b/src/notifications/events/subscription/subscription-paused-event.ts index e9d58a4..086675a 100644 --- a/src/notifications/events/subscription/subscription-paused-event.ts +++ b/src/notifications/events/subscription/subscription-paused-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionPausedEvent extends Event { public override readonly eventType = EventName.SubscriptionPaused; diff --git a/src/notifications/events/subscription/subscription-resumed-event.ts b/src/notifications/events/subscription/subscription-resumed-event.ts index 539b83d..95b8c60 100644 --- a/src/notifications/events/subscription/subscription-resumed-event.ts +++ b/src/notifications/events/subscription/subscription-resumed-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionResumedEvent extends Event { public override readonly eventType = EventName.SubscriptionResumed; diff --git a/src/notifications/events/subscription/subscription-trialing-event.ts b/src/notifications/events/subscription/subscription-trialing-event.ts index a036b37..48b8a75 100644 --- a/src/notifications/events/subscription/subscription-trialing-event.ts +++ b/src/notifications/events/subscription/subscription-trialing-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionTrialingEvent extends Event { public override readonly eventType = EventName.SubscriptionTrialing; diff --git a/src/notifications/events/subscription/subscription-updated-event.ts b/src/notifications/events/subscription/subscription-updated-event.ts index b1ab903..36593a4 100644 --- a/src/notifications/events/subscription/subscription-updated-event.ts +++ b/src/notifications/events/subscription/subscription-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { SubscriptionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ISubscriptionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { SubscriptionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ISubscriptionNotificationResponse } from '../../types/index.js'; export class SubscriptionUpdatedEvent extends Event { public override readonly eventType = EventName.SubscriptionUpdated; diff --git a/src/notifications/events/transaction/index.ts b/src/notifications/events/transaction/index.ts index 432aefe..aa5e073 100644 --- a/src/notifications/events/transaction/index.ts +++ b/src/notifications/events/transaction/index.ts @@ -4,12 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './transaction-billed-event'; -export * from './transaction-canceled-event'; -export * from './transaction-created-event'; -export * from './transaction-completed-event'; -export * from './transaction-paid-event'; -export * from './transaction-past-due-event'; -export * from './transaction-payment-failed-event'; -export * from './transaction-ready-event'; -export * from './transaction-updated-event'; +export * from './transaction-billed-event.js'; +export * from './transaction-canceled-event.js'; +export * from './transaction-created-event.js'; +export * from './transaction-completed-event.js'; +export * from './transaction-paid-event.js'; +export * from './transaction-past-due-event.js'; +export * from './transaction-payment-failed-event.js'; +export * from './transaction-ready-event.js'; +export * from './transaction-updated-event.js'; diff --git a/src/notifications/events/transaction/transaction-billed-event.ts b/src/notifications/events/transaction/transaction-billed-event.ts index 6429172..6d2ca83 100644 --- a/src/notifications/events/transaction/transaction-billed-event.ts +++ b/src/notifications/events/transaction/transaction-billed-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionBilledEvent extends Event { public override readonly eventType = EventName.TransactionBilled; diff --git a/src/notifications/events/transaction/transaction-canceled-event.ts b/src/notifications/events/transaction/transaction-canceled-event.ts index 3553103..f1dca2b 100644 --- a/src/notifications/events/transaction/transaction-canceled-event.ts +++ b/src/notifications/events/transaction/transaction-canceled-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionCanceledEvent extends Event { public override readonly eventType = EventName.TransactionCanceled; diff --git a/src/notifications/events/transaction/transaction-completed-event.ts b/src/notifications/events/transaction/transaction-completed-event.ts index 2bb4d4d..9230974 100644 --- a/src/notifications/events/transaction/transaction-completed-event.ts +++ b/src/notifications/events/transaction/transaction-completed-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionCompletedEvent extends Event { public override readonly eventType = EventName.TransactionCompleted; diff --git a/src/notifications/events/transaction/transaction-created-event.ts b/src/notifications/events/transaction/transaction-created-event.ts index 524bd9f..3b8d304 100644 --- a/src/notifications/events/transaction/transaction-created-event.ts +++ b/src/notifications/events/transaction/transaction-created-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionCreatedEvent extends Event { public override readonly eventType = EventName.TransactionCreated; diff --git a/src/notifications/events/transaction/transaction-paid-event.ts b/src/notifications/events/transaction/transaction-paid-event.ts index d454a1e..8a0c300 100644 --- a/src/notifications/events/transaction/transaction-paid-event.ts +++ b/src/notifications/events/transaction/transaction-paid-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionPaidEvent extends Event { public override readonly eventType = EventName.TransactionPaid; diff --git a/src/notifications/events/transaction/transaction-past-due-event.ts b/src/notifications/events/transaction/transaction-past-due-event.ts index 53667a4..ca38834 100644 --- a/src/notifications/events/transaction/transaction-past-due-event.ts +++ b/src/notifications/events/transaction/transaction-past-due-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionPastDueEvent extends Event { public override readonly eventType = EventName.TransactionPastDue; diff --git a/src/notifications/events/transaction/transaction-payment-failed-event.ts b/src/notifications/events/transaction/transaction-payment-failed-event.ts index 1eb52cd..4a4fa0e 100644 --- a/src/notifications/events/transaction/transaction-payment-failed-event.ts +++ b/src/notifications/events/transaction/transaction-payment-failed-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionPaymentFailedEvent extends Event { public override readonly eventType = EventName.TransactionPaymentFailed; diff --git a/src/notifications/events/transaction/transaction-ready-event.ts b/src/notifications/events/transaction/transaction-ready-event.ts index 1663853..a391705 100644 --- a/src/notifications/events/transaction/transaction-ready-event.ts +++ b/src/notifications/events/transaction/transaction-ready-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionReadyEvent extends Event { public override readonly eventType = EventName.TransactionReady; diff --git a/src/notifications/events/transaction/transaction-updated-event.ts b/src/notifications/events/transaction/transaction-updated-event.ts index 4ee128d..bf57fa7 100644 --- a/src/notifications/events/transaction/transaction-updated-event.ts +++ b/src/notifications/events/transaction/transaction-updated-event.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Event } from '../../../entities/events/event'; -import { TransactionNotification } from '../../entities'; -import { EventName } from '../../helpers'; -import { type IEventsResponse } from '../../../types'; -import { type ITransactionNotificationResponse } from '../../types'; +import { Event } from '../../../entities/events/event.js'; +import { EventName } from '../../helpers/index.js'; +import { TransactionNotification } from '../../entities/index.js'; +import { type IEventsResponse } from '../../../types/index.js'; +import { type ITransactionNotificationResponse } from '../../types/index.js'; export class TransactionUpdatedEvent extends Event { public override readonly eventType = EventName.TransactionUpdated; diff --git a/src/notifications/helpers/index.ts b/src/notifications/helpers/index.ts index 484ba39..0a286eb 100644 --- a/src/notifications/helpers/index.ts +++ b/src/notifications/helpers/index.ts @@ -1,3 +1,3 @@ -export * from './types'; -export * from './webhooks'; -export * from './webhooks-validator'; +export * from './types.js'; +export * from './webhooks.js'; +export * from './webhooks-validator.js'; diff --git a/src/notifications/helpers/types.ts b/src/notifications/helpers/types.ts index bb6e55b..60a7463 100644 --- a/src/notifications/helpers/types.ts +++ b/src/notifications/helpers/types.ts @@ -1,12 +1,14 @@ import { type AddressCreatedEvent, - type AddressUpdatedEvent, type AddressImportedEvent, - type BusinessCreatedEvent, + type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, + type BusinessCreatedEvent, + type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, + type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, @@ -14,34 +16,32 @@ import { type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, + type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, + type ProductImportedEvent, type ProductUpdatedEvent, - type SubscriptionCreatedEvent, + type ReportCreatedEvent, + type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, + type SubscriptionCreatedEvent, type SubscriptionImportedEvent, + type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, - type TransactionCanceledEvent, type TransactionBilledEvent, + type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, - type SubscriptionPastDueEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent, - type ReportUpdatedEvent, - type ReportCreatedEvent, - type BusinessImportedEvent, - type CustomerImportedEvent, - type PriceImportedEvent, - type ProductImportedEvent, -} from '../events'; +} from '../events/index.js'; export type EventEntity = | AddressCreatedEvent diff --git a/src/notifications/helpers/webhooks-validator.ts b/src/notifications/helpers/webhooks-validator.ts index 80b89d3..0a4c20d 100644 --- a/src/notifications/helpers/webhooks-validator.ts +++ b/src/notifications/helpers/webhooks-validator.ts @@ -1,9 +1,11 @@ -import { createHmac } from 'node:crypto'; +import { RuntimeProvider } from '../../internal/providers/runtime-provider.js'; +import { Logger } from '../../internal/base/logger.js'; interface ParsedHeaders { ts: number; h1: string; } + export class WebhooksValidator { private static readonly MAX_VALID_TIME_DIFFERENCE = 5; private extractHeader(header: string): ParsedHeaders { @@ -27,7 +29,13 @@ export class WebhooksValidator { } } - public isValidSignature(requestBody: string, secretKey: string, signature: string) { + public async isValidSignature(requestBody: string, secretKey: string, signature: string) { + const cryptoProvider = RuntimeProvider.getProvider()?.crypto; + if (!cryptoProvider) { + Logger.error('Unknown runtime. Cannot validate webhook signature'); + return false; + } + const headers = this.extractHeader(signature); const payloadWithTime = `${headers.ts}:${requestBody}`; @@ -35,10 +43,7 @@ export class WebhooksValidator { return false; } - const hmac = createHmac('sha256', secretKey); - hmac.update(payloadWithTime); - - const computedHash = hmac.digest('hex'); + const computedHash = await cryptoProvider.computeHmac(payloadWithTime, secretKey); return computedHash === headers.h1; } } diff --git a/src/notifications/helpers/webhooks.ts b/src/notifications/helpers/webhooks.ts index fbbabe2..2bd93ff 100644 --- a/src/notifications/helpers/webhooks.ts +++ b/src/notifications/helpers/webhooks.ts @@ -1,4 +1,6 @@ -import { type IEvents } from '../../types'; +import { WebhooksValidator } from './webhooks-validator.js'; +import { type IEvents } from '../../types/index.js'; +import { type EventEntity, EventName } from './types.js'; import { AddressCreatedEvent, AddressImportedEvent, @@ -42,14 +44,12 @@ import { TransactionPaymentFailedEvent, TransactionReadyEvent, TransactionUpdatedEvent, -} from '../events'; -import { type EventEntity, EventName } from './types'; -import { WebhooksValidator } from './webhooks-validator'; -import { Logger } from '../../internal/base/logger'; +} from '../events/index.js'; +import { Logger } from '../../internal/base/logger.js'; export class Webhooks { - unmarshal(requestBody: string, secretKey: string, signature: string) { - const isSignatureValid = new WebhooksValidator().isValidSignature(requestBody, secretKey, signature); + async unmarshal(requestBody: string, secretKey: string, signature: string) { + const isSignatureValid = await new WebhooksValidator().isValidSignature(requestBody, secretKey, signature); if (isSignatureValid) { const parsedRequest = JSON.parse(requestBody); @@ -59,8 +59,8 @@ export class Webhooks { } } - isSignatureValid(requestBody: string, secretKey: string, signature: string) { - return new WebhooksValidator().isValidSignature(requestBody, secretKey, signature); + async isSignatureValid(requestBody: string, secretKey: string, signature: string) { + return await new WebhooksValidator().isValidSignature(requestBody, secretKey, signature); } static fromJson(data: IEvents): EventEntity | null { diff --git a/src/notifications/index.ts b/src/notifications/index.ts index 1ee0753..f84e484 100644 --- a/src/notifications/index.ts +++ b/src/notifications/index.ts @@ -1,4 +1,10 @@ -export * from './helpers'; -export * from './events'; -export * from './types'; -export * from './entities'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export * from './helpers/index.js'; +export * from './events/index.js'; +export * from './types/index.js'; +export * from './entities/index.js'; diff --git a/src/notifications/types/address/address-notification-response.ts b/src/notifications/types/address/address-notification-response.ts index 402cff2..1994871 100644 --- a/src/notifications/types/address/address-notification-response.ts +++ b/src/notifications/types/address/address-notification-response.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CountryCode, type Status } from '../../../enums'; -import { type ICustomData, type IImportMetaResponse } from '../../../types'; + +import { type CountryCode, type Status } from '../../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../../../types/index.js'; export interface IAddressNotificationResponse { id: string; diff --git a/src/notifications/types/address/index.ts b/src/notifications/types/address/index.ts index 76163f4..2c7f3ce 100644 --- a/src/notifications/types/address/index.ts +++ b/src/notifications/types/address/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address-notification-response'; +export * from './address-notification-response.js'; diff --git a/src/notifications/types/adjustment/adjustment-item-notification-response.ts b/src/notifications/types/adjustment/adjustment-item-notification-response.ts index 79f4107..adf9662 100644 --- a/src/notifications/types/adjustment/adjustment-item-notification-response.ts +++ b/src/notifications/types/adjustment/adjustment-item-notification-response.ts @@ -4,11 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type IAdjustmentItemTotalsNotificationResponse, - type IAdjustmentsProrationNotificationResponse, -} from '../index'; -import { type AdjustmentType } from '../../../enums'; +import { type IAdjustmentsProrationNotificationResponse } from './adjustments-proration-notification-response.js'; +import { type AdjustmentType } from '../../../enums/index.js'; +import { type IAdjustmentItemTotalsNotificationResponse } from './adjustment-totals-notification-response.js'; export interface IAdjustmentItemNotificationResponse { id: string; diff --git a/src/notifications/types/adjustment/adjustment-notification-response.ts b/src/notifications/types/adjustment/adjustment-notification-response.ts index 25a330e..ece16f1 100644 --- a/src/notifications/types/adjustment/adjustment-notification-response.ts +++ b/src/notifications/types/adjustment/adjustment-notification-response.ts @@ -4,12 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../../enums/index.js'; +import { type IAdjustmentItemNotificationResponse } from './adjustment-item-notification-response.js'; import { - type IAdjustmentItemNotificationResponse, - type ITotalAdjustmentsNotificationResponse, type IPayoutTotalsAdjustmentNotificationResponse, -} from '../index'; -import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../../enums'; + type ITotalAdjustmentsNotificationResponse, +} from '../shared/index.js'; export interface IAdjustmentNotificationResponse { id: string; diff --git a/src/notifications/types/adjustment/adjustment-totals-notification-response.ts b/src/notifications/types/adjustment/adjustment-totals-notification-response.ts index 4118bf8..5e62462 100644 --- a/src/notifications/types/adjustment/adjustment-totals-notification-response.ts +++ b/src/notifications/types/adjustment/adjustment-totals-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentTotalsBreakdownNotification } from '../index'; -import { type CurrencyCode } from '../../../enums'; +import { type IAdjustmentTotalsBreakdownNotification } from './adjustment-totals-breakdown-notification.js'; +import { type CurrencyCode } from '../../../enums/index.js'; export interface IAdjustmentItemTotalsNotificationResponse { subtotal: string; diff --git a/src/notifications/types/adjustment/adjustments-proration-notification-response.ts b/src/notifications/types/adjustment/adjustments-proration-notification-response.ts index e375a4c..a297f15 100644 --- a/src/notifications/types/adjustment/adjustments-proration-notification-response.ts +++ b/src/notifications/types/adjustment/adjustments-proration-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsTimePeriodNotificationResponse } from '../index'; +import { type IAdjustmentsTimePeriodNotificationResponse } from './adjustments-time-period-notification-response.js'; export interface IAdjustmentsProrationNotificationResponse { rate: string; diff --git a/src/notifications/types/adjustment/index.ts b/src/notifications/types/adjustment/index.ts index 5a83cb8..f41d670 100644 --- a/src/notifications/types/adjustment/index.ts +++ b/src/notifications/types/adjustment/index.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './adjustments-time-period-notification-response'; -export * from './adjustments-proration-notification-response'; -export * from './adjustment-item-notification-response'; -export * from './adjustment-notification-response'; -export * from './adjustment-totals-breakdown-notification'; -export * from './adjustment-totals-notification-response'; +export * from './adjustments-time-period-notification-response.js'; +export * from './adjustments-proration-notification-response.js'; +export * from './adjustment-item-notification-response.js'; +export * from './adjustment-notification-response.js'; +export * from './adjustment-totals-breakdown-notification.js'; +export * from './adjustment-totals-notification-response.js'; diff --git a/src/notifications/types/business/business-notification-response.ts b/src/notifications/types/business/business-notification-response.ts index 6c7840f..09112a7 100644 --- a/src/notifications/types/business/business-notification-response.ts +++ b/src/notifications/types/business/business-notification-response.ts @@ -4,9 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContactsNotification, type IImportMetaNotificationResponse } from '../index'; -import { type Status } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type Status } from '../../../enums/index.js'; +import { type IBusinessContactsNotification } from './businesses-contacts-notification.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse } from '../shared/index.js'; export interface IBusinessNotificationResponse { id: string; diff --git a/src/notifications/types/business/index.ts b/src/notifications/types/business/index.ts index e1c1ef2..87e371f 100644 --- a/src/notifications/types/business/index.ts +++ b/src/notifications/types/business/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './businesses-contacts-notification'; -export * from './business-notification-response'; +export * from './businesses-contacts-notification.js'; +export * from './business-notification-response.js'; diff --git a/src/notifications/types/customer/customer-notification-response.ts b/src/notifications/types/customer/customer-notification-response.ts index 0fbf237..b1c240e 100644 --- a/src/notifications/types/customer/customer-notification-response.ts +++ b/src/notifications/types/customer/customer-notification-response.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IImportMetaNotificationResponse } from '../index'; -import { type Status } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type Status } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse } from '../shared/index.js'; export interface ICustomerNotificationResponse { id: string; diff --git a/src/notifications/types/customer/index.ts b/src/notifications/types/customer/index.ts index 478afe7..6727080 100644 --- a/src/notifications/types/customer/index.ts +++ b/src/notifications/types/customer/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './customer-notification-response'; +export * from './customer-notification-response.js'; diff --git a/src/notifications/types/discount/discount-notification-response.ts b/src/notifications/types/discount/discount-notification-response.ts index 744e5fb..0e6bd3d 100644 --- a/src/notifications/types/discount/discount-notification-response.ts +++ b/src/notifications/types/discount/discount-notification-response.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums'; -import { type IImportMetaNotificationResponse } from '../shared'; -import { type ICustomData } from '../../../types'; +import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse } from '../shared/index.js'; export interface IDiscountNotificationResponse { id: string; diff --git a/src/notifications/types/discount/index.ts b/src/notifications/types/discount/index.ts index 725bd46..773d6e9 100644 --- a/src/notifications/types/discount/index.ts +++ b/src/notifications/types/discount/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './discount-notification-response'; +export * from './discount-notification-response.js'; diff --git a/src/notifications/types/index.ts b/src/notifications/types/index.ts index d9837b8..718ec10 100644 --- a/src/notifications/types/index.ts +++ b/src/notifications/types/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product'; -export * from './price'; -export * from './transaction'; -export * from './adjustment'; -export * from './customer'; -export * from './business'; -export * from './subscription'; -export * from './address'; -export * from './discount'; -export * from './payout'; -export * from './report'; -export * from './shared'; +export * from './product/index.js'; +export * from './price/index.js'; +export * from './transaction/index.js'; +export * from './adjustment/index.js'; +export * from './customer/index.js'; +export * from './business/index.js'; +export * from './subscription/index.js'; +export * from './address/index.js'; +export * from './discount/index.js'; +export * from './payout/index.js'; +export * from './report/index.js'; +export * from './shared/index.js'; diff --git a/src/notifications/types/payout/index.ts b/src/notifications/types/payout/index.ts index 365e674..daf562a 100644 --- a/src/notifications/types/payout/index.ts +++ b/src/notifications/types/payout/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout-notification-response'; +export * from './payout-notification-response.js'; diff --git a/src/notifications/types/payout/payout-notification-response.ts b/src/notifications/types/payout/payout-notification-response.ts index a8e8974..799130d 100644 --- a/src/notifications/types/payout/payout-notification-response.ts +++ b/src/notifications/types/payout/payout-notification-response.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type PayoutStatus } from '../../../enums'; + +import { type CurrencyCode, type PayoutStatus } from '../../../enums/index.js'; export interface IPayoutNotificationResponse { id: string; diff --git a/src/notifications/types/price/index.ts b/src/notifications/types/price/index.ts index aa80fdf..26cf997 100644 --- a/src/notifications/types/price/index.ts +++ b/src/notifications/types/price/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './price-notification-response'; -export * from './price-quantity-notification'; +export * from './price-notification-response.js'; +export * from './price-quantity-notification.js'; diff --git a/src/notifications/types/price/price-notification-response.ts b/src/notifications/types/price/price-notification-response.ts index 8559a4f..3711f1d 100644 --- a/src/notifications/types/price/price-notification-response.ts +++ b/src/notifications/types/price/price-notification-response.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; import { - type ITimePeriodNotification, + type IImportMetaNotificationResponse, type IMoneyNotificationResponse, - type IUnitPriceOverrideNotificationResponse, - type IPriceQuantityNotification, type ISharedProductNotificationResponse, - type IImportMetaNotificationResponse, -} from '../index'; -import { type TaxMode, type Status, type CatalogType } from '../../../enums'; -import { type ICustomData } from '../../../types'; + type ITimePeriodNotification, + type IUnitPriceOverrideNotificationResponse, +} from '../shared/index.js'; +import { type IPriceQuantityNotification } from './price-quantity-notification.js'; +import { type ICustomData } from '../../../types/index.js'; export interface IPriceNotificationResponse { id: string; diff --git a/src/notifications/types/product/index.ts b/src/notifications/types/product/index.ts index d2b56fd..8ac6b59 100644 --- a/src/notifications/types/product/index.ts +++ b/src/notifications/types/product/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product-notification-response'; +export * from './product-notification-response.js'; diff --git a/src/notifications/types/product/product-notification-response.ts b/src/notifications/types/product/product-notification-response.ts index e82e105..3e497a0 100644 --- a/src/notifications/types/product/product-notification-response.ts +++ b/src/notifications/types/product/product-notification-response.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IImportMetaNotificationResponse, type ISharedPriceNotificationResponse } from '../index'; -import { type TaxCategory, type Status, type CatalogType } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse, type ISharedPriceNotificationResponse } from '../shared/index.js'; export interface IProductNotificationResponse { id: string; diff --git a/src/notifications/types/report/index.ts b/src/notifications/types/report/index.ts index 253f452..7b447df 100644 --- a/src/notifications/types/report/index.ts +++ b/src/notifications/types/report/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-filters-notification-response'; -export * from './report-notification-response'; +export * from './report-filters-notification-response.js'; +export * from './report-notification-response.js'; diff --git a/src/notifications/types/report/report-filters-notification-response.ts b/src/notifications/types/report/report-filters-notification-response.ts index 98ed28c..28e50d0 100644 --- a/src/notifications/types/report/report-filters-notification-response.ts +++ b/src/notifications/types/report/report-filters-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ReportFilterName, type ReportFilterOperator } from '../../../enums'; +import { type ReportFilterName, type ReportFilterOperator } from '../../../enums/index.js'; export interface IReportFiltersNotification { name: ReportFilterName; diff --git a/src/notifications/types/report/report-notification-response.ts b/src/notifications/types/report/report-notification-response.ts index de02753..897d072 100644 --- a/src/notifications/types/report/report-notification-response.ts +++ b/src/notifications/types/report/report-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportFiltersNotification } from '../index'; -import { type ReportType, type ReportStatus } from '../../../enums'; +import { type ReportStatus, type ReportType } from '../../../enums/index.js'; +import { type IReportFiltersNotification } from './report-filters-notification-response.js'; export interface IReportNotificationResponse { id: string; diff --git a/src/notifications/types/shared/adjustment-original-amount-notification-response.ts b/src/notifications/types/shared/adjustment-original-amount-notification-response.ts index 24d3f2f..5789e84 100644 --- a/src/notifications/types/shared/adjustment-original-amount-notification-response.ts +++ b/src/notifications/types/shared/adjustment-original-amount-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type AdjustmentCurrencyCode } from '../../../enums'; +import { type AdjustmentCurrencyCode } from '../../../enums/index.js'; export interface IAdjustmentOriginalAmountNotificationResponse { amount: string; diff --git a/src/notifications/types/shared/billing-details-notification-response.ts b/src/notifications/types/shared/billing-details-notification-response.ts index 834aea6..5274182 100644 --- a/src/notifications/types/shared/billing-details-notification-response.ts +++ b/src/notifications/types/shared/billing-details-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriodNotification } from '../index'; +import { type ITimePeriodNotification } from './time-period-notification.js'; export interface IBillingDetailsNotificationResponse { enable_checkout?: boolean | null; diff --git a/src/notifications/types/shared/chargeback-fee.ts b/src/notifications/types/shared/chargeback-fee.ts index 254943f..a015925 100644 --- a/src/notifications/types/shared/chargeback-fee.ts +++ b/src/notifications/types/shared/chargeback-fee.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentOriginalAmountNotificationResponse } from '../index'; +import { type IAdjustmentOriginalAmountNotificationResponse } from './adjustment-original-amount-notification-response.js'; export interface IChargebackFeeNotification { amount: string; diff --git a/src/notifications/types/shared/index.ts b/src/notifications/types/shared/index.ts index 584eb09..591451c 100644 --- a/src/notifications/types/shared/index.ts +++ b/src/notifications/types/shared/index.ts @@ -4,25 +4,25 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './time-period-notification'; -export * from './money-notification-response'; -export * from './unit-price-override-notification-response'; -export * from './shared-price-notification-response'; -export * from './shared-product-notification-response'; -export * from './billing-details-notification-response'; -export * from './totals'; -export * from './tax-rates-used-notification-response'; -export * from './transaction-totals-notification-response'; -export * from './transaction-totals-adjusted-notification-response'; -export * from './transaction-payout-totals-notification-response'; -export * from './adjustment-original-amount-notification-response'; -export * from './chargeback-fee'; -export * from './transaction-payout-totals-adjusted-notification-response'; -export * from './unit-totals'; -export * from './payment-card-notification-response'; -export * from './payment-method-details'; -export * from './transaction-payment-attempt-notification-response'; -export * from './transaction-checkout-notification'; -export * from './total-adjustments-notification-response'; -export * from './payout-totals-adjustment-notification-response'; -export * from './import-meta-notification-response'; +export * from './time-period-notification.js'; +export * from './money-notification-response.js'; +export * from './unit-price-override-notification-response.js'; +export * from './shared-price-notification-response.js'; +export * from './shared-product-notification-response.js'; +export * from './billing-details-notification-response.js'; +export * from './totals.js'; +export * from './tax-rates-used-notification-response.js'; +export * from './transaction-totals-notification-response.js'; +export * from './transaction-totals-adjusted-notification-response.js'; +export * from './transaction-payout-totals-notification-response.js'; +export * from './adjustment-original-amount-notification-response.js'; +export * from './chargeback-fee.js'; +export * from './transaction-payout-totals-adjusted-notification-response.js'; +export * from './unit-totals.js'; +export * from './payment-card-notification-response.js'; +export * from './payment-method-details.js'; +export * from './transaction-payment-attempt-notification-response.js'; +export * from './transaction-checkout-notification.js'; +export * from './total-adjustments-notification-response.js'; +export * from './payout-totals-adjustment-notification-response.js'; +export * from './import-meta-notification-response.js'; diff --git a/src/notifications/types/shared/money-notification-response.ts b/src/notifications/types/shared/money-notification-response.ts index c8720f3..9b1ea76 100644 --- a/src/notifications/types/shared/money-notification-response.ts +++ b/src/notifications/types/shared/money-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; export interface IMoneyNotificationResponse { amount: string; diff --git a/src/notifications/types/shared/payment-card-notification-response.ts b/src/notifications/types/shared/payment-card-notification-response.ts index 78c467f..f5bea3e 100644 --- a/src/notifications/types/shared/payment-card-notification-response.ts +++ b/src/notifications/types/shared/payment-card-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type PaymentCardType } from '../../../enums'; +import { type PaymentCardType } from '../../../enums/index.js'; export interface IPaymentCardNotificationResponse { type: PaymentCardType; diff --git a/src/notifications/types/shared/payment-method-details.ts b/src/notifications/types/shared/payment-method-details.ts index b6f8a6f..9101d55 100644 --- a/src/notifications/types/shared/payment-method-details.ts +++ b/src/notifications/types/shared/payment-method-details.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentCardNotificationResponse } from '../index'; -import { type PaymentType } from '../../../enums'; +import { type PaymentType } from '../../../enums/index.js'; +import { type IPaymentCardNotificationResponse } from './payment-card-notification-response.js'; export interface IPaymentMethodDetailsNotification { type: PaymentType; diff --git a/src/notifications/types/shared/payout-totals-adjustment-notification-response.ts b/src/notifications/types/shared/payout-totals-adjustment-notification-response.ts index ec0476c..b4b495e 100644 --- a/src/notifications/types/shared/payout-totals-adjustment-notification-response.ts +++ b/src/notifications/types/shared/payout-totals-adjustment-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFeeNotification } from '../index'; -import { type PayoutCurrencyCode } from '../../../enums'; +import { type IChargebackFeeNotification } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; export interface IPayoutTotalsAdjustmentNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/shared-price-notification-response.ts b/src/notifications/types/shared/shared-price-notification-response.ts index 4d879fe..dcb9734 100644 --- a/src/notifications/types/shared/shared-price-notification-response.ts +++ b/src/notifications/types/shared/shared-price-notification-response.ts @@ -4,15 +4,13 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type ITimePeriodNotification, - type IMoneyNotificationResponse, - type IUnitPriceOverrideNotificationResponse, - type IPriceQuantityNotification, - type IImportMetaNotificationResponse, -} from '../index'; -import { type TaxMode, type Status, type CatalogType } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; +import { type ITimePeriodNotification } from './time-period-notification.js'; +import { type IMoneyNotificationResponse } from './money-notification-response.js'; +import { type IUnitPriceOverrideNotificationResponse } from './unit-price-override-notification-response.js'; +import { type IPriceQuantityNotification } from '../price/index.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse } from './import-meta-notification-response.js'; export interface ISharedPriceNotificationResponse { id: string; diff --git a/src/notifications/types/shared/shared-product-notification-response.ts b/src/notifications/types/shared/shared-product-notification-response.ts index 1b38e07..5b45c6a 100644 --- a/src/notifications/types/shared/shared-product-notification-response.ts +++ b/src/notifications/types/shared/shared-product-notification-response.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IImportMetaNotificationResponse } from '../index'; -import { type TaxCategory, type Status, type CatalogType } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; +import { type IImportMetaNotificationResponse } from './import-meta-notification-response.js'; export interface ISharedProductNotificationResponse { id: string; diff --git a/src/notifications/types/shared/tax-rates-used-notification-response.ts b/src/notifications/types/shared/tax-rates-used-notification-response.ts index fe66040..82d1fc5 100644 --- a/src/notifications/types/shared/tax-rates-used-notification-response.ts +++ b/src/notifications/types/shared/tax-rates-used-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotalsNotification } from '../index'; +import { type ITotalsNotification } from './totals.js'; export interface ITaxRatesUsedNotificationResponse { tax_rate: string; diff --git a/src/notifications/types/shared/time-period-notification.ts b/src/notifications/types/shared/time-period-notification.ts index 5946016..630afbe 100644 --- a/src/notifications/types/shared/time-period-notification.ts +++ b/src/notifications/types/shared/time-period-notification.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type Interval } from '../../../enums'; +import { type Interval } from '../../../enums/index.js'; export interface ITimePeriodNotification { interval: Interval; diff --git a/src/notifications/types/shared/total-adjustments-notification-response.ts b/src/notifications/types/shared/total-adjustments-notification-response.ts index f04e420..1d62736 100644 --- a/src/notifications/types/shared/total-adjustments-notification-response.ts +++ b/src/notifications/types/shared/total-adjustments-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; export interface ITotalAdjustmentsNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/transaction-payment-attempt-notification-response.ts b/src/notifications/types/shared/transaction-payment-attempt-notification-response.ts index 27182f4..54bcfdf 100644 --- a/src/notifications/types/shared/transaction-payment-attempt-notification-response.ts +++ b/src/notifications/types/shared/transaction-payment-attempt-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentMethodDetailsNotification } from '../index'; -import { type PaymentAttemptStatus, type ErrorCode } from '../../../enums'; +import { type ErrorCode, type PaymentAttemptStatus } from '../../../enums/index.js'; +import { type IPaymentMethodDetailsNotification } from './payment-method-details.js'; export interface ITransactionPaymentAttemptNotificationResponse { payment_attempt_id: string; diff --git a/src/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.ts b/src/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.ts index 23bfffb..883873a 100644 --- a/src/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.ts +++ b/src/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFeeNotification } from '../index'; -import { type PayoutCurrencyCode } from '../../../enums'; +import { type IChargebackFeeNotification } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; export interface ITransactionPayoutTotalsAdjustedNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/transaction-payout-totals-notification-response.ts b/src/notifications/types/shared/transaction-payout-totals-notification-response.ts index 5806e79..11bdf2b 100644 --- a/src/notifications/types/shared/transaction-payout-totals-notification-response.ts +++ b/src/notifications/types/shared/transaction-payout-totals-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type PayoutCurrencyCode } from '../../../enums'; +import { type PayoutCurrencyCode } from '../../../enums/index.js'; export interface ITransactionPayoutTotalsNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/transaction-totals-adjusted-notification-response.ts b/src/notifications/types/shared/transaction-totals-adjusted-notification-response.ts index 10908e0..316d0aa 100644 --- a/src/notifications/types/shared/transaction-totals-adjusted-notification-response.ts +++ b/src/notifications/types/shared/transaction-totals-adjusted-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; export interface ITransactionTotalsAdjustedNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/transaction-totals-notification-response.ts b/src/notifications/types/shared/transaction-totals-notification-response.ts index c9ceab2..b3dfa2c 100644 --- a/src/notifications/types/shared/transaction-totals-notification-response.ts +++ b/src/notifications/types/shared/transaction-totals-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; +import { type CurrencyCode } from '../../../enums/index.js'; export interface ITransactionTotalsNotificationResponse { subtotal: string; diff --git a/src/notifications/types/shared/unit-price-override-notification-response.ts b/src/notifications/types/shared/unit-price-override-notification-response.ts index d2ac266..90c2d05 100644 --- a/src/notifications/types/shared/unit-price-override-notification-response.ts +++ b/src/notifications/types/shared/unit-price-override-notification-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyNotificationResponse } from '../index'; -import { type CountryCode } from '../../../enums'; +import { type CountryCode } from '../../../enums/index.js'; +import { type IMoneyNotificationResponse } from './money-notification-response.js'; export interface IUnitPriceOverrideNotificationResponse { country_codes: CountryCode[]; diff --git a/src/notifications/types/subscription/index.ts b/src/notifications/types/subscription/index.ts index 7721708..35cc5e9 100644 --- a/src/notifications/types/subscription/index.ts +++ b/src/notifications/types/subscription/index.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-discount-notification-response'; -export * from './subscription-time-period-notification-response'; -export * from './subscription-scheduled-change-notification-response'; -export * from './subscription-price-notification-response'; -export * from './subscription-item-notification-response'; -export * from './subscription-discount-notification-response'; -export * from './subscription-notification-response'; +export * from './subscription-discount-notification-response.js'; +export * from './subscription-time-period-notification-response.js'; +export * from './subscription-scheduled-change-notification-response.js'; +export * from './subscription-price-notification-response.js'; +export * from './subscription-item-notification-response.js'; +export * from './subscription-discount-notification-response.js'; +export * from './subscription-notification-response.js'; diff --git a/src/notifications/types/subscription/subscription-item-notification-response.ts b/src/notifications/types/subscription/subscription-item-notification-response.ts index 2a4ecc2..264b113 100644 --- a/src/notifications/types/subscription/subscription-item-notification-response.ts +++ b/src/notifications/types/subscription/subscription-item-notification-response.ts @@ -4,12 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type IProductNotificationResponse, - type ISubscriptionPriceNotificationResponse, - type ISubscriptionTimePeriodNotificationResponse, -} from '../index'; -import { type SubscriptionItemStatus } from '../../../enums'; +import { type SubscriptionItemStatus } from '../../../enums/index.js'; +import { type ISubscriptionTimePeriodNotificationResponse } from './subscription-time-period-notification-response.js'; +import { type ISubscriptionPriceNotificationResponse } from './subscription-price-notification-response.js'; +import { type IProductNotificationResponse } from '../product/index.js'; export interface ISubscriptionItemNotificationResponse { status: SubscriptionItemStatus; diff --git a/src/notifications/types/subscription/subscription-notification-response.ts b/src/notifications/types/subscription/subscription-notification-response.ts index 41be4c6..c143ea7 100644 --- a/src/notifications/types/subscription/subscription-notification-response.ts +++ b/src/notifications/types/subscription/subscription-notification-response.ts @@ -4,17 +4,17 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../../enums/index.js'; +import { type ISubscriptionDiscountNotificationResponse } from './subscription-discount-notification-response.js'; import { type IBillingDetailsNotificationResponse, type IImportMetaNotificationResponse, - type ISubscriptionDiscountNotificationResponse, - type ISubscriptionItemNotificationResponse, - type ISubscriptionScheduledChangeNotificationResponse, - type ISubscriptionTimePeriodNotificationResponse, type ITimePeriodNotification, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../../enums'; -import { type ICustomData } from '../../../types'; +} from '../shared/index.js'; +import { type ISubscriptionTimePeriodNotificationResponse } from './subscription-time-period-notification-response.js'; +import { type ISubscriptionScheduledChangeNotificationResponse } from './subscription-scheduled-change-notification-response.js'; +import { type ISubscriptionItemNotificationResponse } from './subscription-item-notification-response.js'; +import { type ICustomData } from '../../../types/index.js'; export interface ISubscriptionNotificationResponse { id: string; diff --git a/src/notifications/types/subscription/subscription-price-notification-response.ts b/src/notifications/types/subscription/subscription-price-notification-response.ts index 1befd53..d758f93 100644 --- a/src/notifications/types/subscription/subscription-price-notification-response.ts +++ b/src/notifications/types/subscription/subscription-price-notification-response.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; import { type IImportMetaNotificationResponse, type IMoneyNotificationResponse, - type IPriceQuantityNotification, type ISharedProductNotificationResponse, type ITimePeriodNotification, type IUnitPriceOverrideNotificationResponse, -} from '../index'; -import { type CatalogType, type Status, type TaxMode } from '../../../enums'; -import type { ICustomData } from '../../../types'; +} from '../shared/index.js'; +import { type IPriceQuantityNotification } from '../price/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface ISubscriptionPriceNotificationResponse { id: string; diff --git a/src/notifications/types/subscription/subscription-scheduled-change-notification-response.ts b/src/notifications/types/subscription/subscription-scheduled-change-notification-response.ts index 05f4196..1040b80 100644 --- a/src/notifications/types/subscription/subscription-scheduled-change-notification-response.ts +++ b/src/notifications/types/subscription/subscription-scheduled-change-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ScheduledChangeAction } from '../../../enums'; +import { type ScheduledChangeAction } from '../../../enums/index.js'; export interface ISubscriptionScheduledChangeNotificationResponse { action: ScheduledChangeAction; diff --git a/src/notifications/types/transaction/index.ts b/src/notifications/types/transaction/index.ts index 9981242..44b19b7 100644 --- a/src/notifications/types/transaction/index.ts +++ b/src/notifications/types/transaction/index.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './transactions-time-period-notification-response'; -export * from './transaction-proration-notification-response'; -export * from './transaction-item-notification-response'; -export * from './transaction-line-item-notification-response'; -export * from './transaction-details-notification-response'; -export * from './transaction-notification-response'; +export * from './transactions-time-period-notification-response.js'; +export * from './transaction-proration-notification-response.js'; +export * from './transaction-item-notification-response.js'; +export * from './transaction-line-item-notification-response.js'; +export * from './transaction-details-notification-response.js'; +export * from './transaction-notification-response.js'; diff --git a/src/notifications/types/transaction/transaction-details-notification-response.ts b/src/notifications/types/transaction/transaction-details-notification-response.ts index f8888fc..5c24641 100644 --- a/src/notifications/types/transaction/transaction-details-notification-response.ts +++ b/src/notifications/types/transaction/transaction-details-notification-response.ts @@ -6,12 +6,12 @@ import { type ITaxRatesUsedNotificationResponse, - type ITransactionTotalsNotificationResponse, - type ITransactionTotalsAdjustedNotificationResponse, - type ITransactionPayoutTotalsNotificationResponse, type ITransactionPayoutTotalsAdjustedNotificationResponse, - type ITransactionLineItemNotificationResponse, -} from '../index'; + type ITransactionPayoutTotalsNotificationResponse, + type ITransactionTotalsAdjustedNotificationResponse, + type ITransactionTotalsNotificationResponse, +} from '../shared/index.js'; +import { type ITransactionLineItemNotificationResponse } from './transaction-line-item-notification-response.js'; export interface ITransactionDetailsNotificationResponse { tax_rates_used: ITaxRatesUsedNotificationResponse[]; diff --git a/src/notifications/types/transaction/transaction-item-notification-response.ts b/src/notifications/types/transaction/transaction-item-notification-response.ts index 9231160..2491564 100644 --- a/src/notifications/types/transaction/transaction-item-notification-response.ts +++ b/src/notifications/types/transaction/transaction-item-notification-response.ts @@ -4,7 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceNotificationResponse, type ITransactionProrationNotificationResponse } from '../index'; +import { type IPriceNotificationResponse } from '../price/index.js'; +import { type ITransactionProrationNotificationResponse } from './transaction-proration-notification-response.js'; export interface ITransactionItemNotificationResponse { price_id?: string | null; diff --git a/src/notifications/types/transaction/transaction-line-item-notification-response.ts b/src/notifications/types/transaction/transaction-line-item-notification-response.ts index 08539a0..72eb60a 100644 --- a/src/notifications/types/transaction/transaction-line-item-notification-response.ts +++ b/src/notifications/types/transaction/transaction-line-item-notification-response.ts @@ -4,12 +4,12 @@ * Changes may be overwritten as part of auto-generation. */ +import { type ITransactionProrationNotificationResponse } from './transaction-proration-notification-response.js'; import { - type ITransactionProrationNotificationResponse, - type IUnitTotalsNotification, - type ITotalsNotification, type ISharedProductNotificationResponse, -} from '../index'; + type ITotalsNotification, + type IUnitTotalsNotification, +} from '../shared/index.js'; export interface ITransactionLineItemNotificationResponse { id: string; diff --git a/src/notifications/types/transaction/transaction-notification-response.ts b/src/notifications/types/transaction/transaction-notification-response.ts index 60dca7e..90f58fa 100644 --- a/src/notifications/types/transaction/transaction-notification-response.ts +++ b/src/notifications/types/transaction/transaction-notification-response.ts @@ -4,16 +4,21 @@ * Changes may be overwritten as part of auto-generation. */ +import { + type CollectionMode, + type CurrencyCode, + type TransactionOrigin, + type TransactionStatus, +} from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; import { type IBillingDetailsNotificationResponse, type ITransactionCheckoutNotification, - type ITransactionDetailsNotificationResponse, - type ITransactionItemNotificationResponse, type ITransactionPaymentAttemptNotificationResponse, - type ITransactionsTimePeriodNotificationResponse, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type TransactionOrigin, type TransactionStatus } from '../../../enums'; -import { type ICustomData } from '../../../types'; +} from '../shared/index.js'; +import { type ITransactionsTimePeriodNotificationResponse } from './transactions-time-period-notification-response.js'; +import { type ITransactionItemNotificationResponse } from './transaction-item-notification-response.js'; +import { type ITransactionDetailsNotificationResponse } from './transaction-details-notification-response.js'; export interface ITransactionNotificationResponse { id: string; diff --git a/src/notifications/types/transaction/transaction-proration-notification-response.ts b/src/notifications/types/transaction/transaction-proration-notification-response.ts index b3b2463..4b36af8 100644 --- a/src/notifications/types/transaction/transaction-proration-notification-response.ts +++ b/src/notifications/types/transaction/transaction-proration-notification-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionsTimePeriodNotificationResponse } from '../index'; +import { type ITransactionsTimePeriodNotificationResponse } from './transactions-time-period-notification-response.js'; export interface ITransactionProrationNotificationResponse { rate: string; diff --git a/src/paddle.ts b/src/paddle.ts index 5d71ce6..61eef14 100644 --- a/src/paddle.ts +++ b/src/paddle.ts @@ -1,4 +1,5 @@ -import { Client } from './internal/api/client'; +import { Client } from './internal/api/client.js'; +import { Environment, LogLevel, type PaddleOptions } from './internal/index.js'; import { AddressesResource, AdjustmentsResource, @@ -14,10 +15,9 @@ import { ReportsResource, SubscriptionsResource, TransactionsResource, -} from './resources'; -import { Environment, LogLevel, type PaddleOptions } from './internal'; -import { EventsResource } from './resources/events'; -import { Webhooks } from './notifications'; +} from './resources/index.js'; +import { EventsResource } from './resources/events/index.js'; +import { Webhooks } from './notifications/index.js'; export class Paddle { private readonly client: Client; diff --git a/src/resources/addresses/index.ts b/src/resources/addresses/index.ts index 553dbb2..799a7b3 100644 --- a/src/resources/addresses/index.ts +++ b/src/resources/addresses/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { Address, AddressCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { - type ListAddressQueryParameters, type CreateAddressRequestBody, + type ListAddressQueryParameters, type UpdateAddressRequestBody, -} from './operations'; -import { type IAddressResponse } from '../../types'; +} from './operations/index.js'; +import { Address, AddressCollection } from '../../entities/index.js'; +import { type IAddressResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const AddressPaths = { list: '/customers/{customer_id}/addresses', @@ -21,7 +21,7 @@ const AddressPaths = { update: '/customers/{customer_id}/addresses/{address_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class AddressesResource extends BaseResource { public list(customerId: string, queryParams?: ListAddressQueryParameters): AddressCollection { diff --git a/src/resources/addresses/operations/create-address-request-body.ts b/src/resources/addresses/operations/create-address-request-body.ts index 4cce719..080cdd6 100644 --- a/src/resources/addresses/operations/create-address-request-body.ts +++ b/src/resources/addresses/operations/create-address-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; -import { type CountryCode } from '../../../enums'; +import { type CountryCode } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface CreateAddressRequestBody { countryCode: CountryCode; diff --git a/src/resources/addresses/operations/index.ts b/src/resources/addresses/operations/index.ts index 0b9808d..bd436bf 100644 --- a/src/resources/addresses/operations/index.ts +++ b/src/resources/addresses/operations/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-address-query-parameters'; -export * from './create-address-request-body'; -export * from './update-address-request-body'; +export * from './list-address-query-parameters.js'; +export * from './create-address-request-body.js'; +export * from './update-address-request-body.js'; diff --git a/src/resources/addresses/operations/list-address-query-parameters.ts b/src/resources/addresses/operations/list-address-query-parameters.ts index a2c3b3b..a87e7c2 100644 --- a/src/resources/addresses/operations/list-address-query-parameters.ts +++ b/src/resources/addresses/operations/list-address-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type Status } from '../../../enums'; + +import { type Status } from '../../../enums/index.js'; export interface ListAddressQueryParameters { after?: string; diff --git a/src/resources/addresses/operations/update-address-request-body.ts b/src/resources/addresses/operations/update-address-request-body.ts index 5a29903..ef5b31c 100644 --- a/src/resources/addresses/operations/update-address-request-body.ts +++ b/src/resources/addresses/operations/update-address-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; -import { type CountryCode, type Status } from '../../../enums'; +import { type CountryCode, type Status } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface UpdateAddressRequestBody { description?: string | null; diff --git a/src/resources/adjustments/index.ts b/src/resources/adjustments/index.ts index c83a0bc..7fd9756 100644 --- a/src/resources/adjustments/index.ts +++ b/src/resources/adjustments/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { Adjustment, AdjustmentCollection, AdjustmentCreditNotePDF } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateAdjustmentRequestBody, - type ListAdjustmentQueryParameters, type GetAdjustmentCreditNoteQueryParameters, -} from './operations'; -import { type IAdjustmentResponse } from '../../types'; + type ListAdjustmentQueryParameters, +} from './operations/index.js'; +import { Adjustment, AdjustmentCollection, AdjustmentCreditNotePDF } from '../../entities/index.js'; +import { type IAdjustmentResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const AdjustmentPaths = { list: '/adjustments', @@ -20,7 +20,7 @@ const AdjustmentPaths = { getCreditNotePDF: '/adjustments/{adjustment_id}/credit-note', } as const; -export * from './operations'; +export * from './operations/index.js'; export class AdjustmentsResource extends BaseResource { public list(queryParams?: ListAdjustmentQueryParameters): AdjustmentCollection { diff --git a/src/resources/adjustments/operations/create-adjustment-request-body.ts b/src/resources/adjustments/operations/create-adjustment-request-body.ts index 4d3fa41..40c7b65 100644 --- a/src/resources/adjustments/operations/create-adjustment-request-body.ts +++ b/src/resources/adjustments/operations/create-adjustment-request-body.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type AdjustmentAction, type AdjustmentType } from '../../../enums'; +import { type AdjustmentAction, type AdjustmentType } from '../../../enums/index.js'; export interface CreateAdjustmentLineItem { amount: string | null; diff --git a/src/resources/adjustments/operations/get-adjustment-credit-note-query-parameters.ts b/src/resources/adjustments/operations/get-adjustment-credit-note-query-parameters.ts index 629e457..c9cdf24 100644 --- a/src/resources/adjustments/operations/get-adjustment-credit-note-query-parameters.ts +++ b/src/resources/adjustments/operations/get-adjustment-credit-note-query-parameters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type Disposition } from '../../../enums'; +import { type Disposition } from '../../../enums/index.js'; export interface GetAdjustmentCreditNoteQueryParameters { disposition?: Disposition; diff --git a/src/resources/adjustments/operations/index.ts b/src/resources/adjustments/operations/index.ts index 3cbea67..aa9ae37 100644 --- a/src/resources/adjustments/operations/index.ts +++ b/src/resources/adjustments/operations/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-adjustment-query-parameters'; -export * from './create-adjustment-request-body'; -export * from './get-adjustment-credit-note-query-parameters'; +export * from './list-adjustment-query-parameters.js'; +export * from './create-adjustment-request-body.js'; +export * from './get-adjustment-credit-note-query-parameters.js'; diff --git a/src/resources/adjustments/operations/list-adjustment-query-parameters.ts b/src/resources/adjustments/operations/list-adjustment-query-parameters.ts index 59e7e72..1db40d2 100644 --- a/src/resources/adjustments/operations/list-adjustment-query-parameters.ts +++ b/src/resources/adjustments/operations/list-adjustment-query-parameters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type AdjustmentAction, type AdjustmentStatus } from '../../../enums'; +import { type AdjustmentAction, type AdjustmentStatus } from '../../../enums/index.js'; export interface ListAdjustmentQueryParameters { action?: AdjustmentAction; diff --git a/src/resources/businesses/index.ts b/src/resources/businesses/index.ts index 719ec5b..3ab4aa8 100644 --- a/src/resources/businesses/index.ts +++ b/src/resources/businesses/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { Business, BusinessCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateBusinessRequestBody, type ListBusinessQueryParameters, type UpdateBusinessRequestBody, -} from './operations'; -import { type IBusinessResponse } from '../../types'; +} from './operations/index.js'; +import { Business, BusinessCollection } from '../../entities/index.js'; +import { type IBusinessResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const BusinessPaths = { list: '/customers/{customer_id}/businesses', @@ -21,7 +21,7 @@ const BusinessPaths = { update: '/customers/{customer_id}/businesses/{business_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class BusinessesResource extends BaseResource { public list(customerId: string, queryParams?: ListBusinessQueryParameters): BusinessCollection { diff --git a/src/resources/businesses/operations/create-business-request-body.ts b/src/resources/businesses/operations/create-business-request-body.ts index 53b0720..610f18b 100644 --- a/src/resources/businesses/operations/create-business-request-body.ts +++ b/src/resources/businesses/operations/create-business-request-body.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContacts, type ICustomData } from '../../../types'; +import { type IBusinessContacts, type ICustomData } from '../../../types/index.js'; export interface CreateBusinessRequestBody { name: string; diff --git a/src/resources/businesses/operations/index.ts b/src/resources/businesses/operations/index.ts index f9b425b..a75e244 100644 --- a/src/resources/businesses/operations/index.ts +++ b/src/resources/businesses/operations/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-business-query-parameters'; -export * from './create-business-request-body'; -export * from './update-business-request-body'; +export * from './list-business-query-parameters.js'; +export * from './create-business-request-body.js'; +export * from './update-business-request-body.js'; diff --git a/src/resources/businesses/operations/list-business-query-parameters.ts b/src/resources/businesses/operations/list-business-query-parameters.ts index a1219c5..8fb0f4d 100644 --- a/src/resources/businesses/operations/list-business-query-parameters.ts +++ b/src/resources/businesses/operations/list-business-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type Status } from '../../../enums'; + +import { type Status } from '../../../enums/index.js'; export interface ListBusinessQueryParameters { after?: string; diff --git a/src/resources/businesses/operations/update-business-request-body.ts b/src/resources/businesses/operations/update-business-request-body.ts index 5ccaff9..dfe0b89 100644 --- a/src/resources/businesses/operations/update-business-request-body.ts +++ b/src/resources/businesses/operations/update-business-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContacts, type ICustomData } from '../../../types'; -import { type Status } from '../../../enums'; +import { type IBusinessContacts, type ICustomData } from '../../../types/index.js'; +import { type Status } from '../../../enums/index.js'; export interface UpdateBusinessRequestBody { name?: string; diff --git a/src/resources/customers/index.ts b/src/resources/customers/index.ts index c67322c..7bbf915 100644 --- a/src/resources/customers/index.ts +++ b/src/resources/customers/index.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { CreditBalance, Customer, CustomerCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateCustomerRequestBody, type GetCreditBalanceQueryParameters, type ListCustomerQueryParameters, type UpdateCustomerRequestBody, -} from './operations'; -import { type ICreditBalanceResponse, type ICustomerResponse } from '../../types'; +} from './operations/index.js'; +import { CreditBalance, Customer, CustomerCollection } from '../../entities/index.js'; +import { type ICreditBalanceResponse, type ICustomerResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const CustomerPaths = { list: '/customers', @@ -23,7 +23,7 @@ const CustomerPaths = { getCustomerBalance: '/customers/{customer_id}/credit-balances', } as const; -export * from './operations'; +export * from './operations/index.js'; export class CustomersResource extends BaseResource { public list(queryParams?: ListCustomerQueryParameters): CustomerCollection { diff --git a/src/resources/customers/operations/create-customer-request-body.ts b/src/resources/customers/operations/create-customer-request-body.ts index f53bc6b..321d0bc 100644 --- a/src/resources/customers/operations/create-customer-request-body.ts +++ b/src/resources/customers/operations/create-customer-request-body.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; +import { type ICustomData } from '../../../types/index.js'; export interface CreateCustomerRequestBody { email: string; diff --git a/src/resources/customers/operations/get-credit-balance-query-parameters.ts b/src/resources/customers/operations/get-credit-balance-query-parameters.ts index e902289..a17013c 100644 --- a/src/resources/customers/operations/get-credit-balance-query-parameters.ts +++ b/src/resources/customers/operations/get-credit-balance-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; + +import { type CurrencyCode } from '../../../enums/index.js'; export interface GetCreditBalanceQueryParameters { currencyCode?: CurrencyCode[]; diff --git a/src/resources/customers/operations/index.ts b/src/resources/customers/operations/index.ts index 469260b..90ebd0f 100644 --- a/src/resources/customers/operations/index.ts +++ b/src/resources/customers/operations/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-customer-query-parameters'; -export * from './create-customer-request-body'; -export * from './update-customer-request-body'; -export * from './get-credit-balance-query-parameters'; +export * from './list-customer-query-parameters.js'; +export * from './create-customer-request-body.js'; +export * from './update-customer-request-body.js'; +export * from './get-credit-balance-query-parameters.js'; diff --git a/src/resources/customers/operations/list-customer-query-parameters.ts b/src/resources/customers/operations/list-customer-query-parameters.ts index 59bb14b..26006a9 100644 --- a/src/resources/customers/operations/list-customer-query-parameters.ts +++ b/src/resources/customers/operations/list-customer-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type Status } from '../../../enums'; + +import { type Status } from '../../../enums/index.js'; export interface ListCustomerQueryParameters { after?: string; diff --git a/src/resources/customers/operations/update-customer-request-body.ts b/src/resources/customers/operations/update-customer-request-body.ts index f04393e..d47d65b 100644 --- a/src/resources/customers/operations/update-customer-request-body.ts +++ b/src/resources/customers/operations/update-customer-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; -import { type Status } from '../../../enums'; +import { type Status } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface UpdateCustomerRequestBody { name?: string | null; diff --git a/src/resources/discounts/index.ts b/src/resources/discounts/index.ts index e15ab7e..ef8f20f 100644 --- a/src/resources/discounts/index.ts +++ b/src/resources/discounts/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { Discount, DiscountCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateDiscountRequestBody, type ListDiscountQueryParameters, type UpdateDiscountRequestBody, -} from './operations'; -import { type IDiscountResponse } from '../../types'; +} from './operations/index.js'; +import { Discount, DiscountCollection } from '../../entities/index.js'; +import { type IDiscountResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const DiscountPaths = { list: '/discounts', @@ -21,7 +21,7 @@ const DiscountPaths = { update: '/discounts/{discount_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class DiscountsResource extends BaseResource { public list(queryParams?: ListDiscountQueryParameters): DiscountCollection { diff --git a/src/resources/discounts/operations/create-discount-request-body.ts b/src/resources/discounts/operations/create-discount-request-body.ts index 74901e9..c268615 100644 --- a/src/resources/discounts/operations/create-discount-request-body.ts +++ b/src/resources/discounts/operations/create-discount-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountType } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type CurrencyCode, type DiscountType } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface CreateDiscountRequestBody { amount: string; diff --git a/src/resources/discounts/operations/index.ts b/src/resources/discounts/operations/index.ts index 2433506..1c967eb 100644 --- a/src/resources/discounts/operations/index.ts +++ b/src/resources/discounts/operations/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-discount-query-parameters'; -export * from './create-discount-request-body'; -export * from './update-discount-request-body'; +export * from './list-discount-query-parameters.js'; +export * from './create-discount-request-body.js'; +export * from './update-discount-request-body.js'; diff --git a/src/resources/discounts/operations/list-discount-query-parameters.ts b/src/resources/discounts/operations/list-discount-query-parameters.ts index 9b483be..245b568 100644 --- a/src/resources/discounts/operations/list-discount-query-parameters.ts +++ b/src/resources/discounts/operations/list-discount-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type DiscountStatus } from '../../../enums'; + +import { type DiscountStatus } from '../../../enums/index.js'; export interface ListDiscountQueryParameters { after?: string; diff --git a/src/resources/discounts/operations/update-discount-request-body.ts b/src/resources/discounts/operations/update-discount-request-body.ts index f68291d..188a9c8 100644 --- a/src/resources/discounts/operations/update-discount-request-body.ts +++ b/src/resources/discounts/operations/update-discount-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountType, type Status } from '../../../enums'; -import { type ICustomData } from '../../../types'; +import { type CurrencyCode, type DiscountType, type Status } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface UpdateDiscountRequestBody { status?: Status; diff --git a/src/resources/event-types/index.ts b/src/resources/event-types/index.ts index 33145cf..abfc026 100644 --- a/src/resources/event-types/index.ts +++ b/src/resources/event-types/index.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { BaseResource } from '../../internal/base'; -import { type ErrorResponse, type Response } from '../../internal'; -import { type IEventTypeResponse } from '../../types'; -import { EventType } from '../../entities'; +import { BaseResource } from '../../internal/base/index.js'; +import { EventType } from '../../entities/index.js'; +import { type IEventTypeResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const EventTypesPaths = { list: '/event-types', diff --git a/src/resources/events/index.ts b/src/resources/events/index.ts index 3211526..c9bb554 100644 --- a/src/resources/events/index.ts +++ b/src/resources/events/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { BaseResource, QueryParameters } from '../../internal/base'; -import { type ListEventsQueryParameters } from './operations'; -import { EventCollection } from '../../entities'; +import { BaseResource, QueryParameters } from '../../internal/base/index.js'; +import { type ListEventsQueryParameters } from './operations/index.js'; +import { EventCollection } from '../../entities/index.js'; const EventPaths = { list: '/events', } as const; -export * from './operations'; +export * from './operations/index.js'; export class EventsResource extends BaseResource { public list(queryParams?: ListEventsQueryParameters): EventCollection { diff --git a/src/resources/events/operations/index.ts b/src/resources/events/operations/index.ts index 3557e1f..1700ba7 100644 --- a/src/resources/events/operations/index.ts +++ b/src/resources/events/operations/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-events-query-parameters'; +export * from './list-events-query-parameters.js'; diff --git a/src/resources/index.ts b/src/resources/index.ts index a85060e..4fb5285 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,14 +1,20 @@ -export * from './addresses'; -export * from './adjustments'; -export * from './businesses'; -export * from './customers'; -export * from './discounts'; -export * from './prices'; -export * from './products'; -export * from './subscriptions'; -export * from './transactions'; -export * from './pricing-preview'; -export * from './event-types'; -export * from './notification-settings'; -export * from './notifications'; -export * from './reports'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +export * from './addresses/index.js'; +export * from './adjustments/index.js'; +export * from './businesses/index.js'; +export * from './customers/index.js'; +export * from './discounts/index.js'; +export * from './prices/index.js'; +export * from './products/index.js'; +export * from './subscriptions/index.js'; +export * from './transactions/index.js'; +export * from './pricing-preview/index.js'; +export * from './event-types/index.js'; +export * from './notification-settings/index.js'; +export * from './notifications/index.js'; +export * from './reports/index.js'; diff --git a/src/resources/notification-settings/index.ts b/src/resources/notification-settings/index.ts index a4c4f65..2f9cf66 100644 --- a/src/resources/notification-settings/index.ts +++ b/src/resources/notification-settings/index.ts @@ -4,15 +4,15 @@ * Changes may be overwritten as part of auto-generation. */ -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; -import { type ErrorResponse, type Response } from '../../internal'; -import { NotificationSettings } from '../../entities'; -import { type INotificationSettingsResponse } from '../../types'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; +import { NotificationSettings } from '../../entities/index.js'; +import { type INotificationSettingsResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; import { type CreateNotificationSettingsRequestBody, type ListNotificationSettingsQueryParameters, type UpdateNotificationSettingsRequestBody, -} from './operations'; +} from './operations/index.js'; const NotificationSettingsPaths = { list: '/notification-settings', @@ -22,7 +22,7 @@ const NotificationSettingsPaths = { delete: '/notification-settings/{notification_setting_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class NotificationSettingsResource extends BaseResource { public async list(queryParams?: ListNotificationSettingsQueryParameters): Promise { diff --git a/src/resources/notification-settings/operations/create-notification-settings-request-body.ts b/src/resources/notification-settings/operations/create-notification-settings-request-body.ts index a270e78..3653439 100644 --- a/src/resources/notification-settings/operations/create-notification-settings-request-body.ts +++ b/src/resources/notification-settings/operations/create-notification-settings-request-body.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type NotificationSettingsType } from '../../../enums'; -import { type IEventName } from '../../../notifications'; + +import { type IEventName } from '../../../notifications/index.js'; +import { type NotificationSettingsType } from '../../../enums/index.js'; export interface CreateNotificationSettingsRequestBody { description: string; diff --git a/src/resources/notification-settings/operations/index.ts b/src/resources/notification-settings/operations/index.ts index cd023ad..d948d50 100644 --- a/src/resources/notification-settings/operations/index.ts +++ b/src/resources/notification-settings/operations/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './create-notification-settings-request-body'; -export * from './update-notification-settings-request-body'; -export * from './list-notification-settings-query-parameters'; +export * from './create-notification-settings-request-body.js'; +export * from './update-notification-settings-request-body.js'; +export * from './list-notification-settings-query-parameters.js'; diff --git a/src/resources/notification-settings/operations/update-notification-settings-request-body.ts b/src/resources/notification-settings/operations/update-notification-settings-request-body.ts index 55a753c..cf2eb21 100644 --- a/src/resources/notification-settings/operations/update-notification-settings-request-body.ts +++ b/src/resources/notification-settings/operations/update-notification-settings-request-body.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IEventName } from '../../../notifications'; + +import { type IEventName } from '../../../notifications/index.js'; export interface UpdateNotificationSettingsRequestBody { description?: string; diff --git a/src/resources/notifications/index.ts b/src/resources/notifications/index.ts index 904806a..9a17774 100644 --- a/src/resources/notifications/index.ts +++ b/src/resources/notifications/index.ts @@ -4,11 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; -import { Notification, NotificationCollection, NotificationLogCollection, ReplayNotification } from '../../entities'; -import { type ListNotificationLogQueryParameters, type ListNotificationQueryParameters } from './operations'; -import { type ErrorResponse, type Response } from '../../internal'; -import { type INotificationResponse, type IReplayNotificationResponse } from '../../types'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; +import { type ListNotificationLogQueryParameters, type ListNotificationQueryParameters } from './operations/index.js'; +import { + Notification, + NotificationCollection, + NotificationLogCollection, + ReplayNotification, +} from '../../entities/index.js'; +import { type INotificationResponse, type IReplayNotificationResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const NotificationPaths = { list: '/notifications', @@ -17,7 +22,7 @@ const NotificationPaths = { replay: '/notifications/{notification_id}/replay', } as const; -export * from './operations'; +export * from './operations/index.js'; export class NotificationsResource extends BaseResource { public list(queryParams?: ListNotificationQueryParameters): NotificationCollection { diff --git a/src/resources/notifications/operations/index.ts b/src/resources/notifications/operations/index.ts index b546d87..725f72f 100644 --- a/src/resources/notifications/operations/index.ts +++ b/src/resources/notifications/operations/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-notification-query-parameters'; -export * from './list-notification-log-query-parameters'; +export * from './list-notification-query-parameters.js'; +export * from './list-notification-log-query-parameters.js'; diff --git a/src/resources/notifications/operations/list-notification-query-parameters.ts b/src/resources/notifications/operations/list-notification-query-parameters.ts index 236c5db..5a505d4 100644 --- a/src/resources/notifications/operations/list-notification-query-parameters.ts +++ b/src/resources/notifications/operations/list-notification-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type NotificationStatus } from '../../../enums'; + +import { type NotificationStatus } from '../../../enums/index.js'; export interface ListNotificationQueryParameters { after?: string; diff --git a/src/resources/prices/index.ts b/src/resources/prices/index.ts index b40f720..cd6804f 100644 --- a/src/resources/prices/index.ts +++ b/src/resources/prices/index.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { Price, PriceCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreatePriceRequestBody, type GetPriceQueryParameters, type ListPriceQueryParameters, type UpdatePriceRequestBody, -} from './operations'; -import { type IPriceResponse } from '../../types'; +} from './operations/index.js'; +import { Price, PriceCollection } from '../../entities/index.js'; +import { type IPriceResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const PricePaths = { list: '/prices', @@ -22,7 +22,7 @@ const PricePaths = { update: '/prices/{price_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class PricesResource extends BaseResource { public list(queryParams?: ListPriceQueryParameters): PriceCollection { diff --git a/src/resources/prices/operations/create-price-request-body.ts b/src/resources/prices/operations/create-price-request-body.ts index ed748f5..650339a 100644 --- a/src/resources/prices/operations/create-price-request-body.ts +++ b/src/resources/prices/operations/create-price-request-body.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CatalogType, type TaxMode } from '../../../enums/index.js'; import { type ICustomData, type IMoney, type IPriceQuantity, type ITimePeriod, type IUnitPriceOverride, -} from '../../../types'; -import { type CatalogType, type TaxMode } from '../../../enums'; +} from '../../../types/index.js'; export interface CreatePriceRequestBody { name?: string | null; diff --git a/src/resources/prices/operations/index.ts b/src/resources/prices/operations/index.ts index ab783bb..39b5cb2 100644 --- a/src/resources/prices/operations/index.ts +++ b/src/resources/prices/operations/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-price-query-parameters'; -export * from './create-price-request-body'; -export * from './get-price-query-parameters'; -export * from './update-price-request-body'; +export * from './list-price-query-parameters.js'; +export * from './create-price-request-body.js'; +export * from './get-price-query-parameters.js'; +export * from './update-price-request-body.js'; diff --git a/src/resources/prices/operations/list-price-query-parameters.ts b/src/resources/prices/operations/list-price-query-parameters.ts index 0218278..4be36a8 100644 --- a/src/resources/prices/operations/list-price-query-parameters.ts +++ b/src/resources/prices/operations/list-price-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CatalogType, type Status } from '../../../enums'; + +import { type CatalogType, type Status } from '../../../enums/index.js'; export interface ListPriceQueryParameters { after?: string; diff --git a/src/resources/prices/operations/update-price-request-body.ts b/src/resources/prices/operations/update-price-request-body.ts index 33c6ce0..2d63952 100644 --- a/src/resources/prices/operations/update-price-request-body.ts +++ b/src/resources/prices/operations/update-price-request-body.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CatalogType, type Status, type TaxMode } from '../../../enums/index.js'; import { type ICustomData, type IMoney, type IPriceQuantity, type ITimePeriod, type IUnitPriceOverride, -} from '../../../types'; -import { type CatalogType, type Status, type TaxMode } from '../../../enums'; +} from '../../../types/index.js'; export interface UpdatePriceRequestBody { description?: string; diff --git a/src/resources/pricing-preview/index.ts b/src/resources/pricing-preview/index.ts index b85d70c..edf118e 100644 --- a/src/resources/pricing-preview/index.ts +++ b/src/resources/pricing-preview/index.ts @@ -4,17 +4,17 @@ * Changes may be overwritten as part of auto-generation. */ -import { BaseResource } from '../../internal/base'; -import { type ErrorResponse, type Response } from '../../internal'; -import { type IPricingPreviewResponse } from '../../types'; -import { type PricingPreviewRequestBody } from './operations'; -import { PricingPreview } from '../../entities/pricing-preview'; +import { BaseResource } from '../../internal/base/index.js'; +import { type PricingPreviewRequestBody } from './operations/index.js'; +import { PricingPreview } from '../../entities/pricing-preview/index.js'; +import { type IPricingPreviewResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const PricingPreviewPaths = { preview: '/pricing-preview', } as const; -export * from './operations'; +export * from './operations/index.js'; export class PricingPreviewResource extends BaseResource { public async preview(pricePreviewParameter: PricingPreviewRequestBody): Promise { diff --git a/src/resources/pricing-preview/operations/index.ts b/src/resources/pricing-preview/operations/index.ts index 1eff43a..69e3247 100644 --- a/src/resources/pricing-preview/operations/index.ts +++ b/src/resources/pricing-preview/operations/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './pricing-preview-request-body'; +export * from './pricing-preview-request-body.js'; diff --git a/src/resources/pricing-preview/operations/pricing-preview-request-body.ts b/src/resources/pricing-preview/operations/pricing-preview-request-body.ts index 63c2169..13c0f54 100644 --- a/src/resources/pricing-preview/operations/pricing-preview-request-body.ts +++ b/src/resources/pricing-preview/operations/pricing-preview-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../../enums'; -import { type IAddressPreview } from '../../transactions'; +import { type CurrencyCode } from '../../../enums/index.js'; +import { type IAddressPreview } from '../../transactions/index.js'; interface IPricePreviewItem { priceId: string; diff --git a/src/resources/products/index.ts b/src/resources/products/index.ts index 081ff62..99436e5 100644 --- a/src/resources/products/index.ts +++ b/src/resources/products/index.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -import { Product, ProductCollection } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateProductRequestBody, type GetProductQueryParameters, type ListProductQueryParameters, type UpdateProductRequestBody, -} from './operations'; -import { type IProductResponse } from '../../types'; +} from './operations/index.js'; +import { Product, ProductCollection } from '../../entities/index.js'; +import { type IProductResponse } from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const ProductPaths = { list: '/products', @@ -22,7 +22,7 @@ const ProductPaths = { update: '/products/{product_id}', } as const; -export * from './operations'; +export * from './operations/index.js'; export class ProductsResource extends BaseResource { public list(queryParams?: ListProductQueryParameters): ProductCollection { diff --git a/src/resources/products/operations/create-product-request-body.ts b/src/resources/products/operations/create-product-request-body.ts index b82c039..6507101 100644 --- a/src/resources/products/operations/create-product-request-body.ts +++ b/src/resources/products/operations/create-product-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; -import { type CatalogType, type TaxCategory } from '../../../enums'; +import { type CatalogType, type TaxCategory } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface CreateProductRequestBody { name: string; diff --git a/src/resources/products/operations/index.ts b/src/resources/products/operations/index.ts index 76dac48..1382369 100644 --- a/src/resources/products/operations/index.ts +++ b/src/resources/products/operations/index.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-product-query-parameters'; -export * from './create-product-request-body'; -export * from './get-product-query-parameters'; -export * from './update-product-request-body'; +export * from './list-product-query-parameters.js'; +export * from './create-product-request-body.js'; +export * from './get-product-query-parameters.js'; +export * from './update-product-request-body.js'; diff --git a/src/resources/products/operations/list-product-query-parameters.ts b/src/resources/products/operations/list-product-query-parameters.ts index 173f383..bb5453f 100644 --- a/src/resources/products/operations/list-product-query-parameters.ts +++ b/src/resources/products/operations/list-product-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CatalogType, type Status, type TaxCategory } from '../../../enums'; + +import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; export interface ListProductQueryParameters { after?: string; diff --git a/src/resources/products/operations/update-product-request-body.ts b/src/resources/products/operations/update-product-request-body.ts index 8c97d63..173d6e8 100644 --- a/src/resources/products/operations/update-product-request-body.ts +++ b/src/resources/products/operations/update-product-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData } from '../../../types'; -import { type TaxCategory, type Status, type CatalogType } from '../../../enums'; +import { type CatalogType, type Status, type TaxCategory } from '../../../enums/index.js'; +import { type ICustomData } from '../../../types/index.js'; export interface UpdateProductRequestBody { name?: string; diff --git a/src/resources/reports/index.ts b/src/resources/reports/index.ts index c691f01..0d44674 100644 --- a/src/resources/reports/index.ts +++ b/src/resources/reports/index.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { Report, ReportCollection, ReportCsv } from '../../entities'; -import { type IReportResponse, type IReportCsvResponse } from '../../types'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; -import { type CreateReportRequestBody, type ListReportQueryParameters } from './operations'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; +import { type CreateReportRequestBody, type ListReportQueryParameters } from './operations/index.js'; +import { Report, ReportCollection, ReportCsv } from '../../entities/index.js'; +import { type IReportCsvResponse, type IReportResponse } from '../../types/index.js'; +import { type ErrorResponse, type Response } from '../../internal/index.js'; const ReportPaths = { list: '/reports', @@ -17,7 +17,7 @@ const ReportPaths = { getReportCsv: '/reports/{report_id}/download-url', } as const; -export * from './operations'; +export * from './operations/index.js'; export class ReportsResource extends BaseResource { public list(queryParams?: ListReportQueryParameters): ReportCollection { diff --git a/src/resources/reports/operations/create-report-request-object.ts b/src/resources/reports/operations/create-report-request-object.ts index be7fcc9..de108f0 100644 --- a/src/resources/reports/operations/create-report-request-object.ts +++ b/src/resources/reports/operations/create-report-request-object.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportFilters } from '../../../types'; -import { type ReportType } from '../../../enums'; +import { type ReportType } from '../../../enums/index.js'; +import { type IReportFilters } from '../../../types/index.js'; export interface CreateReportRequestBody { type: ReportType; diff --git a/src/resources/reports/operations/index.ts b/src/resources/reports/operations/index.ts index 42c144f..3045e65 100644 --- a/src/resources/reports/operations/index.ts +++ b/src/resources/reports/operations/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-report-query-parameters'; -export * from './create-report-request-object'; +export * from './list-report-query-parameters.js'; +export * from './create-report-request-object.js'; diff --git a/src/resources/reports/operations/list-report-query-parameters.ts b/src/resources/reports/operations/list-report-query-parameters.ts index 9642ef2..237c826 100644 --- a/src/resources/reports/operations/list-report-query-parameters.ts +++ b/src/resources/reports/operations/list-report-query-parameters.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type ReportStatus } from '../../../enums'; + +import { type ReportStatus } from '../../../enums/index.js'; export interface ListReportQueryParameters { after?: string; diff --git a/src/resources/subscriptions/index.ts b/src/resources/subscriptions/index.ts index 1967ccb..6ba05d6 100644 --- a/src/resources/subscriptions/index.ts +++ b/src/resources/subscriptions/index.ts @@ -4,9 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { Subscription, SubscriptionCollection, SubscriptionPreview, Transaction } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CancelSubscription, type CreateSubscriptionCharge, @@ -15,8 +13,14 @@ import { type PauseSubscription, type ResumeSubscription, type UpdateSubscriptionRequestBody, -} from './operations'; -import { type ISubscriptionPreviewResponse, type ISubscriptionResponse, type ITransactionResponse } from '../../types'; +} from './operations/index.js'; +import { Subscription, SubscriptionCollection, SubscriptionPreview, Transaction } from '../../entities/index.js'; +import { + type ISubscriptionPreviewResponse, + type ISubscriptionResponse, + type ITransactionResponse, +} from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const SubscriptionPaths = { get: '/subscriptions/{subscription_id}', @@ -32,7 +36,7 @@ const SubscriptionPaths = { getTransactionToUpdatePaymentMethod: '/subscriptions/{subscription_id}/update-payment-method-transaction', } as const; -export * from './operations'; +export * from './operations/index.js'; export class SubscriptionsResource extends BaseResource { public async previewUpdate( diff --git a/src/resources/subscriptions/operations/cancel-subscription-request-object.ts b/src/resources/subscriptions/operations/cancel-subscription-request-object.ts index d417131..37e1e26 100644 --- a/src/resources/subscriptions/operations/cancel-subscription-request-object.ts +++ b/src/resources/subscriptions/operations/cancel-subscription-request-object.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type SubscriptionEffectiveFrom } from '../../../enums'; +import { type SubscriptionEffectiveFrom } from '../../../enums/index.js'; export interface CancelSubscription { effectiveFrom?: SubscriptionEffectiveFrom | null; diff --git a/src/resources/subscriptions/operations/create-subscription-charge-request-object.ts b/src/resources/subscriptions/operations/create-subscription-charge-request-object.ts index ac0f026..620ded7 100644 --- a/src/resources/subscriptions/operations/create-subscription-charge-request-object.ts +++ b/src/resources/subscriptions/operations/create-subscription-charge-request-object.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type SubscriptionEffectiveFrom, type SubscriptionOnPaymentFailure } from '../../../enums'; -import { type ISubscriptionNonCatalogPriceRequest } from '../../../types'; +import { type ISubscriptionNonCatalogPriceRequest } from '../../../types/index.js'; +import { type SubscriptionEffectiveFrom, type SubscriptionOnPaymentFailure } from '../../../enums/index.js'; interface ITransactionItemBase { quantity: number; diff --git a/src/resources/subscriptions/operations/index.ts b/src/resources/subscriptions/operations/index.ts index 5909b65..f3f08e5 100644 --- a/src/resources/subscriptions/operations/index.ts +++ b/src/resources/subscriptions/operations/index.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './get-subscription-query-parameters'; -export * from './update-subscription-request-body'; -export * from './list-subscription-query-parameters'; -export * from './pause-subscription-request-object'; -export * from './resume-subscription-request-object'; -export * from './cancel-subscription-request-object'; -export * from './create-subscription-charge-request-object'; +export * from './get-subscription-query-parameters.js'; +export * from './update-subscription-request-body.js'; +export * from './list-subscription-query-parameters.js'; +export * from './pause-subscription-request-object.js'; +export * from './resume-subscription-request-object.js'; +export * from './cancel-subscription-request-object.js'; +export * from './create-subscription-charge-request-object.js'; diff --git a/src/resources/subscriptions/operations/list-subscription-query-parameters.ts b/src/resources/subscriptions/operations/list-subscription-query-parameters.ts index 38c306c..1382a18 100644 --- a/src/resources/subscriptions/operations/list-subscription-query-parameters.ts +++ b/src/resources/subscriptions/operations/list-subscription-query-parameters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CollectionMode, type ScheduledChangeAction, type SubscriptionStatus } from '../../../enums'; +import { type CollectionMode, type ScheduledChangeAction, type SubscriptionStatus } from '../../../enums/index.js'; export interface ListSubscriptionQueryParameters { addressId?: string[]; diff --git a/src/resources/subscriptions/operations/pause-subscription-request-object.ts b/src/resources/subscriptions/operations/pause-subscription-request-object.ts index 8ddc6c9..3cbdeff 100644 --- a/src/resources/subscriptions/operations/pause-subscription-request-object.ts +++ b/src/resources/subscriptions/operations/pause-subscription-request-object.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type SubscriptionEffectiveFrom } from '../../../enums'; +import { type SubscriptionEffectiveFrom } from '../../../enums/index.js'; export interface PauseSubscription { effectiveFrom?: SubscriptionEffectiveFrom | null; diff --git a/src/resources/subscriptions/operations/update-subscription-request-body.ts b/src/resources/subscriptions/operations/update-subscription-request-body.ts index 7914ce1..c1f3816 100644 --- a/src/resources/subscriptions/operations/update-subscription-request-body.ts +++ b/src/resources/subscriptions/operations/update-subscription-request-body.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBillingDetailsUpdate, type ICustomData, type ISubscriptionUpdateItem } from '../../../types'; import { type CollectionMode, type CurrencyCode, type ProrationBillingMode, type SubscriptionEffectiveFrom, type SubscriptionOnPaymentFailure, -} from '../../../enums'; +} from '../../../enums/index.js'; +import { type IBillingDetailsUpdate, type ICustomData, type ISubscriptionUpdateItem } from '../../../types/index.js'; export interface UpdateSubscriptionDiscount { id: string; diff --git a/src/resources/transactions/index.ts b/src/resources/transactions/index.ts index bec203c..4d83df1 100644 --- a/src/resources/transactions/index.ts +++ b/src/resources/transactions/index.ts @@ -4,9 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { Transaction, TransactionCollection, TransactionInvoicePDF, TransactionPreview } from '../../entities'; -import { type ErrorResponse, type Response } from '../../internal'; -import { BaseResource, PathParameters, QueryParameters } from '../../internal/base'; +import { BaseResource, PathParameters, QueryParameters } from '../../internal/base/index.js'; import { type CreateTransactionQueryParameters, type CreateTransactionRequestBody, @@ -16,8 +14,14 @@ import { type TransactionPreviewRequestBody, type UpdateTransactionQueryParameters, type UpdateTransactionRequestBody, -} from './operations'; -import { type ITransactionInvoicePDF, type ITransactionPreviewResponse, type ITransactionResponse } from '../../types'; +} from './operations/index.js'; +import { Transaction, TransactionCollection, TransactionInvoicePDF, TransactionPreview } from '../../entities/index.js'; +import { + type ITransactionInvoicePDF, + type ITransactionPreviewResponse, + type ITransactionResponse, +} from '../../types/index.js'; +import { type Response, type ErrorResponse } from '../../internal/index.js'; const TransactionPaths = { list: '/transactions', @@ -28,7 +32,7 @@ const TransactionPaths = { preview: '/transactions/preview', } as const; -export * from './operations'; +export * from './operations/index.js'; export class TransactionsResource extends BaseResource { public list(queryParams?: ListTransactionQueryParameters): TransactionCollection { diff --git a/src/resources/transactions/operations/create-transaction-request-body.ts b/src/resources/transactions/operations/create-transaction-request-body.ts index 5f67046..b812ef2 100644 --- a/src/resources/transactions/operations/create-transaction-request-body.ts +++ b/src/resources/transactions/operations/create-transaction-request-body.ts @@ -10,8 +10,8 @@ import { type ITransactionCheckout, type ITransactionItemWithNonCatalogPrice, type ITransactionsTimePeriod, -} from '../../../types'; -import { type CollectionMode, type CurrencyCode, type TransactionStatus } from '../../../enums'; +} from '../../../types/index.js'; +import { type CollectionMode, type CurrencyCode, type TransactionStatus } from '../../../enums/index.js'; export interface CreateTransactionRequestBody { items: ITransactionItemWithNonCatalogPrice[]; diff --git a/src/resources/transactions/operations/get-transaction-invoice-pdf-query-parameters.ts b/src/resources/transactions/operations/get-transaction-invoice-pdf-query-parameters.ts index d42e09d..3858fed 100644 --- a/src/resources/transactions/operations/get-transaction-invoice-pdf-query-parameters.ts +++ b/src/resources/transactions/operations/get-transaction-invoice-pdf-query-parameters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type Disposition } from '../../../enums'; +import { type Disposition } from '../../../enums/index.js'; export interface GetTransactionInvoicePdfQueryParameters { disposition?: Disposition; diff --git a/src/resources/transactions/operations/index.ts b/src/resources/transactions/operations/index.ts index f865d80..c68e9a3 100644 --- a/src/resources/transactions/operations/index.ts +++ b/src/resources/transactions/operations/index.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './list-transaction-query-parameters'; -export * from './create-transaction-query-parameters'; -export * from './update-transaction-query-parameters'; -export * from './create-transaction-request-body'; -export * from './get-transaction-query-parameters'; -export * from './update-transaction-request-body'; -export * from './transaction-preview-request-body'; -export * from './get-transaction-invoice-pdf-query-parameters'; +export * from './list-transaction-query-parameters.js'; +export * from './create-transaction-query-parameters.js'; +export * from './update-transaction-query-parameters.js'; +export * from './create-transaction-request-body.js'; +export * from './get-transaction-query-parameters.js'; +export * from './update-transaction-request-body.js'; +export * from './transaction-preview-request-body.js'; +export * from './get-transaction-invoice-pdf-query-parameters.js'; diff --git a/src/resources/transactions/operations/list-transaction-query-parameters.ts b/src/resources/transactions/operations/list-transaction-query-parameters.ts index e54c86c..55e8dd6 100644 --- a/src/resources/transactions/operations/list-transaction-query-parameters.ts +++ b/src/resources/transactions/operations/list-transaction-query-parameters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CollectionMode, type TransactionStatus, type TransactionOrigin } from '../../../enums'; +import { type CollectionMode, type TransactionOrigin, type TransactionStatus } from '../../../enums/index.js'; export interface ListTransactionQueryParameters { after?: string; diff --git a/src/resources/transactions/operations/transaction-preview-request-body.ts b/src/resources/transactions/operations/transaction-preview-request-body.ts index 4ce9e55..ed90599 100644 --- a/src/resources/transactions/operations/transaction-preview-request-body.ts +++ b/src/resources/transactions/operations/transaction-preview-request-body.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CountryCode, type CurrencyCode } from '../../../enums'; -import { type ITransactionItemPreviewRequest } from '../../../types'; +import { type CountryCode, type CurrencyCode } from '../../../enums/index.js'; +import { type ITransactionItemPreviewRequest } from '../../../types/index.js'; export interface IAddressPreviewResponse { postal_code?: string | null; diff --git a/src/resources/transactions/operations/update-transaction-request-body.ts b/src/resources/transactions/operations/update-transaction-request-body.ts index 8ec450e..9a18fd3 100644 --- a/src/resources/transactions/operations/update-transaction-request-body.ts +++ b/src/resources/transactions/operations/update-transaction-request-body.ts @@ -4,14 +4,14 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CollectionMode, type CurrencyCode, type TransactionStatus } from '../../../enums/index.js'; import { type IBillingDetailsUpdate, type ICustomData, type ITransactionCheckout, type ITransactionItemWithNonCatalogPrice, type ITransactionsTimePeriod, -} from '../../../types'; -import { type CollectionMode, type CurrencyCode, type TransactionStatus } from '../../../enums'; +} from '../../../types/index.js'; export interface UpdateTransactionRequestBody { status?: TransactionStatus; diff --git a/src/types/address/address-response.ts b/src/types/address/address-response.ts index 8089a90..eccf3bd 100644 --- a/src/types/address/address-response.ts +++ b/src/types/address/address-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData, type IImportMetaResponse } from '../index'; -import { type CountryCode, type Status } from '../../enums'; +import { type CountryCode, type Status } from '../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; export interface IAddressResponse { id: string; diff --git a/src/types/address/index.ts b/src/types/address/index.ts index f7d657f..8dfbdce 100644 --- a/src/types/address/index.ts +++ b/src/types/address/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './address-response'; +export * from './address-response.js'; diff --git a/src/types/adjustment/adjustment-item-response.ts b/src/types/adjustment/adjustment-item-response.ts index 7555026..70bf967 100644 --- a/src/types/adjustment/adjustment-item-response.ts +++ b/src/types/adjustment/adjustment-item-response.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemTotals, type IAdjustmentsProrationResponse } from '../index'; -import { type AdjustmentType } from '../../enums'; +import { type AdjustmentType } from '../../enums/index.js'; +import { type IAdjustmentsProrationResponse } from './adjustments-proration-response.js'; +import { type IAdjustmentItemTotals } from '../shared/index.js'; export interface IAdjustmentItemResponse { id: string; diff --git a/src/types/adjustment/adjustment-response.ts b/src/types/adjustment/adjustment-response.ts index f050761..1ab56b1 100644 --- a/src/types/adjustment/adjustment-response.ts +++ b/src/types/adjustment/adjustment-response.ts @@ -4,12 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type IAdjustmentItemResponse, - type ITotalAdjustmentsResponse, - type IPayoutTotalsAdjustmentResponse, -} from '../index'; -import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../enums'; +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js'; +import { type IAdjustmentItemResponse } from './adjustment-item-response.js'; +import { type IPayoutTotalsAdjustmentResponse, type ITotalAdjustmentsResponse } from '../shared/index.js'; export interface IAdjustmentResponse { id: string; diff --git a/src/types/adjustment/adjustments-proration-response.ts b/src/types/adjustment/adjustments-proration-response.ts index 09502b1..29757d1 100644 --- a/src/types/adjustment/adjustments-proration-response.ts +++ b/src/types/adjustment/adjustments-proration-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentsTimePeriodResponse } from '../index'; +import { type IAdjustmentsTimePeriodResponse } from './adjustments-time-period-response.js'; export interface IAdjustmentsProrationResponse { rate: string; diff --git a/src/types/adjustment/index.ts b/src/types/adjustment/index.ts index 78f64c9..6c2d5c6 100644 --- a/src/types/adjustment/index.ts +++ b/src/types/adjustment/index.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './adjustments-time-period-response'; -export * from './adjustments-proration-response'; -export * from './adjustment-item-response'; -export * from './adjustment-response'; -export * from './adjustment-credit-note-pdf'; +export * from './adjustments-time-period-response.js'; +export * from './adjustments-proration-response.js'; +export * from './adjustment-item-response.js'; +export * from './adjustment-response.js'; +export * from './adjustment-credit-note-pdf.js'; diff --git a/src/types/business/business-response.ts b/src/types/business/business-response.ts index acd38b5..5893af3 100644 --- a/src/types/business/business-response.ts +++ b/src/types/business/business-response.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IBusinessContacts, type ICustomData, type IImportMetaResponse } from '../index'; -import { type Status } from '../../enums'; +import { type IBusinessContacts } from './businesses-contacts.js'; +import { type Status } from '../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; export interface IBusinessResponse { id: string; diff --git a/src/types/business/index.ts b/src/types/business/index.ts index 4c75d56..79cee5d 100644 --- a/src/types/business/index.ts +++ b/src/types/business/index.ts @@ -4,5 +4,5 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './businesses-contacts'; -export * from './business-response'; +export * from './businesses-contacts.js'; +export * from './business-response.js'; diff --git a/src/types/customer/credit-balance-response.ts b/src/types/customer/credit-balance-response.ts index 96e4107..7e87d32 100644 --- a/src/types/customer/credit-balance-response.ts +++ b/src/types/customer/credit-balance-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomerBalance } from '../index'; -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; +import { type ICustomerBalance } from './customer-balance.js'; export interface ICreditBalanceResponse { customer_id?: string | null; diff --git a/src/types/customer/customer-response.ts b/src/types/customer/customer-response.ts index 88bd35b..5539af5 100644 --- a/src/types/customer/customer-response.ts +++ b/src/types/customer/customer-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData, type IImportMetaResponse } from '../index'; -import { type Status } from '../../enums'; +import { type Status } from '../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; export interface ICustomerResponse { id: string; diff --git a/src/types/customer/index.ts b/src/types/customer/index.ts index fb0d38b..439f640 100644 --- a/src/types/customer/index.ts +++ b/src/types/customer/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './customer-response'; -export * from './credit-balance-response'; -export * from './customer-balance'; +export * from './customer-response.js'; +export * from './credit-balance-response.js'; +export * from './customer-balance.js'; diff --git a/src/types/discount/discount-response.ts b/src/types/discount/discount-response.ts index 5032a18..fe88726 100644 --- a/src/types/discount/discount-response.ts +++ b/src/types/discount/discount-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums'; -import { type ICustomData, type IImportMetaResponse } from '../shared'; +import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; export interface IDiscountResponse { id: string; diff --git a/src/types/discount/index.ts b/src/types/discount/index.ts index b03c85c..64de322 100644 --- a/src/types/discount/index.ts +++ b/src/types/discount/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './discount-response'; +export * from './discount-response.js'; diff --git a/src/types/event-types/event-type-response.ts b/src/types/event-types/event-type-response.ts index b11de00..7f85560 100644 --- a/src/types/event-types/event-type-response.ts +++ b/src/types/event-types/event-type-response.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IEventName } from '../../notifications'; + +import { type IEventName } from '../../notifications/index.js'; export interface IEventTypeResponse { name: IEventName; diff --git a/src/types/event-types/index.ts b/src/types/event-types/index.ts index dffbf9a..85877a9 100644 --- a/src/types/event-types/index.ts +++ b/src/types/event-types/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './event-type-response'; +export * from './event-type-response.js'; diff --git a/src/types/events/events-response.ts b/src/types/events/events-response.ts index 4ea5ac2..db1598a 100644 --- a/src/types/events/events-response.ts +++ b/src/types/events/events-response.ts @@ -17,7 +17,7 @@ import { type IReportNotificationResponse, type ISubscriptionNotificationResponse, type ITransactionNotificationResponse, -} from '../../notifications'; +} from '../../notifications/index.js'; export interface IEventsResponse { event_id: string; diff --git a/src/types/events/index.ts b/src/types/events/index.ts index d0afe5e..1a745b1 100644 --- a/src/types/events/index.ts +++ b/src/types/events/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './events-response'; +export * from './events-response.js'; diff --git a/src/types/index.ts b/src/types/index.ts index ed5837f..e6eed0e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -4,20 +4,20 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './shared'; -export * from './product'; -export * from './price'; -export * from './transaction'; -export * from './adjustment'; -export * from './customer'; -export * from './business'; -export * from './subscription'; -export * from './address'; -export * from './discount'; -export * from './pricing-preview'; -export * from './events'; -export * from './payout'; -export * from './event-types'; -export * from './notification-settings'; -export * from './notifications'; -export * from './report'; +export * from './shared/index.js'; +export * from './product/index.js'; +export * from './price/index.js'; +export * from './transaction/index.js'; +export * from './adjustment/index.js'; +export * from './customer/index.js'; +export * from './business/index.js'; +export * from './subscription/index.js'; +export * from './address/index.js'; +export * from './discount/index.js'; +export * from './pricing-preview/index.js'; +export * from './events/index.js'; +export * from './payout/index.js'; +export * from './event-types/index.js'; +export * from './notification-settings/index.js'; +export * from './notifications/index.js'; +export * from './report/index.js'; diff --git a/src/types/notification-settings/index.ts b/src/types/notification-settings/index.ts index 3e5e044..7726548 100644 --- a/src/types/notification-settings/index.ts +++ b/src/types/notification-settings/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification-settings-response'; +export * from './notification-settings-response.js'; diff --git a/src/types/notification-settings/notification-settings-response.ts b/src/types/notification-settings/notification-settings-response.ts index b1d8f38..fd80f28 100644 --- a/src/types/notification-settings/notification-settings-response.ts +++ b/src/types/notification-settings/notification-settings-response.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type NotificationSettingsType } from '../../enums'; -import { type IEventTypeResponse } from '../event-types'; + +import { type NotificationSettingsType } from '../../enums/index.js'; +import { type IEventTypeResponse } from '../event-types/index.js'; export interface INotificationSettingsResponse { id: string; diff --git a/src/types/notifications/index.ts b/src/types/notifications/index.ts index 7584ade..f9cf26a 100644 --- a/src/types/notifications/index.ts +++ b/src/types/notifications/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './notification'; -export * from './notification-log'; -export * from './replay-notification'; +export * from './notification.js'; +export * from './notification-log.js'; +export * from './replay-notification.js'; diff --git a/src/types/notifications/notification.ts b/src/types/notifications/notification.ts index 355241e..b5892e1 100644 --- a/src/types/notifications/notification.ts +++ b/src/types/notifications/notification.ts @@ -4,9 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type NotificationStatus, type Origin } from '../../enums'; -import type { IEvents } from '../events'; -import { type IEventName } from '../../notifications'; +import { type IEventName } from '../../notifications/index.js'; +import { type NotificationStatus, type Origin } from '../../enums/index.js'; +import { type IEvents } from '../events/index.js'; export interface INotificationResponse { id: string; diff --git a/src/types/payout/index.ts b/src/types/payout/index.ts index d2b601d..7238e6f 100644 --- a/src/types/payout/index.ts +++ b/src/types/payout/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './payout-response'; +export * from './payout-response.js'; diff --git a/src/types/payout/payout-response.ts b/src/types/payout/payout-response.ts index 22936a2..eaa0602 100644 --- a/src/types/payout/payout-response.ts +++ b/src/types/payout/payout-response.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type PayoutStatus } from '../../enums'; + +import { type CurrencyCode, type PayoutStatus } from '../../enums/index.js'; export interface IPayoutResponse { id: string; diff --git a/src/types/price/index.ts b/src/types/price/index.ts index bae79e6..c523146 100644 --- a/src/types/price/index.ts +++ b/src/types/price/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './price-response'; -export * from './subscription-non-catalog-price-request'; -export * from './non-catalog-price-request'; +export * from './price-response.js'; +export * from './subscription-non-catalog-price-request.js'; +export * from './non-catalog-price-request.js'; diff --git a/src/types/price/non-catalog-price-request.ts b/src/types/price/non-catalog-price-request.ts index 93d0f9f..1625459 100644 --- a/src/types/price/non-catalog-price-request.ts +++ b/src/types/price/non-catalog-price-request.ts @@ -1,6 +1,12 @@ -import type { ICustomData, IMoney, IPriceQuantity, ITimePeriod, IUnitPriceOverride } from '../shared'; -import type { TaxMode } from '../../enums'; -import type { CreateProductRequestBody } from '../../resources'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +import type { ICustomData, IMoney, IPriceQuantity, ITimePeriod, IUnitPriceOverride } from '../shared/index.js'; +import type { TaxMode } from '../../enums/index.js'; +import type { CreateProductRequestBody } from '../../resources/index.js'; interface INonCatalogBasePriceRequestBody { name?: string | null; diff --git a/src/types/price/price-response.ts b/src/types/price/price-response.ts index 397a0d9..07c59d9 100644 --- a/src/types/price/price-response.ts +++ b/src/types/price/price-response.ts @@ -12,8 +12,8 @@ import { type IProductResponse, type ITimePeriod, type IUnitPriceOverrideResponse, -} from '../index'; -import { type CatalogType, type Status, type TaxMode } from '../../enums'; +} from '../index.js'; +import { type CatalogType, type Status, type TaxMode } from '../../enums/index.js'; export interface IPriceResponse { id: string; diff --git a/src/types/price/subscription-non-catalog-price-request.ts b/src/types/price/subscription-non-catalog-price-request.ts index d100ab3..a250394 100644 --- a/src/types/price/subscription-non-catalog-price-request.ts +++ b/src/types/price/subscription-non-catalog-price-request.ts @@ -1,6 +1,12 @@ -import type { TaxMode } from '../../enums'; -import type { ICustomData, IMoney, IPriceQuantity, IUnitPriceOverride } from '../shared'; -import { type CreateProductRequestBody } from '../../resources'; +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + +import type { TaxMode } from '../../enums/index.js'; +import type { ICustomData, IMoney, IPriceQuantity, IUnitPriceOverride } from '../shared/index.js'; +import { type CreateProductRequestBody } from '../../resources/index.js'; interface INonCatalogBasePriceRequest { name?: string | null; diff --git a/src/types/pricing-preview/index.ts b/src/types/pricing-preview/index.ts index 4e557f0..2ac068a 100644 --- a/src/types/pricing-preview/index.ts +++ b/src/types/pricing-preview/index.ts @@ -3,8 +3,9 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -export * from './pricing-preview-response'; -export * from './pricing-preview-details-response'; -export * from './pricing-preview-discounts-response'; -export * from './pricing-preview-item-response'; -export * from './pricing-preview-line-item-response'; + +export * from './pricing-preview-response.js'; +export * from './pricing-preview-details-response.js'; +export * from './pricing-preview-discounts-response.js'; +export * from './pricing-preview-item-response.js'; +export * from './pricing-preview-line-item-response.js'; diff --git a/src/types/pricing-preview/pricing-preview-details-response.ts b/src/types/pricing-preview/pricing-preview-details-response.ts index 9046654..f1c2fdd 100644 --- a/src/types/pricing-preview/pricing-preview-details-response.ts +++ b/src/types/pricing-preview/pricing-preview-details-response.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type IPricingPreviewLineItemResponse } from './pricing-preview-line-item-response'; + +import { type IPricingPreviewLineItemResponse } from './pricing-preview-line-item-response.js'; export interface IPricingPreviewDetailsResponse { line_items: IPricingPreviewLineItemResponse[]; diff --git a/src/types/pricing-preview/pricing-preview-discounts-response.ts b/src/types/pricing-preview/pricing-preview-discounts-response.ts index faf80e4..278cf94 100644 --- a/src/types/pricing-preview/pricing-preview-discounts-response.ts +++ b/src/types/pricing-preview/pricing-preview-discounts-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IDiscountResponse } from '../discount'; +import { type IDiscountResponse } from '../discount/index.js'; export interface IPricingPreviewDiscountsResponse { discount: IDiscountResponse; diff --git a/src/types/pricing-preview/pricing-preview-line-item-response.ts b/src/types/pricing-preview/pricing-preview-line-item-response.ts index c0e13e0..1de7dbb 100644 --- a/src/types/pricing-preview/pricing-preview-line-item-response.ts +++ b/src/types/pricing-preview/pricing-preview-line-item-response.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceResponse } from '../price'; -import { type ITotals, type IUnitTotals } from '../shared'; -import { type IProductResponse } from '../product'; -import { type IPricingPreviewDiscountsResponse } from './pricing-preview-discounts-response'; +import { type IPriceResponse } from '../price/index.js'; +import { type ITotals, type IUnitTotals } from '../shared/index.js'; +import { type IProductResponse } from '../product/index.js'; +import { type IPricingPreviewDiscountsResponse } from './pricing-preview-discounts-response.js'; export interface IPricingPreviewLineItemResponse { price: IPriceResponse; diff --git a/src/types/pricing-preview/pricing-preview-response.ts b/src/types/pricing-preview/pricing-preview-response.ts index f314220..145851c 100644 --- a/src/types/pricing-preview/pricing-preview-response.ts +++ b/src/types/pricing-preview/pricing-preview-response.ts @@ -4,10 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums'; -import { type IAddressPreviewResponse } from '../../resources'; -import { type IPricingPreviewItemResponse } from './pricing-preview-item-response'; -import { type IPricingPreviewDetailsResponse } from './pricing-preview-details-response'; +import { type AvailablePaymentMethod, type CurrencyCode } from '../../enums/index.js'; +import { type IAddressPreviewResponse } from '../../resources/index.js'; +import { type IPricingPreviewItemResponse } from './pricing-preview-item-response.js'; +import { type IPricingPreviewDetailsResponse } from './pricing-preview-details-response.js'; export interface IPricingPreviewResponse { customer_id?: string | null; diff --git a/src/types/product/index.ts b/src/types/product/index.ts index 16e7826..24d2238 100644 --- a/src/types/product/index.ts +++ b/src/types/product/index.ts @@ -4,4 +4,4 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './product-response'; +export * from './product-response.js'; diff --git a/src/types/product/product-response.ts b/src/types/product/product-response.ts index 2240516..6190712 100644 --- a/src/types/product/product-response.ts +++ b/src/types/product/product-response.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ICustomData, type IImportMetaResponse, type IPriceResponse } from '../index'; -import { type CatalogType, type Status, type TaxCategory } from '../../enums'; +import { type CatalogType, type Status, type TaxCategory } from '../../enums/index.js'; +import { type ICustomData, type IImportMetaResponse } from '../shared/index.js'; +import { type IPriceResponse } from '../price/index.js'; export interface IProductResponse { id: string; diff --git a/src/types/report/index.ts b/src/types/report/index.ts index 2619a99..c018dff 100644 --- a/src/types/report/index.ts +++ b/src/types/report/index.ts @@ -4,6 +4,6 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './report-filters'; -export * from './report'; -export * from './reports-csv'; +export * from './report-filters.js'; +export * from './report.js'; +export * from './reports-csv.js'; diff --git a/src/types/report/report-filters.ts b/src/types/report/report-filters.ts index fe9b3dd..0e7eb86 100644 --- a/src/types/report/report-filters.ts +++ b/src/types/report/report-filters.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ReportFilterName, type ReportFilterOperator } from '../../enums'; +import { type ReportFilterName, type ReportFilterOperator } from '../../enums/index.js'; export interface IReportFilters { name: ReportFilterName; diff --git a/src/types/report/report.ts b/src/types/report/report.ts index bb4ef6f..d894878 100644 --- a/src/types/report/report.ts +++ b/src/types/report/report.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IReportFilters } from '../index'; -import { type ReportType, type ReportStatus } from '../../enums'; +import { type ReportStatus, type ReportType } from '../../enums/index.js'; +import { type IReportFilters } from './report-filters.js'; export interface IReportResponse { id: string; diff --git a/src/types/shared/adjustment-original-amount-response.ts b/src/types/shared/adjustment-original-amount-response.ts index 07e4577..476ed59 100644 --- a/src/types/shared/adjustment-original-amount-response.ts +++ b/src/types/shared/adjustment-original-amount-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type AdjustmentCurrencyCode } from '../../enums'; +import { type AdjustmentCurrencyCode } from '../../enums/index.js'; export interface IAdjustmentOriginalAmountResponse { amount: string; diff --git a/src/types/shared/billing-details-create.ts b/src/types/shared/billing-details-create.ts index e361a3e..375159b 100644 --- a/src/types/shared/billing-details-create.ts +++ b/src/types/shared/billing-details-create.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriod } from '../index'; +import { type ITimePeriod } from './time-period.js'; export interface IBillingDetailsCreate { enableCheckout?: boolean; diff --git a/src/types/shared/billing-details-response.ts b/src/types/shared/billing-details-response.ts index 0b3b320..4a712df 100644 --- a/src/types/shared/billing-details-response.ts +++ b/src/types/shared/billing-details-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriod } from '../index'; +import { type ITimePeriod } from './time-period.js'; export interface IBillingDetailsResponse { enable_checkout?: boolean | null; diff --git a/src/types/shared/billing-details-update.ts b/src/types/shared/billing-details-update.ts index 63cf279..b9a471c 100644 --- a/src/types/shared/billing-details-update.ts +++ b/src/types/shared/billing-details-update.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITimePeriod } from '../index'; +import { type ITimePeriod } from './time-period.js'; export interface IBillingDetailsUpdate { enableCheckout: boolean; diff --git a/src/types/shared/chargeback-fee.ts b/src/types/shared/chargeback-fee.ts index 7880dbf..f6a7b84 100644 --- a/src/types/shared/chargeback-fee.ts +++ b/src/types/shared/chargeback-fee.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentOriginalAmountResponse } from '../index'; +import { type IAdjustmentOriginalAmountResponse } from './adjustment-original-amount-response.js'; export interface IChargebackFee { amount: string; diff --git a/src/types/shared/custom-data.ts b/src/types/shared/custom-data.ts index bef7305..c525847 100644 --- a/src/types/shared/custom-data.ts +++ b/src/types/shared/custom-data.ts @@ -1 +1,7 @@ +/** + * ! Autogenerated code ! + * Do not make changes to this file. + * Changes may be overwritten as part of auto-generation. + */ + export type ICustomData = object; diff --git a/src/types/shared/index.ts b/src/types/shared/index.ts index 0b322fe..63472eb 100644 --- a/src/types/shared/index.ts +++ b/src/types/shared/index.ts @@ -4,32 +4,32 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './time-period'; -export * from './money'; -export * from './money-response'; -export * from './unit-price-override'; -export * from './unit-price-override-response'; -export * from './price-quantity'; -export * from './billing-details-response'; -export * from './totals'; -export * from './tax-rates-used-response'; -export * from './transaction-totals-response'; -export * from './transaction-totals-adjusted-response'; -export * from './transaction-payout-totals-response'; -export * from './adjustment-original-amount-response'; -export * from './chargeback-fee'; -export * from './transaction-payout-totals-adjusted-response'; -export * from './unit-totals'; -export * from './payment-card-response'; -export * from './payment-method-details'; -export * from './transaction-payment-attempt-response'; -export * from './transaction-checkout'; -export * from './adjustment-item-totals'; -export * from './total-adjustments-response'; -export * from './payout-totals-adjustment-response'; -export * from './transaction-line-item-preview-response'; -export * from './transaction-details-preview-response'; -export * from './billing-details-create'; -export * from './billing-details-update'; -export * from './custom-data'; -export * from './import-meta-response'; +export * from './time-period.js'; +export * from './money.js'; +export * from './money-response.js'; +export * from './unit-price-override.js'; +export * from './unit-price-override-response.js'; +export * from './price-quantity.js'; +export * from './billing-details-response.js'; +export * from './totals.js'; +export * from './tax-rates-used-response.js'; +export * from './transaction-totals-response.js'; +export * from './transaction-totals-adjusted-response.js'; +export * from './transaction-payout-totals-response.js'; +export * from './adjustment-original-amount-response.js'; +export * from './chargeback-fee.js'; +export * from './transaction-payout-totals-adjusted-response.js'; +export * from './unit-totals.js'; +export * from './payment-card-response.js'; +export * from './payment-method-details.js'; +export * from './transaction-payment-attempt-response.js'; +export * from './transaction-checkout.js'; +export * from './adjustment-item-totals.js'; +export * from './total-adjustments-response.js'; +export * from './payout-totals-adjustment-response.js'; +export * from './transaction-line-item-preview-response.js'; +export * from './transaction-details-preview-response.js'; +export * from './billing-details-create.js'; +export * from './billing-details-update.js'; +export * from './custom-data.js'; +export * from './import-meta-response.js'; diff --git a/src/types/shared/money-response.ts b/src/types/shared/money-response.ts index e0ecc5a..b0759be 100644 --- a/src/types/shared/money-response.ts +++ b/src/types/shared/money-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; export interface IMoneyResponse { amount: string; diff --git a/src/types/shared/money.ts b/src/types/shared/money.ts index 604ac85..44ec733 100644 --- a/src/types/shared/money.ts +++ b/src/types/shared/money.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; export interface IMoney { amount: string; diff --git a/src/types/shared/payment-card-response.ts b/src/types/shared/payment-card-response.ts index b919027..9c4912c 100644 --- a/src/types/shared/payment-card-response.ts +++ b/src/types/shared/payment-card-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type PaymentCardType } from '../../enums'; +import { type PaymentCardType } from '../../enums/index.js'; export interface IPaymentCardResponse { type: PaymentCardType; diff --git a/src/types/shared/payment-method-details.ts b/src/types/shared/payment-method-details.ts index ea44c28..024d554 100644 --- a/src/types/shared/payment-method-details.ts +++ b/src/types/shared/payment-method-details.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentCardResponse } from '../index'; -import { type PaymentType } from '../../enums'; +import { type PaymentType } from '../../enums/index.js'; +import { type IPaymentCardResponse } from './payment-card-response.js'; export interface IPaymentMethodDetails { type: PaymentType; diff --git a/src/types/shared/payout-totals-adjustment-response.ts b/src/types/shared/payout-totals-adjustment-response.ts index 134a8de..e778463 100644 --- a/src/types/shared/payout-totals-adjustment-response.ts +++ b/src/types/shared/payout-totals-adjustment-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFee } from '../index'; -import { type PayoutCurrencyCode } from '../../enums'; +import { type IChargebackFee } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; export interface IPayoutTotalsAdjustmentResponse { subtotal: string; diff --git a/src/types/shared/tax-rates-used-response.ts b/src/types/shared/tax-rates-used-response.ts index bb3bf66..4231cbe 100644 --- a/src/types/shared/tax-rates-used-response.ts +++ b/src/types/shared/tax-rates-used-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITotals } from '../index'; +import { type ITotals } from './totals.js'; export interface ITaxRatesUsedResponse { tax_rate: string; diff --git a/src/types/shared/time-period.ts b/src/types/shared/time-period.ts index 84e3ee8..60d075f 100644 --- a/src/types/shared/time-period.ts +++ b/src/types/shared/time-period.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type Interval } from '../../enums'; +import { type Interval } from '../../enums/index.js'; export interface ITimePeriod { interval: Interval; diff --git a/src/types/shared/total-adjustments-response.ts b/src/types/shared/total-adjustments-response.ts index f637ed1..71ffcb1 100644 --- a/src/types/shared/total-adjustments-response.ts +++ b/src/types/shared/total-adjustments-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; export interface ITotalAdjustmentsResponse { subtotal: string; diff --git a/src/types/shared/transaction-details-preview-response.ts b/src/types/shared/transaction-details-preview-response.ts index 1ca83d1..0772e3d 100644 --- a/src/types/shared/transaction-details-preview-response.ts +++ b/src/types/shared/transaction-details-preview-response.ts @@ -4,11 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type ITaxRatesUsedResponse, - type ITransactionTotalsResponse, - type ITransactionLineItemPreviewResponse, -} from '../index'; +import { type ITaxRatesUsedResponse } from './tax-rates-used-response.js'; +import { type ITransactionTotalsResponse } from './transaction-totals-response.js'; +import { type ITransactionLineItemPreviewResponse } from './transaction-line-item-preview-response.js'; export interface ITransactionDetailsPreviewResponse { tax_rates_used: ITaxRatesUsedResponse[]; diff --git a/src/types/shared/transaction-line-item-preview-response.ts b/src/types/shared/transaction-line-item-preview-response.ts index 123fbe6..ca63161 100644 --- a/src/types/shared/transaction-line-item-preview-response.ts +++ b/src/types/shared/transaction-line-item-preview-response.ts @@ -4,7 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IProductResponse, type ITotals, type IUnitTotals } from '../index'; +import { type IUnitTotals } from './unit-totals.js'; +import { type ITotals } from './totals.js'; +import { type IProductResponse } from '../product/index.js'; export interface ITransactionLineItemPreviewResponse { price_id: string; diff --git a/src/types/shared/transaction-payment-attempt-response.ts b/src/types/shared/transaction-payment-attempt-response.ts index 5782d84..a9a26fb 100644 --- a/src/types/shared/transaction-payment-attempt-response.ts +++ b/src/types/shared/transaction-payment-attempt-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPaymentMethodDetails } from '../index'; -import { type PaymentAttemptStatus, type ErrorCode } from '../../enums'; +import { type ErrorCode, type PaymentAttemptStatus } from '../../enums/index.js'; +import { type IPaymentMethodDetails } from './payment-method-details.js'; export interface ITransactionPaymentAttemptResponse { payment_attempt_id: string; diff --git a/src/types/shared/transaction-payout-totals-adjusted-response.ts b/src/types/shared/transaction-payout-totals-adjusted-response.ts index 58ad35a..999e2d3 100644 --- a/src/types/shared/transaction-payout-totals-adjusted-response.ts +++ b/src/types/shared/transaction-payout-totals-adjusted-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IChargebackFee } from '../index'; -import { type PayoutCurrencyCode } from '../../enums'; +import { type IChargebackFee } from './chargeback-fee.js'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; export interface ITransactionPayoutTotalsAdjustedResponse { subtotal: string; diff --git a/src/types/shared/transaction-payout-totals-response.ts b/src/types/shared/transaction-payout-totals-response.ts index df8e0d4..1289265 100644 --- a/src/types/shared/transaction-payout-totals-response.ts +++ b/src/types/shared/transaction-payout-totals-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type PayoutCurrencyCode } from '../../enums'; +import { type PayoutCurrencyCode } from '../../enums/index.js'; export interface ITransactionPayoutTotalsResponse { subtotal: string; diff --git a/src/types/shared/transaction-totals-adjusted-response.ts b/src/types/shared/transaction-totals-adjusted-response.ts index 7a02095..6367ec4 100644 --- a/src/types/shared/transaction-totals-adjusted-response.ts +++ b/src/types/shared/transaction-totals-adjusted-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; export interface ITransactionTotalsAdjustedResponse { subtotal: string; diff --git a/src/types/shared/transaction-totals-response.ts b/src/types/shared/transaction-totals-response.ts index 0183e31..592494f 100644 --- a/src/types/shared/transaction-totals-response.ts +++ b/src/types/shared/transaction-totals-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode } from '../../enums'; +import { type CurrencyCode } from '../../enums/index.js'; export interface ITransactionTotalsResponse { subtotal: string; diff --git a/src/types/shared/unit-price-override-response.ts b/src/types/shared/unit-price-override-response.ts index f0f1685..230b95f 100644 --- a/src/types/shared/unit-price-override-response.ts +++ b/src/types/shared/unit-price-override-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyResponse } from '../index'; -import { type CountryCode } from '../../enums'; +import { type CountryCode } from '../../enums/index.js'; +import { type IMoneyResponse } from './money-response.js'; export interface IUnitPriceOverrideResponse { country_codes: CountryCode[]; diff --git a/src/types/shared/unit-price-override.ts b/src/types/shared/unit-price-override.ts index dacea75..f73fa46 100644 --- a/src/types/shared/unit-price-override.ts +++ b/src/types/shared/unit-price-override.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoney } from '../index'; -import { type CountryCode } from '../../enums'; +import { type CountryCode } from '../../enums/index.js'; +import { type IMoney } from './money.js'; export interface IUnitPriceOverride { countryCodes: CountryCode[]; diff --git a/src/types/subscription/index.ts b/src/types/subscription/index.ts index e113aab..e548c2a 100644 --- a/src/types/subscription/index.ts +++ b/src/types/subscription/index.ts @@ -4,16 +4,16 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './subscription-discount-response'; -export * from './subscription-time-period-response'; -export * from './subscription-scheduled-change-response'; -export * from './subscription-management-response'; -export * from './subscription-item-response'; -export * from './next-transaction-response'; -export * from './subscription-discount-response'; -export * from './subscription-update-item'; -export * from './subscription-response'; -export * from './subscription-preview-response'; -export * from './subscription-preview-update-summary'; -export * from './subscription-result-response'; -export * from './subscription-update-non-catalog-price-request'; +export * from './subscription-discount-response.js'; +export * from './subscription-time-period-response.js'; +export * from './subscription-scheduled-change-response.js'; +export * from './subscription-management-response.js'; +export * from './subscription-item-response.js'; +export * from './next-transaction-response.js'; +export * from './subscription-discount-response.js'; +export * from './subscription-update-item.js'; +export * from './subscription-response.js'; +export * from './subscription-preview-response.js'; +export * from './subscription-preview-update-summary.js'; +export * from './subscription-result-response.js'; +export * from './subscription-update-non-catalog-price-request.js'; diff --git a/src/types/subscription/next-transaction-response.ts b/src/types/subscription/next-transaction-response.ts index e8991fc..d208053 100644 --- a/src/types/subscription/next-transaction-response.ts +++ b/src/types/subscription/next-transaction-response.ts @@ -4,12 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type IAdjustmentItemResponse, - type ISubscriptionTimePeriodResponse, - type ITotalAdjustmentsResponse, - type ITransactionDetailsPreviewResponse, -} from '../index'; +import { type IAdjustmentItemResponse } from '../adjustment/index.js'; +import { type ITotalAdjustmentsResponse, type ITransactionDetailsPreviewResponse } from '../shared/index.js'; +import { type ISubscriptionTimePeriodResponse } from './subscription-time-period-response.js'; export interface AdjustmentPreviewResponse { transaction_id: string; diff --git a/src/types/subscription/subscription-item-response.ts b/src/types/subscription/subscription-item-response.ts index c054727..b170719 100644 --- a/src/types/subscription/subscription-item-response.ts +++ b/src/types/subscription/subscription-item-response.ts @@ -4,8 +4,10 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceResponse, type IProductResponse, type ISubscriptionTimePeriodResponse } from '../index'; -import { type SubscriptionItemStatus } from '../../enums'; +import { type SubscriptionItemStatus } from '../../enums/index.js'; +import { type ISubscriptionTimePeriodResponse } from './subscription-time-period-response.js'; +import { type IPriceResponse } from '../price/index.js'; +import { type IProductResponse } from '../product/index.js'; export interface ISubscriptionItemResponse { status: SubscriptionItemStatus; diff --git a/src/types/subscription/subscription-preview-response.ts b/src/types/subscription/subscription-preview-response.ts index 991650f..8073f40 100644 --- a/src/types/subscription/subscription-preview-response.ts +++ b/src/types/subscription/subscription-preview-response.ts @@ -4,21 +4,21 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums/index.js'; +import { type ISubscriptionDiscountResponse } from './subscription-discount-response.js'; import { - type ISubscriptionDiscountResponse, type IBillingDetailsResponse, - type ITimePeriod, - type ISubscriptionScheduledChangeResponse, - type ISubscriptionItemResponse, type ICustomData, - type INextTransactionResponse, - type ITransactionDetailsPreviewResponse, - type ISubscriptionTimePeriodResponse, - type ISubscriptionManagementResponse, - type ISubscriptionPreviewUpdateSummary, type IImportMetaResponse, -} from '../index'; -import { type CurrencyCode, type CollectionMode, type SubscriptionStatus } from '../../enums'; + type ITimePeriod, + type ITransactionDetailsPreviewResponse, +} from '../shared/index.js'; +import { type ISubscriptionTimePeriodResponse } from './subscription-time-period-response.js'; +import { type ISubscriptionScheduledChangeResponse } from './subscription-scheduled-change-response.js'; +import { type ISubscriptionManagementResponse } from './subscription-management-response.js'; +import { type ISubscriptionItemResponse } from './subscription-item-response.js'; +import { type INextTransactionResponse } from './next-transaction-response.js'; +import { type ISubscriptionPreviewUpdateSummary } from './subscription-preview-update-summary.js'; export interface ISubscriptionPreviewResponse { status: SubscriptionStatus; diff --git a/src/types/subscription/subscription-preview-update-summary.ts b/src/types/subscription/subscription-preview-update-summary.ts index 5de131e..6b2154d 100644 --- a/src/types/subscription/subscription-preview-update-summary.ts +++ b/src/types/subscription/subscription-preview-update-summary.ts @@ -4,7 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyResponse, type ISubscriptionResultResponse } from '../index'; +import { type IMoneyResponse } from '../shared/index.js'; +import { type ISubscriptionResultResponse } from './subscription-result-response.js'; export interface ISubscriptionPreviewUpdateSummary { credit: IMoneyResponse; diff --git a/src/types/subscription/subscription-response.ts b/src/types/subscription/subscription-response.ts index 7091a5b..7729c78 100644 --- a/src/types/subscription/subscription-response.ts +++ b/src/types/subscription/subscription-response.ts @@ -4,20 +4,20 @@ * Changes may be overwritten as part of auto-generation. */ +import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums/index.js'; +import { type ISubscriptionDiscountResponse } from './subscription-discount-response.js'; import { type IBillingDetailsResponse, type ICustomData, type IImportMetaResponse, - type INextTransactionResponse, - type ISubscriptionDiscountResponse, - type ISubscriptionItemResponse, - type ISubscriptionManagementResponse, - type ISubscriptionScheduledChangeResponse, - type ISubscriptionTimePeriodResponse, type ITimePeriod, type ITransactionDetailsPreviewResponse, -} from '../index'; -import { type CollectionMode, type CurrencyCode, type SubscriptionStatus } from '../../enums'; +} from '../shared/index.js'; +import { type ISubscriptionTimePeriodResponse } from './subscription-time-period-response.js'; +import { type ISubscriptionScheduledChangeResponse } from './subscription-scheduled-change-response.js'; +import { type ISubscriptionManagementResponse } from './subscription-management-response.js'; +import { type ISubscriptionItemResponse } from './subscription-item-response.js'; +import { type INextTransactionResponse } from './next-transaction-response.js'; export interface ISubscriptionResponse { id: string; diff --git a/src/types/subscription/subscription-result-response.ts b/src/types/subscription/subscription-result-response.ts index 112916a..29e5f79 100644 --- a/src/types/subscription/subscription-result-response.ts +++ b/src/types/subscription/subscription-result-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IMoneyResponse } from '../shared'; +import { type IMoneyResponse } from '../shared/index.js'; export interface ISubscriptionResultResponse extends IMoneyResponse { action: 'credit' | 'charge'; diff --git a/src/types/subscription/subscription-scheduled-change-response.ts b/src/types/subscription/subscription-scheduled-change-response.ts index f303be2..afdfd9b 100644 --- a/src/types/subscription/subscription-scheduled-change-response.ts +++ b/src/types/subscription/subscription-scheduled-change-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ScheduledChangeAction } from '../../enums'; +import { type ScheduledChangeAction } from '../../enums/index.js'; export interface ISubscriptionScheduledChangeResponse { action: ScheduledChangeAction; diff --git a/src/types/subscription/subscription-update-item.ts b/src/types/subscription/subscription-update-item.ts index e6612ed..a48dd89 100644 --- a/src/types/subscription/subscription-update-item.ts +++ b/src/types/subscription/subscription-update-item.ts @@ -3,6 +3,7 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ + import { type ISubscriptionUpdateItemCreateWithPriceRequest } from './subscription-update-non-catalog-price-request'; interface ISubscriptionUpdateBaseItem { diff --git a/src/types/subscription/subscription-update-non-catalog-price-request.ts b/src/types/subscription/subscription-update-non-catalog-price-request.ts index e893d36..1d588b5 100644 --- a/src/types/subscription/subscription-update-non-catalog-price-request.ts +++ b/src/types/subscription/subscription-update-non-catalog-price-request.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CreatePriceRequestBody, type CreateProductRequestBody } from '../../resources'; +import { type CreatePriceRequestBody, type CreateProductRequestBody } from '../../resources/index.js'; interface ISubscriptionUpdateItemCreateWithPriceBaseRequest extends Omit {} diff --git a/src/types/transaction/adjustment-totals-response.ts b/src/types/transaction/adjustment-totals-response.ts index 984768f..f64b321 100644 --- a/src/types/transaction/adjustment-totals-response.ts +++ b/src/types/transaction/adjustment-totals-response.ts @@ -4,8 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentTotalsBreakdown } from '../index'; -import { type CurrencyCode } from '../../enums'; +import { type IAdjustmentTotalsBreakdown } from './adjustment-totals-breakdown.js'; +import { type CurrencyCode } from '../../enums/index.js'; export interface IAdjustmentTotalsResponse { subtotal: string; diff --git a/src/types/transaction/index.ts b/src/types/transaction/index.ts index 837f755..3184ee4 100644 --- a/src/types/transaction/index.ts +++ b/src/types/transaction/index.ts @@ -4,18 +4,18 @@ * Changes may be overwritten as part of auto-generation. */ -export * from './transactions-time-period'; -export * from './transactions-time-period-response'; -export * from './transaction-proration-response'; -export * from './transaction-item'; -export * from './transaction-item-response'; -export * from './transaction-line-item-response'; -export * from './transaction-details-response'; -export * from './transaction-adjustment-item-response'; -export * from './transaction-adjustment-response'; -export * from './adjustment-totals-breakdown'; -export * from './adjustment-totals-response'; -export * from './transaction-response'; -export * from './transaction-invoice-pdf'; -export * from './transaction-preview-item'; -export * from './transaction-preview-response'; +export * from './transactions-time-period.js'; +export * from './transactions-time-period-response.js'; +export * from './transaction-proration-response.js'; +export * from './transaction-item.js'; +export * from './transaction-item-response.js'; +export * from './transaction-line-item-response.js'; +export * from './transaction-details-response.js'; +export * from './transaction-adjustment-item-response.js'; +export * from './transaction-adjustment-response.js'; +export * from './adjustment-totals-breakdown.js'; +export * from './adjustment-totals-response.js'; +export * from './transaction-response.js'; +export * from './transaction-invoice-pdf.js'; +export * from './transaction-preview-item.js'; +export * from './transaction-preview-response.js'; diff --git a/src/types/transaction/transaction-adjustment-item-response.ts b/src/types/transaction/transaction-adjustment-item-response.ts index bfb745f..3a362c8 100644 --- a/src/types/transaction/transaction-adjustment-item-response.ts +++ b/src/types/transaction/transaction-adjustment-item-response.ts @@ -4,8 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IAdjustmentItemTotals, type ITransactionProrationResponse } from '../index'; -import { type AdjustmentType } from '../../enums'; +import { type AdjustmentType } from '../../enums/index.js'; +import { type ITransactionProrationResponse } from './transaction-proration-response.js'; +import { type IAdjustmentItemTotals } from '../shared/index.js'; export interface ITransactionAdjustmentItemResponse { id?: string | null; diff --git a/src/types/transaction/transaction-adjustment-response.ts b/src/types/transaction/transaction-adjustment-response.ts index 64e9d2f..22f67dd 100644 --- a/src/types/transaction/transaction-adjustment-response.ts +++ b/src/types/transaction/transaction-adjustment-response.ts @@ -4,12 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { - type ITransactionAdjustmentItemResponse, - type ITotalAdjustmentsResponse, - type IPayoutTotalsAdjustmentResponse, -} from '../index'; -import { type AdjustmentAction, type CurrencyCode, type AdjustmentStatus } from '../../enums'; +import { type AdjustmentAction, type AdjustmentStatus, type CurrencyCode } from '../../enums/index.js'; +import { type ITransactionAdjustmentItemResponse } from './transaction-adjustment-item-response.js'; +import { type IPayoutTotalsAdjustmentResponse, type ITotalAdjustmentsResponse } from '../shared/index.js'; export interface ITransactionAdjustmentResponse { id: string; diff --git a/src/types/transaction/transaction-details-response.ts b/src/types/transaction/transaction-details-response.ts index e34a089..e0ac56b 100644 --- a/src/types/transaction/transaction-details-response.ts +++ b/src/types/transaction/transaction-details-response.ts @@ -6,12 +6,12 @@ import { type ITaxRatesUsedResponse, - type ITransactionTotalsResponse, - type ITransactionTotalsAdjustedResponse, - type ITransactionPayoutTotalsResponse, type ITransactionPayoutTotalsAdjustedResponse, - type ITransactionLineItemResponse, -} from '../index'; + type ITransactionPayoutTotalsResponse, + type ITransactionTotalsAdjustedResponse, + type ITransactionTotalsResponse, +} from '../shared/index.js'; +import { type ITransactionLineItemResponse } from './transaction-line-item-response.js'; export interface ITransactionDetailsResponse { tax_rates_used: ITaxRatesUsedResponse[]; diff --git a/src/types/transaction/transaction-item-response.ts b/src/types/transaction/transaction-item-response.ts index 2f0f029..559fa57 100644 --- a/src/types/transaction/transaction-item-response.ts +++ b/src/types/transaction/transaction-item-response.ts @@ -4,7 +4,8 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IPriceResponse, type ITransactionProrationResponse } from '../index'; +import { type IPriceResponse } from '../price/index.js'; +import { type ITransactionProrationResponse } from './transaction-proration-response.js'; export interface ITransactionItemResponse { price_id?: string | null; diff --git a/src/types/transaction/transaction-item.ts b/src/types/transaction/transaction-item.ts index 76ce77d..611d356 100644 --- a/src/types/transaction/transaction-item.ts +++ b/src/types/transaction/transaction-item.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type INonCatalogPriceRequestBody } from '../price'; + +import { type INonCatalogPriceRequestBody } from '../price/index.js'; export interface ITransactionItemWithPriceId { priceId: string; diff --git a/src/types/transaction/transaction-line-item-response.ts b/src/types/transaction/transaction-line-item-response.ts index 9fa8152..dc99947 100644 --- a/src/types/transaction/transaction-line-item-response.ts +++ b/src/types/transaction/transaction-line-item-response.ts @@ -4,7 +4,9 @@ * Changes may be overwritten as part of auto-generation. */ -import { type IProductResponse, type ITotals, type ITransactionProrationResponse, type IUnitTotals } from '../index'; +import { type ITransactionProrationResponse } from './transaction-proration-response.js'; +import { type ITotals, type IUnitTotals } from '../shared/index.js'; +import { type IProductResponse } from '../product/index.js'; export interface ITransactionLineItemResponse { id: string; diff --git a/src/types/transaction/transaction-preview-item.ts b/src/types/transaction/transaction-preview-item.ts index 922df56..5509a10 100644 --- a/src/types/transaction/transaction-preview-item.ts +++ b/src/types/transaction/transaction-preview-item.ts @@ -3,7 +3,8 @@ * Do not make changes to this file. * Changes may be overwritten as part of auto-generation. */ -import { type INonCatalogPriceRequestBody } from '../price'; + +import { type INonCatalogPriceRequestBody } from '../price/index.js'; interface IBaseTransactionItemPreview { quantity: number; diff --git a/src/types/transaction/transaction-preview-response.ts b/src/types/transaction/transaction-preview-response.ts index 2f80ff1..4774d65 100644 --- a/src/types/transaction/transaction-preview-response.ts +++ b/src/types/transaction/transaction-preview-response.ts @@ -4,11 +4,11 @@ * Changes may be overwritten as part of auto-generation. */ -import { type CurrencyCode, type AvailablePaymentMethod } from '../../enums'; -import { type IAddressPreviewResponse } from '../../resources'; -import { type ITransactionDetailsPreviewResponse } from '../shared'; -import { type IPriceResponse } from '../price'; -import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response'; +import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response.js'; +import { type IPriceResponse } from '../price/index.js'; +import { type AvailablePaymentMethod, type CurrencyCode } from '../../enums/index.js'; +import { type IAddressPreviewResponse } from '../../resources/index.js'; +import { type ITransactionDetailsPreviewResponse } from '../shared/index.js'; export interface IProrationResponse { rate: string; diff --git a/src/types/transaction/transaction-proration-response.ts b/src/types/transaction/transaction-proration-response.ts index e0a3d64..00cd2bb 100644 --- a/src/types/transaction/transaction-proration-response.ts +++ b/src/types/transaction/transaction-proration-response.ts @@ -4,7 +4,7 @@ * Changes may be overwritten as part of auto-generation. */ -import { type ITransactionsTimePeriodResponse } from '../index'; +import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response.js'; export interface ITransactionProrationResponse { rate: string; diff --git a/src/types/transaction/transaction-response.ts b/src/types/transaction/transaction-response.ts index 8fc08a0..021e58d 100644 --- a/src/types/transaction/transaction-response.ts +++ b/src/types/transaction/transaction-response.ts @@ -5,27 +5,27 @@ */ import { - type ICustomData, - type IBillingDetailsResponse, - type ITransactionsTimePeriodResponse, - type ITransactionItemResponse, - type ITransactionDetailsResponse, - type ITransactionPaymentAttemptResponse, - type ITransactionCheckout, - type IAddressResponse, - type ITransactionAdjustmentResponse, - type IAdjustmentTotalsResponse, - type IBusinessResponse, - type ICustomerResponse, - type IDiscountResponse, -} from '../index'; -import { - type TransactionStatus, + type AvailablePaymentMethod, + type CollectionMode, type CurrencyCode, type TransactionOrigin, - type CollectionMode, - type AvailablePaymentMethod, -} from '../../enums'; + type TransactionStatus, +} from '../../enums/index.js'; +import { + type IBillingDetailsResponse, + type ICustomData, + type ITransactionCheckout, + type ITransactionPaymentAttemptResponse, +} from '../shared/index.js'; +import { type ITransactionsTimePeriodResponse } from './transactions-time-period-response.js'; +import { type ITransactionItemResponse } from './transaction-item-response.js'; +import { type ITransactionDetailsResponse } from './transaction-details-response.js'; +import { type IAddressResponse } from '../address/index.js'; +import { type ITransactionAdjustmentResponse } from './transaction-adjustment-response.js'; +import { type IAdjustmentTotalsResponse } from './adjustment-totals-response.js'; +import { type IBusinessResponse } from '../business/index.js'; +import { type ICustomerResponse } from '../customer/index.js'; +import { type IDiscountResponse } from '../discount/index.js'; export interface ITransactionResponse { id: string; diff --git a/tsconfig.base.json b/tsconfig.base.json index e5a4db7..a696049 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2016", - "lib": ["ESNext"], + "lib": ["ESNext", "dom"], "module": "NodeNext", "rootDir": "./src", "moduleResolution": "Node", @@ -31,5 +31,4 @@ "skipLibCheck": true }, "include": ["./src"], - "exclude": ["**/__tests__/**"] } diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json index 09e1cd9..be86415 100644 --- a/tsconfig.cjs.json +++ b/tsconfig.cjs.json @@ -3,5 +3,6 @@ "compilerOptions": { "outDir": "./dist/cjs", "module": "commonjs" - } + }, + "exclude": ["**/__tests__/**", "./src/index.esm.node.ts", "./src/index.esm.edge.ts"] } diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 4ad7b62..bbacdef 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -3,5 +3,6 @@ "compilerOptions": { "outDir": "./dist/esm", "module": "esnext" - } + }, + "exclude": ["**/__tests__/**", "src/index.cjs.edge.ts", "src/index.cjs.node.ts"] } diff --git a/tsconfig.types.json b/tsconfig.types.json index 26abb74..afe942d 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -5,5 +5,6 @@ "declaration": true, "moduleResolution": "NodeNext", "emitDeclarationOnly": true - } + }, + "exclude": ["**/__tests__/**", "./src/index.cjs.edge.ts", "./src/index.esm.node.ts", "./src/index.esm.edge.ts"] } diff --git a/yarn.lock b/yarn.lock index 6c22537..a0e8fce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1445,14 +1445,6 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== -"@types/node-fetch@^2.6.6": - version "2.6.6" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.6.tgz#b72f3f4bc0c0afee1c0bc9cff68e041d01e3e779" - integrity sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw== - dependencies: - "@types/node" "*" - form-data "^4.0.0" - "@types/node@*": version "20.8.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.4.tgz#0e9ebb2ff29d5c3302fc84477d066fa7c6b441aa" @@ -1711,11 +1703,6 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -1957,13 +1944,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2050,11 +2030,6 @@ define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2499,15 +2474,6 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3487,18 +3453,6 @@ micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -3531,13 +3485,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -node-fetch@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4119,11 +4066,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - ts-api-utils@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" @@ -4274,19 +4216,6 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"