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 - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Minor Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Minor Changes

magicbell-js - [email protected]

Published by MagicBella about 1 month ago

Minor Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

  • #370 f8e51c3 Thanks @smeijer! - return categories and category channels from useNotificationPreferences hook in stable order
magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 1 month ago

Patch Changes

magicbell-js - @magicbell/[email protected] Latest Release

Published by MagicBella about 2 months ago

Minor Changes

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Major Changes

  • #361 e5027a8 Thanks @smeijer! - Breaking Change!

    We've renamed the categories property to category and the topics property to topic, to reflect that these properties only support a single value. We haven't been supporting multiple categories or topics for a while now, and believe that renaming this property is the right thing to do. It requires a small change on your end, but the clear naming reduces the number of potential bugs caused by misunderstanding.

    If you make use of different stores or filters using the categories or topics properties, you'll need to rename them to their singular variants.

    import { MagicBellProvider } from '@magicbell/react-headless';
    
    const stores = [
      { id: 'default', defaultQueryParams: {} },
      { id: 'unread', defaultQueryParams: { read: false } },
    - { id: 'billing', defaultQueryParams: { categories: ['billing'] } },
    + { id: 'billing', defaultQueryParams: { category: 'billing' } },
    - { id: 'support', defaultQueryParams: { topics: ['support'] } },
    + { id: 'support', defaultQueryParams: { topic: 'support' } },
    ];
    
    export default function Index({ children }) {
      return (
        <MagicBellProvider
          apiKey="__MAGICBELL_API_KEY__"
          userEmail="__MAGICBELL_USER_EMAIL__"
          userKey="__MAGICBELL_USER_KEY__"
          stores={stores}
        >
          {children}
        </MagicBell>
      );
    }
    

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Major Changes

  • #361 e5027a8 Thanks @smeijer! - Breaking Change!

    We've renamed the categories property to category and the topics property to topic, to reflect that these properties only support a single value. We haven't been supporting multiple categories or topics for a while now, and believe that renaming this property is the right thing to do. It requires a small change on your end, but the clear naming reduces the number of potential bugs caused by misunderstanding.

    If you make use of different stores or tabs using the categories or topics properties, you'll need to rename them to their singular variants.

    import MagicBell, { FloatingNotificationInbox } from '@magicbell/magicbell-react';
    import React from 'react';
    
    const stores = [
      { id: 'default', defaultQueryParams: {} },
      { id: 'unread', defaultQueryParams: { read: false } },
    - { id: 'billing', defaultQueryParams: { categories: ['billing'] } },
    + { id: 'billing', defaultQueryParams: { category: 'billing' } },
    - { id: 'support', defaultQueryParams: { topics: ['support'] } },
    + { id: 'support', defaultQueryParams: { topic: 'support' } },
    ];
    
    const tabs = [
      { storeId: 'default', label: 'Latest' },
      { storeId: 'unread', label: 'Archive' },
      { storeId: 'billing', label: 'Billing' },
      { storeId: 'support', label: 'Issues' },
    ];
    
    export default function Index() {
      return (
        <MagicBell
          apiKey="__MAGICBELL_API_KEY__"
          userEmail="__MAGICBELL_USER_EMAIL__"
          userKey="__MAGICBELL_USER_KEY__"
          stores={stores}
        >
          {(props) => <FloatingNotificationInbox height={450} tabs={tabs} {...props} />}
        </MagicBell>
      );
    }
    

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Minor Changes

  • #363 036278a Thanks @smeijer! - use fetch as http client

  • #358 726be74 Thanks @smeijer! - An early release of @magicbell/project-client, a project/admin facing client, to be used on the server, focussing on the MagicBell v2 API.

Patch Changes

magicbell-js - [email protected]

Published by MagicBella about 2 months ago

Major Changes

  • #361 e5027a8 Thanks @smeijer! - Breaking Change!

    We've renamed the categories property to category and the topics property to topic, to reflect that these properties only support a single value. We haven't been supporting multiple categories or topics for a while now, and believe that renaming this property is the right thing to do. It requires a small change on your end, but the clear naming reduces the number of potential bugs caused by misunderstanding.

    If you use topics or categories filters in the UserClient, you'll need to update those params to their singular variant.

    import { UserClient } from 'magicbell/user-client';
    
    const magicbell = new UserClient({
      apiKey: 'your-api-key',
      userEmail: '[email protected]',
    });
    
    const notifications = await magicbell.notifications.list({
    -  categories: ['billing'],
    +  category: 'billing',
    -  topics: ['invoice-1'],
    +  topic: 'invoice-1',
    });
    

Minor Changes

  • #360 95bd18d Thanks @smeijer! - Auth tokens are now prioritized over api keys.

  • #349 13e54bc Thanks @smeijer! - define more notification delivery statuses, added skipped, dropped, failed, and delivered.

Patch Changes

  • #348 39832a3 Thanks @smeijer! - removed function to delete push subscriptions, as it doesn't exist on our v1 (current) api.
magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Major Changes

  • #299 df2c87f Thanks @smeijer! - Breaking Change!

    We've renamed the categories property to category and the topics property to topic, to reflect that these properties only support a single value. We haven't been supporting multiple categories or topics for a while now, and believe that renaming this property is the right thing to do. It requires a small change on your end, but the clear naming reduces the number of potential bugs caused by misunderstanding.

    If you make use of the categories or topics filters on magicbell user notifications, you'll need to rename them to their singular variants.

    - magicbell user notifications list --topics support
    + magicbell user notifications list --topic support
    
    - magicbell user notifications mark-all-read --topics billing
    + magicbell user notifications mark-all-read --topic billing
    
    - magicbell user notifications mark-all-seen --topics other
    + magicbell user notifications mark-all-seen --topic other
    

Minor Changes

  • #360 95bd18d Thanks @smeijer! - Auth tokens are now prioritized over api keys.

  • #349 13e54bc Thanks @smeijer! - define more notification delivery statuses, added skipped, dropped, failed, and delivered.

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella about 2 months ago

Patch Changes

magicbell-js - @magicbell/[email protected]

Published by MagicBella 2 months ago

Patch Changes

Package Rankings
Top 4.27% on Npmjs.org
Related Projects