🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@commercetools-test-data/product

Package Overview
Dependencies
Maintainers
3
Versions
466
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-test-data/product

Data models for commercetools API Product

Source
npmnpm
Version
0.0.0-canary-20230824140002
Version published
Weekly downloads
1.8K
151.51%
Maintainers
3
Weekly downloads
 
Created
Source

@commercetools-test-data/product

This package provides the data models for the commercetools platform Product type representations.

https://docs.commercetools.com/api/projects/products#product

Install

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

Usage

Product

import {
  Product,
  ProductDraft,
  type TProduct,
  type TProductDraft,
} from '@commercetools-test-data/product';

const product = Product.random().build<TProduct>();
const productDraft = ProductDraft.random().build<TProductDraft>();

ProductData

import {
  ProductData,
  type TProductData,
} from '@commercetools-test-data/product';

// For REST entities
const productDataRest = ProductData.random().buildRest<TProductData>();

// For Graphql entities
const productDataGraphql = ProductData.random().buildGraphql<TProductData>();

ProductCatalogData

import {
  ProductCatalogData,
  type TProductCatalogData,
} from '@commercetools-test-data/product';

const productCatalogData =
  ProductCatalogData.random().build<TProductCatalogData>();

Keywords

javascript

FAQs

Package last updated on 24 Aug 2023

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