@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,399 @@
|
|
|
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 SeamHttpUnstableLocations {
|
|
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
|
+
): SeamHttpUnstableLocations {
|
|
64
|
+
const constructorOptions = { ...options, client }
|
|
65
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
66
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
67
|
+
}
|
|
68
|
+
return new SeamHttpUnstableLocations(constructorOptions)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static fromApiKey(
|
|
72
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
73
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
74
|
+
): SeamHttpUnstableLocations {
|
|
75
|
+
const constructorOptions = { ...options, apiKey }
|
|
76
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
77
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
78
|
+
}
|
|
79
|
+
return new SeamHttpUnstableLocations(constructorOptions)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static fromClientSessionToken(
|
|
83
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
84
|
+
options: Omit<
|
|
85
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
86
|
+
'clientSessionToken'
|
|
87
|
+
> = {},
|
|
88
|
+
): SeamHttpUnstableLocations {
|
|
89
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
90
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
91
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
92
|
+
}
|
|
93
|
+
return new SeamHttpUnstableLocations(constructorOptions)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static async fromPublishableKey(
|
|
97
|
+
publishableKey: string,
|
|
98
|
+
userIdentifierKey: string,
|
|
99
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
100
|
+
): Promise<SeamHttpUnstableLocations> {
|
|
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 SeamHttpUnstableLocations.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 SeamHttpUnstableLocations.fromClientSessionToken(token, options)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static fromConsoleSessionToken(
|
|
117
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
118
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
119
|
+
options: Omit<
|
|
120
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
121
|
+
'consoleSessionToken' | 'workspaceId'
|
|
122
|
+
> = {},
|
|
123
|
+
): SeamHttpUnstableLocations {
|
|
124
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
125
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
126
|
+
throw new SeamHttpInvalidOptionsError(
|
|
127
|
+
'Missing consoleSessionToken or workspaceId',
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
return new SeamHttpUnstableLocations(constructorOptions)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
static fromPersonalAccessToken(
|
|
134
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
135
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
136
|
+
options: Omit<
|
|
137
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
138
|
+
'personalAccessToken' | 'workspaceId'
|
|
139
|
+
> = {},
|
|
140
|
+
): SeamHttpUnstableLocations {
|
|
141
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
142
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
143
|
+
throw new SeamHttpInvalidOptionsError(
|
|
144
|
+
'Missing personalAccessToken or workspaceId',
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
return new SeamHttpUnstableLocations(constructorOptions)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
151
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
152
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
153
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async updateClientSessionToken(
|
|
157
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
158
|
+
): Promise<void> {
|
|
159
|
+
const { headers } = this.client.defaults
|
|
160
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
161
|
+
clientSessionToken,
|
|
162
|
+
})
|
|
163
|
+
for (const key of Object.keys(authHeaders)) {
|
|
164
|
+
if (headers[key] == null) {
|
|
165
|
+
throw new Error(
|
|
166
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
171
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
172
|
+
await clientSessions.get()
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
addAcsEntrances(
|
|
176
|
+
body?: UnstableLocationsAddAcsEntrancesBody,
|
|
177
|
+
): SeamHttpRequest<void, undefined> {
|
|
178
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
179
|
+
throw new Error(
|
|
180
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
return new SeamHttpRequest(this, {
|
|
184
|
+
pathname: '/unstable_locations/add_acs_entrances',
|
|
185
|
+
method: 'PUT',
|
|
186
|
+
body,
|
|
187
|
+
responseKey: undefined,
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
addDevices(
|
|
192
|
+
body?: UnstableLocationsAddDevicesBody,
|
|
193
|
+
): SeamHttpRequest<void, undefined> {
|
|
194
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
195
|
+
throw new Error(
|
|
196
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
return new SeamHttpRequest(this, {
|
|
200
|
+
pathname: '/unstable_locations/add_devices',
|
|
201
|
+
method: 'PUT',
|
|
202
|
+
body,
|
|
203
|
+
responseKey: undefined,
|
|
204
|
+
})
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
create(
|
|
208
|
+
body?: UnstableLocationsCreateBody,
|
|
209
|
+
): SeamHttpRequest<UnstableLocationsCreateResponse, 'location'> {
|
|
210
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
211
|
+
throw new Error(
|
|
212
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
return new SeamHttpRequest(this, {
|
|
216
|
+
pathname: '/unstable_locations/create',
|
|
217
|
+
method: 'POST',
|
|
218
|
+
body,
|
|
219
|
+
responseKey: 'location',
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
delete(
|
|
224
|
+
params?: UnstableLocationsDeleteParams,
|
|
225
|
+
): SeamHttpRequest<void, undefined> {
|
|
226
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
227
|
+
throw new Error(
|
|
228
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
return new SeamHttpRequest(this, {
|
|
232
|
+
pathname: '/unstable_locations/delete',
|
|
233
|
+
method: 'POST',
|
|
234
|
+
body: params,
|
|
235
|
+
responseKey: undefined,
|
|
236
|
+
})
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
get(
|
|
240
|
+
params?: UnstableLocationsGetParams,
|
|
241
|
+
): SeamHttpRequest<UnstableLocationsGetResponse, 'location'> {
|
|
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: '/unstable_locations/get',
|
|
249
|
+
method: 'POST',
|
|
250
|
+
body: params,
|
|
251
|
+
responseKey: 'location',
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
list(
|
|
256
|
+
params?: UnstableLocationsListParams,
|
|
257
|
+
): SeamHttpRequest<UnstableLocationsListResponse, 'locations'> {
|
|
258
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
259
|
+
throw new Error(
|
|
260
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
return new SeamHttpRequest(this, {
|
|
264
|
+
pathname: '/unstable_locations/list',
|
|
265
|
+
method: 'GET',
|
|
266
|
+
params,
|
|
267
|
+
responseKey: 'locations',
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
removeAcsEntrances(
|
|
272
|
+
params?: UnstableLocationsRemoveAcsEntrancesParams,
|
|
273
|
+
): SeamHttpRequest<void, undefined> {
|
|
274
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
275
|
+
throw new Error(
|
|
276
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
277
|
+
)
|
|
278
|
+
}
|
|
279
|
+
return new SeamHttpRequest(this, {
|
|
280
|
+
pathname: '/unstable_locations/remove_acs_entrances',
|
|
281
|
+
method: 'POST',
|
|
282
|
+
body: params,
|
|
283
|
+
responseKey: undefined,
|
|
284
|
+
})
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
removeDevices(
|
|
288
|
+
params?: UnstableLocationsRemoveDevicesParams,
|
|
289
|
+
): SeamHttpRequest<void, undefined> {
|
|
290
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
291
|
+
throw new Error(
|
|
292
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
return new SeamHttpRequest(this, {
|
|
296
|
+
pathname: '/unstable_locations/remove_devices',
|
|
297
|
+
method: 'POST',
|
|
298
|
+
body: params,
|
|
299
|
+
responseKey: undefined,
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
update(
|
|
304
|
+
body?: UnstableLocationsUpdateBody,
|
|
305
|
+
): SeamHttpRequest<UnstableLocationsUpdateResponse, 'location'> {
|
|
306
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
307
|
+
throw new Error(
|
|
308
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
return new SeamHttpRequest(this, {
|
|
312
|
+
pathname: '/unstable_locations/update',
|
|
313
|
+
method: 'PATCH',
|
|
314
|
+
body,
|
|
315
|
+
responseKey: 'location',
|
|
316
|
+
})
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type UnstableLocationsAddAcsEntrancesBody =
|
|
321
|
+
RouteRequestBody<'/unstable_locations/add_acs_entrances'>
|
|
322
|
+
|
|
323
|
+
export type UnstableLocationsAddAcsEntrancesResponse = SetNonNullable<
|
|
324
|
+
Required<RouteResponse<'/unstable_locations/add_acs_entrances'>>
|
|
325
|
+
>
|
|
326
|
+
|
|
327
|
+
export type UnstableLocationsAddAcsEntrancesOptions = never
|
|
328
|
+
|
|
329
|
+
export type UnstableLocationsAddDevicesBody =
|
|
330
|
+
RouteRequestBody<'/unstable_locations/add_devices'>
|
|
331
|
+
|
|
332
|
+
export type UnstableLocationsAddDevicesResponse = SetNonNullable<
|
|
333
|
+
Required<RouteResponse<'/unstable_locations/add_devices'>>
|
|
334
|
+
>
|
|
335
|
+
|
|
336
|
+
export type UnstableLocationsAddDevicesOptions = never
|
|
337
|
+
|
|
338
|
+
export type UnstableLocationsCreateBody =
|
|
339
|
+
RouteRequestBody<'/unstable_locations/create'>
|
|
340
|
+
|
|
341
|
+
export type UnstableLocationsCreateResponse = SetNonNullable<
|
|
342
|
+
Required<RouteResponse<'/unstable_locations/create'>>
|
|
343
|
+
>
|
|
344
|
+
|
|
345
|
+
export type UnstableLocationsCreateOptions = never
|
|
346
|
+
|
|
347
|
+
export type UnstableLocationsDeleteParams =
|
|
348
|
+
RouteRequestBody<'/unstable_locations/delete'>
|
|
349
|
+
|
|
350
|
+
export type UnstableLocationsDeleteResponse = SetNonNullable<
|
|
351
|
+
Required<RouteResponse<'/unstable_locations/delete'>>
|
|
352
|
+
>
|
|
353
|
+
|
|
354
|
+
export type UnstableLocationsDeleteOptions = never
|
|
355
|
+
|
|
356
|
+
export type UnstableLocationsGetParams =
|
|
357
|
+
RouteRequestBody<'/unstable_locations/get'>
|
|
358
|
+
|
|
359
|
+
export type UnstableLocationsGetResponse = SetNonNullable<
|
|
360
|
+
Required<RouteResponse<'/unstable_locations/get'>>
|
|
361
|
+
>
|
|
362
|
+
|
|
363
|
+
export type UnstableLocationsGetOptions = never
|
|
364
|
+
|
|
365
|
+
export type UnstableLocationsListParams =
|
|
366
|
+
RouteRequestParams<'/unstable_locations/list'>
|
|
367
|
+
|
|
368
|
+
export type UnstableLocationsListResponse = SetNonNullable<
|
|
369
|
+
Required<RouteResponse<'/unstable_locations/list'>>
|
|
370
|
+
>
|
|
371
|
+
|
|
372
|
+
export type UnstableLocationsListOptions = never
|
|
373
|
+
|
|
374
|
+
export type UnstableLocationsRemoveAcsEntrancesParams =
|
|
375
|
+
RouteRequestBody<'/unstable_locations/remove_acs_entrances'>
|
|
376
|
+
|
|
377
|
+
export type UnstableLocationsRemoveAcsEntrancesResponse = SetNonNullable<
|
|
378
|
+
Required<RouteResponse<'/unstable_locations/remove_acs_entrances'>>
|
|
379
|
+
>
|
|
380
|
+
|
|
381
|
+
export type UnstableLocationsRemoveAcsEntrancesOptions = never
|
|
382
|
+
|
|
383
|
+
export type UnstableLocationsRemoveDevicesParams =
|
|
384
|
+
RouteRequestBody<'/unstable_locations/remove_devices'>
|
|
385
|
+
|
|
386
|
+
export type UnstableLocationsRemoveDevicesResponse = SetNonNullable<
|
|
387
|
+
Required<RouteResponse<'/unstable_locations/remove_devices'>>
|
|
388
|
+
>
|
|
389
|
+
|
|
390
|
+
export type UnstableLocationsRemoveDevicesOptions = never
|
|
391
|
+
|
|
392
|
+
export type UnstableLocationsUpdateBody =
|
|
393
|
+
RouteRequestBody<'/unstable_locations/update'>
|
|
394
|
+
|
|
395
|
+
export type UnstableLocationsUpdateResponse = SetNonNullable<
|
|
396
|
+
Required<RouteResponse<'/unstable_locations/update'>>
|
|
397
|
+
>
|
|
398
|
+
|
|
399
|
+
export type UnstableLocationsUpdateOptions = never
|
|
@@ -0,0 +1,292 @@
|
|
|
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 SeamHttpUnstablePartnerBuildingBlocks {
|
|
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
|
+
): SeamHttpUnstablePartnerBuildingBlocks {
|
|
60
|
+
const constructorOptions = { ...options, client }
|
|
61
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
|
+
}
|
|
64
|
+
return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromApiKey(
|
|
68
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
+
): SeamHttpUnstablePartnerBuildingBlocks {
|
|
71
|
+
const constructorOptions = { ...options, apiKey }
|
|
72
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
|
+
}
|
|
75
|
+
return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static fromClientSessionToken(
|
|
79
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
80
|
+
options: Omit<
|
|
81
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
82
|
+
'clientSessionToken'
|
|
83
|
+
> = {},
|
|
84
|
+
): SeamHttpUnstablePartnerBuildingBlocks {
|
|
85
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
86
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
|
+
}
|
|
89
|
+
return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static async fromPublishableKey(
|
|
93
|
+
publishableKey: string,
|
|
94
|
+
userIdentifierKey: string,
|
|
95
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
+
): Promise<SeamHttpUnstablePartnerBuildingBlocks> {
|
|
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 SeamHttpUnstablePartnerBuildingBlocks.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 SeamHttpUnstablePartnerBuildingBlocks.fromClientSessionToken(
|
|
110
|
+
token,
|
|
111
|
+
options,
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static fromConsoleSessionToken(
|
|
116
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
117
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
118
|
+
options: Omit<
|
|
119
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
120
|
+
'consoleSessionToken' | 'workspaceId'
|
|
121
|
+
> = {},
|
|
122
|
+
): SeamHttpUnstablePartnerBuildingBlocks {
|
|
123
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
124
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
125
|
+
throw new SeamHttpInvalidOptionsError(
|
|
126
|
+
'Missing consoleSessionToken or workspaceId',
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static fromPersonalAccessToken(
|
|
133
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
134
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
135
|
+
options: Omit<
|
|
136
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
137
|
+
'personalAccessToken' | 'workspaceId'
|
|
138
|
+
> = {},
|
|
139
|
+
): SeamHttpUnstablePartnerBuildingBlocks {
|
|
140
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
141
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
142
|
+
throw new SeamHttpInvalidOptionsError(
|
|
143
|
+
'Missing personalAccessToken or workspaceId',
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
150
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
151
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
152
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async updateClientSessionToken(
|
|
156
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
157
|
+
): Promise<void> {
|
|
158
|
+
const { headers } = this.client.defaults
|
|
159
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
160
|
+
clientSessionToken,
|
|
161
|
+
})
|
|
162
|
+
for (const key of Object.keys(authHeaders)) {
|
|
163
|
+
if (headers[key] == null) {
|
|
164
|
+
throw new Error(
|
|
165
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
170
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
171
|
+
await clientSessions.get()
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
connectAccounts(
|
|
175
|
+
body?: UnstablePartnerBuildingBlocksConnectAccountsBody,
|
|
176
|
+
): SeamHttpRequest<
|
|
177
|
+
UnstablePartnerBuildingBlocksConnectAccountsResponse,
|
|
178
|
+
'magic_link'
|
|
179
|
+
> {
|
|
180
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
181
|
+
throw new Error(
|
|
182
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
return new SeamHttpRequest(this, {
|
|
186
|
+
pathname: '/unstable_partner/building_blocks/connect_accounts',
|
|
187
|
+
method: 'POST',
|
|
188
|
+
body,
|
|
189
|
+
responseKey: 'magic_link',
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
generateMagicLink(
|
|
194
|
+
params?: UnstablePartnerBuildingBlocksGenerateMagicLinkParams,
|
|
195
|
+
): SeamHttpRequest<
|
|
196
|
+
UnstablePartnerBuildingBlocksGenerateMagicLinkResponse,
|
|
197
|
+
'magic_link'
|
|
198
|
+
> {
|
|
199
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
200
|
+
throw new Error(
|
|
201
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
return new SeamHttpRequest(this, {
|
|
205
|
+
pathname: '/unstable_partner/building_blocks/generate_magic_link',
|
|
206
|
+
method: 'POST',
|
|
207
|
+
body: params,
|
|
208
|
+
responseKey: 'magic_link',
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
manageDevices(
|
|
213
|
+
body?: UnstablePartnerBuildingBlocksManageDevicesBody,
|
|
214
|
+
): SeamHttpRequest<
|
|
215
|
+
UnstablePartnerBuildingBlocksManageDevicesResponse,
|
|
216
|
+
'magic_link'
|
|
217
|
+
> {
|
|
218
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
219
|
+
throw new Error(
|
|
220
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
return new SeamHttpRequest(this, {
|
|
224
|
+
pathname: '/unstable_partner/building_blocks/manage_devices',
|
|
225
|
+
method: 'POST',
|
|
226
|
+
body,
|
|
227
|
+
responseKey: 'magic_link',
|
|
228
|
+
})
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
organizeSpaces(
|
|
232
|
+
body?: UnstablePartnerBuildingBlocksOrganizeSpacesBody,
|
|
233
|
+
): SeamHttpRequest<
|
|
234
|
+
UnstablePartnerBuildingBlocksOrganizeSpacesResponse,
|
|
235
|
+
'magic_link'
|
|
236
|
+
> {
|
|
237
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
238
|
+
throw new Error(
|
|
239
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
return new SeamHttpRequest(this, {
|
|
243
|
+
pathname: '/unstable_partner/building_blocks/organize_spaces',
|
|
244
|
+
method: 'POST',
|
|
245
|
+
body,
|
|
246
|
+
responseKey: 'magic_link',
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type UnstablePartnerBuildingBlocksConnectAccountsBody =
|
|
252
|
+
RouteRequestBody<'/unstable_partner/building_blocks/connect_accounts'>
|
|
253
|
+
|
|
254
|
+
export type UnstablePartnerBuildingBlocksConnectAccountsResponse =
|
|
255
|
+
SetNonNullable<
|
|
256
|
+
Required<
|
|
257
|
+
RouteResponse<'/unstable_partner/building_blocks/connect_accounts'>
|
|
258
|
+
>
|
|
259
|
+
>
|
|
260
|
+
|
|
261
|
+
export type UnstablePartnerBuildingBlocksConnectAccountsOptions = never
|
|
262
|
+
|
|
263
|
+
export type UnstablePartnerBuildingBlocksGenerateMagicLinkParams =
|
|
264
|
+
RouteRequestBody<'/unstable_partner/building_blocks/generate_magic_link'>
|
|
265
|
+
|
|
266
|
+
export type UnstablePartnerBuildingBlocksGenerateMagicLinkResponse =
|
|
267
|
+
SetNonNullable<
|
|
268
|
+
Required<
|
|
269
|
+
RouteResponse<'/unstable_partner/building_blocks/generate_magic_link'>
|
|
270
|
+
>
|
|
271
|
+
>
|
|
272
|
+
|
|
273
|
+
export type UnstablePartnerBuildingBlocksGenerateMagicLinkOptions = never
|
|
274
|
+
|
|
275
|
+
export type UnstablePartnerBuildingBlocksManageDevicesBody =
|
|
276
|
+
RouteRequestBody<'/unstable_partner/building_blocks/manage_devices'>
|
|
277
|
+
|
|
278
|
+
export type UnstablePartnerBuildingBlocksManageDevicesResponse = SetNonNullable<
|
|
279
|
+
Required<RouteResponse<'/unstable_partner/building_blocks/manage_devices'>>
|
|
280
|
+
>
|
|
281
|
+
|
|
282
|
+
export type UnstablePartnerBuildingBlocksManageDevicesOptions = never
|
|
283
|
+
|
|
284
|
+
export type UnstablePartnerBuildingBlocksOrganizeSpacesBody =
|
|
285
|
+
RouteRequestBody<'/unstable_partner/building_blocks/organize_spaces'>
|
|
286
|
+
|
|
287
|
+
export type UnstablePartnerBuildingBlocksOrganizeSpacesResponse =
|
|
288
|
+
SetNonNullable<
|
|
289
|
+
Required<RouteResponse<'/unstable_partner/building_blocks/organize_spaces'>>
|
|
290
|
+
>
|
|
291
|
+
|
|
292
|
+
export type UnstablePartnerBuildingBlocksOrganizeSpacesOptions = never
|