UNPKG

@softr/sdk

Version:

The SDK for building Softr apps on TanStack Start. It lets an app interact with Softr: auth, datasources, workflows and integrations.

69 lines (35 loc) • 2.92 kB
# @softr/sdk ## 1.4.1 ### Patch Changes - The `auth` skill's sign-out snippet redirects to `/login` with `signedOut: true`, so a login page that goes straight to single sign-on does not sign the visitor back in. - The `record-queries`, `record-mutations`, `charts-and-metrics` and `current-user` skills teach `filter` on `defineQuery` and `defineMutation` as the way to keep each visitor to their own records, with `user.properties` for the Record ID of a link to Users, one action per role, and the errors a filter can throw. ## 1.4.0 ### Minor Changes - Add `useIdleTimeout()`, which signs the visitor out of this browser after the idle time set in Studio's "End session if idle", and sends them to `/`. Action: call it once in the root route's document component, next to `useUserTimezone()`. ## 1.3.2 ### Patch Changes - The current-user skill says `avatarUrl` is the only source of the visitor's photo: the picture column the app's users connection maps, set in Studio's users settings, never the visitor's row in the Users table. ## 1.3.1 ### Patch Changes - Send the visitor's IP, signed, with calls to the Softr platform, so apps can log users out when the country they use the app from changes. ## 1.3.0 ### Minor Changes - Single sign-on: `ssoSignInHref`, `useAuthSettings().sso`, `auth.discoverSso` and the optional `auth.routes.sso` page (default `/sso-authentication`). Action: add the `/sso-authentication` page, and show a "Continue with SSO" link to `ssoSignInHref(...)` on the login page when `sso` is set. ## 1.2.2 ### Patch Changes - `SoftrPwaHead` now gives iOS the app's home screen name and launch screens, so an installed app opens on its splash screen instead of white and Add to Home Screen suggests the app's name, not the page title. An app already on an iPhone home screen picks this up only after it is removed and added again. ## 1.2.1 ### Patch Changes - `softrAuthMiddleware` serves the favicon set in Studio, Settings → General → Favicon, at `/favicon.ico`. Without one, it serves the Softr icon. An icon link or `public/favicon.ico` in the app still wins. ## 1.2.0 ### Minor Changes - `defineMutation` takes an optional `filter` with its `filterFields` on an update or a delete. `ds.update` and `ds.delete` first check that the record matches the filter. A record that does not match throws "not found", and nothing is written. An update cannot list in `fields` a field that its filter compares with a user token. ## 1.1.1 ### Patch Changes - The formatting skill names the keys `parts` takes and says there is no `timeStyle`. ## 1.1.0 ### Minor Changes - `defineQuery` takes an optional `filter` with its `filterFields`. Every read of the query, with `ds.list`, `ds.get`, `chart` and `metric`, returns only the records that match the filter. A read returns only `fields`, not `filterFields`. ## 1.0.0 ### Major Changes - First stable release.