Skip to content

Releases: pocketbase/js-sdk

v0.15.3 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 12 Jul 08:00
  • Automatically resolve pending realtime connect Promises in case unsubscribe is called before
    subscribe is being able to complete (pocketbase#2897).

v0.15.2 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 07 Jun 20:34
  • Replaced new URL(...) with manual url parsing as it doesn't seem to be fully supported in React Native (pocketbase#2484).

  • Fixed nested ClientResponseError.originalError wrapping and added ClientResponseError constructor tests.

v0.15.1 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 01 Jun 10:20
  • Cancel any pending subscriptions submit requests on realtime disconnect (#204).

v0.15.0 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 21 May 08:59
  • Added fields to the optional query parameters for limiting the returned API fields (available with PocketBase v0.16.0).

  • Added pb.backups service 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 - storage or backups (available with PocketBase v0.16.0).

v0.14.4 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 05 May 02:52
  • Removed the legacy aliased BaseModel.isNew getter 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

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 28 Apr 16:48
  • Added OAuth2AuthConfig.query prop to send optional query parameters (eg. expand) with the authWithOAuth2(config) call.

v0.14.2 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 28 Apr 13:24
  • Use location.origin + location.pathname instead of full location.href when 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

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 28 Apr 12:44
  • 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

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 18 Apr 03:55
  • 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 configure https://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.files service:

    // 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 calling pb.files.getUrl() under the hood.

    Works with PocketBase v0.15.0+.

v0.13.1 Release

Choose a tag to compare

@ganigeorgiev ganigeorgiev released this 26 Mar 11:08
  • Added option to specify a generic send() return type and defined SendOptions type (#171; thanks @iamelevich).

  • Deprecated SchemaField.unique prop since its function is replaced by Collection.indexes in the upcoming PocketBase v0.14.0 release.