![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@commercetools-test-data/product-type
Advanced tools
This package provides the data model for the commercetools platform ProductType
type
https://docs.commercetools.com/api/projects/productTypes#product-types
$ pnpm add -D @commercetools-test-data/product-type
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>();
FAQs
Data model for commercetools API ProductType
The npm package @commercetools-test-data/product-type receives a total of 4,033 weekly downloads. As such, @commercetools-test-data/product-type popularity was classified as popular.
We found that @commercetools-test-data/product-type demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.