@seamapi/http 1.33.0 → 1.35.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/dist/connect.cjs +921 -510
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +314 -147
- package/lib/seam/connect/index.d.ts +0 -1
- package/lib/seam/connect/index.js +0 -1
- package/lib/seam/connect/index.js.map +1 -1
- package/lib/seam/connect/routes/{access-codes.d.ts → access-codes/access-codes.d.ts} +13 -11
- package/lib/seam/connect/routes/{access-codes.js → access-codes/access-codes.js} +33 -30
- package/lib/seam/connect/routes/access-codes/access-codes.js.map +1 -0
- package/lib/seam/connect/routes/access-codes/index.d.ts +3 -0
- package/lib/seam/connect/routes/access-codes/index.js +8 -0
- package/lib/seam/connect/routes/access-codes/index.js.map +1 -0
- package/lib/seam/connect/routes/access-codes/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-codes/simulate/index.js +6 -0
- package/lib/seam/connect/routes/access-codes/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{access-codes-simulate.d.ts → access-codes/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{access-codes-simulate.js → access-codes/simulate/simulate.js} +14 -11
- package/lib/seam/connect/routes/{unstable-partner.js.map → access-codes/simulate/simulate.js.map} +1 -1
- package/lib/seam/connect/routes/access-codes/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-codes/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/access-codes/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/{access-codes-unmanaged.d.ts → access-codes/unmanaged/unmanaged.d.ts} +10 -8
- package/lib/seam/connect/routes/{access-codes-unmanaged.js → access-codes/unmanaged/unmanaged.js} +24 -21
- package/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/access-grants/access-grants.d.ts +37 -0
- package/lib/seam/connect/routes/access-grants/access-grants.js +119 -0
- package/lib/seam/connect/routes/{noise-sensors.js.map → access-grants/access-grants.js.map} +1 -1
- package/lib/seam/connect/routes/access-grants/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-grants/index.js +6 -0
- package/lib/seam/connect/routes/access-grants/index.js.map +1 -0
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +33 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +111 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -0
- package/lib/seam/connect/routes/access-methods/index.d.ts +1 -0
- package/lib/seam/connect/routes/access-methods/index.js +6 -0
- package/lib/seam/connect/routes/access-methods/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs-access-groups.d.ts → acs/access-groups/access-groups.d.ts} +12 -10
- package/lib/seam/connect/routes/{acs-access-groups.js → acs/access-groups/access-groups.js} +29 -26
- package/lib/seam/connect/routes/acs/access-groups/access-groups.js.map +1 -0
- package/lib/seam/connect/routes/acs/access-groups/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/access-groups/index.js +6 -0
- package/lib/seam/connect/routes/acs/access-groups/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs.d.ts → acs/acs.d.ts} +13 -11
- package/lib/seam/connect/routes/{acs.js → acs/acs.js} +20 -17
- package/lib/seam/connect/routes/acs/acs.js.map +1 -0
- package/lib/seam/connect/routes/{acs-credentials.d.ts → acs/credentials/credentials.d.ts} +11 -9
- package/lib/seam/connect/routes/{acs-credentials.js → acs/credentials/credentials.js} +29 -26
- package/lib/seam/connect/routes/acs/credentials/credentials.js.map +1 -0
- package/lib/seam/connect/routes/acs/credentials/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/credentials/index.js +6 -0
- package/lib/seam/connect/routes/acs/credentials/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs-encoders.d.ts → acs/encoders/encoders.d.ts} +13 -11
- package/lib/seam/connect/routes/{acs-encoders.js → acs/encoders/encoders.js} +23 -20
- package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -0
- package/lib/seam/connect/routes/acs/encoders/index.d.ts +2 -0
- package/lib/seam/connect/routes/acs/encoders/index.js +7 -0
- package/lib/seam/connect/routes/acs/encoders/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/encoders/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/encoders/simulate/index.js +6 -0
- package/lib/seam/connect/routes/acs/encoders/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs-encoders-simulate.d.ts → acs/encoders/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{acs-encoders-simulate.js → acs/encoders/simulate/simulate.js} +17 -14
- package/lib/seam/connect/routes/acs/encoders/simulate/simulate.js.map +1 -0
- package/lib/seam/connect/routes/{acs-entrances.d.ts → acs/entrances/entrances.d.ts} +10 -8
- package/lib/seam/connect/routes/{acs-entrances.js → acs/entrances/entrances.js} +23 -20
- package/lib/seam/connect/routes/acs/entrances/entrances.js.map +1 -0
- package/lib/seam/connect/routes/acs/entrances/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/entrances/index.js +6 -0
- package/lib/seam/connect/routes/acs/entrances/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/index.d.ts +7 -0
- package/lib/seam/connect/routes/acs/index.js +12 -0
- package/lib/seam/connect/routes/acs/index.js.map +1 -0
- package/lib/seam/connect/routes/acs/systems/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/systems/index.js +6 -0
- package/lib/seam/connect/routes/acs/systems/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs-systems.d.ts → acs/systems/systems.d.ts} +10 -8
- package/lib/seam/connect/routes/{acs-systems.js → acs/systems/systems.js} +22 -19
- package/lib/seam/connect/routes/acs/systems/systems.js.map +1 -0
- package/lib/seam/connect/routes/acs/users/index.d.ts +1 -0
- package/lib/seam/connect/routes/acs/users/index.js +6 -0
- package/lib/seam/connect/routes/acs/users/index.js.map +1 -0
- package/lib/seam/connect/routes/{acs-users.d.ts → acs/users/users.d.ts} +13 -11
- package/lib/seam/connect/routes/{acs-users.js → acs/users/users.js} +36 -33
- package/lib/seam/connect/routes/acs/users/users.js.map +1 -0
- package/lib/seam/connect/routes/{action-attempts.d.ts → action-attempts/action-attempts.d.ts} +9 -7
- package/lib/seam/connect/routes/{action-attempts.js → action-attempts/action-attempts.js} +18 -15
- package/lib/seam/connect/routes/action-attempts/action-attempts.js.map +1 -0
- package/lib/seam/connect/routes/action-attempts/index.d.ts +1 -0
- package/lib/seam/connect/routes/action-attempts/index.js +6 -0
- package/lib/seam/connect/routes/action-attempts/index.js.map +1 -0
- package/lib/seam/connect/routes/{client-sessions.d.ts → client-sessions/client-sessions.d.ts} +11 -9
- package/lib/seam/connect/routes/{client-sessions.js → client-sessions/client-sessions.js} +26 -23
- package/lib/seam/connect/routes/client-sessions/client-sessions.js.map +1 -0
- package/lib/seam/connect/routes/client-sessions/index.d.ts +1 -0
- package/lib/seam/connect/routes/client-sessions/index.js +6 -0
- package/lib/seam/connect/routes/client-sessions/index.js.map +1 -0
- package/lib/seam/connect/routes/{connect-webviews.d.ts → connect-webviews/connect-webviews.d.ts} +10 -8
- package/lib/seam/connect/routes/{connect-webviews.js → connect-webviews/connect-webviews.js} +22 -19
- package/lib/seam/connect/routes/connect-webviews/connect-webviews.js.map +1 -0
- package/lib/seam/connect/routes/connect-webviews/index.d.ts +1 -0
- package/lib/seam/connect/routes/connect-webviews/index.js +6 -0
- package/lib/seam/connect/routes/connect-webviews/index.js.map +1 -0
- package/lib/seam/connect/routes/{connected-accounts.d.ts → connected-accounts/connected-accounts.d.ts} +10 -8
- package/lib/seam/connect/routes/{connected-accounts.js → connected-accounts/connected-accounts.js} +23 -20
- package/lib/seam/connect/routes/connected-accounts/connected-accounts.js.map +1 -0
- package/lib/seam/connect/routes/connected-accounts/index.d.ts +1 -0
- package/lib/seam/connect/routes/connected-accounts/index.js +6 -0
- package/lib/seam/connect/routes/connected-accounts/index.js.map +1 -0
- package/lib/seam/connect/routes/{devices.d.ts → devices/devices.d.ts} +13 -11
- package/lib/seam/connect/routes/{devices.js → devices/devices.js} +27 -24
- package/lib/seam/connect/routes/devices/devices.js.map +1 -0
- package/lib/seam/connect/routes/devices/index.d.ts +3 -0
- package/lib/seam/connect/routes/devices/index.js +8 -0
- package/lib/seam/connect/routes/devices/index.js.map +1 -0
- package/lib/seam/connect/routes/devices/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/devices/simulate/index.js +6 -0
- package/lib/seam/connect/routes/devices/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{devices-simulate.d.ts → devices/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{devices-simulate.js → devices/simulate/simulate.js} +16 -13
- package/lib/seam/connect/routes/devices/simulate/simulate.js.map +1 -0
- package/lib/seam/connect/routes/devices/unmanaged/index.d.ts +1 -0
- package/lib/seam/connect/routes/devices/unmanaged/index.js +6 -0
- package/lib/seam/connect/routes/devices/unmanaged/index.js.map +1 -0
- package/lib/seam/connect/routes/{devices-unmanaged.d.ts → devices/unmanaged/unmanaged.d.ts} +9 -7
- package/lib/seam/connect/routes/{devices-unmanaged.js → devices/unmanaged/unmanaged.js} +20 -17
- package/lib/seam/connect/routes/devices/unmanaged/unmanaged.js.map +1 -0
- package/lib/seam/connect/routes/{events.d.ts → events/events.d.ts} +9 -7
- package/lib/seam/connect/routes/{events.js → events/events.js} +18 -15
- package/lib/seam/connect/routes/events/events.js.map +1 -0
- package/lib/seam/connect/routes/events/index.d.ts +1 -0
- package/lib/seam/connect/routes/events/index.js +6 -0
- package/lib/seam/connect/routes/events/index.js.map +1 -0
- package/lib/seam/connect/routes/index.d.ts +19 -34
- package/lib/seam/connect/routes/index.js +23 -34
- 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 +6 -0
- package/lib/seam/connect/routes/locks/index.js.map +1 -0
- package/lib/seam/connect/routes/{locks.d.ts → locks/locks.d.ts} +11 -9
- package/lib/seam/connect/routes/{locks.js → locks/locks.js} +20 -17
- package/lib/seam/connect/routes/locks/locks.js.map +1 -0
- package/lib/seam/connect/routes/noise-sensors/index.d.ts +3 -0
- package/lib/seam/connect/routes/noise-sensors/index.js +8 -0
- package/lib/seam/connect/routes/noise-sensors/index.js.map +1 -0
- package/lib/seam/connect/routes/{noise-sensors.d.ts → noise-sensors/noise-sensors.d.ts} +10 -8
- package/lib/seam/connect/routes/{noise-sensors.js → noise-sensors/noise-sensors.js} +17 -14
- package/lib/seam/connect/routes/noise-sensors/noise-sensors.js.map +1 -0
- package/lib/seam/connect/routes/noise-sensors/noise-thresholds/index.d.ts +1 -0
- package/lib/seam/connect/routes/noise-sensors/noise-thresholds/index.js +6 -0
- package/lib/seam/connect/routes/noise-sensors/noise-thresholds/index.js.map +1 -0
- package/lib/seam/connect/routes/{noise-sensors-noise-thresholds.d.ts → noise-sensors/noise-thresholds/noise-thresholds.d.ts} +10 -8
- package/lib/seam/connect/routes/{noise-sensors-noise-thresholds.js → noise-sensors/noise-thresholds/noise-thresholds.js} +24 -21
- package/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -0
- package/lib/seam/connect/routes/noise-sensors/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/noise-sensors/simulate/index.js +6 -0
- package/lib/seam/connect/routes/noise-sensors/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{noise-sensors-simulate.d.ts → noise-sensors/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{noise-sensors-simulate.js → noise-sensors/simulate/simulate.js} +14 -11
- package/lib/seam/connect/routes/noise-sensors/simulate/simulate.js.map +1 -0
- package/lib/seam/connect/routes/phones/index.d.ts +2 -0
- package/lib/seam/connect/routes/phones/index.js +7 -0
- package/lib/seam/connect/routes/phones/index.js.map +1 -0
- package/lib/seam/connect/routes/{phones.d.ts → phones/phones.d.ts} +11 -9
- package/lib/seam/connect/routes/{phones.js → phones/phones.js} +22 -19
- package/lib/seam/connect/routes/{events.js.map → phones/phones.js.map} +1 -1
- package/lib/seam/connect/routes/phones/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/phones/simulate/index.js +6 -0
- package/lib/seam/connect/routes/phones/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{phones-simulate.d.ts → phones/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{phones-simulate.js → phones/simulate/simulate.js} +14 -11
- package/lib/seam/connect/routes/phones/simulate/simulate.js.map +1 -0
- package/lib/seam/connect/{seam-http.d.ts → routes/seam-http.d.ts} +27 -7
- package/lib/seam/connect/{seam-http.js → routes/seam-http.js} +40 -10
- package/lib/seam/connect/routes/seam-http.js.map +1 -0
- package/lib/seam/connect/routes/spaces/index.d.ts +1 -0
- package/lib/seam/connect/routes/spaces/index.js +6 -0
- package/lib/seam/connect/routes/spaces/index.js.map +1 -0
- package/lib/seam/connect/routes/spaces/spaces.d.ts +57 -0
- package/lib/seam/connect/routes/spaces/spaces.js +159 -0
- package/lib/seam/connect/routes/spaces/spaces.js.map +1 -0
- package/lib/seam/connect/routes/{thermostats-daily-programs.d.ts → thermostats/daily-programs/daily-programs.d.ts} +9 -7
- package/lib/seam/connect/routes/{thermostats-daily-programs.js → thermostats/daily-programs/daily-programs.js} +18 -15
- package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js.map +1 -0
- package/lib/seam/connect/routes/thermostats/daily-programs/index.d.ts +1 -0
- package/lib/seam/connect/routes/thermostats/daily-programs/index.js +6 -0
- package/lib/seam/connect/routes/thermostats/daily-programs/index.js.map +1 -0
- package/lib/seam/connect/routes/thermostats/index.d.ts +4 -0
- package/lib/seam/connect/routes/thermostats/index.js +9 -0
- package/lib/seam/connect/routes/thermostats/index.js.map +1 -0
- package/lib/seam/connect/routes/thermostats/schedules/index.d.ts +1 -0
- package/lib/seam/connect/routes/thermostats/schedules/index.js +6 -0
- package/lib/seam/connect/routes/thermostats/schedules/index.js.map +1 -0
- package/lib/seam/connect/routes/{thermostats-schedules.d.ts → thermostats/schedules/schedules.d.ts} +10 -8
- package/lib/seam/connect/routes/{thermostats-schedules.js → thermostats/schedules/schedules.js} +24 -21
- package/lib/seam/connect/routes/thermostats/schedules/schedules.js.map +1 -0
- package/lib/seam/connect/routes/thermostats/simulate/index.d.ts +1 -0
- package/lib/seam/connect/routes/thermostats/simulate/index.js +6 -0
- package/lib/seam/connect/routes/thermostats/simulate/index.js.map +1 -0
- package/lib/seam/connect/routes/{thermostats-simulate.d.ts → thermostats/simulate/simulate.d.ts} +7 -5
- package/lib/seam/connect/routes/{thermostats-simulate.js → thermostats/simulate/simulate.js} +15 -12
- package/lib/seam/connect/routes/{thermostats-daily-programs.js.map → thermostats/simulate/simulate.js.map} +1 -1
- package/lib/seam/connect/routes/{thermostats.d.ts → thermostats/thermostats.d.ts} +20 -18
- package/lib/seam/connect/routes/{thermostats.js → thermostats/thermostats.js} +34 -31
- package/lib/seam/connect/routes/thermostats/thermostats.js.map +1 -0
- package/lib/seam/connect/routes/{user-identities-enrollment-automations.d.ts → user-identities/enrollment-automations/enrollment-automations.d.ts} +10 -8
- package/lib/seam/connect/routes/{user-identities-enrollment-automations.js → user-identities/enrollment-automations/enrollment-automations.js} +23 -20
- package/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.js.map +1 -0
- package/lib/seam/connect/routes/user-identities/enrollment-automations/index.d.ts +1 -0
- package/lib/seam/connect/routes/user-identities/enrollment-automations/index.js +6 -0
- package/lib/seam/connect/routes/user-identities/enrollment-automations/index.js.map +1 -0
- package/lib/seam/connect/routes/user-identities/index.d.ts +2 -0
- package/lib/seam/connect/routes/user-identities/index.js +7 -0
- package/lib/seam/connect/routes/user-identities/index.js.map +1 -0
- package/lib/seam/connect/routes/{user-identities.d.ts → user-identities/user-identities.d.ts} +16 -14
- package/lib/seam/connect/routes/{user-identities.js → user-identities/user-identities.js} +42 -39
- package/lib/seam/connect/routes/user-identities/user-identities.js.map +1 -0
- package/lib/seam/connect/routes/webhooks/index.d.ts +1 -0
- package/lib/seam/connect/routes/webhooks/index.js +6 -0
- package/lib/seam/connect/routes/webhooks/index.js.map +1 -0
- package/lib/seam/connect/routes/{webhooks.d.ts → webhooks/webhooks.d.ts} +12 -10
- package/lib/seam/connect/routes/{webhooks.js → webhooks/webhooks.js} +23 -20
- package/lib/seam/connect/routes/webhooks/webhooks.js.map +1 -0
- package/lib/seam/connect/routes/workspaces/index.d.ts +1 -0
- package/lib/seam/connect/routes/workspaces/index.js +6 -0
- package/lib/seam/connect/routes/workspaces/index.js.map +1 -0
- package/lib/seam/connect/routes/{workspaces.d.ts → workspaces/workspaces.d.ts} +13 -11
- package/lib/seam/connect/routes/{workspaces.js → workspaces/workspaces.js} +21 -18
- package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +9 -7
- package/src/lib/seam/connect/index.ts +0 -1
- package/src/lib/seam/connect/routes/{access-codes.ts → access-codes/access-codes.ts} +28 -25
- package/src/lib/seam/connect/routes/access-codes/index.ts +8 -0
- package/src/lib/seam/connect/routes/access-codes/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{access-codes-simulate.ts → access-codes/simulate/simulate.ts} +7 -5
- package/src/lib/seam/connect/routes/access-codes/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/{access-codes-unmanaged.ts → access-codes/unmanaged/unmanaged.ts} +17 -15
- package/src/lib/seam/connect/routes/access-grants/access-grants.ts +239 -0
- package/src/lib/seam/connect/routes/access-grants/index.ts +6 -0
- package/src/lib/seam/connect/routes/access-methods/access-methods.ts +221 -0
- package/src/lib/seam/connect/routes/access-methods/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs-access-groups.ts → acs/access-groups/access-groups.ts} +22 -20
- package/src/lib/seam/connect/routes/acs/access-groups/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs.ts → acs/acs.ts} +16 -13
- package/src/lib/seam/connect/routes/{acs-credentials.ts → acs/credentials/credentials.ts} +24 -20
- package/src/lib/seam/connect/routes/acs/credentials/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs-encoders.ts → acs/encoders/encoders.ts} +19 -16
- package/src/lib/seam/connect/routes/acs/encoders/index.ts +7 -0
- package/src/lib/seam/connect/routes/acs/encoders/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs-encoders-simulate.ts → acs/encoders/simulate/simulate.ts} +10 -8
- package/src/lib/seam/connect/routes/{acs-entrances.ts → acs/entrances/entrances.ts} +16 -14
- package/src/lib/seam/connect/routes/acs/entrances/index.ts +6 -0
- package/src/lib/seam/connect/routes/acs/index.ts +12 -0
- package/src/lib/seam/connect/routes/acs/systems/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs-systems.ts → acs/systems/systems.ts} +15 -13
- package/src/lib/seam/connect/routes/acs/users/index.ts +6 -0
- package/src/lib/seam/connect/routes/{acs-users.ts → acs/users/users.ts} +29 -27
- package/src/lib/seam/connect/routes/{action-attempts.ts → action-attempts/action-attempts.ts} +13 -11
- package/src/lib/seam/connect/routes/action-attempts/index.ts +6 -0
- package/src/lib/seam/connect/routes/{client-sessions.ts → client-sessions/client-sessions.ts} +24 -17
- package/src/lib/seam/connect/routes/client-sessions/index.ts +6 -0
- package/src/lib/seam/connect/routes/{connect-webviews.ts → connect-webviews/connect-webviews.ts} +18 -14
- package/src/lib/seam/connect/routes/connect-webviews/index.ts +6 -0
- package/src/lib/seam/connect/routes/{connected-accounts.ts → connected-accounts/connected-accounts.ts} +17 -15
- package/src/lib/seam/connect/routes/connected-accounts/index.ts +6 -0
- package/src/lib/seam/connect/routes/{devices.ts → devices/devices.ts} +24 -19
- package/src/lib/seam/connect/routes/devices/index.ts +8 -0
- package/src/lib/seam/connect/routes/devices/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{devices-simulate.ts → devices/simulate/simulate.ts} +9 -7
- package/src/lib/seam/connect/routes/devices/unmanaged/index.ts +6 -0
- package/src/lib/seam/connect/routes/{devices-unmanaged.ts → devices/unmanaged/unmanaged.ts} +13 -11
- package/src/lib/seam/connect/routes/{events.ts → events/events.ts} +14 -10
- package/src/lib/seam/connect/routes/events/index.ts +6 -0
- package/src/lib/seam/connect/routes/index.ts +24 -34
- package/src/lib/seam/connect/routes/locks/index.ts +6 -0
- package/src/lib/seam/connect/routes/{locks.ts → locks/locks.ts} +18 -14
- package/src/lib/seam/connect/routes/noise-sensors/index.ts +8 -0
- package/src/lib/seam/connect/routes/{noise-sensors.ts → noise-sensors/noise-sensors.ts} +11 -8
- package/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/index.ts +6 -0
- package/src/lib/seam/connect/routes/{noise-sensors-noise-thresholds.ts → noise-sensors/noise-thresholds/noise-thresholds.ts} +17 -15
- package/src/lib/seam/connect/routes/noise-sensors/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{noise-sensors-simulate.ts → noise-sensors/simulate/simulate.ts} +7 -5
- package/src/lib/seam/connect/routes/phones/index.ts +7 -0
- package/src/lib/seam/connect/routes/{phones.ts → phones/phones.ts} +20 -13
- package/src/lib/seam/connect/routes/phones/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{phones-simulate.ts → phones/simulate/simulate.ts} +7 -5
- package/src/lib/seam/connect/{seam-http.ts → routes/seam-http.ts} +49 -28
- package/src/lib/seam/connect/routes/spaces/index.ts +6 -0
- package/src/lib/seam/connect/routes/spaces/spaces.ts +337 -0
- package/src/lib/seam/connect/routes/{thermostats-daily-programs.ts → thermostats/daily-programs/daily-programs.ts} +12 -10
- package/src/lib/seam/connect/routes/thermostats/daily-programs/index.ts +6 -0
- package/src/lib/seam/connect/routes/thermostats/index.ts +9 -0
- package/src/lib/seam/connect/routes/thermostats/schedules/index.ts +6 -0
- package/src/lib/seam/connect/routes/{thermostats-schedules.ts → thermostats/schedules/schedules.ts} +17 -15
- package/src/lib/seam/connect/routes/thermostats/simulate/index.ts +6 -0
- package/src/lib/seam/connect/routes/{thermostats-simulate.ts → thermostats/simulate/simulate.ts} +8 -6
- package/src/lib/seam/connect/routes/{thermostats.ts → thermostats/thermostats.ts} +40 -37
- package/src/lib/seam/connect/routes/{user-identities-enrollment-automations.ts → user-identities/enrollment-automations/enrollment-automations.ts} +16 -14
- package/src/lib/seam/connect/routes/user-identities/enrollment-automations/index.ts +6 -0
- package/src/lib/seam/connect/routes/user-identities/index.ts +7 -0
- package/src/lib/seam/connect/routes/{user-identities.ts → user-identities/user-identities.ts} +38 -33
- package/src/lib/seam/connect/routes/webhooks/index.ts +6 -0
- package/src/lib/seam/connect/routes/{webhooks.ts → webhooks/webhooks.ts} +23 -17
- package/src/lib/seam/connect/routes/workspaces/index.ts +6 -0
- package/src/lib/seam/connect/routes/{workspaces.ts → workspaces/workspaces.ts} +23 -17
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/access-codes-simulate.js.map +0 -1
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +0 -1
- package/lib/seam/connect/routes/access-codes.js.map +0 -1
- package/lib/seam/connect/routes/acs-access-groups.js.map +0 -1
- package/lib/seam/connect/routes/acs-credentials.js.map +0 -1
- package/lib/seam/connect/routes/acs-encoders-simulate.js.map +0 -1
- package/lib/seam/connect/routes/acs-encoders.js.map +0 -1
- package/lib/seam/connect/routes/acs-entrances.js.map +0 -1
- package/lib/seam/connect/routes/acs-systems.js.map +0 -1
- package/lib/seam/connect/routes/acs-users.js.map +0 -1
- package/lib/seam/connect/routes/acs.js.map +0 -1
- package/lib/seam/connect/routes/action-attempts.js.map +0 -1
- package/lib/seam/connect/routes/client-sessions.js.map +0 -1
- package/lib/seam/connect/routes/connect-webviews.js.map +0 -1
- package/lib/seam/connect/routes/connected-accounts.js.map +0 -1
- package/lib/seam/connect/routes/devices-simulate.js.map +0 -1
- package/lib/seam/connect/routes/devices-unmanaged.js.map +0 -1
- package/lib/seam/connect/routes/devices.js.map +0 -1
- package/lib/seam/connect/routes/locks.js.map +0 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +0 -1
- package/lib/seam/connect/routes/noise-sensors-simulate.js.map +0 -1
- package/lib/seam/connect/routes/phones-simulate.js.map +0 -1
- package/lib/seam/connect/routes/phones.js.map +0 -1
- package/lib/seam/connect/routes/thermostats-schedules.js.map +0 -1
- package/lib/seam/connect/routes/thermostats-simulate.js.map +0 -1
- package/lib/seam/connect/routes/thermostats.js.map +0 -1
- package/lib/seam/connect/routes/unstable-partner.d.ts +0 -17
- package/lib/seam/connect/routes/unstable-partner.js +0 -83
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +0 -1
- package/lib/seam/connect/routes/user-identities.js.map +0 -1
- package/lib/seam/connect/routes/webhooks.js.map +0 -1
- package/lib/seam/connect/routes/workspaces.js.map +0 -1
- package/lib/seam/connect/seam-http.js.map +0 -1
- package/src/lib/seam/connect/routes/unstable-partner.ts +0 -160
|
@@ -0,0 +1,221 @@
|
|
|
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 SeamHttpAccessMethods {
|
|
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
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
48
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static fromClient(
|
|
52
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
53
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
54
|
+
): SeamHttpAccessMethods {
|
|
55
|
+
const constructorOptions = { ...options, client }
|
|
56
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
57
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
58
|
+
}
|
|
59
|
+
return new SeamHttpAccessMethods(constructorOptions)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static fromApiKey(
|
|
63
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
64
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
65
|
+
): SeamHttpAccessMethods {
|
|
66
|
+
const constructorOptions = { ...options, apiKey }
|
|
67
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
68
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
69
|
+
}
|
|
70
|
+
return new SeamHttpAccessMethods(constructorOptions)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static fromClientSessionToken(
|
|
74
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
75
|
+
options: Omit<
|
|
76
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
77
|
+
'clientSessionToken'
|
|
78
|
+
> = {},
|
|
79
|
+
): SeamHttpAccessMethods {
|
|
80
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
81
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
82
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
83
|
+
}
|
|
84
|
+
return new SeamHttpAccessMethods(constructorOptions)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static async fromPublishableKey(
|
|
88
|
+
publishableKey: string,
|
|
89
|
+
userIdentifierKey: string,
|
|
90
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
91
|
+
): Promise<SeamHttpAccessMethods> {
|
|
92
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
93
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
94
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
95
|
+
throw new SeamHttpInvalidOptionsError(
|
|
96
|
+
'The client option cannot be used with SeamHttpAccessMethods.fromPublishableKey',
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
const client = createClient(clientOptions)
|
|
100
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
101
|
+
const { token } = await clientSessions.getOrCreate({
|
|
102
|
+
user_identifier_key: userIdentifierKey,
|
|
103
|
+
})
|
|
104
|
+
return SeamHttpAccessMethods.fromClientSessionToken(token, options)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static fromConsoleSessionToken(
|
|
108
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
109
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
110
|
+
options: Omit<
|
|
111
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
112
|
+
'consoleSessionToken' | 'workspaceId'
|
|
113
|
+
> = {},
|
|
114
|
+
): SeamHttpAccessMethods {
|
|
115
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
116
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
117
|
+
throw new SeamHttpInvalidOptionsError(
|
|
118
|
+
'Missing consoleSessionToken or workspaceId',
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
return new SeamHttpAccessMethods(constructorOptions)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static fromPersonalAccessToken(
|
|
125
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
126
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
127
|
+
options: Omit<
|
|
128
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
129
|
+
'personalAccessToken' | 'workspaceId'
|
|
130
|
+
> = {},
|
|
131
|
+
): SeamHttpAccessMethods {
|
|
132
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
133
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
134
|
+
throw new SeamHttpInvalidOptionsError(
|
|
135
|
+
'Missing personalAccessToken or workspaceId',
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
return new SeamHttpAccessMethods(constructorOptions)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
142
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
143
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
144
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async updateClientSessionToken(
|
|
148
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
149
|
+
): Promise<void> {
|
|
150
|
+
const { headers } = this.client.defaults
|
|
151
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
152
|
+
clientSessionToken,
|
|
153
|
+
})
|
|
154
|
+
for (const key of Object.keys(authHeaders)) {
|
|
155
|
+
if (headers[key] == null) {
|
|
156
|
+
throw new Error(
|
|
157
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
162
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
163
|
+
await clientSessions.get()
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
delete(params?: AccessMethodsDeleteParams): SeamHttpRequest<void, undefined> {
|
|
167
|
+
return new SeamHttpRequest(this, {
|
|
168
|
+
pathname: '/access_methods/delete',
|
|
169
|
+
method: 'POST',
|
|
170
|
+
body: params,
|
|
171
|
+
responseKey: undefined,
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
get(
|
|
176
|
+
params?: AccessMethodsGetParams,
|
|
177
|
+
): SeamHttpRequest<AccessMethodsGetResponse, 'access_method'> {
|
|
178
|
+
return new SeamHttpRequest(this, {
|
|
179
|
+
pathname: '/access_methods/get',
|
|
180
|
+
method: 'POST',
|
|
181
|
+
body: params,
|
|
182
|
+
responseKey: 'access_method',
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
list(
|
|
187
|
+
params?: AccessMethodsListParams,
|
|
188
|
+
): SeamHttpRequest<AccessMethodsListResponse, 'access_methods'> {
|
|
189
|
+
return new SeamHttpRequest(this, {
|
|
190
|
+
pathname: '/access_methods/list',
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body: params,
|
|
193
|
+
responseKey: 'access_methods',
|
|
194
|
+
})
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type AccessMethodsDeleteParams =
|
|
199
|
+
RouteRequestBody<'/access_methods/delete'>
|
|
200
|
+
|
|
201
|
+
export type AccessMethodsDeleteResponse = SetNonNullable<
|
|
202
|
+
Required<RouteResponse<'/access_methods/delete'>>
|
|
203
|
+
>
|
|
204
|
+
|
|
205
|
+
export type AccessMethodsDeleteOptions = never
|
|
206
|
+
|
|
207
|
+
export type AccessMethodsGetParams = RouteRequestBody<'/access_methods/get'>
|
|
208
|
+
|
|
209
|
+
export type AccessMethodsGetResponse = SetNonNullable<
|
|
210
|
+
Required<RouteResponse<'/access_methods/get'>>
|
|
211
|
+
>
|
|
212
|
+
|
|
213
|
+
export type AccessMethodsGetOptions = never
|
|
214
|
+
|
|
215
|
+
export type AccessMethodsListParams = RouteRequestBody<'/access_methods/list'>
|
|
216
|
+
|
|
217
|
+
export type AccessMethodsListResponse = SetNonNullable<
|
|
218
|
+
Required<RouteResponse<'/access_methods/list'>>
|
|
219
|
+
>
|
|
220
|
+
|
|
221
|
+
export type AccessMethodsListOptions = never
|
package/src/lib/seam/connect/routes/{acs-access-groups.ts → acs/access-groups/access-groups.ts}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Automatically generated by
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
7
|
|
|
8
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
8
9
|
import {
|
|
9
10
|
getAuthHeadersForClientSessionToken,
|
|
10
11
|
warnOnInsecureuserIdentifierKey,
|
|
@@ -30,15 +31,16 @@ import {
|
|
|
30
31
|
limitToSeamHttpRequestOptions,
|
|
31
32
|
parseOptions,
|
|
32
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
33
35
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
36
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
35
37
|
import type { SetNonNullable } from 'lib/types.js'
|
|
36
38
|
|
|
37
|
-
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
|
-
|
|
39
39
|
export class SeamHttpAcsAccessGroups {
|
|
40
40
|
client: Client
|
|
41
41
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
43
|
+
static ltsVersion = seamApiLtsVersion
|
|
42
44
|
|
|
43
45
|
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
44
46
|
const options = parseOptions(apiKeyOrOptions)
|
|
@@ -91,7 +93,7 @@ export class SeamHttpAcsAccessGroups {
|
|
|
91
93
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
92
94
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
93
95
|
throw new SeamHttpInvalidOptionsError(
|
|
94
|
-
'The client option cannot be used with
|
|
96
|
+
'The client option cannot be used with SeamHttpAcsAccessGroups.fromPublishableKey',
|
|
95
97
|
)
|
|
96
98
|
}
|
|
97
99
|
const client = createClient(clientOptions)
|
|
@@ -164,66 +166,66 @@ export class SeamHttpAcsAccessGroups {
|
|
|
164
166
|
addUser(body?: AcsAccessGroupsAddUserBody): SeamHttpRequest<void, undefined> {
|
|
165
167
|
return new SeamHttpRequest(this, {
|
|
166
168
|
pathname: '/acs/access_groups/add_user',
|
|
167
|
-
method: '
|
|
169
|
+
method: 'PUT',
|
|
168
170
|
body,
|
|
169
171
|
responseKey: undefined,
|
|
170
172
|
})
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
get(
|
|
174
|
-
|
|
176
|
+
params?: AcsAccessGroupsGetParams,
|
|
175
177
|
): SeamHttpRequest<AcsAccessGroupsGetResponse, 'acs_access_group'> {
|
|
176
178
|
return new SeamHttpRequest(this, {
|
|
177
179
|
pathname: '/acs/access_groups/get',
|
|
178
|
-
method: '
|
|
179
|
-
body,
|
|
180
|
+
method: 'POST',
|
|
181
|
+
body: params,
|
|
180
182
|
responseKey: 'acs_access_group',
|
|
181
183
|
})
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
list(
|
|
185
|
-
|
|
187
|
+
params?: AcsAccessGroupsListParams,
|
|
186
188
|
): SeamHttpRequest<AcsAccessGroupsListResponse, 'acs_access_groups'> {
|
|
187
189
|
return new SeamHttpRequest(this, {
|
|
188
190
|
pathname: '/acs/access_groups/list',
|
|
189
|
-
method: '
|
|
190
|
-
body,
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body: params,
|
|
191
193
|
responseKey: 'acs_access_groups',
|
|
192
194
|
})
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
listAccessibleEntrances(
|
|
196
|
-
|
|
198
|
+
params?: AcsAccessGroupsListAccessibleEntrancesParams,
|
|
197
199
|
): SeamHttpRequest<
|
|
198
200
|
AcsAccessGroupsListAccessibleEntrancesResponse,
|
|
199
201
|
'acs_entrances'
|
|
200
202
|
> {
|
|
201
203
|
return new SeamHttpRequest(this, {
|
|
202
204
|
pathname: '/acs/access_groups/list_accessible_entrances',
|
|
203
|
-
method: '
|
|
204
|
-
body,
|
|
205
|
+
method: 'POST',
|
|
206
|
+
body: params,
|
|
205
207
|
responseKey: 'acs_entrances',
|
|
206
208
|
})
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
listUsers(
|
|
210
|
-
|
|
212
|
+
params?: AcsAccessGroupsListUsersParams,
|
|
211
213
|
): SeamHttpRequest<AcsAccessGroupsListUsersResponse, 'acs_users'> {
|
|
212
214
|
return new SeamHttpRequest(this, {
|
|
213
215
|
pathname: '/acs/access_groups/list_users',
|
|
214
|
-
method: '
|
|
215
|
-
body,
|
|
216
|
+
method: 'POST',
|
|
217
|
+
body: params,
|
|
216
218
|
responseKey: 'acs_users',
|
|
217
219
|
})
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
removeUser(
|
|
221
|
-
|
|
223
|
+
params?: AcsAccessGroupsRemoveUserParams,
|
|
222
224
|
): SeamHttpRequest<void, undefined> {
|
|
223
225
|
return new SeamHttpRequest(this, {
|
|
224
226
|
pathname: '/acs/access_groups/remove_user',
|
|
225
|
-
method: '
|
|
226
|
-
body,
|
|
227
|
+
method: 'POST',
|
|
228
|
+
body: params,
|
|
227
229
|
responseKey: undefined,
|
|
228
230
|
})
|
|
229
231
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Automatically generated by
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
6
7
|
import {
|
|
7
8
|
getAuthHeadersForClientSessionToken,
|
|
8
9
|
warnOnInsecureuserIdentifierKey,
|
|
@@ -28,20 +29,22 @@ import {
|
|
|
28
29
|
limitToSeamHttpRequestOptions,
|
|
29
30
|
parseOptions,
|
|
30
31
|
} from 'lib/seam/connect/parse-options.js'
|
|
32
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
31
33
|
import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
32
34
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
33
35
|
|
|
34
|
-
import { SeamHttpAcsAccessGroups } from './
|
|
35
|
-
import { SeamHttpAcsCredentials } from './
|
|
36
|
-
import { SeamHttpAcsEncoders } from './
|
|
37
|
-
import { SeamHttpAcsEntrances } from './
|
|
38
|
-
import { SeamHttpAcsSystems } from './
|
|
39
|
-
import { SeamHttpAcsUsers } from './
|
|
40
|
-
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
|
+
import { SeamHttpAcsAccessGroups } from './access-groups/index.js'
|
|
37
|
+
import { SeamHttpAcsCredentials } from './credentials/index.js'
|
|
38
|
+
import { SeamHttpAcsEncoders } from './encoders/index.js'
|
|
39
|
+
import { SeamHttpAcsEntrances } from './entrances/index.js'
|
|
40
|
+
import { SeamHttpAcsSystems } from './systems/index.js'
|
|
41
|
+
import { SeamHttpAcsUsers } from './users/index.js'
|
|
41
42
|
|
|
42
43
|
export class SeamHttpAcs {
|
|
43
44
|
client: Client
|
|
44
45
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
46
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
47
|
+
static ltsVersion = seamApiLtsVersion
|
|
45
48
|
|
|
46
49
|
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
47
50
|
const options = parseOptions(apiKeyOrOptions)
|
|
@@ -94,7 +97,7 @@ export class SeamHttpAcs {
|
|
|
94
97
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
95
98
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
96
99
|
throw new SeamHttpInvalidOptionsError(
|
|
97
|
-
'The client option cannot be used with
|
|
100
|
+
'The client option cannot be used with SeamHttpAcs.fromPublishableKey',
|
|
98
101
|
)
|
|
99
102
|
}
|
|
100
103
|
const client = createClient(clientOptions)
|
|
@@ -172,14 +175,14 @@ export class SeamHttpAcs {
|
|
|
172
175
|
return SeamHttpAcsCredentials.fromClient(this.client, this.defaults)
|
|
173
176
|
}
|
|
174
177
|
|
|
175
|
-
get entrances(): SeamHttpAcsEntrances {
|
|
176
|
-
return SeamHttpAcsEntrances.fromClient(this.client, this.defaults)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
178
|
get encoders(): SeamHttpAcsEncoders {
|
|
180
179
|
return SeamHttpAcsEncoders.fromClient(this.client, this.defaults)
|
|
181
180
|
}
|
|
182
181
|
|
|
182
|
+
get entrances(): SeamHttpAcsEntrances {
|
|
183
|
+
return SeamHttpAcsEntrances.fromClient(this.client, this.defaults)
|
|
184
|
+
}
|
|
185
|
+
|
|
183
186
|
get systems(): SeamHttpAcsSystems {
|
|
184
187
|
return SeamHttpAcsSystems.fromClient(this.client, this.defaults)
|
|
185
188
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Automatically generated by
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
7
|
|
|
8
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
8
9
|
import {
|
|
9
10
|
getAuthHeadersForClientSessionToken,
|
|
10
11
|
warnOnInsecureuserIdentifierKey,
|
|
@@ -30,15 +31,16 @@ import {
|
|
|
30
31
|
limitToSeamHttpRequestOptions,
|
|
31
32
|
parseOptions,
|
|
32
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
33
35
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
36
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
35
37
|
import type { SetNonNullable } from 'lib/types.js'
|
|
36
38
|
|
|
37
|
-
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
|
-
|
|
39
39
|
export class SeamHttpAcsCredentials {
|
|
40
40
|
client: Client
|
|
41
41
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
43
|
+
static ltsVersion = seamApiLtsVersion
|
|
42
44
|
|
|
43
45
|
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
44
46
|
const options = parseOptions(apiKeyOrOptions)
|
|
@@ -91,7 +93,7 @@ export class SeamHttpAcsCredentials {
|
|
|
91
93
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
92
94
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
93
95
|
throw new SeamHttpInvalidOptionsError(
|
|
94
|
-
'The client option cannot be used with
|
|
96
|
+
'The client option cannot be used with SeamHttpAcsCredentials.fromPublishableKey',
|
|
95
97
|
)
|
|
96
98
|
}
|
|
97
99
|
const client = createClient(clientOptions)
|
|
@@ -164,7 +166,7 @@ export class SeamHttpAcsCredentials {
|
|
|
164
166
|
assign(body?: AcsCredentialsAssignBody): SeamHttpRequest<void, undefined> {
|
|
165
167
|
return new SeamHttpRequest(this, {
|
|
166
168
|
pathname: '/acs/credentials/assign',
|
|
167
|
-
method: '
|
|
169
|
+
method: 'PATCH',
|
|
168
170
|
body,
|
|
169
171
|
responseKey: undefined,
|
|
170
172
|
})
|
|
@@ -175,53 +177,55 @@ export class SeamHttpAcsCredentials {
|
|
|
175
177
|
): SeamHttpRequest<AcsCredentialsCreateResponse, 'acs_credential'> {
|
|
176
178
|
return new SeamHttpRequest(this, {
|
|
177
179
|
pathname: '/acs/credentials/create',
|
|
178
|
-
method: '
|
|
180
|
+
method: 'POST',
|
|
179
181
|
body,
|
|
180
182
|
responseKey: 'acs_credential',
|
|
181
183
|
})
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
delete(
|
|
186
|
+
delete(
|
|
187
|
+
params?: AcsCredentialsDeleteParams,
|
|
188
|
+
): SeamHttpRequest<void, undefined> {
|
|
185
189
|
return new SeamHttpRequest(this, {
|
|
186
190
|
pathname: '/acs/credentials/delete',
|
|
187
|
-
method: '
|
|
188
|
-
body,
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body: params,
|
|
189
193
|
responseKey: undefined,
|
|
190
194
|
})
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
get(
|
|
194
|
-
|
|
198
|
+
params?: AcsCredentialsGetParams,
|
|
195
199
|
): SeamHttpRequest<AcsCredentialsGetResponse, 'acs_credential'> {
|
|
196
200
|
return new SeamHttpRequest(this, {
|
|
197
201
|
pathname: '/acs/credentials/get',
|
|
198
|
-
method: '
|
|
199
|
-
body,
|
|
202
|
+
method: 'POST',
|
|
203
|
+
body: params,
|
|
200
204
|
responseKey: 'acs_credential',
|
|
201
205
|
})
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
list(
|
|
205
|
-
|
|
209
|
+
params?: AcsCredentialsListParams,
|
|
206
210
|
): SeamHttpRequest<AcsCredentialsListResponse, 'acs_credentials'> {
|
|
207
211
|
return new SeamHttpRequest(this, {
|
|
208
212
|
pathname: '/acs/credentials/list',
|
|
209
|
-
method: '
|
|
210
|
-
body,
|
|
213
|
+
method: 'POST',
|
|
214
|
+
body: params,
|
|
211
215
|
responseKey: 'acs_credentials',
|
|
212
216
|
})
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
listAccessibleEntrances(
|
|
216
|
-
|
|
220
|
+
params?: AcsCredentialsListAccessibleEntrancesParams,
|
|
217
221
|
): SeamHttpRequest<
|
|
218
222
|
AcsCredentialsListAccessibleEntrancesResponse,
|
|
219
223
|
'acs_entrances'
|
|
220
224
|
> {
|
|
221
225
|
return new SeamHttpRequest(this, {
|
|
222
226
|
pathname: '/acs/credentials/list_accessible_entrances',
|
|
223
|
-
method: '
|
|
224
|
-
body,
|
|
227
|
+
method: 'POST',
|
|
228
|
+
body: params,
|
|
225
229
|
responseKey: 'acs_entrances',
|
|
226
230
|
})
|
|
227
231
|
}
|
|
@@ -231,7 +235,7 @@ export class SeamHttpAcsCredentials {
|
|
|
231
235
|
): SeamHttpRequest<void, undefined> {
|
|
232
236
|
return new SeamHttpRequest(this, {
|
|
233
237
|
pathname: '/acs/credentials/unassign',
|
|
234
|
-
method: '
|
|
238
|
+
method: 'PATCH',
|
|
235
239
|
body,
|
|
236
240
|
responseKey: undefined,
|
|
237
241
|
})
|
|
@@ -240,7 +244,7 @@ export class SeamHttpAcsCredentials {
|
|
|
240
244
|
update(body?: AcsCredentialsUpdateBody): SeamHttpRequest<void, undefined> {
|
|
241
245
|
return new SeamHttpRequest(this, {
|
|
242
246
|
pathname: '/acs/credentials/update',
|
|
243
|
-
method: '
|
|
247
|
+
method: 'PATCH',
|
|
244
248
|
body,
|
|
245
249
|
responseKey: undefined,
|
|
246
250
|
})
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Automatically generated by
|
|
2
|
+
* Automatically generated by codegen/smith.ts.
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
7
|
|
|
8
|
+
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
8
9
|
import {
|
|
9
10
|
getAuthHeadersForClientSessionToken,
|
|
10
11
|
warnOnInsecureuserIdentifierKey,
|
|
@@ -30,16 +31,18 @@ import {
|
|
|
30
31
|
limitToSeamHttpRequestOptions,
|
|
31
32
|
parseOptions,
|
|
32
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
33
35
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
36
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
35
37
|
import type { SetNonNullable } from 'lib/types.js'
|
|
36
38
|
|
|
37
|
-
import { SeamHttpAcsEncodersSimulate } from './
|
|
38
|
-
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
39
|
+
import { SeamHttpAcsEncodersSimulate } from './simulate/index.js'
|
|
39
40
|
|
|
40
41
|
export class SeamHttpAcsEncoders {
|
|
41
42
|
client: Client
|
|
42
43
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
44
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
45
|
+
static ltsVersion = seamApiLtsVersion
|
|
43
46
|
|
|
44
47
|
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
45
48
|
const options = parseOptions(apiKeyOrOptions)
|
|
@@ -92,7 +95,7 @@ export class SeamHttpAcsEncoders {
|
|
|
92
95
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
93
96
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
94
97
|
throw new SeamHttpInvalidOptionsError(
|
|
95
|
-
'The client option cannot be used with
|
|
98
|
+
'The client option cannot be used with SeamHttpAcsEncoders.fromPublishableKey',
|
|
96
99
|
)
|
|
97
100
|
}
|
|
98
101
|
const client = createClient(clientOptions)
|
|
@@ -168,11 +171,11 @@ export class SeamHttpAcsEncoders {
|
|
|
168
171
|
|
|
169
172
|
encodeAccessMethod(
|
|
170
173
|
body?: AcsEncodersEncodeAccessMethodBody,
|
|
171
|
-
options:
|
|
174
|
+
options: AcsEncodersEncodeAccessMethodOptions = {},
|
|
172
175
|
): SeamHttpRequest<AcsEncodersEncodeAccessMethodResponse, 'action_attempt'> {
|
|
173
176
|
return new SeamHttpRequest(this, {
|
|
174
177
|
pathname: '/acs/encoders/encode_access_method',
|
|
175
|
-
method: '
|
|
178
|
+
method: 'POST',
|
|
176
179
|
body,
|
|
177
180
|
responseKey: 'action_attempt',
|
|
178
181
|
options,
|
|
@@ -181,11 +184,11 @@ export class SeamHttpAcsEncoders {
|
|
|
181
184
|
|
|
182
185
|
encodeCredential(
|
|
183
186
|
body?: AcsEncodersEncodeCredentialBody,
|
|
184
|
-
options:
|
|
187
|
+
options: AcsEncodersEncodeCredentialOptions = {},
|
|
185
188
|
): SeamHttpRequest<AcsEncodersEncodeCredentialResponse, 'action_attempt'> {
|
|
186
189
|
return new SeamHttpRequest(this, {
|
|
187
190
|
pathname: '/acs/encoders/encode_credential',
|
|
188
|
-
method: '
|
|
191
|
+
method: 'POST',
|
|
189
192
|
body,
|
|
190
193
|
responseKey: 'action_attempt',
|
|
191
194
|
options,
|
|
@@ -193,34 +196,34 @@ export class SeamHttpAcsEncoders {
|
|
|
193
196
|
}
|
|
194
197
|
|
|
195
198
|
get(
|
|
196
|
-
|
|
199
|
+
params?: AcsEncodersGetParams,
|
|
197
200
|
): SeamHttpRequest<AcsEncodersGetResponse, 'acs_encoder'> {
|
|
198
201
|
return new SeamHttpRequest(this, {
|
|
199
202
|
pathname: '/acs/encoders/get',
|
|
200
|
-
method: '
|
|
201
|
-
body,
|
|
203
|
+
method: 'POST',
|
|
204
|
+
body: params,
|
|
202
205
|
responseKey: 'acs_encoder',
|
|
203
206
|
})
|
|
204
207
|
}
|
|
205
208
|
|
|
206
209
|
list(
|
|
207
|
-
|
|
210
|
+
params?: AcsEncodersListParams,
|
|
208
211
|
): SeamHttpRequest<AcsEncodersListResponse, 'acs_encoders'> {
|
|
209
212
|
return new SeamHttpRequest(this, {
|
|
210
213
|
pathname: '/acs/encoders/list',
|
|
211
|
-
method: '
|
|
212
|
-
body,
|
|
214
|
+
method: 'POST',
|
|
215
|
+
body: params,
|
|
213
216
|
responseKey: 'acs_encoders',
|
|
214
217
|
})
|
|
215
218
|
}
|
|
216
219
|
|
|
217
220
|
scanCredential(
|
|
218
221
|
body?: AcsEncodersScanCredentialBody,
|
|
219
|
-
options:
|
|
222
|
+
options: AcsEncodersScanCredentialOptions = {},
|
|
220
223
|
): SeamHttpRequest<AcsEncodersScanCredentialResponse, 'action_attempt'> {
|
|
221
224
|
return new SeamHttpRequest(this, {
|
|
222
225
|
pathname: '/acs/encoders/scan_credential',
|
|
223
|
-
method: '
|
|
226
|
+
method: 'POST',
|
|
224
227
|
body,
|
|
225
228
|
responseKey: 'action_attempt',
|
|
226
229
|
options,
|