Releases: pocketbase/js-sdk
Release list
v0.15.3 Release
- Automatically resolve pending realtime connect
Promises in caseunsubscribeis called before
subscribeis being able to complete (pocketbase#2897).
v0.15.2 Release
-
Replaced
new URL(...)with manual url parsing as it doesn't seem to be fully supported in React Native (pocketbase#2484). -
Fixed nested
ClientResponseError.originalErrorwrapping and addedClientResponseErrorconstructor tests.
v0.15.1 Release
- Cancel any pending subscriptions submit requests on realtime disconnect (#204).
v0.15.0 Release
-
Added
fieldsto the optional query parameters for limiting the returned API fields (available with PocketBase v0.16.0). -
Added
pb.backupsservice for the new PocketBase backup and restore APIs (available with PocketBase v0.16.0). -
Updated
pb.settings.testS3(filesystem)to allow specifying a filesystem to test -storageorbackups(available with PocketBase v0.16.0).
v0.14.4 Release
- Removed the legacy aliased
BaseModel.isNewgetter since it conflicts with similarly named record fields (pocketbase#2385).
This helper is mainly used in the Admin UI, but if you are also using it in your code you can replace it with the$prefixed version, aka.BaseModel.$isNew.
v0.14.3 Release
- Added
OAuth2AuthConfig.queryprop to send optional query parameters (eg.expand) with theauthWithOAuth2(config)call.
v0.14.2 Release
- Use
location.origin + location.pathnameinstead of fulllocation.hrefwhen constructing the browser absolute url to ignore any extra hash or query parameter from the base url.
This is a small improvement to the earlier change from v0.14.1.
v0.14.1 Release
- Use an absolute url when the SDK is initialized with a relative base path in a browser env to ensure that the generated OAuth2 redirect and file urls are absolute.
v0.14.0 Release
-
Added simplified
authWithOAuth2()version without having to implement custom redirect, deeplink or even page reload:const authData = await pb.collection('users').authWithOAuth2({ provider: 'google' })
Works with PocketBase v0.15.0+.
This method initializes a one-off realtime subscription and will
open a popup window with the OAuth2 vendor page to authenticate.
Once the external OAuth2 sign-in/sign-up flow is completed, the popup
window will be automatically closed and the OAuth2 data sent back
to the user through the previously established realtime connection.Site-note: when creating the OAuth2 app in the provider dashboard
you have to configurehttps://yourdomain.com/api/oauth2-redirect
as redirect URL.The "manual" code exchange flow is still supported as
authWithOAuth2Code(provider, code, codeVerifier, redirectUrl).For backward compatibility it is also available as soft-deprecated function overload of
authWithOAuth2(provider, code, codeVerifier, redirectUrl). -
Added new
pb.filesservice:// Builds and returns an absolute record file url for the provided filename. π pb.files.getUrl(record, filename, queryParams = {}); // Requests a new private file access token for the current auth model (admin or record). π pb.files.getToken(queryParams = {});
pb.getFileUrl()is soft-deprecated and acts as alias callingpb.files.getUrl()under the hood.Works with PocketBase v0.15.0+.
v0.13.1 Release
-
Added option to specify a generic
send()return type and definedSendOptionstype (#171; thanks @iamelevich). -
Deprecated
SchemaField.uniqueprop since its function is replaced byCollection.indexesin the upcoming PocketBase v0.14.0 release.