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 visible (Hide)

magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #90 ea0a9ca Thanks @smeijer! - update broadcast > notification response schema to include the fields:

    • created_at; datetime when notification was created
    • updated_at; datetime when notification was last updated
    • seen_at; datetime when notification was first seen
    • read_at; datetime when notification was first read
    • status; enum showing current state, current values: unseen, unread, read, archived

    Further changes are:

    • recipient; is marked as non-nullable
    • deliveries; is marked as non-nullable
  • #92 530476e Thanks @smeijer! - Rename users.fetch to users.get. Tho it's in theory a breaking change, the users api is relatively new, and the convention in this sdk is to use get for single entity retrieval, and not fetch. So we're going with a minor instead to get this fixed.

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #88 7f9ecbc Thanks @TD-4242! - feat: support css variables as theme color value

    import MagicBell, { NotificationInbox } from '@magicbell/magicbell-react';
    
    const customTheme = {
      icon: {
        borderColor: 'var(--magicbell-icon-border-color)',
      },
    };
    
    <MagicBell theme={customTheme} apiKey={...} userEmail={...}>
        {() => <NotificationInbox height={500} />}
    </MagicBell>
    
magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

Note
The broadcasts methods are currently in preview. Enable them via feature flags.

  • #83 94cbb92 Thanks @smeijer! - feat: add broadcasts.list method to the client.

    const broadcasts = magicbell.broadcasts.list({ per_page: 10 });
    
    await broadcasts.forEach((broadcast) => {
      console.log(broadcast.id);
    });
    
  • #84 b0a809d Thanks @smeijer! - feat: add broadcasts.get method to the client.

    const broadcasts = await magicbell.broadcasts.get(broadcastId);
    console.log(broadcast.id);
    
  • #86 073e3f8 Thanks @smeijer! - feat: add broadcasts.notifications.list method to the client.

    const notifications = magicbell.broadcasts.notifications.list(broadcastId, { per_page: 10 });
    
    await notifications.forEach((notification) => {
      console.log(notification.id);
    });
    
  • #87 f0ec9a5 Thanks @smeijer! - Update schemas for broadcast methods.

    • dropped broadcast.recipients_count, use broadcast.status.summary.total instead.
    • broadcast notification status is now an enum string.
    • changed sent_at timestamps to be iso-strings.
    • added created_at to broadcast.
    • added title to broadcast notification
magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • fbbbae7 Thanks @smeijer! - deps: bump ably to 1.2.39 to fix CVE-2022-33987
magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • fbbbae7 Thanks @smeijer! - deps: bump ably to 1.2.39 to fix CVE-2022-33987
magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #76 fe450c8 Thanks @smeijer! - Feature flags are now typed, making it easier to enable beta features, and harder to forget removing flags when beta features turned stable.

  • #77 9f4be9a Thanks @smeijer! - return the full response data from users.push_subscriptions.list()

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #68 8ae8b38 Thanks @smeijer! - fix typescript issue that showed arguments in camelCase vs snake_case.
magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #59 6d7e434 Thanks @unamashana!
    • remove beta flag from pushSubscriptions
    • move imports method behind feature flag
    • add users.list method to list all users
    • add users.fetch method to fetch a single user
    • add users.pushSubscriptions resource to manage users push subscriptions
    • add users.pushSubscriptions.list method to list all push subscriptions for a user
    • add users.pushSubscriptions.delete method to delete a single push subscription for a user
magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #62 2d96a3d Thanks @pianomansam! - feat: don't open action-url when notification click handler returns false
magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #64 1676fd3 Thanks @smeijer! - feat: support custom request headers

    Custom request headers can be used to decorate requests for logs and metrics or for example to instruct proxy servers.

    import MagicBell from 'magicbell';
    
    const magicbell = new MagicBell({
      apiKey: 'my-api-key',
      headers: {
        'X-Custom-Header': 'foo',
      },
    });
    
magicbell-js - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • #56 8139792 Thanks @smeijer! - feat: add close method to realtime listener

    const listener = magicbell.listen();
    
    listener.forEach((notification) => {
      console.log(notification.data.id);
    });
    
    // stop listening after 5 seconds
    setTimeout(() => {
      listener.close();
    }, 5_000);
    
Package Rankings
Top 4.27% on Npmjs.org
Related Projects