Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-test-data/product

Package Overview
Dependencies
Maintainers
0
Versions
415
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

  • 10.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
811
decreased by-69.76%
Maintainers
0
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

Attribute

import {
  Attribute,
  AttributeDraft,
  type TAttribute,
  type TAttributeDraft,
} from '@commercetools-test-data/product';

const attribute = Attribute.random().build<TAttribute>();
const attributeDraftGraphql =
  AttributeDraft.random().buildGraphql<TAttributeDraft>();

Image

import { Image, type TImage } from '@commercetools-test-data/product';

const image = Image.random().build<TImage>();

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>();

ProductCatalogData

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

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

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>();

ProductVariant

import {
  ProductVariant,
  ProductVariantDraft,
  type TProductVariant,
  type TProductVariantDraft,
} from '@commercetools-test-data/product';

const productVariant = ProductVariant.random().build<TProductVariant>();
const productVariantDraft =
  ProductVariantDraft.random().build<TProductVariantDraft>();

Keywords

FAQs

Package last updated on 12 Sep 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc