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

@commercetools-test-data/platform-limits

v10.7.0

Published

Data model for commercetools API Customer Group

Downloads

2,361

Readme

@commercetools-test-data/platform-limits

This package provides the data model for the commercetools platform Limits type

https://docs.commercetools.com/api/limits

Install

$ pnpm add -D @commercetools-test-data/platform-limits

Usage

BusinessUnitLimitsProjection

import {
  BusinessUnitLimitsProjection,
  type TBusinessUnitLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const businessUnitLimitsProjection =
  BusinessUnitLimitsProjection.random().build<TBusinessUnitLimitsProjection>();

// Presets
const BusinessUnitWithLimit = businessUnitLimitsProjection.presets
  .withLimit()
  .build<TBusinessUnitLimitsProjection>();

CartDiscountLimitsProjection

import {
  CartDiscountLimitsProjection,
  type TCartDiscountLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const cartDiscountLimitsProjection =
  CartDiscountLimitsProjection.random().build<TCartDiscountLimitsProjection>();

// Presets
const cartDiscountLimitsProjectionWithLimitAndCurrent =
  CartDiscountLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCartDiscountLimitsProjection>();

CartLimitsProjection

import {
  CartLimitsProjection,
  type TCartLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const cartLimitsProjection =
  CartLimitsProjection.random().build<TCartLimitsProjection>();

// Presets
const cartLimitsProjectionWithLimitAndCurrent = CartLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TCartLimitsProjection>();

CustomerLimitsProjection

import {
  CustomerLimitsProjection,
  type TCustomerLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const customerLimitsProjection =
  CustomerLimitsProjection.random().build<TCustomerLimitsProjection>();

// Presets
const customerLimitsProjectionWithLimitAndCurrent =
  CustomerLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCustomerLimitsProjection>();

CustomerGroupLimitsProjection

import {
  CustomerGroupLimitsProjection,
  type TCustomerGroupLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const customerGroupLimitsProjection =
  CustomerGroupLimitsProjection.random().build<TCustomerGroupLimitsProjection>();

// Presets
const customerGroupLimitsProjectionWithLimitAndCurrent =
  CustomerGroupLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCustomerGroupLimitsProjection>();

PlatformLimits

import {
  PlatformLimits,
  type TPlatformLimits,
} from '@commercetools-test-data/platform-limits';

const PlatformLimits = PlatformLimits.random().build<TPlatformLimits>();

// Presets
const PlatformLimitsWithLimitAndCurrent = PlatformLimits.presets
  .withAllPlatformLimits()
  .build<TPlatformLimits>();

LimitWithCurrent

import {
  LimitWithCurrent,
  type TLimitWithCurrent,
} from '@commercetools-test-data/platform-limits';

const limitWithCurrent = LimitWithCurrent.random().build<TLimitWithCurrent>();

// Presets
const limitWithCurrentWithExceeded = LimitWithCurrent.presets
  .withExceeded()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithNonExceeded = LimitWithCurrent.presets
  .withNonExceeded()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithUndefined = LimitWithCurrent.presets
  .withUndefined()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithWarningExceeded = LimitWithCurrent.presets
  .withWarningExceeded()
  .build<TLimitWithCurrent>();

ProductDiscountLimitsProjection

import {
  ProductDiscountLimitsProjection,
  type TProductDiscountLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const productDiscountLimitsProjection =
  ProductDiscountLimitsProjection.random().build<TProductDiscountLimitsProjection>();

// Presets
const productDiscountLimitsProjectionWithLimitAndCurrent =
  ProductDiscountLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TProductDiscountLimitsProjection>();

ShippingMethodLimitsProjection

import {
  ShippingMethodLimitsProjection,
  type TShippingMethodLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const shippingMethodLimitsProjection =
  ShippingMethodLimitsProjection.random().build<TShippingMethodLimitsProjection>();

// Presets
const shippingMethodLimitsProjectionWithLimitAndCurrent =
  ShippingMethodLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TShippingMethodLimitsProjection>();

ShoppingListLimitsProjection

import {
  ShoppingListLimitsProjection,
  type TShoppingListLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const ShoppingListLimitsProjection =
  ShoppingListLimitsProjection.random().build<TShoppingListLimitsProjection>();

// Presets
const ShoppingListLimitsProjectionWithLimitAndCurrent =
  ShoppingListLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TShoppingListLimitsProjection>();

StoreLimitsProjection

import {
  StoreLimitsProjection,
  type TStoreLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const StoreLimitsProjection =
  StoreLimitsProjection.random().build<TStoreLimitsProjection>();

// Presets
const StoreLimitsProjectionWithLimitAndCurrent = StoreLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TStoreLimitsProjection>();

TaxCategoryLimitsProjection

import {
  TaxCategoryLimitsProjection,
  type TTaxCategoryLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const taxCategoryLimitsProjection =
  TaxCategoryLimitsProjection.random().build<TTaxCategoryLimitsProjection>();

// Presets
const taxCategoryLimitsProjectionWithLimitAndCurrent =
  TaxCategoryLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TTaxCategoryLimitsProjection>();

ZoneLimitsProjection

import {
  ZoneLimitsProjection,
  type TZoneLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const zoneLimitsProjection =
  ZoneLimitsProjection.random().build<TZoneLimitsProjection>();

// Presets
const zoneLimitsProjectionWithLimitAndCurrent = ZoneLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TZoneLimitsProjection>();