Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@bagdock/loyalty

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bagdock/loyalty

Bagdock Loyalty TypeScript SDK — referrals, rewards, and points

latest
Source
npmnpm
Version
0.1.5
Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source
  ----++                                ----++                    ---+++     
  ---+++                                ---++                     ---++      
 ----+---     -----     ---------  --------++ ------     -----   ----++----- 
 ---------+ --------++----------++--------+++--------+ --------++---++---++++
 ---+++---++ ++++---++---+++---++---+++---++---+++---++---++---++------++++  
----++ ---++--------++---++----++---++ ---++---++ ---+---++     -------++    
----+----+---+++---++---++----++---++----++---++---+++--++ --------+---++   
---------++--------+++--------+++--------++ -------+++ -------++---++----++  
 +++++++++   +++++++++- +++---++   ++++++++    ++++++    ++++++  ++++  ++++  
                     --------+++                                             
                       +++++++                                               

@bagdock/loyalty

The official TypeScript SDK for the Bagdock Loyalty API — referrals, rewards, and points for self-storage operators.

npm version License: MIT

Install

npm install @bagdock/loyalty
yarn add @bagdock/loyalty
pnpm add @bagdock/loyalty
bun add @bagdock/loyalty

Quick start

import { BagdockLoyalty } from '@bagdock/loyalty'

const loyalty = new BagdockLoyalty({
  apiKey: 'sk_live_...',
})

// Create a member
const member = await loyalty.members.create({
  email: 'jane@example.com',
  name: 'Jane Doe',
})

// Create a referral link
const link = await loyalty.links.create({
  memberId: member.id,
  campaignId: 'camp_summer2026',
})

// Track an event
await loyalty.events.track({
  memberId: member.id,
  event: 'booking_completed',
  properties: { unitSize: '10x10' },
})

Platform partners

For platforms embedding loyalty on behalf of operators:

const platform = new BagdockLoyalty({
  apiKey: 'pak_live_...',
})

const operatorClient = platform.forOperator('opreg_wisestorage')
const members = await operatorClient.members.list()

API reference

loyalty.members

MethodDescription
members.create(params)Create a member
members.get(id)Get a member by ID
members.update(id, params)Update a member
members.list(params?)List members
MethodDescription
links.create(params)Create a referral link
links.get(id)Get a link
links.list(params?)List links

loyalty.events

MethodDescription
events.track(params)Track a loyalty event
events.list(params?)List events

loyalty.enrollments

MethodDescription
enrollments.create(params)Enroll a member in a program
enrollments.get(id)Get enrollment details
enrollments.list(params?)List enrollments

loyalty.subscriptions

MethodDescription
subscriptions.create(params)Create a subscription
subscriptions.cancel(id)Cancel a subscription
subscriptions.list(params?)List subscriptions

loyalty.embedTokens

MethodDescription
embedTokens.create(params)Create an embed token
embedTokens.validate(token)Validate a token
embedTokens.list(params?)List tokens

loyalty.domains

MethodDescription
domains.create(params)Add a custom domain
domains.verify(id)Verify a domain
domains.list(params?)List domains

Configuration

OptionTypeDefaultDescription
apiKeystringRequired. Your Bagdock API key
baseUrlstringhttps://api.bagdock.comAPI base URL

License

MIT

Keywords

bagdock

FAQs

Package last updated on 05 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts