
Security News
New CNAPulse Dashboard Tracks CNA Activity and Disclosure Trends
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.
@commercetools-test-data/cart
Advanced tools
This package provides the data model for the commercetools platform Cart representations
https://docs.commercetools.com/api/projects/carts#representations
$ pnpm add -D @commercetools-test-data/cart
import {
Cart,
CartDraft,
type TCart,
type TCartDraft,
} from '@commercetools-test-data/cart';
const cart = Cart.random().build<TCart>();
const cartDraft = CartDraft.random().build<TCartDraft>();
// Presets
const emptyCartDraft = CartDraft.presets.empty().build<TCartDraft>();
import {
CustomLineItemRest,
CustomLineItemDraftRest,
CustomLineItemGraphql,
CustomLineItemDraftGraphql,
} from '@commercetools-test-data/cart';
const restCustomLineItem = CustomLineItemRest.random().build();
const graphqlCustomLineItem = CustomLineItemGraphql.random().build();
const restCustomLineItemDraft = CustomLineItemDraftRest.random().build();
const graphqlCustomLineItemDraft = CustomLineItemDraftGraphql.random().build();
import {
LineItemRest,
LineItemDraftRest
LineItemGraphql,
LineItemDraftGraphql,
} from '@commercetools-test-data/cart';
const restLineItem = LineItemRest.random().build();
const graphqlLineItem = LineItemGraphql.random().build();
const restLineItemDraft = LineItemDraftRest.random().build();
const graphqlLineItemDraft = LineItemDraftGraphql.random().build()
// Presets
const restEmptyLineItemDraft = LineItemDraftRest.presets.empty().build();
const graphqlEmptyLineItemDraft = LineItemDraftGraphql.presets.empty().build()
import {
TaxPortionRest,
TaxPortionDraftRest,
TaxPortionGraphql,
TaxPortionDraftGraphql,
} from '@commercetools-test-data/cart';
const restTaxPortion = TaxPortionRest.random().build();
const graphqlTaxPortion = TaxPortionGraphql.random().build();
const restTaxPortionDraft = TaxPortionDraftRest.random().build();
const graphqlTaxPortionDraft = TaxPortionDraftGraphql.random().build();
import {
TaxedItemPriceRest,
TaxedItemPriceGraphql,
} from '@commercetools-test-data/cart';
const restTaxedItemPrice = TaxedItemPriceRest.random().build();
const graphqlTaxedItemPrice = TaxedItemPriceGraphql.random().build();
import {
ShippingInfoRest,
ShippingInfoGraphql,
} from '@commercetools-test-data/cart';
const restShippingInfo = ShippingInfoRest.random().build();
const graphqlShippingInfo = ShippingInfoGraphql.random().build();
import {
TaxedPriceRest,
TaxedPriceGraphql,
} from '@commercetools-test-data/cart';
const restTaxedPrice = TaxedPriceRest.random().build();
const graphqlTaxedPrice = TaxedPriceGraphql.random().build();
import {
DirectDiscountRest,
DirectDiscountGraphql,
DirectDiscountDraftRest,
DirectDiscountDraftGraphql,
} from '@commercetools-test-data/cart';
const restDirectDiscount = DirectDiscountRest.random().build();
const graphqlDirectDiscount = DirectDiscountGraphql.random().build();
const restDirectDiscountDraft = DirectDiscountDraftRest.random().build();
const graphqlDirectDiscountDraft = DirectDiscountDraftGraphql.random().build();
import {
DiscountedLineItemPortionRest,
DiscountedLineItemPortionGraphql,
DiscountedLineItemPortionDraftRest,
DiscountedLineItemPortionDraftGraphql,
} from '@commercetools-test-data/cart';
const restDiscountedLineItemPortion =
DiscountedLineItemPortionRest.random().build();
const graphqlDiscountedLineItemPortion =
DiscountedLineItemPortionGraphql.random().build();
const restDiscountedLineItemPortionDraft =
DiscountedLineItemPortionDraftRest.random().build();
const graphqlDiscountedLineItemPortionDraft =
DiscountedLineItemPortionDraftGraphql.random().build();
import {
DiscountedLineItemPriceRest,
DiscountedLineItemPriceGraphql,
} from '@commercetools-test-data/cart';
const restDiscountedLineItemPrice =
DiscountedLineItemPriceRest.random().build();
const graphqlDiscountedLineItemPrice =
DiscountedLineItemPriceGraphql.random().build();
import {
DiscountedLineItemPriceForQuantityRest,
DiscountedLineItemPriceForQuantityGraphql,
} from '@commercetools-test-data/cart';
const restDiscountedLineItemPriceForQuantity =
DiscountedLineItemPriceForQuantityRest.random().build();
const graphqlDiscountedLineItemPriceForQuantity =
DiscountedLineItemPriceForQuantityGraphql.random().build();
FAQs
Data model for commercetools API Cart
The npm package @commercetools-test-data/cart receives a total of 785 weekly downloads. As such, @commercetools-test-data/cart popularity was classified as not popular.
We found that @commercetools-test-data/cart 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
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.