@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
|
@@ -37,16 +37,22 @@ import { SeamHttpAccessGrants } from './access-grants/index.js'
|
|
|
37
37
|
import { SeamHttpAccessMethods } from './access-methods/index.js'
|
|
38
38
|
import { SeamHttpAcs } from './acs/index.js'
|
|
39
39
|
import { SeamHttpActionAttempts } from './action-attempts/index.js'
|
|
40
|
+
import { SeamHttpBridges } from './bridges/index.js'
|
|
40
41
|
import { SeamHttpClientSessions } from './client-sessions/index.js'
|
|
41
42
|
import { SeamHttpConnectWebviews } from './connect-webviews/index.js'
|
|
42
43
|
import { SeamHttpConnectedAccounts } from './connected-accounts/index.js'
|
|
43
44
|
import { SeamHttpDevices } from './devices/index.js'
|
|
44
45
|
import { SeamHttpEvents } from './events/index.js'
|
|
45
46
|
import { SeamHttpLocks } from './locks/index.js'
|
|
47
|
+
import { SeamHttpNetworks } from './networks/index.js'
|
|
46
48
|
import { SeamHttpNoiseSensors } from './noise-sensors/index.js'
|
|
47
49
|
import { SeamHttpPhones } from './phones/index.js'
|
|
48
50
|
import { SeamHttpSpaces } from './spaces/index.js'
|
|
49
51
|
import { SeamHttpThermostats } from './thermostats/index.js'
|
|
52
|
+
import { SeamHttpUnstableAccessGrants } from './unstable-access-grants/index.js'
|
|
53
|
+
import { SeamHttpUnstableAccessMethods } from './unstable-access-methods/index.js'
|
|
54
|
+
import { SeamHttpUnstableLocations } from './unstable-locations/index.js'
|
|
55
|
+
import { SeamHttpUnstablePartner } from './unstable-partner/index.js'
|
|
50
56
|
import { SeamHttpUserIdentities } from './user-identities/index.js'
|
|
51
57
|
import { SeamHttpWebhooks } from './webhooks/index.js'
|
|
52
58
|
import { SeamHttpWorkspaces } from './workspaces/index.js'
|
|
@@ -198,6 +204,10 @@ export class SeamHttp {
|
|
|
198
204
|
return SeamHttpActionAttempts.fromClient(this.client, this.defaults)
|
|
199
205
|
}
|
|
200
206
|
|
|
207
|
+
get bridges(): SeamHttpBridges {
|
|
208
|
+
return SeamHttpBridges.fromClient(this.client, this.defaults)
|
|
209
|
+
}
|
|
210
|
+
|
|
201
211
|
get clientSessions(): SeamHttpClientSessions {
|
|
202
212
|
return SeamHttpClientSessions.fromClient(this.client, this.defaults)
|
|
203
213
|
}
|
|
@@ -222,6 +232,10 @@ export class SeamHttp {
|
|
|
222
232
|
return SeamHttpLocks.fromClient(this.client, this.defaults)
|
|
223
233
|
}
|
|
224
234
|
|
|
235
|
+
get networks(): SeamHttpNetworks {
|
|
236
|
+
return SeamHttpNetworks.fromClient(this.client, this.defaults)
|
|
237
|
+
}
|
|
238
|
+
|
|
225
239
|
get noiseSensors(): SeamHttpNoiseSensors {
|
|
226
240
|
return SeamHttpNoiseSensors.fromClient(this.client, this.defaults)
|
|
227
241
|
}
|
|
@@ -238,6 +252,22 @@ export class SeamHttp {
|
|
|
238
252
|
return SeamHttpThermostats.fromClient(this.client, this.defaults)
|
|
239
253
|
}
|
|
240
254
|
|
|
255
|
+
get unstableAccessGrants(): SeamHttpUnstableAccessGrants {
|
|
256
|
+
return SeamHttpUnstableAccessGrants.fromClient(this.client, this.defaults)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
get unstableAccessMethods(): SeamHttpUnstableAccessMethods {
|
|
260
|
+
return SeamHttpUnstableAccessMethods.fromClient(this.client, this.defaults)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
get unstableLocations(): SeamHttpUnstableLocations {
|
|
264
|
+
return SeamHttpUnstableLocations.fromClient(this.client, this.defaults)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
get unstablePartner(): SeamHttpUnstablePartner {
|
|
268
|
+
return SeamHttpUnstablePartner.fromClient(this.client, this.defaults)
|
|
269
|
+
}
|
|
270
|
+
|
|
241
271
|
get userIdentities(): SeamHttpUserIdentities {
|
|
242
272
|
return SeamHttpUserIdentities.fromClient(this.client, this.defaults)
|
|
243
273
|
}
|
|
@@ -233,6 +233,22 @@ export class SeamHttpThermostats {
|
|
|
233
233
|
})
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
+
get(
|
|
237
|
+
params?: ThermostatsGetParams,
|
|
238
|
+
): SeamHttpRequest<ThermostatsGetResponse, 'thermostat'> {
|
|
239
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
240
|
+
throw new Error(
|
|
241
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
return new SeamHttpRequest(this, {
|
|
245
|
+
pathname: '/thermostats/get',
|
|
246
|
+
method: 'POST',
|
|
247
|
+
body: params,
|
|
248
|
+
responseKey: 'thermostat',
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
|
|
236
252
|
heat(
|
|
237
253
|
body?: ThermostatsHeatBody,
|
|
238
254
|
options: ThermostatsHeatOptions = {},
|
|
@@ -397,6 +413,14 @@ export type ThermostatsDeleteClimatePresetResponse = SetNonNullable<
|
|
|
397
413
|
|
|
398
414
|
export type ThermostatsDeleteClimatePresetOptions = never
|
|
399
415
|
|
|
416
|
+
export type ThermostatsGetParams = RouteRequestBody<'/thermostats/get'>
|
|
417
|
+
|
|
418
|
+
export type ThermostatsGetResponse = SetNonNullable<
|
|
419
|
+
Required<RouteResponse<'/thermostats/get'>>
|
|
420
|
+
>
|
|
421
|
+
|
|
422
|
+
export type ThermostatsGetOptions = never
|
|
423
|
+
|
|
400
424
|
export type ThermostatsHeatBody = RouteRequestBody<'/thermostats/heat'>
|
|
401
425
|
|
|
402
426
|
export type ThermostatsHeatResponse = SetNonNullable<
|
|
@@ -0,0 +1,270 @@
|
|
|
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 SeamHttpUnstableAccessGrants {
|
|
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
|
+
): SeamHttpUnstableAccessGrants {
|
|
60
|
+
const constructorOptions = { ...options, client }
|
|
61
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
|
+
}
|
|
64
|
+
return new SeamHttpUnstableAccessGrants(constructorOptions)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromApiKey(
|
|
68
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
+
): SeamHttpUnstableAccessGrants {
|
|
71
|
+
const constructorOptions = { ...options, apiKey }
|
|
72
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
|
+
}
|
|
75
|
+
return new SeamHttpUnstableAccessGrants(constructorOptions)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static fromClientSessionToken(
|
|
79
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
80
|
+
options: Omit<
|
|
81
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
82
|
+
'clientSessionToken'
|
|
83
|
+
> = {},
|
|
84
|
+
): SeamHttpUnstableAccessGrants {
|
|
85
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
86
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
|
+
}
|
|
89
|
+
return new SeamHttpUnstableAccessGrants(constructorOptions)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static async fromPublishableKey(
|
|
93
|
+
publishableKey: string,
|
|
94
|
+
userIdentifierKey: string,
|
|
95
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
+
): Promise<SeamHttpUnstableAccessGrants> {
|
|
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 SeamHttpUnstableAccessGrants.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 SeamHttpUnstableAccessGrants.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
|
+
): SeamHttpUnstableAccessGrants {
|
|
120
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
121
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
122
|
+
throw new SeamHttpInvalidOptionsError(
|
|
123
|
+
'Missing consoleSessionToken or workspaceId',
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
return new SeamHttpUnstableAccessGrants(constructorOptions)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static fromPersonalAccessToken(
|
|
130
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
131
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
132
|
+
options: Omit<
|
|
133
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
134
|
+
'personalAccessToken' | 'workspaceId'
|
|
135
|
+
> = {},
|
|
136
|
+
): SeamHttpUnstableAccessGrants {
|
|
137
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
138
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
139
|
+
throw new SeamHttpInvalidOptionsError(
|
|
140
|
+
'Missing personalAccessToken or workspaceId',
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
return new SeamHttpUnstableAccessGrants(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
|
+
create(
|
|
172
|
+
body?: UnstableAccessGrantsCreateBody,
|
|
173
|
+
): SeamHttpRequest<UnstableAccessGrantsCreateResponse, 'access_grant'> {
|
|
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: '/unstable_access_grants/create',
|
|
181
|
+
method: 'POST',
|
|
182
|
+
body,
|
|
183
|
+
responseKey: 'access_grant',
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
delete(
|
|
188
|
+
params?: UnstableAccessGrantsDeleteParams,
|
|
189
|
+
): SeamHttpRequest<void, undefined> {
|
|
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: '/unstable_access_grants/delete',
|
|
197
|
+
method: 'POST',
|
|
198
|
+
body: params,
|
|
199
|
+
responseKey: undefined,
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
get(
|
|
204
|
+
params?: UnstableAccessGrantsGetParams,
|
|
205
|
+
): SeamHttpRequest<UnstableAccessGrantsGetResponse, 'access_grant'> {
|
|
206
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
207
|
+
throw new Error(
|
|
208
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
return new SeamHttpRequest(this, {
|
|
212
|
+
pathname: '/unstable_access_grants/get',
|
|
213
|
+
method: 'POST',
|
|
214
|
+
body: params,
|
|
215
|
+
responseKey: 'access_grant',
|
|
216
|
+
})
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
list(
|
|
220
|
+
params?: UnstableAccessGrantsListParams,
|
|
221
|
+
): SeamHttpRequest<UnstableAccessGrantsListResponse, 'access_grants'> {
|
|
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: '/unstable_access_grants/list',
|
|
229
|
+
method: 'POST',
|
|
230
|
+
body: params,
|
|
231
|
+
responseKey: 'access_grants',
|
|
232
|
+
})
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type UnstableAccessGrantsCreateBody =
|
|
237
|
+
RouteRequestBody<'/unstable_access_grants/create'>
|
|
238
|
+
|
|
239
|
+
export type UnstableAccessGrantsCreateResponse = SetNonNullable<
|
|
240
|
+
Required<RouteResponse<'/unstable_access_grants/create'>>
|
|
241
|
+
>
|
|
242
|
+
|
|
243
|
+
export type UnstableAccessGrantsCreateOptions = never
|
|
244
|
+
|
|
245
|
+
export type UnstableAccessGrantsDeleteParams =
|
|
246
|
+
RouteRequestBody<'/unstable_access_grants/delete'>
|
|
247
|
+
|
|
248
|
+
export type UnstableAccessGrantsDeleteResponse = SetNonNullable<
|
|
249
|
+
Required<RouteResponse<'/unstable_access_grants/delete'>>
|
|
250
|
+
>
|
|
251
|
+
|
|
252
|
+
export type UnstableAccessGrantsDeleteOptions = never
|
|
253
|
+
|
|
254
|
+
export type UnstableAccessGrantsGetParams =
|
|
255
|
+
RouteRequestBody<'/unstable_access_grants/get'>
|
|
256
|
+
|
|
257
|
+
export type UnstableAccessGrantsGetResponse = SetNonNullable<
|
|
258
|
+
Required<RouteResponse<'/unstable_access_grants/get'>>
|
|
259
|
+
>
|
|
260
|
+
|
|
261
|
+
export type UnstableAccessGrantsGetOptions = never
|
|
262
|
+
|
|
263
|
+
export type UnstableAccessGrantsListParams =
|
|
264
|
+
RouteRequestBody<'/unstable_access_grants/list'>
|
|
265
|
+
|
|
266
|
+
export type UnstableAccessGrantsListResponse = SetNonNullable<
|
|
267
|
+
Required<RouteResponse<'/unstable_access_grants/list'>>
|
|
268
|
+
>
|
|
269
|
+
|
|
270
|
+
export type UnstableAccessGrantsListOptions = never
|
|
@@ -0,0 +1,245 @@
|
|
|
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 SeamHttpUnstableAccessMethods {
|
|
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
|
+
): SeamHttpUnstableAccessMethods {
|
|
60
|
+
const constructorOptions = { ...options, client }
|
|
61
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
|
+
}
|
|
64
|
+
return new SeamHttpUnstableAccessMethods(constructorOptions)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromApiKey(
|
|
68
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
+
): SeamHttpUnstableAccessMethods {
|
|
71
|
+
const constructorOptions = { ...options, apiKey }
|
|
72
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
|
+
}
|
|
75
|
+
return new SeamHttpUnstableAccessMethods(constructorOptions)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static fromClientSessionToken(
|
|
79
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
80
|
+
options: Omit<
|
|
81
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
82
|
+
'clientSessionToken'
|
|
83
|
+
> = {},
|
|
84
|
+
): SeamHttpUnstableAccessMethods {
|
|
85
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
86
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
|
+
}
|
|
89
|
+
return new SeamHttpUnstableAccessMethods(constructorOptions)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static async fromPublishableKey(
|
|
93
|
+
publishableKey: string,
|
|
94
|
+
userIdentifierKey: string,
|
|
95
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
+
): Promise<SeamHttpUnstableAccessMethods> {
|
|
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 SeamHttpUnstableAccessMethods.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 SeamHttpUnstableAccessMethods.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
|
+
): SeamHttpUnstableAccessMethods {
|
|
120
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
121
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
122
|
+
throw new SeamHttpInvalidOptionsError(
|
|
123
|
+
'Missing consoleSessionToken or workspaceId',
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
return new SeamHttpUnstableAccessMethods(constructorOptions)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static fromPersonalAccessToken(
|
|
130
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
131
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
132
|
+
options: Omit<
|
|
133
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
134
|
+
'personalAccessToken' | 'workspaceId'
|
|
135
|
+
> = {},
|
|
136
|
+
): SeamHttpUnstableAccessMethods {
|
|
137
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
138
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
139
|
+
throw new SeamHttpInvalidOptionsError(
|
|
140
|
+
'Missing personalAccessToken or workspaceId',
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
return new SeamHttpUnstableAccessMethods(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
|
+
delete(
|
|
172
|
+
params?: UnstableAccessMethodsDeleteParams,
|
|
173
|
+
): SeamHttpRequest<void, undefined> {
|
|
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: '/unstable_access_methods/delete',
|
|
181
|
+
method: 'POST',
|
|
182
|
+
body: params,
|
|
183
|
+
responseKey: undefined,
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
get(
|
|
188
|
+
params?: UnstableAccessMethodsGetParams,
|
|
189
|
+
): SeamHttpRequest<UnstableAccessMethodsGetResponse, 'access_method'> {
|
|
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: '/unstable_access_methods/get',
|
|
197
|
+
method: 'POST',
|
|
198
|
+
body: params,
|
|
199
|
+
responseKey: 'access_method',
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
list(
|
|
204
|
+
params?: UnstableAccessMethodsListParams,
|
|
205
|
+
): SeamHttpRequest<UnstableAccessMethodsListResponse, 'access_methods'> {
|
|
206
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
207
|
+
throw new Error(
|
|
208
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
return new SeamHttpRequest(this, {
|
|
212
|
+
pathname: '/unstable_access_methods/list',
|
|
213
|
+
method: 'POST',
|
|
214
|
+
body: params,
|
|
215
|
+
responseKey: 'access_methods',
|
|
216
|
+
})
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type UnstableAccessMethodsDeleteParams =
|
|
221
|
+
RouteRequestBody<'/unstable_access_methods/delete'>
|
|
222
|
+
|
|
223
|
+
export type UnstableAccessMethodsDeleteResponse = SetNonNullable<
|
|
224
|
+
Required<RouteResponse<'/unstable_access_methods/delete'>>
|
|
225
|
+
>
|
|
226
|
+
|
|
227
|
+
export type UnstableAccessMethodsDeleteOptions = never
|
|
228
|
+
|
|
229
|
+
export type UnstableAccessMethodsGetParams =
|
|
230
|
+
RouteRequestBody<'/unstable_access_methods/get'>
|
|
231
|
+
|
|
232
|
+
export type UnstableAccessMethodsGetResponse = SetNonNullable<
|
|
233
|
+
Required<RouteResponse<'/unstable_access_methods/get'>>
|
|
234
|
+
>
|
|
235
|
+
|
|
236
|
+
export type UnstableAccessMethodsGetOptions = never
|
|
237
|
+
|
|
238
|
+
export type UnstableAccessMethodsListParams =
|
|
239
|
+
RouteRequestBody<'/unstable_access_methods/list'>
|
|
240
|
+
|
|
241
|
+
export type UnstableAccessMethodsListResponse = SetNonNullable<
|
|
242
|
+
Required<RouteResponse<'/unstable_access_methods/list'>>
|
|
243
|
+
>
|
|
244
|
+
|
|
245
|
+
export type UnstableAccessMethodsListOptions = never
|