This plug-in allows you to sync Wix Members collections into your MongoDB cluster. In this was you can perform your data works with WeivData for Wix Members app data. You can also perform lookups easily (references/includes) with any other collection you have in your MongoDB.

And there aren't any filtering etc. limit when you use WeivData, you can filter and query data however you want.

Right now you have 6 functions to sync these collections:

  • Badges (WixMembersBadges)
  • FullData (WixMembersFullData)
  • PrivateMembersData (WixMembersPrivateData)
  • PublicData (WixMembersPublicData)

The database name depends on your choice. You can configure it with config function.


We do not suggest writing to these collections, use these collections to only read data from it.


Functions are designed to work with wix-members.v2 APIs Events. Define events inside the events.js file and point the functions you import from this plugin.

Example:

import { SyncWixApps } from '@exweiv/weiv-data';
const { wixMembers } = SyncWixApps;

export const wixMembers_onMemberCreated = (event) => wixMembers.onMemberCreated(event);
export const wixMembers_onMemberUpdated = (event) => wixMembers.onMemberUpdated(event);
export const wixMembers_onMemberDeleted = (event) => wixMembers.onMemberDeleted(event);
export const wixBadges_onBadgeCreated = (event) => wixMembers.onBadgeCreated(event);
export const wixBadges_onBadgeUpdated = (event) => wixMembers.onBadgeUpdated(event);
export const wixBadges_onBadgeDeleted = (event) => wixMembers.onBadgeDeleted(event);
interface wixMembers {
    onBadgeCreated(event: any): Promise<void>;
    onBadgeDeleted(event: any): Promise<void>;
    onBadgeUpdated(event: any): Promise<void>;
    onMemberCreated(event: any): Promise<void>;
    onMemberDeleted(event: any): Promise<void>;
    onMemberUpdated(event: any): Promise<void>;
}

Methods

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>