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/product-type

v10.11.2

Published

Data model for commercetools API ProductType

Downloads

19,635

Readme

@commercetools-test-data/product-type

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

https://docs.commercetools.com/api/projects/productTypes#product-types

Install

$ pnpm add -D @commercetools-test-data/product-type

Usage

AttributeDefinition

import {
  AttributeDefinition,
  AttributeDefinitionDraft,
  type TAttributeDefinition,
  type TAttributeDefinitionDraft,
} from '@commercetools-test-data/product-type';

const attributeDefinition =
  AttributeDefinition.random().build<TAttributeDefinition>();

const attributeDefinitionDraft =
  AttributeDefinitionDraft.random().build<TAttributeDefinitionDraft>();

// Presets
const emptyAttributeDefinitionPreset = AttributeDefinitionDraft.presets
  .empty()
  .build<TAttributeDefinitionDraft>();

AttributeBooleanType

import {
  AttributeBooleanType,
  type TAttributeBooleanType,
} from '@commercetools-test-data/product-type';

const attributeBooleanType =
  AttributeBooleanType.random().build<TAttributeBooleanType>();

AttributeEnumType

import {
  AttributeEnumType,
  type TAttributeEnumType,
} from '@commercetools-test-data/product-type';

const attributeEnumType =
  AttributeEnumType.random().build<TAttributeEnumType>();

AttributeLocalizedEnumType

import {
  AttributeLocalizedEnumType,
  type TAttributeLocalizedEnumType,
  type TAttributeLocalizedEnumValueGraphql,
} from '@commercetools-test-data/product-type';

const attributeLocalizedEnumType =
  AttributePLocalizedEnumType.random().build<TAttributeLocalizedEnumValue>();

AttributeLocalizedEnumValue

import {
  AttributeLocalizedEnumValue,
  type TAttributeLocalizedEnumValue,
  type TAttributeLocalizedEnumValueGraphql,
} from '@commercetools-test-data/product-type';

const attributeLocalizedEnumValue =
  AttributePLocalizedEnumValue.random().build<TAttributeLocalizedEnumValue>();

AttributeLocalizableTextType

import {
  AttributeLocalizableTextType,
  type TAttributeLocalizableTextType,
} from '@commercetools-test-data/product-type';

const attributeLocalizableTextType =
  AttributeLocalizableTextType.random().build<TattributeLocalizableTextType>();

AttributeNumberType

import {
  AttributeNumberType,
  type TAttributeNumberType,
} from '@commercetools-test-data/product-type';

const attributeNumberType =
  AttributeNumberType.random().build<TAttributeNumberType>();

AttributePlainEnumValue

import {
  AttributePlainEnumValue,
  type TAttributePlainEnumValue,
  type TAttributePlainEnumValueGraphql,
} from '@commercetools-test-data/product-type';

const attributePlainEnumValue =
  AttributePlainEnumValue.random().build<TAttributePlainEnumValue>();

AttributeSetType

import {
  AttributeSetType,
  type TAttributeSetType,
} from '@commercetools-test-data/product-type';

const attributeSetType = AttributeSetType.random().build<TAttributeSetType>();

AttributeReferenceType

import {
  AttributeReferenceType,
  type TAttributeReferenceType,
} from '@commercetools-test-data/product-type';

const attributeReferenceType =
  AttributeReferenceType.random().build<TAttributeReferenceType>();

AttributeTextType

import {
  AttributeTextType,
  type TAttributeTextType,
} from '@commercetools-test-data/product-type';

const attributeTextType =
  AttributeTextType.random().build<TAttributeTextType>();

ProductType

import {
  ProductType,
  ProductTypeDraft,
  type TProductType,
  type TProductTypeDraft,
} from '@commercetools-test-data/product-type';

const productType = ProductType.random().build<TProductType>();
const productTypeDraft = ProductTypeDraft.random().build<TProductTypeDraft>();

// Presets
const emptyProductTypeDraft = ProductTypeDraft.presets
  .empty()
  .build<TProductTypeDraft>();