-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration guide from seamapi package #1
Comments
Migration guideLearn how to migrate from the New npm package nameChanged the package name from - npm i seamapi
+ npm i seam Removed default exportRemoved the default export. Instead, this package uses named exports. - import Seam from 'seamapi'
+ import { Seam } from 'seam' Updated API method signaturesAPI method signatures no longer accept a plain string. Instead, pass an object, as follows: - seam.locks.list(connected_account_id)
+ seam.locks.list({ connected_account_id })
- seam.locks.get(device_id)
+ seam.locks.get({ device_id })
- seam.locks.lockDoor(device_id)
+ seam.locks.lockDoor({ device_id })
- seam.locks.unlockDoor(device_id)
+ seam.locks.unlockDoor({ device_id })
- seam.connectWebviews.get(connect_webview_id)
+ seam.connectWebviews.get({ connect_webview_id })
- seam.actionAttempts.get(action_attempt_id)
+ seam.actionAttempts.get({ action_attempt_id }) Return value changesChanged the return types for some methods that previously returned action attempts. The following methods now return
The following methods now return a
Action attempt resolutionMethods that return action attempts no longer wait for the action attempt to resolve by default. Further, you can now configure this behavior using the Replaced
|
Coming up and will be added as a note in the migration guide: The types have been completely replaced and are now always consistent with the method return types. The previous types were inconsistent, both in name, properties, and definitions. The new types are 🔥 |
This issue will track breaking changes, dropped features, or unimplemented features from the current
seamapi
package. This issue will be used to generate release notes and a migration guide.Breaking Changes
seam
:npm i seam
.import Seam from 'seamapi'
toimport { Seam } from 'seam'
.Device
,ConnectedAccount
, etc., have beed removed.seam.locks.list(connected_account_id)
After:seam.locks.list({ connected_account_id })
seam.locks.get(device_id)
After:seam.locks.get({ device_id })
seam.locks.lockDoor(device_id)
After:seam.locks.lockDoor({ device_id })
seam.locks.unlockDoor(device_id)
After:seam.locks.unlockDoor({ device_id })
seam.connectWebviews.get(connect_webview_id)
After:seam.connectWebviews.get({ connect_webview_id })
seam.actionAttempts.get(action_attempt_id)
After:seam.actionAttempts.get({ action_attempt_id })
SEAM_WORKSPACE_ID
environment variable.SEAM_API_KEY
environment variable.SEAM_API_URL
environment variable: useSEAM_ENDPOINT
instead.seam.makeRequest
: use the Axios instance onseam.client
directly for this advanced use case.Seam.getClientSessionToken
removed: useSeam.fromPublishableKey
instead.toString()
for "pretty output" in development. This seemed non-standard. (Looking for feedback on this one or alternatives.)Unimplemented
seam
.The text was updated successfully, but these errors were encountered: