npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@plasma-platform/tm-service-memberships

v1.0.0

Published

Memberships Service API

Downloads

3

Readme

Documentation

Table of Contents

MembershipsService

Memberships Micro Service API

Parameters

  • url string service url
  • token (string | null) user access token if available (optional, default null)

messages

Object with class service messages

getListOfMembershipGroups

Groups - Get list of membership groups

Parameters

  • params Object
    • params.propertyId Number? Use for filtering by TM property value id.
    • params.all Number? Ignore membership group status on search, default value: 0, allowed values: 1, 0

Examples

Get list of membership groups

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
  const response = await service.getListOfMembershipGroups(params);
})();

Returns Promise<Object> Promise object represents info

getListOfAllMembershipPlans

Memberships - Get list of all membership plans

Parameters

  • params Object
    • params.groupId Number? Use for filtering by group ID
    • params.all Number? Ignore membership group status on search, default value: 0, allowed values: 1, 0

Examples

Get membership plan info by ID

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
  const response = await service.getListOfAllMembershipPlans(params);
})();

Returns Promise<Object> Promise object represents info

getMembershipPlanInfoById

Memberships - Get membership plan info by ID

Parameters

  • params Object
    • params.membershipId Number ID of the membership plan (required)

Examples

Get membership plan info by ID

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
  const response = await service.getMembershipPlanInfoById(params);
})();

Returns Promise<Object> Promise object represents info

getListOfSubscriptions

Subscriptions - Get list of subscriptions

Parameters

  • params Object
    • params.status String? Use for filtering by status. Allowed values: pending, active, inactive
    • params.membershipId Number? Use for filtering by membership ID
    • params.groupId Number? Use for filtering by membership group ID

Examples

Get list of subscriptions

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
  const response = await service.getListOfSubscriptions(params);
})();

Returns Promise<Object> Promise object represents info

getSubscription

Subscriptions - Get subscription

Parameters

  • params Object
    • params.subscriptionId Number ID of the subscription (required)

Examples

Get list of subscriptions

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
  const response = await service.getSubscription(params);
})();

Returns Promise<Object> Promise object represents info

reactivatePayments

Subscriptions - Reactivate payments. Reactivate recurrent payments for subscription, payment status will be changed to active

Parameters

  • params Object
    • params.subscriptionId Number ID of the subscription (required)

Examples

Get list of subscriptions

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
  const response = await service.reactivatePayments(params);
})();

Returns Promise<Object> Promise object represents info

suspendPayments

Subscriptions - Suspend payments. Suspend recurrent payments for subscription, payment status will be changed to inactive

Parameters

  • params Object
    • params.subscriptionId Number ID of the subscription (required)

Examples

Get list of subscriptions

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
  const response = await service.suspendPayments(params);
})();

Returns Promise<Object> Promise object represents info

getDownloadsByProductId

Subscription Downloads - Get downloads by product ID. Gets download by product ID from entire user downloads list.

Parameters

Examples

Get list of subscriptions

(async () => {
  const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
  const response = await service.getDownloadsByProductId(params);
})();

Returns Promise<Object> Promise object represents info