From 835ca58856dadce45ba16218843618ac230ad517 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 07:52:07 +0000 Subject: [PATCH 1/4] feat: Require JSDoc on the public API surface Add eslint-plugin-jsdoc scoped to the export closure of src/index.ts. The jsdoc/require-jsdoc rule now flags every undocumented public export: 86 errors in handwritten modules and 1149 in generated code, to be resolved in subsequent commits. Internal modules (client, parse-options, api-error-types, version) are excluded by file scope rather than @internal tags. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XQyDWeGYQyCDEJ1rZ8J1iB --- eslint.config.ts | 68 +++++++++++ package-lock.json | 287 +++++++++++++++++++++++++++++++++++++++++----- package.json | 1 + 3 files changed, 326 insertions(+), 30 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 77975224..7d75fff5 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -1,11 +1,32 @@ import { globalIgnores } from 'eslint/config' import importPlugin from 'eslint-plugin-import' +import jsdoc from 'eslint-plugin-jsdoc' import simpleImportSort from 'eslint-plugin-simple-import-sort' import unusedImports from 'eslint-plugin-unused-imports' import neostandard, { resolveIgnoresFromGitignore } from 'neostandard' const files = ['**/*.{ts,tsx}'] +// The public API is the export closure of src/index.ts. +// Only these files contain exports reachable from the package entrypoint, +// so only they must document their exports. +// Errors in src/lib/resources and src/lib/routes must be fixed +// in the codegen/layouts templates followed by npm run generate. +const publicApiFiles = [ + 'src/lib/auth.ts', + 'src/lib/error-interceptor.ts', + 'src/lib/openapi.ts', + 'src/lib/options.ts', + 'src/lib/request-options.ts', + 'src/lib/resolve-action-attempt.ts', + 'src/lib/resources/**/*.ts', + 'src/lib/routes/**/*.ts', + 'src/lib/seam-http-error.ts', + 'src/lib/seam-http-request.ts', + 'src/lib/seam-paginator.ts', + 'src/lib/token.ts', +] + export default [ globalIgnores(resolveIgnoresFromGitignore()), ...neostandard({ ts: true, noStyle: true }), @@ -73,6 +94,53 @@ export default [ ], }, }, + { + ...jsdoc.configs['flat/recommended-typescript-error'], + files: publicApiFiles, + rules: { + ...jsdoc.configs['flat/recommended-typescript-error']?.rules, + 'jsdoc/require-jsdoc': [ + 'error', + { + publicOnly: true, + require: { + ArrowFunctionExpression: true, + ClassDeclaration: true, + ClassExpression: true, + FunctionDeclaration: true, + FunctionExpression: true, + MethodDefinition: false, + }, + contexts: [ + 'ExportNamedDeclaration > TSInterfaceDeclaration', + 'ExportNamedDeclaration > TSTypeAliasDeclaration', + 'ExportNamedDeclaration > TSEnumDeclaration', + 'MethodDefinition[key.type!="PrivateIdentifier"]', + 'PropertyDefinition[key.type!="PrivateIdentifier"]', + ], + checkConstructors: false, + checkGetters: true, + checkSetters: true, + enableFixer: false, + }, + ], + 'jsdoc/require-description': [ + 'error', + { + contexts: ['any'], + exemptedBy: ['deprecated', 'inheritdoc', 'internal', 'see'], + }, + ], + 'jsdoc/require-param': 'off', + 'jsdoc/require-returns': 'off', + 'jsdoc/require-yields': 'off', + // Types belong in the TypeScript type annotations, not the JSDoc tags. + 'jsdoc/require-throws-type': 'off', + 'jsdoc/tag-lines': ['error', 'never', { startLines: 1 }], + // Conflicts with how Prettier formats JSDoc inside union types. + 'jsdoc/check-alignment': 'off', + }, + }, { files, plugins: { diff --git a/package-lock.json b/package-lock.json index aa38d564..d39cf258 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "eslint": "^9.31.0", "eslint-import-resolver-typescript": "^4.4.5", "eslint-plugin-import": "^2.32.0", + "eslint-plugin-jsdoc": "^64.1.0", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unused-imports": "^4.1.4", "execa": "^10.0.0", @@ -101,6 +102,47 @@ "tslib": "^2.4.0" } }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.95.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.95.0.tgz", + "integrity": "sha512-jbzwtRPuw1Nzld0lacvr1vwzPU/6zEHFGK5YOTstl2MQYMZBuKmSW3HMuEwsq1v4meK5Do4lizxyd/hi25rCZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.9", + "@typescript-eslint/types": "^8.67.0", + "comment-parser": "1.4.8", + "esquery": "^1.7.0", + "jsdoc-type-pratt-parser": "~9.1.1" + }, + "engines": { + "node": "^22.22.2 || >=24.15.0" + } + }, + "node_modules/@es-joy/jsdoccomment/node_modules/@typescript-eslint/types": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.67.0.tgz", + "integrity": "sha512-sBtgslww8nsMYUjhdPBiSyUqSzT8uR6g93A2QXnQC8+cGdjz0CyaOdqHDRJb1AtORbZCNUJBBeFA/tNR2uQmww==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@es-joy/resolve.exports": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@es-joy/resolve.exports/-/resolve.exports-1.2.0.tgz", + "integrity": "sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", @@ -1188,6 +1230,19 @@ "dev": true, "license": "MIT" }, + "node_modules/@sindresorhus/base62": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/base62/-/base62-1.0.0.tgz", + "integrity": "sha512-TeheYy0ILzBEI/CO55CP6zJCSdSWeRtGnHy8U8dWSUH4I68iqTsy7HkMktR4xakThc9jotkPQUXT4ITdbV7cHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/merge-streams": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", @@ -1710,9 +1765,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1727,9 +1779,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1744,9 +1793,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1761,9 +1807,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1778,9 +1821,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1795,9 +1835,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1812,9 +1849,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1829,9 +1863,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1846,9 +1877,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1863,9 +1891,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2123,6 +2148,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/are-docs-informative": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.1.1.tgz", + "integrity": "sha512-sqRsNQBwbKLRX0jV5Cu5uzmtflf892n4Vukz7T659ebL4pz3mpOqCMU7lxMoBTFwnp10E3YB5ZcyHM41W5bcDA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2923,6 +2958,16 @@ "node": ">=16" } }, + "node_modules/comment-parser": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.8.tgz", + "integrity": "sha512-rKZTGo4fzKYna8UcL0isTg5wkBNla7bxTypLwZQXjIdi++IdP1OJ41rI5Mti3/jltkPujbu4i9LIARYA+zpotQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/common-path-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", @@ -3918,6 +3963,79 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-jsdoc": { + "version": "64.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-64.1.0.tgz", + "integrity": "sha512-UyAR/zVWn1jgIM/7eDMeLHuqLVtqKtamNVE0M7mdcZtFkWdYlNvDVDzyCCcURmLe66JpTZkMM3ZM3zjiVvIByA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@es-joy/jsdoccomment": "~0.95.0", + "@es-joy/resolve.exports": "1.2.0", + "are-docs-informative": "^0.1.1", + "comment-parser": "1.4.8", + "debug": "^4.4.3", + "escape-string-regexp": "^5.0.0", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "html-entities": "^2.6.0", + "object-deep-merge": "^2.0.1", + "parse-imports-exports": "^0.2.4", + "semver": "^7.8.5", + "spdx-expression-parse": "^5.0.0", + "to-valid-identifier": "^1.0.0" + }, + "engines": { + "node": "^22.22.2 || >=24.15.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-n": { "version": "17.24.0", "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.24.0.tgz", @@ -5165,6 +5283,23 @@ "node": ">= 6" } }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -6059,6 +6194,19 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-9.1.1.tgz", + "integrity": "sha512-kojSbQb9iQM2bk2PmHiKa3reG0U4v2gN9U8D8+eCQq+4KM5ZXBUyBVeF8KmR0RiwqyrW4+uVWYWTOLnpsavnkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.9" + }, + "engines": { + "node": "^22.22.2 || >=24.15.0" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -7168,6 +7316,13 @@ "node": ">=0.10.0" } }, + "node_modules/object-deep-merge": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.1.tgz", + "integrity": "sha512-aKttDKcU3pyZqKcCkDhsMn70WmZFG2JGDQLP9EcLyTSIFQRCPWLAmBZRLJnrVUrhPG1jETEEbfdgbNtJf1LyMg==", + "dev": true, + "license": "MIT" + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -7430,6 +7585,16 @@ "node": ">=6" } }, + "node_modules/parse-imports-exports": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz", + "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-statements": "1.0.11" + } + }, "node_modules/parse-ms": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", @@ -7443,6 +7608,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-statements": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz", + "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==", + "dev": true, + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7936,6 +8108,19 @@ "license": "MIT", "peer": true }, + "node_modules/reserved-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/reserved-identifiers/-/reserved-identifiers-1.2.0.tgz", + "integrity": "sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/resolve": { "version": "2.0.0-next.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", @@ -8377,6 +8562,31 @@ "node": ">=0.10.0" } }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-5.0.0.tgz", + "integrity": "sha512-vngmw3Rgn+o2arXNbnZaj5UtOEBuWBfvaI+Wc8GFfykIhA5/vdK9/Sp/XkLv63dykz2rxKDvKEHupF5P0FORcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -8846,6 +9056,23 @@ "node": ">=8.0" } }, + "node_modules/to-valid-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-valid-identifier/-/to-valid-identifier-1.0.0.tgz", + "integrity": "sha512-41wJyvKep3yT2tyPqX/4blcfybknGB4D+oETKLs7Q76UiPqRpUJK3hr1nxelyYO0PHKVzJwlu0aCeEAsGI6rpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/base62": "^1.0.0", + "reserved-identifiers": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", diff --git a/package.json b/package.json index 4b54f9d6..066735cc 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "eslint": "^9.31.0", "eslint-import-resolver-typescript": "^4.4.5", "eslint-plugin-import": "^2.32.0", + "eslint-plugin-jsdoc": "^64.1.0", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unused-imports": "^4.1.4", "execa": "^10.0.0", From ac672f9307bcbb1f5fa457aa57ec61f6ddf8b6a6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 08:00:05 +0000 Subject: [PATCH 2/4] docs: Document the handwritten public API Add JSDoc to every public export reachable from the package entrypoint: options and their type guards, error classes and their properties, SeamHttpRequest, SeamPaginator, token predicates, and getOpenapiSchema. Also export ResolveActionAttemptOptions, SucceededActionAttempt, and FailedActionAttempt, which already appear in public type signatures (waitForActionAttempt and SeamActionAttemptFailedError) but were not re-exported, leaving TypeDoc unable to link them. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XQyDWeGYQyCDEJ1rZ8J1iB --- src/index.ts | 5 ++ src/lib/auth.ts | 22 +++++ src/lib/error-interceptor.ts | 6 ++ src/lib/index.ts | 3 + src/lib/openapi.ts | 6 ++ src/lib/options.ts | 137 ++++++++++++++++++++++++++++++ src/lib/request-options.ts | 13 +++ src/lib/resolve-action-attempt.ts | 51 +++++++++++ src/lib/seam-http-error.ts | 51 +++++++++++ src/lib/seam-http-request.ts | 58 +++++++++++++ src/lib/seam-paginator.ts | 39 +++++++++ src/lib/token.ts | 24 ++++++ 12 files changed, 415 insertions(+) diff --git a/src/index.ts b/src/index.ts index 9ebc7c8e..93a8f447 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,7 @@ +/** + * JavaScript HTTP client for the Seam API written in TypeScript. + * + * @packageDocumentation + */ export * from './lib/index.js' export * from '@seamapi/url-search-params-serializer' diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 183aa458..1bef961b 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -33,6 +33,13 @@ type Options = | SeamHttpWithoutWorkspaceOptions | (SeamHttpOptions & { publishableKey?: string }) +/** + * Returns the HTTP headers used to authenticate with the Seam API + * for the given options. + * + * @throws {@link SeamHttpInvalidOptionsError} if no authentication option is set. + * @throws {@link SeamHttpInvalidTokenError} if a token has an unexpected format. + */ export const getAuthHeaders = (options: Options): Headers => { if ('publishableKey' in options && options.publishableKey != null) { return getAuthHeadersForPublishableKey(options.publishableKey) @@ -109,6 +116,12 @@ const getAuthHeadersForApiKey = ({ } } +/** + * Returns the HTTP headers used to authenticate with the Seam API + * using a client session token. + * + * @throws {@link SeamHttpInvalidTokenError} if the token has an unexpected format. + */ export const getAuthHeadersForClientSessionToken = ({ clientSessionToken, }: SeamHttpOptionsWithClientSessionToken): Headers => { @@ -248,6 +261,10 @@ const getAuthHeadersForPublishableKey = (publishableKey: string): Headers => { } } +/** + * Error thrown when SeamHttp receives a token with an unexpected format, + * e.g., a client session token passed as the apiKey option. + */ export class SeamHttpInvalidTokenError extends Error { constructor(message: string) { super(`SeamHttp received an invalid token: ${message}`) @@ -255,6 +272,11 @@ export class SeamHttpInvalidTokenError extends Error { } } +/** + * Logs a warning to the console when the user identifier key is an email address. + * An email is common knowledge or easily guessed, + * so it is an insecure user identifier key. + */ export const warnOnInsecureuserIdentifierKey = ( userIdentifierKey: string, ): void => { diff --git a/src/lib/error-interceptor.ts b/src/lib/error-interceptor.ts index ec297709..55ab80be 100644 --- a/src/lib/error-interceptor.ts +++ b/src/lib/error-interceptor.ts @@ -7,6 +7,12 @@ import { SeamHttpUnauthorizedError, } from './seam-http-error.js' +/** + * Axios response interceptor that converts errors from the Seam API + * into the corresponding {@link SeamHttpApiError}, + * e.g., {@link SeamHttpUnauthorizedError} or {@link SeamHttpInvalidInputError}. + * Rethrows non-Axios errors and errors without a Seam API error response unchanged. + */ export const errorInterceptor = async (err: unknown): Promise => { if (!isAxiosError(err)) throw err diff --git a/src/lib/index.ts b/src/lib/index.ts index 210bbaf1..bfae045a 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -3,12 +3,15 @@ export * from './error-interceptor.js' export * from './openapi.js' export * from './options.js' export { + type FailedActionAttempt, isSeamActionAttemptError, isSeamActionAttemptFailedError, isSeamActionAttemptTimeoutError, + type ResolveActionAttemptOptions, SeamActionAttemptError, SeamActionAttemptFailedError, SeamActionAttemptTimeoutError, + type SucceededActionAttempt, } from './resolve-action-attempt.js' export * from './resources/index.js' export * from './routes/index.js' diff --git a/src/lib/openapi.ts b/src/lib/openapi.ts index 527d59d9..d9ebd64a 100644 --- a/src/lib/openapi.ts +++ b/src/lib/openapi.ts @@ -1,6 +1,12 @@ import { createClient } from './client.js' import { defaultEndpoint, sdkHeaders } from './parse-options.js' +/** + * Fetches the OpenAPI schema describing the Seam API. + * + * @param endpoint - The Seam API endpoint to fetch the schema from. + * @returns The OpenAPI schema as parsed JSON. + */ export const getOpenapiSchema = async ( endpoint = defaultEndpoint, ): Promise => { diff --git a/src/lib/options.ts b/src/lib/options.ts index a91807f9..ae45cdfc 100644 --- a/src/lib/options.ts +++ b/src/lib/options.ts @@ -6,12 +6,19 @@ import { export type { SeamHttpRequestOptions } from './request-options.js' +/** + * Options for creating a SeamHttpWithoutWorkspace client, + * which is not scoped to a single workspace. + */ export type SeamHttpWithoutWorkspaceOptions = | SeamHttpWithoutWorkspaceOptionsFromEnv | SeamHttpWithoutWorkspaceOptionsWithClient | SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken | SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken +/** + * Options for creating a SeamHttp client. + */ export type SeamHttpOptions = | SeamHttpOptionsFromEnv | SeamHttpOptionsWithClient @@ -21,28 +28,68 @@ export type SeamHttpOptions = | SeamHttpOptionsWithPersonalAccessToken interface SeamHttpCommonOptions extends ClientOptions, SeamHttpRequestOptions { + /** + * The Seam API endpoint, e.g., `https://connect.getseam.com`. + * Defaults to the SEAM_ENDPOINT or SEAM_API_URL environment variable, if set. + */ endpoint?: string } +/** + * Options for creating a SeamHttp client with `SeamHttp.fromPublishableKey`. + */ export interface SeamHttpFromPublishableKeyOptions extends SeamHttpCommonOptions {} +/** + * Options for creating a SeamHttp client that reads its configuration + * from the environment, e.g., the SEAM_API_KEY environment variable. + */ export interface SeamHttpOptionsFromEnv extends SeamHttpCommonOptions {} +/** + * Options for creating a SeamHttpWithoutWorkspace client that reads + * its configuration from the environment, + * e.g., the SEAM_PERSONAL_ACCESS_TOKEN environment variable. + */ export interface SeamHttpWithoutWorkspaceOptionsFromEnv extends SeamHttpCommonOptions {} +/** + * Options for creating a SeamHttpWithoutWorkspace client from an existing client. + */ export interface SeamHttpWithoutWorkspaceOptionsWithClient extends SeamHttpCommonOptions { + /** + * The existing client to use for requests. + */ client: Client } +/** + * Returns true if the options include a client. + * + * @throws {@link SeamHttpInvalidOptionsError} if the client option + * is used with any other option. + */ export const isSeamHttpWithoutWorkspaceOptionsWithClient = ( options: SeamHttpOptions, ): options is SeamHttpWithoutWorkspaceOptionsWithClient => isSeamHttpOptionsWithClient(options) +/** + * Options for creating a SeamHttp client from an existing client. + */ export interface SeamHttpOptionsWithClient extends SeamHttpRequestOptions { + /** + * The existing client to use for requests. + */ client: Client } +/** + * Returns true if the options include a client. + * + * @throws {@link SeamHttpInvalidOptionsError} if the client option + * is used with any other option. + */ export const isSeamHttpOptionsWithClient = ( options: SeamHttpOptions, ): options is SeamHttpOptionsWithClient => { @@ -61,10 +108,22 @@ export const isSeamHttpOptionsWithClient = ( return true } +/** + * Options for creating a SeamHttp client authenticated with an API key. + */ export interface SeamHttpOptionsWithApiKey extends SeamHttpCommonOptions { + /** + * The API key to use for authentication. + */ apiKey: string } +/** + * Returns true if the options include an apiKey. + * + * @throws {@link SeamHttpInvalidOptionsError} if the apiKey option + * is used with another authentication option. + */ export const isSeamHttpOptionsWithApiKey = ( options: SeamHttpOptions, ): options is SeamHttpOptionsWithApiKey => { @@ -92,10 +151,22 @@ export const isSeamHttpOptionsWithApiKey = ( return true } +/** + * Options for creating a SeamHttp client authenticated with a client session token. + */ export interface SeamHttpOptionsWithClientSessionToken extends SeamHttpCommonOptions { + /** + * The client session token to use for authentication. + */ clientSessionToken: string } +/** + * Returns true if the options include a clientSessionToken. + * + * @throws {@link SeamHttpInvalidOptionsError} if the clientSessionToken option + * is used with another authentication option. + */ export const isSeamHttpOptionsWithClientSessionToken = ( options: SeamHttpOptions, ): options is SeamHttpOptionsWithClientSessionToken => { @@ -123,10 +194,23 @@ export const isSeamHttpOptionsWithClientSessionToken = ( return true } +/** + * Options for creating a SeamHttpWithoutWorkspace client + * authenticated with a console session token. + */ export interface SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken extends SeamHttpCommonOptions { + /** + * The console session token to use for authentication. + */ consoleSessionToken: string } +/** + * Returns true if the options include a consoleSessionToken. + * + * @throws {@link SeamHttpInvalidOptionsError} if the consoleSessionToken option + * is used with another authentication option. + */ export const isSeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken = ( options: SeamHttpOptions, ): options is SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken => { @@ -154,11 +238,28 @@ export const isSeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken = ( return true } +/** + * Options for creating a SeamHttp client + * authenticated with a console session token and scoped to a workspace. + */ export interface SeamHttpOptionsWithConsoleSessionToken extends SeamHttpCommonOptions { + /** + * The console session token to use for authentication. + */ consoleSessionToken: string + + /** + * The ID of the workspace to scope requests to. + */ workspaceId: string } +/** + * Returns true if the options include a consoleSessionToken and a workspaceId. + * + * @throws {@link SeamHttpInvalidOptionsError} if the consoleSessionToken option + * is used with another authentication option or without the workspaceId option. + */ export const isSeamHttpOptionsWithConsoleSessionToken = ( options: SeamHttpOptions, ): options is SeamHttpOptionsWithConsoleSessionToken => { @@ -175,10 +276,23 @@ export const isSeamHttpOptionsWithConsoleSessionToken = ( return true } +/** + * Options for creating a SeamHttpWithoutWorkspace client + * authenticated with a personal access token. + */ export interface SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken extends SeamHttpCommonOptions { + /** + * The personal access token to use for authentication. + */ personalAccessToken: string } +/** + * Returns true if the options include a personalAccessToken. + * + * @throws {@link SeamHttpInvalidOptionsError} if the personalAccessToken option + * is used with another authentication option. + */ export const isSeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken = ( options: SeamHttpOptions, ): options is SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken => { @@ -206,11 +320,28 @@ export const isSeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken = ( return true } +/** + * Options for creating a SeamHttp client + * authenticated with a personal access token and scoped to a workspace. + */ export interface SeamHttpOptionsWithPersonalAccessToken extends SeamHttpCommonOptions { + /** + * The personal access token to use for authentication. + */ personalAccessToken: string + + /** + * The ID of the workspace to scope requests to. + */ workspaceId: string } +/** + * Returns true if the options include a personalAccessToken and a workspaceId. + * + * @throws {@link SeamHttpInvalidOptionsError} if the personalAccessToken option + * is used with another authentication option or without the workspaceId option. + */ export const isSeamHttpOptionsWithPersonalAccessToken = ( options: SeamHttpOptions, ): options is SeamHttpOptionsWithPersonalAccessToken => { @@ -227,6 +358,9 @@ export const isSeamHttpOptionsWithPersonalAccessToken = ( return true } +/** + * Error thrown when a SeamHttp client is created with invalid options. + */ export class SeamHttpInvalidOptionsError extends Error { constructor(message: string) { super(`SeamHttp received invalid options: ${message}`) @@ -234,6 +368,9 @@ export class SeamHttpInvalidOptionsError extends Error { } } +/** + * Error thrown when a SeamHttpWithoutWorkspace client is created with invalid options. + */ export class SeamHttpWithoutWorkspaceInvalidOptionsError extends Error { constructor(message: string) { super(`SeamHttpWithoutWorkspace received invalid options: ${message}`) diff --git a/src/lib/request-options.ts b/src/lib/request-options.ts index e403a4f7..0fad41d8 100644 --- a/src/lib/request-options.ts +++ b/src/lib/request-options.ts @@ -1,9 +1,22 @@ import type { ResolveActionAttemptOptions } from './resolve-action-attempt.js' +/** + * Options for how a {@link SeamHttpRequest} is executed. + */ export interface SeamHttpRequestOptions { + /** + * Controls whether to wait for the action attempt to resolve + * when a request returns an action attempt. + * Pass a boolean to toggle waiting, + * or {@link ResolveActionAttemptOptions} to also configure + * the timeout and polling interval. + */ waitForActionAttempt?: boolean | ResolveActionAttemptOptions } +/** + * Returns true if the key is the name of a {@link SeamHttpRequestOptions} property. + */ export const isSeamHttpRequestOption = ( key: string, ): key is keyof SeamHttpRequestOptions => { diff --git a/src/lib/resolve-action-attempt.ts b/src/lib/resolve-action-attempt.ts index 3064d511..d063276f 100644 --- a/src/lib/resolve-action-attempt.ts +++ b/src/lib/resolve-action-attempt.ts @@ -1,14 +1,35 @@ import type { ActionAttempt } from './resources/action-attempt.js' +/** + * Client used to poll action attempts by id, e.g., `SeamHttpActionAttempts`. + */ export interface ActionAttemptsClient { get(parameters: { action_attempt_id: string }): PromiseLike } +/** + * Options for waiting until an action attempt resolves. + */ export interface ResolveActionAttemptOptions { + /** + * Maximum time in milliseconds to wait for the action attempt to resolve. + */ timeout?: number + + /** + * Time in milliseconds to wait between polls of the action attempt. + */ pollingInterval?: number } +/** + * Polls a pending action attempt until it succeeds, fails, or times out. + * + * @returns The succeeded action attempt. + * @throws {@link SeamActionAttemptFailedError} if the action attempt fails. + * @throws {@link SeamActionAttemptTimeoutError} if the action attempt + * does not resolve within the timeout. + */ export const resolveActionAttempt = async ( actionAttempt: T, actionAttempts: ActionAttemptsClient, @@ -59,13 +80,22 @@ const pollActionAttempt = async ( ) } +/** + * Returns true if the error is a {@link SeamActionAttemptError}. + */ export const isSeamActionAttemptError = ( error: unknown, ): error is SeamActionAttemptError => { return error instanceof SeamActionAttemptError } +/** + * Error relating to an action attempt. + */ export class SeamActionAttemptError extends Error { + /** + * The action attempt that caused this error. + */ actionAttempt: T constructor(message: string, actionAttempt: T) { @@ -75,15 +105,24 @@ export class SeamActionAttemptError extends Error { } } +/** + * Returns true if the error is a {@link SeamActionAttemptFailedError}. + */ export const isSeamActionAttemptFailedError = ( error: unknown, ): error is SeamActionAttemptFailedError => { return error instanceof SeamActionAttemptFailedError } +/** + * Error thrown when an action attempt fails. + */ export class SeamActionAttemptFailedError< T extends ActionAttempt, > extends SeamActionAttemptError { + /** + * Error type returned by the Seam API for the failed action attempt. + */ code: string constructor(actionAttempt: FailedActionAttempt) { @@ -93,12 +132,18 @@ export class SeamActionAttemptFailedError< } } +/** + * Returns true if the error is a {@link SeamActionAttemptTimeoutError}. + */ export const isSeamActionAttemptTimeoutError = ( error: unknown, ): error is SeamActionAttemptTimeoutError => { return error instanceof SeamActionAttemptTimeoutError } +/** + * Error thrown when an action attempt does not resolve within the timeout. + */ export class SeamActionAttemptTimeoutError< T extends ActionAttempt, > extends SeamActionAttemptError { @@ -120,10 +165,16 @@ const isFailedActionAttempt = ( actionAttempt: T, ): actionAttempt is FailedActionAttempt => actionAttempt.status === 'error' +/** + * An action attempt that has succeeded. + */ export type SucceededActionAttempt = T & { status: 'success' } +/** + * An action attempt that has failed. + */ export type FailedActionAttempt = T & { status: 'error' } diff --git a/src/lib/seam-http-error.ts b/src/lib/seam-http-error.ts index 7e8dfe04..d2c0fb12 100644 --- a/src/lib/seam-http-error.ts +++ b/src/lib/seam-http-error.ts @@ -1,9 +1,28 @@ import type { ApiError } from './api-error-types.js' +/** + * Error thrown when the Seam API returns an error response. + */ export class SeamHttpApiError extends Error { + /** + * Error type returned by the Seam API, e.g., `invalid_input`. + */ code: string + + /** + * HTTP status code of the error response. + */ statusCode: number + + /** + * Unique identifier of the request that failed. + * Provide this to Seam support when reporting an issue. + */ requestId: string + + /** + * Additional error-specific data returned by the Seam API, if any. + */ data?: unknown constructor(error: ApiError, statusCode: number, requestId: string) { @@ -17,14 +36,27 @@ export class SeamHttpApiError extends Error { } } +/** + * Returns true if the error is a {@link SeamHttpApiError}. + */ export const isSeamHttpApiError = ( error: unknown, ): error is SeamHttpApiError => { return error instanceof SeamHttpApiError } +/** + * Error thrown when the Seam API returns a 401 Unauthorized error response. + */ export class SeamHttpUnauthorizedError extends SeamHttpApiError { + /** + * Error type returned by the Seam API, always `unauthorized`. + */ override code: 'unauthorized' + + /** + * HTTP status code of the error response, always 401. + */ override statusCode: 401 constructor(requestId: string) { @@ -38,14 +70,24 @@ export class SeamHttpUnauthorizedError extends SeamHttpApiError { } } +/** + * Returns true if the error is a {@link SeamHttpUnauthorizedError}. + */ export const isSeamHttpUnauthorizedError = ( error: unknown, ): error is SeamHttpUnauthorizedError => { return error instanceof SeamHttpUnauthorizedError } +/** + * Error thrown when the Seam API returns an `invalid_input` error response. + */ export class SeamHttpInvalidInputError extends SeamHttpApiError { + /** + * Error type returned by the Seam API, always `invalid_input`. + */ override code: 'invalid_input' + readonly #validationErrors: NonNullable constructor(error: ApiError, statusCode: number, requestId: string) { @@ -55,11 +97,20 @@ export class SeamHttpInvalidInputError extends SeamHttpApiError { this.#validationErrors = error.validation_errors ?? {} } + /** + * Returns the validation error messages for the request parameter, + * or an empty array if the parameter had no validation errors. + * + * @param paramName - Name of the request parameter. + */ getValidationErrorMessages(paramName: string): string[] { return this.#validationErrors[paramName]?._errors ?? [] } } +/** + * Returns true if the error is a {@link SeamHttpInvalidInputError}. + */ export const isSeamHttpInvalidInputError = ( error: unknown, ): error is SeamHttpInvalidInputError => { diff --git a/src/lib/seam-http-request.ts b/src/lib/seam-http-request.ts index bd2cb388..0c00926f 100644 --- a/src/lib/seam-http-request.ts +++ b/src/lib/seam-http-request.ts @@ -24,12 +24,29 @@ interface SeamHttpRequestConfig { readonly actionAttempts?: ActionAttemptsClient } +/** + * A lazy request to the Seam API. + * + * Creating a SeamHttpRequest does not send anything over the network. + * The request is sent once `execute` is called, + * or when the request is awaited like a Promise, + * e.g., with `await`, `then`, `catch`, or `finally`. + * When the response contains an action attempt, + * awaiting the request also waits for the action attempt to resolve + * according to the `waitForActionAttempt` option. + * + * Before sending, the request may be inspected + * with `url`, `pathname`, `method`, `params`, and `body`. + */ export class SeamHttpRequest< const TResponse, const TResponseKey extends keyof TResponse | undefined, > implements Promise< TResponseKey extends keyof TResponse ? TResponse[TResponseKey] : undefined > { + /** + * String tag used by `Object.prototype.toString`, always `SeamHttpRequest`. + */ readonly [Symbol.toStringTag]: string = 'SeamHttpRequest' readonly #parent: SeamHttpRequestParent @@ -43,10 +60,17 @@ export class SeamHttpRequest< this.#config = config } + /** + * The key of the API response object containing the response data, + * or undefined if the endpoint returns an empty response. + */ public get responseKey(): TResponseKey { return this.#config.responseKey } + /** + * The full request URL including any serialized query parameters. + */ public get url(): URL { const { client } = this.#parent @@ -65,24 +89,42 @@ export class SeamHttpRequest< return new URL(`${origin}${path}`) } + /** + * The request pathname, e.g., `/devices/get`. + */ public get pathname(): string { return this.#config.pathname.startsWith('/') ? this.#config.pathname : `/${this.#config.pathname}` } + /** + * The HTTP request method. + */ public get method(): Method { return this.#config.method } + /** + * The query parameters sent with the request, if any. + */ public get params(): undefined | Record { return this.#config.params } + /** + * The body sent with the request, if any. + */ public get body(): unknown { return this.#config.body } + /** + * Sends the request and returns the response data. + * If the response contains an action attempt, + * waits for the action attempt to resolve + * according to the `waitForActionAttempt` option. + */ async execute(): Promise< TResponseKey extends keyof TResponse ? TResponse[TResponseKey] : undefined > { @@ -121,6 +163,10 @@ export class SeamHttpRequest< return data } + /** + * Sends the request and returns the entire response body + * without waiting for any action attempt to resolve. + */ async fetchResponse(): Promise { const { client } = this.#parent const response = await client.request({ @@ -132,6 +178,10 @@ export class SeamHttpRequest< return response.data as unknown as TResponse } + /** + * Executes the request and resolves with the response data. + * Enables awaiting a SeamHttpRequest like a Promise. + */ async then< TResult1 = TResponseKey extends keyof TResponse ? TResponse[TResponseKey] @@ -154,6 +204,10 @@ export class SeamHttpRequest< return await this.execute().then(onfulfilled, onrejected) } + /** + * Executes the request and handles any rejection with `onrejected`. + * Enables awaiting a SeamHttpRequest like a Promise. + */ async catch( onrejected?: ((reason: unknown) => TResult | PromiseLike) | null | undefined, @@ -166,6 +220,10 @@ export class SeamHttpRequest< return await this.execute().catch(onrejected) } + /** + * Executes the request and calls `onfinally` once the request settles. + * Enables awaiting a SeamHttpRequest like a Promise. + */ async finally( onfinally?: (() => void) | null | undefined, ): Promise< diff --git a/src/lib/seam-paginator.ts b/src/lib/seam-paginator.ts index 5d60b5a1..8082dc83 100644 --- a/src/lib/seam-paginator.ts +++ b/src/lib/seam-paginator.ts @@ -9,14 +9,37 @@ interface SeamPaginatorParent { declare const $brand: unique symbol +/** + * Opaque cursor identifying a page of results returned by the Seam API. + */ export type SeamPageCursor = string & { [$brand]: 'SeamPageCursor' } interface Pagination { + /** + * Indicates whether there is another page of results after this one. + */ readonly hasNextPage: boolean + + /** + * Cursor to fetch the next page of results, or null if there is no next page. + */ readonly nextPageCursor: SeamPageCursor | null + + /** + * URL to fetch the next page of results, or null if there is no next page. + */ readonly nextPageUrl: string | null } +/** + * Iterates over paginated results from Seam API list endpoints. + * + * Create a SeamPaginator with the client's `createPaginator` method. + * Fetch pages manually with `firstPage` and `nextPage`, + * iterate over pages with `for await`, + * iterate over items across all pages with `flatten`, + * or collect every item into a single array with `flattenToArray`. + */ export class SeamPaginator< const TResponse, const TResponseKey extends keyof TResponse, @@ -37,12 +60,19 @@ export class SeamPaginator< this.#request = request } + /** + * Fetches the first page of results along with the pagination state. + */ async firstPage(): Promise< [EnsureReadonlyArray, Pagination] > { return await this.#fetch() } + /** + * Fetches the next page of results + * using the nextPageCursor returned with a previous page. + */ async nextPage( nextPageCursor: Pagination['nextPageCursor'], ): Promise<[EnsureReadonlyArray, Pagination]> { @@ -104,6 +134,9 @@ export class SeamPaginator< ] as const } + /** + * Fetches every page and returns all items in a single array. + */ async flattenToArray(): Promise< EnsureReadonlyArray > { @@ -117,6 +150,9 @@ export class SeamPaginator< return items as EnsureReadonlyArray } + /** + * Yields each item across all pages, fetching the next page as needed. + */ async *flatten(): AsyncGenerator< EnsureReadonlyArray > { @@ -132,6 +168,9 @@ export class SeamPaginator< } } + /** + * Yields each page of items, fetching the next page as needed. + */ async *[Symbol.asyncIterator](): AsyncGenerator< EnsureReadonlyArray > { diff --git a/src/lib/token.ts b/src/lib/token.ts index 313ce97e..26000240 100644 --- a/src/lib/token.ts +++ b/src/lib/token.ts @@ -8,14 +8,26 @@ export const clientSessionTokenPrefix = 'seam_cst' export const publishableKeyTokenPrefix = 'seam_pk' +/** + * Returns true if the token is a Seam access token. + */ export const isAccessToken = (token: string): boolean => token.startsWith(accessTokenPrefix) +/** + * Returns true if the token is a JSON Web Token (JWT). + */ export const isJwt = (token: string): boolean => token.startsWith(jwtPrefix) +/** + * Returns true if the token is any type of Seam token. + */ export const isSeamToken = (token: string): boolean => token.startsWith(tokenPrefix) +/** + * Returns true if the token is a Seam API key. + */ export const isApiKey = (token: string): boolean => !isClientSessionToken(token) && !isJwt(token) && @@ -23,13 +35,25 @@ export const isApiKey = (token: string): boolean => !isPublishableKey(token) && isSeamToken(token) +/** + * Returns true if the token is a Seam client session token. + */ export const isClientSessionToken = (token: string): boolean => token.startsWith(clientSessionTokenPrefix) +/** + * Returns true if the token is a Seam publishable key. + */ export const isPublishableKey = (token: string): boolean => token.startsWith(publishableKeyTokenPrefix) +/** + * Returns true if the token may be used as a console session token. + */ export const isConsoleSessionToken = (token: string): boolean => isJwt(token) +/** + * Returns true if the token may be used as a personal access token. + */ export const isPersonalAccessToken = (token: string): boolean => isAccessToken(token) From 6d38e5de07605267746715d2519edf0ae0ab0902 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 08:05:40 +0000 Subject: [PATCH 3/4] docs: Generate JSDoc for all public exports Update the codegen templates to document every generated export: route class declarations, the client and defaults properties, static factory methods, sub-route getters, per-endpoint Parameters, Response, Request, and Options types, and the endpoint path types. Add a fallback description for resource types missing a description in the blueprint (DeviceProvider and SeamEvent). Expose routePath in the route and subroute layout contexts so templates can name the route they document. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XQyDWeGYQyCDEJ1rZ8J1iB --- codegen/layouts/endpoints.hbs | 13 ++ .../partials/route-class-endpoint-export.hbs | 14 ++ .../route-class-methods-without-workspace.hbs | 18 ++ .../layouts/partials/route-class-methods.hbs | 38 ++++ .../layouts/partials/route-class-subroute.hbs | 3 + codegen/layouts/resource.hbs | 12 + codegen/layouts/route.hbs | 14 ++ codegen/layouts/without-workspace.hbs | 10 + codegen/lib/layouts/route.ts | 4 + src/lib/resources/acs-system.ts | 1 + src/lib/resources/client-session.ts | 1 + src/lib/resources/connected-account.ts | 1 + src/lib/resources/device-provider.ts | 3 + src/lib/resources/device.ts | 10 + src/lib/resources/event.ts | 3 + src/lib/resources/unmanaged-device.ts | 4 + src/lib/routes/access-codes/access-codes.ts | 157 +++++++++++++ .../routes/access-codes/simulate/simulate.ts | 52 +++++ .../access-codes/unmanaged/unmanaged.ts | 96 ++++++++ src/lib/routes/access-grants/access-grants.ts | 121 ++++++++++ .../access-grants/unmanaged/unmanaged.ts | 74 +++++++ .../routes/access-methods/access-methods.ts | 121 ++++++++++ .../access-methods/unmanaged/unmanaged.ts | 63 ++++++ .../routes/acs/access-groups/access-groups.ts | 118 ++++++++++ src/lib/routes/acs/acs.ts | 59 +++++ src/lib/routes/acs/credentials/credentials.ts | 129 +++++++++++ src/lib/routes/acs/encoders/encoders.ts | 99 +++++++++ .../routes/acs/encoders/simulate/simulate.ts | 85 +++++++ src/lib/routes/acs/entrances/entrances.ts | 96 ++++++++ src/lib/routes/acs/systems/systems.ts | 85 +++++++ src/lib/routes/acs/users/users.ts | 162 ++++++++++++++ .../routes/action-attempts/action-attempts.ts | 63 ++++++ .../routes/client-sessions/client-sessions.ts | 121 ++++++++++ .../connect-webviews/connect-webviews.ts | 85 +++++++ .../connected-accounts/connected-accounts.ts | 99 +++++++++ .../connected-accounts/simulate/simulate.ts | 52 +++++ src/lib/routes/customers/customers.ts | 74 +++++++ src/lib/routes/devices/devices.ts | 102 +++++++++ src/lib/routes/devices/simulate/simulate.ts | 107 +++++++++ src/lib/routes/devices/unmanaged/unmanaged.ts | 74 +++++++ src/lib/routes/events/events.ts | 63 ++++++ src/lib/routes/instant-keys/instant-keys.ts | 74 +++++++ src/lib/routes/locks/locks.ts | 100 +++++++++ src/lib/routes/locks/simulate/simulate.ts | 63 ++++++ src/lib/routes/noise-sensors/noise-sensors.ts | 58 +++++ .../noise-thresholds/noise-thresholds.ts | 96 ++++++++ .../routes/noise-sensors/simulate/simulate.ts | 52 +++++ src/lib/routes/phones/phones.ts | 77 +++++++ src/lib/routes/phones/simulate/simulate.ts | 52 +++++ .../seam-http-endpoints-without-workspace.ts | 28 +++ src/lib/routes/seam-http-endpoints.ts | 52 +++++ src/lib/routes/seam-http-without-workspace.ts | 28 +++ src/lib/routes/seam-http.ts | 106 +++++++++ src/lib/routes/spaces/spaces.ts | 173 +++++++++++++++ .../daily-programs/daily-programs.ts | 74 +++++++ .../routes/thermostats/schedules/schedules.ts | 96 ++++++++ .../routes/thermostats/simulate/simulate.ts | 63 ++++++ src/lib/routes/thermostats/thermostats.ts | 207 ++++++++++++++++++ .../user-identities/unmanaged/unmanaged.ts | 74 +++++++ .../routes/user-identities/user-identities.ts | 198 +++++++++++++++++ src/lib/routes/webhooks/webhooks.ts | 96 ++++++++ src/lib/routes/workspaces/workspaces.ts | 97 ++++++++ 62 files changed, 4370 insertions(+) diff --git a/codegen/layouts/endpoints.hbs b/codegen/layouts/endpoints.hbs index 319fe2a8..a618d409 100644 --- a/codegen/layouts/endpoints.hbs +++ b/codegen/layouts/endpoints.hbs @@ -15,6 +15,10 @@ import { } from './{{fileName}}' {{/each}} +/** + * HTTP client for the Seam API{{#if withoutWorkspace}} not scoped to a workspace{{/if}} + * with endpoints keyed by their path, e.g., `seam.get['/devices/list']()`. + */ export class {{className}} { {{#if withoutWorkspace}} {{> route-class-methods-without-workspace }} @@ -38,13 +42,22 @@ export class {{className}} { } {{#if endpointReadPaths.length}} +/** + * Paths of the Seam API query endpoints{{#if withoutWorkspace}} available without a workspace{{/if}}. + */ export type {{typeNamePrefix}}QueryPaths = {{#each endpointReadPaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} {{#if endpointPaginatedPaths.length}} +/** + * Paths of the Seam API query endpoints{{#if withoutWorkspace}} available without a workspace{{/if}} that support pagination. + */ export type {{typeNamePrefix}}PaginatedQueryPaths = {{#each endpointPaginatedPaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} {{#if endpointWritePaths.length}} +/** + * Paths of the Seam API mutation endpoints{{#if withoutWorkspace}} available without a workspace{{/if}}. + */ export type {{typeNamePrefix}}MutationPaths = {{#each endpointWritePaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index cf0f766a..5927f96e 100644 --- a/codegen/layouts/partials/route-class-endpoint-export.hbs +++ b/codegen/layouts/partials/route-class-endpoint-export.hbs @@ -1,15 +1,29 @@ +/** + * Parameters for `{{className}}.{{methodName}}`. + */ export type {{parametersTypeName}} = {{> request-object parameters=parameters}} /** + * Response from `{{className}}.{{methodName}}`. + * * @deprecated Use {{requestTypeName}} instead. */ export type {{responseTypeName}} = {{#if returnsVoid}}void{{else}}{ {{json responseKey}}: {{#if responseIsList}}Array<{{responseResourceTypeName}}>{{else}}{{responseResourceTypeName}}{{/if}} }{{/if}} +/** + * Request returned by `{{className}}.{{methodName}}`. + */ export type {{requestTypeName}} = SeamHttpRequest<{{#if returnsVoid}}void, undefined{{else}}{{responseTypeName}}, '{{responseKey}}'{{/if}}> {{#if returnsActionAttempt}} +/** + * Options for `{{className}}.{{methodName}}`. + */ export type {{optionsTypeName}} = Pick {{else}} +/** + * Options for `{{className}}.{{methodName}}`. + */ export interface {{optionsTypeName}} {} {{/if}} diff --git a/codegen/layouts/partials/route-class-methods-without-workspace.hbs b/codegen/layouts/partials/route-class-methods-without-workspace.hbs index 9184cfde..42b8530e 100644 --- a/codegen/layouts/partials/route-class-methods-without-workspace.hbs +++ b/codegen/layouts/partials/route-class-methods-without-workspace.hbs @@ -1,4 +1,11 @@ +/** + * The client used to make HTTP requests to the Seam API. + */ client: Client + +/** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { @@ -7,6 +14,9 @@ constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { this.defaults = limitToSeamHttpRequestOptions(opts) } +/** + * Creates a new {{className}} from an existing HTTP client. + */ static fromClient( client: SeamHttpWithoutWorkspaceOptionsWithClient['client'], options: Omit = {}, @@ -18,6 +28,10 @@ static fromClient( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with a console session token + * and not scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken['consoleSessionToken'], options: Omit< @@ -38,6 +52,10 @@ static fromConsoleSessionToken( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with a personal access token + * and not scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken['personalAccessToken'], options: Omit< diff --git a/codegen/layouts/partials/route-class-methods.hbs b/codegen/layouts/partials/route-class-methods.hbs index 135b92bc..671af1ad 100644 --- a/codegen/layouts/partials/route-class-methods.hbs +++ b/codegen/layouts/partials/route-class-methods.hbs @@ -1,4 +1,11 @@ +/** + * The client used to make HTTP requests to the Seam API. + */ client: Client + +/** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -7,6 +14,9 @@ constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { this.defaults = limitToSeamHttpRequestOptions(options) } +/** + * Creates a new {{className}} from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -18,6 +28,9 @@ static fromClient( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -29,6 +42,9 @@ static fromApiKey( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -43,6 +59,11 @@ static fromClientSessionToken( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -63,6 +84,10 @@ static async fromPublishableKey( return {{className}}.fromClientSessionToken(token, options) } +/** + * Creates a new {{className}} authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -80,6 +105,10 @@ static fromConsoleSessionToken( return new {{className}}(constructorOptions) } +/** + * Creates a new {{className}} authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -97,12 +126,21 @@ static fromPersonalAccessToken( return new {{className}}(constructorOptions) } +/** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } +/** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { diff --git a/codegen/layouts/partials/route-class-subroute.hbs b/codegen/layouts/partials/route-class-subroute.hbs index 5220f635..ba42daf1 100644 --- a/codegen/layouts/partials/route-class-subroute.hbs +++ b/codegen/layouts/partials/route-class-subroute.hbs @@ -1,3 +1,6 @@ +/** + * Client for the Seam API {{routePath}} routes. + */ get {{ methodName }}(): {{ className }} { return {{ className }}.fromClient(this.client, this.defaults) } diff --git a/codegen/layouts/resource.hbs b/codegen/layouts/resource.hbs index afe4a92f..584d51aa 100644 --- a/codegen/layouts/resource.hbs +++ b/codegen/layouts/resource.hbs @@ -14,11 +14,23 @@ interface BatchResourceMap { {{/each}} } +{{#if (or (trim resources.[0].description) resources.[0].isDeprecated)}} {{> doc resources.[0]}} +{{else}} +/** + * Represents a {{typeName}} resource of the Seam API. + */ +{{/if}} export type {{typeName}} = { [K in TKey]?: Array | undefined } {{else}} +{{#if (or (trim resources.[0].description) resources.[0].isDeprecated)}} {{> doc resources.[0]}} +{{else}} +/** + * Represents a {{typeName}} resource of the Seam API. + */ +{{/if}} export type {{typeName}} = {{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} {{/if}} diff --git a/codegen/layouts/route.hbs b/codegen/layouts/route.hbs index 98a6d2ab..5141706d 100644 --- a/codegen/layouts/route.hbs +++ b/codegen/layouts/route.hbs @@ -5,6 +5,20 @@ {{> route-imports }} +{{#if routePath}} +/** + * Client for the Seam API {{routePath}} routes. + */ +{{else}} +/** + * HTTP client for the Seam API. + * + * Create a client with the constructor + * or one of the static factory methods, e.g., `fromApiKey`. + * Each Seam API route is available under its corresponding property, + * e.g., use `seam.devices.list()` to call the `/devices/list` endpoint. + */ +{{/if}} export class {{className}} { {{> route-class-methods }} diff --git a/codegen/layouts/without-workspace.hbs b/codegen/layouts/without-workspace.hbs index 927ffedf..3d7d54a4 100644 --- a/codegen/layouts/without-workspace.hbs +++ b/codegen/layouts/without-workspace.hbs @@ -7,9 +7,19 @@ import { SeamHttpWorkspaces } from 'lib/routes/workspaces/index.js' +/** + * HTTP client for the Seam API not scoped to a workspace. + * + * Use this client to list or create workspaces, + * e.g., when authenticated with a personal access token + * or console session token. + */ export class SeamHttpWithoutWorkspace { {{> route-class-methods-without-workspace }} + /** + * Client for the Seam API /workspaces routes available without a workspace. + */ get workspaces(): Pick { return SeamHttpWorkspaces.fromClient(this.client, this.defaults) } diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 4b251bd1..98d3f0fb 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -6,6 +6,7 @@ import { getResourceTypeName } from './resources.js' export interface RouteLayoutContext { className: string + routePath: string | null endpoints: EndpointLayoutContext[] subroutes: SubrouteLayoutContext[] skipClientSessionImport: boolean @@ -44,6 +45,7 @@ export interface SubrouteLayoutContext { methodName: string className: string fileName: string + routePath: string } interface ResourceTypeImport { @@ -57,6 +59,7 @@ export const setRouteLayoutContext = ( nodes: Array, ): void => { file.className = getClassName(node?.path ?? null) + file.routePath = node?.path ?? null file.skipClientSessionImport = node == null || node?.path === '/client_sessions' file.needsActionAttemptsImport = @@ -94,6 +97,7 @@ const getSubrouteLayoutContext = ( fileName: `${kebabCase(route.name)}/index.js`, methodName: camelCase(route.name), className: getClassName(route.path), + routePath: route.path, } } diff --git a/src/lib/resources/acs-system.ts b/src/lib/resources/acs-system.ts index 00336a48..16b3623a 100644 --- a/src/lib/resources/acs-system.ts +++ b/src/lib/resources/acs-system.ts @@ -31,6 +31,7 @@ export type AcsSystem = { /** * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + * * @deprecated Use `connected_account_id`. */ connected_account_ids: Array diff --git a/src/lib/resources/client-session.ts b/src/lib/resources/client-session.ts index d52099a3..5efe1147 100644 --- a/src/lib/resources/client-session.ts +++ b/src/lib/resources/client-session.ts @@ -64,6 +64,7 @@ export type ClientSession = { user_identity_id?: string | undefined /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + * * @deprecated Use `user_identity_id` instead. */ user_identity_ids: Array diff --git a/src/lib/resources/connected-account.ts b/src/lib/resources/connected-account.ts index 789f7d45..a99c3a35 100644 --- a/src/lib/resources/connected-account.ts +++ b/src/lib/resources/connected-account.ts @@ -217,6 +217,7 @@ export type ConnectedAccount = { time_zone?: string | undefined /** * User identifier associated with the connected account. + * * @deprecated Use `display_name` instead. */ user_identifier?: diff --git a/src/lib/resources/device-provider.ts b/src/lib/resources/device-provider.ts index c3c37131..5c047000 100644 --- a/src/lib/resources/device-provider.ts +++ b/src/lib/resources/device-provider.ts @@ -3,6 +3,9 @@ * Do not edit this file. */ +/** + * Represents a DeviceProvider resource of the Seam API. + */ export type DeviceProvider = { /** * Indicates whether the lock supports configuring automatic locking. diff --git a/src/lib/resources/device.ts b/src/lib/resources/device.ts index 53781964..f3743c32 100644 --- a/src/lib/resources/device.ts +++ b/src/lib/resources/device.ts @@ -560,6 +560,7 @@ export type Device = { time_zone?: string | undefined /** * Time zone of the device location. + * * @deprecated Use `time_zone` instead. */ timezone?: string | undefined @@ -680,6 +681,7 @@ export type Device = { /** * Name of the device. + * * @deprecated use device.display_name instead */ name: string @@ -690,6 +692,7 @@ export type Device = { noise_level_decibels?: number | undefined /** * Indicates whether it is currently possible to use offline access codes for the device. + * * @deprecated use device.can_program_offline_access_codes */ offline_access_codes_enabled?: boolean | undefined @@ -700,6 +703,7 @@ export type Device = { /** * Indicates whether it is currently possible to use online access codes for the device. + * * @deprecated use device.can_program_online_access_codes */ online_access_codes_enabled?: boolean | undefined @@ -1003,6 +1007,7 @@ export type Device = { | undefined /** * Site ID for a dormakaba Oracode device. + * * @deprecated Previously marked as "@DEPRECATED." */ site_id?: number | null | undefined @@ -1582,6 +1587,7 @@ export type Device = { | undefined /** * Metada for a Salto device. + * * @deprecated Use `salto_ks_metadata ` instead. */ salto_metadata?: @@ -2113,6 +2119,7 @@ export type Device = { supports_backup_access_code_pool?: boolean | undefined /** * Active [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + * * @deprecated Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead. */ active_thermostat_schedule?: @@ -2283,6 +2290,7 @@ export type Device = { 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed: boolean @@ -2384,6 +2392,7 @@ export type Device = { 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined @@ -2475,6 +2484,7 @@ export type Device = { 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined diff --git a/src/lib/resources/event.ts b/src/lib/resources/event.ts index b0f598c1..178cfcd9 100644 --- a/src/lib/resources/event.ts +++ b/src/lib/resources/event.ts @@ -3,6 +3,9 @@ * Do not edit this file. */ +/** + * Represents a SeamEvent resource of the Seam API. + */ export type SeamEvent = | { /** diff --git a/src/lib/resources/unmanaged-device.ts b/src/lib/resources/unmanaged-device.ts index 23874fc3..dbae5895 100644 --- a/src/lib/resources/unmanaged-device.ts +++ b/src/lib/resources/unmanaged-device.ts @@ -510,6 +510,7 @@ export type UnmanagedDevice = { time_zone?: string | undefined /** * Time zone of the device location. + * * @deprecated Use `time_zone` instead. */ timezone?: string | undefined @@ -608,12 +609,14 @@ export type UnmanagedDevice = { /** * Name of the device. + * * @deprecated use device.display_name instead */ name: string /** * Indicates whether it is currently possible to use offline access codes for the device. + * * @deprecated use device.can_program_offline_access_codes */ offline_access_codes_enabled?: boolean | undefined @@ -624,6 +627,7 @@ export type UnmanagedDevice = { /** * Indicates whether it is currently possible to use online access codes for the device. + * * @deprecated use device.can_program_online_access_codes */ online_access_codes_enabled?: boolean | undefined diff --git a/src/lib/routes/access-codes/access-codes.ts b/src/lib/routes/access-codes/access-codes.ts index 0ab64e75..6cba7ca3 100644 --- a/src/lib/routes/access-codes/access-codes.ts +++ b/src/lib/routes/access-codes/access-codes.ts @@ -36,8 +36,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpAccessCodesSimulate } from './simulate/index.js' import { SeamHttpAccessCodesUnmanaged } from './unmanaged/index.js' +/** + * Client for the Seam API /access_codes routes. + */ export class SeamHttpAccessCodes { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -46,6 +56,9 @@ export class SeamHttpAccessCodes { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessCodes from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -57,6 +70,9 @@ export class SeamHttpAccessCodes { return new SeamHttpAccessCodes(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodes authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -68,6 +84,9 @@ export class SeamHttpAccessCodes { return new SeamHttpAccessCodes(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodes authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -82,6 +101,11 @@ export class SeamHttpAccessCodes { return new SeamHttpAccessCodes(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodes authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpAccessCodes { return SeamHttpAccessCodes.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessCodes authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpAccessCodes { return new SeamHttpAccessCodes(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodes authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpAccessCodes { return new SeamHttpAccessCodes(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -161,10 +202,16 @@ export class SeamHttpAccessCodes { await clientSessions.get() } + /** + * Client for the Seam API /access_codes/simulate routes. + */ get simulate(): SeamHttpAccessCodesSimulate { return SeamHttpAccessCodesSimulate.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /access_codes/unmanaged routes. + */ get unmanaged(): SeamHttpAccessCodesUnmanaged { return SeamHttpAccessCodesUnmanaged.fromClient(this.client, this.defaults) } @@ -360,6 +407,9 @@ export class SeamHttpAccessCodes { } } +/** + * Parameters for `SeamHttpAccessCodes.create`. + */ export type AccessCodesCreateParameters = { /** * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. @@ -433,17 +483,28 @@ export type AccessCodesCreateParameters = { } /** + * Response from `SeamHttpAccessCodes.create`. + * * @deprecated Use AccessCodesCreateRequest instead. */ export type AccessCodesCreateResponse = { access_code: AccessCode } +/** + * Request returned by `SeamHttpAccessCodes.create`. + */ export type AccessCodesCreateRequest = SeamHttpRequest< AccessCodesCreateResponse, 'access_code' > +/** + * Options for `SeamHttpAccessCodes.create`. + */ export interface AccessCodesCreateOptions {} +/** + * Parameters for `SeamHttpAccessCodes.createMultiple`. + */ export type AccessCodesCreateMultipleParameters = { /** * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. @@ -502,19 +563,30 @@ export type AccessCodesCreateMultipleParameters = { } /** + * Response from `SeamHttpAccessCodes.createMultiple`. + * * @deprecated Use AccessCodesCreateMultipleRequest instead. */ export type AccessCodesCreateMultipleResponse = { access_codes: Array } +/** + * Request returned by `SeamHttpAccessCodes.createMultiple`. + */ export type AccessCodesCreateMultipleRequest = SeamHttpRequest< AccessCodesCreateMultipleResponse, 'access_codes' > +/** + * Options for `SeamHttpAccessCodes.createMultiple`. + */ export interface AccessCodesCreateMultipleOptions {} +/** + * Parameters for `SeamHttpAccessCodes.delete`. + */ export type AccessCodesDeleteParameters = { /** * ID of the access code that you want to delete. @@ -528,14 +600,25 @@ export type AccessCodesDeleteParameters = { } /** + * Response from `SeamHttpAccessCodes.delete`. + * * @deprecated Use AccessCodesDeleteRequest instead. */ export type AccessCodesDeleteResponse = void +/** + * Request returned by `SeamHttpAccessCodes.delete`. + */ export type AccessCodesDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessCodes.delete`. + */ export interface AccessCodesDeleteOptions {} +/** + * Parameters for `SeamHttpAccessCodes.generateCode`. + */ export type AccessCodesGenerateCodeParameters = { /** * ID of the device for which you want to generate a code. @@ -544,17 +627,28 @@ export type AccessCodesGenerateCodeParameters = { } /** + * Response from `SeamHttpAccessCodes.generateCode`. + * * @deprecated Use AccessCodesGenerateCodeRequest instead. */ export type AccessCodesGenerateCodeResponse = { generated_code: AccessCode } +/** + * Request returned by `SeamHttpAccessCodes.generateCode`. + */ export type AccessCodesGenerateCodeRequest = SeamHttpRequest< AccessCodesGenerateCodeResponse, 'generated_code' > +/** + * Options for `SeamHttpAccessCodes.generateCode`. + */ export interface AccessCodesGenerateCodeOptions {} +/** + * Parameters for `SeamHttpAccessCodes.get`. + */ export type AccessCodesGetParameters = { /** * ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. @@ -571,17 +665,28 @@ export type AccessCodesGetParameters = { } /** + * Response from `SeamHttpAccessCodes.get`. + * * @deprecated Use AccessCodesGetRequest instead. */ export type AccessCodesGetResponse = { access_code: AccessCode } +/** + * Request returned by `SeamHttpAccessCodes.get`. + */ export type AccessCodesGetRequest = SeamHttpRequest< AccessCodesGetResponse, 'access_code' > +/** + * Options for `SeamHttpAccessCodes.get`. + */ export interface AccessCodesGetOptions {} +/** + * Parameters for `SeamHttpAccessCodes.list`. + */ export type AccessCodesListParameters = { /** * IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. @@ -626,17 +731,28 @@ export type AccessCodesListParameters = { } /** + * Response from `SeamHttpAccessCodes.list`. + * * @deprecated Use AccessCodesListRequest instead. */ export type AccessCodesListResponse = { access_codes: Array } +/** + * Request returned by `SeamHttpAccessCodes.list`. + */ export type AccessCodesListRequest = SeamHttpRequest< AccessCodesListResponse, 'access_codes' > +/** + * Options for `SeamHttpAccessCodes.list`. + */ export interface AccessCodesListOptions {} +/** + * Parameters for `SeamHttpAccessCodes.pullBackupAccessCode`. + */ export type AccessCodesPullBackupAccessCodeParameters = { /** * ID of the access code for which you want to pull a backup access code. @@ -645,19 +761,30 @@ export type AccessCodesPullBackupAccessCodeParameters = { } /** + * Response from `SeamHttpAccessCodes.pullBackupAccessCode`. + * * @deprecated Use AccessCodesPullBackupAccessCodeRequest instead. */ export type AccessCodesPullBackupAccessCodeResponse = { access_code: AccessCode } +/** + * Request returned by `SeamHttpAccessCodes.pullBackupAccessCode`. + */ export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< AccessCodesPullBackupAccessCodeResponse, 'access_code' > +/** + * Options for `SeamHttpAccessCodes.pullBackupAccessCode`. + */ export interface AccessCodesPullBackupAccessCodeOptions {} +/** + * Parameters for `SeamHttpAccessCodes.reportDeviceConstraints`. + */ export type AccessCodesReportDeviceConstraintsParameters = { /** * ID of the device for which you want to report constraints. @@ -679,17 +806,28 @@ export type AccessCodesReportDeviceConstraintsParameters = { } /** + * Response from `SeamHttpAccessCodes.reportDeviceConstraints`. + * * @deprecated Use AccessCodesReportDeviceConstraintsRequest instead. */ export type AccessCodesReportDeviceConstraintsResponse = void +/** + * Request returned by `SeamHttpAccessCodes.reportDeviceConstraints`. + */ export type AccessCodesReportDeviceConstraintsRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpAccessCodes.reportDeviceConstraints`. + */ export interface AccessCodesReportDeviceConstraintsOptions {} +/** + * Parameters for `SeamHttpAccessCodes.update`. + */ export type AccessCodesUpdateParameters = { /** * ID of the access code that you want to update. @@ -771,14 +909,25 @@ export type AccessCodesUpdateParameters = { } /** + * Response from `SeamHttpAccessCodes.update`. + * * @deprecated Use AccessCodesUpdateRequest instead. */ export type AccessCodesUpdateResponse = void +/** + * Request returned by `SeamHttpAccessCodes.update`. + */ export type AccessCodesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessCodes.update`. + */ export interface AccessCodesUpdateOptions {} +/** + * Parameters for `SeamHttpAccessCodes.updateMultiple`. + */ export type AccessCodesUpdateMultipleParameters = { /** * Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. @@ -806,10 +955,18 @@ export type AccessCodesUpdateMultipleParameters = { } /** + * Response from `SeamHttpAccessCodes.updateMultiple`. + * * @deprecated Use AccessCodesUpdateMultipleRequest instead. */ export type AccessCodesUpdateMultipleResponse = void +/** + * Request returned by `SeamHttpAccessCodes.updateMultiple`. + */ export type AccessCodesUpdateMultipleRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessCodes.updateMultiple`. + */ export interface AccessCodesUpdateMultipleOptions {} diff --git a/src/lib/routes/access-codes/simulate/simulate.ts b/src/lib/routes/access-codes/simulate/simulate.ts index 8de41e69..59bc0f37 100644 --- a/src/lib/routes/access-codes/simulate/simulate.ts +++ b/src/lib/routes/access-codes/simulate/simulate.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /access_codes/simulate routes. + */ export class SeamHttpAccessCodesSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpAccessCodesSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessCodesSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpAccessCodesSimulate { return new SeamHttpAccessCodesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpAccessCodesSimulate { return new SeamHttpAccessCodesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpAccessCodesSimulate { return new SeamHttpAccessCodesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpAccessCodesSimulate { return SeamHttpAccessCodesSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessCodesSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpAccessCodesSimulate { return new SeamHttpAccessCodesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpAccessCodesSimulate { return new SeamHttpAccessCodesSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -175,6 +216,9 @@ export class SeamHttpAccessCodesSimulate { } } +/** + * Parameters for `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. + */ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { /** * Code of the simulated unmanaged access code. @@ -193,16 +237,24 @@ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { } /** + * Response from `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. + * * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeRequest instead. */ export type AccessCodesSimulateCreateUnmanagedAccessCodeResponse = { access_code: UnmanagedAccessCode } +/** + * Request returned by `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. + */ export type AccessCodesSimulateCreateUnmanagedAccessCodeRequest = SeamHttpRequest< AccessCodesSimulateCreateUnmanagedAccessCodeResponse, 'access_code' > +/** + * Options for `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. + */ export interface AccessCodesSimulateCreateUnmanagedAccessCodeOptions {} diff --git a/src/lib/routes/access-codes/unmanaged/unmanaged.ts b/src/lib/routes/access-codes/unmanaged/unmanaged.ts index 5a31988d..39b2fc62 100644 --- a/src/lib/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-codes/unmanaged/unmanaged.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /access_codes/unmanaged routes. + */ export class SeamHttpAccessCodesUnmanaged { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpAccessCodesUnmanaged { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpAccessCodesUnmanaged { return new SeamHttpAccessCodesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpAccessCodesUnmanaged { return new SeamHttpAccessCodesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpAccessCodesUnmanaged { return new SeamHttpAccessCodesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpAccessCodesUnmanaged { return SeamHttpAccessCodesUnmanaged.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpAccessCodesUnmanaged { return new SeamHttpAccessCodesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessCodesUnmanaged authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpAccessCodesUnmanaged { return new SeamHttpAccessCodesUnmanaged(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -245,6 +286,9 @@ export class SeamHttpAccessCodesUnmanaged { } } +/** + * Parameters for `SeamHttpAccessCodesUnmanaged.convertToManaged`. + */ export type AccessCodesUnmanagedConvertToManagedParameters = { /** * ID of the unmanaged access code that you want to convert to a managed access code. @@ -266,17 +310,28 @@ export type AccessCodesUnmanagedConvertToManagedParameters = { } /** + * Response from `SeamHttpAccessCodesUnmanaged.convertToManaged`. + * * @deprecated Use AccessCodesUnmanagedConvertToManagedRequest instead. */ export type AccessCodesUnmanagedConvertToManagedResponse = void +/** + * Request returned by `SeamHttpAccessCodesUnmanaged.convertToManaged`. + */ export type AccessCodesUnmanagedConvertToManagedRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpAccessCodesUnmanaged.convertToManaged`. + */ export interface AccessCodesUnmanagedConvertToManagedOptions {} +/** + * Parameters for `SeamHttpAccessCodesUnmanaged.delete`. + */ export type AccessCodesUnmanagedDeleteParameters = { /** * ID of the unmanaged access code that you want to delete. @@ -285,14 +340,25 @@ export type AccessCodesUnmanagedDeleteParameters = { } /** + * Response from `SeamHttpAccessCodesUnmanaged.delete`. + * * @deprecated Use AccessCodesUnmanagedDeleteRequest instead. */ export type AccessCodesUnmanagedDeleteResponse = void +/** + * Request returned by `SeamHttpAccessCodesUnmanaged.delete`. + */ export type AccessCodesUnmanagedDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessCodesUnmanaged.delete`. + */ export interface AccessCodesUnmanagedDeleteOptions {} +/** + * Parameters for `SeamHttpAccessCodesUnmanaged.get`. + */ export type AccessCodesUnmanagedGetParameters = { /** * ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. @@ -309,19 +375,30 @@ export type AccessCodesUnmanagedGetParameters = { } /** + * Response from `SeamHttpAccessCodesUnmanaged.get`. + * * @deprecated Use AccessCodesUnmanagedGetRequest instead. */ export type AccessCodesUnmanagedGetResponse = { access_code: UnmanagedAccessCode } +/** + * Request returned by `SeamHttpAccessCodesUnmanaged.get`. + */ export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< AccessCodesUnmanagedGetResponse, 'access_code' > +/** + * Options for `SeamHttpAccessCodesUnmanaged.get`. + */ export interface AccessCodesUnmanagedGetOptions {} +/** + * Parameters for `SeamHttpAccessCodesUnmanaged.list`. + */ export type AccessCodesUnmanagedListParameters = { /** * ID of the device for which you want to list unmanaged access codes. @@ -347,19 +424,30 @@ export type AccessCodesUnmanagedListParameters = { } /** + * Response from `SeamHttpAccessCodesUnmanaged.list`. + * * @deprecated Use AccessCodesUnmanagedListRequest instead. */ export type AccessCodesUnmanagedListResponse = { access_codes: Array } +/** + * Request returned by `SeamHttpAccessCodesUnmanaged.list`. + */ export type AccessCodesUnmanagedListRequest = SeamHttpRequest< AccessCodesUnmanagedListResponse, 'access_codes' > +/** + * Options for `SeamHttpAccessCodesUnmanaged.list`. + */ export interface AccessCodesUnmanagedListOptions {} +/** + * Parameters for `SeamHttpAccessCodesUnmanaged.update`. + */ export type AccessCodesUnmanagedUpdateParameters = { /** * ID of the unmanaged access code that you want to update. @@ -383,10 +471,18 @@ export type AccessCodesUnmanagedUpdateParameters = { } /** + * Response from `SeamHttpAccessCodesUnmanaged.update`. + * * @deprecated Use AccessCodesUnmanagedUpdateRequest instead. */ export type AccessCodesUnmanagedUpdateResponse = void +/** + * Request returned by `SeamHttpAccessCodesUnmanaged.update`. + */ export type AccessCodesUnmanagedUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessCodesUnmanaged.update`. + */ export interface AccessCodesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/access-grants/access-grants.ts b/src/lib/routes/access-grants/access-grants.ts index ba5a5e46..012e5da0 100644 --- a/src/lib/routes/access-grants/access-grants.ts +++ b/src/lib/routes/access-grants/access-grants.ts @@ -36,8 +36,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpAccessGrantsUnmanaged } from './unmanaged/index.js' +/** + * Client for the Seam API /access_grants routes. + */ export class SeamHttpAccessGrants { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -46,6 +56,9 @@ export class SeamHttpAccessGrants { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessGrants from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -57,6 +70,9 @@ export class SeamHttpAccessGrants { return new SeamHttpAccessGrants(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrants authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -68,6 +84,9 @@ export class SeamHttpAccessGrants { return new SeamHttpAccessGrants(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrants authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -82,6 +101,11 @@ export class SeamHttpAccessGrants { return new SeamHttpAccessGrants(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrants authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpAccessGrants { return SeamHttpAccessGrants.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessGrants authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpAccessGrants { return new SeamHttpAccessGrants(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrants authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpAccessGrants { return new SeamHttpAccessGrants(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -161,6 +202,9 @@ export class SeamHttpAccessGrants { await clientSessions.get() } + /** + * Client for the Seam API /access_grants/unmanaged routes. + */ get unmanaged(): SeamHttpAccessGrantsUnmanaged { return SeamHttpAccessGrantsUnmanaged.fromClient(this.client, this.defaults) } @@ -278,6 +322,9 @@ export class SeamHttpAccessGrants { } } +/** + * Parameters for `SeamHttpAccessGrants.create`. + */ export type AccessGrantsCreateParameters = { /** * ID of user identity for whom access is being granted. @@ -388,17 +435,28 @@ export type AccessGrantsCreateParameters = { } /** + * Response from `SeamHttpAccessGrants.create`. + * * @deprecated Use AccessGrantsCreateRequest instead. */ export type AccessGrantsCreateResponse = { access_grant: AccessGrant } +/** + * Request returned by `SeamHttpAccessGrants.create`. + */ export type AccessGrantsCreateRequest = SeamHttpRequest< AccessGrantsCreateResponse, 'access_grant' > +/** + * Options for `SeamHttpAccessGrants.create`. + */ export interface AccessGrantsCreateOptions {} +/** + * Parameters for `SeamHttpAccessGrants.delete`. + */ export type AccessGrantsDeleteParameters = { /** * ID of Access Grant to delete. @@ -407,14 +465,25 @@ export type AccessGrantsDeleteParameters = { } /** + * Response from `SeamHttpAccessGrants.delete`. + * * @deprecated Use AccessGrantsDeleteRequest instead. */ export type AccessGrantsDeleteResponse = void +/** + * Request returned by `SeamHttpAccessGrants.delete`. + */ export type AccessGrantsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessGrants.delete`. + */ export interface AccessGrantsDeleteOptions {} +/** + * Parameters for `SeamHttpAccessGrants.get`. + */ export type AccessGrantsGetParameters = { /** * ID of Access Grant to get. @@ -427,17 +496,28 @@ export type AccessGrantsGetParameters = { } /** + * Response from `SeamHttpAccessGrants.get`. + * * @deprecated Use AccessGrantsGetRequest instead. */ export type AccessGrantsGetResponse = { access_grant: AccessGrant } +/** + * Request returned by `SeamHttpAccessGrants.get`. + */ export type AccessGrantsGetRequest = SeamHttpRequest< AccessGrantsGetResponse, 'access_grant' > +/** + * Options for `SeamHttpAccessGrants.get`. + */ export interface AccessGrantsGetOptions {} +/** + * Parameters for `SeamHttpAccessGrants.getRelated`. + */ export type AccessGrantsGetRelatedParameters = { /** * IDs of the access grants that you want to get along with their related resources. @@ -476,6 +556,8 @@ export type AccessGrantsGetRelatedParameters = { } /** + * Response from `SeamHttpAccessGrants.getRelated`. + * * @deprecated Use AccessGrantsGetRelatedRequest instead. */ export type AccessGrantsGetRelatedResponse = { @@ -491,13 +573,22 @@ export type AccessGrantsGetRelatedResponse = { > } +/** + * Request returned by `SeamHttpAccessGrants.getRelated`. + */ export type AccessGrantsGetRelatedRequest = SeamHttpRequest< AccessGrantsGetRelatedResponse, 'batch' > +/** + * Options for `SeamHttpAccessGrants.getRelated`. + */ export interface AccessGrantsGetRelatedOptions {} +/** + * Parameters for `SeamHttpAccessGrants.list`. + */ export type AccessGrantsListParameters = { /** * ID of the access code by which you want to filter the list of Access Grants. @@ -554,17 +645,28 @@ export type AccessGrantsListParameters = { } /** + * Response from `SeamHttpAccessGrants.list`. + * * @deprecated Use AccessGrantsListRequest instead. */ export type AccessGrantsListResponse = { access_grants: Array } +/** + * Request returned by `SeamHttpAccessGrants.list`. + */ export type AccessGrantsListRequest = SeamHttpRequest< AccessGrantsListResponse, 'access_grants' > +/** + * Options for `SeamHttpAccessGrants.list`. + */ export interface AccessGrantsListOptions {} +/** + * Parameters for `SeamHttpAccessGrants.requestAccessMethods`. + */ export type AccessGrantsRequestAccessMethodsParameters = { /** * ID of the Access Grant to add access methods to. @@ -591,19 +693,30 @@ export type AccessGrantsRequestAccessMethodsParameters = { } /** + * Response from `SeamHttpAccessGrants.requestAccessMethods`. + * * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ export type AccessGrantsRequestAccessMethodsResponse = { access_grant: AccessGrant } +/** + * Request returned by `SeamHttpAccessGrants.requestAccessMethods`. + */ export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< AccessGrantsRequestAccessMethodsResponse, 'access_grant' > +/** + * Options for `SeamHttpAccessGrants.requestAccessMethods`. + */ export interface AccessGrantsRequestAccessMethodsOptions {} +/** + * Parameters for `SeamHttpAccessGrants.update`. + */ export type AccessGrantsUpdateParameters = { /** * ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. @@ -628,10 +741,18 @@ export type AccessGrantsUpdateParameters = { } /** + * Response from `SeamHttpAccessGrants.update`. + * * @deprecated Use AccessGrantsUpdateRequest instead. */ export type AccessGrantsUpdateResponse = void +/** + * Request returned by `SeamHttpAccessGrants.update`. + */ export type AccessGrantsUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessGrants.update`. + */ export interface AccessGrantsUpdateOptions {} diff --git a/src/lib/routes/access-grants/unmanaged/unmanaged.ts b/src/lib/routes/access-grants/unmanaged/unmanaged.ts index 5c0f9d42..8206ff42 100644 --- a/src/lib/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-grants/unmanaged/unmanaged.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /access_grants/unmanaged routes. + */ export class SeamHttpAccessGrantsUnmanaged { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpAccessGrantsUnmanaged { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpAccessGrantsUnmanaged { return new SeamHttpAccessGrantsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpAccessGrantsUnmanaged { return new SeamHttpAccessGrantsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpAccessGrantsUnmanaged { return new SeamHttpAccessGrantsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpAccessGrantsUnmanaged { return SeamHttpAccessGrantsUnmanaged.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpAccessGrantsUnmanaged { return new SeamHttpAccessGrantsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessGrantsUnmanaged authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpAccessGrantsUnmanaged { return new SeamHttpAccessGrantsUnmanaged(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -211,6 +252,9 @@ export class SeamHttpAccessGrantsUnmanaged { } } +/** + * Parameters for `SeamHttpAccessGrantsUnmanaged.get`. + */ export type AccessGrantsUnmanagedGetParameters = { /** * ID of unmanaged Access Grant to get. @@ -219,19 +263,30 @@ export type AccessGrantsUnmanagedGetParameters = { } /** + * Response from `SeamHttpAccessGrantsUnmanaged.get`. + * * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ export type AccessGrantsUnmanagedGetResponse = { access_grant: UnmanagedAccessGrant } +/** + * Request returned by `SeamHttpAccessGrantsUnmanaged.get`. + */ export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< AccessGrantsUnmanagedGetResponse, 'access_grant' > +/** + * Options for `SeamHttpAccessGrantsUnmanaged.get`. + */ export interface AccessGrantsUnmanagedGetOptions {} +/** + * Parameters for `SeamHttpAccessGrantsUnmanaged.list`. + */ export type AccessGrantsUnmanagedListParameters = { /** * ID of the entrance by which you want to filter the list of unmanaged Access Grants. @@ -260,19 +315,30 @@ export type AccessGrantsUnmanagedListParameters = { } /** + * Response from `SeamHttpAccessGrantsUnmanaged.list`. + * * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ export type AccessGrantsUnmanagedListResponse = { access_grants: Array } +/** + * Request returned by `SeamHttpAccessGrantsUnmanaged.list`. + */ export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< AccessGrantsUnmanagedListResponse, 'access_grants' > +/** + * Options for `SeamHttpAccessGrantsUnmanaged.list`. + */ export interface AccessGrantsUnmanagedListOptions {} +/** + * Parameters for `SeamHttpAccessGrantsUnmanaged.update`. + */ export type AccessGrantsUnmanagedUpdateParameters = { /** * ID of the unmanaged Access Grant to update. @@ -290,13 +356,21 @@ export type AccessGrantsUnmanagedUpdateParameters = { } /** + * Response from `SeamHttpAccessGrantsUnmanaged.update`. + * * @deprecated Use AccessGrantsUnmanagedUpdateRequest instead. */ export type AccessGrantsUnmanagedUpdateResponse = void +/** + * Request returned by `SeamHttpAccessGrantsUnmanaged.update`. + */ export type AccessGrantsUnmanagedUpdateRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpAccessGrantsUnmanaged.update`. + */ export interface AccessGrantsUnmanagedUpdateOptions {} diff --git a/src/lib/routes/access-methods/access-methods.ts b/src/lib/routes/access-methods/access-methods.ts index 8d2cba83..3e74ddd5 100644 --- a/src/lib/routes/access-methods/access-methods.ts +++ b/src/lib/routes/access-methods/access-methods.ts @@ -38,8 +38,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpAccessMethodsUnmanaged } from './unmanaged/index.js' +/** + * Client for the Seam API /access_methods routes. + */ export class SeamHttpAccessMethods { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -48,6 +58,9 @@ export class SeamHttpAccessMethods { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessMethods from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -59,6 +72,9 @@ export class SeamHttpAccessMethods { return new SeamHttpAccessMethods(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethods authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -70,6 +86,9 @@ export class SeamHttpAccessMethods { return new SeamHttpAccessMethods(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethods authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -84,6 +103,11 @@ export class SeamHttpAccessMethods { return new SeamHttpAccessMethods(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethods authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -104,6 +128,10 @@ export class SeamHttpAccessMethods { return SeamHttpAccessMethods.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessMethods authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -121,6 +149,10 @@ export class SeamHttpAccessMethods { return new SeamHttpAccessMethods(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethods authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -138,12 +170,21 @@ export class SeamHttpAccessMethods { return new SeamHttpAccessMethods(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -163,6 +204,9 @@ export class SeamHttpAccessMethods { await clientSessions.get() } + /** + * Client for the Seam API /access_methods/unmanaged routes. + */ get unmanaged(): SeamHttpAccessMethodsUnmanaged { return SeamHttpAccessMethodsUnmanaged.fromClient(this.client, this.defaults) } @@ -292,6 +336,9 @@ export class SeamHttpAccessMethods { } } +/** + * Parameters for `SeamHttpAccessMethods.assignCard`. + */ export type AccessMethodsAssignCardParameters = { /** * ID of the `access_method` to assign the credential to. @@ -305,20 +352,31 @@ export type AccessMethodsAssignCardParameters = { } /** + * Response from `SeamHttpAccessMethods.assignCard`. + * * @deprecated Use AccessMethodsAssignCardRequest instead. */ export type AccessMethodsAssignCardResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAccessMethods.assignCard`. + */ export type AccessMethodsAssignCardRequest = SeamHttpRequest< AccessMethodsAssignCardResponse, 'action_attempt' > +/** + * Options for `SeamHttpAccessMethods.assignCard`. + */ export type AccessMethodsAssignCardOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpAccessMethods.delete`. + */ export type AccessMethodsDeleteParameters = { /** * ID of access method to delete. @@ -335,14 +393,25 @@ export type AccessMethodsDeleteParameters = { } /** + * Response from `SeamHttpAccessMethods.delete`. + * * @deprecated Use AccessMethodsDeleteRequest instead. */ export type AccessMethodsDeleteResponse = void +/** + * Request returned by `SeamHttpAccessMethods.delete`. + */ export type AccessMethodsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAccessMethods.delete`. + */ export interface AccessMethodsDeleteOptions {} +/** + * Parameters for `SeamHttpAccessMethods.encode`. + */ export type AccessMethodsEncodeParameters = { /** * ID of the `access_method` to encode onto a card. @@ -356,20 +425,31 @@ export type AccessMethodsEncodeParameters = { } /** + * Response from `SeamHttpAccessMethods.encode`. + * * @deprecated Use AccessMethodsEncodeRequest instead. */ export type AccessMethodsEncodeResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAccessMethods.encode`. + */ export type AccessMethodsEncodeRequest = SeamHttpRequest< AccessMethodsEncodeResponse, 'action_attempt' > +/** + * Options for `SeamHttpAccessMethods.encode`. + */ export type AccessMethodsEncodeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpAccessMethods.get`. + */ export type AccessMethodsGetParameters = { /** * ID of access method to get. @@ -378,17 +458,28 @@ export type AccessMethodsGetParameters = { } /** + * Response from `SeamHttpAccessMethods.get`. + * * @deprecated Use AccessMethodsGetRequest instead. */ export type AccessMethodsGetResponse = { access_method: AccessMethod } +/** + * Request returned by `SeamHttpAccessMethods.get`. + */ export type AccessMethodsGetRequest = SeamHttpRequest< AccessMethodsGetResponse, 'access_method' > +/** + * Options for `SeamHttpAccessMethods.get`. + */ export interface AccessMethodsGetOptions {} +/** + * Parameters for `SeamHttpAccessMethods.getRelated`. + */ export type AccessMethodsGetRelatedParameters = { /** * IDs of the access methods that you want to get along with their related resources. @@ -423,6 +514,8 @@ export type AccessMethodsGetRelatedParameters = { } /** + * Response from `SeamHttpAccessMethods.getRelated`. + * * @deprecated Use AccessMethodsGetRelatedRequest instead. */ export type AccessMethodsGetRelatedResponse = { @@ -438,13 +531,22 @@ export type AccessMethodsGetRelatedResponse = { > } +/** + * Request returned by `SeamHttpAccessMethods.getRelated`. + */ export type AccessMethodsGetRelatedRequest = SeamHttpRequest< AccessMethodsGetRelatedResponse, 'batch' > +/** + * Options for `SeamHttpAccessMethods.getRelated`. + */ export interface AccessMethodsGetRelatedOptions {} +/** + * Parameters for `SeamHttpAccessMethods.list`. + */ export type AccessMethodsListParameters = { /** * ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. @@ -481,17 +583,28 @@ export type AccessMethodsListParameters = { } /** + * Response from `SeamHttpAccessMethods.list`. + * * @deprecated Use AccessMethodsListRequest instead. */ export type AccessMethodsListResponse = { access_methods: Array } +/** + * Request returned by `SeamHttpAccessMethods.list`. + */ export type AccessMethodsListRequest = SeamHttpRequest< AccessMethodsListResponse, 'access_methods' > +/** + * Options for `SeamHttpAccessMethods.list`. + */ export interface AccessMethodsListOptions {} +/** + * Parameters for `SeamHttpAccessMethods.unlockDoor`. + */ export type AccessMethodsUnlockDoorParameters = { /** * ID of the cloud_key `access_method` to use for the unlock operation. @@ -505,15 +618,23 @@ export type AccessMethodsUnlockDoorParameters = { } /** + * Response from `SeamHttpAccessMethods.unlockDoor`. + * * @deprecated Use AccessMethodsUnlockDoorRequest instead. */ export type AccessMethodsUnlockDoorResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAccessMethods.unlockDoor`. + */ export type AccessMethodsUnlockDoorRequest = SeamHttpRequest< AccessMethodsUnlockDoorResponse, 'action_attempt' > +/** + * Options for `SeamHttpAccessMethods.unlockDoor`. + */ export type AccessMethodsUnlockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/access-methods/unmanaged/unmanaged.ts b/src/lib/routes/access-methods/unmanaged/unmanaged.ts index d72b3dd3..2e1967bf 100644 --- a/src/lib/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-methods/unmanaged/unmanaged.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /access_methods/unmanaged routes. + */ export class SeamHttpAccessMethodsUnmanaged { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpAccessMethodsUnmanaged { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpAccessMethodsUnmanaged { return new SeamHttpAccessMethodsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpAccessMethodsUnmanaged { return new SeamHttpAccessMethodsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpAccessMethodsUnmanaged { return new SeamHttpAccessMethodsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpAccessMethodsUnmanaged { return SeamHttpAccessMethodsUnmanaged.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpAccessMethodsUnmanaged { return new SeamHttpAccessMethodsUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpAccessMethodsUnmanaged authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpAccessMethodsUnmanaged { return new SeamHttpAccessMethodsUnmanaged(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -191,6 +232,9 @@ export class SeamHttpAccessMethodsUnmanaged { } } +/** + * Parameters for `SeamHttpAccessMethodsUnmanaged.get`. + */ export type AccessMethodsUnmanagedGetParameters = { /** * ID of unmanaged access method to get. @@ -199,19 +243,30 @@ export type AccessMethodsUnmanagedGetParameters = { } /** + * Response from `SeamHttpAccessMethodsUnmanaged.get`. + * * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ export type AccessMethodsUnmanagedGetResponse = { access_method: UnmanagedAccessMethod } +/** + * Request returned by `SeamHttpAccessMethodsUnmanaged.get`. + */ export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< AccessMethodsUnmanagedGetResponse, 'access_method' > +/** + * Options for `SeamHttpAccessMethodsUnmanaged.get`. + */ export interface AccessMethodsUnmanagedGetOptions {} +/** + * Parameters for `SeamHttpAccessMethodsUnmanaged.list`. + */ export type AccessMethodsUnmanagedListParameters = { /** * ID of Access Grant to list unmanaged access methods for. @@ -233,15 +288,23 @@ export type AccessMethodsUnmanagedListParameters = { } /** + * Response from `SeamHttpAccessMethodsUnmanaged.list`. + * * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ export type AccessMethodsUnmanagedListResponse = { access_methods: Array } +/** + * Request returned by `SeamHttpAccessMethodsUnmanaged.list`. + */ export type AccessMethodsUnmanagedListRequest = SeamHttpRequest< AccessMethodsUnmanagedListResponse, 'access_methods' > +/** + * Options for `SeamHttpAccessMethodsUnmanaged.list`. + */ export interface AccessMethodsUnmanagedListOptions {} diff --git a/src/lib/routes/acs/access-groups/access-groups.ts b/src/lib/routes/acs/access-groups/access-groups.ts index 43300572..a1e09345 100644 --- a/src/lib/routes/acs/access-groups/access-groups.ts +++ b/src/lib/routes/acs/access-groups/access-groups.ts @@ -35,8 +35,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/access_groups routes. + */ export class SeamHttpAcsAccessGroups { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -45,6 +55,9 @@ export class SeamHttpAcsAccessGroups { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsAccessGroups from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -56,6 +69,9 @@ export class SeamHttpAcsAccessGroups { return new SeamHttpAcsAccessGroups(constructorOptions) } + /** + * Creates a new SeamHttpAcsAccessGroups authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -67,6 +83,9 @@ export class SeamHttpAcsAccessGroups { return new SeamHttpAcsAccessGroups(constructorOptions) } + /** + * Creates a new SeamHttpAcsAccessGroups authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -81,6 +100,11 @@ export class SeamHttpAcsAccessGroups { return new SeamHttpAcsAccessGroups(constructorOptions) } + /** + * Creates a new SeamHttpAcsAccessGroups authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -101,6 +125,10 @@ export class SeamHttpAcsAccessGroups { return SeamHttpAcsAccessGroups.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsAccessGroups authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -118,6 +146,10 @@ export class SeamHttpAcsAccessGroups { return new SeamHttpAcsAccessGroups(constructorOptions) } + /** + * Creates a new SeamHttpAcsAccessGroups authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -135,12 +167,21 @@ export class SeamHttpAcsAccessGroups { return new SeamHttpAcsAccessGroups(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -273,6 +314,9 @@ export class SeamHttpAcsAccessGroups { } } +/** + * Parameters for `SeamHttpAcsAccessGroups.addUser`. + */ export type AcsAccessGroupsAddUserParameters = { /** * ID of the access group to which you want to add an access system user. @@ -290,14 +334,25 @@ export type AcsAccessGroupsAddUserParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.addUser`. + * * @deprecated Use AcsAccessGroupsAddUserRequest instead. */ export type AcsAccessGroupsAddUserResponse = void +/** + * Request returned by `SeamHttpAcsAccessGroups.addUser`. + */ export type AcsAccessGroupsAddUserRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsAccessGroups.addUser`. + */ export interface AcsAccessGroupsAddUserOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.delete`. + */ export type AcsAccessGroupsDeleteParameters = { /** * ID of the access group that you want to delete. @@ -306,14 +361,25 @@ export type AcsAccessGroupsDeleteParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.delete`. + * * @deprecated Use AcsAccessGroupsDeleteRequest instead. */ export type AcsAccessGroupsDeleteResponse = void +/** + * Request returned by `SeamHttpAcsAccessGroups.delete`. + */ export type AcsAccessGroupsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsAccessGroups.delete`. + */ export interface AcsAccessGroupsDeleteOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.get`. + */ export type AcsAccessGroupsGetParameters = { /** * ID of the access group that you want to get. @@ -322,17 +388,28 @@ export type AcsAccessGroupsGetParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.get`. + * * @deprecated Use AcsAccessGroupsGetRequest instead. */ export type AcsAccessGroupsGetResponse = { acs_access_group: AcsAccessGroup } +/** + * Request returned by `SeamHttpAcsAccessGroups.get`. + */ export type AcsAccessGroupsGetRequest = SeamHttpRequest< AcsAccessGroupsGetResponse, 'acs_access_group' > +/** + * Options for `SeamHttpAcsAccessGroups.get`. + */ export interface AcsAccessGroupsGetOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.list`. + */ export type AcsAccessGroupsListParameters = { /** * ID of the access system for which you want to retrieve all access groups. @@ -353,19 +430,30 @@ export type AcsAccessGroupsListParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.list`. + * * @deprecated Use AcsAccessGroupsListRequest instead. */ export type AcsAccessGroupsListResponse = { acs_access_groups: Array } +/** + * Request returned by `SeamHttpAcsAccessGroups.list`. + */ export type AcsAccessGroupsListRequest = SeamHttpRequest< AcsAccessGroupsListResponse, 'acs_access_groups' > +/** + * Options for `SeamHttpAcsAccessGroups.list`. + */ export interface AcsAccessGroupsListOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.listAccessibleEntrances`. + */ export type AcsAccessGroupsListAccessibleEntrancesParameters = { /** * ID of the access group for which you want to retrieve all accessible entrances. @@ -374,19 +462,30 @@ export type AcsAccessGroupsListAccessibleEntrancesParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.listAccessibleEntrances`. + * * @deprecated Use AcsAccessGroupsListAccessibleEntrancesRequest instead. */ export type AcsAccessGroupsListAccessibleEntrancesResponse = { acs_entrances: Array } +/** + * Request returned by `SeamHttpAcsAccessGroups.listAccessibleEntrances`. + */ export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< AcsAccessGroupsListAccessibleEntrancesResponse, 'acs_entrances' > +/** + * Options for `SeamHttpAcsAccessGroups.listAccessibleEntrances`. + */ export interface AcsAccessGroupsListAccessibleEntrancesOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.listUsers`. + */ export type AcsAccessGroupsListUsersParameters = { /** * ID of the access group for which you want to retrieve all access system users. @@ -395,17 +494,28 @@ export type AcsAccessGroupsListUsersParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.listUsers`. + * * @deprecated Use AcsAccessGroupsListUsersRequest instead. */ export type AcsAccessGroupsListUsersResponse = { acs_users: Array } +/** + * Request returned by `SeamHttpAcsAccessGroups.listUsers`. + */ export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< AcsAccessGroupsListUsersResponse, 'acs_users' > +/** + * Options for `SeamHttpAcsAccessGroups.listUsers`. + */ export interface AcsAccessGroupsListUsersOptions {} +/** + * Parameters for `SeamHttpAcsAccessGroups.removeUser`. + */ export type AcsAccessGroupsRemoveUserParameters = { /** * ID of the access group from which you want to remove an access system user. @@ -423,10 +533,18 @@ export type AcsAccessGroupsRemoveUserParameters = { } /** + * Response from `SeamHttpAcsAccessGroups.removeUser`. + * * @deprecated Use AcsAccessGroupsRemoveUserRequest instead. */ export type AcsAccessGroupsRemoveUserResponse = void +/** + * Request returned by `SeamHttpAcsAccessGroups.removeUser`. + */ export type AcsAccessGroupsRemoveUserRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsAccessGroups.removeUser`. + */ export interface AcsAccessGroupsRemoveUserOptions {} diff --git a/src/lib/routes/acs/acs.ts b/src/lib/routes/acs/acs.ts index b431297f..5cd249c9 100644 --- a/src/lib/routes/acs/acs.ts +++ b/src/lib/routes/acs/acs.ts @@ -39,8 +39,18 @@ import { SeamHttpAcsEntrances } from './entrances/index.js' import { SeamHttpAcsSystems } from './systems/index.js' import { SeamHttpAcsUsers } from './users/index.js' +/** + * Client for the Seam API /acs routes. + */ export class SeamHttpAcs { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -49,6 +59,9 @@ export class SeamHttpAcs { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcs from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -60,6 +73,9 @@ export class SeamHttpAcs { return new SeamHttpAcs(constructorOptions) } + /** + * Creates a new SeamHttpAcs authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -71,6 +87,9 @@ export class SeamHttpAcs { return new SeamHttpAcs(constructorOptions) } + /** + * Creates a new SeamHttpAcs authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -85,6 +104,11 @@ export class SeamHttpAcs { return new SeamHttpAcs(constructorOptions) } + /** + * Creates a new SeamHttpAcs authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -105,6 +129,10 @@ export class SeamHttpAcs { return SeamHttpAcs.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcs authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -122,6 +150,10 @@ export class SeamHttpAcs { return new SeamHttpAcs(constructorOptions) } + /** + * Creates a new SeamHttpAcs authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -139,12 +171,21 @@ export class SeamHttpAcs { return new SeamHttpAcs(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -164,26 +205,44 @@ export class SeamHttpAcs { await clientSessions.get() } + /** + * Client for the Seam API /acs/access_groups routes. + */ get accessGroups(): SeamHttpAcsAccessGroups { return SeamHttpAcsAccessGroups.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs/credentials routes. + */ get credentials(): SeamHttpAcsCredentials { return SeamHttpAcsCredentials.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs/encoders routes. + */ get encoders(): SeamHttpAcsEncoders { return SeamHttpAcsEncoders.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs/entrances routes. + */ get entrances(): SeamHttpAcsEntrances { return SeamHttpAcsEntrances.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs/systems routes. + */ get systems(): SeamHttpAcsSystems { return SeamHttpAcsSystems.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs/users routes. + */ get users(): SeamHttpAcsUsers { return SeamHttpAcsUsers.fromClient(this.client, this.defaults) } diff --git a/src/lib/routes/acs/credentials/credentials.ts b/src/lib/routes/acs/credentials/credentials.ts index 747c593d..ce165b68 100644 --- a/src/lib/routes/acs/credentials/credentials.ts +++ b/src/lib/routes/acs/credentials/credentials.ts @@ -34,8 +34,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/credentials routes. + */ export class SeamHttpAcsCredentials { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -44,6 +54,9 @@ export class SeamHttpAcsCredentials { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsCredentials from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -55,6 +68,9 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } + /** + * Creates a new SeamHttpAcsCredentials authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -66,6 +82,9 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } + /** + * Creates a new SeamHttpAcsCredentials authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -80,6 +99,11 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } + /** + * Creates a new SeamHttpAcsCredentials authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -100,6 +124,10 @@ export class SeamHttpAcsCredentials { return SeamHttpAcsCredentials.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsCredentials authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -117,6 +145,10 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } + /** + * Creates a new SeamHttpAcsCredentials authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -134,12 +166,21 @@ export class SeamHttpAcsCredentials { return new SeamHttpAcsCredentials(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -288,6 +329,9 @@ export class SeamHttpAcsCredentials { } } +/** + * Parameters for `SeamHttpAcsCredentials.assign`. + */ export type AcsCredentialsAssignParameters = { /** * ID of the credential that you want to assign to an access system user. @@ -305,14 +349,25 @@ export type AcsCredentialsAssignParameters = { } /** + * Response from `SeamHttpAcsCredentials.assign`. + * * @deprecated Use AcsCredentialsAssignRequest instead. */ export type AcsCredentialsAssignResponse = void +/** + * Request returned by `SeamHttpAcsCredentials.assign`. + */ export type AcsCredentialsAssignRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsCredentials.assign`. + */ export interface AcsCredentialsAssignOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.create`. + */ export type AcsCredentialsCreateParameters = { /** * Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. @@ -399,17 +454,28 @@ export type AcsCredentialsCreateParameters = { } /** + * Response from `SeamHttpAcsCredentials.create`. + * * @deprecated Use AcsCredentialsCreateRequest instead. */ export type AcsCredentialsCreateResponse = { acs_credential: AcsCredential } +/** + * Request returned by `SeamHttpAcsCredentials.create`. + */ export type AcsCredentialsCreateRequest = SeamHttpRequest< AcsCredentialsCreateResponse, 'acs_credential' > +/** + * Options for `SeamHttpAcsCredentials.create`. + */ export interface AcsCredentialsCreateOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.delete`. + */ export type AcsCredentialsDeleteParameters = { /** * ID of the credential that you want to delete. @@ -418,14 +484,25 @@ export type AcsCredentialsDeleteParameters = { } /** + * Response from `SeamHttpAcsCredentials.delete`. + * * @deprecated Use AcsCredentialsDeleteRequest instead. */ export type AcsCredentialsDeleteResponse = void +/** + * Request returned by `SeamHttpAcsCredentials.delete`. + */ export type AcsCredentialsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsCredentials.delete`. + */ export interface AcsCredentialsDeleteOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.get`. + */ export type AcsCredentialsGetParameters = { /** * ID of the credential that you want to get. @@ -434,17 +511,28 @@ export type AcsCredentialsGetParameters = { } /** + * Response from `SeamHttpAcsCredentials.get`. + * * @deprecated Use AcsCredentialsGetRequest instead. */ export type AcsCredentialsGetResponse = { acs_credential: AcsCredential } +/** + * Request returned by `SeamHttpAcsCredentials.get`. + */ export type AcsCredentialsGetRequest = SeamHttpRequest< AcsCredentialsGetResponse, 'acs_credential' > +/** + * Options for `SeamHttpAcsCredentials.get`. + */ export interface AcsCredentialsGetOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.list`. + */ export type AcsCredentialsListParameters = { /** * ID of the access system user for which you want to retrieve all credentials. @@ -481,19 +569,30 @@ export type AcsCredentialsListParameters = { } /** + * Response from `SeamHttpAcsCredentials.list`. + * * @deprecated Use AcsCredentialsListRequest instead. */ export type AcsCredentialsListResponse = { acs_credentials: Array } +/** + * Request returned by `SeamHttpAcsCredentials.list`. + */ export type AcsCredentialsListRequest = SeamHttpRequest< AcsCredentialsListResponse, 'acs_credentials' > +/** + * Options for `SeamHttpAcsCredentials.list`. + */ export interface AcsCredentialsListOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.listAccessibleEntrances`. + */ export type AcsCredentialsListAccessibleEntrancesParameters = { /** * ID of the credential for which you want to retrieve all entrances to which the credential grants access. @@ -502,19 +601,30 @@ export type AcsCredentialsListAccessibleEntrancesParameters = { } /** + * Response from `SeamHttpAcsCredentials.listAccessibleEntrances`. + * * @deprecated Use AcsCredentialsListAccessibleEntrancesRequest instead. */ export type AcsCredentialsListAccessibleEntrancesResponse = { acs_entrances: Array } +/** + * Request returned by `SeamHttpAcsCredentials.listAccessibleEntrances`. + */ export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< AcsCredentialsListAccessibleEntrancesResponse, 'acs_entrances' > +/** + * Options for `SeamHttpAcsCredentials.listAccessibleEntrances`. + */ export interface AcsCredentialsListAccessibleEntrancesOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.unassign`. + */ export type AcsCredentialsUnassignParameters = { /** * ID of the credential that you want to unassign from an access system user. @@ -532,14 +642,25 @@ export type AcsCredentialsUnassignParameters = { } /** + * Response from `SeamHttpAcsCredentials.unassign`. + * * @deprecated Use AcsCredentialsUnassignRequest instead. */ export type AcsCredentialsUnassignResponse = void +/** + * Request returned by `SeamHttpAcsCredentials.unassign`. + */ export type AcsCredentialsUnassignRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsCredentials.unassign`. + */ export interface AcsCredentialsUnassignOptions {} +/** + * Parameters for `SeamHttpAcsCredentials.update`. + */ export type AcsCredentialsUpdateParameters = { /** * ID of the credential that you want to update. @@ -557,10 +678,18 @@ export type AcsCredentialsUpdateParameters = { } /** + * Response from `SeamHttpAcsCredentials.update`. + * * @deprecated Use AcsCredentialsUpdateRequest instead. */ export type AcsCredentialsUpdateResponse = void +/** + * Request returned by `SeamHttpAcsCredentials.update`. + */ export type AcsCredentialsUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsCredentials.update`. + */ export interface AcsCredentialsUpdateOptions {} diff --git a/src/lib/routes/acs/encoders/encoders.ts b/src/lib/routes/acs/encoders/encoders.ts index 73d472f6..dc522907 100644 --- a/src/lib/routes/acs/encoders/encoders.ts +++ b/src/lib/routes/acs/encoders/encoders.ts @@ -37,8 +37,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpAcsEncodersSimulate } from './simulate/index.js' +/** + * Client for the Seam API /acs/encoders routes. + */ export class SeamHttpAcsEncoders { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -47,6 +57,9 @@ export class SeamHttpAcsEncoders { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsEncoders from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -58,6 +71,9 @@ export class SeamHttpAcsEncoders { return new SeamHttpAcsEncoders(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncoders authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -69,6 +85,9 @@ export class SeamHttpAcsEncoders { return new SeamHttpAcsEncoders(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncoders authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -83,6 +102,11 @@ export class SeamHttpAcsEncoders { return new SeamHttpAcsEncoders(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncoders authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -103,6 +127,10 @@ export class SeamHttpAcsEncoders { return SeamHttpAcsEncoders.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsEncoders authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -120,6 +148,10 @@ export class SeamHttpAcsEncoders { return new SeamHttpAcsEncoders(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncoders authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -137,12 +169,21 @@ export class SeamHttpAcsEncoders { return new SeamHttpAcsEncoders(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -162,6 +203,9 @@ export class SeamHttpAcsEncoders { await clientSessions.get() } + /** + * Client for the Seam API /acs/encoders/simulate routes. + */ get simulate(): SeamHttpAcsEncodersSimulate { return SeamHttpAcsEncodersSimulate.fromClient(this.client, this.defaults) } @@ -259,6 +303,9 @@ export class SeamHttpAcsEncoders { } } +/** + * Parameters for `SeamHttpAcsEncoders.encodeCredential`. + */ export type AcsEncodersEncodeCredentialParameters = { /** * ID of the `access_method` to encode onto a card. @@ -275,22 +322,33 @@ export type AcsEncodersEncodeCredentialParameters = { } /** + * Response from `SeamHttpAcsEncoders.encodeCredential`. + * * @deprecated Use AcsEncodersEncodeCredentialRequest instead. */ export type AcsEncodersEncodeCredentialResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAcsEncoders.encodeCredential`. + */ export type AcsEncodersEncodeCredentialRequest = SeamHttpRequest< AcsEncodersEncodeCredentialResponse, 'action_attempt' > +/** + * Options for `SeamHttpAcsEncoders.encodeCredential`. + */ export type AcsEncodersEncodeCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpAcsEncoders.get`. + */ export type AcsEncodersGetParameters = { /** * ID of the encoder that you want to get. @@ -299,17 +357,28 @@ export type AcsEncodersGetParameters = { } /** + * Response from `SeamHttpAcsEncoders.get`. + * * @deprecated Use AcsEncodersGetRequest instead. */ export type AcsEncodersGetResponse = { acs_encoder: AcsEncoder } +/** + * Request returned by `SeamHttpAcsEncoders.get`. + */ export type AcsEncodersGetRequest = SeamHttpRequest< AcsEncodersGetResponse, 'acs_encoder' > +/** + * Options for `SeamHttpAcsEncoders.get`. + */ export interface AcsEncodersGetOptions {} +/** + * Parameters for `SeamHttpAcsEncoders.list`. + */ export type AcsEncodersListParameters = { /** * ID of the access system for which you want to retrieve all encoders. @@ -334,17 +403,28 @@ export type AcsEncodersListParameters = { } /** + * Response from `SeamHttpAcsEncoders.list`. + * * @deprecated Use AcsEncodersListRequest instead. */ export type AcsEncodersListResponse = { acs_encoders: Array } +/** + * Request returned by `SeamHttpAcsEncoders.list`. + */ export type AcsEncodersListRequest = SeamHttpRequest< AcsEncodersListResponse, 'acs_encoders' > +/** + * Options for `SeamHttpAcsEncoders.list`. + */ export interface AcsEncodersListOptions {} +/** + * Parameters for `SeamHttpAcsEncoders.scanCredential`. + */ export type AcsEncodersScanCredentialParameters = { /** * ID of the encoder to use for the scan. @@ -365,22 +445,33 @@ export type AcsEncodersScanCredentialParameters = { } /** + * Response from `SeamHttpAcsEncoders.scanCredential`. + * * @deprecated Use AcsEncodersScanCredentialRequest instead. */ export type AcsEncodersScanCredentialResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAcsEncoders.scanCredential`. + */ export type AcsEncodersScanCredentialRequest = SeamHttpRequest< AcsEncodersScanCredentialResponse, 'action_attempt' > +/** + * Options for `SeamHttpAcsEncoders.scanCredential`. + */ export type AcsEncodersScanCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpAcsEncoders.scanToAssignCredential`. + */ export type AcsEncodersScanToAssignCredentialParameters = { /** * ID of the `acs_encoder` to use to scan the credential. @@ -409,17 +500,25 @@ export type AcsEncodersScanToAssignCredentialParameters = { } /** + * Response from `SeamHttpAcsEncoders.scanToAssignCredential`. + * * @deprecated Use AcsEncodersScanToAssignCredentialRequest instead. */ export type AcsEncodersScanToAssignCredentialResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAcsEncoders.scanToAssignCredential`. + */ export type AcsEncodersScanToAssignCredentialRequest = SeamHttpRequest< AcsEncodersScanToAssignCredentialResponse, 'action_attempt' > +/** + * Options for `SeamHttpAcsEncoders.scanToAssignCredential`. + */ export type AcsEncodersScanToAssignCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/acs/encoders/simulate/simulate.ts b/src/lib/routes/acs/encoders/simulate/simulate.ts index e7c26269..b10908ce 100644 --- a/src/lib/routes/acs/encoders/simulate/simulate.ts +++ b/src/lib/routes/acs/encoders/simulate/simulate.ts @@ -32,8 +32,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/encoders/simulate routes. + */ export class SeamHttpAcsEncodersSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpAcsEncodersSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsEncodersSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpAcsEncodersSimulate { return new SeamHttpAcsEncodersSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncodersSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpAcsEncodersSimulate { return new SeamHttpAcsEncodersSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncodersSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpAcsEncodersSimulate { return new SeamHttpAcsEncodersSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncodersSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -98,6 +122,10 @@ export class SeamHttpAcsEncodersSimulate { return SeamHttpAcsEncodersSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsEncodersSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -115,6 +143,10 @@ export class SeamHttpAcsEncodersSimulate { return new SeamHttpAcsEncodersSimulate(constructorOptions) } + /** + * Creates a new SeamHttpAcsEncodersSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -132,12 +164,21 @@ export class SeamHttpAcsEncodersSimulate { return new SeamHttpAcsEncodersSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -222,6 +263,9 @@ export class SeamHttpAcsEncodersSimulate { } } +/** + * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. + */ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { /** * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. @@ -244,15 +288,26 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { } /** + * Response from `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. + * * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailRequest instead. */ export type AcsEncodersSimulateNextCredentialEncodeWillFailResponse = void +/** + * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. + */ export type AcsEncodersSimulateNextCredentialEncodeWillFailRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. + */ export interface AcsEncodersSimulateNextCredentialEncodeWillFailOptions {} +/** + * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. + */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { /** * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. @@ -266,15 +321,26 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { } /** + * Response from `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. + * * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest instead. */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedResponse = void +/** + * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. + */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. + */ export interface AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions {} +/** + * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. + */ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { /** * ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. @@ -291,15 +357,26 @@ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { } /** + * Response from `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. + * * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailRequest instead. */ export type AcsEncodersSimulateNextCredentialScanWillFailResponse = void +/** + * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. + */ export type AcsEncodersSimulateNextCredentialScanWillFailRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. + */ export interface AcsEncodersSimulateNextCredentialScanWillFailOptions {} +/** + * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. + */ export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { /** * ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. @@ -322,11 +399,19 @@ export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { } /** + * Response from `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. + * * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedRequest instead. */ export type AcsEncodersSimulateNextCredentialScanWillSucceedResponse = void +/** + * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. + */ export type AcsEncodersSimulateNextCredentialScanWillSucceedRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. + */ export interface AcsEncodersSimulateNextCredentialScanWillSucceedOptions {} diff --git a/src/lib/routes/acs/entrances/entrances.ts b/src/lib/routes/acs/entrances/entrances.ts index c343ab16..3174ad5c 100644 --- a/src/lib/routes/acs/entrances/entrances.ts +++ b/src/lib/routes/acs/entrances/entrances.ts @@ -36,8 +36,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/entrances routes. + */ export class SeamHttpAcsEntrances { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -46,6 +56,9 @@ export class SeamHttpAcsEntrances { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsEntrances from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -57,6 +70,9 @@ export class SeamHttpAcsEntrances { return new SeamHttpAcsEntrances(constructorOptions) } + /** + * Creates a new SeamHttpAcsEntrances authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -68,6 +84,9 @@ export class SeamHttpAcsEntrances { return new SeamHttpAcsEntrances(constructorOptions) } + /** + * Creates a new SeamHttpAcsEntrances authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -82,6 +101,11 @@ export class SeamHttpAcsEntrances { return new SeamHttpAcsEntrances(constructorOptions) } + /** + * Creates a new SeamHttpAcsEntrances authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpAcsEntrances { return SeamHttpAcsEntrances.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsEntrances authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpAcsEntrances { return new SeamHttpAcsEntrances(constructorOptions) } + /** + * Creates a new SeamHttpAcsEntrances authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpAcsEntrances { return new SeamHttpAcsEntrances(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -246,6 +287,9 @@ export class SeamHttpAcsEntrances { } } +/** + * Parameters for `SeamHttpAcsEntrances.get`. + */ export type AcsEntrancesGetParameters = { /** * ID of the entrance that you want to get. @@ -254,17 +298,28 @@ export type AcsEntrancesGetParameters = { } /** + * Response from `SeamHttpAcsEntrances.get`. + * * @deprecated Use AcsEntrancesGetRequest instead. */ export type AcsEntrancesGetResponse = { acs_entrance: AcsEntrance } +/** + * Request returned by `SeamHttpAcsEntrances.get`. + */ export type AcsEntrancesGetRequest = SeamHttpRequest< AcsEntrancesGetResponse, 'acs_entrance' > +/** + * Options for `SeamHttpAcsEntrances.get`. + */ export interface AcsEntrancesGetOptions {} +/** + * Parameters for `SeamHttpAcsEntrances.grantAccess`. + */ export type AcsEntrancesGrantAccessParameters = { /** * ID of the entrance to which you want to grant an access system user access. @@ -282,14 +337,25 @@ export type AcsEntrancesGrantAccessParameters = { } /** + * Response from `SeamHttpAcsEntrances.grantAccess`. + * * @deprecated Use AcsEntrancesGrantAccessRequest instead. */ export type AcsEntrancesGrantAccessResponse = void +/** + * Request returned by `SeamHttpAcsEntrances.grantAccess`. + */ export type AcsEntrancesGrantAccessRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsEntrances.grantAccess`. + */ export interface AcsEntrancesGrantAccessOptions {} +/** + * Parameters for `SeamHttpAcsEntrances.list`. + */ export type AcsEntrancesListParameters = { /** * ID of the access method for which you want to retrieve all entrances to which it grants access. @@ -338,17 +404,28 @@ export type AcsEntrancesListParameters = { } /** + * Response from `SeamHttpAcsEntrances.list`. + * * @deprecated Use AcsEntrancesListRequest instead. */ export type AcsEntrancesListResponse = { acs_entrances: Array } +/** + * Request returned by `SeamHttpAcsEntrances.list`. + */ export type AcsEntrancesListRequest = SeamHttpRequest< AcsEntrancesListResponse, 'acs_entrances' > +/** + * Options for `SeamHttpAcsEntrances.list`. + */ export interface AcsEntrancesListOptions {} +/** + * Parameters for `SeamHttpAcsEntrances.listCredentialsWithAccess`. + */ export type AcsEntrancesListCredentialsWithAccessParameters = { /** * ID of the entrance for which you want to list all credentials that grant access. @@ -362,19 +439,30 @@ export type AcsEntrancesListCredentialsWithAccessParameters = { } /** + * Response from `SeamHttpAcsEntrances.listCredentialsWithAccess`. + * * @deprecated Use AcsEntrancesListCredentialsWithAccessRequest instead. */ export type AcsEntrancesListCredentialsWithAccessResponse = { acs_credentials: Array } +/** + * Request returned by `SeamHttpAcsEntrances.listCredentialsWithAccess`. + */ export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< AcsEntrancesListCredentialsWithAccessResponse, 'acs_credentials' > +/** + * Options for `SeamHttpAcsEntrances.listCredentialsWithAccess`. + */ export interface AcsEntrancesListCredentialsWithAccessOptions {} +/** + * Parameters for `SeamHttpAcsEntrances.unlock`. + */ export type AcsEntrancesUnlockParameters = { /** * ID of the cloud_key credential to use for the unlock operation. @@ -388,15 +476,23 @@ export type AcsEntrancesUnlockParameters = { } /** + * Response from `SeamHttpAcsEntrances.unlock`. + * * @deprecated Use AcsEntrancesUnlockRequest instead. */ export type AcsEntrancesUnlockResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpAcsEntrances.unlock`. + */ export type AcsEntrancesUnlockRequest = SeamHttpRequest< AcsEntrancesUnlockResponse, 'action_attempt' > +/** + * Options for `SeamHttpAcsEntrances.unlock`. + */ export type AcsEntrancesUnlockOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/acs/systems/systems.ts b/src/lib/routes/acs/systems/systems.ts index b9a5dbbb..4b8d2ebd 100644 --- a/src/lib/routes/acs/systems/systems.ts +++ b/src/lib/routes/acs/systems/systems.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/systems routes. + */ export class SeamHttpAcsSystems { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpAcsSystems { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsSystems from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpAcsSystems { return new SeamHttpAcsSystems(constructorOptions) } + /** + * Creates a new SeamHttpAcsSystems authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpAcsSystems { return new SeamHttpAcsSystems(constructorOptions) } + /** + * Creates a new SeamHttpAcsSystems authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpAcsSystems { return new SeamHttpAcsSystems(constructorOptions) } + /** + * Creates a new SeamHttpAcsSystems authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpAcsSystems { return SeamHttpAcsSystems.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsSystems authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpAcsSystems { return new SeamHttpAcsSystems(constructorOptions) } + /** + * Creates a new SeamHttpAcsSystems authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpAcsSystems { return new SeamHttpAcsSystems(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -227,6 +268,9 @@ export class SeamHttpAcsSystems { } } +/** + * Parameters for `SeamHttpAcsSystems.get`. + */ export type AcsSystemsGetParameters = { /** * ID of the access system that you want to get. @@ -235,17 +279,28 @@ export type AcsSystemsGetParameters = { } /** + * Response from `SeamHttpAcsSystems.get`. + * * @deprecated Use AcsSystemsGetRequest instead. */ export type AcsSystemsGetResponse = { acs_system: AcsSystem } +/** + * Request returned by `SeamHttpAcsSystems.get`. + */ export type AcsSystemsGetRequest = SeamHttpRequest< AcsSystemsGetResponse, 'acs_system' > +/** + * Options for `SeamHttpAcsSystems.get`. + */ export interface AcsSystemsGetOptions {} +/** + * Parameters for `SeamHttpAcsSystems.list`. + */ export type AcsSystemsListParameters = { /** * ID of the connected account by which you want to filter the list of access systems. @@ -262,17 +317,28 @@ export type AcsSystemsListParameters = { } /** + * Response from `SeamHttpAcsSystems.list`. + * * @deprecated Use AcsSystemsListRequest instead. */ export type AcsSystemsListResponse = { acs_systems: Array } +/** + * Request returned by `SeamHttpAcsSystems.list`. + */ export type AcsSystemsListRequest = SeamHttpRequest< AcsSystemsListResponse, 'acs_systems' > +/** + * Options for `SeamHttpAcsSystems.list`. + */ export interface AcsSystemsListOptions {} +/** + * Parameters for `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. + */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { /** * ID of the access system for which you want to retrieve all compatible credential manager systems. @@ -281,20 +347,31 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { } /** + * Response from `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. + * * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest instead. */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse = { acs_systems: Array } +/** + * Request returned by `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. + */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = SeamHttpRequest< AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse, 'acs_systems' > +/** + * Options for `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. + */ export interface AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions {} +/** + * Parameters for `SeamHttpAcsSystems.reportDevices`. + */ export type AcsSystemsReportDevicesParameters = { /** * Array of ACS encoders to report @@ -355,10 +432,18 @@ export type AcsSystemsReportDevicesParameters = { } /** + * Response from `SeamHttpAcsSystems.reportDevices`. + * * @deprecated Use AcsSystemsReportDevicesRequest instead. */ export type AcsSystemsReportDevicesResponse = void +/** + * Request returned by `SeamHttpAcsSystems.reportDevices`. + */ export type AcsSystemsReportDevicesRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsSystems.reportDevices`. + */ export interface AcsSystemsReportDevicesOptions {} diff --git a/src/lib/routes/acs/users/users.ts b/src/lib/routes/acs/users/users.ts index 914ee3f1..b22ab585 100644 --- a/src/lib/routes/acs/users/users.ts +++ b/src/lib/routes/acs/users/users.ts @@ -34,8 +34,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /acs/users routes. + */ export class SeamHttpAcsUsers { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -44,6 +54,9 @@ export class SeamHttpAcsUsers { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpAcsUsers from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -55,6 +68,9 @@ export class SeamHttpAcsUsers { return new SeamHttpAcsUsers(constructorOptions) } + /** + * Creates a new SeamHttpAcsUsers authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -66,6 +82,9 @@ export class SeamHttpAcsUsers { return new SeamHttpAcsUsers(constructorOptions) } + /** + * Creates a new SeamHttpAcsUsers authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -80,6 +99,11 @@ export class SeamHttpAcsUsers { return new SeamHttpAcsUsers(constructorOptions) } + /** + * Creates a new SeamHttpAcsUsers authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -100,6 +124,10 @@ export class SeamHttpAcsUsers { return SeamHttpAcsUsers.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpAcsUsers authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -117,6 +145,10 @@ export class SeamHttpAcsUsers { return new SeamHttpAcsUsers(constructorOptions) } + /** + * Creates a new SeamHttpAcsUsers authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -134,12 +166,21 @@ export class SeamHttpAcsUsers { return new SeamHttpAcsUsers(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -336,6 +377,9 @@ export class SeamHttpAcsUsers { } } +/** + * Parameters for `SeamHttpAcsUsers.addToAccessGroup`. + */ export type AcsUsersAddToAccessGroupParameters = { /** * ID of the access group to which you want to add an access system user. @@ -349,14 +393,25 @@ export type AcsUsersAddToAccessGroupParameters = { } /** + * Response from `SeamHttpAcsUsers.addToAccessGroup`. + * * @deprecated Use AcsUsersAddToAccessGroupRequest instead. */ export type AcsUsersAddToAccessGroupResponse = void +/** + * Request returned by `SeamHttpAcsUsers.addToAccessGroup`. + */ export type AcsUsersAddToAccessGroupRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsUsers.addToAccessGroup`. + */ export interface AcsUsersAddToAccessGroupOptions {} +/** + * Parameters for `SeamHttpAcsUsers.create`. + */ export type AcsUsersCreateParameters = { /** * `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. @@ -406,17 +461,28 @@ export type AcsUsersCreateParameters = { } /** + * Response from `SeamHttpAcsUsers.create`. + * * @deprecated Use AcsUsersCreateRequest instead. */ export type AcsUsersCreateResponse = { acs_user: AcsUser } +/** + * Request returned by `SeamHttpAcsUsers.create`. + */ export type AcsUsersCreateRequest = SeamHttpRequest< AcsUsersCreateResponse, 'acs_user' > +/** + * Options for `SeamHttpAcsUsers.create`. + */ export interface AcsUsersCreateOptions {} +/** + * Parameters for `SeamHttpAcsUsers.delete`. + */ export type AcsUsersDeleteParameters = { /** * ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. @@ -433,14 +499,25 @@ export type AcsUsersDeleteParameters = { } /** + * Response from `SeamHttpAcsUsers.delete`. + * * @deprecated Use AcsUsersDeleteRequest instead. */ export type AcsUsersDeleteResponse = void +/** + * Request returned by `SeamHttpAcsUsers.delete`. + */ export type AcsUsersDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsUsers.delete`. + */ export interface AcsUsersDeleteOptions {} +/** + * Parameters for `SeamHttpAcsUsers.get`. + */ export type AcsUsersGetParameters = { /** * ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. @@ -457,17 +534,28 @@ export type AcsUsersGetParameters = { } /** + * Response from `SeamHttpAcsUsers.get`. + * * @deprecated Use AcsUsersGetRequest instead. */ export type AcsUsersGetResponse = { acs_user: AcsUser } +/** + * Request returned by `SeamHttpAcsUsers.get`. + */ export type AcsUsersGetRequest = SeamHttpRequest< AcsUsersGetResponse, 'acs_user' > +/** + * Options for `SeamHttpAcsUsers.get`. + */ export interface AcsUsersGetOptions {} +/** + * Parameters for `SeamHttpAcsUsers.list`. + */ export type AcsUsersListParameters = { /** * ID of the `acs_system` for which you want to retrieve all access system users. @@ -504,17 +592,28 @@ export type AcsUsersListParameters = { } /** + * Response from `SeamHttpAcsUsers.list`. + * * @deprecated Use AcsUsersListRequest instead. */ export type AcsUsersListResponse = { acs_users: Array } +/** + * Request returned by `SeamHttpAcsUsers.list`. + */ export type AcsUsersListRequest = SeamHttpRequest< AcsUsersListResponse, 'acs_users' > +/** + * Options for `SeamHttpAcsUsers.list`. + */ export interface AcsUsersListOptions {} +/** + * Parameters for `SeamHttpAcsUsers.listAccessibleEntrances`. + */ export type AcsUsersListAccessibleEntrancesParameters = { /** * ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. @@ -531,19 +630,30 @@ export type AcsUsersListAccessibleEntrancesParameters = { } /** + * Response from `SeamHttpAcsUsers.listAccessibleEntrances`. + * * @deprecated Use AcsUsersListAccessibleEntrancesRequest instead. */ export type AcsUsersListAccessibleEntrancesResponse = { acs_entrances: Array } +/** + * Request returned by `SeamHttpAcsUsers.listAccessibleEntrances`. + */ export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< AcsUsersListAccessibleEntrancesResponse, 'acs_entrances' > +/** + * Options for `SeamHttpAcsUsers.listAccessibleEntrances`. + */ export interface AcsUsersListAccessibleEntrancesOptions {} +/** + * Parameters for `SeamHttpAcsUsers.removeFromAccessGroup`. + */ export type AcsUsersRemoveFromAccessGroupParameters = { /** * ID of the access group from which you want to remove an access system user. @@ -561,17 +671,28 @@ export type AcsUsersRemoveFromAccessGroupParameters = { } /** + * Response from `SeamHttpAcsUsers.removeFromAccessGroup`. + * * @deprecated Use AcsUsersRemoveFromAccessGroupRequest instead. */ export type AcsUsersRemoveFromAccessGroupResponse = void +/** + * Request returned by `SeamHttpAcsUsers.removeFromAccessGroup`. + */ export type AcsUsersRemoveFromAccessGroupRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpAcsUsers.removeFromAccessGroup`. + */ export interface AcsUsersRemoveFromAccessGroupOptions {} +/** + * Parameters for `SeamHttpAcsUsers.revokeAccessToAllEntrances`. + */ export type AcsUsersRevokeAccessToAllEntrancesParameters = { /** * ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. @@ -588,17 +709,28 @@ export type AcsUsersRevokeAccessToAllEntrancesParameters = { } /** + * Response from `SeamHttpAcsUsers.revokeAccessToAllEntrances`. + * * @deprecated Use AcsUsersRevokeAccessToAllEntrancesRequest instead. */ export type AcsUsersRevokeAccessToAllEntrancesResponse = void +/** + * Request returned by `SeamHttpAcsUsers.revokeAccessToAllEntrances`. + */ export type AcsUsersRevokeAccessToAllEntrancesRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpAcsUsers.revokeAccessToAllEntrances`. + */ export interface AcsUsersRevokeAccessToAllEntrancesOptions {} +/** + * Parameters for `SeamHttpAcsUsers.suspend`. + */ export type AcsUsersSuspendParameters = { /** * ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. @@ -615,14 +747,25 @@ export type AcsUsersSuspendParameters = { } /** + * Response from `SeamHttpAcsUsers.suspend`. + * * @deprecated Use AcsUsersSuspendRequest instead. */ export type AcsUsersSuspendResponse = void +/** + * Request returned by `SeamHttpAcsUsers.suspend`. + */ export type AcsUsersSuspendRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsUsers.suspend`. + */ export interface AcsUsersSuspendOptions {} +/** + * Parameters for `SeamHttpAcsUsers.unsuspend`. + */ export type AcsUsersUnsuspendParameters = { /** * ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. @@ -639,14 +782,25 @@ export type AcsUsersUnsuspendParameters = { } /** + * Response from `SeamHttpAcsUsers.unsuspend`. + * * @deprecated Use AcsUsersUnsuspendRequest instead. */ export type AcsUsersUnsuspendResponse = void +/** + * Request returned by `SeamHttpAcsUsers.unsuspend`. + */ export type AcsUsersUnsuspendRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsUsers.unsuspend`. + */ export interface AcsUsersUnsuspendOptions {} +/** + * Parameters for `SeamHttpAcsUsers.update`. + */ export type AcsUsersUpdateParameters = { /** * `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. @@ -698,10 +852,18 @@ export type AcsUsersUpdateParameters = { } /** + * Response from `SeamHttpAcsUsers.update`. + * * @deprecated Use AcsUsersUpdateRequest instead. */ export type AcsUsersUpdateResponse = void +/** + * Request returned by `SeamHttpAcsUsers.update`. + */ export type AcsUsersUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpAcsUsers.update`. + */ export interface AcsUsersUpdateOptions {} diff --git a/src/lib/routes/action-attempts/action-attempts.ts b/src/lib/routes/action-attempts/action-attempts.ts index 2a8e2072..7a861539 100644 --- a/src/lib/routes/action-attempts/action-attempts.ts +++ b/src/lib/routes/action-attempts/action-attempts.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /action_attempts routes. + */ export class SeamHttpActionAttempts { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpActionAttempts { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpActionAttempts from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpActionAttempts { return new SeamHttpActionAttempts(constructorOptions) } + /** + * Creates a new SeamHttpActionAttempts authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpActionAttempts { return new SeamHttpActionAttempts(constructorOptions) } + /** + * Creates a new SeamHttpActionAttempts authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpActionAttempts { return new SeamHttpActionAttempts(constructorOptions) } + /** + * Creates a new SeamHttpActionAttempts authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpActionAttempts { return SeamHttpActionAttempts.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpActionAttempts authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpActionAttempts { return new SeamHttpActionAttempts(constructorOptions) } + /** + * Creates a new SeamHttpActionAttempts authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpActionAttempts { return new SeamHttpActionAttempts(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -195,6 +236,9 @@ export class SeamHttpActionAttempts { } } +/** + * Parameters for `SeamHttpActionAttempts.get`. + */ export type ActionAttemptsGetParameters = { /** * ID of the action attempt that you want to get. @@ -203,20 +247,31 @@ export type ActionAttemptsGetParameters = { } /** + * Response from `SeamHttpActionAttempts.get`. + * * @deprecated Use ActionAttemptsGetRequest instead. */ export type ActionAttemptsGetResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpActionAttempts.get`. + */ export type ActionAttemptsGetRequest = SeamHttpRequest< ActionAttemptsGetResponse, 'action_attempt' > +/** + * Options for `SeamHttpActionAttempts.get`. + */ export type ActionAttemptsGetOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpActionAttempts.list`. + */ export type ActionAttemptsListParameters = { /** * IDs of the action attempts that you want to retrieve. @@ -237,15 +292,23 @@ export type ActionAttemptsListParameters = { } /** + * Response from `SeamHttpActionAttempts.list`. + * * @deprecated Use ActionAttemptsListRequest instead. */ export type ActionAttemptsListResponse = { action_attempts: Array } +/** + * Request returned by `SeamHttpActionAttempts.list`. + */ export type ActionAttemptsListRequest = SeamHttpRequest< ActionAttemptsListResponse, 'action_attempts' > +/** + * Options for `SeamHttpActionAttempts.list`. + */ export interface ActionAttemptsListOptions {} diff --git a/src/lib/routes/client-sessions/client-sessions.ts b/src/lib/routes/client-sessions/client-sessions.ts index 1ab7b029..74347fca 100644 --- a/src/lib/routes/client-sessions/client-sessions.ts +++ b/src/lib/routes/client-sessions/client-sessions.ts @@ -32,8 +32,18 @@ import type { ClientSession } from 'lib/resources/client-session.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /client_sessions routes. + */ export class SeamHttpClientSessions { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpClientSessions { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpClientSessions from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpClientSessions { return new SeamHttpClientSessions(constructorOptions) } + /** + * Creates a new SeamHttpClientSessions authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpClientSessions { return new SeamHttpClientSessions(constructorOptions) } + /** + * Creates a new SeamHttpClientSessions authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpClientSessions { return new SeamHttpClientSessions(constructorOptions) } + /** + * Creates a new SeamHttpClientSessions authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -98,6 +122,10 @@ export class SeamHttpClientSessions { return SeamHttpClientSessions.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpClientSessions authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -115,6 +143,10 @@ export class SeamHttpClientSessions { return new SeamHttpClientSessions(constructorOptions) } + /** + * Creates a new SeamHttpClientSessions authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -132,12 +164,21 @@ export class SeamHttpClientSessions { return new SeamHttpClientSessions(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -272,6 +313,9 @@ export class SeamHttpClientSessions { } } +/** + * Parameters for `SeamHttpClientSessions.create`. + */ export type ClientSessionsCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session. @@ -303,23 +347,35 @@ export type ClientSessionsCreateParameters = { user_identity_id?: string | undefined /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * * @deprecated Use `user_identity_id` instead. */ user_identity_ids?: Array | undefined } /** + * Response from `SeamHttpClientSessions.create`. + * * @deprecated Use ClientSessionsCreateRequest instead. */ export type ClientSessionsCreateResponse = { client_session: ClientSession } +/** + * Request returned by `SeamHttpClientSessions.create`. + */ export type ClientSessionsCreateRequest = SeamHttpRequest< ClientSessionsCreateResponse, 'client_session' > +/** + * Options for `SeamHttpClientSessions.create`. + */ export interface ClientSessionsCreateOptions {} +/** + * Parameters for `SeamHttpClientSessions.delete`. + */ export type ClientSessionsDeleteParameters = { /** * ID of the client session that you want to delete. @@ -328,14 +384,25 @@ export type ClientSessionsDeleteParameters = { } /** + * Response from `SeamHttpClientSessions.delete`. + * * @deprecated Use ClientSessionsDeleteRequest instead. */ export type ClientSessionsDeleteResponse = void +/** + * Request returned by `SeamHttpClientSessions.delete`. + */ export type ClientSessionsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpClientSessions.delete`. + */ export interface ClientSessionsDeleteOptions {} +/** + * Parameters for `SeamHttpClientSessions.get`. + */ export type ClientSessionsGetParameters = { /** * ID of the client session that you want to get. @@ -348,17 +415,28 @@ export type ClientSessionsGetParameters = { } /** + * Response from `SeamHttpClientSessions.get`. + * * @deprecated Use ClientSessionsGetRequest instead. */ export type ClientSessionsGetResponse = { client_session: ClientSession } +/** + * Request returned by `SeamHttpClientSessions.get`. + */ export type ClientSessionsGetRequest = SeamHttpRequest< ClientSessionsGetResponse, 'client_session' > +/** + * Options for `SeamHttpClientSessions.get`. + */ export interface ClientSessionsGetOptions {} +/** + * Parameters for `SeamHttpClientSessions.getOrCreate`. + */ export type ClientSessionsGetOrCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). @@ -382,25 +460,37 @@ export type ClientSessionsGetOrCreateParameters = { user_identity_id?: string | undefined /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * * @deprecated Use `user_identity_id`. */ user_identity_ids?: Array | undefined } /** + * Response from `SeamHttpClientSessions.getOrCreate`. + * * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ export type ClientSessionsGetOrCreateResponse = { client_session: ClientSession } +/** + * Request returned by `SeamHttpClientSessions.getOrCreate`. + */ export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< ClientSessionsGetOrCreateResponse, 'client_session' > +/** + * Options for `SeamHttpClientSessions.getOrCreate`. + */ export interface ClientSessionsGetOrCreateOptions {} +/** + * Parameters for `SeamHttpClientSessions.grantAccess`. + */ export type ClientSessionsGrantAccessParameters = { /** * ID of the client session to which you want to grant access to resources. @@ -424,20 +514,32 @@ export type ClientSessionsGrantAccessParameters = { user_identity_id?: string | undefined /** * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * * @deprecated Use `user_identity_id`. */ user_identity_ids?: Array | undefined } /** + * Response from `SeamHttpClientSessions.grantAccess`. + * * @deprecated Use ClientSessionsGrantAccessRequest instead. */ export type ClientSessionsGrantAccessResponse = void +/** + * Request returned by `SeamHttpClientSessions.grantAccess`. + */ export type ClientSessionsGrantAccessRequest = SeamHttpRequest +/** + * Options for `SeamHttpClientSessions.grantAccess`. + */ export interface ClientSessionsGrantAccessOptions {} +/** + * Parameters for `SeamHttpClientSessions.list`. + */ export type ClientSessionsListParameters = { /** * ID of the client session that you want to retrieve. @@ -462,19 +564,30 @@ export type ClientSessionsListParameters = { } /** + * Response from `SeamHttpClientSessions.list`. + * * @deprecated Use ClientSessionsListRequest instead. */ export type ClientSessionsListResponse = { client_sessions: Array } +/** + * Request returned by `SeamHttpClientSessions.list`. + */ export type ClientSessionsListRequest = SeamHttpRequest< ClientSessionsListResponse, 'client_sessions' > +/** + * Options for `SeamHttpClientSessions.list`. + */ export interface ClientSessionsListOptions {} +/** + * Parameters for `SeamHttpClientSessions.revoke`. + */ export type ClientSessionsRevokeParameters = { /** * ID of the client session that you want to revoke. @@ -483,10 +596,18 @@ export type ClientSessionsRevokeParameters = { } /** + * Response from `SeamHttpClientSessions.revoke`. + * * @deprecated Use ClientSessionsRevokeRequest instead. */ export type ClientSessionsRevokeResponse = void +/** + * Request returned by `SeamHttpClientSessions.revoke`. + */ export type ClientSessionsRevokeRequest = SeamHttpRequest +/** + * Options for `SeamHttpClientSessions.revoke`. + */ export interface ClientSessionsRevokeOptions {} diff --git a/src/lib/routes/connect-webviews/connect-webviews.ts b/src/lib/routes/connect-webviews/connect-webviews.ts index 306e5179..29a2d737 100644 --- a/src/lib/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/routes/connect-webviews/connect-webviews.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /connect_webviews routes. + */ export class SeamHttpConnectWebviews { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpConnectWebviews { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpConnectWebviews from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpConnectWebviews { return new SeamHttpConnectWebviews(constructorOptions) } + /** + * Creates a new SeamHttpConnectWebviews authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpConnectWebviews { return new SeamHttpConnectWebviews(constructorOptions) } + /** + * Creates a new SeamHttpConnectWebviews authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpConnectWebviews { return new SeamHttpConnectWebviews(constructorOptions) } + /** + * Creates a new SeamHttpConnectWebviews authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpConnectWebviews { return SeamHttpConnectWebviews.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpConnectWebviews authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpConnectWebviews { return new SeamHttpConnectWebviews(constructorOptions) } + /** + * Creates a new SeamHttpConnectWebviews authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpConnectWebviews { return new SeamHttpConnectWebviews(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -233,6 +274,9 @@ export class SeamHttpConnectWebviews { } } +/** + * Parameters for `SeamHttpConnectWebviews.create`. + */ export type ConnectWebviewsCreateParameters = { /** * List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. @@ -361,17 +405,28 @@ export type ConnectWebviewsCreateParameters = { } /** + * Response from `SeamHttpConnectWebviews.create`. + * * @deprecated Use ConnectWebviewsCreateRequest instead. */ export type ConnectWebviewsCreateResponse = { connect_webview: ConnectWebview } +/** + * Request returned by `SeamHttpConnectWebviews.create`. + */ export type ConnectWebviewsCreateRequest = SeamHttpRequest< ConnectWebviewsCreateResponse, 'connect_webview' > +/** + * Options for `SeamHttpConnectWebviews.create`. + */ export interface ConnectWebviewsCreateOptions {} +/** + * Parameters for `SeamHttpConnectWebviews.delete`. + */ export type ConnectWebviewsDeleteParameters = { /** * ID of the Connect Webview that you want to delete. @@ -380,14 +435,25 @@ export type ConnectWebviewsDeleteParameters = { } /** + * Response from `SeamHttpConnectWebviews.delete`. + * * @deprecated Use ConnectWebviewsDeleteRequest instead. */ export type ConnectWebviewsDeleteResponse = void +/** + * Request returned by `SeamHttpConnectWebviews.delete`. + */ export type ConnectWebviewsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpConnectWebviews.delete`. + */ export interface ConnectWebviewsDeleteOptions {} +/** + * Parameters for `SeamHttpConnectWebviews.get`. + */ export type ConnectWebviewsGetParameters = { /** * ID of the Connect Webview that you want to get. @@ -396,17 +462,28 @@ export type ConnectWebviewsGetParameters = { } /** + * Response from `SeamHttpConnectWebviews.get`. + * * @deprecated Use ConnectWebviewsGetRequest instead. */ export type ConnectWebviewsGetResponse = { connect_webview: ConnectWebview } +/** + * Request returned by `SeamHttpConnectWebviews.get`. + */ export type ConnectWebviewsGetRequest = SeamHttpRequest< ConnectWebviewsGetResponse, 'connect_webview' > +/** + * Options for `SeamHttpConnectWebviews.get`. + */ export interface ConnectWebviewsGetOptions {} +/** + * Parameters for `SeamHttpConnectWebviews.list`. + */ export type ConnectWebviewsListParameters = { /** * Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. @@ -435,15 +512,23 @@ export type ConnectWebviewsListParameters = { } /** + * Response from `SeamHttpConnectWebviews.list`. + * * @deprecated Use ConnectWebviewsListRequest instead. */ export type ConnectWebviewsListResponse = { connect_webviews: Array } +/** + * Request returned by `SeamHttpConnectWebviews.list`. + */ export type ConnectWebviewsListRequest = SeamHttpRequest< ConnectWebviewsListResponse, 'connect_webviews' > +/** + * Options for `SeamHttpConnectWebviews.list`. + */ export interface ConnectWebviewsListOptions {} diff --git a/src/lib/routes/connected-accounts/connected-accounts.ts b/src/lib/routes/connected-accounts/connected-accounts.ts index c0fcbf84..d5c75dcc 100644 --- a/src/lib/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/routes/connected-accounts/connected-accounts.ts @@ -35,8 +35,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpConnectedAccountsSimulate } from './simulate/index.js' +/** + * Client for the Seam API /connected_accounts routes. + */ export class SeamHttpConnectedAccounts { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -45,6 +55,9 @@ export class SeamHttpConnectedAccounts { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpConnectedAccounts from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -56,6 +69,9 @@ export class SeamHttpConnectedAccounts { return new SeamHttpConnectedAccounts(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccounts authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -67,6 +83,9 @@ export class SeamHttpConnectedAccounts { return new SeamHttpConnectedAccounts(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccounts authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -81,6 +100,11 @@ export class SeamHttpConnectedAccounts { return new SeamHttpConnectedAccounts(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccounts authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -101,6 +125,10 @@ export class SeamHttpConnectedAccounts { return SeamHttpConnectedAccounts.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpConnectedAccounts authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -118,6 +146,10 @@ export class SeamHttpConnectedAccounts { return new SeamHttpConnectedAccounts(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccounts authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -135,12 +167,21 @@ export class SeamHttpConnectedAccounts { return new SeamHttpConnectedAccounts(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -160,6 +201,9 @@ export class SeamHttpConnectedAccounts { await clientSessions.get() } + /** + * Client for the Seam API /connected_accounts/simulate routes. + */ get simulate(): SeamHttpConnectedAccountsSimulate { return SeamHttpConnectedAccountsSimulate.fromClient( this.client, @@ -252,6 +296,9 @@ export class SeamHttpConnectedAccounts { } } +/** + * Parameters for `SeamHttpConnectedAccounts.delete`. + */ export type ConnectedAccountsDeleteParameters = { /** * ID of the connected account that you want to delete. @@ -260,14 +307,25 @@ export type ConnectedAccountsDeleteParameters = { } /** + * Response from `SeamHttpConnectedAccounts.delete`. + * * @deprecated Use ConnectedAccountsDeleteRequest instead. */ export type ConnectedAccountsDeleteResponse = void +/** + * Request returned by `SeamHttpConnectedAccounts.delete`. + */ export type ConnectedAccountsDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpConnectedAccounts.delete`. + */ export interface ConnectedAccountsDeleteOptions {} +/** + * Parameters for `SeamHttpConnectedAccounts.get`. + */ export type ConnectedAccountsGetParameters = { /** * ID of the connected account that you want to get. @@ -280,19 +338,30 @@ export type ConnectedAccountsGetParameters = { } /** + * Response from `SeamHttpConnectedAccounts.get`. + * * @deprecated Use ConnectedAccountsGetRequest instead. */ export type ConnectedAccountsGetResponse = { connected_account: ConnectedAccount } +/** + * Request returned by `SeamHttpConnectedAccounts.get`. + */ export type ConnectedAccountsGetRequest = SeamHttpRequest< ConnectedAccountsGetResponse, 'connected_account' > +/** + * Options for `SeamHttpConnectedAccounts.get`. + */ export interface ConnectedAccountsGetOptions {} +/** + * Parameters for `SeamHttpConnectedAccounts.list`. + */ export type ConnectedAccountsListParameters = { /** * Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. @@ -325,19 +394,30 @@ export type ConnectedAccountsListParameters = { } /** + * Response from `SeamHttpConnectedAccounts.list`. + * * @deprecated Use ConnectedAccountsListRequest instead. */ export type ConnectedAccountsListResponse = { connected_accounts: Array } +/** + * Request returned by `SeamHttpConnectedAccounts.list`. + */ export type ConnectedAccountsListRequest = SeamHttpRequest< ConnectedAccountsListResponse, 'connected_accounts' > +/** + * Options for `SeamHttpConnectedAccounts.list`. + */ export interface ConnectedAccountsListOptions {} +/** + * Parameters for `SeamHttpConnectedAccounts.sync`. + */ export type ConnectedAccountsSyncParameters = { /** * ID of the connected account that you want to sync. @@ -346,14 +426,25 @@ export type ConnectedAccountsSyncParameters = { } /** + * Response from `SeamHttpConnectedAccounts.sync`. + * * @deprecated Use ConnectedAccountsSyncRequest instead. */ export type ConnectedAccountsSyncResponse = void +/** + * Request returned by `SeamHttpConnectedAccounts.sync`. + */ export type ConnectedAccountsSyncRequest = SeamHttpRequest +/** + * Options for `SeamHttpConnectedAccounts.sync`. + */ export interface ConnectedAccountsSyncOptions {} +/** + * Parameters for `SeamHttpConnectedAccounts.update`. + */ export type ConnectedAccountsUpdateParameters = { /** * List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. @@ -387,10 +478,18 @@ export type ConnectedAccountsUpdateParameters = { } /** + * Response from `SeamHttpConnectedAccounts.update`. + * * @deprecated Use ConnectedAccountsUpdateRequest instead. */ export type ConnectedAccountsUpdateResponse = void +/** + * Request returned by `SeamHttpConnectedAccounts.update`. + */ export type ConnectedAccountsUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpConnectedAccounts.update`. + */ export interface ConnectedAccountsUpdateOptions {} diff --git a/src/lib/routes/connected-accounts/simulate/simulate.ts b/src/lib/routes/connected-accounts/simulate/simulate.ts index 61f2be0d..02266c20 100644 --- a/src/lib/routes/connected-accounts/simulate/simulate.ts +++ b/src/lib/routes/connected-accounts/simulate/simulate.ts @@ -32,8 +32,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /connected_accounts/simulate routes. + */ export class SeamHttpConnectedAccountsSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpConnectedAccountsSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpConnectedAccountsSimulate { return new SeamHttpConnectedAccountsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpConnectedAccountsSimulate { return new SeamHttpConnectedAccountsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpConnectedAccountsSimulate { return new SeamHttpConnectedAccountsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -101,6 +125,10 @@ export class SeamHttpConnectedAccountsSimulate { ) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -118,6 +146,10 @@ export class SeamHttpConnectedAccountsSimulate { return new SeamHttpConnectedAccountsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpConnectedAccountsSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -135,12 +167,21 @@ export class SeamHttpConnectedAccountsSimulate { return new SeamHttpConnectedAccountsSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -177,6 +218,9 @@ export class SeamHttpConnectedAccountsSimulate { } } +/** + * Parameters for `SeamHttpConnectedAccountsSimulate.disconnect`. + */ export type ConnectedAccountsSimulateDisconnectParameters = { /** * ID of the connected account you want to simulate as disconnected. @@ -185,13 +229,21 @@ export type ConnectedAccountsSimulateDisconnectParameters = { } /** + * Response from `SeamHttpConnectedAccountsSimulate.disconnect`. + * * @deprecated Use ConnectedAccountsSimulateDisconnectRequest instead. */ export type ConnectedAccountsSimulateDisconnectResponse = void +/** + * Request returned by `SeamHttpConnectedAccountsSimulate.disconnect`. + */ export type ConnectedAccountsSimulateDisconnectRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpConnectedAccountsSimulate.disconnect`. + */ export interface ConnectedAccountsSimulateDisconnectOptions {} diff --git a/src/lib/routes/customers/customers.ts b/src/lib/routes/customers/customers.ts index c7543e86..9010356e 100644 --- a/src/lib/routes/customers/customers.ts +++ b/src/lib/routes/customers/customers.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /customers routes. + */ export class SeamHttpCustomers { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpCustomers { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpCustomers from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpCustomers { return new SeamHttpCustomers(constructorOptions) } + /** + * Creates a new SeamHttpCustomers authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpCustomers { return new SeamHttpCustomers(constructorOptions) } + /** + * Creates a new SeamHttpCustomers authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpCustomers { return new SeamHttpCustomers(constructorOptions) } + /** + * Creates a new SeamHttpCustomers authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpCustomers { return SeamHttpCustomers.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpCustomers authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpCustomers { return new SeamHttpCustomers(constructorOptions) } + /** + * Creates a new SeamHttpCustomers authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpCustomers { return new SeamHttpCustomers(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -208,6 +249,9 @@ export class SeamHttpCustomers { } } +/** + * Parameters for `SeamHttpCustomers.createPortal`. + */ export type CustomersCreatePortalParameters = { /** * Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. @@ -1087,17 +1131,28 @@ export type CustomersCreatePortalParameters = { } /** + * Response from `SeamHttpCustomers.createPortal`. + * * @deprecated Use CustomersCreatePortalRequest instead. */ export type CustomersCreatePortalResponse = { customer_portal: CustomerPortal } +/** + * Request returned by `SeamHttpCustomers.createPortal`. + */ export type CustomersCreatePortalRequest = SeamHttpRequest< CustomersCreatePortalResponse, 'customer_portal' > +/** + * Options for `SeamHttpCustomers.createPortal`. + */ export interface CustomersCreatePortalOptions {} +/** + * Parameters for `SeamHttpCustomers.deleteData`. + */ export type CustomersDeleteDataParameters = { /** * List of access grant keys to delete. @@ -1178,14 +1233,25 @@ export type CustomersDeleteDataParameters = { } /** + * Response from `SeamHttpCustomers.deleteData`. + * * @deprecated Use CustomersDeleteDataRequest instead. */ export type CustomersDeleteDataResponse = void +/** + * Request returned by `SeamHttpCustomers.deleteData`. + */ export type CustomersDeleteDataRequest = SeamHttpRequest +/** + * Options for `SeamHttpCustomers.deleteData`. + */ export interface CustomersDeleteDataOptions {} +/** + * Parameters for `SeamHttpCustomers.pushData`. + */ export type CustomersPushDataParameters = { /** * List of access grants. @@ -1826,10 +1892,18 @@ export type CustomersPushDataParameters = { } /** + * Response from `SeamHttpCustomers.pushData`. + * * @deprecated Use CustomersPushDataRequest instead. */ export type CustomersPushDataResponse = void +/** + * Request returned by `SeamHttpCustomers.pushData`. + */ export type CustomersPushDataRequest = SeamHttpRequest +/** + * Options for `SeamHttpCustomers.pushData`. + */ export interface CustomersPushDataOptions {} diff --git a/src/lib/routes/devices/devices.ts b/src/lib/routes/devices/devices.ts index e8cd242a..585d07ad 100644 --- a/src/lib/routes/devices/devices.ts +++ b/src/lib/routes/devices/devices.ts @@ -37,8 +37,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpDevicesSimulate } from './simulate/index.js' import { SeamHttpDevicesUnmanaged } from './unmanaged/index.js' +/** + * Client for the Seam API /devices routes. + */ export class SeamHttpDevices { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -47,6 +57,9 @@ export class SeamHttpDevices { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpDevices from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -58,6 +71,9 @@ export class SeamHttpDevices { return new SeamHttpDevices(constructorOptions) } + /** + * Creates a new SeamHttpDevices authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -69,6 +85,9 @@ export class SeamHttpDevices { return new SeamHttpDevices(constructorOptions) } + /** + * Creates a new SeamHttpDevices authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -83,6 +102,11 @@ export class SeamHttpDevices { return new SeamHttpDevices(constructorOptions) } + /** + * Creates a new SeamHttpDevices authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -103,6 +127,10 @@ export class SeamHttpDevices { return SeamHttpDevices.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpDevices authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -120,6 +148,10 @@ export class SeamHttpDevices { return new SeamHttpDevices(constructorOptions) } + /** + * Creates a new SeamHttpDevices authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -137,12 +169,21 @@ export class SeamHttpDevices { return new SeamHttpDevices(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -162,10 +203,16 @@ export class SeamHttpDevices { await clientSessions.get() } + /** + * Client for the Seam API /devices/simulate routes. + */ get simulate(): SeamHttpDevicesSimulate { return SeamHttpDevicesSimulate.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /devices/unmanaged routes. + */ get unmanaged(): SeamHttpDevicesUnmanaged { return SeamHttpDevicesUnmanaged.fromClient(this.client, this.defaults) } @@ -259,6 +306,9 @@ export class SeamHttpDevices { } } +/** + * Parameters for `SeamHttpDevices.get`. + */ export type DevicesGetParameters = { /** * ID of the device that you want to get. @@ -271,14 +321,25 @@ export type DevicesGetParameters = { } /** + * Response from `SeamHttpDevices.get`. + * * @deprecated Use DevicesGetRequest instead. */ export type DevicesGetResponse = { device: Device } +/** + * Request returned by `SeamHttpDevices.get`. + */ export type DevicesGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevices.get`. + */ export interface DevicesGetOptions {} +/** + * Parameters for `SeamHttpDevices.list`. + */ export type DevicesListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -487,14 +548,25 @@ export type DevicesListParameters = { } /** + * Response from `SeamHttpDevices.list`. + * * @deprecated Use DevicesListRequest instead. */ export type DevicesListResponse = { devices: Array } +/** + * Request returned by `SeamHttpDevices.list`. + */ export type DevicesListRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevices.list`. + */ export interface DevicesListOptions {} +/** + * Parameters for `SeamHttpDevices.listDeviceProviders`. + */ export type DevicesListDeviceProvidersParameters = { /** * Category for which you want to list providers. @@ -512,19 +584,30 @@ export type DevicesListDeviceProvidersParameters = { } /** + * Response from `SeamHttpDevices.listDeviceProviders`. + * * @deprecated Use DevicesListDeviceProvidersRequest instead. */ export type DevicesListDeviceProvidersResponse = { device_providers: Array } +/** + * Request returned by `SeamHttpDevices.listDeviceProviders`. + */ export type DevicesListDeviceProvidersRequest = SeamHttpRequest< DevicesListDeviceProvidersResponse, 'device_providers' > +/** + * Options for `SeamHttpDevices.listDeviceProviders`. + */ export interface DevicesListDeviceProvidersOptions {} +/** + * Parameters for `SeamHttpDevices.reportProviderMetadata`. + */ export type DevicesReportProviderMetadataParameters = { /** * Array of devices with provider metadata to update @@ -1861,17 +1944,28 @@ export type DevicesReportProviderMetadataParameters = { } /** + * Response from `SeamHttpDevices.reportProviderMetadata`. + * * @deprecated Use DevicesReportProviderMetadataRequest instead. */ export type DevicesReportProviderMetadataResponse = void +/** + * Request returned by `SeamHttpDevices.reportProviderMetadata`. + */ export type DevicesReportProviderMetadataRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpDevices.reportProviderMetadata`. + */ export interface DevicesReportProviderMetadataOptions {} +/** + * Parameters for `SeamHttpDevices.update`. + */ export type DevicesUpdateParameters = { /** * Indicates whether the device's [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. @@ -1906,10 +2000,18 @@ export type DevicesUpdateParameters = { } /** + * Response from `SeamHttpDevices.update`. + * * @deprecated Use DevicesUpdateRequest instead. */ export type DevicesUpdateResponse = void +/** + * Request returned by `SeamHttpDevices.update`. + */ export type DevicesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevices.update`. + */ export interface DevicesUpdateOptions {} diff --git a/src/lib/routes/devices/simulate/simulate.ts b/src/lib/routes/devices/simulate/simulate.ts index fba0ebca..fc97c4f0 100644 --- a/src/lib/routes/devices/simulate/simulate.ts +++ b/src/lib/routes/devices/simulate/simulate.ts @@ -32,8 +32,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /devices/simulate routes. + */ export class SeamHttpDevicesSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpDevicesSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpDevicesSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpDevicesSimulate { return new SeamHttpDevicesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpDevicesSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpDevicesSimulate { return new SeamHttpDevicesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpDevicesSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpDevicesSimulate { return new SeamHttpDevicesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpDevicesSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -98,6 +122,10 @@ export class SeamHttpDevicesSimulate { return SeamHttpDevicesSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpDevicesSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -115,6 +143,10 @@ export class SeamHttpDevicesSimulate { return new SeamHttpDevicesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpDevicesSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -132,12 +164,21 @@ export class SeamHttpDevicesSimulate { return new SeamHttpDevicesSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -263,6 +304,9 @@ export class SeamHttpDevicesSimulate { } } +/** + * Parameters for `SeamHttpDevicesSimulate.connect`. + */ export type DevicesSimulateConnectParameters = { /** * ID of the device that you want to simulate connecting to Seam. @@ -271,14 +315,25 @@ export type DevicesSimulateConnectParameters = { } /** + * Response from `SeamHttpDevicesSimulate.connect`. + * * @deprecated Use DevicesSimulateConnectRequest instead. */ export type DevicesSimulateConnectResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.connect`. + */ export type DevicesSimulateConnectRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevicesSimulate.connect`. + */ export interface DevicesSimulateConnectOptions {} +/** + * Parameters for `SeamHttpDevicesSimulate.connectToHub`. + */ export type DevicesSimulateConnectToHubParameters = { /** * ID of the device whose hub you want to reconnect. @@ -287,17 +342,28 @@ export type DevicesSimulateConnectToHubParameters = { } /** + * Response from `SeamHttpDevicesSimulate.connectToHub`. + * * @deprecated Use DevicesSimulateConnectToHubRequest instead. */ export type DevicesSimulateConnectToHubResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.connectToHub`. + */ export type DevicesSimulateConnectToHubRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpDevicesSimulate.connectToHub`. + */ export interface DevicesSimulateConnectToHubOptions {} +/** + * Parameters for `SeamHttpDevicesSimulate.disconnect`. + */ export type DevicesSimulateDisconnectParameters = { /** * ID of the device that you want to simulate disconnecting from Seam. @@ -306,14 +372,25 @@ export type DevicesSimulateDisconnectParameters = { } /** + * Response from `SeamHttpDevicesSimulate.disconnect`. + * * @deprecated Use DevicesSimulateDisconnectRequest instead. */ export type DevicesSimulateDisconnectResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.disconnect`. + */ export type DevicesSimulateDisconnectRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevicesSimulate.disconnect`. + */ export interface DevicesSimulateDisconnectOptions {} +/** + * Parameters for `SeamHttpDevicesSimulate.disconnectFromHub`. + */ export type DevicesSimulateDisconnectFromHubParameters = { /** * ID of the device whose hub you want to disconnect. @@ -322,17 +399,28 @@ export type DevicesSimulateDisconnectFromHubParameters = { } /** + * Response from `SeamHttpDevicesSimulate.disconnectFromHub`. + * * @deprecated Use DevicesSimulateDisconnectFromHubRequest instead. */ export type DevicesSimulateDisconnectFromHubResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.disconnectFromHub`. + */ export type DevicesSimulateDisconnectFromHubRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpDevicesSimulate.disconnectFromHub`. + */ export interface DevicesSimulateDisconnectFromHubOptions {} +/** + * Parameters for `SeamHttpDevicesSimulate.paidSubscription`. + */ export type DevicesSimulatePaidSubscriptionParameters = { device_id: string @@ -340,17 +428,28 @@ export type DevicesSimulatePaidSubscriptionParameters = { } /** + * Response from `SeamHttpDevicesSimulate.paidSubscription`. + * * @deprecated Use DevicesSimulatePaidSubscriptionRequest instead. */ export type DevicesSimulatePaidSubscriptionResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.paidSubscription`. + */ export type DevicesSimulatePaidSubscriptionRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpDevicesSimulate.paidSubscription`. + */ export interface DevicesSimulatePaidSubscriptionOptions {} +/** + * Parameters for `SeamHttpDevicesSimulate.remove`. + */ export type DevicesSimulateRemoveParameters = { /** * ID of the device that you want to simulate removing from Seam. @@ -359,10 +458,18 @@ export type DevicesSimulateRemoveParameters = { } /** + * Response from `SeamHttpDevicesSimulate.remove`. + * * @deprecated Use DevicesSimulateRemoveRequest instead. */ export type DevicesSimulateRemoveResponse = void +/** + * Request returned by `SeamHttpDevicesSimulate.remove`. + */ export type DevicesSimulateRemoveRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevicesSimulate.remove`. + */ export interface DevicesSimulateRemoveOptions {} diff --git a/src/lib/routes/devices/unmanaged/unmanaged.ts b/src/lib/routes/devices/unmanaged/unmanaged.ts index 828b6d60..72c94f24 100644 --- a/src/lib/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/routes/devices/unmanaged/unmanaged.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /devices/unmanaged routes. + */ export class SeamHttpDevicesUnmanaged { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpDevicesUnmanaged { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpDevicesUnmanaged from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpDevicesUnmanaged { return new SeamHttpDevicesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpDevicesUnmanaged authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpDevicesUnmanaged { return new SeamHttpDevicesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpDevicesUnmanaged authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpDevicesUnmanaged { return new SeamHttpDevicesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpDevicesUnmanaged authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpDevicesUnmanaged { return SeamHttpDevicesUnmanaged.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpDevicesUnmanaged authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpDevicesUnmanaged { return new SeamHttpDevicesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpDevicesUnmanaged authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpDevicesUnmanaged { return new SeamHttpDevicesUnmanaged(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -215,6 +256,9 @@ export class SeamHttpDevicesUnmanaged { } } +/** + * Parameters for `SeamHttpDevicesUnmanaged.get`. + */ export type DevicesUnmanagedGetParameters = { /** * ID of the unmanaged device that you want to get. @@ -227,17 +271,28 @@ export type DevicesUnmanagedGetParameters = { } /** + * Response from `SeamHttpDevicesUnmanaged.get`. + * * @deprecated Use DevicesUnmanagedGetRequest instead. */ export type DevicesUnmanagedGetResponse = { device: UnmanagedDevice } +/** + * Request returned by `SeamHttpDevicesUnmanaged.get`. + */ export type DevicesUnmanagedGetRequest = SeamHttpRequest< DevicesUnmanagedGetResponse, 'device' > +/** + * Options for `SeamHttpDevicesUnmanaged.get`. + */ export interface DevicesUnmanagedGetOptions {} +/** + * Parameters for `SeamHttpDevicesUnmanaged.list`. + */ export type DevicesUnmanagedListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -446,17 +501,28 @@ export type DevicesUnmanagedListParameters = { } /** + * Response from `SeamHttpDevicesUnmanaged.list`. + * * @deprecated Use DevicesUnmanagedListRequest instead. */ export type DevicesUnmanagedListResponse = { devices: Array } +/** + * Request returned by `SeamHttpDevicesUnmanaged.list`. + */ export type DevicesUnmanagedListRequest = SeamHttpRequest< DevicesUnmanagedListResponse, 'devices' > +/** + * Options for `SeamHttpDevicesUnmanaged.list`. + */ export interface DevicesUnmanagedListOptions {} +/** + * Parameters for `SeamHttpDevicesUnmanaged.update`. + */ export type DevicesUnmanagedUpdateParameters = { /** * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. @@ -474,10 +540,18 @@ export type DevicesUnmanagedUpdateParameters = { } /** + * Response from `SeamHttpDevicesUnmanaged.update`. + * * @deprecated Use DevicesUnmanagedUpdateRequest instead. */ export type DevicesUnmanagedUpdateResponse = void +/** + * Request returned by `SeamHttpDevicesUnmanaged.update`. + */ export type DevicesUnmanagedUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpDevicesUnmanaged.update`. + */ export interface DevicesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/events/events.ts b/src/lib/routes/events/events.ts index 81747461..b15f0bac 100644 --- a/src/lib/routes/events/events.ts +++ b/src/lib/routes/events/events.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /events routes. + */ export class SeamHttpEvents { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpEvents { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpEvents from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpEvents { return new SeamHttpEvents(constructorOptions) } + /** + * Creates a new SeamHttpEvents authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpEvents { return new SeamHttpEvents(constructorOptions) } + /** + * Creates a new SeamHttpEvents authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpEvents { return new SeamHttpEvents(constructorOptions) } + /** + * Creates a new SeamHttpEvents authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpEvents { return SeamHttpEvents.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpEvents authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpEvents { return new SeamHttpEvents(constructorOptions) } + /** + * Creates a new SeamHttpEvents authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpEvents { return new SeamHttpEvents(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -191,6 +232,9 @@ export class SeamHttpEvents { } } +/** + * Parameters for `SeamHttpEvents.get`. + */ export type EventsGetParameters = { /** * Unique identifier for the device that triggered the event that you want to get. @@ -207,14 +251,25 @@ export type EventsGetParameters = { } /** + * Response from `SeamHttpEvents.get`. + * * @deprecated Use EventsGetRequest instead. */ export type EventsGetResponse = { event: SeamEvent } +/** + * Request returned by `SeamHttpEvents.get`. + */ export type EventsGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpEvents.get`. + */ export interface EventsGetOptions {} +/** + * Parameters for `SeamHttpEvents.list`. + */ export type EventsListParameters = { /** * ID of the access code for which you want to list events. @@ -553,10 +608,18 @@ export type EventsListParameters = { } /** + * Response from `SeamHttpEvents.list`. + * * @deprecated Use EventsListRequest instead. */ export type EventsListResponse = { events: Array } +/** + * Request returned by `SeamHttpEvents.list`. + */ export type EventsListRequest = SeamHttpRequest +/** + * Options for `SeamHttpEvents.list`. + */ export interface EventsListOptions {} diff --git a/src/lib/routes/instant-keys/instant-keys.ts b/src/lib/routes/instant-keys/instant-keys.ts index 19afde09..27e1e7e9 100644 --- a/src/lib/routes/instant-keys/instant-keys.ts +++ b/src/lib/routes/instant-keys/instant-keys.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /instant_keys routes. + */ export class SeamHttpInstantKeys { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpInstantKeys { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpInstantKeys from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpInstantKeys { return new SeamHttpInstantKeys(constructorOptions) } + /** + * Creates a new SeamHttpInstantKeys authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpInstantKeys { return new SeamHttpInstantKeys(constructorOptions) } + /** + * Creates a new SeamHttpInstantKeys authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpInstantKeys { return new SeamHttpInstantKeys(constructorOptions) } + /** + * Creates a new SeamHttpInstantKeys authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpInstantKeys { return SeamHttpInstantKeys.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpInstantKeys authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpInstantKeys { return new SeamHttpInstantKeys(constructorOptions) } + /** + * Creates a new SeamHttpInstantKeys authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpInstantKeys { return new SeamHttpInstantKeys(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -207,6 +248,9 @@ export class SeamHttpInstantKeys { } } +/** + * Parameters for `SeamHttpInstantKeys.delete`. + */ export type InstantKeysDeleteParameters = { /** * ID of the Instant Key that you want to delete. @@ -215,14 +259,25 @@ export type InstantKeysDeleteParameters = { } /** + * Response from `SeamHttpInstantKeys.delete`. + * * @deprecated Use InstantKeysDeleteRequest instead. */ export type InstantKeysDeleteResponse = void +/** + * Request returned by `SeamHttpInstantKeys.delete`. + */ export type InstantKeysDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpInstantKeys.delete`. + */ export interface InstantKeysDeleteOptions {} +/** + * Parameters for `SeamHttpInstantKeys.get`. + */ export type InstantKeysGetParameters = { /** * ID of the instant key to get. @@ -235,17 +290,28 @@ export type InstantKeysGetParameters = { } /** + * Response from `SeamHttpInstantKeys.get`. + * * @deprecated Use InstantKeysGetRequest instead. */ export type InstantKeysGetResponse = { instant_key: InstantKey } +/** + * Request returned by `SeamHttpInstantKeys.get`. + */ export type InstantKeysGetRequest = SeamHttpRequest< InstantKeysGetResponse, 'instant_key' > +/** + * Options for `SeamHttpInstantKeys.get`. + */ export interface InstantKeysGetOptions {} +/** + * Parameters for `SeamHttpInstantKeys.list`. + */ export type InstantKeysListParameters = { /** * ID of the user identity by which you want to filter the list of Instant Keys. @@ -254,13 +320,21 @@ export type InstantKeysListParameters = { } /** + * Response from `SeamHttpInstantKeys.list`. + * * @deprecated Use InstantKeysListRequest instead. */ export type InstantKeysListResponse = { instant_keys: Array } +/** + * Request returned by `SeamHttpInstantKeys.list`. + */ export type InstantKeysListRequest = SeamHttpRequest< InstantKeysListResponse, 'instant_keys' > +/** + * Options for `SeamHttpInstantKeys.list`. + */ export interface InstantKeysListOptions {} diff --git a/src/lib/routes/locks/locks.ts b/src/lib/routes/locks/locks.ts index 9038685f..f91a0536 100644 --- a/src/lib/routes/locks/locks.ts +++ b/src/lib/routes/locks/locks.ts @@ -37,8 +37,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpLocksSimulate } from './simulate/index.js' +/** + * Client for the Seam API /locks routes. + */ export class SeamHttpLocks { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -47,6 +57,9 @@ export class SeamHttpLocks { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpLocks from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -58,6 +71,9 @@ export class SeamHttpLocks { return new SeamHttpLocks(constructorOptions) } + /** + * Creates a new SeamHttpLocks authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -69,6 +85,9 @@ export class SeamHttpLocks { return new SeamHttpLocks(constructorOptions) } + /** + * Creates a new SeamHttpLocks authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -83,6 +102,11 @@ export class SeamHttpLocks { return new SeamHttpLocks(constructorOptions) } + /** + * Creates a new SeamHttpLocks authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -103,6 +127,10 @@ export class SeamHttpLocks { return SeamHttpLocks.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpLocks authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -120,6 +148,10 @@ export class SeamHttpLocks { return new SeamHttpLocks(constructorOptions) } + /** + * Creates a new SeamHttpLocks authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -137,12 +169,21 @@ export class SeamHttpLocks { return new SeamHttpLocks(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -162,6 +203,9 @@ export class SeamHttpLocks { await clientSessions.get() } + /** + * Client for the Seam API /locks/simulate routes. + */ get simulate(): SeamHttpLocksSimulate { return SeamHttpLocksSimulate.fromClient(this.client, this.defaults) } @@ -188,6 +232,7 @@ export class SeamHttpLocks { /** * Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + * * @deprecated Use `/devices/get` instead. */ get( @@ -260,6 +305,9 @@ export class SeamHttpLocks { } } +/** + * Parameters for `SeamHttpLocks.configureAutoLock`. + */ export type LocksConfigureAutoLockParameters = { /** * Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. @@ -277,20 +325,31 @@ export type LocksConfigureAutoLockParameters = { } /** + * Response from `SeamHttpLocks.configureAutoLock`. + * * @deprecated Use LocksConfigureAutoLockRequest instead. */ export type LocksConfigureAutoLockResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpLocks.configureAutoLock`. + */ export type LocksConfigureAutoLockRequest = SeamHttpRequest< LocksConfigureAutoLockResponse, 'action_attempt' > +/** + * Options for `SeamHttpLocks.configureAutoLock`. + */ export type LocksConfigureAutoLockOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpLocks.get`. + */ export type LocksGetParameters = { /** * ID of the lock that you want to get. @@ -303,14 +362,25 @@ export type LocksGetParameters = { } /** + * Response from `SeamHttpLocks.get`. + * * @deprecated Use LocksGetRequest instead. */ export type LocksGetResponse = { device: Device } +/** + * Request returned by `SeamHttpLocks.get`. + */ export type LocksGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpLocks.get`. + */ export interface LocksGetOptions {} +/** + * Parameters for `SeamHttpLocks.list`. + */ export type LocksListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -476,14 +546,25 @@ export type LocksListParameters = { } /** + * Response from `SeamHttpLocks.list`. + * * @deprecated Use LocksListRequest instead. */ export type LocksListResponse = { devices: Array } +/** + * Request returned by `SeamHttpLocks.list`. + */ export type LocksListRequest = SeamHttpRequest +/** + * Options for `SeamHttpLocks.list`. + */ export interface LocksListOptions {} +/** + * Parameters for `SeamHttpLocks.lockDoor`. + */ export type LocksLockDoorParameters = { /** * ID of the lock that you want to lock. @@ -492,20 +573,31 @@ export type LocksLockDoorParameters = { } /** + * Response from `SeamHttpLocks.lockDoor`. + * * @deprecated Use LocksLockDoorRequest instead. */ export type LocksLockDoorResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpLocks.lockDoor`. + */ export type LocksLockDoorRequest = SeamHttpRequest< LocksLockDoorResponse, 'action_attempt' > +/** + * Options for `SeamHttpLocks.lockDoor`. + */ export type LocksLockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpLocks.unlockDoor`. + */ export type LocksUnlockDoorParameters = { /** * ID of the lock that you want to unlock. @@ -514,15 +606,23 @@ export type LocksUnlockDoorParameters = { } /** + * Response from `SeamHttpLocks.unlockDoor`. + * * @deprecated Use LocksUnlockDoorRequest instead. */ export type LocksUnlockDoorResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpLocks.unlockDoor`. + */ export type LocksUnlockDoorRequest = SeamHttpRequest< LocksUnlockDoorResponse, 'action_attempt' > +/** + * Options for `SeamHttpLocks.unlockDoor`. + */ export type LocksUnlockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/locks/simulate/simulate.ts b/src/lib/routes/locks/simulate/simulate.ts index baeb5fd0..673bcd7f 100644 --- a/src/lib/routes/locks/simulate/simulate.ts +++ b/src/lib/routes/locks/simulate/simulate.ts @@ -34,8 +34,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /locks/simulate routes. + */ export class SeamHttpLocksSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -44,6 +54,9 @@ export class SeamHttpLocksSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpLocksSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -55,6 +68,9 @@ export class SeamHttpLocksSimulate { return new SeamHttpLocksSimulate(constructorOptions) } + /** + * Creates a new SeamHttpLocksSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -66,6 +82,9 @@ export class SeamHttpLocksSimulate { return new SeamHttpLocksSimulate(constructorOptions) } + /** + * Creates a new SeamHttpLocksSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -80,6 +99,11 @@ export class SeamHttpLocksSimulate { return new SeamHttpLocksSimulate(constructorOptions) } + /** + * Creates a new SeamHttpLocksSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -100,6 +124,10 @@ export class SeamHttpLocksSimulate { return SeamHttpLocksSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpLocksSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -117,6 +145,10 @@ export class SeamHttpLocksSimulate { return new SeamHttpLocksSimulate(constructorOptions) } + /** + * Creates a new SeamHttpLocksSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -134,12 +166,21 @@ export class SeamHttpLocksSimulate { return new SeamHttpLocksSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -200,6 +241,9 @@ export class SeamHttpLocksSimulate { } } +/** + * Parameters for `SeamHttpLocksSimulate.keypadCodeEntry`. + */ export type LocksSimulateKeypadCodeEntryParameters = { /** * Code that you want to simulate entering on a keypad. @@ -213,22 +257,33 @@ export type LocksSimulateKeypadCodeEntryParameters = { } /** + * Response from `SeamHttpLocksSimulate.keypadCodeEntry`. + * * @deprecated Use LocksSimulateKeypadCodeEntryRequest instead. */ export type LocksSimulateKeypadCodeEntryResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpLocksSimulate.keypadCodeEntry`. + */ export type LocksSimulateKeypadCodeEntryRequest = SeamHttpRequest< LocksSimulateKeypadCodeEntryResponse, 'action_attempt' > +/** + * Options for `SeamHttpLocksSimulate.keypadCodeEntry`. + */ export type LocksSimulateKeypadCodeEntryOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpLocksSimulate.manualLockViaKeypad`. + */ export type LocksSimulateManualLockViaKeypadParameters = { /** * ID of the device for which you want to simulate a manual lock action using a keypad. @@ -237,17 +292,25 @@ export type LocksSimulateManualLockViaKeypadParameters = { } /** + * Response from `SeamHttpLocksSimulate.manualLockViaKeypad`. + * * @deprecated Use LocksSimulateManualLockViaKeypadRequest instead. */ export type LocksSimulateManualLockViaKeypadResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpLocksSimulate.manualLockViaKeypad`. + */ export type LocksSimulateManualLockViaKeypadRequest = SeamHttpRequest< LocksSimulateManualLockViaKeypadResponse, 'action_attempt' > +/** + * Options for `SeamHttpLocksSimulate.manualLockViaKeypad`. + */ export type LocksSimulateManualLockViaKeypadOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/noise-sensors/noise-sensors.ts b/src/lib/routes/noise-sensors/noise-sensors.ts index eeb77a07..15d3a53c 100644 --- a/src/lib/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/routes/noise-sensors/noise-sensors.ts @@ -36,8 +36,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpNoiseSensorsNoiseThresholds } from './noise-thresholds/index.js' import { SeamHttpNoiseSensorsSimulate } from './simulate/index.js' +/** + * Client for the Seam API /noise_sensors routes. + */ export class SeamHttpNoiseSensors { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -46,6 +56,9 @@ export class SeamHttpNoiseSensors { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpNoiseSensors from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -57,6 +70,9 @@ export class SeamHttpNoiseSensors { return new SeamHttpNoiseSensors(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensors authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -68,6 +84,9 @@ export class SeamHttpNoiseSensors { return new SeamHttpNoiseSensors(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensors authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -82,6 +101,11 @@ export class SeamHttpNoiseSensors { return new SeamHttpNoiseSensors(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensors authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpNoiseSensors { return SeamHttpNoiseSensors.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpNoiseSensors authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpNoiseSensors { return new SeamHttpNoiseSensors(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensors authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpNoiseSensors { return new SeamHttpNoiseSensors(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -161,6 +202,9 @@ export class SeamHttpNoiseSensors { await clientSessions.get() } + /** + * Client for the Seam API /noise_sensors/noise_thresholds routes. + */ get noiseThresholds(): SeamHttpNoiseSensorsNoiseThresholds { return SeamHttpNoiseSensorsNoiseThresholds.fromClient( this.client, @@ -168,6 +212,9 @@ export class SeamHttpNoiseSensors { ) } + /** + * Client for the Seam API /noise_sensors/simulate routes. + */ get simulate(): SeamHttpNoiseSensorsSimulate { return SeamHttpNoiseSensorsSimulate.fromClient(this.client, this.defaults) } @@ -189,6 +236,9 @@ export class SeamHttpNoiseSensors { } } +/** + * Parameters for `SeamHttpNoiseSensors.list`. + */ export type NoiseSensorsListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -257,13 +307,21 @@ export type NoiseSensorsListParameters = { } /** + * Response from `SeamHttpNoiseSensors.list`. + * * @deprecated Use NoiseSensorsListRequest instead. */ export type NoiseSensorsListResponse = { devices: Array } +/** + * Request returned by `SeamHttpNoiseSensors.list`. + */ export type NoiseSensorsListRequest = SeamHttpRequest< NoiseSensorsListResponse, 'devices' > +/** + * Options for `SeamHttpNoiseSensors.list`. + */ export interface NoiseSensorsListOptions {} diff --git a/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index 947656f0..097dddea 100644 --- a/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +++ b/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /noise_sensors/noise_thresholds routes. + */ export class SeamHttpNoiseSensorsNoiseThresholds { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpNoiseSensorsNoiseThresholds { return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpNoiseSensorsNoiseThresholds { ) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpNoiseSensorsNoiseThresholds { return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsNoiseThresholds authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpNoiseSensorsNoiseThresholds { return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -242,6 +283,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } } +/** + * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.create`. + */ export type NoiseSensorsNoiseThresholdsCreateParameters = { /** * ID of the device for which you want to create a noise threshold. @@ -272,19 +316,30 @@ export type NoiseSensorsNoiseThresholdsCreateParameters = { } /** + * Response from `SeamHttpNoiseSensorsNoiseThresholds.create`. + * * @deprecated Use NoiseSensorsNoiseThresholdsCreateRequest instead. */ export type NoiseSensorsNoiseThresholdsCreateResponse = { noise_threshold: NoiseThreshold } +/** + * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.create`. + */ export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsCreateResponse, 'noise_threshold' > +/** + * Options for `SeamHttpNoiseSensorsNoiseThresholds.create`. + */ export interface NoiseSensorsNoiseThresholdsCreateOptions {} +/** + * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.delete`. + */ export type NoiseSensorsNoiseThresholdsDeleteParameters = { /** * ID of the device that contains the noise threshold that you want to delete. @@ -298,17 +353,28 @@ export type NoiseSensorsNoiseThresholdsDeleteParameters = { } /** + * Response from `SeamHttpNoiseSensorsNoiseThresholds.delete`. + * * @deprecated Use NoiseSensorsNoiseThresholdsDeleteRequest instead. */ export type NoiseSensorsNoiseThresholdsDeleteResponse = void +/** + * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.delete`. + */ export type NoiseSensorsNoiseThresholdsDeleteRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpNoiseSensorsNoiseThresholds.delete`. + */ export interface NoiseSensorsNoiseThresholdsDeleteOptions {} +/** + * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.get`. + */ export type NoiseSensorsNoiseThresholdsGetParameters = { /** * ID of the noise threshold that you want to get. @@ -317,19 +383,30 @@ export type NoiseSensorsNoiseThresholdsGetParameters = { } /** + * Response from `SeamHttpNoiseSensorsNoiseThresholds.get`. + * * @deprecated Use NoiseSensorsNoiseThresholdsGetRequest instead. */ export type NoiseSensorsNoiseThresholdsGetResponse = { noise_threshold: NoiseThreshold } +/** + * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.get`. + */ export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsGetResponse, 'noise_threshold' > +/** + * Options for `SeamHttpNoiseSensorsNoiseThresholds.get`. + */ export interface NoiseSensorsNoiseThresholdsGetOptions {} +/** + * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.list`. + */ export type NoiseSensorsNoiseThresholdsListParameters = { /** * ID of the device for which you want to list noise thresholds. @@ -338,19 +415,30 @@ export type NoiseSensorsNoiseThresholdsListParameters = { } /** + * Response from `SeamHttpNoiseSensorsNoiseThresholds.list`. + * * @deprecated Use NoiseSensorsNoiseThresholdsListRequest instead. */ export type NoiseSensorsNoiseThresholdsListResponse = { noise_thresholds: Array } +/** + * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.list`. + */ export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsListResponse, 'noise_thresholds' > +/** + * Options for `SeamHttpNoiseSensorsNoiseThresholds.list`. + */ export interface NoiseSensorsNoiseThresholdsListOptions {} +/** + * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.update`. + */ export type NoiseSensorsNoiseThresholdsUpdateParameters = { /** * ID of the device that contains the noise threshold that you want to update. @@ -385,13 +473,21 @@ export type NoiseSensorsNoiseThresholdsUpdateParameters = { } /** + * Response from `SeamHttpNoiseSensorsNoiseThresholds.update`. + * * @deprecated Use NoiseSensorsNoiseThresholdsUpdateRequest instead. */ export type NoiseSensorsNoiseThresholdsUpdateResponse = void +/** + * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.update`. + */ export type NoiseSensorsNoiseThresholdsUpdateRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpNoiseSensorsNoiseThresholds.update`. + */ export interface NoiseSensorsNoiseThresholdsUpdateOptions {} diff --git a/src/lib/routes/noise-sensors/simulate/simulate.ts b/src/lib/routes/noise-sensors/simulate/simulate.ts index bb2ee06c..ffc5631e 100644 --- a/src/lib/routes/noise-sensors/simulate/simulate.ts +++ b/src/lib/routes/noise-sensors/simulate/simulate.ts @@ -32,8 +32,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /noise_sensors/simulate routes. + */ export class SeamHttpNoiseSensorsSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpNoiseSensorsSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpNoiseSensorsSimulate { return new SeamHttpNoiseSensorsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpNoiseSensorsSimulate { return new SeamHttpNoiseSensorsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpNoiseSensorsSimulate { return new SeamHttpNoiseSensorsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -98,6 +122,10 @@ export class SeamHttpNoiseSensorsSimulate { return SeamHttpNoiseSensorsSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -115,6 +143,10 @@ export class SeamHttpNoiseSensorsSimulate { return new SeamHttpNoiseSensorsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpNoiseSensorsSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -132,12 +164,21 @@ export class SeamHttpNoiseSensorsSimulate { return new SeamHttpNoiseSensorsSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -174,6 +215,9 @@ export class SeamHttpNoiseSensorsSimulate { } } +/** + * Parameters for `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. + */ export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { /** * ID of the device for which you want to simulate the triggering of a noise threshold. @@ -182,13 +226,21 @@ export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { } /** + * Response from `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. + * * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdRequest instead. */ export type NoiseSensorsSimulateTriggerNoiseThresholdResponse = void +/** + * Request returned by `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. + */ export type NoiseSensorsSimulateTriggerNoiseThresholdRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. + */ export interface NoiseSensorsSimulateTriggerNoiseThresholdOptions {} diff --git a/src/lib/routes/phones/phones.ts b/src/lib/routes/phones/phones.ts index a7a4a76c..bbbe62f6 100644 --- a/src/lib/routes/phones/phones.ts +++ b/src/lib/routes/phones/phones.ts @@ -35,8 +35,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpPhonesSimulate } from './simulate/index.js' +/** + * Client for the Seam API /phones routes. + */ export class SeamHttpPhones { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -45,6 +55,9 @@ export class SeamHttpPhones { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpPhones from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -56,6 +69,9 @@ export class SeamHttpPhones { return new SeamHttpPhones(constructorOptions) } + /** + * Creates a new SeamHttpPhones authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -67,6 +83,9 @@ export class SeamHttpPhones { return new SeamHttpPhones(constructorOptions) } + /** + * Creates a new SeamHttpPhones authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -81,6 +100,11 @@ export class SeamHttpPhones { return new SeamHttpPhones(constructorOptions) } + /** + * Creates a new SeamHttpPhones authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -101,6 +125,10 @@ export class SeamHttpPhones { return SeamHttpPhones.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpPhones authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -118,6 +146,10 @@ export class SeamHttpPhones { return new SeamHttpPhones(constructorOptions) } + /** + * Creates a new SeamHttpPhones authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -135,12 +167,21 @@ export class SeamHttpPhones { return new SeamHttpPhones(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -160,6 +201,9 @@ export class SeamHttpPhones { await clientSessions.get() } + /** + * Client for the Seam API /phones/simulate routes. + */ get simulate(): SeamHttpPhonesSimulate { return SeamHttpPhonesSimulate.fromClient(this.client, this.defaults) } @@ -213,6 +257,9 @@ export class SeamHttpPhones { } } +/** + * Parameters for `SeamHttpPhones.deactivate`. + */ export type PhonesDeactivateParameters = { /** * Device ID of the phone that you want to deactivate. @@ -221,14 +268,25 @@ export type PhonesDeactivateParameters = { } /** + * Response from `SeamHttpPhones.deactivate`. + * * @deprecated Use PhonesDeactivateRequest instead. */ export type PhonesDeactivateResponse = void +/** + * Request returned by `SeamHttpPhones.deactivate`. + */ export type PhonesDeactivateRequest = SeamHttpRequest +/** + * Options for `SeamHttpPhones.deactivate`. + */ export interface PhonesDeactivateOptions {} +/** + * Parameters for `SeamHttpPhones.get`. + */ export type PhonesGetParameters = { /** * Device ID of the phone that you want to get. @@ -237,14 +295,25 @@ export type PhonesGetParameters = { } /** + * Response from `SeamHttpPhones.get`. + * * @deprecated Use PhonesGetRequest instead. */ export type PhonesGetResponse = { phone: Phone } +/** + * Request returned by `SeamHttpPhones.get`. + */ export type PhonesGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpPhones.get`. + */ export interface PhonesGetOptions {} +/** + * Parameters for `SeamHttpPhones.list`. + */ export type PhonesListParameters = { /** * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. @@ -257,10 +326,18 @@ export type PhonesListParameters = { } /** + * Response from `SeamHttpPhones.list`. + * * @deprecated Use PhonesListRequest instead. */ export type PhonesListResponse = { phones: Array } +/** + * Request returned by `SeamHttpPhones.list`. + */ export type PhonesListRequest = SeamHttpRequest +/** + * Options for `SeamHttpPhones.list`. + */ export interface PhonesListOptions {} diff --git a/src/lib/routes/phones/simulate/simulate.ts b/src/lib/routes/phones/simulate/simulate.ts index 668df9c3..3c189ec1 100644 --- a/src/lib/routes/phones/simulate/simulate.ts +++ b/src/lib/routes/phones/simulate/simulate.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /phones/simulate routes. + */ export class SeamHttpPhonesSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpPhonesSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpPhonesSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpPhonesSimulate { return new SeamHttpPhonesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpPhonesSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpPhonesSimulate { return new SeamHttpPhonesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpPhonesSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpPhonesSimulate { return new SeamHttpPhonesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpPhonesSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpPhonesSimulate { return SeamHttpPhonesSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpPhonesSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpPhonesSimulate { return new SeamHttpPhonesSimulate(constructorOptions) } + /** + * Creates a new SeamHttpPhonesSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpPhonesSimulate { return new SeamHttpPhonesSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -175,6 +216,9 @@ export class SeamHttpPhonesSimulate { } } +/** + * Parameters for `SeamHttpPhonesSimulate.createSandboxPhone`. + */ export type PhonesSimulateCreateSandboxPhoneParameters = { /** * ASSA ABLOY metadata that you want to associate with the simulated phone. @@ -241,13 +285,21 @@ export type PhonesSimulateCreateSandboxPhoneParameters = { } /** + * Response from `SeamHttpPhonesSimulate.createSandboxPhone`. + * * @deprecated Use PhonesSimulateCreateSandboxPhoneRequest instead. */ export type PhonesSimulateCreateSandboxPhoneResponse = { phone: Phone } +/** + * Request returned by `SeamHttpPhonesSimulate.createSandboxPhone`. + */ export type PhonesSimulateCreateSandboxPhoneRequest = SeamHttpRequest< PhonesSimulateCreateSandboxPhoneResponse, 'phone' > +/** + * Options for `SeamHttpPhonesSimulate.createSandboxPhone`. + */ export interface PhonesSimulateCreateSandboxPhoneOptions {} diff --git a/src/lib/routes/seam-http-endpoints-without-workspace.ts b/src/lib/routes/seam-http-endpoints-without-workspace.ts index d27ffa1e..ef65193f 100644 --- a/src/lib/routes/seam-http-endpoints-without-workspace.ts +++ b/src/lib/routes/seam-http-endpoints-without-workspace.ts @@ -30,8 +30,19 @@ import { type WorkspacesListRequest, } from './workspaces/index.js' +/** + * HTTP client for the Seam API not scoped to a workspace + * with endpoints keyed by their path, e.g., `seam.get['/devices/list']()`. + */ export class SeamHttpEndpointsWithoutWorkspace { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { @@ -40,6 +51,9 @@ export class SeamHttpEndpointsWithoutWorkspace { this.defaults = limitToSeamHttpRequestOptions(opts) } + /** + * Creates a new SeamHttpEndpointsWithoutWorkspace from an existing HTTP client. + */ static fromClient( client: SeamHttpWithoutWorkspaceOptionsWithClient['client'], options: Omit = {}, @@ -51,6 +65,10 @@ export class SeamHttpEndpointsWithoutWorkspace { return new SeamHttpEndpointsWithoutWorkspace(constructorOptions) } + /** + * Creates a new SeamHttpEndpointsWithoutWorkspace authenticated with a console session token + * and not scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken['consoleSessionToken'], options: Omit< @@ -71,6 +89,10 @@ export class SeamHttpEndpointsWithoutWorkspace { return new SeamHttpEndpointsWithoutWorkspace(constructorOptions) } + /** + * Creates a new SeamHttpEndpointsWithoutWorkspace authenticated with a personal access token + * and not scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken['personalAccessToken'], options: Omit< @@ -124,6 +146,12 @@ export class SeamHttpEndpointsWithoutWorkspace { } } +/** + * Paths of the Seam API query endpoints available without a workspace. + */ export type SeamHttpEndpointWithoutWorkspaceQueryPaths = '/workspaces/list' +/** + * Paths of the Seam API mutation endpoints available without a workspace. + */ export type SeamHttpEndpointWithoutWorkspaceMutationPaths = '/workspaces/create' diff --git a/src/lib/routes/seam-http-endpoints.ts b/src/lib/routes/seam-http-endpoints.ts index 782880e1..3df9af83 100644 --- a/src/lib/routes/seam-http-endpoints.ts +++ b/src/lib/routes/seam-http-endpoints.ts @@ -758,8 +758,19 @@ import { type WorkspacesUpdateRequest, } from './workspaces/index.js' +/** + * HTTP client for the Seam API + * with endpoints keyed by their path, e.g., `seam.get['/devices/list']()`. + */ export class SeamHttpEndpoints { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -768,6 +779,9 @@ export class SeamHttpEndpoints { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpEndpoints from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -779,6 +793,9 @@ export class SeamHttpEndpoints { return new SeamHttpEndpoints(constructorOptions) } + /** + * Creates a new SeamHttpEndpoints authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -790,6 +807,9 @@ export class SeamHttpEndpoints { return new SeamHttpEndpoints(constructorOptions) } + /** + * Creates a new SeamHttpEndpoints authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -804,6 +824,11 @@ export class SeamHttpEndpoints { return new SeamHttpEndpoints(constructorOptions) } + /** + * Creates a new SeamHttpEndpoints authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -824,6 +849,10 @@ export class SeamHttpEndpoints { return SeamHttpEndpoints.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpEndpoints authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -841,6 +870,10 @@ export class SeamHttpEndpoints { return new SeamHttpEndpoints(constructorOptions) } + /** + * Creates a new SeamHttpEndpoints authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -858,12 +891,21 @@ export class SeamHttpEndpoints { return new SeamHttpEndpoints(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -2928,6 +2970,7 @@ export class SeamHttpEndpoints { /** * Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + * * @deprecated Use `/devices/get` instead. */ get '/locks/get'(): ( @@ -4229,6 +4272,9 @@ export class SeamHttpEndpoints { } } +/** + * Paths of the Seam API query endpoints. + */ export type SeamHttpEndpointQueryPaths = | '/access_codes/generate_code' | '/access_codes/get' @@ -4306,6 +4352,9 @@ export type SeamHttpEndpointQueryPaths = | '/workspaces/get' | '/workspaces/list' +/** + * Paths of the Seam API query endpoints that support pagination. + */ export type SeamHttpEndpointPaginatedQueryPaths = | '/access_codes/list' | '/access_codes/unmanaged/list' @@ -4325,6 +4374,9 @@ export type SeamHttpEndpointPaginatedQueryPaths = | '/user_identities/list' | '/user_identities/unmanaged/list' +/** + * Paths of the Seam API mutation endpoints. + */ export type SeamHttpEndpointMutationPaths = | '/access_codes/create' | '/access_codes/create_multiple' diff --git a/src/lib/routes/seam-http-without-workspace.ts b/src/lib/routes/seam-http-without-workspace.ts index 08aee457..be49442a 100644 --- a/src/lib/routes/seam-http-without-workspace.ts +++ b/src/lib/routes/seam-http-without-workspace.ts @@ -21,8 +21,22 @@ import { } from 'lib/parse-options.js' import { SeamHttpWorkspaces } from 'lib/routes/workspaces/index.js' +/** + * HTTP client for the Seam API not scoped to a workspace. + * + * Use this client to list or create workspaces, + * e.g., when authenticated with a personal access token + * or console session token. + */ export class SeamHttpWithoutWorkspace { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { @@ -31,6 +45,9 @@ export class SeamHttpWithoutWorkspace { this.defaults = limitToSeamHttpRequestOptions(opts) } + /** + * Creates a new SeamHttpWithoutWorkspace from an existing HTTP client. + */ static fromClient( client: SeamHttpWithoutWorkspaceOptionsWithClient['client'], options: Omit = {}, @@ -42,6 +59,10 @@ export class SeamHttpWithoutWorkspace { return new SeamHttpWithoutWorkspace(constructorOptions) } + /** + * Creates a new SeamHttpWithoutWorkspace authenticated with a console session token + * and not scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken['consoleSessionToken'], options: Omit< @@ -62,6 +83,10 @@ export class SeamHttpWithoutWorkspace { return new SeamHttpWithoutWorkspace(constructorOptions) } + /** + * Creates a new SeamHttpWithoutWorkspace authenticated with a personal access token + * and not scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken['personalAccessToken'], options: Omit< @@ -82,6 +107,9 @@ export class SeamHttpWithoutWorkspace { return new SeamHttpWithoutWorkspace(constructorOptions) } + /** + * Client for the Seam API /workspaces routes available without a workspace. + */ get workspaces(): Pick { return SeamHttpWorkspaces.fromClient(this.client, this.defaults) } diff --git a/src/lib/routes/seam-http.ts b/src/lib/routes/seam-http.ts index 8aeda6cf..87fea7b2 100644 --- a/src/lib/routes/seam-http.ts +++ b/src/lib/routes/seam-http.ts @@ -52,8 +52,23 @@ import { SeamHttpUserIdentities } from './user-identities/index.js' import { SeamHttpWebhooks } from './webhooks/index.js' import { SeamHttpWorkspaces } from './workspaces/index.js' +/** + * HTTP client for the Seam API. + * + * Create a client with the constructor + * or one of the static factory methods, e.g., `fromApiKey`. + * Each Seam API route is available under its corresponding property, + * e.g., use `seam.devices.list()` to call the `/devices/list` endpoint. + */ export class SeamHttp { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -62,6 +77,9 @@ export class SeamHttp { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttp from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -73,6 +91,9 @@ export class SeamHttp { return new SeamHttp(constructorOptions) } + /** + * Creates a new SeamHttp authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -84,6 +105,9 @@ export class SeamHttp { return new SeamHttp(constructorOptions) } + /** + * Creates a new SeamHttp authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -98,6 +122,11 @@ export class SeamHttp { return new SeamHttp(constructorOptions) } + /** + * Creates a new SeamHttp authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -118,6 +147,10 @@ export class SeamHttp { return SeamHttp.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttp authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -135,6 +168,10 @@ export class SeamHttp { return new SeamHttp(constructorOptions) } + /** + * Creates a new SeamHttp authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -152,12 +189,21 @@ export class SeamHttp { return new SeamHttp(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -177,82 +223,142 @@ export class SeamHttp { await clientSessions.get() } + /** + * Client for the Seam API /access_codes routes. + */ get accessCodes(): SeamHttpAccessCodes { return SeamHttpAccessCodes.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /access_grants routes. + */ get accessGrants(): SeamHttpAccessGrants { return SeamHttpAccessGrants.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /access_methods routes. + */ get accessMethods(): SeamHttpAccessMethods { return SeamHttpAccessMethods.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /acs routes. + */ get acs(): SeamHttpAcs { return SeamHttpAcs.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /action_attempts routes. + */ get actionAttempts(): SeamHttpActionAttempts { return SeamHttpActionAttempts.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /client_sessions routes. + */ get clientSessions(): SeamHttpClientSessions { return SeamHttpClientSessions.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /connect_webviews routes. + */ get connectWebviews(): SeamHttpConnectWebviews { return SeamHttpConnectWebviews.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /connected_accounts routes. + */ get connectedAccounts(): SeamHttpConnectedAccounts { return SeamHttpConnectedAccounts.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /customers routes. + */ get customers(): SeamHttpCustomers { return SeamHttpCustomers.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /devices routes. + */ get devices(): SeamHttpDevices { return SeamHttpDevices.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /events routes. + */ get events(): SeamHttpEvents { return SeamHttpEvents.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /instant_keys routes. + */ get instantKeys(): SeamHttpInstantKeys { return SeamHttpInstantKeys.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /locks routes. + */ get locks(): SeamHttpLocks { return SeamHttpLocks.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /noise_sensors routes. + */ get noiseSensors(): SeamHttpNoiseSensors { return SeamHttpNoiseSensors.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /phones routes. + */ get phones(): SeamHttpPhones { return SeamHttpPhones.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /spaces routes. + */ get spaces(): SeamHttpSpaces { return SeamHttpSpaces.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /thermostats routes. + */ get thermostats(): SeamHttpThermostats { return SeamHttpThermostats.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /user_identities routes. + */ get userIdentities(): SeamHttpUserIdentities { return SeamHttpUserIdentities.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /webhooks routes. + */ get webhooks(): SeamHttpWebhooks { return SeamHttpWebhooks.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /workspaces routes. + */ get workspaces(): SeamHttpWorkspaces { return SeamHttpWorkspaces.fromClient(this.client, this.defaults) } diff --git a/src/lib/routes/spaces/spaces.ts b/src/lib/routes/spaces/spaces.ts index 9dfa430d..dccbda94 100644 --- a/src/lib/routes/spaces/spaces.ts +++ b/src/lib/routes/spaces/spaces.ts @@ -34,8 +34,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /spaces routes. + */ export class SeamHttpSpaces { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -44,6 +54,9 @@ export class SeamHttpSpaces { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpSpaces from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -55,6 +68,9 @@ export class SeamHttpSpaces { return new SeamHttpSpaces(constructorOptions) } + /** + * Creates a new SeamHttpSpaces authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -66,6 +82,9 @@ export class SeamHttpSpaces { return new SeamHttpSpaces(constructorOptions) } + /** + * Creates a new SeamHttpSpaces authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -80,6 +99,11 @@ export class SeamHttpSpaces { return new SeamHttpSpaces(constructorOptions) } + /** + * Creates a new SeamHttpSpaces authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -100,6 +124,10 @@ export class SeamHttpSpaces { return SeamHttpSpaces.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpSpaces authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -117,6 +145,10 @@ export class SeamHttpSpaces { return new SeamHttpSpaces(constructorOptions) } + /** + * Creates a new SeamHttpSpaces authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -134,12 +166,21 @@ export class SeamHttpSpaces { return new SeamHttpSpaces(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -352,6 +393,9 @@ export class SeamHttpSpaces { } } +/** + * Parameters for `SeamHttpSpaces.addAcsEntrances`. + */ export type SpacesAddAcsEntrancesParameters = { /** * IDs of the entrances that you want to add to the space. @@ -365,14 +409,25 @@ export type SpacesAddAcsEntrancesParameters = { } /** + * Response from `SeamHttpSpaces.addAcsEntrances`. + * * @deprecated Use SpacesAddAcsEntrancesRequest instead. */ export type SpacesAddAcsEntrancesResponse = void +/** + * Request returned by `SeamHttpSpaces.addAcsEntrances`. + */ export type SpacesAddAcsEntrancesRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.addAcsEntrances`. + */ export interface SpacesAddAcsEntrancesOptions {} +/** + * Parameters for `SeamHttpSpaces.addConnectedAccount`. + */ export type SpacesAddConnectedAccountParameters = { /** * ID of the connected account that you want to add to the space. @@ -386,14 +441,25 @@ export type SpacesAddConnectedAccountParameters = { } /** + * Response from `SeamHttpSpaces.addConnectedAccount`. + * * @deprecated Use SpacesAddConnectedAccountRequest instead. */ export type SpacesAddConnectedAccountResponse = void +/** + * Request returned by `SeamHttpSpaces.addConnectedAccount`. + */ export type SpacesAddConnectedAccountRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.addConnectedAccount`. + */ export interface SpacesAddConnectedAccountOptions {} +/** + * Parameters for `SeamHttpSpaces.addDevices`. + */ export type SpacesAddDevicesParameters = { /** * IDs of the devices that you want to add to the space. @@ -407,14 +473,25 @@ export type SpacesAddDevicesParameters = { } /** + * Response from `SeamHttpSpaces.addDevices`. + * * @deprecated Use SpacesAddDevicesRequest instead. */ export type SpacesAddDevicesResponse = void +/** + * Request returned by `SeamHttpSpaces.addDevices`. + */ export type SpacesAddDevicesRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.addDevices`. + */ export interface SpacesAddDevicesOptions {} +/** + * Parameters for `SeamHttpSpaces.create`. + */ export type SpacesCreateParameters = { /** * IDs of the entrances that you want to add to the new space. @@ -467,14 +544,25 @@ export type SpacesCreateParameters = { } /** + * Response from `SeamHttpSpaces.create`. + * * @deprecated Use SpacesCreateRequest instead. */ export type SpacesCreateResponse = { space: Space } +/** + * Request returned by `SeamHttpSpaces.create`. + */ export type SpacesCreateRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.create`. + */ export interface SpacesCreateOptions {} +/** + * Parameters for `SeamHttpSpaces.delete`. + */ export type SpacesDeleteParameters = { /** * ID of the space that you want to delete. @@ -483,14 +571,25 @@ export type SpacesDeleteParameters = { } /** + * Response from `SeamHttpSpaces.delete`. + * * @deprecated Use SpacesDeleteRequest instead. */ export type SpacesDeleteResponse = void +/** + * Request returned by `SeamHttpSpaces.delete`. + */ export type SpacesDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.delete`. + */ export interface SpacesDeleteOptions {} +/** + * Parameters for `SeamHttpSpaces.get`. + */ export type SpacesGetParameters = { /** * ID of the space that you want to get. @@ -503,14 +602,25 @@ export type SpacesGetParameters = { } /** + * Response from `SeamHttpSpaces.get`. + * * @deprecated Use SpacesGetRequest instead. */ export type SpacesGetResponse = { space: Space } +/** + * Request returned by `SeamHttpSpaces.get`. + */ export type SpacesGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.get`. + */ export interface SpacesGetOptions {} +/** + * Parameters for `SeamHttpSpaces.getRelated`. + */ export type SpacesGetRelatedParameters = { exclude?: | Array< @@ -544,6 +654,8 @@ export type SpacesGetRelatedParameters = { } /** + * Response from `SeamHttpSpaces.getRelated`. + * * @deprecated Use SpacesGetRelatedRequest instead. */ export type SpacesGetRelatedResponse = { @@ -557,13 +669,22 @@ export type SpacesGetRelatedResponse = { > } +/** + * Request returned by `SeamHttpSpaces.getRelated`. + */ export type SpacesGetRelatedRequest = SeamHttpRequest< SpacesGetRelatedResponse, 'batch' > +/** + * Options for `SeamHttpSpaces.getRelated`. + */ export interface SpacesGetRelatedOptions {} +/** + * Parameters for `SeamHttpSpaces.list`. + */ export type SpacesListParameters = { /** * Customer key for which you want to list spaces. @@ -588,14 +709,25 @@ export type SpacesListParameters = { } /** + * Response from `SeamHttpSpaces.list`. + * * @deprecated Use SpacesListRequest instead. */ export type SpacesListResponse = { spaces: Array } +/** + * Request returned by `SeamHttpSpaces.list`. + */ export type SpacesListRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.list`. + */ export interface SpacesListOptions {} +/** + * Parameters for `SeamHttpSpaces.removeAcsEntrances`. + */ export type SpacesRemoveAcsEntrancesParameters = { /** * IDs of the entrances that you want to remove from the space. @@ -609,14 +741,25 @@ export type SpacesRemoveAcsEntrancesParameters = { } /** + * Response from `SeamHttpSpaces.removeAcsEntrances`. + * * @deprecated Use SpacesRemoveAcsEntrancesRequest instead. */ export type SpacesRemoveAcsEntrancesResponse = void +/** + * Request returned by `SeamHttpSpaces.removeAcsEntrances`. + */ export type SpacesRemoveAcsEntrancesRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.removeAcsEntrances`. + */ export interface SpacesRemoveAcsEntrancesOptions {} +/** + * Parameters for `SeamHttpSpaces.removeConnectedAccount`. + */ export type SpacesRemoveConnectedAccountParameters = { /** * ID of the connected account that you want to remove from the space. @@ -630,17 +773,28 @@ export type SpacesRemoveConnectedAccountParameters = { } /** + * Response from `SeamHttpSpaces.removeConnectedAccount`. + * * @deprecated Use SpacesRemoveConnectedAccountRequest instead. */ export type SpacesRemoveConnectedAccountResponse = void +/** + * Request returned by `SeamHttpSpaces.removeConnectedAccount`. + */ export type SpacesRemoveConnectedAccountRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpSpaces.removeConnectedAccount`. + */ export interface SpacesRemoveConnectedAccountOptions {} +/** + * Parameters for `SeamHttpSpaces.removeDevices`. + */ export type SpacesRemoveDevicesParameters = { /** * IDs of the devices that you want to remove from the space. @@ -654,14 +808,25 @@ export type SpacesRemoveDevicesParameters = { } /** + * Response from `SeamHttpSpaces.removeDevices`. + * * @deprecated Use SpacesRemoveDevicesRequest instead. */ export type SpacesRemoveDevicesResponse = void +/** + * Request returned by `SeamHttpSpaces.removeDevices`. + */ export type SpacesRemoveDevicesRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.removeDevices`. + */ export interface SpacesRemoveDevicesOptions {} +/** + * Parameters for `SeamHttpSpaces.update`. + */ export type SpacesUpdateParameters = { /** * IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. @@ -709,10 +874,18 @@ export type SpacesUpdateParameters = { } /** + * Response from `SeamHttpSpaces.update`. + * * @deprecated Use SpacesUpdateRequest instead. */ export type SpacesUpdateResponse = { space: Space } +/** + * Request returned by `SeamHttpSpaces.update`. + */ export type SpacesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpSpaces.update`. + */ export interface SpacesUpdateOptions {} diff --git a/src/lib/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/routes/thermostats/daily-programs/daily-programs.ts index 528221bf..e90b28aa 100644 --- a/src/lib/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/routes/thermostats/daily-programs/daily-programs.ts @@ -35,8 +35,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /thermostats/daily_programs routes. + */ export class SeamHttpThermostatsDailyPrograms { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -45,6 +55,9 @@ export class SeamHttpThermostatsDailyPrograms { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -56,6 +69,9 @@ export class SeamHttpThermostatsDailyPrograms { return new SeamHttpThermostatsDailyPrograms(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -67,6 +83,9 @@ export class SeamHttpThermostatsDailyPrograms { return new SeamHttpThermostatsDailyPrograms(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -81,6 +100,11 @@ export class SeamHttpThermostatsDailyPrograms { return new SeamHttpThermostatsDailyPrograms(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -104,6 +128,10 @@ export class SeamHttpThermostatsDailyPrograms { ) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -121,6 +149,10 @@ export class SeamHttpThermostatsDailyPrograms { return new SeamHttpThermostatsDailyPrograms(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsDailyPrograms authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -138,12 +170,21 @@ export class SeamHttpThermostatsDailyPrograms { return new SeamHttpThermostatsDailyPrograms(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -216,6 +257,9 @@ export class SeamHttpThermostatsDailyPrograms { } } +/** + * Parameters for `SeamHttpThermostatsDailyPrograms.create`. + */ export type ThermostatsDailyProgramsCreateParameters = { /** * ID of the thermostat device for which you want to create a daily program. @@ -243,19 +287,30 @@ export type ThermostatsDailyProgramsCreateParameters = { } /** + * Response from `SeamHttpThermostatsDailyPrograms.create`. + * * @deprecated Use ThermostatsDailyProgramsCreateRequest instead. */ export type ThermostatsDailyProgramsCreateResponse = { thermostat_daily_program: ThermostatDailyProgram } +/** + * Request returned by `SeamHttpThermostatsDailyPrograms.create`. + */ export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< ThermostatsDailyProgramsCreateResponse, 'thermostat_daily_program' > +/** + * Options for `SeamHttpThermostatsDailyPrograms.create`. + */ export interface ThermostatsDailyProgramsCreateOptions {} +/** + * Parameters for `SeamHttpThermostatsDailyPrograms.delete`. + */ export type ThermostatsDailyProgramsDeleteParameters = { /** * ID of the thermostat daily program that you want to delete. @@ -264,17 +319,28 @@ export type ThermostatsDailyProgramsDeleteParameters = { } /** + * Response from `SeamHttpThermostatsDailyPrograms.delete`. + * * @deprecated Use ThermostatsDailyProgramsDeleteRequest instead. */ export type ThermostatsDailyProgramsDeleteResponse = void +/** + * Request returned by `SeamHttpThermostatsDailyPrograms.delete`. + */ export type ThermostatsDailyProgramsDeleteRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostatsDailyPrograms.delete`. + */ export interface ThermostatsDailyProgramsDeleteOptions {} +/** + * Parameters for `SeamHttpThermostatsDailyPrograms.update`. + */ export type ThermostatsDailyProgramsUpdateParameters = { /** * Name of the thermostat daily program that you want to update. @@ -302,17 +368,25 @@ export type ThermostatsDailyProgramsUpdateParameters = { } /** + * Response from `SeamHttpThermostatsDailyPrograms.update`. + * * @deprecated Use ThermostatsDailyProgramsUpdateRequest instead. */ export type ThermostatsDailyProgramsUpdateResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostatsDailyPrograms.update`. + */ export type ThermostatsDailyProgramsUpdateRequest = SeamHttpRequest< ThermostatsDailyProgramsUpdateResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostatsDailyPrograms.update`. + */ export type ThermostatsDailyProgramsUpdateOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/thermostats/schedules/schedules.ts b/src/lib/routes/thermostats/schedules/schedules.ts index 12c4f001..e7cbdd9d 100644 --- a/src/lib/routes/thermostats/schedules/schedules.ts +++ b/src/lib/routes/thermostats/schedules/schedules.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /thermostats/schedules routes. + */ export class SeamHttpThermostatsSchedules { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpThermostatsSchedules { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpThermostatsSchedules from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpThermostatsSchedules { return new SeamHttpThermostatsSchedules(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSchedules authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpThermostatsSchedules { return new SeamHttpThermostatsSchedules(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSchedules authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpThermostatsSchedules { return new SeamHttpThermostatsSchedules(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSchedules authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpThermostatsSchedules { return SeamHttpThermostatsSchedules.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpThermostatsSchedules authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpThermostatsSchedules { return new SeamHttpThermostatsSchedules(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSchedules authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpThermostatsSchedules { return new SeamHttpThermostatsSchedules(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -239,6 +280,9 @@ export class SeamHttpThermostatsSchedules { } } +/** + * Parameters for `SeamHttpThermostatsSchedules.create`. + */ export type ThermostatsSchedulesCreateParameters = { /** * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. @@ -274,19 +318,30 @@ export type ThermostatsSchedulesCreateParameters = { } /** + * Response from `SeamHttpThermostatsSchedules.create`. + * * @deprecated Use ThermostatsSchedulesCreateRequest instead. */ export type ThermostatsSchedulesCreateResponse = { thermostat_schedule: ThermostatSchedule } +/** + * Request returned by `SeamHttpThermostatsSchedules.create`. + */ export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< ThermostatsSchedulesCreateResponse, 'thermostat_schedule' > +/** + * Options for `SeamHttpThermostatsSchedules.create`. + */ export interface ThermostatsSchedulesCreateOptions {} +/** + * Parameters for `SeamHttpThermostatsSchedules.delete`. + */ export type ThermostatsSchedulesDeleteParameters = { /** * ID of the thermostat schedule that you want to delete. @@ -295,14 +350,25 @@ export type ThermostatsSchedulesDeleteParameters = { } /** + * Response from `SeamHttpThermostatsSchedules.delete`. + * * @deprecated Use ThermostatsSchedulesDeleteRequest instead. */ export type ThermostatsSchedulesDeleteResponse = void +/** + * Request returned by `SeamHttpThermostatsSchedules.delete`. + */ export type ThermostatsSchedulesDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpThermostatsSchedules.delete`. + */ export interface ThermostatsSchedulesDeleteOptions {} +/** + * Parameters for `SeamHttpThermostatsSchedules.get`. + */ export type ThermostatsSchedulesGetParameters = { /** * ID of the thermostat schedule that you want to get. @@ -311,19 +377,30 @@ export type ThermostatsSchedulesGetParameters = { } /** + * Response from `SeamHttpThermostatsSchedules.get`. + * * @deprecated Use ThermostatsSchedulesGetRequest instead. */ export type ThermostatsSchedulesGetResponse = { thermostat_schedule: ThermostatSchedule } +/** + * Request returned by `SeamHttpThermostatsSchedules.get`. + */ export type ThermostatsSchedulesGetRequest = SeamHttpRequest< ThermostatsSchedulesGetResponse, 'thermostat_schedule' > +/** + * Options for `SeamHttpThermostatsSchedules.get`. + */ export interface ThermostatsSchedulesGetOptions {} +/** + * Parameters for `SeamHttpThermostatsSchedules.list`. + */ export type ThermostatsSchedulesListParameters = { /** * ID of the thermostat device for which you want to list schedules. @@ -337,19 +414,30 @@ export type ThermostatsSchedulesListParameters = { } /** + * Response from `SeamHttpThermostatsSchedules.list`. + * * @deprecated Use ThermostatsSchedulesListRequest instead. */ export type ThermostatsSchedulesListResponse = { thermostat_schedules: Array } +/** + * Request returned by `SeamHttpThermostatsSchedules.list`. + */ export type ThermostatsSchedulesListRequest = SeamHttpRequest< ThermostatsSchedulesListResponse, 'thermostat_schedules' > +/** + * Options for `SeamHttpThermostatsSchedules.list`. + */ export interface ThermostatsSchedulesListOptions {} +/** + * Parameters for `SeamHttpThermostatsSchedules.update`. + */ export type ThermostatsSchedulesUpdateParameters = { /** * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. @@ -382,10 +470,18 @@ export type ThermostatsSchedulesUpdateParameters = { } /** + * Response from `SeamHttpThermostatsSchedules.update`. + * * @deprecated Use ThermostatsSchedulesUpdateRequest instead. */ export type ThermostatsSchedulesUpdateResponse = void +/** + * Request returned by `SeamHttpThermostatsSchedules.update`. + */ export type ThermostatsSchedulesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpThermostatsSchedules.update`. + */ export interface ThermostatsSchedulesUpdateOptions {} diff --git a/src/lib/routes/thermostats/simulate/simulate.ts b/src/lib/routes/thermostats/simulate/simulate.ts index 8c0cd8bc..d398bfec 100644 --- a/src/lib/routes/thermostats/simulate/simulate.ts +++ b/src/lib/routes/thermostats/simulate/simulate.ts @@ -32,8 +32,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /thermostats/simulate routes. + */ export class SeamHttpThermostatsSimulate { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -42,6 +52,9 @@ export class SeamHttpThermostatsSimulate { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpThermostatsSimulate from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -53,6 +66,9 @@ export class SeamHttpThermostatsSimulate { return new SeamHttpThermostatsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSimulate authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -64,6 +80,9 @@ export class SeamHttpThermostatsSimulate { return new SeamHttpThermostatsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSimulate authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -78,6 +97,11 @@ export class SeamHttpThermostatsSimulate { return new SeamHttpThermostatsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSimulate authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -98,6 +122,10 @@ export class SeamHttpThermostatsSimulate { return SeamHttpThermostatsSimulate.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpThermostatsSimulate authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -115,6 +143,10 @@ export class SeamHttpThermostatsSimulate { return new SeamHttpThermostatsSimulate(constructorOptions) } + /** + * Creates a new SeamHttpThermostatsSimulate authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -132,12 +164,21 @@ export class SeamHttpThermostatsSimulate { return new SeamHttpThermostatsSimulate(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -190,6 +231,9 @@ export class SeamHttpThermostatsSimulate { } } +/** + * Parameters for `SeamHttpThermostatsSimulate.hvacModeAdjusted`. + */ export type ThermostatsSimulateHvacModeAdjustedParameters = { /** * ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. @@ -220,17 +264,28 @@ export type ThermostatsSimulateHvacModeAdjustedParameters = { } /** + * Response from `SeamHttpThermostatsSimulate.hvacModeAdjusted`. + * * @deprecated Use ThermostatsSimulateHvacModeAdjustedRequest instead. */ export type ThermostatsSimulateHvacModeAdjustedResponse = void +/** + * Request returned by `SeamHttpThermostatsSimulate.hvacModeAdjusted`. + */ export type ThermostatsSimulateHvacModeAdjustedRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostatsSimulate.hvacModeAdjusted`. + */ export interface ThermostatsSimulateHvacModeAdjustedOptions {} +/** + * Parameters for `SeamHttpThermostatsSimulate.temperatureReached`. + */ export type ThermostatsSimulateTemperatureReachedParameters = { /** * ID of the thermostat device that you want to simulate reaching a specified temperature. @@ -248,13 +303,21 @@ export type ThermostatsSimulateTemperatureReachedParameters = { } /** + * Response from `SeamHttpThermostatsSimulate.temperatureReached`. + * * @deprecated Use ThermostatsSimulateTemperatureReachedRequest instead. */ export type ThermostatsSimulateTemperatureReachedResponse = void +/** + * Request returned by `SeamHttpThermostatsSimulate.temperatureReached`. + */ export type ThermostatsSimulateTemperatureReachedRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostatsSimulate.temperatureReached`. + */ export interface ThermostatsSimulateTemperatureReachedOptions {} diff --git a/src/lib/routes/thermostats/thermostats.ts b/src/lib/routes/thermostats/thermostats.ts index db8d1a5d..49ae8033 100644 --- a/src/lib/routes/thermostats/thermostats.ts +++ b/src/lib/routes/thermostats/thermostats.ts @@ -39,8 +39,18 @@ import { SeamHttpThermostatsDailyPrograms } from './daily-programs/index.js' import { SeamHttpThermostatsSchedules } from './schedules/index.js' import { SeamHttpThermostatsSimulate } from './simulate/index.js' +/** + * Client for the Seam API /thermostats routes. + */ export class SeamHttpThermostats { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -49,6 +59,9 @@ export class SeamHttpThermostats { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpThermostats from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -60,6 +73,9 @@ export class SeamHttpThermostats { return new SeamHttpThermostats(constructorOptions) } + /** + * Creates a new SeamHttpThermostats authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -71,6 +87,9 @@ export class SeamHttpThermostats { return new SeamHttpThermostats(constructorOptions) } + /** + * Creates a new SeamHttpThermostats authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -85,6 +104,11 @@ export class SeamHttpThermostats { return new SeamHttpThermostats(constructorOptions) } + /** + * Creates a new SeamHttpThermostats authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -105,6 +129,10 @@ export class SeamHttpThermostats { return SeamHttpThermostats.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpThermostats authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -122,6 +150,10 @@ export class SeamHttpThermostats { return new SeamHttpThermostats(constructorOptions) } + /** + * Creates a new SeamHttpThermostats authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -139,12 +171,21 @@ export class SeamHttpThermostats { return new SeamHttpThermostats(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -164,6 +205,9 @@ export class SeamHttpThermostats { await clientSessions.get() } + /** + * Client for the Seam API /thermostats/daily_programs routes. + */ get dailyPrograms(): SeamHttpThermostatsDailyPrograms { return SeamHttpThermostatsDailyPrograms.fromClient( this.client, @@ -171,10 +215,16 @@ export class SeamHttpThermostats { ) } + /** + * Client for the Seam API /thermostats/schedules routes. + */ get schedules(): SeamHttpThermostatsSchedules { return SeamHttpThermostatsSchedules.fromClient(this.client, this.defaults) } + /** + * Client for the Seam API /thermostats/simulate routes. + */ get simulate(): SeamHttpThermostatsSimulate { return SeamHttpThermostatsSimulate.fromClient(this.client, this.defaults) } @@ -436,6 +486,9 @@ export class SeamHttpThermostats { } } +/** + * Parameters for `SeamHttpThermostats.activateClimatePreset`. + */ export type ThermostatsActivateClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to activate. @@ -449,22 +502,33 @@ export type ThermostatsActivateClimatePresetParameters = { } /** + * Response from `SeamHttpThermostats.activateClimatePreset`. + * * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ export type ThermostatsActivateClimatePresetResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.activateClimatePreset`. + */ export type ThermostatsActivateClimatePresetRequest = SeamHttpRequest< ThermostatsActivateClimatePresetResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.activateClimatePreset`. + */ export type ThermostatsActivateClimatePresetOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.cool`. + */ export type ThermostatsCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. @@ -481,20 +545,31 @@ export type ThermostatsCoolParameters = { } /** + * Response from `SeamHttpThermostats.cool`. + * * @deprecated Use ThermostatsCoolRequest instead. */ export type ThermostatsCoolResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.cool`. + */ export type ThermostatsCoolRequest = SeamHttpRequest< ThermostatsCoolResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.cool`. + */ export type ThermostatsCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.createClimatePreset`. + */ export type ThermostatsCreateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). @@ -556,6 +631,7 @@ export type ThermostatsCreateClimatePresetParameters = { hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat or using the API can change the thermostat's settings. + * * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined @@ -566,17 +642,28 @@ export type ThermostatsCreateClimatePresetParameters = { } /** + * Response from `SeamHttpThermostats.createClimatePreset`. + * * @deprecated Use ThermostatsCreateClimatePresetRequest instead. */ export type ThermostatsCreateClimatePresetResponse = void +/** + * Request returned by `SeamHttpThermostats.createClimatePreset`. + */ export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostats.createClimatePreset`. + */ export interface ThermostatsCreateClimatePresetOptions {} +/** + * Parameters for `SeamHttpThermostats.deleteClimatePreset`. + */ export type ThermostatsDeleteClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to delete. @@ -590,17 +677,28 @@ export type ThermostatsDeleteClimatePresetParameters = { } /** + * Response from `SeamHttpThermostats.deleteClimatePreset`. + * * @deprecated Use ThermostatsDeleteClimatePresetRequest instead. */ export type ThermostatsDeleteClimatePresetResponse = void +/** + * Request returned by `SeamHttpThermostats.deleteClimatePreset`. + */ export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostats.deleteClimatePreset`. + */ export interface ThermostatsDeleteClimatePresetOptions {} +/** + * Parameters for `SeamHttpThermostats.heat`. + */ export type ThermostatsHeatParameters = { /** * ID of the thermostat device that you want to set to heat mode. @@ -618,20 +716,31 @@ export type ThermostatsHeatParameters = { } /** + * Response from `SeamHttpThermostats.heat`. + * * @deprecated Use ThermostatsHeatRequest instead. */ export type ThermostatsHeatResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.heat`. + */ export type ThermostatsHeatRequest = SeamHttpRequest< ThermostatsHeatResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.heat`. + */ export type ThermostatsHeatOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.heatCool`. + */ export type ThermostatsHeatCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. @@ -657,20 +766,31 @@ export type ThermostatsHeatCoolParameters = { } /** + * Response from `SeamHttpThermostats.heatCool`. + * * @deprecated Use ThermostatsHeatCoolRequest instead. */ export type ThermostatsHeatCoolResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.heatCool`. + */ export type ThermostatsHeatCoolRequest = SeamHttpRequest< ThermostatsHeatCoolResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.heatCool`. + */ export type ThermostatsHeatCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.list`. + */ export type ThermostatsListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -762,17 +882,28 @@ export type ThermostatsListParameters = { } /** + * Response from `SeamHttpThermostats.list`. + * * @deprecated Use ThermostatsListRequest instead. */ export type ThermostatsListResponse = { devices: Array } +/** + * Request returned by `SeamHttpThermostats.list`. + */ export type ThermostatsListRequest = SeamHttpRequest< ThermostatsListResponse, 'devices' > +/** + * Options for `SeamHttpThermostats.list`. + */ export interface ThermostatsListOptions {} +/** + * Parameters for `SeamHttpThermostats.off`. + */ export type ThermostatsOffParameters = { /** * ID of the thermostat device that you want to set to off mode. @@ -781,20 +912,31 @@ export type ThermostatsOffParameters = { } /** + * Response from `SeamHttpThermostats.off`. + * * @deprecated Use ThermostatsOffRequest instead. */ export type ThermostatsOffResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.off`. + */ export type ThermostatsOffRequest = SeamHttpRequest< ThermostatsOffResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.off`. + */ export type ThermostatsOffOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.setFallbackClimatePreset`. + */ export type ThermostatsSetFallbackClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to set as the fallback climate preset. @@ -808,17 +950,28 @@ export type ThermostatsSetFallbackClimatePresetParameters = { } /** + * Response from `SeamHttpThermostats.setFallbackClimatePreset`. + * * @deprecated Use ThermostatsSetFallbackClimatePresetRequest instead. */ export type ThermostatsSetFallbackClimatePresetResponse = void +/** + * Request returned by `SeamHttpThermostats.setFallbackClimatePreset`. + */ export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostats.setFallbackClimatePreset`. + */ export interface ThermostatsSetFallbackClimatePresetOptions {} +/** + * Parameters for `SeamHttpThermostats.setFanMode`. + */ export type ThermostatsSetFanModeParameters = { /** * ID of the thermostat device for which you want to set the fan mode. @@ -827,6 +980,7 @@ export type ThermostatsSetFanModeParameters = { /** * Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. + * * @deprecated Use `fan_mode_setting` instead. */ fan_mode?: 'auto' | 'on' | 'circulate' | undefined @@ -837,20 +991,31 @@ export type ThermostatsSetFanModeParameters = { } /** + * Response from `SeamHttpThermostats.setFanMode`. + * * @deprecated Use ThermostatsSetFanModeRequest instead. */ export type ThermostatsSetFanModeResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.setFanMode`. + */ export type ThermostatsSetFanModeRequest = SeamHttpRequest< ThermostatsSetFanModeResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.setFanMode`. + */ export type ThermostatsSetFanModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.setHvacMode`. + */ export type ThermostatsSetHvacModeParameters = { /** * ID of the thermostat device for which you want to set the HVAC mode. @@ -878,20 +1043,31 @@ export type ThermostatsSetHvacModeParameters = { } /** + * Response from `SeamHttpThermostats.setHvacMode`. + * * @deprecated Use ThermostatsSetHvacModeRequest instead. */ export type ThermostatsSetHvacModeResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.setHvacMode`. + */ export type ThermostatsSetHvacModeRequest = SeamHttpRequest< ThermostatsSetHvacModeResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.setHvacMode`. + */ export type ThermostatsSetHvacModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpThermostats.setTemperatureThreshold`. + */ export type ThermostatsSetTemperatureThresholdParameters = { /** * ID of the thermostat device for which you want to set a temperature threshold. @@ -917,17 +1093,28 @@ export type ThermostatsSetTemperatureThresholdParameters = { } /** + * Response from `SeamHttpThermostats.setTemperatureThreshold`. + * * @deprecated Use ThermostatsSetTemperatureThresholdRequest instead. */ export type ThermostatsSetTemperatureThresholdResponse = void +/** + * Request returned by `SeamHttpThermostats.setTemperatureThreshold`. + */ export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostats.setTemperatureThreshold`. + */ export interface ThermostatsSetTemperatureThresholdOptions {} +/** + * Parameters for `SeamHttpThermostats.updateClimatePreset`. + */ export type ThermostatsUpdateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). @@ -989,6 +1176,7 @@ export type ThermostatsUpdateClimatePresetParameters = { hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined /** * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * * @deprecated Use 'thermostat_schedule.is_override_allowed' */ manual_override_allowed?: boolean | undefined @@ -999,17 +1187,28 @@ export type ThermostatsUpdateClimatePresetParameters = { } /** + * Response from `SeamHttpThermostats.updateClimatePreset`. + * * @deprecated Use ThermostatsUpdateClimatePresetRequest instead. */ export type ThermostatsUpdateClimatePresetResponse = void +/** + * Request returned by `SeamHttpThermostats.updateClimatePreset`. + */ export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpThermostats.updateClimatePreset`. + */ export interface ThermostatsUpdateClimatePresetOptions {} +/** + * Parameters for `SeamHttpThermostats.updateWeeklyProgram`. + */ export type ThermostatsUpdateWeeklyProgramParameters = { /** * ID of the thermostat device for which you want to update the weekly program. @@ -1047,17 +1246,25 @@ export type ThermostatsUpdateWeeklyProgramParameters = { } /** + * Response from `SeamHttpThermostats.updateWeeklyProgram`. + * * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ export type ThermostatsUpdateWeeklyProgramResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpThermostats.updateWeeklyProgram`. + */ export type ThermostatsUpdateWeeklyProgramRequest = SeamHttpRequest< ThermostatsUpdateWeeklyProgramResponse, 'action_attempt' > +/** + * Options for `SeamHttpThermostats.updateWeeklyProgram`. + */ export type ThermostatsUpdateWeeklyProgramOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/user-identities/unmanaged/unmanaged.ts b/src/lib/routes/user-identities/unmanaged/unmanaged.ts index 6c58c6a1..a83206fb 100644 --- a/src/lib/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/routes/user-identities/unmanaged/unmanaged.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /user_identities/unmanaged routes. + */ export class SeamHttpUserIdentitiesUnmanaged { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpUserIdentitiesUnmanaged { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpUserIdentitiesUnmanaged { return new SeamHttpUserIdentitiesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpUserIdentitiesUnmanaged { return new SeamHttpUserIdentitiesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpUserIdentitiesUnmanaged { return new SeamHttpUserIdentitiesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -102,6 +126,10 @@ export class SeamHttpUserIdentitiesUnmanaged { ) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -119,6 +147,10 @@ export class SeamHttpUserIdentitiesUnmanaged { return new SeamHttpUserIdentitiesUnmanaged(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentitiesUnmanaged authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -136,12 +168,21 @@ export class SeamHttpUserIdentitiesUnmanaged { return new SeamHttpUserIdentitiesUnmanaged(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -212,6 +253,9 @@ export class SeamHttpUserIdentitiesUnmanaged { } } +/** + * Parameters for `SeamHttpUserIdentitiesUnmanaged.get`. + */ export type UserIdentitiesUnmanagedGetParameters = { /** * ID of the unmanaged user identity that you want to get. @@ -220,19 +264,30 @@ export type UserIdentitiesUnmanagedGetParameters = { } /** + * Response from `SeamHttpUserIdentitiesUnmanaged.get`. + * * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ export type UserIdentitiesUnmanagedGetResponse = { user_identity: UnmanagedUserIdentity } +/** + * Request returned by `SeamHttpUserIdentitiesUnmanaged.get`. + */ export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< UserIdentitiesUnmanagedGetResponse, 'user_identity' > +/** + * Options for `SeamHttpUserIdentitiesUnmanaged.get`. + */ export interface UserIdentitiesUnmanagedGetOptions {} +/** + * Parameters for `SeamHttpUserIdentitiesUnmanaged.list`. + */ export type UserIdentitiesUnmanagedListParameters = { /** * Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. @@ -253,19 +308,30 @@ export type UserIdentitiesUnmanagedListParameters = { } /** + * Response from `SeamHttpUserIdentitiesUnmanaged.list`. + * * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ export type UserIdentitiesUnmanagedListResponse = { user_identities: Array } +/** + * Request returned by `SeamHttpUserIdentitiesUnmanaged.list`. + */ export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< UserIdentitiesUnmanagedListResponse, 'user_identities' > +/** + * Options for `SeamHttpUserIdentitiesUnmanaged.list`. + */ export interface UserIdentitiesUnmanagedListOptions {} +/** + * Parameters for `SeamHttpUserIdentitiesUnmanaged.update`. + */ export type UserIdentitiesUnmanagedUpdateParameters = { /** * Must be set to true to convert the unmanaged user identity to managed. @@ -284,13 +350,21 @@ export type UserIdentitiesUnmanagedUpdateParameters = { } /** + * Response from `SeamHttpUserIdentitiesUnmanaged.update`. + * * @deprecated Use UserIdentitiesUnmanagedUpdateRequest instead. */ export type UserIdentitiesUnmanagedUpdateResponse = void +/** + * Request returned by `SeamHttpUserIdentitiesUnmanaged.update`. + */ export type UserIdentitiesUnmanagedUpdateRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpUserIdentitiesUnmanaged.update`. + */ export interface UserIdentitiesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/user-identities/user-identities.ts b/src/lib/routes/user-identities/user-identities.ts index 4aec2c35..bdd1da21 100644 --- a/src/lib/routes/user-identities/user-identities.ts +++ b/src/lib/routes/user-identities/user-identities.ts @@ -40,8 +40,18 @@ import { SeamPaginator } from 'lib/seam-paginator.js' import { SeamHttpUserIdentitiesUnmanaged } from './unmanaged/index.js' +/** + * Client for the Seam API /user_identities routes. + */ export class SeamHttpUserIdentities { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -50,6 +60,9 @@ export class SeamHttpUserIdentities { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpUserIdentities from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -61,6 +74,9 @@ export class SeamHttpUserIdentities { return new SeamHttpUserIdentities(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentities authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -72,6 +88,9 @@ export class SeamHttpUserIdentities { return new SeamHttpUserIdentities(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentities authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -86,6 +105,11 @@ export class SeamHttpUserIdentities { return new SeamHttpUserIdentities(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentities authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -106,6 +130,10 @@ export class SeamHttpUserIdentities { return SeamHttpUserIdentities.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpUserIdentities authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -123,6 +151,10 @@ export class SeamHttpUserIdentities { return new SeamHttpUserIdentities(constructorOptions) } + /** + * Creates a new SeamHttpUserIdentities authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -140,12 +172,21 @@ export class SeamHttpUserIdentities { return new SeamHttpUserIdentities(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -165,6 +206,9 @@ export class SeamHttpUserIdentities { await clientSessions.get() } + /** + * Client for the Seam API /user_identities/unmanaged routes. + */ get unmanaged(): SeamHttpUserIdentitiesUnmanaged { return SeamHttpUserIdentitiesUnmanaged.fromClient( this.client, @@ -401,6 +445,9 @@ export class SeamHttpUserIdentities { } } +/** + * Parameters for `SeamHttpUserIdentities.addAcsUser`. + */ export type UserIdentitiesAddAcsUserParameters = { /** * ID of the access system user that you want to add to the user identity. @@ -418,14 +465,25 @@ export type UserIdentitiesAddAcsUserParameters = { } /** + * Response from `SeamHttpUserIdentities.addAcsUser`. + * * @deprecated Use UserIdentitiesAddAcsUserRequest instead. */ export type UserIdentitiesAddAcsUserResponse = void +/** + * Request returned by `SeamHttpUserIdentities.addAcsUser`. + */ export type UserIdentitiesAddAcsUserRequest = SeamHttpRequest +/** + * Options for `SeamHttpUserIdentities.addAcsUser`. + */ export interface UserIdentitiesAddAcsUserOptions {} +/** + * Parameters for `SeamHttpUserIdentities.create`. + */ export type UserIdentitiesCreateParameters = { /** * List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. @@ -450,17 +508,28 @@ export type UserIdentitiesCreateParameters = { } /** + * Response from `SeamHttpUserIdentities.create`. + * * @deprecated Use UserIdentitiesCreateRequest instead. */ export type UserIdentitiesCreateResponse = { user_identity: UserIdentity } +/** + * Request returned by `SeamHttpUserIdentities.create`. + */ export type UserIdentitiesCreateRequest = SeamHttpRequest< UserIdentitiesCreateResponse, 'user_identity' > +/** + * Options for `SeamHttpUserIdentities.create`. + */ export interface UserIdentitiesCreateOptions {} +/** + * Parameters for `SeamHttpUserIdentities.delete`. + */ export type UserIdentitiesDeleteParameters = { /** * ID of the user identity that you want to delete. @@ -469,14 +538,25 @@ export type UserIdentitiesDeleteParameters = { } /** + * Response from `SeamHttpUserIdentities.delete`. + * * @deprecated Use UserIdentitiesDeleteRequest instead. */ export type UserIdentitiesDeleteResponse = void +/** + * Request returned by `SeamHttpUserIdentities.delete`. + */ export type UserIdentitiesDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpUserIdentities.delete`. + */ export interface UserIdentitiesDeleteOptions {} +/** + * Parameters for `SeamHttpUserIdentities.generateInstantKey`. + */ export type UserIdentitiesGenerateInstantKeyParameters = { customization_profile_id?: string | undefined /** @@ -490,19 +570,30 @@ export type UserIdentitiesGenerateInstantKeyParameters = { } /** + * Response from `SeamHttpUserIdentities.generateInstantKey`. + * * @deprecated Use UserIdentitiesGenerateInstantKeyRequest instead. */ export type UserIdentitiesGenerateInstantKeyResponse = { instant_key: InstantKey } +/** + * Request returned by `SeamHttpUserIdentities.generateInstantKey`. + */ export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< UserIdentitiesGenerateInstantKeyResponse, 'instant_key' > +/** + * Options for `SeamHttpUserIdentities.generateInstantKey`. + */ export interface UserIdentitiesGenerateInstantKeyOptions {} +/** + * Parameters for `SeamHttpUserIdentities.get`. + */ export type UserIdentitiesGetParameters = { /** * ID of the user identity that you want to get. @@ -513,17 +604,28 @@ export type UserIdentitiesGetParameters = { } /** + * Response from `SeamHttpUserIdentities.get`. + * * @deprecated Use UserIdentitiesGetRequest instead. */ export type UserIdentitiesGetResponse = { user_identity: UserIdentity } +/** + * Request returned by `SeamHttpUserIdentities.get`. + */ export type UserIdentitiesGetRequest = SeamHttpRequest< UserIdentitiesGetResponse, 'user_identity' > +/** + * Options for `SeamHttpUserIdentities.get`. + */ export interface UserIdentitiesGetOptions {} +/** + * Parameters for `SeamHttpUserIdentities.grantAccessToDevice`. + */ export type UserIdentitiesGrantAccessToDeviceParameters = { /** * ID of the managed device to which you want to grant access to the user identity. @@ -537,17 +639,28 @@ export type UserIdentitiesGrantAccessToDeviceParameters = { } /** + * Response from `SeamHttpUserIdentities.grantAccessToDevice`. + * * @deprecated Use UserIdentitiesGrantAccessToDeviceRequest instead. */ export type UserIdentitiesGrantAccessToDeviceResponse = void +/** + * Request returned by `SeamHttpUserIdentities.grantAccessToDevice`. + */ export type UserIdentitiesGrantAccessToDeviceRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpUserIdentities.grantAccessToDevice`. + */ export interface UserIdentitiesGrantAccessToDeviceOptions {} +/** + * Parameters for `SeamHttpUserIdentities.list`. + */ export type UserIdentitiesListParameters = { /** * Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. @@ -576,19 +689,30 @@ export type UserIdentitiesListParameters = { } /** + * Response from `SeamHttpUserIdentities.list`. + * * @deprecated Use UserIdentitiesListRequest instead. */ export type UserIdentitiesListResponse = { user_identities: Array } +/** + * Request returned by `SeamHttpUserIdentities.list`. + */ export type UserIdentitiesListRequest = SeamHttpRequest< UserIdentitiesListResponse, 'user_identities' > +/** + * Options for `SeamHttpUserIdentities.list`. + */ export interface UserIdentitiesListOptions {} +/** + * Parameters for `SeamHttpUserIdentities.listAccessibleDevices`. + */ export type UserIdentitiesListAccessibleDevicesParameters = { /** * ID of the user identity for which you want to retrieve all accessible devices. @@ -597,19 +721,30 @@ export type UserIdentitiesListAccessibleDevicesParameters = { } /** + * Response from `SeamHttpUserIdentities.listAccessibleDevices`. + * * @deprecated Use UserIdentitiesListAccessibleDevicesRequest instead. */ export type UserIdentitiesListAccessibleDevicesResponse = { devices: Array } +/** + * Request returned by `SeamHttpUserIdentities.listAccessibleDevices`. + */ export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< UserIdentitiesListAccessibleDevicesResponse, 'devices' > +/** + * Options for `SeamHttpUserIdentities.listAccessibleDevices`. + */ export interface UserIdentitiesListAccessibleDevicesOptions {} +/** + * Parameters for `SeamHttpUserIdentities.listAccessibleEntrances`. + */ export type UserIdentitiesListAccessibleEntrancesParameters = { /** * ID of the user identity for which you want to retrieve all accessible entrances. @@ -618,19 +753,30 @@ export type UserIdentitiesListAccessibleEntrancesParameters = { } /** + * Response from `SeamHttpUserIdentities.listAccessibleEntrances`. + * * @deprecated Use UserIdentitiesListAccessibleEntrancesRequest instead. */ export type UserIdentitiesListAccessibleEntrancesResponse = { acs_entrances: Array } +/** + * Request returned by `SeamHttpUserIdentities.listAccessibleEntrances`. + */ export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< UserIdentitiesListAccessibleEntrancesResponse, 'acs_entrances' > +/** + * Options for `SeamHttpUserIdentities.listAccessibleEntrances`. + */ export interface UserIdentitiesListAccessibleEntrancesOptions {} +/** + * Parameters for `SeamHttpUserIdentities.listAcsSystems`. + */ export type UserIdentitiesListAcsSystemsParameters = { /** * ID of the user identity for which you want to retrieve all access systems. @@ -639,19 +785,30 @@ export type UserIdentitiesListAcsSystemsParameters = { } /** + * Response from `SeamHttpUserIdentities.listAcsSystems`. + * * @deprecated Use UserIdentitiesListAcsSystemsRequest instead. */ export type UserIdentitiesListAcsSystemsResponse = { acs_systems: Array } +/** + * Request returned by `SeamHttpUserIdentities.listAcsSystems`. + */ export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< UserIdentitiesListAcsSystemsResponse, 'acs_systems' > +/** + * Options for `SeamHttpUserIdentities.listAcsSystems`. + */ export interface UserIdentitiesListAcsSystemsOptions {} +/** + * Parameters for `SeamHttpUserIdentities.listAcsUsers`. + */ export type UserIdentitiesListAcsUsersParameters = { /** * ID of the user identity for which you want to retrieve all access system users. @@ -660,17 +817,28 @@ export type UserIdentitiesListAcsUsersParameters = { } /** + * Response from `SeamHttpUserIdentities.listAcsUsers`. + * * @deprecated Use UserIdentitiesListAcsUsersRequest instead. */ export type UserIdentitiesListAcsUsersResponse = { acs_users: Array } +/** + * Request returned by `SeamHttpUserIdentities.listAcsUsers`. + */ export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< UserIdentitiesListAcsUsersResponse, 'acs_users' > +/** + * Options for `SeamHttpUserIdentities.listAcsUsers`. + */ export interface UserIdentitiesListAcsUsersOptions {} +/** + * Parameters for `SeamHttpUserIdentities.removeAcsUser`. + */ export type UserIdentitiesRemoveAcsUserParameters = { /** * ID of the access system user that you want to remove from the user identity.. @@ -684,17 +852,28 @@ export type UserIdentitiesRemoveAcsUserParameters = { } /** + * Response from `SeamHttpUserIdentities.removeAcsUser`. + * * @deprecated Use UserIdentitiesRemoveAcsUserRequest instead. */ export type UserIdentitiesRemoveAcsUserResponse = void +/** + * Request returned by `SeamHttpUserIdentities.removeAcsUser`. + */ export type UserIdentitiesRemoveAcsUserRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpUserIdentities.removeAcsUser`. + */ export interface UserIdentitiesRemoveAcsUserOptions {} +/** + * Parameters for `SeamHttpUserIdentities.revokeAccessToDevice`. + */ export type UserIdentitiesRevokeAccessToDeviceParameters = { /** * ID of the managed device to which you want to revoke access from the user identity. @@ -708,17 +887,28 @@ export type UserIdentitiesRevokeAccessToDeviceParameters = { } /** + * Response from `SeamHttpUserIdentities.revokeAccessToDevice`. + * * @deprecated Use UserIdentitiesRevokeAccessToDeviceRequest instead. */ export type UserIdentitiesRevokeAccessToDeviceResponse = void +/** + * Request returned by `SeamHttpUserIdentities.revokeAccessToDevice`. + */ export type UserIdentitiesRevokeAccessToDeviceRequest = SeamHttpRequest< void, undefined > +/** + * Options for `SeamHttpUserIdentities.revokeAccessToDevice`. + */ export interface UserIdentitiesRevokeAccessToDeviceOptions {} +/** + * Parameters for `SeamHttpUserIdentities.update`. + */ export type UserIdentitiesUpdateParameters = { /** * Unique email address for the user identity. @@ -744,10 +934,18 @@ export type UserIdentitiesUpdateParameters = { } /** + * Response from `SeamHttpUserIdentities.update`. + * * @deprecated Use UserIdentitiesUpdateRequest instead. */ export type UserIdentitiesUpdateResponse = void +/** + * Request returned by `SeamHttpUserIdentities.update`. + */ export type UserIdentitiesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpUserIdentities.update`. + */ export interface UserIdentitiesUpdateOptions {} diff --git a/src/lib/routes/webhooks/webhooks.ts b/src/lib/routes/webhooks/webhooks.ts index 98fa0a27..cbffb5e7 100644 --- a/src/lib/routes/webhooks/webhooks.ts +++ b/src/lib/routes/webhooks/webhooks.ts @@ -33,8 +33,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /webhooks routes. + */ export class SeamHttpWebhooks { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -43,6 +53,9 @@ export class SeamHttpWebhooks { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpWebhooks from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -54,6 +67,9 @@ export class SeamHttpWebhooks { return new SeamHttpWebhooks(constructorOptions) } + /** + * Creates a new SeamHttpWebhooks authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -65,6 +81,9 @@ export class SeamHttpWebhooks { return new SeamHttpWebhooks(constructorOptions) } + /** + * Creates a new SeamHttpWebhooks authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -79,6 +98,11 @@ export class SeamHttpWebhooks { return new SeamHttpWebhooks(constructorOptions) } + /** + * Creates a new SeamHttpWebhooks authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -99,6 +123,10 @@ export class SeamHttpWebhooks { return SeamHttpWebhooks.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpWebhooks authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -116,6 +144,10 @@ export class SeamHttpWebhooks { return new SeamHttpWebhooks(constructorOptions) } + /** + * Creates a new SeamHttpWebhooks authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -133,12 +165,21 @@ export class SeamHttpWebhooks { return new SeamHttpWebhooks(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -239,6 +280,9 @@ export class SeamHttpWebhooks { } } +/** + * Parameters for `SeamHttpWebhooks.create`. + */ export type WebhooksCreateParameters = { /** * Types of events that you want the new webhook to receive. @@ -251,17 +295,28 @@ export type WebhooksCreateParameters = { } /** + * Response from `SeamHttpWebhooks.create`. + * * @deprecated Use WebhooksCreateRequest instead. */ export type WebhooksCreateResponse = { webhook: Webhook } +/** + * Request returned by `SeamHttpWebhooks.create`. + */ export type WebhooksCreateRequest = SeamHttpRequest< WebhooksCreateResponse, 'webhook' > +/** + * Options for `SeamHttpWebhooks.create`. + */ export interface WebhooksCreateOptions {} +/** + * Parameters for `SeamHttpWebhooks.delete`. + */ export type WebhooksDeleteParameters = { /** * ID of the webhook that you want to delete. @@ -270,14 +325,25 @@ export type WebhooksDeleteParameters = { } /** + * Response from `SeamHttpWebhooks.delete`. + * * @deprecated Use WebhooksDeleteRequest instead. */ export type WebhooksDeleteResponse = void +/** + * Request returned by `SeamHttpWebhooks.delete`. + */ export type WebhooksDeleteRequest = SeamHttpRequest +/** + * Options for `SeamHttpWebhooks.delete`. + */ export interface WebhooksDeleteOptions {} +/** + * Parameters for `SeamHttpWebhooks.get`. + */ export type WebhooksGetParameters = { /** * ID of the webhook that you want to get. @@ -286,28 +352,50 @@ export type WebhooksGetParameters = { } /** + * Response from `SeamHttpWebhooks.get`. + * * @deprecated Use WebhooksGetRequest instead. */ export type WebhooksGetResponse = { webhook: Webhook } +/** + * Request returned by `SeamHttpWebhooks.get`. + */ export type WebhooksGetRequest = SeamHttpRequest +/** + * Options for `SeamHttpWebhooks.get`. + */ export interface WebhooksGetOptions {} +/** + * Parameters for `SeamHttpWebhooks.list`. + */ export type WebhooksListParameters = {} /** + * Response from `SeamHttpWebhooks.list`. + * * @deprecated Use WebhooksListRequest instead. */ export type WebhooksListResponse = { webhooks: Array } +/** + * Request returned by `SeamHttpWebhooks.list`. + */ export type WebhooksListRequest = SeamHttpRequest< WebhooksListResponse, 'webhooks' > +/** + * Options for `SeamHttpWebhooks.list`. + */ export interface WebhooksListOptions {} +/** + * Parameters for `SeamHttpWebhooks.update`. + */ export type WebhooksUpdateParameters = { /** * Types of events that you want the webhook to receive. @@ -321,10 +409,18 @@ export type WebhooksUpdateParameters = { } /** + * Response from `SeamHttpWebhooks.update`. + * * @deprecated Use WebhooksUpdateRequest instead. */ export type WebhooksUpdateResponse = void +/** + * Request returned by `SeamHttpWebhooks.update`. + */ export type WebhooksUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpWebhooks.update`. + */ export interface WebhooksUpdateOptions {} diff --git a/src/lib/routes/workspaces/workspaces.ts b/src/lib/routes/workspaces/workspaces.ts index 1223cc75..039890de 100644 --- a/src/lib/routes/workspaces/workspaces.ts +++ b/src/lib/routes/workspaces/workspaces.ts @@ -35,8 +35,18 @@ import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam-http-request.js' import { SeamPaginator } from 'lib/seam-paginator.js' +/** + * Client for the Seam API /workspaces routes. + */ export class SeamHttpWorkspaces { + /** + * The client used to make HTTP requests to the Seam API. + */ client: Client + + /** + * Default request options used for requests made by this client. + */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -45,6 +55,9 @@ export class SeamHttpWorkspaces { this.defaults = limitToSeamHttpRequestOptions(options) } + /** + * Creates a new SeamHttpWorkspaces from an existing HTTP client. + */ static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, @@ -56,6 +69,9 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + /** + * Creates a new SeamHttpWorkspaces authenticated with an API key. + */ static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, @@ -67,6 +83,9 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + /** + * Creates a new SeamHttpWorkspaces authenticated with a client session token. + */ static fromClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options: Omit< @@ -81,6 +100,11 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + /** + * Creates a new SeamHttpWorkspaces authenticated with a client session token + * for the user identified by the user identifier key. + * The client session is created with the publishable key if it does not exist. + */ static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, @@ -101,6 +125,10 @@ export class SeamHttpWorkspaces { return SeamHttpWorkspaces.fromClientSessionToken(token, options) } + /** + * Creates a new SeamHttpWorkspaces authenticated with a console session token + * and scoped to a workspace. + */ static fromConsoleSessionToken( consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], @@ -118,6 +146,10 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + /** + * Creates a new SeamHttpWorkspaces authenticated with a personal access token + * and scoped to a workspace. + */ static fromPersonalAccessToken( personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], @@ -135,12 +167,21 @@ export class SeamHttpWorkspaces { return new SeamHttpWorkspaces(constructorOptions) } + /** + * Creates a new SeamPaginator to iterate over the paginated results + * of the request. + */ createPaginator( request: SeamHttpRequest, ): SeamPaginator { return new SeamPaginator(this, request) } + /** + * Updates the client session token used by this client for authentication. + * + * @throws If this client was not created with a client session token. + */ async updateClientSessionToken( clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], ): Promise { @@ -245,6 +286,9 @@ export class SeamHttpWorkspaces { } } +/** + * Parameters for `SeamHttpWorkspaces.create`. + */ export type WorkspacesCreateParameters = { /** * Company name for the new workspace. @@ -252,6 +296,7 @@ export type WorkspacesCreateParameters = { company_name?: string | undefined /** * Connect partner name for the new workspace. + * * @deprecated Use `company_name` instead. */ connect_partner_name?: string | undefined @@ -310,62 +355,106 @@ export type WorkspacesCreateParameters = { } /** + * Response from `SeamHttpWorkspaces.create`. + * * @deprecated Use WorkspacesCreateRequest instead. */ export type WorkspacesCreateResponse = { workspace: Workspace } +/** + * Request returned by `SeamHttpWorkspaces.create`. + */ export type WorkspacesCreateRequest = SeamHttpRequest< WorkspacesCreateResponse, 'workspace' > +/** + * Options for `SeamHttpWorkspaces.create`. + */ export interface WorkspacesCreateOptions {} +/** + * Parameters for `SeamHttpWorkspaces.get`. + */ export type WorkspacesGetParameters = {} /** + * Response from `SeamHttpWorkspaces.get`. + * * @deprecated Use WorkspacesGetRequest instead. */ export type WorkspacesGetResponse = { workspace: Workspace } +/** + * Request returned by `SeamHttpWorkspaces.get`. + */ export type WorkspacesGetRequest = SeamHttpRequest< WorkspacesGetResponse, 'workspace' > +/** + * Options for `SeamHttpWorkspaces.get`. + */ export interface WorkspacesGetOptions {} +/** + * Parameters for `SeamHttpWorkspaces.list`. + */ export type WorkspacesListParameters = {} /** + * Response from `SeamHttpWorkspaces.list`. + * * @deprecated Use WorkspacesListRequest instead. */ export type WorkspacesListResponse = { workspaces: Array } +/** + * Request returned by `SeamHttpWorkspaces.list`. + */ export type WorkspacesListRequest = SeamHttpRequest< WorkspacesListResponse, 'workspaces' > +/** + * Options for `SeamHttpWorkspaces.list`. + */ export interface WorkspacesListOptions {} +/** + * Parameters for `SeamHttpWorkspaces.resetSandbox`. + */ export type WorkspacesResetSandboxParameters = {} /** + * Response from `SeamHttpWorkspaces.resetSandbox`. + * * @deprecated Use WorkspacesResetSandboxRequest instead. */ export type WorkspacesResetSandboxResponse = { action_attempt: ActionAttempt } +/** + * Request returned by `SeamHttpWorkspaces.resetSandbox`. + */ export type WorkspacesResetSandboxRequest = SeamHttpRequest< WorkspacesResetSandboxResponse, 'action_attempt' > +/** + * Options for `SeamHttpWorkspaces.resetSandbox`. + */ export type WorkspacesResetSandboxOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > +/** + * Parameters for `SeamHttpWorkspaces.update`. + */ export type WorkspacesUpdateParameters = { /** * Connect partner name for the workspace. @@ -413,10 +502,18 @@ export type WorkspacesUpdateParameters = { } /** + * Response from `SeamHttpWorkspaces.update`. + * * @deprecated Use WorkspacesUpdateRequest instead. */ export type WorkspacesUpdateResponse = void +/** + * Request returned by `SeamHttpWorkspaces.update`. + */ export type WorkspacesUpdateRequest = SeamHttpRequest +/** + * Options for `SeamHttpWorkspaces.update`. + */ export interface WorkspacesUpdateOptions {} From b502e0eebd8b8325b1de1383b8e6d50605533f02 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 17:08:21 +0000 Subject: [PATCH 4/4] docs: Remove docstrings that restate their signatures Require JSDoc only on top-level exports, not class members or properties. Remove the generated docs on the endpoint Parameters, Response, Request, Options, and path types, and drop handwritten and template member docs that only repeat the member name or type, e.g., statusCode: 401. Member docs that carry real information remain, e.g., requestId, waitForActionAttempt, and the polling options. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XQyDWeGYQyCDEJ1rZ8J1iB --- codegen/layouts/endpoints.hbs | 9 - .../partials/route-class-endpoint-export.hbs | 14 -- .../route-class-methods-without-workspace.hbs | 7 - .../layouts/partials/route-class-methods.hbs | 7 - eslint.config.ts | 34 +++- src/lib/options.ts | 32 ---- src/lib/resolve-action-attempt.ts | 3 - src/lib/routes/access-codes/access-codes.ts | 117 ------------- .../routes/access-codes/simulate/simulate.ts | 18 -- .../access-codes/unmanaged/unmanaged.ts | 62 ------- src/lib/routes/access-grants/access-grants.ts | 84 --------- .../access-grants/unmanaged/unmanaged.ts | 40 ----- .../routes/access-methods/access-methods.ts | 84 --------- .../access-methods/unmanaged/unmanaged.ts | 29 ---- .../routes/acs/access-groups/access-groups.ts | 84 --------- src/lib/routes/acs/acs.ts | 7 - src/lib/routes/acs/credentials/credentials.ts | 95 ----------- src/lib/routes/acs/encoders/encoders.ts | 62 ------- .../routes/acs/encoders/simulate/simulate.ts | 51 ------ src/lib/routes/acs/entrances/entrances.ts | 62 ------- src/lib/routes/acs/systems/systems.ts | 51 ------ src/lib/routes/acs/users/users.ts | 128 -------------- .../routes/action-attempts/action-attempts.ts | 29 ---- .../routes/client-sessions/client-sessions.ts | 84 --------- .../connect-webviews/connect-webviews.ts | 51 ------ .../connected-accounts/connected-accounts.ts | 62 ------- .../connected-accounts/simulate/simulate.ts | 18 -- src/lib/routes/customers/customers.ts | 40 ----- src/lib/routes/devices/devices.ts | 62 ------- src/lib/routes/devices/simulate/simulate.ts | 73 -------- src/lib/routes/devices/unmanaged/unmanaged.ts | 40 ----- src/lib/routes/events/events.ts | 29 ---- src/lib/routes/instant-keys/instant-keys.ts | 40 ----- src/lib/routes/locks/locks.ts | 62 ------- src/lib/routes/locks/simulate/simulate.ts | 29 ---- src/lib/routes/noise-sensors/noise-sensors.ts | 18 -- .../noise-thresholds/noise-thresholds.ts | 62 ------- .../routes/noise-sensors/simulate/simulate.ts | 18 -- src/lib/routes/phones/phones.ts | 40 ----- src/lib/routes/phones/simulate/simulate.ts | 18 -- .../seam-http-endpoints-without-workspace.ts | 13 -- src/lib/routes/seam-http-endpoints.ts | 16 -- src/lib/routes/seam-http-without-workspace.ts | 7 - src/lib/routes/seam-http.ts | 7 - src/lib/routes/spaces/spaces.ts | 139 --------------- .../daily-programs/daily-programs.ts | 40 ----- .../routes/thermostats/schedules/schedules.ts | 62 ------- .../routes/thermostats/simulate/simulate.ts | 29 ---- src/lib/routes/thermostats/thermostats.ts | 161 ------------------ .../user-identities/unmanaged/unmanaged.ts | 40 ----- .../routes/user-identities/user-identities.ts | 161 ------------------ src/lib/routes/webhooks/webhooks.ts | 62 ------- src/lib/routes/workspaces/workspaces.ts | 62 ------- src/lib/seam-http-error.ts | 13 -- src/lib/seam-http-request.ts | 27 --- src/lib/seam-paginator.ts | 11 -- 56 files changed, 30 insertions(+), 2675 deletions(-) diff --git a/codegen/layouts/endpoints.hbs b/codegen/layouts/endpoints.hbs index a618d409..73a1819b 100644 --- a/codegen/layouts/endpoints.hbs +++ b/codegen/layouts/endpoints.hbs @@ -42,22 +42,13 @@ export class {{className}} { } {{#if endpointReadPaths.length}} -/** - * Paths of the Seam API query endpoints{{#if withoutWorkspace}} available without a workspace{{/if}}. - */ export type {{typeNamePrefix}}QueryPaths = {{#each endpointReadPaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} {{#if endpointPaginatedPaths.length}} -/** - * Paths of the Seam API query endpoints{{#if withoutWorkspace}} available without a workspace{{/if}} that support pagination. - */ export type {{typeNamePrefix}}PaginatedQueryPaths = {{#each endpointPaginatedPaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} {{#if endpointWritePaths.length}} -/** - * Paths of the Seam API mutation endpoints{{#if withoutWorkspace}} available without a workspace{{/if}}. - */ export type {{typeNamePrefix}}MutationPaths = {{#each endpointWritePaths}}'{{.}}' {{#unless @last}} | {{/unless}}{{/each}} {{/if}} diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index 2d37d23b..3ecd1069 100644 --- a/codegen/layouts/partials/route-class-endpoint-export.hbs +++ b/codegen/layouts/partials/route-class-endpoint-export.hbs @@ -1,29 +1,15 @@ -/** - * Parameters for `{{className}}.{{methodName}}`. - */ export type {{parametersTypeName}} = {{#if requiresAtLeastOneParameter}}RequireAtLeastOne<{{/if}}{{> request-object parameters=parameters}}{{#if requiresAtLeastOneParameter}}>{{/if}} /** - * Response from `{{className}}.{{methodName}}`. - * * @deprecated Use {{requestTypeName}} instead. */ export type {{responseTypeName}} = {{#if returnsVoid}}void{{else}}{ {{json responseKey}}: {{#if responseIsList}}Array<{{responseResourceTypeName}}>{{else}}{{responseResourceTypeName}}{{/if}} }{{/if}} -/** - * Request returned by `{{className}}.{{methodName}}`. - */ export type {{requestTypeName}} = SeamHttpRequest<{{#if returnsVoid}}void, undefined{{else}}{{responseTypeName}}, '{{responseKey}}'{{/if}}> {{#if returnsActionAttempt}} -/** - * Options for `{{className}}.{{methodName}}`. - */ export type {{optionsTypeName}} = Pick {{else}} -/** - * Options for `{{className}}.{{methodName}}`. - */ export interface {{optionsTypeName}} {} {{/if}} diff --git a/codegen/layouts/partials/route-class-methods-without-workspace.hbs b/codegen/layouts/partials/route-class-methods-without-workspace.hbs index 42b8530e..74013209 100644 --- a/codegen/layouts/partials/route-class-methods-without-workspace.hbs +++ b/codegen/layouts/partials/route-class-methods-without-workspace.hbs @@ -1,11 +1,4 @@ -/** - * The client used to make HTTP requests to the Seam API. - */ client: Client - -/** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { diff --git a/codegen/layouts/partials/route-class-methods.hbs b/codegen/layouts/partials/route-class-methods.hbs index 671af1ad..4a5dce56 100644 --- a/codegen/layouts/partials/route-class-methods.hbs +++ b/codegen/layouts/partials/route-class-methods.hbs @@ -1,11 +1,4 @@ -/** - * The client used to make HTTP requests to the Seam API. - */ client: Client - -/** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { diff --git a/eslint.config.ts b/eslint.config.ts index 7d75fff5..81b59c10 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -27,6 +27,11 @@ const publicApiFiles = [ 'src/lib/token.ts', ] +// The generated endpoint Parameters, Response, Request, and Options types +// are self-describing, so exported types in generated route files +// do not require documentation. +const generatedRouteFiles = ['src/lib/routes/**/*.ts'] + export default [ globalIgnores(resolveIgnoresFromGitignore()), ...neostandard({ ts: true, noStyle: true }), @@ -115,12 +120,10 @@ export default [ 'ExportNamedDeclaration > TSInterfaceDeclaration', 'ExportNamedDeclaration > TSTypeAliasDeclaration', 'ExportNamedDeclaration > TSEnumDeclaration', - 'MethodDefinition[key.type!="PrivateIdentifier"]', - 'PropertyDefinition[key.type!="PrivateIdentifier"]', ], checkConstructors: false, - checkGetters: true, - checkSetters: true, + checkGetters: false, + checkSetters: false, enableFixer: false, }, ], @@ -141,6 +144,29 @@ export default [ 'jsdoc/check-alignment': 'off', }, }, + { + files: generatedRouteFiles, + rules: { + 'jsdoc/require-jsdoc': [ + 'error', + { + publicOnly: true, + require: { + ArrowFunctionExpression: true, + ClassDeclaration: true, + ClassExpression: true, + FunctionDeclaration: true, + FunctionExpression: true, + MethodDefinition: false, + }, + checkConstructors: false, + checkGetters: false, + checkSetters: false, + enableFixer: false, + }, + ], + }, + }, { files, plugins: { diff --git a/src/lib/options.ts b/src/lib/options.ts index ae45cdfc..4b2984cd 100644 --- a/src/lib/options.ts +++ b/src/lib/options.ts @@ -57,9 +57,6 @@ export interface SeamHttpWithoutWorkspaceOptionsFromEnv extends SeamHttpCommonOp * Options for creating a SeamHttpWithoutWorkspace client from an existing client. */ export interface SeamHttpWithoutWorkspaceOptionsWithClient extends SeamHttpCommonOptions { - /** - * The existing client to use for requests. - */ client: Client } @@ -78,9 +75,6 @@ export const isSeamHttpWithoutWorkspaceOptionsWithClient = ( * Options for creating a SeamHttp client from an existing client. */ export interface SeamHttpOptionsWithClient extends SeamHttpRequestOptions { - /** - * The existing client to use for requests. - */ client: Client } @@ -112,9 +106,6 @@ export const isSeamHttpOptionsWithClient = ( * Options for creating a SeamHttp client authenticated with an API key. */ export interface SeamHttpOptionsWithApiKey extends SeamHttpCommonOptions { - /** - * The API key to use for authentication. - */ apiKey: string } @@ -155,9 +146,6 @@ export const isSeamHttpOptionsWithApiKey = ( * Options for creating a SeamHttp client authenticated with a client session token. */ export interface SeamHttpOptionsWithClientSessionToken extends SeamHttpCommonOptions { - /** - * The client session token to use for authentication. - */ clientSessionToken: string } @@ -199,9 +187,6 @@ export const isSeamHttpOptionsWithClientSessionToken = ( * authenticated with a console session token. */ export interface SeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken extends SeamHttpCommonOptions { - /** - * The console session token to use for authentication. - */ consoleSessionToken: string } @@ -243,14 +228,7 @@ export const isSeamHttpWithoutWorkspaceOptionsWithConsoleSessionToken = ( * authenticated with a console session token and scoped to a workspace. */ export interface SeamHttpOptionsWithConsoleSessionToken extends SeamHttpCommonOptions { - /** - * The console session token to use for authentication. - */ consoleSessionToken: string - - /** - * The ID of the workspace to scope requests to. - */ workspaceId: string } @@ -281,9 +259,6 @@ export const isSeamHttpOptionsWithConsoleSessionToken = ( * authenticated with a personal access token. */ export interface SeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken extends SeamHttpCommonOptions { - /** - * The personal access token to use for authentication. - */ personalAccessToken: string } @@ -325,14 +300,7 @@ export const isSeamHttpWithoutWorkspaceOptionsWithPersonalAccessToken = ( * authenticated with a personal access token and scoped to a workspace. */ export interface SeamHttpOptionsWithPersonalAccessToken extends SeamHttpCommonOptions { - /** - * The personal access token to use for authentication. - */ personalAccessToken: string - - /** - * The ID of the workspace to scope requests to. - */ workspaceId: string } diff --git a/src/lib/resolve-action-attempt.ts b/src/lib/resolve-action-attempt.ts index d063276f..e01607be 100644 --- a/src/lib/resolve-action-attempt.ts +++ b/src/lib/resolve-action-attempt.ts @@ -93,9 +93,6 @@ export const isSeamActionAttemptError = ( * Error relating to an action attempt. */ export class SeamActionAttemptError extends Error { - /** - * The action attempt that caused this error. - */ actionAttempt: T constructor(message: string, actionAttempt: T) { diff --git a/src/lib/routes/access-codes/access-codes.ts b/src/lib/routes/access-codes/access-codes.ts index 5dbb1d08..2fc0c16c 100644 --- a/src/lib/routes/access-codes/access-codes.ts +++ b/src/lib/routes/access-codes/access-codes.ts @@ -44,14 +44,7 @@ import { SeamHttpAccessCodesUnmanaged } from './unmanaged/index.js' * Client for the Seam API /access_codes routes. */ export class SeamHttpAccessCodes { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -462,9 +455,6 @@ export class SeamHttpAccessCodes { } } -/** - * Parameters for `SeamHttpAccessCodes.create`. - */ export type AccessCodesCreateParameters = { /** * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. @@ -538,28 +528,17 @@ export type AccessCodesCreateParameters = { } /** - * Response from `SeamHttpAccessCodes.create`. - * * @deprecated Use AccessCodesCreateRequest instead. */ export type AccessCodesCreateResponse = { access_code: AccessCode } -/** - * Request returned by `SeamHttpAccessCodes.create`. - */ export type AccessCodesCreateRequest = SeamHttpRequest< AccessCodesCreateResponse, 'access_code' > -/** - * Options for `SeamHttpAccessCodes.create`. - */ export interface AccessCodesCreateOptions {} -/** - * Parameters for `SeamHttpAccessCodes.createMultiple`. - */ export type AccessCodesCreateMultipleParameters = { /** * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. @@ -618,30 +597,19 @@ export type AccessCodesCreateMultipleParameters = { } /** - * Response from `SeamHttpAccessCodes.createMultiple`. - * * @deprecated Use AccessCodesCreateMultipleRequest instead. */ export type AccessCodesCreateMultipleResponse = { access_codes: Array } -/** - * Request returned by `SeamHttpAccessCodes.createMultiple`. - */ export type AccessCodesCreateMultipleRequest = SeamHttpRequest< AccessCodesCreateMultipleResponse, 'access_codes' > -/** - * Options for `SeamHttpAccessCodes.createMultiple`. - */ export interface AccessCodesCreateMultipleOptions {} -/** - * Parameters for `SeamHttpAccessCodes.delete`. - */ export type AccessCodesDeleteParameters = { /** * ID of the access code that you want to delete. @@ -655,25 +623,14 @@ export type AccessCodesDeleteParameters = { } /** - * Response from `SeamHttpAccessCodes.delete`. - * * @deprecated Use AccessCodesDeleteRequest instead. */ export type AccessCodesDeleteResponse = void -/** - * Request returned by `SeamHttpAccessCodes.delete`. - */ export type AccessCodesDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessCodes.delete`. - */ export interface AccessCodesDeleteOptions {} -/** - * Parameters for `SeamHttpAccessCodes.generateCode`. - */ export type AccessCodesGenerateCodeParameters = { /** * ID of the device for which you want to generate a code. @@ -682,28 +639,17 @@ export type AccessCodesGenerateCodeParameters = { } /** - * Response from `SeamHttpAccessCodes.generateCode`. - * * @deprecated Use AccessCodesGenerateCodeRequest instead. */ export type AccessCodesGenerateCodeResponse = { generated_code: AccessCode } -/** - * Request returned by `SeamHttpAccessCodes.generateCode`. - */ export type AccessCodesGenerateCodeRequest = SeamHttpRequest< AccessCodesGenerateCodeResponse, 'generated_code' > -/** - * Options for `SeamHttpAccessCodes.generateCode`. - */ export interface AccessCodesGenerateCodeOptions {} -/** - * Parameters for `SeamHttpAccessCodes.get`. - */ export type AccessCodesGetParameters = RequireAtLeastOne<{ /** * ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. @@ -720,28 +666,17 @@ export type AccessCodesGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessCodes.get`. - * * @deprecated Use AccessCodesGetRequest instead. */ export type AccessCodesGetResponse = { access_code: AccessCode } -/** - * Request returned by `SeamHttpAccessCodes.get`. - */ export type AccessCodesGetRequest = SeamHttpRequest< AccessCodesGetResponse, 'access_code' > -/** - * Options for `SeamHttpAccessCodes.get`. - */ export interface AccessCodesGetOptions {} -/** - * Parameters for `SeamHttpAccessCodes.list`. - */ export type AccessCodesListParameters = RequireAtLeastOne<{ /** * IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. @@ -786,28 +721,17 @@ export type AccessCodesListParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessCodes.list`. - * * @deprecated Use AccessCodesListRequest instead. */ export type AccessCodesListResponse = { access_codes: Array } -/** - * Request returned by `SeamHttpAccessCodes.list`. - */ export type AccessCodesListRequest = SeamHttpRequest< AccessCodesListResponse, 'access_codes' > -/** - * Options for `SeamHttpAccessCodes.list`. - */ export interface AccessCodesListOptions {} -/** - * Parameters for `SeamHttpAccessCodes.pullBackupAccessCode`. - */ export type AccessCodesPullBackupAccessCodeParameters = { /** * ID of the access code for which you want to pull a backup access code. @@ -816,30 +740,19 @@ export type AccessCodesPullBackupAccessCodeParameters = { } /** - * Response from `SeamHttpAccessCodes.pullBackupAccessCode`. - * * @deprecated Use AccessCodesPullBackupAccessCodeRequest instead. */ export type AccessCodesPullBackupAccessCodeResponse = { access_code: AccessCode } -/** - * Request returned by `SeamHttpAccessCodes.pullBackupAccessCode`. - */ export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< AccessCodesPullBackupAccessCodeResponse, 'access_code' > -/** - * Options for `SeamHttpAccessCodes.pullBackupAccessCode`. - */ export interface AccessCodesPullBackupAccessCodeOptions {} -/** - * Parameters for `SeamHttpAccessCodes.reportDeviceConstraints`. - */ export type AccessCodesReportDeviceConstraintsParameters = { /** * ID of the device for which you want to report constraints. @@ -861,28 +774,17 @@ export type AccessCodesReportDeviceConstraintsParameters = { } /** - * Response from `SeamHttpAccessCodes.reportDeviceConstraints`. - * * @deprecated Use AccessCodesReportDeviceConstraintsRequest instead. */ export type AccessCodesReportDeviceConstraintsResponse = void -/** - * Request returned by `SeamHttpAccessCodes.reportDeviceConstraints`. - */ export type AccessCodesReportDeviceConstraintsRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpAccessCodes.reportDeviceConstraints`. - */ export interface AccessCodesReportDeviceConstraintsOptions {} -/** - * Parameters for `SeamHttpAccessCodes.update`. - */ export type AccessCodesUpdateParameters = { /** * ID of the access code that you want to update. @@ -936,25 +838,14 @@ export type AccessCodesUpdateParameters = { } /** - * Response from `SeamHttpAccessCodes.update`. - * * @deprecated Use AccessCodesUpdateRequest instead. */ export type AccessCodesUpdateResponse = void -/** - * Request returned by `SeamHttpAccessCodes.update`. - */ export type AccessCodesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessCodes.update`. - */ export interface AccessCodesUpdateOptions {} -/** - * Parameters for `SeamHttpAccessCodes.updateMultiple`. - */ export type AccessCodesUpdateMultipleParameters = { /** * Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. @@ -982,18 +873,10 @@ export type AccessCodesUpdateMultipleParameters = { } /** - * Response from `SeamHttpAccessCodes.updateMultiple`. - * * @deprecated Use AccessCodesUpdateMultipleRequest instead. */ export type AccessCodesUpdateMultipleResponse = void -/** - * Request returned by `SeamHttpAccessCodes.updateMultiple`. - */ export type AccessCodesUpdateMultipleRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessCodes.updateMultiple`. - */ export interface AccessCodesUpdateMultipleOptions {} diff --git a/src/lib/routes/access-codes/simulate/simulate.ts b/src/lib/routes/access-codes/simulate/simulate.ts index 14609024..5afafcaf 100644 --- a/src/lib/routes/access-codes/simulate/simulate.ts +++ b/src/lib/routes/access-codes/simulate/simulate.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /access_codes/simulate routes. */ export class SeamHttpAccessCodesSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -224,9 +217,6 @@ export class SeamHttpAccessCodesSimulate { } } -/** - * Parameters for `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. - */ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { /** * Code of the simulated unmanaged access code. @@ -245,24 +235,16 @@ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { } /** - * Response from `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. - * * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeRequest instead. */ export type AccessCodesSimulateCreateUnmanagedAccessCodeResponse = { access_code: UnmanagedAccessCode } -/** - * Request returned by `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. - */ export type AccessCodesSimulateCreateUnmanagedAccessCodeRequest = SeamHttpRequest< AccessCodesSimulateCreateUnmanagedAccessCodeResponse, 'access_code' > -/** - * Options for `SeamHttpAccessCodesSimulate.createUnmanagedAccessCode`. - */ export interface AccessCodesSimulateCreateUnmanagedAccessCodeOptions {} diff --git a/src/lib/routes/access-codes/unmanaged/unmanaged.ts b/src/lib/routes/access-codes/unmanaged/unmanaged.ts index 2c163eb0..e90436d0 100644 --- a/src/lib/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-codes/unmanaged/unmanaged.ts @@ -41,14 +41,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /access_codes/unmanaged routes. */ export class SeamHttpAccessCodesUnmanaged { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -325,9 +318,6 @@ export class SeamHttpAccessCodesUnmanaged { } } -/** - * Parameters for `SeamHttpAccessCodesUnmanaged.convertToManaged`. - */ export type AccessCodesUnmanagedConvertToManagedParameters = { /** * ID of the unmanaged access code that you want to convert to a managed access code. @@ -349,28 +339,17 @@ export type AccessCodesUnmanagedConvertToManagedParameters = { } /** - * Response from `SeamHttpAccessCodesUnmanaged.convertToManaged`. - * * @deprecated Use AccessCodesUnmanagedConvertToManagedRequest instead. */ export type AccessCodesUnmanagedConvertToManagedResponse = void -/** - * Request returned by `SeamHttpAccessCodesUnmanaged.convertToManaged`. - */ export type AccessCodesUnmanagedConvertToManagedRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpAccessCodesUnmanaged.convertToManaged`. - */ export interface AccessCodesUnmanagedConvertToManagedOptions {} -/** - * Parameters for `SeamHttpAccessCodesUnmanaged.delete`. - */ export type AccessCodesUnmanagedDeleteParameters = { /** * ID of the unmanaged access code that you want to delete. @@ -379,25 +358,14 @@ export type AccessCodesUnmanagedDeleteParameters = { } /** - * Response from `SeamHttpAccessCodesUnmanaged.delete`. - * * @deprecated Use AccessCodesUnmanagedDeleteRequest instead. */ export type AccessCodesUnmanagedDeleteResponse = void -/** - * Request returned by `SeamHttpAccessCodesUnmanaged.delete`. - */ export type AccessCodesUnmanagedDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessCodesUnmanaged.delete`. - */ export interface AccessCodesUnmanagedDeleteOptions {} -/** - * Parameters for `SeamHttpAccessCodesUnmanaged.get`. - */ export type AccessCodesUnmanagedGetParameters = RequireAtLeastOne<{ /** * ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. @@ -414,30 +382,19 @@ export type AccessCodesUnmanagedGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessCodesUnmanaged.get`. - * * @deprecated Use AccessCodesUnmanagedGetRequest instead. */ export type AccessCodesUnmanagedGetResponse = { access_code: UnmanagedAccessCode } -/** - * Request returned by `SeamHttpAccessCodesUnmanaged.get`. - */ export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< AccessCodesUnmanagedGetResponse, 'access_code' > -/** - * Options for `SeamHttpAccessCodesUnmanaged.get`. - */ export interface AccessCodesUnmanagedGetOptions {} -/** - * Parameters for `SeamHttpAccessCodesUnmanaged.list`. - */ export type AccessCodesUnmanagedListParameters = { /** * ID of the device for which you want to list unmanaged access codes. @@ -463,30 +420,19 @@ export type AccessCodesUnmanagedListParameters = { } /** - * Response from `SeamHttpAccessCodesUnmanaged.list`. - * * @deprecated Use AccessCodesUnmanagedListRequest instead. */ export type AccessCodesUnmanagedListResponse = { access_codes: Array } -/** - * Request returned by `SeamHttpAccessCodesUnmanaged.list`. - */ export type AccessCodesUnmanagedListRequest = SeamHttpRequest< AccessCodesUnmanagedListResponse, 'access_codes' > -/** - * Options for `SeamHttpAccessCodesUnmanaged.list`. - */ export interface AccessCodesUnmanagedListOptions {} -/** - * Parameters for `SeamHttpAccessCodesUnmanaged.update`. - */ export type AccessCodesUnmanagedUpdateParameters = { /** * ID of the unmanaged access code that you want to update. @@ -510,18 +456,10 @@ export type AccessCodesUnmanagedUpdateParameters = { } /** - * Response from `SeamHttpAccessCodesUnmanaged.update`. - * * @deprecated Use AccessCodesUnmanagedUpdateRequest instead. */ export type AccessCodesUnmanagedUpdateResponse = void -/** - * Request returned by `SeamHttpAccessCodesUnmanaged.update`. - */ export type AccessCodesUnmanagedUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessCodesUnmanaged.update`. - */ export interface AccessCodesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/access-grants/access-grants.ts b/src/lib/routes/access-grants/access-grants.ts index 762f97e1..9704189a 100644 --- a/src/lib/routes/access-grants/access-grants.ts +++ b/src/lib/routes/access-grants/access-grants.ts @@ -44,14 +44,7 @@ import { SeamHttpAccessGrantsUnmanaged } from './unmanaged/index.js' * Client for the Seam API /access_grants routes. */ export class SeamHttpAccessGrants { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -354,9 +347,6 @@ export class SeamHttpAccessGrants { } } -/** - * Parameters for `SeamHttpAccessGrants.create`. - */ export type AccessGrantsCreateParameters = { /** * ID of user identity for whom access is being granted. @@ -467,28 +457,17 @@ export type AccessGrantsCreateParameters = { } /** - * Response from `SeamHttpAccessGrants.create`. - * * @deprecated Use AccessGrantsCreateRequest instead. */ export type AccessGrantsCreateResponse = { access_grant: AccessGrant } -/** - * Request returned by `SeamHttpAccessGrants.create`. - */ export type AccessGrantsCreateRequest = SeamHttpRequest< AccessGrantsCreateResponse, 'access_grant' > -/** - * Options for `SeamHttpAccessGrants.create`. - */ export interface AccessGrantsCreateOptions {} -/** - * Parameters for `SeamHttpAccessGrants.delete`. - */ export type AccessGrantsDeleteParameters = { /** * ID of Access Grant to delete. @@ -497,25 +476,14 @@ export type AccessGrantsDeleteParameters = { } /** - * Response from `SeamHttpAccessGrants.delete`. - * * @deprecated Use AccessGrantsDeleteRequest instead. */ export type AccessGrantsDeleteResponse = void -/** - * Request returned by `SeamHttpAccessGrants.delete`. - */ export type AccessGrantsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessGrants.delete`. - */ export interface AccessGrantsDeleteOptions {} -/** - * Parameters for `SeamHttpAccessGrants.get`. - */ export type AccessGrantsGetParameters = RequireAtLeastOne<{ /** * ID of Access Grant to get. @@ -528,28 +496,17 @@ export type AccessGrantsGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessGrants.get`. - * * @deprecated Use AccessGrantsGetRequest instead. */ export type AccessGrantsGetResponse = { access_grant: AccessGrant } -/** - * Request returned by `SeamHttpAccessGrants.get`. - */ export type AccessGrantsGetRequest = SeamHttpRequest< AccessGrantsGetResponse, 'access_grant' > -/** - * Options for `SeamHttpAccessGrants.get`. - */ export interface AccessGrantsGetOptions {} -/** - * Parameters for `SeamHttpAccessGrants.getRelated`. - */ export type AccessGrantsGetRelatedParameters = RequireAtLeastOne<{ /** * IDs of the access grants that you want to get along with their related resources. @@ -588,8 +545,6 @@ export type AccessGrantsGetRelatedParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessGrants.getRelated`. - * * @deprecated Use AccessGrantsGetRelatedRequest instead. */ export type AccessGrantsGetRelatedResponse = { @@ -605,22 +560,13 @@ export type AccessGrantsGetRelatedResponse = { > } -/** - * Request returned by `SeamHttpAccessGrants.getRelated`. - */ export type AccessGrantsGetRelatedRequest = SeamHttpRequest< AccessGrantsGetRelatedResponse, 'batch' > -/** - * Options for `SeamHttpAccessGrants.getRelated`. - */ export interface AccessGrantsGetRelatedOptions {} -/** - * Parameters for `SeamHttpAccessGrants.list`. - */ export type AccessGrantsListParameters = { /** * ID of the access code by which you want to filter the list of Access Grants. @@ -677,28 +623,17 @@ export type AccessGrantsListParameters = { } /** - * Response from `SeamHttpAccessGrants.list`. - * * @deprecated Use AccessGrantsListRequest instead. */ export type AccessGrantsListResponse = { access_grants: Array } -/** - * Request returned by `SeamHttpAccessGrants.list`. - */ export type AccessGrantsListRequest = SeamHttpRequest< AccessGrantsListResponse, 'access_grants' > -/** - * Options for `SeamHttpAccessGrants.list`. - */ export interface AccessGrantsListOptions {} -/** - * Parameters for `SeamHttpAccessGrants.requestAccessMethods`. - */ export type AccessGrantsRequestAccessMethodsParameters = { /** * ID of the Access Grant to add access methods to. @@ -725,30 +660,19 @@ export type AccessGrantsRequestAccessMethodsParameters = { } /** - * Response from `SeamHttpAccessGrants.requestAccessMethods`. - * * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ export type AccessGrantsRequestAccessMethodsResponse = { access_grant: AccessGrant } -/** - * Request returned by `SeamHttpAccessGrants.requestAccessMethods`. - */ export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< AccessGrantsRequestAccessMethodsResponse, 'access_grant' > -/** - * Options for `SeamHttpAccessGrants.requestAccessMethods`. - */ export interface AccessGrantsRequestAccessMethodsOptions {} -/** - * Parameters for `SeamHttpAccessGrants.update`. - */ export type AccessGrantsUpdateParameters = RequireAtLeastOne<{ /** * ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. @@ -773,18 +697,10 @@ export type AccessGrantsUpdateParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessGrants.update`. - * * @deprecated Use AccessGrantsUpdateRequest instead. */ export type AccessGrantsUpdateResponse = void -/** - * Request returned by `SeamHttpAccessGrants.update`. - */ export type AccessGrantsUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessGrants.update`. - */ export interface AccessGrantsUpdateOptions {} diff --git a/src/lib/routes/access-grants/unmanaged/unmanaged.ts b/src/lib/routes/access-grants/unmanaged/unmanaged.ts index 2cc8c4d8..daf503f6 100644 --- a/src/lib/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-grants/unmanaged/unmanaged.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /access_grants/unmanaged routes. */ export class SeamHttpAccessGrantsUnmanaged { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -274,9 +267,6 @@ export class SeamHttpAccessGrantsUnmanaged { } } -/** - * Parameters for `SeamHttpAccessGrantsUnmanaged.get`. - */ export type AccessGrantsUnmanagedGetParameters = { /** * ID of unmanaged Access Grant to get. @@ -285,30 +275,19 @@ export type AccessGrantsUnmanagedGetParameters = { } /** - * Response from `SeamHttpAccessGrantsUnmanaged.get`. - * * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ export type AccessGrantsUnmanagedGetResponse = { access_grant: UnmanagedAccessGrant } -/** - * Request returned by `SeamHttpAccessGrantsUnmanaged.get`. - */ export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< AccessGrantsUnmanagedGetResponse, 'access_grant' > -/** - * Options for `SeamHttpAccessGrantsUnmanaged.get`. - */ export interface AccessGrantsUnmanagedGetOptions {} -/** - * Parameters for `SeamHttpAccessGrantsUnmanaged.list`. - */ export type AccessGrantsUnmanagedListParameters = { /** * ID of the entrance by which you want to filter the list of unmanaged Access Grants. @@ -337,30 +316,19 @@ export type AccessGrantsUnmanagedListParameters = { } /** - * Response from `SeamHttpAccessGrantsUnmanaged.list`. - * * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ export type AccessGrantsUnmanagedListResponse = { access_grants: Array } -/** - * Request returned by `SeamHttpAccessGrantsUnmanaged.list`. - */ export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< AccessGrantsUnmanagedListResponse, 'access_grants' > -/** - * Options for `SeamHttpAccessGrantsUnmanaged.list`. - */ export interface AccessGrantsUnmanagedListOptions {} -/** - * Parameters for `SeamHttpAccessGrantsUnmanaged.update`. - */ export type AccessGrantsUnmanagedUpdateParameters = { /** * ID of the unmanaged Access Grant to update. @@ -378,21 +346,13 @@ export type AccessGrantsUnmanagedUpdateParameters = { } /** - * Response from `SeamHttpAccessGrantsUnmanaged.update`. - * * @deprecated Use AccessGrantsUnmanagedUpdateRequest instead. */ export type AccessGrantsUnmanagedUpdateResponse = void -/** - * Request returned by `SeamHttpAccessGrantsUnmanaged.update`. - */ export type AccessGrantsUnmanagedUpdateRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpAccessGrantsUnmanaged.update`. - */ export interface AccessGrantsUnmanagedUpdateOptions {} diff --git a/src/lib/routes/access-methods/access-methods.ts b/src/lib/routes/access-methods/access-methods.ts index 2183f8f9..b1d8f940 100644 --- a/src/lib/routes/access-methods/access-methods.ts +++ b/src/lib/routes/access-methods/access-methods.ts @@ -46,14 +46,7 @@ import { SeamHttpAccessMethodsUnmanaged } from './unmanaged/index.js' * Client for the Seam API /access_methods routes. */ export class SeamHttpAccessMethods { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -374,9 +367,6 @@ export class SeamHttpAccessMethods { } } -/** - * Parameters for `SeamHttpAccessMethods.assignCard`. - */ export type AccessMethodsAssignCardParameters = { /** * ID of the `access_method` to assign the credential to. @@ -390,31 +380,20 @@ export type AccessMethodsAssignCardParameters = { } /** - * Response from `SeamHttpAccessMethods.assignCard`. - * * @deprecated Use AccessMethodsAssignCardRequest instead. */ export type AccessMethodsAssignCardResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAccessMethods.assignCard`. - */ export type AccessMethodsAssignCardRequest = SeamHttpRequest< AccessMethodsAssignCardResponse, 'action_attempt' > -/** - * Options for `SeamHttpAccessMethods.assignCard`. - */ export type AccessMethodsAssignCardOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpAccessMethods.delete`. - */ export type AccessMethodsDeleteParameters = RequireAtLeastOne<{ /** * ID of access method to delete. @@ -431,25 +410,14 @@ export type AccessMethodsDeleteParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessMethods.delete`. - * * @deprecated Use AccessMethodsDeleteRequest instead. */ export type AccessMethodsDeleteResponse = void -/** - * Request returned by `SeamHttpAccessMethods.delete`. - */ export type AccessMethodsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAccessMethods.delete`. - */ export interface AccessMethodsDeleteOptions {} -/** - * Parameters for `SeamHttpAccessMethods.encode`. - */ export type AccessMethodsEncodeParameters = { /** * ID of the `access_method` to encode onto a card. @@ -463,31 +431,20 @@ export type AccessMethodsEncodeParameters = { } /** - * Response from `SeamHttpAccessMethods.encode`. - * * @deprecated Use AccessMethodsEncodeRequest instead. */ export type AccessMethodsEncodeResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAccessMethods.encode`. - */ export type AccessMethodsEncodeRequest = SeamHttpRequest< AccessMethodsEncodeResponse, 'action_attempt' > -/** - * Options for `SeamHttpAccessMethods.encode`. - */ export type AccessMethodsEncodeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpAccessMethods.get`. - */ export type AccessMethodsGetParameters = { /** * ID of access method to get. @@ -496,28 +453,17 @@ export type AccessMethodsGetParameters = { } /** - * Response from `SeamHttpAccessMethods.get`. - * * @deprecated Use AccessMethodsGetRequest instead. */ export type AccessMethodsGetResponse = { access_method: AccessMethod } -/** - * Request returned by `SeamHttpAccessMethods.get`. - */ export type AccessMethodsGetRequest = SeamHttpRequest< AccessMethodsGetResponse, 'access_method' > -/** - * Options for `SeamHttpAccessMethods.get`. - */ export interface AccessMethodsGetOptions {} -/** - * Parameters for `SeamHttpAccessMethods.getRelated`. - */ export type AccessMethodsGetRelatedParameters = { /** * IDs of the access methods that you want to get along with their related resources. @@ -552,8 +498,6 @@ export type AccessMethodsGetRelatedParameters = { } /** - * Response from `SeamHttpAccessMethods.getRelated`. - * * @deprecated Use AccessMethodsGetRelatedRequest instead. */ export type AccessMethodsGetRelatedResponse = { @@ -569,22 +513,13 @@ export type AccessMethodsGetRelatedResponse = { > } -/** - * Request returned by `SeamHttpAccessMethods.getRelated`. - */ export type AccessMethodsGetRelatedRequest = SeamHttpRequest< AccessMethodsGetRelatedResponse, 'batch' > -/** - * Options for `SeamHttpAccessMethods.getRelated`. - */ export interface AccessMethodsGetRelatedOptions {} -/** - * Parameters for `SeamHttpAccessMethods.list`. - */ export type AccessMethodsListParameters = RequireAtLeastOne<{ /** * ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. @@ -621,28 +556,17 @@ export type AccessMethodsListParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAccessMethods.list`. - * * @deprecated Use AccessMethodsListRequest instead. */ export type AccessMethodsListResponse = { access_methods: Array } -/** - * Request returned by `SeamHttpAccessMethods.list`. - */ export type AccessMethodsListRequest = SeamHttpRequest< AccessMethodsListResponse, 'access_methods' > -/** - * Options for `SeamHttpAccessMethods.list`. - */ export interface AccessMethodsListOptions {} -/** - * Parameters for `SeamHttpAccessMethods.unlockDoor`. - */ export type AccessMethodsUnlockDoorParameters = { /** * ID of the cloud_key `access_method` to use for the unlock operation. @@ -656,23 +580,15 @@ export type AccessMethodsUnlockDoorParameters = { } /** - * Response from `SeamHttpAccessMethods.unlockDoor`. - * * @deprecated Use AccessMethodsUnlockDoorRequest instead. */ export type AccessMethodsUnlockDoorResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAccessMethods.unlockDoor`. - */ export type AccessMethodsUnlockDoorRequest = SeamHttpRequest< AccessMethodsUnlockDoorResponse, 'action_attempt' > -/** - * Options for `SeamHttpAccessMethods.unlockDoor`. - */ export type AccessMethodsUnlockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/access-methods/unmanaged/unmanaged.ts b/src/lib/routes/access-methods/unmanaged/unmanaged.ts index ca30ca11..85e75055 100644 --- a/src/lib/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/routes/access-methods/unmanaged/unmanaged.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /access_methods/unmanaged routes. */ export class SeamHttpAccessMethodsUnmanaged { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -247,9 +240,6 @@ export class SeamHttpAccessMethodsUnmanaged { } } -/** - * Parameters for `SeamHttpAccessMethodsUnmanaged.get`. - */ export type AccessMethodsUnmanagedGetParameters = { /** * ID of unmanaged access method to get. @@ -258,30 +248,19 @@ export type AccessMethodsUnmanagedGetParameters = { } /** - * Response from `SeamHttpAccessMethodsUnmanaged.get`. - * * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ export type AccessMethodsUnmanagedGetResponse = { access_method: UnmanagedAccessMethod } -/** - * Request returned by `SeamHttpAccessMethodsUnmanaged.get`. - */ export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< AccessMethodsUnmanagedGetResponse, 'access_method' > -/** - * Options for `SeamHttpAccessMethodsUnmanaged.get`. - */ export interface AccessMethodsUnmanagedGetOptions {} -/** - * Parameters for `SeamHttpAccessMethodsUnmanaged.list`. - */ export type AccessMethodsUnmanagedListParameters = { /** * ID of Access Grant to list unmanaged access methods for. @@ -303,23 +282,15 @@ export type AccessMethodsUnmanagedListParameters = { } /** - * Response from `SeamHttpAccessMethodsUnmanaged.list`. - * * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ export type AccessMethodsUnmanagedListResponse = { access_methods: Array } -/** - * Request returned by `SeamHttpAccessMethodsUnmanaged.list`. - */ export type AccessMethodsUnmanagedListRequest = SeamHttpRequest< AccessMethodsUnmanagedListResponse, 'access_methods' > -/** - * Options for `SeamHttpAccessMethodsUnmanaged.list`. - */ export interface AccessMethodsUnmanagedListOptions {} diff --git a/src/lib/routes/acs/access-groups/access-groups.ts b/src/lib/routes/acs/access-groups/access-groups.ts index 2d2d716b..430da89c 100644 --- a/src/lib/routes/acs/access-groups/access-groups.ts +++ b/src/lib/routes/acs/access-groups/access-groups.ts @@ -40,14 +40,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/access_groups routes. */ export class SeamHttpAcsAccessGroups { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -361,9 +354,6 @@ export class SeamHttpAcsAccessGroups { } } -/** - * Parameters for `SeamHttpAcsAccessGroups.addUser`. - */ export type AcsAccessGroupsAddUserParameters = { /** * ID of the access group to which you want to add an access system user. @@ -381,25 +371,14 @@ export type AcsAccessGroupsAddUserParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.addUser`. - * * @deprecated Use AcsAccessGroupsAddUserRequest instead. */ export type AcsAccessGroupsAddUserResponse = void -/** - * Request returned by `SeamHttpAcsAccessGroups.addUser`. - */ export type AcsAccessGroupsAddUserRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsAccessGroups.addUser`. - */ export interface AcsAccessGroupsAddUserOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.delete`. - */ export type AcsAccessGroupsDeleteParameters = { /** * ID of the access group that you want to delete. @@ -408,25 +387,14 @@ export type AcsAccessGroupsDeleteParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.delete`. - * * @deprecated Use AcsAccessGroupsDeleteRequest instead. */ export type AcsAccessGroupsDeleteResponse = void -/** - * Request returned by `SeamHttpAcsAccessGroups.delete`. - */ export type AcsAccessGroupsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsAccessGroups.delete`. - */ export interface AcsAccessGroupsDeleteOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.get`. - */ export type AcsAccessGroupsGetParameters = { /** * ID of the access group that you want to get. @@ -435,28 +403,17 @@ export type AcsAccessGroupsGetParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.get`. - * * @deprecated Use AcsAccessGroupsGetRequest instead. */ export type AcsAccessGroupsGetResponse = { acs_access_group: AcsAccessGroup } -/** - * Request returned by `SeamHttpAcsAccessGroups.get`. - */ export type AcsAccessGroupsGetRequest = SeamHttpRequest< AcsAccessGroupsGetResponse, 'acs_access_group' > -/** - * Options for `SeamHttpAcsAccessGroups.get`. - */ export interface AcsAccessGroupsGetOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.list`. - */ export type AcsAccessGroupsListParameters = { /** * ID of the access system for which you want to retrieve all access groups. @@ -477,30 +434,19 @@ export type AcsAccessGroupsListParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.list`. - * * @deprecated Use AcsAccessGroupsListRequest instead. */ export type AcsAccessGroupsListResponse = { acs_access_groups: Array } -/** - * Request returned by `SeamHttpAcsAccessGroups.list`. - */ export type AcsAccessGroupsListRequest = SeamHttpRequest< AcsAccessGroupsListResponse, 'acs_access_groups' > -/** - * Options for `SeamHttpAcsAccessGroups.list`. - */ export interface AcsAccessGroupsListOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.listAccessibleEntrances`. - */ export type AcsAccessGroupsListAccessibleEntrancesParameters = { /** * ID of the access group for which you want to retrieve all accessible entrances. @@ -509,30 +455,19 @@ export type AcsAccessGroupsListAccessibleEntrancesParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.listAccessibleEntrances`. - * * @deprecated Use AcsAccessGroupsListAccessibleEntrancesRequest instead. */ export type AcsAccessGroupsListAccessibleEntrancesResponse = { acs_entrances: Array } -/** - * Request returned by `SeamHttpAcsAccessGroups.listAccessibleEntrances`. - */ export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< AcsAccessGroupsListAccessibleEntrancesResponse, 'acs_entrances' > -/** - * Options for `SeamHttpAcsAccessGroups.listAccessibleEntrances`. - */ export interface AcsAccessGroupsListAccessibleEntrancesOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.listUsers`. - */ export type AcsAccessGroupsListUsersParameters = { /** * ID of the access group for which you want to retrieve all access system users. @@ -541,28 +476,17 @@ export type AcsAccessGroupsListUsersParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.listUsers`. - * * @deprecated Use AcsAccessGroupsListUsersRequest instead. */ export type AcsAccessGroupsListUsersResponse = { acs_users: Array } -/** - * Request returned by `SeamHttpAcsAccessGroups.listUsers`. - */ export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< AcsAccessGroupsListUsersResponse, 'acs_users' > -/** - * Options for `SeamHttpAcsAccessGroups.listUsers`. - */ export interface AcsAccessGroupsListUsersOptions {} -/** - * Parameters for `SeamHttpAcsAccessGroups.removeUser`. - */ export type AcsAccessGroupsRemoveUserParameters = { /** * ID of the access group from which you want to remove an access system user. @@ -580,18 +504,10 @@ export type AcsAccessGroupsRemoveUserParameters = { } /** - * Response from `SeamHttpAcsAccessGroups.removeUser`. - * * @deprecated Use AcsAccessGroupsRemoveUserRequest instead. */ export type AcsAccessGroupsRemoveUserResponse = void -/** - * Request returned by `SeamHttpAcsAccessGroups.removeUser`. - */ export type AcsAccessGroupsRemoveUserRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsAccessGroups.removeUser`. - */ export interface AcsAccessGroupsRemoveUserOptions {} diff --git a/src/lib/routes/acs/acs.ts b/src/lib/routes/acs/acs.ts index 5cd249c9..ccab94d8 100644 --- a/src/lib/routes/acs/acs.ts +++ b/src/lib/routes/acs/acs.ts @@ -43,14 +43,7 @@ import { SeamHttpAcsUsers } from './users/index.js' * Client for the Seam API /acs routes. */ export class SeamHttpAcs { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { diff --git a/src/lib/routes/acs/credentials/credentials.ts b/src/lib/routes/acs/credentials/credentials.ts index e7b50098..5be0828f 100644 --- a/src/lib/routes/acs/credentials/credentials.ts +++ b/src/lib/routes/acs/credentials/credentials.ts @@ -39,14 +39,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/credentials routes. */ export class SeamHttpAcsCredentials { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -366,9 +359,6 @@ export class SeamHttpAcsCredentials { } } -/** - * Parameters for `SeamHttpAcsCredentials.assign`. - */ export type AcsCredentialsAssignParameters = { /** * ID of the credential that you want to assign to an access system user. @@ -386,25 +376,14 @@ export type AcsCredentialsAssignParameters = { } /** - * Response from `SeamHttpAcsCredentials.assign`. - * * @deprecated Use AcsCredentialsAssignRequest instead. */ export type AcsCredentialsAssignResponse = void -/** - * Request returned by `SeamHttpAcsCredentials.assign`. - */ export type AcsCredentialsAssignRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsCredentials.assign`. - */ export interface AcsCredentialsAssignOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.create`. - */ export type AcsCredentialsCreateParameters = { /** * Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. @@ -491,28 +470,17 @@ export type AcsCredentialsCreateParameters = { } /** - * Response from `SeamHttpAcsCredentials.create`. - * * @deprecated Use AcsCredentialsCreateRequest instead. */ export type AcsCredentialsCreateResponse = { acs_credential: AcsCredential } -/** - * Request returned by `SeamHttpAcsCredentials.create`. - */ export type AcsCredentialsCreateRequest = SeamHttpRequest< AcsCredentialsCreateResponse, 'acs_credential' > -/** - * Options for `SeamHttpAcsCredentials.create`. - */ export interface AcsCredentialsCreateOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.delete`. - */ export type AcsCredentialsDeleteParameters = { /** * ID of the credential that you want to delete. @@ -521,25 +489,14 @@ export type AcsCredentialsDeleteParameters = { } /** - * Response from `SeamHttpAcsCredentials.delete`. - * * @deprecated Use AcsCredentialsDeleteRequest instead. */ export type AcsCredentialsDeleteResponse = void -/** - * Request returned by `SeamHttpAcsCredentials.delete`. - */ export type AcsCredentialsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsCredentials.delete`. - */ export interface AcsCredentialsDeleteOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.get`. - */ export type AcsCredentialsGetParameters = { /** * ID of the credential that you want to get. @@ -548,28 +505,17 @@ export type AcsCredentialsGetParameters = { } /** - * Response from `SeamHttpAcsCredentials.get`. - * * @deprecated Use AcsCredentialsGetRequest instead. */ export type AcsCredentialsGetResponse = { acs_credential: AcsCredential } -/** - * Request returned by `SeamHttpAcsCredentials.get`. - */ export type AcsCredentialsGetRequest = SeamHttpRequest< AcsCredentialsGetResponse, 'acs_credential' > -/** - * Options for `SeamHttpAcsCredentials.get`. - */ export interface AcsCredentialsGetOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.list`. - */ export type AcsCredentialsListParameters = { /** * ID of the access system user for which you want to retrieve all credentials. @@ -606,30 +552,19 @@ export type AcsCredentialsListParameters = { } /** - * Response from `SeamHttpAcsCredentials.list`. - * * @deprecated Use AcsCredentialsListRequest instead. */ export type AcsCredentialsListResponse = { acs_credentials: Array } -/** - * Request returned by `SeamHttpAcsCredentials.list`. - */ export type AcsCredentialsListRequest = SeamHttpRequest< AcsCredentialsListResponse, 'acs_credentials' > -/** - * Options for `SeamHttpAcsCredentials.list`. - */ export interface AcsCredentialsListOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.listAccessibleEntrances`. - */ export type AcsCredentialsListAccessibleEntrancesParameters = { /** * ID of the credential for which you want to retrieve all entrances to which the credential grants access. @@ -638,30 +573,19 @@ export type AcsCredentialsListAccessibleEntrancesParameters = { } /** - * Response from `SeamHttpAcsCredentials.listAccessibleEntrances`. - * * @deprecated Use AcsCredentialsListAccessibleEntrancesRequest instead. */ export type AcsCredentialsListAccessibleEntrancesResponse = { acs_entrances: Array } -/** - * Request returned by `SeamHttpAcsCredentials.listAccessibleEntrances`. - */ export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< AcsCredentialsListAccessibleEntrancesResponse, 'acs_entrances' > -/** - * Options for `SeamHttpAcsCredentials.listAccessibleEntrances`. - */ export interface AcsCredentialsListAccessibleEntrancesOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.unassign`. - */ export type AcsCredentialsUnassignParameters = { /** * ID of the credential that you want to unassign from an access system user. @@ -679,25 +603,14 @@ export type AcsCredentialsUnassignParameters = { } /** - * Response from `SeamHttpAcsCredentials.unassign`. - * * @deprecated Use AcsCredentialsUnassignRequest instead. */ export type AcsCredentialsUnassignResponse = void -/** - * Request returned by `SeamHttpAcsCredentials.unassign`. - */ export type AcsCredentialsUnassignRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsCredentials.unassign`. - */ export interface AcsCredentialsUnassignOptions {} -/** - * Parameters for `SeamHttpAcsCredentials.update`. - */ export type AcsCredentialsUpdateParameters = { /** * ID of the credential that you want to update. @@ -715,18 +628,10 @@ export type AcsCredentialsUpdateParameters = { } /** - * Response from `SeamHttpAcsCredentials.update`. - * * @deprecated Use AcsCredentialsUpdateRequest instead. */ export type AcsCredentialsUpdateResponse = void -/** - * Request returned by `SeamHttpAcsCredentials.update`. - */ export type AcsCredentialsUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsCredentials.update`. - */ export interface AcsCredentialsUpdateOptions {} diff --git a/src/lib/routes/acs/encoders/encoders.ts b/src/lib/routes/acs/encoders/encoders.ts index 27d9bc67..d2f77649 100644 --- a/src/lib/routes/acs/encoders/encoders.ts +++ b/src/lib/routes/acs/encoders/encoders.ts @@ -42,14 +42,7 @@ import { SeamHttpAcsEncodersSimulate } from './simulate/index.js' * Client for the Seam API /acs/encoders routes. */ export class SeamHttpAcsEncoders { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -331,9 +324,6 @@ export class SeamHttpAcsEncoders { } } -/** - * Parameters for `SeamHttpAcsEncoders.encodeCredential`. - */ export type AcsEncodersEncodeCredentialParameters = { /** * ID of the `access_method` to encode onto a card. @@ -350,33 +340,22 @@ export type AcsEncodersEncodeCredentialParameters = { } /** - * Response from `SeamHttpAcsEncoders.encodeCredential`. - * * @deprecated Use AcsEncodersEncodeCredentialRequest instead. */ export type AcsEncodersEncodeCredentialResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAcsEncoders.encodeCredential`. - */ export type AcsEncodersEncodeCredentialRequest = SeamHttpRequest< AcsEncodersEncodeCredentialResponse, 'action_attempt' > -/** - * Options for `SeamHttpAcsEncoders.encodeCredential`. - */ export type AcsEncodersEncodeCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpAcsEncoders.get`. - */ export type AcsEncodersGetParameters = { /** * ID of the encoder that you want to get. @@ -385,28 +364,17 @@ export type AcsEncodersGetParameters = { } /** - * Response from `SeamHttpAcsEncoders.get`. - * * @deprecated Use AcsEncodersGetRequest instead. */ export type AcsEncodersGetResponse = { acs_encoder: AcsEncoder } -/** - * Request returned by `SeamHttpAcsEncoders.get`. - */ export type AcsEncodersGetRequest = SeamHttpRequest< AcsEncodersGetResponse, 'acs_encoder' > -/** - * Options for `SeamHttpAcsEncoders.get`. - */ export interface AcsEncodersGetOptions {} -/** - * Parameters for `SeamHttpAcsEncoders.list`. - */ export type AcsEncodersListParameters = { /** * ID of the access system for which you want to retrieve all encoders. @@ -431,28 +399,17 @@ export type AcsEncodersListParameters = { } /** - * Response from `SeamHttpAcsEncoders.list`. - * * @deprecated Use AcsEncodersListRequest instead. */ export type AcsEncodersListResponse = { acs_encoders: Array } -/** - * Request returned by `SeamHttpAcsEncoders.list`. - */ export type AcsEncodersListRequest = SeamHttpRequest< AcsEncodersListResponse, 'acs_encoders' > -/** - * Options for `SeamHttpAcsEncoders.list`. - */ export interface AcsEncodersListOptions {} -/** - * Parameters for `SeamHttpAcsEncoders.scanCredential`. - */ export type AcsEncodersScanCredentialParameters = { /** * ID of the encoder to use for the scan. @@ -473,33 +430,22 @@ export type AcsEncodersScanCredentialParameters = { } /** - * Response from `SeamHttpAcsEncoders.scanCredential`. - * * @deprecated Use AcsEncodersScanCredentialRequest instead. */ export type AcsEncodersScanCredentialResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAcsEncoders.scanCredential`. - */ export type AcsEncodersScanCredentialRequest = SeamHttpRequest< AcsEncodersScanCredentialResponse, 'action_attempt' > -/** - * Options for `SeamHttpAcsEncoders.scanCredential`. - */ export type AcsEncodersScanCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpAcsEncoders.scanToAssignCredential`. - */ export type AcsEncodersScanToAssignCredentialParameters = { /** * ID of the `acs_encoder` to use to scan the credential. @@ -528,25 +474,17 @@ export type AcsEncodersScanToAssignCredentialParameters = { } /** - * Response from `SeamHttpAcsEncoders.scanToAssignCredential`. - * * @deprecated Use AcsEncodersScanToAssignCredentialRequest instead. */ export type AcsEncodersScanToAssignCredentialResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAcsEncoders.scanToAssignCredential`. - */ export type AcsEncodersScanToAssignCredentialRequest = SeamHttpRequest< AcsEncodersScanToAssignCredentialResponse, 'action_attempt' > -/** - * Options for `SeamHttpAcsEncoders.scanToAssignCredential`. - */ export type AcsEncodersScanToAssignCredentialOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/acs/encoders/simulate/simulate.ts b/src/lib/routes/acs/encoders/simulate/simulate.ts index 09799381..eb8e9822 100644 --- a/src/lib/routes/acs/encoders/simulate/simulate.ts +++ b/src/lib/routes/acs/encoders/simulate/simulate.ts @@ -37,14 +37,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/encoders/simulate routes. */ export class SeamHttpAcsEncodersSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -292,9 +285,6 @@ export class SeamHttpAcsEncodersSimulate { } } -/** - * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. - */ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { /** * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. @@ -317,26 +307,15 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { } /** - * Response from `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. - * * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailRequest instead. */ export type AcsEncodersSimulateNextCredentialEncodeWillFailResponse = void -/** - * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. - */ export type AcsEncodersSimulateNextCredentialEncodeWillFailRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillFail`. - */ export interface AcsEncodersSimulateNextCredentialEncodeWillFailOptions {} -/** - * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. - */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { /** * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. @@ -350,26 +329,15 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { } /** - * Response from `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. - * * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest instead. */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedResponse = void -/** - * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. - */ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsEncodersSimulate.nextCredentialEncodeWillSucceed`. - */ export interface AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions {} -/** - * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. - */ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { /** * ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. @@ -386,26 +354,15 @@ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { } /** - * Response from `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. - * * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailRequest instead. */ export type AcsEncodersSimulateNextCredentialScanWillFailResponse = void -/** - * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. - */ export type AcsEncodersSimulateNextCredentialScanWillFailRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillFail`. - */ export interface AcsEncodersSimulateNextCredentialScanWillFailOptions {} -/** - * Parameters for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. - */ export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { /** * ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. @@ -428,19 +385,11 @@ export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { } /** - * Response from `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. - * * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedRequest instead. */ export type AcsEncodersSimulateNextCredentialScanWillSucceedResponse = void -/** - * Request returned by `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. - */ export type AcsEncodersSimulateNextCredentialScanWillSucceedRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsEncodersSimulate.nextCredentialScanWillSucceed`. - */ export interface AcsEncodersSimulateNextCredentialScanWillSucceedOptions {} diff --git a/src/lib/routes/acs/entrances/entrances.ts b/src/lib/routes/acs/entrances/entrances.ts index 3b7dcde2..22f18b56 100644 --- a/src/lib/routes/acs/entrances/entrances.ts +++ b/src/lib/routes/acs/entrances/entrances.ts @@ -41,14 +41,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/entrances routes. */ export class SeamHttpAcsEntrances { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -313,9 +306,6 @@ export class SeamHttpAcsEntrances { } } -/** - * Parameters for `SeamHttpAcsEntrances.get`. - */ export type AcsEntrancesGetParameters = { /** * ID of the entrance that you want to get. @@ -324,28 +314,17 @@ export type AcsEntrancesGetParameters = { } /** - * Response from `SeamHttpAcsEntrances.get`. - * * @deprecated Use AcsEntrancesGetRequest instead. */ export type AcsEntrancesGetResponse = { acs_entrance: AcsEntrance } -/** - * Request returned by `SeamHttpAcsEntrances.get`. - */ export type AcsEntrancesGetRequest = SeamHttpRequest< AcsEntrancesGetResponse, 'acs_entrance' > -/** - * Options for `SeamHttpAcsEntrances.get`. - */ export interface AcsEntrancesGetOptions {} -/** - * Parameters for `SeamHttpAcsEntrances.grantAccess`. - */ export type AcsEntrancesGrantAccessParameters = { /** * ID of the entrance to which you want to grant an access system user access. @@ -363,25 +342,14 @@ export type AcsEntrancesGrantAccessParameters = { } /** - * Response from `SeamHttpAcsEntrances.grantAccess`. - * * @deprecated Use AcsEntrancesGrantAccessRequest instead. */ export type AcsEntrancesGrantAccessResponse = void -/** - * Request returned by `SeamHttpAcsEntrances.grantAccess`. - */ export type AcsEntrancesGrantAccessRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsEntrances.grantAccess`. - */ export interface AcsEntrancesGrantAccessOptions {} -/** - * Parameters for `SeamHttpAcsEntrances.list`. - */ export type AcsEntrancesListParameters = { /** * ID of the access method for which you want to retrieve all entrances to which it grants access. @@ -430,28 +398,17 @@ export type AcsEntrancesListParameters = { } /** - * Response from `SeamHttpAcsEntrances.list`. - * * @deprecated Use AcsEntrancesListRequest instead. */ export type AcsEntrancesListResponse = { acs_entrances: Array } -/** - * Request returned by `SeamHttpAcsEntrances.list`. - */ export type AcsEntrancesListRequest = SeamHttpRequest< AcsEntrancesListResponse, 'acs_entrances' > -/** - * Options for `SeamHttpAcsEntrances.list`. - */ export interface AcsEntrancesListOptions {} -/** - * Parameters for `SeamHttpAcsEntrances.listCredentialsWithAccess`. - */ export type AcsEntrancesListCredentialsWithAccessParameters = { /** * ID of the entrance for which you want to list all credentials that grant access. @@ -465,30 +422,19 @@ export type AcsEntrancesListCredentialsWithAccessParameters = { } /** - * Response from `SeamHttpAcsEntrances.listCredentialsWithAccess`. - * * @deprecated Use AcsEntrancesListCredentialsWithAccessRequest instead. */ export type AcsEntrancesListCredentialsWithAccessResponse = { acs_credentials: Array } -/** - * Request returned by `SeamHttpAcsEntrances.listCredentialsWithAccess`. - */ export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< AcsEntrancesListCredentialsWithAccessResponse, 'acs_credentials' > -/** - * Options for `SeamHttpAcsEntrances.listCredentialsWithAccess`. - */ export interface AcsEntrancesListCredentialsWithAccessOptions {} -/** - * Parameters for `SeamHttpAcsEntrances.unlock`. - */ export type AcsEntrancesUnlockParameters = { /** * ID of the cloud_key credential to use for the unlock operation. @@ -502,23 +448,15 @@ export type AcsEntrancesUnlockParameters = { } /** - * Response from `SeamHttpAcsEntrances.unlock`. - * * @deprecated Use AcsEntrancesUnlockRequest instead. */ export type AcsEntrancesUnlockResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpAcsEntrances.unlock`. - */ export type AcsEntrancesUnlockRequest = SeamHttpRequest< AcsEntrancesUnlockResponse, 'action_attempt' > -/** - * Options for `SeamHttpAcsEntrances.unlock`. - */ export type AcsEntrancesUnlockOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/acs/systems/systems.ts b/src/lib/routes/acs/systems/systems.ts index c854c592..a0f3136b 100644 --- a/src/lib/routes/acs/systems/systems.ts +++ b/src/lib/routes/acs/systems/systems.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/systems routes. */ export class SeamHttpAcsSystems { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -289,9 +282,6 @@ export class SeamHttpAcsSystems { } } -/** - * Parameters for `SeamHttpAcsSystems.get`. - */ export type AcsSystemsGetParameters = { /** * ID of the access system that you want to get. @@ -300,28 +290,17 @@ export type AcsSystemsGetParameters = { } /** - * Response from `SeamHttpAcsSystems.get`. - * * @deprecated Use AcsSystemsGetRequest instead. */ export type AcsSystemsGetResponse = { acs_system: AcsSystem } -/** - * Request returned by `SeamHttpAcsSystems.get`. - */ export type AcsSystemsGetRequest = SeamHttpRequest< AcsSystemsGetResponse, 'acs_system' > -/** - * Options for `SeamHttpAcsSystems.get`. - */ export interface AcsSystemsGetOptions {} -/** - * Parameters for `SeamHttpAcsSystems.list`. - */ export type AcsSystemsListParameters = { /** * ID of the connected account by which you want to filter the list of access systems. @@ -338,28 +317,17 @@ export type AcsSystemsListParameters = { } /** - * Response from `SeamHttpAcsSystems.list`. - * * @deprecated Use AcsSystemsListRequest instead. */ export type AcsSystemsListResponse = { acs_systems: Array } -/** - * Request returned by `SeamHttpAcsSystems.list`. - */ export type AcsSystemsListRequest = SeamHttpRequest< AcsSystemsListResponse, 'acs_systems' > -/** - * Options for `SeamHttpAcsSystems.list`. - */ export interface AcsSystemsListOptions {} -/** - * Parameters for `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. - */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { /** * ID of the access system for which you want to retrieve all compatible credential manager systems. @@ -368,31 +336,20 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { } /** - * Response from `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. - * * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest instead. */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse = { acs_systems: Array } -/** - * Request returned by `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. - */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = SeamHttpRequest< AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse, 'acs_systems' > -/** - * Options for `SeamHttpAcsSystems.listCompatibleCredentialManagerAcsSystems`. - */ export interface AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions {} -/** - * Parameters for `SeamHttpAcsSystems.reportDevices`. - */ export type AcsSystemsReportDevicesParameters = { /** * Array of ACS encoders to report @@ -453,18 +410,10 @@ export type AcsSystemsReportDevicesParameters = { } /** - * Response from `SeamHttpAcsSystems.reportDevices`. - * * @deprecated Use AcsSystemsReportDevicesRequest instead. */ export type AcsSystemsReportDevicesResponse = void -/** - * Request returned by `SeamHttpAcsSystems.reportDevices`. - */ export type AcsSystemsReportDevicesRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsSystems.reportDevices`. - */ export interface AcsSystemsReportDevicesOptions {} diff --git a/src/lib/routes/acs/users/users.ts b/src/lib/routes/acs/users/users.ts index eb508f2c..48284482 100644 --- a/src/lib/routes/acs/users/users.ts +++ b/src/lib/routes/acs/users/users.ts @@ -42,14 +42,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /acs/users routes. */ export class SeamHttpAcsUsers { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -426,9 +419,6 @@ export class SeamHttpAcsUsers { } } -/** - * Parameters for `SeamHttpAcsUsers.addToAccessGroup`. - */ export type AcsUsersAddToAccessGroupParameters = { /** * ID of the access group to which you want to add an access system user. @@ -442,25 +432,14 @@ export type AcsUsersAddToAccessGroupParameters = { } /** - * Response from `SeamHttpAcsUsers.addToAccessGroup`. - * * @deprecated Use AcsUsersAddToAccessGroupRequest instead. */ export type AcsUsersAddToAccessGroupResponse = void -/** - * Request returned by `SeamHttpAcsUsers.addToAccessGroup`. - */ export type AcsUsersAddToAccessGroupRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsUsers.addToAccessGroup`. - */ export interface AcsUsersAddToAccessGroupOptions {} -/** - * Parameters for `SeamHttpAcsUsers.create`. - */ export type AcsUsersCreateParameters = { /** * `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. @@ -510,28 +489,17 @@ export type AcsUsersCreateParameters = { } /** - * Response from `SeamHttpAcsUsers.create`. - * * @deprecated Use AcsUsersCreateRequest instead. */ export type AcsUsersCreateResponse = { acs_user: AcsUser } -/** - * Request returned by `SeamHttpAcsUsers.create`. - */ export type AcsUsersCreateRequest = SeamHttpRequest< AcsUsersCreateResponse, 'acs_user' > -/** - * Options for `SeamHttpAcsUsers.create`. - */ export interface AcsUsersCreateOptions {} -/** - * Parameters for `SeamHttpAcsUsers.delete`. - */ export type AcsUsersDeleteParameters = RequireAtLeastOne<{ /** * ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. @@ -548,25 +516,14 @@ export type AcsUsersDeleteParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.delete`. - * * @deprecated Use AcsUsersDeleteRequest instead. */ export type AcsUsersDeleteResponse = void -/** - * Request returned by `SeamHttpAcsUsers.delete`. - */ export type AcsUsersDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsUsers.delete`. - */ export interface AcsUsersDeleteOptions {} -/** - * Parameters for `SeamHttpAcsUsers.get`. - */ export type AcsUsersGetParameters = RequireAtLeastOne<{ /** * ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. @@ -583,28 +540,17 @@ export type AcsUsersGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.get`. - * * @deprecated Use AcsUsersGetRequest instead. */ export type AcsUsersGetResponse = { acs_user: AcsUser } -/** - * Request returned by `SeamHttpAcsUsers.get`. - */ export type AcsUsersGetRequest = SeamHttpRequest< AcsUsersGetResponse, 'acs_user' > -/** - * Options for `SeamHttpAcsUsers.get`. - */ export interface AcsUsersGetOptions {} -/** - * Parameters for `SeamHttpAcsUsers.list`. - */ export type AcsUsersListParameters = { /** * ID of the `acs_system` for which you want to retrieve all access system users. @@ -641,28 +587,17 @@ export type AcsUsersListParameters = { } /** - * Response from `SeamHttpAcsUsers.list`. - * * @deprecated Use AcsUsersListRequest instead. */ export type AcsUsersListResponse = { acs_users: Array } -/** - * Request returned by `SeamHttpAcsUsers.list`. - */ export type AcsUsersListRequest = SeamHttpRequest< AcsUsersListResponse, 'acs_users' > -/** - * Options for `SeamHttpAcsUsers.list`. - */ export interface AcsUsersListOptions {} -/** - * Parameters for `SeamHttpAcsUsers.listAccessibleEntrances`. - */ export type AcsUsersListAccessibleEntrancesParameters = RequireAtLeastOne<{ /** * ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. @@ -679,30 +614,19 @@ export type AcsUsersListAccessibleEntrancesParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.listAccessibleEntrances`. - * * @deprecated Use AcsUsersListAccessibleEntrancesRequest instead. */ export type AcsUsersListAccessibleEntrancesResponse = { acs_entrances: Array } -/** - * Request returned by `SeamHttpAcsUsers.listAccessibleEntrances`. - */ export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< AcsUsersListAccessibleEntrancesResponse, 'acs_entrances' > -/** - * Options for `SeamHttpAcsUsers.listAccessibleEntrances`. - */ export interface AcsUsersListAccessibleEntrancesOptions {} -/** - * Parameters for `SeamHttpAcsUsers.removeFromAccessGroup`. - */ export type AcsUsersRemoveFromAccessGroupParameters = { /** * ID of the access group from which you want to remove an access system user. @@ -720,28 +644,17 @@ export type AcsUsersRemoveFromAccessGroupParameters = { } /** - * Response from `SeamHttpAcsUsers.removeFromAccessGroup`. - * * @deprecated Use AcsUsersRemoveFromAccessGroupRequest instead. */ export type AcsUsersRemoveFromAccessGroupResponse = void -/** - * Request returned by `SeamHttpAcsUsers.removeFromAccessGroup`. - */ export type AcsUsersRemoveFromAccessGroupRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpAcsUsers.removeFromAccessGroup`. - */ export interface AcsUsersRemoveFromAccessGroupOptions {} -/** - * Parameters for `SeamHttpAcsUsers.revokeAccessToAllEntrances`. - */ export type AcsUsersRevokeAccessToAllEntrancesParameters = RequireAtLeastOne<{ /** * ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. @@ -758,28 +671,17 @@ export type AcsUsersRevokeAccessToAllEntrancesParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.revokeAccessToAllEntrances`. - * * @deprecated Use AcsUsersRevokeAccessToAllEntrancesRequest instead. */ export type AcsUsersRevokeAccessToAllEntrancesResponse = void -/** - * Request returned by `SeamHttpAcsUsers.revokeAccessToAllEntrances`. - */ export type AcsUsersRevokeAccessToAllEntrancesRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpAcsUsers.revokeAccessToAllEntrances`. - */ export interface AcsUsersRevokeAccessToAllEntrancesOptions {} -/** - * Parameters for `SeamHttpAcsUsers.suspend`. - */ export type AcsUsersSuspendParameters = RequireAtLeastOne<{ /** * ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. @@ -796,25 +698,14 @@ export type AcsUsersSuspendParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.suspend`. - * * @deprecated Use AcsUsersSuspendRequest instead. */ export type AcsUsersSuspendResponse = void -/** - * Request returned by `SeamHttpAcsUsers.suspend`. - */ export type AcsUsersSuspendRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsUsers.suspend`. - */ export interface AcsUsersSuspendOptions {} -/** - * Parameters for `SeamHttpAcsUsers.unsuspend`. - */ export type AcsUsersUnsuspendParameters = RequireAtLeastOne<{ /** * ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. @@ -831,25 +722,14 @@ export type AcsUsersUnsuspendParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.unsuspend`. - * * @deprecated Use AcsUsersUnsuspendRequest instead. */ export type AcsUsersUnsuspendResponse = void -/** - * Request returned by `SeamHttpAcsUsers.unsuspend`. - */ export type AcsUsersUnsuspendRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsUsers.unsuspend`. - */ export interface AcsUsersUnsuspendOptions {} -/** - * Parameters for `SeamHttpAcsUsers.update`. - */ export type AcsUsersUpdateParameters = RequireAtLeastOne<{ /** * `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. @@ -902,18 +782,10 @@ export type AcsUsersUpdateParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpAcsUsers.update`. - * * @deprecated Use AcsUsersUpdateRequest instead. */ export type AcsUsersUpdateResponse = void -/** - * Request returned by `SeamHttpAcsUsers.update`. - */ export type AcsUsersUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpAcsUsers.update`. - */ export interface AcsUsersUpdateOptions {} diff --git a/src/lib/routes/action-attempts/action-attempts.ts b/src/lib/routes/action-attempts/action-attempts.ts index f63b6da2..b6497347 100644 --- a/src/lib/routes/action-attempts/action-attempts.ts +++ b/src/lib/routes/action-attempts/action-attempts.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /action_attempts routes. */ export class SeamHttpActionAttempts { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -243,9 +236,6 @@ export class SeamHttpActionAttempts { } } -/** - * Parameters for `SeamHttpActionAttempts.get`. - */ export type ActionAttemptsGetParameters = { /** * ID of the action attempt that you want to get. @@ -254,31 +244,20 @@ export type ActionAttemptsGetParameters = { } /** - * Response from `SeamHttpActionAttempts.get`. - * * @deprecated Use ActionAttemptsGetRequest instead. */ export type ActionAttemptsGetResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpActionAttempts.get`. - */ export type ActionAttemptsGetRequest = SeamHttpRequest< ActionAttemptsGetResponse, 'action_attempt' > -/** - * Options for `SeamHttpActionAttempts.get`. - */ export type ActionAttemptsGetOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpActionAttempts.list`. - */ export type ActionAttemptsListParameters = { /** * IDs of the action attempts that you want to retrieve. @@ -299,23 +278,15 @@ export type ActionAttemptsListParameters = { } /** - * Response from `SeamHttpActionAttempts.list`. - * * @deprecated Use ActionAttemptsListRequest instead. */ export type ActionAttemptsListResponse = { action_attempts: Array } -/** - * Request returned by `SeamHttpActionAttempts.list`. - */ export type ActionAttemptsListRequest = SeamHttpRequest< ActionAttemptsListResponse, 'action_attempts' > -/** - * Options for `SeamHttpActionAttempts.list`. - */ export interface ActionAttemptsListOptions {} diff --git a/src/lib/routes/client-sessions/client-sessions.ts b/src/lib/routes/client-sessions/client-sessions.ts index da375f43..e9216401 100644 --- a/src/lib/routes/client-sessions/client-sessions.ts +++ b/src/lib/routes/client-sessions/client-sessions.ts @@ -40,14 +40,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /client_sessions routes. */ export class SeamHttpClientSessions { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -350,9 +343,6 @@ export class SeamHttpClientSessions { } } -/** - * Parameters for `SeamHttpClientSessions.create`. - */ export type ClientSessionsCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session. @@ -391,28 +381,17 @@ export type ClientSessionsCreateParameters = { } /** - * Response from `SeamHttpClientSessions.create`. - * * @deprecated Use ClientSessionsCreateRequest instead. */ export type ClientSessionsCreateResponse = { client_session: ClientSession } -/** - * Request returned by `SeamHttpClientSessions.create`. - */ export type ClientSessionsCreateRequest = SeamHttpRequest< ClientSessionsCreateResponse, 'client_session' > -/** - * Options for `SeamHttpClientSessions.create`. - */ export interface ClientSessionsCreateOptions {} -/** - * Parameters for `SeamHttpClientSessions.delete`. - */ export type ClientSessionsDeleteParameters = { /** * ID of the client session that you want to delete. @@ -421,25 +400,14 @@ export type ClientSessionsDeleteParameters = { } /** - * Response from `SeamHttpClientSessions.delete`. - * * @deprecated Use ClientSessionsDeleteRequest instead. */ export type ClientSessionsDeleteResponse = void -/** - * Request returned by `SeamHttpClientSessions.delete`. - */ export type ClientSessionsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpClientSessions.delete`. - */ export interface ClientSessionsDeleteOptions {} -/** - * Parameters for `SeamHttpClientSessions.get`. - */ export type ClientSessionsGetParameters = { /** * ID of the client session that you want to get. @@ -452,28 +420,17 @@ export type ClientSessionsGetParameters = { } /** - * Response from `SeamHttpClientSessions.get`. - * * @deprecated Use ClientSessionsGetRequest instead. */ export type ClientSessionsGetResponse = { client_session: ClientSession } -/** - * Request returned by `SeamHttpClientSessions.get`. - */ export type ClientSessionsGetRequest = SeamHttpRequest< ClientSessionsGetResponse, 'client_session' > -/** - * Options for `SeamHttpClientSessions.get`. - */ export interface ClientSessionsGetOptions {} -/** - * Parameters for `SeamHttpClientSessions.getOrCreate`. - */ export type ClientSessionsGetOrCreateParameters = { /** * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). @@ -504,30 +461,19 @@ export type ClientSessionsGetOrCreateParameters = { } /** - * Response from `SeamHttpClientSessions.getOrCreate`. - * * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ export type ClientSessionsGetOrCreateResponse = { client_session: ClientSession } -/** - * Request returned by `SeamHttpClientSessions.getOrCreate`. - */ export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< ClientSessionsGetOrCreateResponse, 'client_session' > -/** - * Options for `SeamHttpClientSessions.getOrCreate`. - */ export interface ClientSessionsGetOrCreateOptions {} -/** - * Parameters for `SeamHttpClientSessions.grantAccess`. - */ export type ClientSessionsGrantAccessParameters = RequireAtLeastOne<{ /** * ID of the client session to which you want to grant access to resources. @@ -558,25 +504,14 @@ export type ClientSessionsGrantAccessParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpClientSessions.grantAccess`. - * * @deprecated Use ClientSessionsGrantAccessRequest instead. */ export type ClientSessionsGrantAccessResponse = void -/** - * Request returned by `SeamHttpClientSessions.grantAccess`. - */ export type ClientSessionsGrantAccessRequest = SeamHttpRequest -/** - * Options for `SeamHttpClientSessions.grantAccess`. - */ export interface ClientSessionsGrantAccessOptions {} -/** - * Parameters for `SeamHttpClientSessions.list`. - */ export type ClientSessionsListParameters = { /** * ID of the client session that you want to retrieve. @@ -601,30 +536,19 @@ export type ClientSessionsListParameters = { } /** - * Response from `SeamHttpClientSessions.list`. - * * @deprecated Use ClientSessionsListRequest instead. */ export type ClientSessionsListResponse = { client_sessions: Array } -/** - * Request returned by `SeamHttpClientSessions.list`. - */ export type ClientSessionsListRequest = SeamHttpRequest< ClientSessionsListResponse, 'client_sessions' > -/** - * Options for `SeamHttpClientSessions.list`. - */ export interface ClientSessionsListOptions {} -/** - * Parameters for `SeamHttpClientSessions.revoke`. - */ export type ClientSessionsRevokeParameters = { /** * ID of the client session that you want to revoke. @@ -633,18 +557,10 @@ export type ClientSessionsRevokeParameters = { } /** - * Response from `SeamHttpClientSessions.revoke`. - * * @deprecated Use ClientSessionsRevokeRequest instead. */ export type ClientSessionsRevokeResponse = void -/** - * Request returned by `SeamHttpClientSessions.revoke`. - */ export type ClientSessionsRevokeRequest = SeamHttpRequest -/** - * Options for `SeamHttpClientSessions.revoke`. - */ export interface ClientSessionsRevokeOptions {} diff --git a/src/lib/routes/connect-webviews/connect-webviews.ts b/src/lib/routes/connect-webviews/connect-webviews.ts index 1a77322d..eddcba69 100644 --- a/src/lib/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/routes/connect-webviews/connect-webviews.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /connect_webviews routes. */ export class SeamHttpConnectWebviews { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -297,9 +290,6 @@ export class SeamHttpConnectWebviews { } } -/** - * Parameters for `SeamHttpConnectWebviews.create`. - */ export type ConnectWebviewsCreateParameters = { /** * List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. @@ -429,28 +419,17 @@ export type ConnectWebviewsCreateParameters = { } /** - * Response from `SeamHttpConnectWebviews.create`. - * * @deprecated Use ConnectWebviewsCreateRequest instead. */ export type ConnectWebviewsCreateResponse = { connect_webview: ConnectWebview } -/** - * Request returned by `SeamHttpConnectWebviews.create`. - */ export type ConnectWebviewsCreateRequest = SeamHttpRequest< ConnectWebviewsCreateResponse, 'connect_webview' > -/** - * Options for `SeamHttpConnectWebviews.create`. - */ export interface ConnectWebviewsCreateOptions {} -/** - * Parameters for `SeamHttpConnectWebviews.delete`. - */ export type ConnectWebviewsDeleteParameters = { /** * ID of the Connect Webview that you want to delete. @@ -459,25 +438,14 @@ export type ConnectWebviewsDeleteParameters = { } /** - * Response from `SeamHttpConnectWebviews.delete`. - * * @deprecated Use ConnectWebviewsDeleteRequest instead. */ export type ConnectWebviewsDeleteResponse = void -/** - * Request returned by `SeamHttpConnectWebviews.delete`. - */ export type ConnectWebviewsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpConnectWebviews.delete`. - */ export interface ConnectWebviewsDeleteOptions {} -/** - * Parameters for `SeamHttpConnectWebviews.get`. - */ export type ConnectWebviewsGetParameters = { /** * ID of the Connect Webview that you want to get. @@ -486,28 +454,17 @@ export type ConnectWebviewsGetParameters = { } /** - * Response from `SeamHttpConnectWebviews.get`. - * * @deprecated Use ConnectWebviewsGetRequest instead. */ export type ConnectWebviewsGetResponse = { connect_webview: ConnectWebview } -/** - * Request returned by `SeamHttpConnectWebviews.get`. - */ export type ConnectWebviewsGetRequest = SeamHttpRequest< ConnectWebviewsGetResponse, 'connect_webview' > -/** - * Options for `SeamHttpConnectWebviews.get`. - */ export interface ConnectWebviewsGetOptions {} -/** - * Parameters for `SeamHttpConnectWebviews.list`. - */ export type ConnectWebviewsListParameters = { /** * Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. @@ -536,23 +493,15 @@ export type ConnectWebviewsListParameters = { } /** - * Response from `SeamHttpConnectWebviews.list`. - * * @deprecated Use ConnectWebviewsListRequest instead. */ export type ConnectWebviewsListResponse = { connect_webviews: Array } -/** - * Request returned by `SeamHttpConnectWebviews.list`. - */ export type ConnectWebviewsListRequest = SeamHttpRequest< ConnectWebviewsListResponse, 'connect_webviews' > -/** - * Options for `SeamHttpConnectWebviews.list`. - */ export interface ConnectWebviewsListOptions {} diff --git a/src/lib/routes/connected-accounts/connected-accounts.ts b/src/lib/routes/connected-accounts/connected-accounts.ts index 1825e6d4..560dca73 100644 --- a/src/lib/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/routes/connected-accounts/connected-accounts.ts @@ -43,14 +43,7 @@ import { SeamHttpConnectedAccountsSimulate } from './simulate/index.js' * Client for the Seam API /connected_accounts routes. */ export class SeamHttpConnectedAccounts { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -332,9 +325,6 @@ export class SeamHttpConnectedAccounts { } } -/** - * Parameters for `SeamHttpConnectedAccounts.delete`. - */ export type ConnectedAccountsDeleteParameters = { /** * ID of the connected account that you want to delete. @@ -343,25 +333,14 @@ export type ConnectedAccountsDeleteParameters = { } /** - * Response from `SeamHttpConnectedAccounts.delete`. - * * @deprecated Use ConnectedAccountsDeleteRequest instead. */ export type ConnectedAccountsDeleteResponse = void -/** - * Request returned by `SeamHttpConnectedAccounts.delete`. - */ export type ConnectedAccountsDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpConnectedAccounts.delete`. - */ export interface ConnectedAccountsDeleteOptions {} -/** - * Parameters for `SeamHttpConnectedAccounts.get`. - */ export type ConnectedAccountsGetParameters = RequireAtLeastOne<{ /** * ID of the connected account that you want to get. @@ -374,30 +353,19 @@ export type ConnectedAccountsGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpConnectedAccounts.get`. - * * @deprecated Use ConnectedAccountsGetRequest instead. */ export type ConnectedAccountsGetResponse = { connected_account: ConnectedAccount } -/** - * Request returned by `SeamHttpConnectedAccounts.get`. - */ export type ConnectedAccountsGetRequest = SeamHttpRequest< ConnectedAccountsGetResponse, 'connected_account' > -/** - * Options for `SeamHttpConnectedAccounts.get`. - */ export interface ConnectedAccountsGetOptions {} -/** - * Parameters for `SeamHttpConnectedAccounts.list`. - */ export type ConnectedAccountsListParameters = { /** * Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. @@ -430,30 +398,19 @@ export type ConnectedAccountsListParameters = { } /** - * Response from `SeamHttpConnectedAccounts.list`. - * * @deprecated Use ConnectedAccountsListRequest instead. */ export type ConnectedAccountsListResponse = { connected_accounts: Array } -/** - * Request returned by `SeamHttpConnectedAccounts.list`. - */ export type ConnectedAccountsListRequest = SeamHttpRequest< ConnectedAccountsListResponse, 'connected_accounts' > -/** - * Options for `SeamHttpConnectedAccounts.list`. - */ export interface ConnectedAccountsListOptions {} -/** - * Parameters for `SeamHttpConnectedAccounts.sync`. - */ export type ConnectedAccountsSyncParameters = { /** * ID of the connected account that you want to sync. @@ -462,25 +419,14 @@ export type ConnectedAccountsSyncParameters = { } /** - * Response from `SeamHttpConnectedAccounts.sync`. - * * @deprecated Use ConnectedAccountsSyncRequest instead. */ export type ConnectedAccountsSyncResponse = void -/** - * Request returned by `SeamHttpConnectedAccounts.sync`. - */ export type ConnectedAccountsSyncRequest = SeamHttpRequest -/** - * Options for `SeamHttpConnectedAccounts.sync`. - */ export interface ConnectedAccountsSyncOptions {} -/** - * Parameters for `SeamHttpConnectedAccounts.update`. - */ export type ConnectedAccountsUpdateParameters = { /** * List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. @@ -514,18 +460,10 @@ export type ConnectedAccountsUpdateParameters = { } /** - * Response from `SeamHttpConnectedAccounts.update`. - * * @deprecated Use ConnectedAccountsUpdateRequest instead. */ export type ConnectedAccountsUpdateResponse = void -/** - * Request returned by `SeamHttpConnectedAccounts.update`. - */ export type ConnectedAccountsUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpConnectedAccounts.update`. - */ export interface ConnectedAccountsUpdateOptions {} diff --git a/src/lib/routes/connected-accounts/simulate/simulate.ts b/src/lib/routes/connected-accounts/simulate/simulate.ts index bcd61c8d..11e76396 100644 --- a/src/lib/routes/connected-accounts/simulate/simulate.ts +++ b/src/lib/routes/connected-accounts/simulate/simulate.ts @@ -37,14 +37,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /connected_accounts/simulate routes. */ export class SeamHttpConnectedAccountsSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -226,9 +219,6 @@ export class SeamHttpConnectedAccountsSimulate { } } -/** - * Parameters for `SeamHttpConnectedAccountsSimulate.disconnect`. - */ export type ConnectedAccountsSimulateDisconnectParameters = { /** * ID of the connected account you want to simulate as disconnected. @@ -237,21 +227,13 @@ export type ConnectedAccountsSimulateDisconnectParameters = { } /** - * Response from `SeamHttpConnectedAccountsSimulate.disconnect`. - * * @deprecated Use ConnectedAccountsSimulateDisconnectRequest instead. */ export type ConnectedAccountsSimulateDisconnectResponse = void -/** - * Request returned by `SeamHttpConnectedAccountsSimulate.disconnect`. - */ export type ConnectedAccountsSimulateDisconnectRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpConnectedAccountsSimulate.disconnect`. - */ export interface ConnectedAccountsSimulateDisconnectOptions {} diff --git a/src/lib/routes/customers/customers.ts b/src/lib/routes/customers/customers.ts index 5c4b18cf..7d2eea24 100644 --- a/src/lib/routes/customers/customers.ts +++ b/src/lib/routes/customers/customers.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /customers routes. */ export class SeamHttpCustomers { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -268,9 +261,6 @@ export class SeamHttpCustomers { } } -/** - * Parameters for `SeamHttpCustomers.createPortal`. - */ export type CustomersCreatePortalParameters = { /** * Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. @@ -1150,28 +1140,17 @@ export type CustomersCreatePortalParameters = { } /** - * Response from `SeamHttpCustomers.createPortal`. - * * @deprecated Use CustomersCreatePortalRequest instead. */ export type CustomersCreatePortalResponse = { customer_portal: CustomerPortal } -/** - * Request returned by `SeamHttpCustomers.createPortal`. - */ export type CustomersCreatePortalRequest = SeamHttpRequest< CustomersCreatePortalResponse, 'customer_portal' > -/** - * Options for `SeamHttpCustomers.createPortal`. - */ export interface CustomersCreatePortalOptions {} -/** - * Parameters for `SeamHttpCustomers.deleteData`. - */ export type CustomersDeleteDataParameters = { /** * List of access grant keys to delete. @@ -1252,25 +1231,14 @@ export type CustomersDeleteDataParameters = { } /** - * Response from `SeamHttpCustomers.deleteData`. - * * @deprecated Use CustomersDeleteDataRequest instead. */ export type CustomersDeleteDataResponse = void -/** - * Request returned by `SeamHttpCustomers.deleteData`. - */ export type CustomersDeleteDataRequest = SeamHttpRequest -/** - * Options for `SeamHttpCustomers.deleteData`. - */ export interface CustomersDeleteDataOptions {} -/** - * Parameters for `SeamHttpCustomers.pushData`. - */ export type CustomersPushDataParameters = { /** * List of access grants. @@ -1911,18 +1879,10 @@ export type CustomersPushDataParameters = { } /** - * Response from `SeamHttpCustomers.pushData`. - * * @deprecated Use CustomersPushDataRequest instead. */ export type CustomersPushDataResponse = void -/** - * Request returned by `SeamHttpCustomers.pushData`. - */ export type CustomersPushDataRequest = SeamHttpRequest -/** - * Options for `SeamHttpCustomers.pushData`. - */ export interface CustomersPushDataOptions {} diff --git a/src/lib/routes/devices/devices.ts b/src/lib/routes/devices/devices.ts index 8de3fd7e..92283001 100644 --- a/src/lib/routes/devices/devices.ts +++ b/src/lib/routes/devices/devices.ts @@ -45,14 +45,7 @@ import { SeamHttpDevicesUnmanaged } from './unmanaged/index.js' * Client for the Seam API /devices routes. */ export class SeamHttpDevices { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -332,9 +325,6 @@ export class SeamHttpDevices { } } -/** - * Parameters for `SeamHttpDevices.get`. - */ export type DevicesGetParameters = RequireAtLeastOne<{ /** * ID of the device that you want to get. @@ -347,25 +337,14 @@ export type DevicesGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpDevices.get`. - * * @deprecated Use DevicesGetRequest instead. */ export type DevicesGetResponse = { device: Device } -/** - * Request returned by `SeamHttpDevices.get`. - */ export type DevicesGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevices.get`. - */ export interface DevicesGetOptions {} -/** - * Parameters for `SeamHttpDevices.list`. - */ export type DevicesListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -577,25 +556,14 @@ export type DevicesListParameters = { } /** - * Response from `SeamHttpDevices.list`. - * * @deprecated Use DevicesListRequest instead. */ export type DevicesListResponse = { devices: Array } -/** - * Request returned by `SeamHttpDevices.list`. - */ export type DevicesListRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevices.list`. - */ export interface DevicesListOptions {} -/** - * Parameters for `SeamHttpDevices.listDeviceProviders`. - */ export type DevicesListDeviceProvidersParameters = { /** * Category for which you want to list providers. @@ -613,30 +581,19 @@ export type DevicesListDeviceProvidersParameters = { } /** - * Response from `SeamHttpDevices.listDeviceProviders`. - * * @deprecated Use DevicesListDeviceProvidersRequest instead. */ export type DevicesListDeviceProvidersResponse = { device_providers: Array } -/** - * Request returned by `SeamHttpDevices.listDeviceProviders`. - */ export type DevicesListDeviceProvidersRequest = SeamHttpRequest< DevicesListDeviceProvidersResponse, 'device_providers' > -/** - * Options for `SeamHttpDevices.listDeviceProviders`. - */ export interface DevicesListDeviceProvidersOptions {} -/** - * Parameters for `SeamHttpDevices.reportProviderMetadata`. - */ export type DevicesReportProviderMetadataParameters = { /** * Array of devices with provider metadata to update @@ -1973,28 +1930,17 @@ export type DevicesReportProviderMetadataParameters = { } /** - * Response from `SeamHttpDevices.reportProviderMetadata`. - * * @deprecated Use DevicesReportProviderMetadataRequest instead. */ export type DevicesReportProviderMetadataResponse = void -/** - * Request returned by `SeamHttpDevices.reportProviderMetadata`. - */ export type DevicesReportProviderMetadataRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpDevices.reportProviderMetadata`. - */ export interface DevicesReportProviderMetadataOptions {} -/** - * Parameters for `SeamHttpDevices.update`. - */ export type DevicesUpdateParameters = { /** * Indicates whether the device's [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. @@ -2029,18 +1975,10 @@ export type DevicesUpdateParameters = { } /** - * Response from `SeamHttpDevices.update`. - * * @deprecated Use DevicesUpdateRequest instead. */ export type DevicesUpdateResponse = void -/** - * Request returned by `SeamHttpDevices.update`. - */ export type DevicesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevices.update`. - */ export interface DevicesUpdateOptions {} diff --git a/src/lib/routes/devices/simulate/simulate.ts b/src/lib/routes/devices/simulate/simulate.ts index b7ce4d3c..280541e5 100644 --- a/src/lib/routes/devices/simulate/simulate.ts +++ b/src/lib/routes/devices/simulate/simulate.ts @@ -37,14 +37,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /devices/simulate routes. */ export class SeamHttpDevicesSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -344,9 +337,6 @@ export class SeamHttpDevicesSimulate { } } -/** - * Parameters for `SeamHttpDevicesSimulate.connect`. - */ export type DevicesSimulateConnectParameters = { /** * ID of the device that you want to simulate connecting to Seam. @@ -355,25 +345,14 @@ export type DevicesSimulateConnectParameters = { } /** - * Response from `SeamHttpDevicesSimulate.connect`. - * * @deprecated Use DevicesSimulateConnectRequest instead. */ export type DevicesSimulateConnectResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.connect`. - */ export type DevicesSimulateConnectRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevicesSimulate.connect`. - */ export interface DevicesSimulateConnectOptions {} -/** - * Parameters for `SeamHttpDevicesSimulate.connectToHub`. - */ export type DevicesSimulateConnectToHubParameters = { /** * ID of the device whose hub you want to reconnect. @@ -382,28 +361,17 @@ export type DevicesSimulateConnectToHubParameters = { } /** - * Response from `SeamHttpDevicesSimulate.connectToHub`. - * * @deprecated Use DevicesSimulateConnectToHubRequest instead. */ export type DevicesSimulateConnectToHubResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.connectToHub`. - */ export type DevicesSimulateConnectToHubRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpDevicesSimulate.connectToHub`. - */ export interface DevicesSimulateConnectToHubOptions {} -/** - * Parameters for `SeamHttpDevicesSimulate.disconnect`. - */ export type DevicesSimulateDisconnectParameters = { /** * ID of the device that you want to simulate disconnecting from Seam. @@ -412,25 +380,14 @@ export type DevicesSimulateDisconnectParameters = { } /** - * Response from `SeamHttpDevicesSimulate.disconnect`. - * * @deprecated Use DevicesSimulateDisconnectRequest instead. */ export type DevicesSimulateDisconnectResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.disconnect`. - */ export type DevicesSimulateDisconnectRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevicesSimulate.disconnect`. - */ export interface DevicesSimulateDisconnectOptions {} -/** - * Parameters for `SeamHttpDevicesSimulate.disconnectFromHub`. - */ export type DevicesSimulateDisconnectFromHubParameters = { /** * ID of the device whose hub you want to disconnect. @@ -439,28 +396,17 @@ export type DevicesSimulateDisconnectFromHubParameters = { } /** - * Response from `SeamHttpDevicesSimulate.disconnectFromHub`. - * * @deprecated Use DevicesSimulateDisconnectFromHubRequest instead. */ export type DevicesSimulateDisconnectFromHubResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.disconnectFromHub`. - */ export type DevicesSimulateDisconnectFromHubRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpDevicesSimulate.disconnectFromHub`. - */ export interface DevicesSimulateDisconnectFromHubOptions {} -/** - * Parameters for `SeamHttpDevicesSimulate.paidSubscription`. - */ export type DevicesSimulatePaidSubscriptionParameters = { device_id: string @@ -468,28 +414,17 @@ export type DevicesSimulatePaidSubscriptionParameters = { } /** - * Response from `SeamHttpDevicesSimulate.paidSubscription`. - * * @deprecated Use DevicesSimulatePaidSubscriptionRequest instead. */ export type DevicesSimulatePaidSubscriptionResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.paidSubscription`. - */ export type DevicesSimulatePaidSubscriptionRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpDevicesSimulate.paidSubscription`. - */ export interface DevicesSimulatePaidSubscriptionOptions {} -/** - * Parameters for `SeamHttpDevicesSimulate.remove`. - */ export type DevicesSimulateRemoveParameters = { /** * ID of the device that you want to simulate removing from Seam. @@ -498,18 +433,10 @@ export type DevicesSimulateRemoveParameters = { } /** - * Response from `SeamHttpDevicesSimulate.remove`. - * * @deprecated Use DevicesSimulateRemoveRequest instead. */ export type DevicesSimulateRemoveResponse = void -/** - * Request returned by `SeamHttpDevicesSimulate.remove`. - */ export type DevicesSimulateRemoveRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevicesSimulate.remove`. - */ export interface DevicesSimulateRemoveOptions {} diff --git a/src/lib/routes/devices/unmanaged/unmanaged.ts b/src/lib/routes/devices/unmanaged/unmanaged.ts index fda630fa..1cce0cf0 100644 --- a/src/lib/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/routes/devices/unmanaged/unmanaged.ts @@ -41,14 +41,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /devices/unmanaged routes. */ export class SeamHttpDevicesUnmanaged { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -276,9 +269,6 @@ export class SeamHttpDevicesUnmanaged { } } -/** - * Parameters for `SeamHttpDevicesUnmanaged.get`. - */ export type DevicesUnmanagedGetParameters = RequireAtLeastOne<{ /** * ID of the unmanaged device that you want to get. @@ -291,28 +281,17 @@ export type DevicesUnmanagedGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpDevicesUnmanaged.get`. - * * @deprecated Use DevicesUnmanagedGetRequest instead. */ export type DevicesUnmanagedGetResponse = { device: UnmanagedDevice } -/** - * Request returned by `SeamHttpDevicesUnmanaged.get`. - */ export type DevicesUnmanagedGetRequest = SeamHttpRequest< DevicesUnmanagedGetResponse, 'device' > -/** - * Options for `SeamHttpDevicesUnmanaged.get`. - */ export interface DevicesUnmanagedGetOptions {} -/** - * Parameters for `SeamHttpDevicesUnmanaged.list`. - */ export type DevicesUnmanagedListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -508,28 +487,17 @@ export type DevicesUnmanagedListParameters = { } /** - * Response from `SeamHttpDevicesUnmanaged.list`. - * * @deprecated Use DevicesUnmanagedListRequest instead. */ export type DevicesUnmanagedListResponse = { devices: Array } -/** - * Request returned by `SeamHttpDevicesUnmanaged.list`. - */ export type DevicesUnmanagedListRequest = SeamHttpRequest< DevicesUnmanagedListResponse, 'devices' > -/** - * Options for `SeamHttpDevicesUnmanaged.list`. - */ export interface DevicesUnmanagedListOptions {} -/** - * Parameters for `SeamHttpDevicesUnmanaged.update`. - */ export type DevicesUnmanagedUpdateParameters = { /** * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. @@ -547,18 +515,10 @@ export type DevicesUnmanagedUpdateParameters = { } /** - * Response from `SeamHttpDevicesUnmanaged.update`. - * * @deprecated Use DevicesUnmanagedUpdateRequest instead. */ export type DevicesUnmanagedUpdateResponse = void -/** - * Request returned by `SeamHttpDevicesUnmanaged.update`. - */ export type DevicesUnmanagedUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpDevicesUnmanaged.update`. - */ export interface DevicesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/events/events.ts b/src/lib/routes/events/events.ts index 2a389d1d..01eaa689 100644 --- a/src/lib/routes/events/events.ts +++ b/src/lib/routes/events/events.ts @@ -41,14 +41,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /events routes. */ export class SeamHttpEvents { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -240,9 +233,6 @@ export class SeamHttpEvents { } } -/** - * Parameters for `SeamHttpEvents.get`. - */ export type EventsGetParameters = RequireAtLeastOne<{ /** * Unique identifier for the device that triggered the event that you want to get. @@ -259,25 +249,14 @@ export type EventsGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpEvents.get`. - * * @deprecated Use EventsGetRequest instead. */ export type EventsGetResponse = { event: SeamEvent } -/** - * Request returned by `SeamHttpEvents.get`. - */ export type EventsGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpEvents.get`. - */ export interface EventsGetOptions {} -/** - * Parameters for `SeamHttpEvents.list`. - */ export type EventsListParameters = RequireAtLeastOne<{ /** * ID of the access code for which you want to list events. @@ -616,18 +595,10 @@ export type EventsListParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpEvents.list`. - * * @deprecated Use EventsListRequest instead. */ export type EventsListResponse = { events: Array } -/** - * Request returned by `SeamHttpEvents.list`. - */ export type EventsListRequest = SeamHttpRequest -/** - * Options for `SeamHttpEvents.list`. - */ export interface EventsListOptions {} diff --git a/src/lib/routes/instant-keys/instant-keys.ts b/src/lib/routes/instant-keys/instant-keys.ts index 17c99cbb..63576c76 100644 --- a/src/lib/routes/instant-keys/instant-keys.ts +++ b/src/lib/routes/instant-keys/instant-keys.ts @@ -41,14 +41,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /instant_keys routes. */ export class SeamHttpInstantKeys { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -260,9 +253,6 @@ export class SeamHttpInstantKeys { } } -/** - * Parameters for `SeamHttpInstantKeys.delete`. - */ export type InstantKeysDeleteParameters = { /** * ID of the Instant Key that you want to delete. @@ -271,25 +261,14 @@ export type InstantKeysDeleteParameters = { } /** - * Response from `SeamHttpInstantKeys.delete`. - * * @deprecated Use InstantKeysDeleteRequest instead. */ export type InstantKeysDeleteResponse = void -/** - * Request returned by `SeamHttpInstantKeys.delete`. - */ export type InstantKeysDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpInstantKeys.delete`. - */ export interface InstantKeysDeleteOptions {} -/** - * Parameters for `SeamHttpInstantKeys.get`. - */ export type InstantKeysGetParameters = RequireAtLeastOne<{ /** * ID of the instant key to get. @@ -302,28 +281,17 @@ export type InstantKeysGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpInstantKeys.get`. - * * @deprecated Use InstantKeysGetRequest instead. */ export type InstantKeysGetResponse = { instant_key: InstantKey } -/** - * Request returned by `SeamHttpInstantKeys.get`. - */ export type InstantKeysGetRequest = SeamHttpRequest< InstantKeysGetResponse, 'instant_key' > -/** - * Options for `SeamHttpInstantKeys.get`. - */ export interface InstantKeysGetOptions {} -/** - * Parameters for `SeamHttpInstantKeys.list`. - */ export type InstantKeysListParameters = { /** * ID of the user identity by which you want to filter the list of Instant Keys. @@ -332,21 +300,13 @@ export type InstantKeysListParameters = { } /** - * Response from `SeamHttpInstantKeys.list`. - * * @deprecated Use InstantKeysListRequest instead. */ export type InstantKeysListResponse = { instant_keys: Array } -/** - * Request returned by `SeamHttpInstantKeys.list`. - */ export type InstantKeysListRequest = SeamHttpRequest< InstantKeysListResponse, 'instant_keys' > -/** - * Options for `SeamHttpInstantKeys.list`. - */ export interface InstantKeysListOptions {} diff --git a/src/lib/routes/locks/locks.ts b/src/lib/routes/locks/locks.ts index 3a01a62a..8f1bcc12 100644 --- a/src/lib/routes/locks/locks.ts +++ b/src/lib/routes/locks/locks.ts @@ -45,14 +45,7 @@ import { SeamHttpLocksSimulate } from './simulate/index.js' * Client for the Seam API /locks routes. */ export class SeamHttpLocks { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -328,9 +321,6 @@ export class SeamHttpLocks { } } -/** - * Parameters for `SeamHttpLocks.configureAutoLock`. - */ export type LocksConfigureAutoLockParameters = { /** * Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. @@ -348,31 +338,20 @@ export type LocksConfigureAutoLockParameters = { } /** - * Response from `SeamHttpLocks.configureAutoLock`. - * * @deprecated Use LocksConfigureAutoLockRequest instead. */ export type LocksConfigureAutoLockResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpLocks.configureAutoLock`. - */ export type LocksConfigureAutoLockRequest = SeamHttpRequest< LocksConfigureAutoLockResponse, 'action_attempt' > -/** - * Options for `SeamHttpLocks.configureAutoLock`. - */ export type LocksConfigureAutoLockOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpLocks.get`. - */ export type LocksGetParameters = RequireAtLeastOne<{ /** * ID of the lock that you want to get. @@ -385,25 +364,14 @@ export type LocksGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpLocks.get`. - * * @deprecated Use LocksGetRequest instead. */ export type LocksGetResponse = { device: Device } -/** - * Request returned by `SeamHttpLocks.get`. - */ export type LocksGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpLocks.get`. - */ export interface LocksGetOptions {} -/** - * Parameters for `SeamHttpLocks.list`. - */ export type LocksListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -532,25 +500,14 @@ export type LocksListParameters = { } /** - * Response from `SeamHttpLocks.list`. - * * @deprecated Use LocksListRequest instead. */ export type LocksListResponse = { devices: Array } -/** - * Request returned by `SeamHttpLocks.list`. - */ export type LocksListRequest = SeamHttpRequest -/** - * Options for `SeamHttpLocks.list`. - */ export interface LocksListOptions {} -/** - * Parameters for `SeamHttpLocks.lockDoor`. - */ export type LocksLockDoorParameters = { /** * ID of the lock that you want to lock. @@ -559,31 +516,20 @@ export type LocksLockDoorParameters = { } /** - * Response from `SeamHttpLocks.lockDoor`. - * * @deprecated Use LocksLockDoorRequest instead. */ export type LocksLockDoorResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpLocks.lockDoor`. - */ export type LocksLockDoorRequest = SeamHttpRequest< LocksLockDoorResponse, 'action_attempt' > -/** - * Options for `SeamHttpLocks.lockDoor`. - */ export type LocksLockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpLocks.unlockDoor`. - */ export type LocksUnlockDoorParameters = { /** * ID of the lock that you want to unlock. @@ -592,23 +538,15 @@ export type LocksUnlockDoorParameters = { } /** - * Response from `SeamHttpLocks.unlockDoor`. - * * @deprecated Use LocksUnlockDoorRequest instead. */ export type LocksUnlockDoorResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpLocks.unlockDoor`. - */ export type LocksUnlockDoorRequest = SeamHttpRequest< LocksUnlockDoorResponse, 'action_attempt' > -/** - * Options for `SeamHttpLocks.unlockDoor`. - */ export type LocksUnlockDoorOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/locks/simulate/simulate.ts b/src/lib/routes/locks/simulate/simulate.ts index ddfc5785..1082c506 100644 --- a/src/lib/routes/locks/simulate/simulate.ts +++ b/src/lib/routes/locks/simulate/simulate.ts @@ -39,14 +39,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /locks/simulate routes. */ export class SeamHttpLocksSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -256,9 +249,6 @@ export class SeamHttpLocksSimulate { } } -/** - * Parameters for `SeamHttpLocksSimulate.keypadCodeEntry`. - */ export type LocksSimulateKeypadCodeEntryParameters = { /** * Code that you want to simulate entering on a keypad. @@ -272,33 +262,22 @@ export type LocksSimulateKeypadCodeEntryParameters = { } /** - * Response from `SeamHttpLocksSimulate.keypadCodeEntry`. - * * @deprecated Use LocksSimulateKeypadCodeEntryRequest instead. */ export type LocksSimulateKeypadCodeEntryResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpLocksSimulate.keypadCodeEntry`. - */ export type LocksSimulateKeypadCodeEntryRequest = SeamHttpRequest< LocksSimulateKeypadCodeEntryResponse, 'action_attempt' > -/** - * Options for `SeamHttpLocksSimulate.keypadCodeEntry`. - */ export type LocksSimulateKeypadCodeEntryOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpLocksSimulate.manualLockViaKeypad`. - */ export type LocksSimulateManualLockViaKeypadParameters = { /** * ID of the device for which you want to simulate a manual lock action using a keypad. @@ -307,25 +286,17 @@ export type LocksSimulateManualLockViaKeypadParameters = { } /** - * Response from `SeamHttpLocksSimulate.manualLockViaKeypad`. - * * @deprecated Use LocksSimulateManualLockViaKeypadRequest instead. */ export type LocksSimulateManualLockViaKeypadResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpLocksSimulate.manualLockViaKeypad`. - */ export type LocksSimulateManualLockViaKeypadRequest = SeamHttpRequest< LocksSimulateManualLockViaKeypadResponse, 'action_attempt' > -/** - * Options for `SeamHttpLocksSimulate.manualLockViaKeypad`. - */ export type LocksSimulateManualLockViaKeypadOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/noise-sensors/noise-sensors.ts b/src/lib/routes/noise-sensors/noise-sensors.ts index de763219..fe9d242f 100644 --- a/src/lib/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/routes/noise-sensors/noise-sensors.ts @@ -41,14 +41,7 @@ import { SeamHttpNoiseSensorsSimulate } from './simulate/index.js' * Client for the Seam API /noise_sensors routes. */ export class SeamHttpNoiseSensors { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -239,9 +232,6 @@ export class SeamHttpNoiseSensors { } } -/** - * Parameters for `SeamHttpNoiseSensors.list`. - */ export type NoiseSensorsListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -270,21 +260,13 @@ export type NoiseSensorsListParameters = { } /** - * Response from `SeamHttpNoiseSensors.list`. - * * @deprecated Use NoiseSensorsListRequest instead. */ export type NoiseSensorsListResponse = { devices: Array } -/** - * Request returned by `SeamHttpNoiseSensors.list`. - */ export type NoiseSensorsListRequest = SeamHttpRequest< NoiseSensorsListResponse, 'devices' > -/** - * Options for `SeamHttpNoiseSensors.list`. - */ export interface NoiseSensorsListOptions {} diff --git a/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index 48a718fc..db900f68 100644 --- a/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +++ b/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /noise_sensors/noise_thresholds routes. */ export class SeamHttpNoiseSensorsNoiseThresholds { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -319,9 +312,6 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } } -/** - * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.create`. - */ export type NoiseSensorsNoiseThresholdsCreateParameters = { /** * ID of the device for which you want to create a noise threshold. @@ -352,30 +342,19 @@ export type NoiseSensorsNoiseThresholdsCreateParameters = { } /** - * Response from `SeamHttpNoiseSensorsNoiseThresholds.create`. - * * @deprecated Use NoiseSensorsNoiseThresholdsCreateRequest instead. */ export type NoiseSensorsNoiseThresholdsCreateResponse = { noise_threshold: NoiseThreshold } -/** - * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.create`. - */ export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsCreateResponse, 'noise_threshold' > -/** - * Options for `SeamHttpNoiseSensorsNoiseThresholds.create`. - */ export interface NoiseSensorsNoiseThresholdsCreateOptions {} -/** - * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.delete`. - */ export type NoiseSensorsNoiseThresholdsDeleteParameters = { /** * ID of the device that contains the noise threshold that you want to delete. @@ -389,28 +368,17 @@ export type NoiseSensorsNoiseThresholdsDeleteParameters = { } /** - * Response from `SeamHttpNoiseSensorsNoiseThresholds.delete`. - * * @deprecated Use NoiseSensorsNoiseThresholdsDeleteRequest instead. */ export type NoiseSensorsNoiseThresholdsDeleteResponse = void -/** - * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.delete`. - */ export type NoiseSensorsNoiseThresholdsDeleteRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpNoiseSensorsNoiseThresholds.delete`. - */ export interface NoiseSensorsNoiseThresholdsDeleteOptions {} -/** - * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.get`. - */ export type NoiseSensorsNoiseThresholdsGetParameters = { /** * ID of the noise threshold that you want to get. @@ -419,30 +387,19 @@ export type NoiseSensorsNoiseThresholdsGetParameters = { } /** - * Response from `SeamHttpNoiseSensorsNoiseThresholds.get`. - * * @deprecated Use NoiseSensorsNoiseThresholdsGetRequest instead. */ export type NoiseSensorsNoiseThresholdsGetResponse = { noise_threshold: NoiseThreshold } -/** - * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.get`. - */ export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsGetResponse, 'noise_threshold' > -/** - * Options for `SeamHttpNoiseSensorsNoiseThresholds.get`. - */ export interface NoiseSensorsNoiseThresholdsGetOptions {} -/** - * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.list`. - */ export type NoiseSensorsNoiseThresholdsListParameters = { /** * ID of the device for which you want to list noise thresholds. @@ -451,30 +408,19 @@ export type NoiseSensorsNoiseThresholdsListParameters = { } /** - * Response from `SeamHttpNoiseSensorsNoiseThresholds.list`. - * * @deprecated Use NoiseSensorsNoiseThresholdsListRequest instead. */ export type NoiseSensorsNoiseThresholdsListResponse = { noise_thresholds: Array } -/** - * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.list`. - */ export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsListResponse, 'noise_thresholds' > -/** - * Options for `SeamHttpNoiseSensorsNoiseThresholds.list`. - */ export interface NoiseSensorsNoiseThresholdsListOptions {} -/** - * Parameters for `SeamHttpNoiseSensorsNoiseThresholds.update`. - */ export type NoiseSensorsNoiseThresholdsUpdateParameters = { /** * ID of the device that contains the noise threshold that you want to update. @@ -509,21 +455,13 @@ export type NoiseSensorsNoiseThresholdsUpdateParameters = { } /** - * Response from `SeamHttpNoiseSensorsNoiseThresholds.update`. - * * @deprecated Use NoiseSensorsNoiseThresholdsUpdateRequest instead. */ export type NoiseSensorsNoiseThresholdsUpdateResponse = void -/** - * Request returned by `SeamHttpNoiseSensorsNoiseThresholds.update`. - */ export type NoiseSensorsNoiseThresholdsUpdateRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpNoiseSensorsNoiseThresholds.update`. - */ export interface NoiseSensorsNoiseThresholdsUpdateOptions {} diff --git a/src/lib/routes/noise-sensors/simulate/simulate.ts b/src/lib/routes/noise-sensors/simulate/simulate.ts index e32df49f..f50f94c7 100644 --- a/src/lib/routes/noise-sensors/simulate/simulate.ts +++ b/src/lib/routes/noise-sensors/simulate/simulate.ts @@ -37,14 +37,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /noise_sensors/simulate routes. */ export class SeamHttpNoiseSensorsSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -223,9 +216,6 @@ export class SeamHttpNoiseSensorsSimulate { } } -/** - * Parameters for `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. - */ export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { /** * ID of the device for which you want to simulate the triggering of a noise threshold. @@ -234,21 +224,13 @@ export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { } /** - * Response from `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. - * * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdRequest instead. */ export type NoiseSensorsSimulateTriggerNoiseThresholdResponse = void -/** - * Request returned by `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. - */ export type NoiseSensorsSimulateTriggerNoiseThresholdRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpNoiseSensorsSimulate.triggerNoiseThreshold`. - */ export interface NoiseSensorsSimulateTriggerNoiseThresholdOptions {} diff --git a/src/lib/routes/phones/phones.ts b/src/lib/routes/phones/phones.ts index 1db44d94..0ce10b90 100644 --- a/src/lib/routes/phones/phones.ts +++ b/src/lib/routes/phones/phones.ts @@ -40,14 +40,7 @@ import { SeamHttpPhonesSimulate } from './simulate/index.js' * Client for the Seam API /phones routes. */ export class SeamHttpPhones { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -266,9 +259,6 @@ export class SeamHttpPhones { } } -/** - * Parameters for `SeamHttpPhones.deactivate`. - */ export type PhonesDeactivateParameters = { /** * Device ID of the phone that you want to deactivate. @@ -277,25 +267,14 @@ export type PhonesDeactivateParameters = { } /** - * Response from `SeamHttpPhones.deactivate`. - * * @deprecated Use PhonesDeactivateRequest instead. */ export type PhonesDeactivateResponse = void -/** - * Request returned by `SeamHttpPhones.deactivate`. - */ export type PhonesDeactivateRequest = SeamHttpRequest -/** - * Options for `SeamHttpPhones.deactivate`. - */ export interface PhonesDeactivateOptions {} -/** - * Parameters for `SeamHttpPhones.get`. - */ export type PhonesGetParameters = { /** * Device ID of the phone that you want to get. @@ -304,25 +283,14 @@ export type PhonesGetParameters = { } /** - * Response from `SeamHttpPhones.get`. - * * @deprecated Use PhonesGetRequest instead. */ export type PhonesGetResponse = { phone: Phone } -/** - * Request returned by `SeamHttpPhones.get`. - */ export type PhonesGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpPhones.get`. - */ export interface PhonesGetOptions {} -/** - * Parameters for `SeamHttpPhones.list`. - */ export type PhonesListParameters = { /** * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. @@ -335,18 +303,10 @@ export type PhonesListParameters = { } /** - * Response from `SeamHttpPhones.list`. - * * @deprecated Use PhonesListRequest instead. */ export type PhonesListResponse = { phones: Array } -/** - * Request returned by `SeamHttpPhones.list`. - */ export type PhonesListRequest = SeamHttpRequest -/** - * Options for `SeamHttpPhones.list`. - */ export interface PhonesListOptions {} diff --git a/src/lib/routes/phones/simulate/simulate.ts b/src/lib/routes/phones/simulate/simulate.ts index 1b9c53e2..6b5e2797 100644 --- a/src/lib/routes/phones/simulate/simulate.ts +++ b/src/lib/routes/phones/simulate/simulate.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /phones/simulate routes. */ export class SeamHttpPhonesSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -224,9 +217,6 @@ export class SeamHttpPhonesSimulate { } } -/** - * Parameters for `SeamHttpPhonesSimulate.createSandboxPhone`. - */ export type PhonesSimulateCreateSandboxPhoneParameters = { /** * ASSA ABLOY metadata that you want to associate with the simulated phone. @@ -293,21 +283,13 @@ export type PhonesSimulateCreateSandboxPhoneParameters = { } /** - * Response from `SeamHttpPhonesSimulate.createSandboxPhone`. - * * @deprecated Use PhonesSimulateCreateSandboxPhoneRequest instead. */ export type PhonesSimulateCreateSandboxPhoneResponse = { phone: Phone } -/** - * Request returned by `SeamHttpPhonesSimulate.createSandboxPhone`. - */ export type PhonesSimulateCreateSandboxPhoneRequest = SeamHttpRequest< PhonesSimulateCreateSandboxPhoneResponse, 'phone' > -/** - * Options for `SeamHttpPhonesSimulate.createSandboxPhone`. - */ export interface PhonesSimulateCreateSandboxPhoneOptions {} diff --git a/src/lib/routes/seam-http-endpoints-without-workspace.ts b/src/lib/routes/seam-http-endpoints-without-workspace.ts index ef65193f..9f661eba 100644 --- a/src/lib/routes/seam-http-endpoints-without-workspace.ts +++ b/src/lib/routes/seam-http-endpoints-without-workspace.ts @@ -35,14 +35,7 @@ import { * with endpoints keyed by their path, e.g., `seam.get['/devices/list']()`. */ export class SeamHttpEndpointsWithoutWorkspace { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { @@ -146,12 +139,6 @@ export class SeamHttpEndpointsWithoutWorkspace { } } -/** - * Paths of the Seam API query endpoints available without a workspace. - */ export type SeamHttpEndpointWithoutWorkspaceQueryPaths = '/workspaces/list' -/** - * Paths of the Seam API mutation endpoints available without a workspace. - */ export type SeamHttpEndpointWithoutWorkspaceMutationPaths = '/workspaces/create' diff --git a/src/lib/routes/seam-http-endpoints.ts b/src/lib/routes/seam-http-endpoints.ts index ec5031c5..c9324353 100644 --- a/src/lib/routes/seam-http-endpoints.ts +++ b/src/lib/routes/seam-http-endpoints.ts @@ -763,14 +763,7 @@ import { * with endpoints keyed by their path, e.g., `seam.get['/devices/list']()`. */ export class SeamHttpEndpoints { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -4272,9 +4265,6 @@ export class SeamHttpEndpoints { } } -/** - * Paths of the Seam API query endpoints. - */ export type SeamHttpEndpointQueryPaths = | '/access_codes/generate_code' | '/access_codes/get' @@ -4352,9 +4342,6 @@ export type SeamHttpEndpointQueryPaths = | '/workspaces/get' | '/workspaces/list' -/** - * Paths of the Seam API query endpoints that support pagination. - */ export type SeamHttpEndpointPaginatedQueryPaths = | '/access_codes/list' | '/access_codes/unmanaged/list' @@ -4374,9 +4361,6 @@ export type SeamHttpEndpointPaginatedQueryPaths = | '/user_identities/list' | '/user_identities/unmanaged/list' -/** - * Paths of the Seam API mutation endpoints. - */ export type SeamHttpEndpointMutationPaths = | '/access_codes/create' | '/access_codes/create_multiple' diff --git a/src/lib/routes/seam-http-without-workspace.ts b/src/lib/routes/seam-http-without-workspace.ts index be49442a..87054cc5 100644 --- a/src/lib/routes/seam-http-without-workspace.ts +++ b/src/lib/routes/seam-http-without-workspace.ts @@ -29,14 +29,7 @@ import { SeamHttpWorkspaces } from 'lib/routes/workspaces/index.js' * or console session token. */ export class SeamHttpWithoutWorkspace { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(options: SeamHttpWithoutWorkspaceOptions = {}) { diff --git a/src/lib/routes/seam-http.ts b/src/lib/routes/seam-http.ts index 87fea7b2..1bce193a 100644 --- a/src/lib/routes/seam-http.ts +++ b/src/lib/routes/seam-http.ts @@ -61,14 +61,7 @@ import { SeamHttpWorkspaces } from './workspaces/index.js' * e.g., use `seam.devices.list()` to call the `/devices/list` endpoint. */ export class SeamHttp { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { diff --git a/src/lib/routes/spaces/spaces.ts b/src/lib/routes/spaces/spaces.ts index efe7b711..3feab972 100644 --- a/src/lib/routes/spaces/spaces.ts +++ b/src/lib/routes/spaces/spaces.ts @@ -42,14 +42,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /spaces routes. */ export class SeamHttpSpaces { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -449,9 +442,6 @@ export class SeamHttpSpaces { } } -/** - * Parameters for `SeamHttpSpaces.addAcsEntrances`. - */ export type SpacesAddAcsEntrancesParameters = { /** * IDs of the entrances that you want to add to the space. @@ -465,25 +455,14 @@ export type SpacesAddAcsEntrancesParameters = { } /** - * Response from `SeamHttpSpaces.addAcsEntrances`. - * * @deprecated Use SpacesAddAcsEntrancesRequest instead. */ export type SpacesAddAcsEntrancesResponse = void -/** - * Request returned by `SeamHttpSpaces.addAcsEntrances`. - */ export type SpacesAddAcsEntrancesRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.addAcsEntrances`. - */ export interface SpacesAddAcsEntrancesOptions {} -/** - * Parameters for `SeamHttpSpaces.addConnectedAccount`. - */ export type SpacesAddConnectedAccountParameters = { /** * ID of the connected account that you want to add to the space. @@ -497,25 +476,14 @@ export type SpacesAddConnectedAccountParameters = { } /** - * Response from `SeamHttpSpaces.addConnectedAccount`. - * * @deprecated Use SpacesAddConnectedAccountRequest instead. */ export type SpacesAddConnectedAccountResponse = void -/** - * Request returned by `SeamHttpSpaces.addConnectedAccount`. - */ export type SpacesAddConnectedAccountRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.addConnectedAccount`. - */ export interface SpacesAddConnectedAccountOptions {} -/** - * Parameters for `SeamHttpSpaces.addDevices`. - */ export type SpacesAddDevicesParameters = { /** * IDs of the devices that you want to add to the space. @@ -529,25 +497,14 @@ export type SpacesAddDevicesParameters = { } /** - * Response from `SeamHttpSpaces.addDevices`. - * * @deprecated Use SpacesAddDevicesRequest instead. */ export type SpacesAddDevicesResponse = void -/** - * Request returned by `SeamHttpSpaces.addDevices`. - */ export type SpacesAddDevicesRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.addDevices`. - */ export interface SpacesAddDevicesOptions {} -/** - * Parameters for `SeamHttpSpaces.create`. - */ export type SpacesCreateParameters = { /** * IDs of the entrances that you want to add to the new space. @@ -600,25 +557,14 @@ export type SpacesCreateParameters = { } /** - * Response from `SeamHttpSpaces.create`. - * * @deprecated Use SpacesCreateRequest instead. */ export type SpacesCreateResponse = { space: Space } -/** - * Request returned by `SeamHttpSpaces.create`. - */ export type SpacesCreateRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.create`. - */ export interface SpacesCreateOptions {} -/** - * Parameters for `SeamHttpSpaces.delete`. - */ export type SpacesDeleteParameters = { /** * ID of the space that you want to delete. @@ -627,25 +573,14 @@ export type SpacesDeleteParameters = { } /** - * Response from `SeamHttpSpaces.delete`. - * * @deprecated Use SpacesDeleteRequest instead. */ export type SpacesDeleteResponse = void -/** - * Request returned by `SeamHttpSpaces.delete`. - */ export type SpacesDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.delete`. - */ export interface SpacesDeleteOptions {} -/** - * Parameters for `SeamHttpSpaces.get`. - */ export type SpacesGetParameters = RequireAtLeastOne<{ /** * ID of the space that you want to get. @@ -658,25 +593,14 @@ export type SpacesGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpSpaces.get`. - * * @deprecated Use SpacesGetRequest instead. */ export type SpacesGetResponse = { space: Space } -/** - * Request returned by `SeamHttpSpaces.get`. - */ export type SpacesGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.get`. - */ export interface SpacesGetOptions {} -/** - * Parameters for `SeamHttpSpaces.getRelated`. - */ export type SpacesGetRelatedParameters = RequireAtLeastOne<{ exclude?: | Array< @@ -710,8 +634,6 @@ export type SpacesGetRelatedParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpSpaces.getRelated`. - * * @deprecated Use SpacesGetRelatedRequest instead. */ export type SpacesGetRelatedResponse = { @@ -725,22 +647,13 @@ export type SpacesGetRelatedResponse = { > } -/** - * Request returned by `SeamHttpSpaces.getRelated`. - */ export type SpacesGetRelatedRequest = SeamHttpRequest< SpacesGetRelatedResponse, 'batch' > -/** - * Options for `SeamHttpSpaces.getRelated`. - */ export interface SpacesGetRelatedOptions {} -/** - * Parameters for `SeamHttpSpaces.list`. - */ export type SpacesListParameters = { /** * Customer key for which you want to list spaces. @@ -765,25 +678,14 @@ export type SpacesListParameters = { } /** - * Response from `SeamHttpSpaces.list`. - * * @deprecated Use SpacesListRequest instead. */ export type SpacesListResponse = { spaces: Array } -/** - * Request returned by `SeamHttpSpaces.list`. - */ export type SpacesListRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.list`. - */ export interface SpacesListOptions {} -/** - * Parameters for `SeamHttpSpaces.removeAcsEntrances`. - */ export type SpacesRemoveAcsEntrancesParameters = { /** * IDs of the entrances that you want to remove from the space. @@ -797,25 +699,14 @@ export type SpacesRemoveAcsEntrancesParameters = { } /** - * Response from `SeamHttpSpaces.removeAcsEntrances`. - * * @deprecated Use SpacesRemoveAcsEntrancesRequest instead. */ export type SpacesRemoveAcsEntrancesResponse = void -/** - * Request returned by `SeamHttpSpaces.removeAcsEntrances`. - */ export type SpacesRemoveAcsEntrancesRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.removeAcsEntrances`. - */ export interface SpacesRemoveAcsEntrancesOptions {} -/** - * Parameters for `SeamHttpSpaces.removeConnectedAccount`. - */ export type SpacesRemoveConnectedAccountParameters = { /** * ID of the connected account that you want to remove from the space. @@ -829,28 +720,17 @@ export type SpacesRemoveConnectedAccountParameters = { } /** - * Response from `SeamHttpSpaces.removeConnectedAccount`. - * * @deprecated Use SpacesRemoveConnectedAccountRequest instead. */ export type SpacesRemoveConnectedAccountResponse = void -/** - * Request returned by `SeamHttpSpaces.removeConnectedAccount`. - */ export type SpacesRemoveConnectedAccountRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpSpaces.removeConnectedAccount`. - */ export interface SpacesRemoveConnectedAccountOptions {} -/** - * Parameters for `SeamHttpSpaces.removeDevices`. - */ export type SpacesRemoveDevicesParameters = { /** * IDs of the devices that you want to remove from the space. @@ -864,25 +744,14 @@ export type SpacesRemoveDevicesParameters = { } /** - * Response from `SeamHttpSpaces.removeDevices`. - * * @deprecated Use SpacesRemoveDevicesRequest instead. */ export type SpacesRemoveDevicesResponse = void -/** - * Request returned by `SeamHttpSpaces.removeDevices`. - */ export type SpacesRemoveDevicesRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.removeDevices`. - */ export interface SpacesRemoveDevicesOptions {} -/** - * Parameters for `SeamHttpSpaces.update`. - */ export type SpacesUpdateParameters = { /** * IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. @@ -930,18 +799,10 @@ export type SpacesUpdateParameters = { } /** - * Response from `SeamHttpSpaces.update`. - * * @deprecated Use SpacesUpdateRequest instead. */ export type SpacesUpdateResponse = { space: Space } -/** - * Request returned by `SeamHttpSpaces.update`. - */ export type SpacesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpSpaces.update`. - */ export interface SpacesUpdateOptions {} diff --git a/src/lib/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/routes/thermostats/daily-programs/daily-programs.ts index 9e27f7b7..9f1b608b 100644 --- a/src/lib/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/routes/thermostats/daily-programs/daily-programs.ts @@ -40,14 +40,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /thermostats/daily_programs routes. */ export class SeamHttpThermostatsDailyPrograms { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -279,9 +272,6 @@ export class SeamHttpThermostatsDailyPrograms { } } -/** - * Parameters for `SeamHttpThermostatsDailyPrograms.create`. - */ export type ThermostatsDailyProgramsCreateParameters = { /** * ID of the thermostat device for which you want to create a daily program. @@ -309,30 +299,19 @@ export type ThermostatsDailyProgramsCreateParameters = { } /** - * Response from `SeamHttpThermostatsDailyPrograms.create`. - * * @deprecated Use ThermostatsDailyProgramsCreateRequest instead. */ export type ThermostatsDailyProgramsCreateResponse = { thermostat_daily_program: ThermostatDailyProgram } -/** - * Request returned by `SeamHttpThermostatsDailyPrograms.create`. - */ export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< ThermostatsDailyProgramsCreateResponse, 'thermostat_daily_program' > -/** - * Options for `SeamHttpThermostatsDailyPrograms.create`. - */ export interface ThermostatsDailyProgramsCreateOptions {} -/** - * Parameters for `SeamHttpThermostatsDailyPrograms.delete`. - */ export type ThermostatsDailyProgramsDeleteParameters = { /** * ID of the thermostat daily program that you want to delete. @@ -341,28 +320,17 @@ export type ThermostatsDailyProgramsDeleteParameters = { } /** - * Response from `SeamHttpThermostatsDailyPrograms.delete`. - * * @deprecated Use ThermostatsDailyProgramsDeleteRequest instead. */ export type ThermostatsDailyProgramsDeleteResponse = void -/** - * Request returned by `SeamHttpThermostatsDailyPrograms.delete`. - */ export type ThermostatsDailyProgramsDeleteRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostatsDailyPrograms.delete`. - */ export interface ThermostatsDailyProgramsDeleteOptions {} -/** - * Parameters for `SeamHttpThermostatsDailyPrograms.update`. - */ export type ThermostatsDailyProgramsUpdateParameters = { /** * Name of the thermostat daily program that you want to update. @@ -390,25 +358,17 @@ export type ThermostatsDailyProgramsUpdateParameters = { } /** - * Response from `SeamHttpThermostatsDailyPrograms.update`. - * * @deprecated Use ThermostatsDailyProgramsUpdateRequest instead. */ export type ThermostatsDailyProgramsUpdateResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostatsDailyPrograms.update`. - */ export type ThermostatsDailyProgramsUpdateRequest = SeamHttpRequest< ThermostatsDailyProgramsUpdateResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostatsDailyPrograms.update`. - */ export type ThermostatsDailyProgramsUpdateOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/thermostats/schedules/schedules.ts b/src/lib/routes/thermostats/schedules/schedules.ts index d584874e..5fadd9aa 100644 --- a/src/lib/routes/thermostats/schedules/schedules.ts +++ b/src/lib/routes/thermostats/schedules/schedules.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /thermostats/schedules routes. */ export class SeamHttpThermostatsSchedules { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -316,9 +309,6 @@ export class SeamHttpThermostatsSchedules { } } -/** - * Parameters for `SeamHttpThermostatsSchedules.create`. - */ export type ThermostatsSchedulesCreateParameters = { /** * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. @@ -354,30 +344,19 @@ export type ThermostatsSchedulesCreateParameters = { } /** - * Response from `SeamHttpThermostatsSchedules.create`. - * * @deprecated Use ThermostatsSchedulesCreateRequest instead. */ export type ThermostatsSchedulesCreateResponse = { thermostat_schedule: ThermostatSchedule } -/** - * Request returned by `SeamHttpThermostatsSchedules.create`. - */ export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< ThermostatsSchedulesCreateResponse, 'thermostat_schedule' > -/** - * Options for `SeamHttpThermostatsSchedules.create`. - */ export interface ThermostatsSchedulesCreateOptions {} -/** - * Parameters for `SeamHttpThermostatsSchedules.delete`. - */ export type ThermostatsSchedulesDeleteParameters = { /** * ID of the thermostat schedule that you want to delete. @@ -386,25 +365,14 @@ export type ThermostatsSchedulesDeleteParameters = { } /** - * Response from `SeamHttpThermostatsSchedules.delete`. - * * @deprecated Use ThermostatsSchedulesDeleteRequest instead. */ export type ThermostatsSchedulesDeleteResponse = void -/** - * Request returned by `SeamHttpThermostatsSchedules.delete`. - */ export type ThermostatsSchedulesDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpThermostatsSchedules.delete`. - */ export interface ThermostatsSchedulesDeleteOptions {} -/** - * Parameters for `SeamHttpThermostatsSchedules.get`. - */ export type ThermostatsSchedulesGetParameters = { /** * ID of the thermostat schedule that you want to get. @@ -413,30 +381,19 @@ export type ThermostatsSchedulesGetParameters = { } /** - * Response from `SeamHttpThermostatsSchedules.get`. - * * @deprecated Use ThermostatsSchedulesGetRequest instead. */ export type ThermostatsSchedulesGetResponse = { thermostat_schedule: ThermostatSchedule } -/** - * Request returned by `SeamHttpThermostatsSchedules.get`. - */ export type ThermostatsSchedulesGetRequest = SeamHttpRequest< ThermostatsSchedulesGetResponse, 'thermostat_schedule' > -/** - * Options for `SeamHttpThermostatsSchedules.get`. - */ export interface ThermostatsSchedulesGetOptions {} -/** - * Parameters for `SeamHttpThermostatsSchedules.list`. - */ export type ThermostatsSchedulesListParameters = { /** * ID of the thermostat device for which you want to list schedules. @@ -450,30 +407,19 @@ export type ThermostatsSchedulesListParameters = { } /** - * Response from `SeamHttpThermostatsSchedules.list`. - * * @deprecated Use ThermostatsSchedulesListRequest instead. */ export type ThermostatsSchedulesListResponse = { thermostat_schedules: Array } -/** - * Request returned by `SeamHttpThermostatsSchedules.list`. - */ export type ThermostatsSchedulesListRequest = SeamHttpRequest< ThermostatsSchedulesListResponse, 'thermostat_schedules' > -/** - * Options for `SeamHttpThermostatsSchedules.list`. - */ export interface ThermostatsSchedulesListOptions {} -/** - * Parameters for `SeamHttpThermostatsSchedules.update`. - */ export type ThermostatsSchedulesUpdateParameters = { /** * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. @@ -506,18 +452,10 @@ export type ThermostatsSchedulesUpdateParameters = { } /** - * Response from `SeamHttpThermostatsSchedules.update`. - * * @deprecated Use ThermostatsSchedulesUpdateRequest instead. */ export type ThermostatsSchedulesUpdateResponse = void -/** - * Request returned by `SeamHttpThermostatsSchedules.update`. - */ export type ThermostatsSchedulesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpThermostatsSchedules.update`. - */ export interface ThermostatsSchedulesUpdateOptions {} diff --git a/src/lib/routes/thermostats/simulate/simulate.ts b/src/lib/routes/thermostats/simulate/simulate.ts index 39b6b10e..df8da7c9 100644 --- a/src/lib/routes/thermostats/simulate/simulate.ts +++ b/src/lib/routes/thermostats/simulate/simulate.ts @@ -37,14 +37,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /thermostats/simulate routes. */ export class SeamHttpThermostatsSimulate { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -246,9 +239,6 @@ export class SeamHttpThermostatsSimulate { } } -/** - * Parameters for `SeamHttpThermostatsSimulate.hvacModeAdjusted`. - */ export type ThermostatsSimulateHvacModeAdjustedParameters = { /** * ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. @@ -279,28 +269,17 @@ export type ThermostatsSimulateHvacModeAdjustedParameters = { } /** - * Response from `SeamHttpThermostatsSimulate.hvacModeAdjusted`. - * * @deprecated Use ThermostatsSimulateHvacModeAdjustedRequest instead. */ export type ThermostatsSimulateHvacModeAdjustedResponse = void -/** - * Request returned by `SeamHttpThermostatsSimulate.hvacModeAdjusted`. - */ export type ThermostatsSimulateHvacModeAdjustedRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostatsSimulate.hvacModeAdjusted`. - */ export interface ThermostatsSimulateHvacModeAdjustedOptions {} -/** - * Parameters for `SeamHttpThermostatsSimulate.temperatureReached`. - */ export type ThermostatsSimulateTemperatureReachedParameters = { /** * ID of the thermostat device that you want to simulate reaching a specified temperature. @@ -318,21 +297,13 @@ export type ThermostatsSimulateTemperatureReachedParameters = { } /** - * Response from `SeamHttpThermostatsSimulate.temperatureReached`. - * * @deprecated Use ThermostatsSimulateTemperatureReachedRequest instead. */ export type ThermostatsSimulateTemperatureReachedResponse = void -/** - * Request returned by `SeamHttpThermostatsSimulate.temperatureReached`. - */ export type ThermostatsSimulateTemperatureReachedRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostatsSimulate.temperatureReached`. - */ export interface ThermostatsSimulateTemperatureReachedOptions {} diff --git a/src/lib/routes/thermostats/thermostats.ts b/src/lib/routes/thermostats/thermostats.ts index 80cbd99c..93d7d678 100644 --- a/src/lib/routes/thermostats/thermostats.ts +++ b/src/lib/routes/thermostats/thermostats.ts @@ -44,14 +44,7 @@ import { SeamHttpThermostatsSimulate } from './simulate/index.js' * Client for the Seam API /thermostats routes. */ export class SeamHttpThermostats { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -568,9 +561,6 @@ export class SeamHttpThermostats { } } -/** - * Parameters for `SeamHttpThermostats.activateClimatePreset`. - */ export type ThermostatsActivateClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to activate. @@ -584,33 +574,22 @@ export type ThermostatsActivateClimatePresetParameters = { } /** - * Response from `SeamHttpThermostats.activateClimatePreset`. - * * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ export type ThermostatsActivateClimatePresetResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.activateClimatePreset`. - */ export type ThermostatsActivateClimatePresetRequest = SeamHttpRequest< ThermostatsActivateClimatePresetResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.activateClimatePreset`. - */ export type ThermostatsActivateClimatePresetOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.cool`. - */ export type ThermostatsCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. @@ -627,31 +606,20 @@ export type ThermostatsCoolParameters = { } /** - * Response from `SeamHttpThermostats.cool`. - * * @deprecated Use ThermostatsCoolRequest instead. */ export type ThermostatsCoolResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.cool`. - */ export type ThermostatsCoolRequest = SeamHttpRequest< ThermostatsCoolResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.cool`. - */ export type ThermostatsCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.createClimatePreset`. - */ export type ThermostatsCreateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). @@ -724,28 +692,17 @@ export type ThermostatsCreateClimatePresetParameters = { } /** - * Response from `SeamHttpThermostats.createClimatePreset`. - * * @deprecated Use ThermostatsCreateClimatePresetRequest instead. */ export type ThermostatsCreateClimatePresetResponse = void -/** - * Request returned by `SeamHttpThermostats.createClimatePreset`. - */ export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostats.createClimatePreset`. - */ export interface ThermostatsCreateClimatePresetOptions {} -/** - * Parameters for `SeamHttpThermostats.deleteClimatePreset`. - */ export type ThermostatsDeleteClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to delete. @@ -759,28 +716,17 @@ export type ThermostatsDeleteClimatePresetParameters = { } /** - * Response from `SeamHttpThermostats.deleteClimatePreset`. - * * @deprecated Use ThermostatsDeleteClimatePresetRequest instead. */ export type ThermostatsDeleteClimatePresetResponse = void -/** - * Request returned by `SeamHttpThermostats.deleteClimatePreset`. - */ export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostats.deleteClimatePreset`. - */ export interface ThermostatsDeleteClimatePresetOptions {} -/** - * Parameters for `SeamHttpThermostats.heat`. - */ export type ThermostatsHeatParameters = { /** * ID of the thermostat device that you want to set to heat mode. @@ -798,31 +744,20 @@ export type ThermostatsHeatParameters = { } /** - * Response from `SeamHttpThermostats.heat`. - * * @deprecated Use ThermostatsHeatRequest instead. */ export type ThermostatsHeatResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.heat`. - */ export type ThermostatsHeatRequest = SeamHttpRequest< ThermostatsHeatResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.heat`. - */ export type ThermostatsHeatOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.heatCool`. - */ export type ThermostatsHeatCoolParameters = { /** * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. @@ -848,31 +783,20 @@ export type ThermostatsHeatCoolParameters = { } /** - * Response from `SeamHttpThermostats.heatCool`. - * * @deprecated Use ThermostatsHeatCoolRequest instead. */ export type ThermostatsHeatCoolResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.heatCool`. - */ export type ThermostatsHeatCoolRequest = SeamHttpRequest< ThermostatsHeatCoolResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.heatCool`. - */ export type ThermostatsHeatCoolOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.list`. - */ export type ThermostatsListParameters = { /** * ID of the Connect Webview for which you want to list devices. @@ -924,28 +848,17 @@ export type ThermostatsListParameters = { } /** - * Response from `SeamHttpThermostats.list`. - * * @deprecated Use ThermostatsListRequest instead. */ export type ThermostatsListResponse = { devices: Array } -/** - * Request returned by `SeamHttpThermostats.list`. - */ export type ThermostatsListRequest = SeamHttpRequest< ThermostatsListResponse, 'devices' > -/** - * Options for `SeamHttpThermostats.list`. - */ export interface ThermostatsListOptions {} -/** - * Parameters for `SeamHttpThermostats.off`. - */ export type ThermostatsOffParameters = { /** * ID of the thermostat device that you want to set to off mode. @@ -954,31 +867,20 @@ export type ThermostatsOffParameters = { } /** - * Response from `SeamHttpThermostats.off`. - * * @deprecated Use ThermostatsOffRequest instead. */ export type ThermostatsOffResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.off`. - */ export type ThermostatsOffRequest = SeamHttpRequest< ThermostatsOffResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.off`. - */ export type ThermostatsOffOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.setFallbackClimatePreset`. - */ export type ThermostatsSetFallbackClimatePresetParameters = { /** * Climate preset key of the climate preset that you want to set as the fallback climate preset. @@ -992,28 +894,17 @@ export type ThermostatsSetFallbackClimatePresetParameters = { } /** - * Response from `SeamHttpThermostats.setFallbackClimatePreset`. - * * @deprecated Use ThermostatsSetFallbackClimatePresetRequest instead. */ export type ThermostatsSetFallbackClimatePresetResponse = void -/** - * Request returned by `SeamHttpThermostats.setFallbackClimatePreset`. - */ export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostats.setFallbackClimatePreset`. - */ export interface ThermostatsSetFallbackClimatePresetOptions {} -/** - * Parameters for `SeamHttpThermostats.setFanMode`. - */ export type ThermostatsSetFanModeParameters = { /** * ID of the thermostat device for which you want to set the fan mode. @@ -1033,31 +924,20 @@ export type ThermostatsSetFanModeParameters = { } /** - * Response from `SeamHttpThermostats.setFanMode`. - * * @deprecated Use ThermostatsSetFanModeRequest instead. */ export type ThermostatsSetFanModeResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.setFanMode`. - */ export type ThermostatsSetFanModeRequest = SeamHttpRequest< ThermostatsSetFanModeResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.setFanMode`. - */ export type ThermostatsSetFanModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.setHvacMode`. - */ export type ThermostatsSetHvacModeParameters = { /** * ID of the thermostat device for which you want to set the HVAC mode. @@ -1085,31 +965,20 @@ export type ThermostatsSetHvacModeParameters = { } /** - * Response from `SeamHttpThermostats.setHvacMode`. - * * @deprecated Use ThermostatsSetHvacModeRequest instead. */ export type ThermostatsSetHvacModeResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.setHvacMode`. - */ export type ThermostatsSetHvacModeRequest = SeamHttpRequest< ThermostatsSetHvacModeResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.setHvacMode`. - */ export type ThermostatsSetHvacModeOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpThermostats.setTemperatureThreshold`. - */ export type ThermostatsSetTemperatureThresholdParameters = { /** * ID of the thermostat device for which you want to set a temperature threshold. @@ -1135,28 +1004,17 @@ export type ThermostatsSetTemperatureThresholdParameters = { } /** - * Response from `SeamHttpThermostats.setTemperatureThreshold`. - * * @deprecated Use ThermostatsSetTemperatureThresholdRequest instead. */ export type ThermostatsSetTemperatureThresholdResponse = void -/** - * Request returned by `SeamHttpThermostats.setTemperatureThreshold`. - */ export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostats.setTemperatureThreshold`. - */ export interface ThermostatsSetTemperatureThresholdOptions {} -/** - * Parameters for `SeamHttpThermostats.updateClimatePreset`. - */ export type ThermostatsUpdateClimatePresetParameters = { /** * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). @@ -1229,28 +1087,17 @@ export type ThermostatsUpdateClimatePresetParameters = { } /** - * Response from `SeamHttpThermostats.updateClimatePreset`. - * * @deprecated Use ThermostatsUpdateClimatePresetRequest instead. */ export type ThermostatsUpdateClimatePresetResponse = void -/** - * Request returned by `SeamHttpThermostats.updateClimatePreset`. - */ export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpThermostats.updateClimatePreset`. - */ export interface ThermostatsUpdateClimatePresetOptions {} -/** - * Parameters for `SeamHttpThermostats.updateWeeklyProgram`. - */ export type ThermostatsUpdateWeeklyProgramParameters = { /** * ID of the thermostat device for which you want to update the weekly program. @@ -1288,25 +1135,17 @@ export type ThermostatsUpdateWeeklyProgramParameters = { } /** - * Response from `SeamHttpThermostats.updateWeeklyProgram`. - * * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ export type ThermostatsUpdateWeeklyProgramResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpThermostats.updateWeeklyProgram`. - */ export type ThermostatsUpdateWeeklyProgramRequest = SeamHttpRequest< ThermostatsUpdateWeeklyProgramResponse, 'action_attempt' > -/** - * Options for `SeamHttpThermostats.updateWeeklyProgram`. - */ export type ThermostatsUpdateWeeklyProgramOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' diff --git a/src/lib/routes/user-identities/unmanaged/unmanaged.ts b/src/lib/routes/user-identities/unmanaged/unmanaged.ts index 983be9bd..c627c073 100644 --- a/src/lib/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/routes/user-identities/unmanaged/unmanaged.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /user_identities/unmanaged routes. */ export class SeamHttpUserIdentitiesUnmanaged { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -275,9 +268,6 @@ export class SeamHttpUserIdentitiesUnmanaged { } } -/** - * Parameters for `SeamHttpUserIdentitiesUnmanaged.get`. - */ export type UserIdentitiesUnmanagedGetParameters = { /** * ID of the unmanaged user identity that you want to get. @@ -286,30 +276,19 @@ export type UserIdentitiesUnmanagedGetParameters = { } /** - * Response from `SeamHttpUserIdentitiesUnmanaged.get`. - * * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ export type UserIdentitiesUnmanagedGetResponse = { user_identity: UnmanagedUserIdentity } -/** - * Request returned by `SeamHttpUserIdentitiesUnmanaged.get`. - */ export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< UserIdentitiesUnmanagedGetResponse, 'user_identity' > -/** - * Options for `SeamHttpUserIdentitiesUnmanaged.get`. - */ export interface UserIdentitiesUnmanagedGetOptions {} -/** - * Parameters for `SeamHttpUserIdentitiesUnmanaged.list`. - */ export type UserIdentitiesUnmanagedListParameters = { /** * Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. @@ -330,30 +309,19 @@ export type UserIdentitiesUnmanagedListParameters = { } /** - * Response from `SeamHttpUserIdentitiesUnmanaged.list`. - * * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ export type UserIdentitiesUnmanagedListResponse = { user_identities: Array } -/** - * Request returned by `SeamHttpUserIdentitiesUnmanaged.list`. - */ export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< UserIdentitiesUnmanagedListResponse, 'user_identities' > -/** - * Options for `SeamHttpUserIdentitiesUnmanaged.list`. - */ export interface UserIdentitiesUnmanagedListOptions {} -/** - * Parameters for `SeamHttpUserIdentitiesUnmanaged.update`. - */ export type UserIdentitiesUnmanagedUpdateParameters = { /** * Must be set to true to convert the unmanaged user identity to managed. @@ -372,21 +340,13 @@ export type UserIdentitiesUnmanagedUpdateParameters = { } /** - * Response from `SeamHttpUserIdentitiesUnmanaged.update`. - * * @deprecated Use UserIdentitiesUnmanagedUpdateRequest instead. */ export type UserIdentitiesUnmanagedUpdateResponse = void -/** - * Request returned by `SeamHttpUserIdentitiesUnmanaged.update`. - */ export type UserIdentitiesUnmanagedUpdateRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpUserIdentitiesUnmanaged.update`. - */ export interface UserIdentitiesUnmanagedUpdateOptions {} diff --git a/src/lib/routes/user-identities/user-identities.ts b/src/lib/routes/user-identities/user-identities.ts index 68ef522b..d196c483 100644 --- a/src/lib/routes/user-identities/user-identities.ts +++ b/src/lib/routes/user-identities/user-identities.ts @@ -48,14 +48,7 @@ import { SeamHttpUserIdentitiesUnmanaged } from './unmanaged/index.js' * Client for the Seam API /user_identities routes. */ export class SeamHttpUserIdentities { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -531,9 +524,6 @@ export class SeamHttpUserIdentities { } } -/** - * Parameters for `SeamHttpUserIdentities.addAcsUser`. - */ export type UserIdentitiesAddAcsUserParameters = { /** * ID of the access system user that you want to add to the user identity. @@ -551,25 +541,14 @@ export type UserIdentitiesAddAcsUserParameters = { } /** - * Response from `SeamHttpUserIdentities.addAcsUser`. - * * @deprecated Use UserIdentitiesAddAcsUserRequest instead. */ export type UserIdentitiesAddAcsUserResponse = void -/** - * Request returned by `SeamHttpUserIdentities.addAcsUser`. - */ export type UserIdentitiesAddAcsUserRequest = SeamHttpRequest -/** - * Options for `SeamHttpUserIdentities.addAcsUser`. - */ export interface UserIdentitiesAddAcsUserOptions {} -/** - * Parameters for `SeamHttpUserIdentities.create`. - */ export type UserIdentitiesCreateParameters = { /** * List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. @@ -594,28 +573,17 @@ export type UserIdentitiesCreateParameters = { } /** - * Response from `SeamHttpUserIdentities.create`. - * * @deprecated Use UserIdentitiesCreateRequest instead. */ export type UserIdentitiesCreateResponse = { user_identity: UserIdentity } -/** - * Request returned by `SeamHttpUserIdentities.create`. - */ export type UserIdentitiesCreateRequest = SeamHttpRequest< UserIdentitiesCreateResponse, 'user_identity' > -/** - * Options for `SeamHttpUserIdentities.create`. - */ export interface UserIdentitiesCreateOptions {} -/** - * Parameters for `SeamHttpUserIdentities.delete`. - */ export type UserIdentitiesDeleteParameters = { /** * ID of the user identity that you want to delete. @@ -624,25 +592,14 @@ export type UserIdentitiesDeleteParameters = { } /** - * Response from `SeamHttpUserIdentities.delete`. - * * @deprecated Use UserIdentitiesDeleteRequest instead. */ export type UserIdentitiesDeleteResponse = void -/** - * Request returned by `SeamHttpUserIdentities.delete`. - */ export type UserIdentitiesDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpUserIdentities.delete`. - */ export interface UserIdentitiesDeleteOptions {} -/** - * Parameters for `SeamHttpUserIdentities.generateInstantKey`. - */ export type UserIdentitiesGenerateInstantKeyParameters = { customization_profile_id?: string | undefined /** @@ -656,30 +613,19 @@ export type UserIdentitiesGenerateInstantKeyParameters = { } /** - * Response from `SeamHttpUserIdentities.generateInstantKey`. - * * @deprecated Use UserIdentitiesGenerateInstantKeyRequest instead. */ export type UserIdentitiesGenerateInstantKeyResponse = { instant_key: InstantKey } -/** - * Request returned by `SeamHttpUserIdentities.generateInstantKey`. - */ export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< UserIdentitiesGenerateInstantKeyResponse, 'instant_key' > -/** - * Options for `SeamHttpUserIdentities.generateInstantKey`. - */ export interface UserIdentitiesGenerateInstantKeyOptions {} -/** - * Parameters for `SeamHttpUserIdentities.get`. - */ export type UserIdentitiesGetParameters = RequireAtLeastOne<{ /** * ID of the user identity that you want to get. @@ -690,28 +636,17 @@ export type UserIdentitiesGetParameters = RequireAtLeastOne<{ }> /** - * Response from `SeamHttpUserIdentities.get`. - * * @deprecated Use UserIdentitiesGetRequest instead. */ export type UserIdentitiesGetResponse = { user_identity: UserIdentity } -/** - * Request returned by `SeamHttpUserIdentities.get`. - */ export type UserIdentitiesGetRequest = SeamHttpRequest< UserIdentitiesGetResponse, 'user_identity' > -/** - * Options for `SeamHttpUserIdentities.get`. - */ export interface UserIdentitiesGetOptions {} -/** - * Parameters for `SeamHttpUserIdentities.grantAccessToDevice`. - */ export type UserIdentitiesGrantAccessToDeviceParameters = { /** * ID of the managed device to which you want to grant access to the user identity. @@ -725,28 +660,17 @@ export type UserIdentitiesGrantAccessToDeviceParameters = { } /** - * Response from `SeamHttpUserIdentities.grantAccessToDevice`. - * * @deprecated Use UserIdentitiesGrantAccessToDeviceRequest instead. */ export type UserIdentitiesGrantAccessToDeviceResponse = void -/** - * Request returned by `SeamHttpUserIdentities.grantAccessToDevice`. - */ export type UserIdentitiesGrantAccessToDeviceRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpUserIdentities.grantAccessToDevice`. - */ export interface UserIdentitiesGrantAccessToDeviceOptions {} -/** - * Parameters for `SeamHttpUserIdentities.list`. - */ export type UserIdentitiesListParameters = { /** * Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. @@ -775,30 +699,19 @@ export type UserIdentitiesListParameters = { } /** - * Response from `SeamHttpUserIdentities.list`. - * * @deprecated Use UserIdentitiesListRequest instead. */ export type UserIdentitiesListResponse = { user_identities: Array } -/** - * Request returned by `SeamHttpUserIdentities.list`. - */ export type UserIdentitiesListRequest = SeamHttpRequest< UserIdentitiesListResponse, 'user_identities' > -/** - * Options for `SeamHttpUserIdentities.list`. - */ export interface UserIdentitiesListOptions {} -/** - * Parameters for `SeamHttpUserIdentities.listAccessibleDevices`. - */ export type UserIdentitiesListAccessibleDevicesParameters = { /** * ID of the user identity for which you want to retrieve all accessible devices. @@ -807,30 +720,19 @@ export type UserIdentitiesListAccessibleDevicesParameters = { } /** - * Response from `SeamHttpUserIdentities.listAccessibleDevices`. - * * @deprecated Use UserIdentitiesListAccessibleDevicesRequest instead. */ export type UserIdentitiesListAccessibleDevicesResponse = { devices: Array } -/** - * Request returned by `SeamHttpUserIdentities.listAccessibleDevices`. - */ export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< UserIdentitiesListAccessibleDevicesResponse, 'devices' > -/** - * Options for `SeamHttpUserIdentities.listAccessibleDevices`. - */ export interface UserIdentitiesListAccessibleDevicesOptions {} -/** - * Parameters for `SeamHttpUserIdentities.listAccessibleEntrances`. - */ export type UserIdentitiesListAccessibleEntrancesParameters = { /** * ID of the user identity for which you want to retrieve all accessible entrances. @@ -839,30 +741,19 @@ export type UserIdentitiesListAccessibleEntrancesParameters = { } /** - * Response from `SeamHttpUserIdentities.listAccessibleEntrances`. - * * @deprecated Use UserIdentitiesListAccessibleEntrancesRequest instead. */ export type UserIdentitiesListAccessibleEntrancesResponse = { acs_entrances: Array } -/** - * Request returned by `SeamHttpUserIdentities.listAccessibleEntrances`. - */ export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< UserIdentitiesListAccessibleEntrancesResponse, 'acs_entrances' > -/** - * Options for `SeamHttpUserIdentities.listAccessibleEntrances`. - */ export interface UserIdentitiesListAccessibleEntrancesOptions {} -/** - * Parameters for `SeamHttpUserIdentities.listAcsSystems`. - */ export type UserIdentitiesListAcsSystemsParameters = { /** * ID of the user identity for which you want to retrieve all access systems. @@ -871,30 +762,19 @@ export type UserIdentitiesListAcsSystemsParameters = { } /** - * Response from `SeamHttpUserIdentities.listAcsSystems`. - * * @deprecated Use UserIdentitiesListAcsSystemsRequest instead. */ export type UserIdentitiesListAcsSystemsResponse = { acs_systems: Array } -/** - * Request returned by `SeamHttpUserIdentities.listAcsSystems`. - */ export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< UserIdentitiesListAcsSystemsResponse, 'acs_systems' > -/** - * Options for `SeamHttpUserIdentities.listAcsSystems`. - */ export interface UserIdentitiesListAcsSystemsOptions {} -/** - * Parameters for `SeamHttpUserIdentities.listAcsUsers`. - */ export type UserIdentitiesListAcsUsersParameters = { /** * ID of the user identity for which you want to retrieve all access system users. @@ -903,28 +783,17 @@ export type UserIdentitiesListAcsUsersParameters = { } /** - * Response from `SeamHttpUserIdentities.listAcsUsers`. - * * @deprecated Use UserIdentitiesListAcsUsersRequest instead. */ export type UserIdentitiesListAcsUsersResponse = { acs_users: Array } -/** - * Request returned by `SeamHttpUserIdentities.listAcsUsers`. - */ export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< UserIdentitiesListAcsUsersResponse, 'acs_users' > -/** - * Options for `SeamHttpUserIdentities.listAcsUsers`. - */ export interface UserIdentitiesListAcsUsersOptions {} -/** - * Parameters for `SeamHttpUserIdentities.removeAcsUser`. - */ export type UserIdentitiesRemoveAcsUserParameters = { /** * ID of the access system user that you want to remove from the user identity.. @@ -938,28 +807,17 @@ export type UserIdentitiesRemoveAcsUserParameters = { } /** - * Response from `SeamHttpUserIdentities.removeAcsUser`. - * * @deprecated Use UserIdentitiesRemoveAcsUserRequest instead. */ export type UserIdentitiesRemoveAcsUserResponse = void -/** - * Request returned by `SeamHttpUserIdentities.removeAcsUser`. - */ export type UserIdentitiesRemoveAcsUserRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpUserIdentities.removeAcsUser`. - */ export interface UserIdentitiesRemoveAcsUserOptions {} -/** - * Parameters for `SeamHttpUserIdentities.revokeAccessToDevice`. - */ export type UserIdentitiesRevokeAccessToDeviceParameters = { /** * ID of the managed device to which you want to revoke access from the user identity. @@ -973,28 +831,17 @@ export type UserIdentitiesRevokeAccessToDeviceParameters = { } /** - * Response from `SeamHttpUserIdentities.revokeAccessToDevice`. - * * @deprecated Use UserIdentitiesRevokeAccessToDeviceRequest instead. */ export type UserIdentitiesRevokeAccessToDeviceResponse = void -/** - * Request returned by `SeamHttpUserIdentities.revokeAccessToDevice`. - */ export type UserIdentitiesRevokeAccessToDeviceRequest = SeamHttpRequest< void, undefined > -/** - * Options for `SeamHttpUserIdentities.revokeAccessToDevice`. - */ export interface UserIdentitiesRevokeAccessToDeviceOptions {} -/** - * Parameters for `SeamHttpUserIdentities.update`. - */ export type UserIdentitiesUpdateParameters = { /** * Unique email address for the user identity. @@ -1020,18 +867,10 @@ export type UserIdentitiesUpdateParameters = { } /** - * Response from `SeamHttpUserIdentities.update`. - * * @deprecated Use UserIdentitiesUpdateRequest instead. */ export type UserIdentitiesUpdateResponse = void -/** - * Request returned by `SeamHttpUserIdentities.update`. - */ export type UserIdentitiesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpUserIdentities.update`. - */ export interface UserIdentitiesUpdateOptions {} diff --git a/src/lib/routes/webhooks/webhooks.ts b/src/lib/routes/webhooks/webhooks.ts index c9dfd3cb..4ea201fd 100644 --- a/src/lib/routes/webhooks/webhooks.ts +++ b/src/lib/routes/webhooks/webhooks.ts @@ -38,14 +38,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /webhooks routes. */ export class SeamHttpWebhooks { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -298,9 +291,6 @@ export class SeamHttpWebhooks { } } -/** - * Parameters for `SeamHttpWebhooks.create`. - */ export type WebhooksCreateParameters = { /** * Types of events that you want the new webhook to receive. @@ -313,28 +303,17 @@ export type WebhooksCreateParameters = { } /** - * Response from `SeamHttpWebhooks.create`. - * * @deprecated Use WebhooksCreateRequest instead. */ export type WebhooksCreateResponse = { webhook: Webhook } -/** - * Request returned by `SeamHttpWebhooks.create`. - */ export type WebhooksCreateRequest = SeamHttpRequest< WebhooksCreateResponse, 'webhook' > -/** - * Options for `SeamHttpWebhooks.create`. - */ export interface WebhooksCreateOptions {} -/** - * Parameters for `SeamHttpWebhooks.delete`. - */ export type WebhooksDeleteParameters = { /** * ID of the webhook that you want to delete. @@ -343,25 +322,14 @@ export type WebhooksDeleteParameters = { } /** - * Response from `SeamHttpWebhooks.delete`. - * * @deprecated Use WebhooksDeleteRequest instead. */ export type WebhooksDeleteResponse = void -/** - * Request returned by `SeamHttpWebhooks.delete`. - */ export type WebhooksDeleteRequest = SeamHttpRequest -/** - * Options for `SeamHttpWebhooks.delete`. - */ export interface WebhooksDeleteOptions {} -/** - * Parameters for `SeamHttpWebhooks.get`. - */ export type WebhooksGetParameters = { /** * ID of the webhook that you want to get. @@ -370,50 +338,28 @@ export type WebhooksGetParameters = { } /** - * Response from `SeamHttpWebhooks.get`. - * * @deprecated Use WebhooksGetRequest instead. */ export type WebhooksGetResponse = { webhook: Webhook } -/** - * Request returned by `SeamHttpWebhooks.get`. - */ export type WebhooksGetRequest = SeamHttpRequest -/** - * Options for `SeamHttpWebhooks.get`. - */ export interface WebhooksGetOptions {} -/** - * Parameters for `SeamHttpWebhooks.list`. - */ export type WebhooksListParameters = {} /** - * Response from `SeamHttpWebhooks.list`. - * * @deprecated Use WebhooksListRequest instead. */ export type WebhooksListResponse = { webhooks: Array } -/** - * Request returned by `SeamHttpWebhooks.list`. - */ export type WebhooksListRequest = SeamHttpRequest< WebhooksListResponse, 'webhooks' > -/** - * Options for `SeamHttpWebhooks.list`. - */ export interface WebhooksListOptions {} -/** - * Parameters for `SeamHttpWebhooks.update`. - */ export type WebhooksUpdateParameters = { /** * Types of events that you want the webhook to receive. @@ -427,18 +373,10 @@ export type WebhooksUpdateParameters = { } /** - * Response from `SeamHttpWebhooks.update`. - * * @deprecated Use WebhooksUpdateRequest instead. */ export type WebhooksUpdateResponse = void -/** - * Request returned by `SeamHttpWebhooks.update`. - */ export type WebhooksUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpWebhooks.update`. - */ export interface WebhooksUpdateOptions {} diff --git a/src/lib/routes/workspaces/workspaces.ts b/src/lib/routes/workspaces/workspaces.ts index 75cd0b1e..a68a8f71 100644 --- a/src/lib/routes/workspaces/workspaces.ts +++ b/src/lib/routes/workspaces/workspaces.ts @@ -40,14 +40,7 @@ import { SeamPaginator } from 'lib/seam-paginator.js' * Client for the Seam API /workspaces routes. */ export class SeamHttpWorkspaces { - /** - * The client used to make HTTP requests to the Seam API. - */ client: Client - - /** - * Default request options used for requests made by this client. - */ readonly defaults: Required constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { @@ -304,9 +297,6 @@ export class SeamHttpWorkspaces { } } -/** - * Parameters for `SeamHttpWorkspaces.create`. - */ export type WorkspacesCreateParameters = { /** * Company name for the new workspace. @@ -373,106 +363,62 @@ export type WorkspacesCreateParameters = { } /** - * Response from `SeamHttpWorkspaces.create`. - * * @deprecated Use WorkspacesCreateRequest instead. */ export type WorkspacesCreateResponse = { workspace: Workspace } -/** - * Request returned by `SeamHttpWorkspaces.create`. - */ export type WorkspacesCreateRequest = SeamHttpRequest< WorkspacesCreateResponse, 'workspace' > -/** - * Options for `SeamHttpWorkspaces.create`. - */ export interface WorkspacesCreateOptions {} -/** - * Parameters for `SeamHttpWorkspaces.get`. - */ export type WorkspacesGetParameters = {} /** - * Response from `SeamHttpWorkspaces.get`. - * * @deprecated Use WorkspacesGetRequest instead. */ export type WorkspacesGetResponse = { workspace: Workspace } -/** - * Request returned by `SeamHttpWorkspaces.get`. - */ export type WorkspacesGetRequest = SeamHttpRequest< WorkspacesGetResponse, 'workspace' > -/** - * Options for `SeamHttpWorkspaces.get`. - */ export interface WorkspacesGetOptions {} -/** - * Parameters for `SeamHttpWorkspaces.list`. - */ export type WorkspacesListParameters = {} /** - * Response from `SeamHttpWorkspaces.list`. - * * @deprecated Use WorkspacesListRequest instead. */ export type WorkspacesListResponse = { workspaces: Array } -/** - * Request returned by `SeamHttpWorkspaces.list`. - */ export type WorkspacesListRequest = SeamHttpRequest< WorkspacesListResponse, 'workspaces' > -/** - * Options for `SeamHttpWorkspaces.list`. - */ export interface WorkspacesListOptions {} -/** - * Parameters for `SeamHttpWorkspaces.resetSandbox`. - */ export type WorkspacesResetSandboxParameters = {} /** - * Response from `SeamHttpWorkspaces.resetSandbox`. - * * @deprecated Use WorkspacesResetSandboxRequest instead. */ export type WorkspacesResetSandboxResponse = { action_attempt: ActionAttempt } -/** - * Request returned by `SeamHttpWorkspaces.resetSandbox`. - */ export type WorkspacesResetSandboxRequest = SeamHttpRequest< WorkspacesResetSandboxResponse, 'action_attempt' > -/** - * Options for `SeamHttpWorkspaces.resetSandbox`. - */ export type WorkspacesResetSandboxOptions = Pick< SeamHttpRequestOptions, 'waitForActionAttempt' > -/** - * Parameters for `SeamHttpWorkspaces.update`. - */ export type WorkspacesUpdateParameters = { /** * Connect partner name for the workspace. @@ -520,18 +466,10 @@ export type WorkspacesUpdateParameters = { } /** - * Response from `SeamHttpWorkspaces.update`. - * * @deprecated Use WorkspacesUpdateRequest instead. */ export type WorkspacesUpdateResponse = void -/** - * Request returned by `SeamHttpWorkspaces.update`. - */ export type WorkspacesUpdateRequest = SeamHttpRequest -/** - * Options for `SeamHttpWorkspaces.update`. - */ export interface WorkspacesUpdateOptions {} diff --git a/src/lib/seam-http-error.ts b/src/lib/seam-http-error.ts index d2c0fb12..e16f3c2e 100644 --- a/src/lib/seam-http-error.ts +++ b/src/lib/seam-http-error.ts @@ -9,9 +9,6 @@ export class SeamHttpApiError extends Error { */ code: string - /** - * HTTP status code of the error response. - */ statusCode: number /** @@ -49,14 +46,7 @@ export const isSeamHttpApiError = ( * Error thrown when the Seam API returns a 401 Unauthorized error response. */ export class SeamHttpUnauthorizedError extends SeamHttpApiError { - /** - * Error type returned by the Seam API, always `unauthorized`. - */ override code: 'unauthorized' - - /** - * HTTP status code of the error response, always 401. - */ override statusCode: 401 constructor(requestId: string) { @@ -83,9 +73,6 @@ export const isSeamHttpUnauthorizedError = ( * Error thrown when the Seam API returns an `invalid_input` error response. */ export class SeamHttpInvalidInputError extends SeamHttpApiError { - /** - * Error type returned by the Seam API, always `invalid_input`. - */ override code: 'invalid_input' readonly #validationErrors: NonNullable diff --git a/src/lib/seam-http-request.ts b/src/lib/seam-http-request.ts index 0c00926f..321aa871 100644 --- a/src/lib/seam-http-request.ts +++ b/src/lib/seam-http-request.ts @@ -44,9 +44,6 @@ export class SeamHttpRequest< > implements Promise< TResponseKey extends keyof TResponse ? TResponse[TResponseKey] : undefined > { - /** - * String tag used by `Object.prototype.toString`, always `SeamHttpRequest`. - */ readonly [Symbol.toStringTag]: string = 'SeamHttpRequest' readonly #parent: SeamHttpRequestParent @@ -89,32 +86,20 @@ export class SeamHttpRequest< return new URL(`${origin}${path}`) } - /** - * The request pathname, e.g., `/devices/get`. - */ public get pathname(): string { return this.#config.pathname.startsWith('/') ? this.#config.pathname : `/${this.#config.pathname}` } - /** - * The HTTP request method. - */ public get method(): Method { return this.#config.method } - /** - * The query parameters sent with the request, if any. - */ public get params(): undefined | Record { return this.#config.params } - /** - * The body sent with the request, if any. - */ public get body(): unknown { return this.#config.body } @@ -178,10 +163,6 @@ export class SeamHttpRequest< return response.data as unknown as TResponse } - /** - * Executes the request and resolves with the response data. - * Enables awaiting a SeamHttpRequest like a Promise. - */ async then< TResult1 = TResponseKey extends keyof TResponse ? TResponse[TResponseKey] @@ -204,10 +185,6 @@ export class SeamHttpRequest< return await this.execute().then(onfulfilled, onrejected) } - /** - * Executes the request and handles any rejection with `onrejected`. - * Enables awaiting a SeamHttpRequest like a Promise. - */ async catch( onrejected?: ((reason: unknown) => TResult | PromiseLike) | null | undefined, @@ -220,10 +197,6 @@ export class SeamHttpRequest< return await this.execute().catch(onrejected) } - /** - * Executes the request and calls `onfinally` once the request settles. - * Enables awaiting a SeamHttpRequest like a Promise. - */ async finally( onfinally?: (() => void) | null | undefined, ): Promise< diff --git a/src/lib/seam-paginator.ts b/src/lib/seam-paginator.ts index 8082dc83..8d21d326 100644 --- a/src/lib/seam-paginator.ts +++ b/src/lib/seam-paginator.ts @@ -15,19 +15,8 @@ declare const $brand: unique symbol export type SeamPageCursor = string & { [$brand]: 'SeamPageCursor' } interface Pagination { - /** - * Indicates whether there is another page of results after this one. - */ readonly hasNextPage: boolean - - /** - * Cursor to fetch the next page of results, or null if there is no next page. - */ readonly nextPageCursor: SeamPageCursor | null - - /** - * URL to fetch the next page of results, or null if there is no next page. - */ readonly nextPageUrl: string | null }