@seamapi/http 1.35.1 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/connect.cjs +6404 -1229
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +889 -2
- package/lib/seam/connect/options.d.ts +2 -1
- package/lib/seam/connect/options.js.map +1 -1
- package/lib/seam/connect/parse-options.d.ts +1 -1
- package/lib/seam/connect/parse-options.js +2 -0
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/routes/acs/access-groups/access-groups.d.ts +2 -0
- package/lib/seam/connect/routes/acs/access-groups/access-groups.js +4 -0
- package/lib/seam/connect/routes/acs/access-groups/access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs/access-groups/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/access-groups/index.js +1 -0
- package/lib/seam/connect/routes/acs/access-groups/index.js.map +1 -1
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.d.ts +29 -0
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.js +112 -0
- package/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/acs/acs.d.ts +4 -0
- package/lib/seam/connect/routes/acs/acs.js +8 -0
- package/lib/seam/connect/routes/acs/acs.js.map +1 -1
- package/lib/seam/connect/routes/acs/credential-pools/credential-pools.d.ts +25 -0
- package/lib/seam/connect/routes/acs/credential-pools/credential-pools.js +101 -0
- package/lib/seam/connect/routes/acs/credential-pools/credential-pools.js.map +1 -0
- package/lib/seam/connect/routes/acs/credential-pools/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/credential-pools/index.js +6 -0
- package/lib/seam/connect/routes/acs/credential-pools/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.d.ts +25 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.js +101 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.js.map +1 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/index.js +6 -0
- package/lib/seam/connect/routes/acs/credential-provisioning-automations/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/credentials/credentials.d.ts +6 -0
- package/lib/seam/connect/routes/acs/credentials/credentials.js +15 -0
- package/lib/seam/connect/routes/acs/credentials/credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs/credentials/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/credentials/index.js +1 -0
- package/lib/seam/connect/routes/acs/credentials/index.js.map +1 -1
- package/lib/seam/connect/routes/acs/credentials/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/credentials/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/acs/credentials/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.d.ts +29 -0
- package/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.js +112 -0
- package/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/acs/index.d.ts +2 -0
- package/lib/seam/connect/routes/acs/index.js +2 -0
- package/lib/seam/connect/routes/acs/index.js.map +1 -1
- package/lib/seam/connect/routes/acs/users/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/users/index.js +1 -0
- package/lib/seam/connect/routes/acs/users/index.js.map +1 -1
- package/lib/seam/connect/routes/acs/users/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/users/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/acs/users/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.d.ts +29 -0
- package/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.js +112 -0
- package/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/acs/users/users.d.ts +2 -0
- package/lib/seam/connect/routes/acs/users/users.js +4 -0
- package/lib/seam/connect/routes/acs/users/users.js.map +1 -1
- package/lib/seam/connect/routes/bridges/bridges.d.ts +29 -0
- package/lib/seam/connect/routes/bridges/bridges.js +112 -0
- package/lib/seam/connect/routes/bridges/bridges.js.map +1 -0
- package/lib/seam/connect/routes/bridges/index.d.ts +1 -0
- package/lib/seam/connect/routes/bridges/index.js +6 -0
- package/lib/seam/connect/routes/bridges/index.js.map +1 -0
- package/lib/seam/connect/routes/devices/devices.d.ts +4 -0
- package/lib/seam/connect/routes/devices/devices.js +11 -0
- package/lib/seam/connect/routes/devices/devices.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +8 -0
- package/lib/seam/connect/routes/index.js +8 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/locks/index.d.ts +1 -0
- package/lib/seam/connect/routes/locks/index.js +1 -0
- package/lib/seam/connect/routes/locks/index.js.map +1 -1
- package/lib/seam/connect/routes/locks/locks.d.ts +2 -0
- package/lib/seam/connect/routes/locks/locks.js +4 -0
- package/lib/seam/connect/routes/locks/locks.js.map +1 -1
- package/lib/seam/connect/routes/locks/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/locks/simulate/index.js +6 -0
- package/lib/seam/connect/routes/locks/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/locks/simulate/simulate.d.ts +29 -0
- package/lib/seam/connect/routes/locks/simulate/simulate.js +114 -0
- package/lib/seam/connect/routes/locks/simulate/simulate.js.map +1 -0
- package/lib/seam/connect/routes/networks/index.d.ts +1 -0
- package/lib/seam/connect/routes/networks/index.js +6 -0
- package/lib/seam/connect/routes/networks/index.js.map +1 -0
- package/lib/seam/connect/routes/networks/networks.d.ts +29 -0
- package/lib/seam/connect/routes/networks/networks.js +112 -0
- package/lib/seam/connect/routes/networks/networks.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/bridge/index.js +6 -0
- package/lib/seam/connect/routes/seam/bridge/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.d.ts +41 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.js +145 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.js +6 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.d.ts +25 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.js +101 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.js +6 -0
- package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/index.d.ts +3 -0
- package/lib/seam/connect/routes/seam/bridge/v1/index.js +8 -0
- package/lib/seam/connect/routes/seam/bridge/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/bridge/v1/v1.d.ts +23 -0
- package/lib/seam/connect/routes/seam/bridge/v1/v1.js +97 -0
- package/lib/seam/connect/routes/seam/bridge/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/index.d.ts +4 -0
- package/lib/seam/connect/routes/seam/index.js +9 -0
- package/lib/seam/connect/routes/seam/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/instant-key/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/instant-key/index.js +6 -0
- package/lib/seam/connect/routes/seam/instant-key/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.d.ts +25 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.js +101 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.js.map +1 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.js +6 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/index.d.ts +2 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/index.js +7 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/v1.d.ts +21 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/v1.js +93 -0
- package/lib/seam/connect/routes/seam/instant-key/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/index.js +6 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.d.ts +21 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.js +93 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.d.ts +25 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.js +101 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.js +6 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.d.ts +2 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.js +7 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.d.ts +3 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.js +8 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.js +6 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.d.ts +25 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.js +101 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.js.map +1 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.d.ts +23 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.js +97 -0
- package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/partner/index.js +6 -0
- package/lib/seam/connect/routes/seam/partner/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.d.ts +21 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.js +93 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.d.ts +2 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.js +7 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.js +6 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.d.ts +25 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.js +101 -0
- package/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/index.d.ts +3 -0
- package/lib/seam/connect/routes/seam/partner/v1/index.js +8 -0
- package/lib/seam/connect/routes/seam/partner/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/index.js +6 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/resources.d.ts +25 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/resources.js +101 -0
- package/lib/seam/connect/routes/seam/partner/v1/resources/resources.js.map +1 -0
- package/lib/seam/connect/routes/seam/partner/v1/v1.d.ts +23 -0
- package/lib/seam/connect/routes/seam/partner/v1/v1.js +97 -0
- package/lib/seam/connect/routes/seam/partner/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +293 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js +1820 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -0
- package/lib/seam/connect/routes/seam-http.d.ts +12 -0
- package/lib/seam/connect/routes/seam-http.js +24 -0
- package/lib/seam/connect/routes/seam-http.js.map +1 -1
- package/lib/seam/connect/routes/thermostats/thermostats.d.ts +4 -0
- package/lib/seam/connect/routes/thermostats/thermostats.js +11 -0
- package/lib/seam/connect/routes/thermostats/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/unstable-access-grants/index.d.ts +1 -0
- package/lib/seam/connect/routes/unstable-access-grants/index.js +6 -0
- package/lib/seam/connect/routes/unstable-access-grants/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.d.ts +37 -0
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js +134 -0
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js.map +1 -0
- package/lib/seam/connect/routes/unstable-access-methods/index.d.ts +1 -0
- package/lib/seam/connect/routes/unstable-access-methods/index.js +6 -0
- package/lib/seam/connect/routes/unstable-access-methods/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.d.ts +33 -0
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js +123 -0
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js.map +1 -0
- package/lib/seam/connect/routes/unstable-locations/index.d.ts +1 -0
- package/lib/seam/connect/routes/unstable-locations/index.js +6 -0
- package/lib/seam/connect/routes/unstable-locations/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.d.ts +57 -0
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.js +189 -0
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.d.ts +37 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.js +134 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/index.d.ts +1 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/index.js +6 -0
- package/lib/seam/connect/routes/unstable-partner/building-blocks/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/index.d.ts +3 -0
- package/lib/seam/connect/routes/unstable-partner/index.js +8 -0
- package/lib/seam/connect/routes/unstable-partner/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/resources/index.d.ts +1 -0
- package/lib/seam/connect/routes/unstable-partner/resources/index.js +6 -0
- package/lib/seam/connect/routes/unstable-partner/resources/index.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/resources/resources.d.ts +25 -0
- package/lib/seam/connect/routes/unstable-partner/resources/resources.js +101 -0
- package/lib/seam/connect/routes/unstable-partner/resources/resources.js.map +1 -0
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.d.ts +23 -0
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.js +97 -0
- package/lib/seam/connect/routes/unstable-partner/unstable-partner.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/options.ts +2 -1
- package/src/lib/seam/connect/parse-options.ts +2 -0
- package/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts +9 -0
- package/src/lib/seam/connect/routes/acs/access-groups/index.ts +1 -0
- package/src/lib/seam/connect/routes/acs/access-groups/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts +226 -0
- package/src/lib/seam/connect/routes/acs/acs.ts +13 -0
- package/src/lib/seam/connect/routes/acs/credential-pools/credential-pools.ts +195 -0
- package/src/lib/seam/connect/routes/acs/credential-pools/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.ts +201 -0
- package/src/lib/seam/connect/routes/acs/credential-provisioning-automations/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/credentials/credentials.ts +37 -0
- package/src/lib/seam/connect/routes/acs/credentials/index.ts +1 -0
- package/src/lib/seam/connect/routes/acs/credentials/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.ts +227 -0
- package/src/lib/seam/connect/routes/acs/index.ts +2 -0
- package/src/lib/seam/connect/routes/acs/users/index.ts +1 -0
- package/src/lib/seam/connect/routes/acs/users/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.ts +220 -0
- package/src/lib/seam/connect/routes/acs/users/users.ts +6 -0
- package/src/lib/seam/connect/routes/bridges/bridges.ts +218 -0
- package/src/lib/seam/connect/routes/bridges/index.ts +6 -0
- package/src/lib/seam/connect/routes/devices/devices.ts +22 -0
- package/src/lib/seam/connect/routes/index.ts +8 -0
- package/src/lib/seam/connect/routes/locks/index.ts +1 -0
- package/src/lib/seam/connect/routes/locks/locks.ts +6 -0
- package/src/lib/seam/connect/routes/locks/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/locks/simulate/simulate.ts +233 -0
- package/src/lib/seam/connect/routes/networks/index.ts +6 -0
- package/src/lib/seam/connect/routes/networks/networks.ts +218 -0
- package/src/lib/seam/connect/routes/seam/bridge/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.ts +325 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.ts +201 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/index.ts +8 -0
- package/src/lib/seam/connect/routes/seam/bridge/v1/v1.ts +184 -0
- package/src/lib/seam/connect/routes/seam/index.ts +9 -0
- package/src/lib/seam/connect/routes/seam/instant-key/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.ts +204 -0
- package/src/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/instant-key/v1/index.ts +7 -0
- package/src/lib/seam/connect/routes/seam/instant-key/v1/v1.ts +176 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.ts +176 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.ts +201 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.ts +7 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/index.ts +8 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.ts +201 -0
- package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.ts +181 -0
- package/src/lib/seam/connect/routes/seam/partner/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts +179 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.ts +7 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts +201 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/index.ts +8 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/resources/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/resources/resources.ts +195 -0
- package/src/lib/seam/connect/routes/seam/partner/v1/v1.ts +181 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +2764 -0
- package/src/lib/seam/connect/routes/seam-http.ts +30 -0
- package/src/lib/seam/connect/routes/thermostats/thermostats.ts +24 -0
- package/src/lib/seam/connect/routes/unstable-access-grants/index.ts +6 -0
- package/src/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.ts +270 -0
- package/src/lib/seam/connect/routes/unstable-access-methods/index.ts +6 -0
- package/src/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.ts +245 -0
- package/src/lib/seam/connect/routes/unstable-locations/index.ts +6 -0
- package/src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts +399 -0
- package/src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts +292 -0
- package/src/lib/seam/connect/routes/unstable-partner/building-blocks/index.ts +6 -0
- package/src/lib/seam/connect/routes/unstable-partner/index.ts +8 -0
- package/src/lib/seam/connect/routes/unstable-partner/resources/index.ts +6 -0
- package/src/lib/seam/connect/routes/unstable-partner/resources/resources.ts +198 -0
- package/src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts +184 -0
- package/src/lib/version.ts +1 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
|
+
|
|
8
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
9
|
+
import {
|
|
10
|
+
getAuthHeadersForClientSessionToken,
|
|
11
|
+
warnOnInsecureuserIdentifierKey,
|
|
12
|
+
} from 'lib/seam/connect/auth.js'
|
|
13
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
14
|
+
import {
|
|
15
|
+
isSeamHttpOptionsWithApiKey,
|
|
16
|
+
isSeamHttpOptionsWithClient,
|
|
17
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
18
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
19
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
20
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
21
|
+
SeamHttpInvalidOptionsError,
|
|
22
|
+
type SeamHttpOptions,
|
|
23
|
+
type SeamHttpOptionsWithApiKey,
|
|
24
|
+
type SeamHttpOptionsWithClient,
|
|
25
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
26
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
27
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
28
|
+
type SeamHttpRequestOptions,
|
|
29
|
+
} from 'lib/seam/connect/options.js'
|
|
30
|
+
import {
|
|
31
|
+
limitToSeamHttpRequestOptions,
|
|
32
|
+
parseOptions,
|
|
33
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
35
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
36
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
37
|
+
import type { SetNonNullable } from 'lib/types.js'
|
|
38
|
+
|
|
39
|
+
export class SeamHttpNetworks {
|
|
40
|
+
client: Client
|
|
41
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
43
|
+
static ltsVersion = seamApiLtsVersion
|
|
44
|
+
|
|
45
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
46
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
47
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
53
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static fromClient(
|
|
57
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
58
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
59
|
+
): SeamHttpNetworks {
|
|
60
|
+
const constructorOptions = { ...options, client }
|
|
61
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
|
+
}
|
|
64
|
+
return new SeamHttpNetworks(constructorOptions)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromApiKey(
|
|
68
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
+
): SeamHttpNetworks {
|
|
71
|
+
const constructorOptions = { ...options, apiKey }
|
|
72
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
|
+
}
|
|
75
|
+
return new SeamHttpNetworks(constructorOptions)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static fromClientSessionToken(
|
|
79
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
80
|
+
options: Omit<
|
|
81
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
82
|
+
'clientSessionToken'
|
|
83
|
+
> = {},
|
|
84
|
+
): SeamHttpNetworks {
|
|
85
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
86
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
|
+
}
|
|
89
|
+
return new SeamHttpNetworks(constructorOptions)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static async fromPublishableKey(
|
|
93
|
+
publishableKey: string,
|
|
94
|
+
userIdentifierKey: string,
|
|
95
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
+
): Promise<SeamHttpNetworks> {
|
|
97
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
98
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
99
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
100
|
+
throw new SeamHttpInvalidOptionsError(
|
|
101
|
+
'The client option cannot be used with SeamHttpNetworks.fromPublishableKey',
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
const client = createClient(clientOptions)
|
|
105
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
106
|
+
const { token } = await clientSessions.getOrCreate({
|
|
107
|
+
user_identifier_key: userIdentifierKey,
|
|
108
|
+
})
|
|
109
|
+
return SeamHttpNetworks.fromClientSessionToken(token, options)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static fromConsoleSessionToken(
|
|
113
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
114
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
115
|
+
options: Omit<
|
|
116
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
117
|
+
'consoleSessionToken' | 'workspaceId'
|
|
118
|
+
> = {},
|
|
119
|
+
): SeamHttpNetworks {
|
|
120
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
121
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
122
|
+
throw new SeamHttpInvalidOptionsError(
|
|
123
|
+
'Missing consoleSessionToken or workspaceId',
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
return new SeamHttpNetworks(constructorOptions)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static fromPersonalAccessToken(
|
|
130
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
131
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
132
|
+
options: Omit<
|
|
133
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
134
|
+
'personalAccessToken' | 'workspaceId'
|
|
135
|
+
> = {},
|
|
136
|
+
): SeamHttpNetworks {
|
|
137
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
138
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
139
|
+
throw new SeamHttpInvalidOptionsError(
|
|
140
|
+
'Missing personalAccessToken or workspaceId',
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
return new SeamHttpNetworks(constructorOptions)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
147
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
148
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
149
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async updateClientSessionToken(
|
|
153
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
154
|
+
): Promise<void> {
|
|
155
|
+
const { headers } = this.client.defaults
|
|
156
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
157
|
+
clientSessionToken,
|
|
158
|
+
})
|
|
159
|
+
for (const key of Object.keys(authHeaders)) {
|
|
160
|
+
if (headers[key] == null) {
|
|
161
|
+
throw new Error(
|
|
162
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
167
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
168
|
+
await clientSessions.get()
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
get(
|
|
172
|
+
params?: NetworksGetParams,
|
|
173
|
+
): SeamHttpRequest<NetworksGetResponse, 'network'> {
|
|
174
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
175
|
+
throw new Error(
|
|
176
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
return new SeamHttpRequest(this, {
|
|
180
|
+
pathname: '/networks/get',
|
|
181
|
+
method: 'POST',
|
|
182
|
+
body: params,
|
|
183
|
+
responseKey: 'network',
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
list(
|
|
188
|
+
params?: NetworksListParams,
|
|
189
|
+
): SeamHttpRequest<NetworksListResponse, 'networks'> {
|
|
190
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
191
|
+
throw new Error(
|
|
192
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
return new SeamHttpRequest(this, {
|
|
196
|
+
pathname: '/networks/list',
|
|
197
|
+
method: 'POST',
|
|
198
|
+
body: params,
|
|
199
|
+
responseKey: 'networks',
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export type NetworksGetParams = RouteRequestBody<'/networks/get'>
|
|
205
|
+
|
|
206
|
+
export type NetworksGetResponse = SetNonNullable<
|
|
207
|
+
Required<RouteResponse<'/networks/get'>>
|
|
208
|
+
>
|
|
209
|
+
|
|
210
|
+
export type NetworksGetOptions = never
|
|
211
|
+
|
|
212
|
+
export type NetworksListParams = RouteRequestBody<'/networks/list'>
|
|
213
|
+
|
|
214
|
+
export type NetworksListResponse = SetNonNullable<
|
|
215
|
+
Required<RouteResponse<'/networks/list'>>
|
|
216
|
+
>
|
|
217
|
+
|
|
218
|
+
export type NetworksListOptions = never
|
package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.ts
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
RouteRequestBody,
|
|
8
|
+
RouteRequestParams,
|
|
9
|
+
RouteResponse,
|
|
10
|
+
} from '@seamapi/types/connect'
|
|
11
|
+
|
|
12
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
13
|
+
import {
|
|
14
|
+
getAuthHeadersForClientSessionToken,
|
|
15
|
+
warnOnInsecureuserIdentifierKey,
|
|
16
|
+
} from 'lib/seam/connect/auth.js'
|
|
17
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
18
|
+
import {
|
|
19
|
+
isSeamHttpOptionsWithApiKey,
|
|
20
|
+
isSeamHttpOptionsWithClient,
|
|
21
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
22
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
23
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
24
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
25
|
+
SeamHttpInvalidOptionsError,
|
|
26
|
+
type SeamHttpOptions,
|
|
27
|
+
type SeamHttpOptionsWithApiKey,
|
|
28
|
+
type SeamHttpOptionsWithClient,
|
|
29
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
30
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
31
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
32
|
+
type SeamHttpRequestOptions,
|
|
33
|
+
} from 'lib/seam/connect/options.js'
|
|
34
|
+
import {
|
|
35
|
+
limitToSeamHttpRequestOptions,
|
|
36
|
+
parseOptions,
|
|
37
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
38
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
39
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
40
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
41
|
+
import type { SetNonNullable } from 'lib/types.js'
|
|
42
|
+
|
|
43
|
+
export class SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
44
|
+
client: Client
|
|
45
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
46
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
47
|
+
static ltsVersion = seamApiLtsVersion
|
|
48
|
+
|
|
49
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
50
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
51
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
57
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static fromClient(
|
|
61
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
62
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
63
|
+
): SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
64
|
+
const constructorOptions = { ...options, client }
|
|
65
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
66
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
67
|
+
}
|
|
68
|
+
return new SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static fromApiKey(
|
|
72
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
73
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
74
|
+
): SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
75
|
+
const constructorOptions = { ...options, apiKey }
|
|
76
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
77
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
78
|
+
}
|
|
79
|
+
return new SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static fromClientSessionToken(
|
|
83
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
84
|
+
options: Omit<
|
|
85
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
86
|
+
'clientSessionToken'
|
|
87
|
+
> = {},
|
|
88
|
+
): SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
89
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
90
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
91
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
92
|
+
}
|
|
93
|
+
return new SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static async fromPublishableKey(
|
|
97
|
+
publishableKey: string,
|
|
98
|
+
userIdentifierKey: string,
|
|
99
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
100
|
+
): Promise<SeamHttpSeamBridgeV1BridgeClientSessions> {
|
|
101
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
102
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
103
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
104
|
+
throw new SeamHttpInvalidOptionsError(
|
|
105
|
+
'The client option cannot be used with SeamHttpSeamBridgeV1BridgeClientSessions.fromPublishableKey',
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
const client = createClient(clientOptions)
|
|
109
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
110
|
+
const { token } = await clientSessions.getOrCreate({
|
|
111
|
+
user_identifier_key: userIdentifierKey,
|
|
112
|
+
})
|
|
113
|
+
return SeamHttpSeamBridgeV1BridgeClientSessions.fromClientSessionToken(
|
|
114
|
+
token,
|
|
115
|
+
options,
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static fromConsoleSessionToken(
|
|
120
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
121
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
122
|
+
options: Omit<
|
|
123
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
124
|
+
'consoleSessionToken' | 'workspaceId'
|
|
125
|
+
> = {},
|
|
126
|
+
): SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
127
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
128
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
129
|
+
throw new SeamHttpInvalidOptionsError(
|
|
130
|
+
'Missing consoleSessionToken or workspaceId',
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
return new SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
static fromPersonalAccessToken(
|
|
137
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
138
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
139
|
+
options: Omit<
|
|
140
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
141
|
+
'personalAccessToken' | 'workspaceId'
|
|
142
|
+
> = {},
|
|
143
|
+
): SeamHttpSeamBridgeV1BridgeClientSessions {
|
|
144
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
145
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
146
|
+
throw new SeamHttpInvalidOptionsError(
|
|
147
|
+
'Missing personalAccessToken or workspaceId',
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
return new SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
154
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
155
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
156
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async updateClientSessionToken(
|
|
160
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
161
|
+
): Promise<void> {
|
|
162
|
+
const { headers } = this.client.defaults
|
|
163
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
164
|
+
clientSessionToken,
|
|
165
|
+
})
|
|
166
|
+
for (const key of Object.keys(authHeaders)) {
|
|
167
|
+
if (headers[key] == null) {
|
|
168
|
+
throw new Error(
|
|
169
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
174
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
175
|
+
await clientSessions.get()
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
create(
|
|
179
|
+
body?: SeamBridgeV1BridgeClientSessionsCreateBody,
|
|
180
|
+
): SeamHttpRequest<
|
|
181
|
+
SeamBridgeV1BridgeClientSessionsCreateResponse,
|
|
182
|
+
'bridge_client_session'
|
|
183
|
+
> {
|
|
184
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
185
|
+
throw new Error(
|
|
186
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
return new SeamHttpRequest(this, {
|
|
190
|
+
pathname: '/seam/bridge/v1/bridge_client_sessions/create',
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body,
|
|
193
|
+
responseKey: 'bridge_client_session',
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
get(
|
|
198
|
+
params?: SeamBridgeV1BridgeClientSessionsGetParams,
|
|
199
|
+
): SeamHttpRequest<
|
|
200
|
+
SeamBridgeV1BridgeClientSessionsGetResponse,
|
|
201
|
+
'bridge_client_session'
|
|
202
|
+
> {
|
|
203
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
204
|
+
throw new Error(
|
|
205
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
return new SeamHttpRequest(this, {
|
|
209
|
+
pathname: '/seam/bridge/v1/bridge_client_sessions/get',
|
|
210
|
+
method: 'GET',
|
|
211
|
+
params,
|
|
212
|
+
responseKey: 'bridge_client_session',
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
refreshTelemetryToken(
|
|
217
|
+
body?: SeamBridgeV1BridgeClientSessionsRefreshTelemetryTokenBody,
|
|
218
|
+
): SeamHttpRequest<
|
|
219
|
+
SeamBridgeV1BridgeClientSessionsRefreshTelemetryTokenResponse,
|
|
220
|
+
'bridge_client_session'
|
|
221
|
+
> {
|
|
222
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
223
|
+
throw new Error(
|
|
224
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
return new SeamHttpRequest(this, {
|
|
228
|
+
pathname:
|
|
229
|
+
'/seam/bridge/v1/bridge_client_sessions/refresh_telemetry_token',
|
|
230
|
+
method: 'POST',
|
|
231
|
+
body,
|
|
232
|
+
responseKey: 'bridge_client_session',
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
regeneratePairingCode(
|
|
237
|
+
body?: SeamBridgeV1BridgeClientSessionsRegeneratePairingCodeBody,
|
|
238
|
+
): SeamHttpRequest<
|
|
239
|
+
SeamBridgeV1BridgeClientSessionsRegeneratePairingCodeResponse,
|
|
240
|
+
'bridge_client_session'
|
|
241
|
+
> {
|
|
242
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
243
|
+
throw new Error(
|
|
244
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
return new SeamHttpRequest(this, {
|
|
248
|
+
pathname:
|
|
249
|
+
'/seam/bridge/v1/bridge_client_sessions/regenerate_pairing_code',
|
|
250
|
+
method: 'POST',
|
|
251
|
+
body,
|
|
252
|
+
responseKey: 'bridge_client_session',
|
|
253
|
+
})
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
reportStatus(
|
|
257
|
+
body?: SeamBridgeV1BridgeClientSessionsReportStatusBody,
|
|
258
|
+
): SeamHttpRequest<void, undefined> {
|
|
259
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
260
|
+
throw new Error(
|
|
261
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
return new SeamHttpRequest(this, {
|
|
265
|
+
pathname: '/seam/bridge/v1/bridge_client_sessions/report_status',
|
|
266
|
+
method: 'POST',
|
|
267
|
+
body,
|
|
268
|
+
responseKey: undefined,
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export type SeamBridgeV1BridgeClientSessionsCreateBody =
|
|
274
|
+
RouteRequestBody<'/seam/bridge/v1/bridge_client_sessions/create'>
|
|
275
|
+
|
|
276
|
+
export type SeamBridgeV1BridgeClientSessionsCreateResponse = SetNonNullable<
|
|
277
|
+
Required<RouteResponse<'/seam/bridge/v1/bridge_client_sessions/create'>>
|
|
278
|
+
>
|
|
279
|
+
|
|
280
|
+
export type SeamBridgeV1BridgeClientSessionsCreateOptions = never
|
|
281
|
+
|
|
282
|
+
export type SeamBridgeV1BridgeClientSessionsGetParams =
|
|
283
|
+
RouteRequestParams<'/seam/bridge/v1/bridge_client_sessions/get'>
|
|
284
|
+
|
|
285
|
+
export type SeamBridgeV1BridgeClientSessionsGetResponse = SetNonNullable<
|
|
286
|
+
Required<RouteResponse<'/seam/bridge/v1/bridge_client_sessions/get'>>
|
|
287
|
+
>
|
|
288
|
+
|
|
289
|
+
export type SeamBridgeV1BridgeClientSessionsGetOptions = never
|
|
290
|
+
|
|
291
|
+
export type SeamBridgeV1BridgeClientSessionsRefreshTelemetryTokenBody =
|
|
292
|
+
RouteRequestBody<'/seam/bridge/v1/bridge_client_sessions/refresh_telemetry_token'>
|
|
293
|
+
|
|
294
|
+
export type SeamBridgeV1BridgeClientSessionsRefreshTelemetryTokenResponse =
|
|
295
|
+
SetNonNullable<
|
|
296
|
+
Required<
|
|
297
|
+
RouteResponse<'/seam/bridge/v1/bridge_client_sessions/refresh_telemetry_token'>
|
|
298
|
+
>
|
|
299
|
+
>
|
|
300
|
+
|
|
301
|
+
export type SeamBridgeV1BridgeClientSessionsRefreshTelemetryTokenOptions = never
|
|
302
|
+
|
|
303
|
+
export type SeamBridgeV1BridgeClientSessionsRegeneratePairingCodeBody =
|
|
304
|
+
RouteRequestBody<'/seam/bridge/v1/bridge_client_sessions/regenerate_pairing_code'>
|
|
305
|
+
|
|
306
|
+
export type SeamBridgeV1BridgeClientSessionsRegeneratePairingCodeResponse =
|
|
307
|
+
SetNonNullable<
|
|
308
|
+
Required<
|
|
309
|
+
RouteResponse<'/seam/bridge/v1/bridge_client_sessions/regenerate_pairing_code'>
|
|
310
|
+
>
|
|
311
|
+
>
|
|
312
|
+
|
|
313
|
+
export type SeamBridgeV1BridgeClientSessionsRegeneratePairingCodeOptions = never
|
|
314
|
+
|
|
315
|
+
export type SeamBridgeV1BridgeClientSessionsReportStatusBody =
|
|
316
|
+
RouteRequestBody<'/seam/bridge/v1/bridge_client_sessions/report_status'>
|
|
317
|
+
|
|
318
|
+
export type SeamBridgeV1BridgeClientSessionsReportStatusResponse =
|
|
319
|
+
SetNonNullable<
|
|
320
|
+
Required<
|
|
321
|
+
RouteResponse<'/seam/bridge/v1/bridge_client_sessions/report_status'>
|
|
322
|
+
>
|
|
323
|
+
>
|
|
324
|
+
|
|
325
|
+
export type SeamBridgeV1BridgeClientSessionsReportStatusOptions = never
|