Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 0 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/lib/seam/connect/api-error-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UPSTREAM: These types should be provided by @seamapi/types/connect.

export interface ApiErrorResponse {
error: ApiError
}
Expand Down
6 changes: 2 additions & 4 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
@@ -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<typeof openapi> => {
): Promise<unknown> => {
const client = createClient({
axiosOptions: {
baseURL: endpoint,
headers: sdkHeaders,
},
})
const { data } = await client.get<typeof openapi>('/openapi.json')
const { data } = await client.get('/openapi.json')
return data
}
Loading