magicbell-js

JavaScript/TypeScript SDK monorepo for MagicBell - The real-time notification inbox for web & mobile apps

OTHER License

Downloads
139.2K
Stars
28
Committers
19

Bot releases are hidden (Show)

magicbell-js - @magicbell/[email protected]

Published by MagicBella 5 months ago

Minor Changes

  • #266 3ba8477 Thanks @smeijer! - Add credential option to switch authentication scope for magicbell api requests

    # include user credential headers (x-magicbell-user-email)
    magicbell api /some-endpoint -r curl -c user
    magicbell api /some-endpoint -r curl --credentials user
    
    # include project credential headers (x-magicbell-api-secret)
    magicbell api /some-endpoint -r curl -c project
    magicbell api /some-endpoint -r curl --credentials project
    
  • #267 9b41a69 Thanks @smeijer! - Also accept lowercase method names in the magicbell api -X {method} command.

    These commands are now the same:

    magicbell api /integrations -X POST -d '{ ... }'
    magicbell api /integrations -X post -d '{ ... }'
    

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 5 months ago

Minor Changes

  • 7e918d9 Thanks @smeijer! - Include MagicBell as named export. These two are now the same:

    import MagicBell from '@magicbell/magicbell-react';
    import { MagicBell } from '@magicbell/magicbell-react';
    
magicbell-js - @magicbell/[email protected]

Published by MagicBella 5 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - [email protected]

Published by MagicBella 7 months ago

Patch Changes

  • #259 30ed933 Thanks @smeijer! - Only include user-email header when no external-id is provided
magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 7 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Minor Changes

  • #243 e6f514e Thanks @smeijer! - Add archive and unarchive utilities to the useNotification hook.

    const notification = useNotification(data);
    
    await notification.archive();
    await notification.unarchive();
    

    Archived notifications are not included in the default notification store. Create a separate store for archived notifications if you want to display them.

    const stores = [
      { id: 'default', defaultQueryParams: {} },
      { id: 'archived', defaultQueryParams: { archived: true } },
    ];
    
    const tabs = [
      { storeId: 'default', label: 'Latest' },
      { storeId: 'archived', label: 'Archive' },
    ];
    
    export default function Index() {
      return (
        <MagicBell apiKey="__MAGICBELL_API_KEY__" userEmail="__MAGICBELL_USER_EMAIL__" stores={stores}>
          {(props) => <FloatingNotificationInbox height={450} tabs={tabs} {...props} />}
        </MagicBell>
      );
    }
    

Patch Changes

magicbell-js - [email protected]

Published by MagicBella 8 months ago

Patch Changes

  • #242 840263b Thanks @smeijer! - use eventSource.addEventListener instead of eventSource.onmessage to maximize compatibility with different environments.

  • aee799d Thanks @renovate[bot]! - Updated dependencies:

    • updated json-schema-to-ts to 2.12.0.
magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Minor Changes

  • #240 00451d2 Thanks @smeijer! - Theme, locale, and image settings can now be published from the MagicBell dashboard, and will be automatically used by the inbox. This means you can now change the look and feel of the inbox without needing to change code.

    The behavior is backward compatible. Config is only applied after publishing from the dashboard, and properties provided to the MagicBell provider precede the published settings.

    In other words, to enable this new behavior for a current integration, you'll need to remove the theme, locale, and/or images properties from the MagicBell component and publish the settings from the dashboard.

    When all three props are provided, remote settings will not be fetched.

    <MagicBell
      apiKey="..."
      userEmail="..."
      locale={customLocale}
      theme={{
        header: {
          backgroundColor: 'lightblue',
        },
      }}
      images={{}}
    >
      {(props) => <FloatingNotificationInbox height={450} {...props} isOpen />}
    </MagicBell>
    

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

  • 892a8c0 Thanks @renovate[bot]! - Updated dependencies:

    • updated prettier to ^2.8.8.
  • e76980d Thanks @renovate[bot]! - Updated dependencies:

    • updated eslint to ^8.56.0.
    • updated eslint-config-next to 12.3.4.
    • updated eslint-plugin-jsx-a11y to ^6.8.0.
  • #247 9e55676 Thanks @renovate! - Updated dependencies:

    • updated axios to ^0.28.0.
magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 8 months ago

Patch Changes

Package Rankings
Top 4.27% on Npmjs.org
Related Projects