diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 57507060..ab507ff3 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -31,10 +31,6 @@ jobs: uses: ./.github/actions/setup with: install_dependencies: 'false' - - name: Sync @seamapi/types version in peerDependencies - run: | - sudo apt-get install -y jq moreutils - jq '.peerDependencies."@seamapi/types" = "^" + .devDependencies."@seamapi/types"' package.json | sponge package.json - name: Normalize package-lock.json run: npm install - name: Generate code diff --git a/README.md b/README.md index 85b15692..baa962e6 100644 --- a/README.md +++ b/README.md @@ -43,36 +43,6 @@ $ npm install @seamapi/http [npm]: https://www.npmjs.com/ [seam package]: https://www.npmjs.com/package/seam -### Optional Peer Dependencies for TypeScript - -This package has optional peer dependencies for TypeScript users. -Recent versions of npm will automatically install peer dependencies by default. -For those users, no additional steps are necessary for full TypeScript support, -however users should still explicitly install the latest types (see the next section). - -Other package managers require peer dependencies to be added manually. -Refer to any warnings generated by your package manager -about missing peer dependencies and install them as needed. -Refer to the next section for keeping the types updated. - -#### Keeping up with the latest types - -This package depends on [@seamapi/types] for the latest TypeScript types. -New versions of this SDK are generally not released when new types are published. -Unless your project frequently runs a blanket `npm update`, -the types will become outdated with the Seam API over time. -Thus, users of this package should explicitly install the types with - -``` -$ npm install -D @seamapi/types -``` - -and update them when consuming new API features with - -``` -$ npm install -D @seamapi/types@latest -``` - ## Usage ### Examples diff --git a/package-lock.json b/package-lock.json index ec632bd5..10f48777 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,14 +45,6 @@ "engines": { "node": ">=22.11.0", "npm": ">=10.9.4" - }, - "peerDependencies": { - "@seamapi/types": "^1.983.0" - }, - "peerDependenciesMeta": { - "@seamapi/types": { - "optional": true - } } }, "node_modules/@bcoe/v8-coverage": { diff --git a/package.json b/package.json index 5a62e7c1..35987df8 100644 --- a/package.json +++ b/package.json @@ -81,14 +81,6 @@ "version": "^11.12.0 || ^10.9.4" } }, - "peerDependencies": { - "@seamapi/types": "^1.983.0" - }, - "peerDependenciesMeta": { - "@seamapi/types": { - "optional": true - } - }, "dependencies": { "@seamapi/url-search-params-serializer": "^3.0.0", "axios": "^1.9.0", diff --git a/src/lib/seam/connect/api-error-types.ts b/src/lib/seam/connect/api-error-types.ts index e9ca5a9a..164176d2 100644 --- a/src/lib/seam/connect/api-error-types.ts +++ b/src/lib/seam/connect/api-error-types.ts @@ -1,5 +1,3 @@ -// UPSTREAM: These types should be provided by @seamapi/types/connect. - export interface ApiErrorResponse { error: ApiError } diff --git a/src/lib/seam/connect/openapi.ts b/src/lib/seam/connect/openapi.ts index 97b5a1ba..527d59d9 100644 --- a/src/lib/seam/connect/openapi.ts +++ b/src/lib/seam/connect/openapi.ts @@ -1,17 +1,15 @@ -import type { openapi } from '@seamapi/types/connect' - import { createClient } from './client.js' import { defaultEndpoint, sdkHeaders } from './parse-options.js' export const getOpenapiSchema = async ( endpoint = defaultEndpoint, -): Promise => { +): Promise => { const client = createClient({ axiosOptions: { baseURL: endpoint, headers: sdkHeaders, }, }) - const { data } = await client.get('/openapi.json') + const { data } = await client.get('/openapi.json') return data }