diff --git a/README.md b/README.md index 0dda0ea..87d4677 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,8 @@ Instead, it re-exports from a core set of Seam modules: - [Configuring the Axios Client](#configuring-the-axios-client) - [Using the Axios Client](#using-the-axios-client) - [Overriding the Client](#overriding-the-client) + - [Alternative endpoint path interface](#alternative-endpoint-path-interface) + - [Enable undocumented API](#enable-undocumented-api) - [Inspecting the Request](#inspecting-the-request) - [Receiving Webhooks](#receiving-webhooks) - [Development and Testing](#development-and-testing) @@ -523,6 +525,31 @@ const devices = await seam.client.get('/devices/list') An Axios compatible client may be provided to create a `Seam` instance. This API is used internally and is not directly supported. +#### Alternative endpoint path interface + +The `SeamEndpoints` class offers an alternative path-based interface to every API endpoint. +Each endpoint is exposed as simple property that returns the corresponding method from `Seam`. + +```ts +import { SeamEndpoints } from 'seam' + +const seam = new SeamEndpoints() +const devices = await seam['/devices/list']() +``` + +#### Enable undocumented API + +Pass the `isUndocumentedApiEnabled` option to allow using the undocumented API. +This API is used internally and is not directly supported. +Do not use the undocumented API in production environments. +Seam is not responsible for any issues you may encounter with the undocumented API. + +```ts +import { Seam } from 'seam' + +const seam = new Seam({ isUndocumentedApiEnabled: true }) +``` + #### Inspecting the Request All client methods return an instance of `SeamHttpRequest`. diff --git a/package-lock.json b/package-lock.json index bb6a0a6..8dd105b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "1.80.0", "license": "MIT", "dependencies": { - "@seamapi/http": "1.35.1", - "@seamapi/types": "1.420.2", + "@seamapi/http": "1.37.0", + "@seamapi/types": "1.423.4", "@seamapi/webhook": "1.1.1", "zod": "^3.21.4" }, @@ -1115,9 +1115,9 @@ "peer": true }, "node_modules/@seamapi/http": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-1.35.1.tgz", - "integrity": "sha512-oIwNfy42EIHY/hI7WTAq5kMfE3TzdZm7c7j6brr5fymPe8McrsIO2GpjoPIaQ6cIDF7bPxAQw37sVD7nJpi3sQ==", + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/@seamapi/http/-/http-1.37.0.tgz", + "integrity": "sha512-IzKOylzhY88YjrDmL3sGEEmCdIo/+cI8xTlujHteGbe1MbDx4BKE7n23bOS/Fe+S9mxrkTuIzez1zkPzttiRCQ==", "license": "MIT", "dependencies": { "@seamapi/url-search-params-serializer": "^2.0.0-beta.2", @@ -1129,7 +1129,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "1.420.2" + "@seamapi/types": "^1.420.2" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -1138,9 +1138,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.420.2", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.420.2.tgz", - "integrity": "sha512-3W6YwDWIUsfwvEzzF6HuDNryqSqtywoGvi+zfLf9Js/wh88A3DKXYOmwamGWLus2L6vTp28F4aipcu5uNQndow==", + "version": "1.423.4", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.423.4.tgz", + "integrity": "sha512-cZX6y4LKeijIpaUUBJEvN6fO9MsEevrUHT4oQ2kJx5sm9pNJqUR1RSuBktcNBA6zO/na8hZtGo0NrAJxK5KYQw==", "license": "MIT", "engines": { "node": ">=18.12.0", diff --git a/package.json b/package.json index 22b9925..8f986a4 100644 --- a/package.json +++ b/package.json @@ -65,8 +65,8 @@ "npm": ">= 9.0.0" }, "dependencies": { - "@seamapi/http": "1.35.1", - "@seamapi/types": "1.420.2", + "@seamapi/http": "1.37.0", + "@seamapi/types": "1.423.4", "@seamapi/webhook": "1.1.1", "zod": "^3.21.4" },