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

@commercetools-test-data/channel

Package Overview
Dependencies
Maintainers
3
Versions
551
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-test-data/channel

Data model for commercetools API Channel

Source
npmnpm
Version
10.18.0
Version published
Maintainers
3
Created
Source

@commercetools-test-data/channel

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

https://docs.commercetools.com/api/projects/channels

Install

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

Usage

import {
  ChannelRest,
  ChannelDraftRest,
  ChannelGraphql,
  ChannelDraftGraphql,
} from '@commercetools-test-data/inventory-entry';

const channelRest = ChannelRest.random().build();
const channelDraftRest = ChannelDraftRest.random().build();

const channelGraphql = ChannelGraphql.random().build();
const channelDraftGraphql = ChannelDraftGraphql.random().build();

// Presets
const withInventorySupplyAndProductDistributionRolesRest =
  ChannelDraftRest.presets
    .withInventorySupplyAndProductDistributionRoles()
    .build();
const withInventorySupplyAndProductDistributionRolesGraphql =
  ChannelDraftGraphql.presets
    .withInventorySupplyAndProductDistributionRoles()
    .build();

For backwards compatibility, we still support using the generic data models, but you should consider them legacy as we will be removing them in the future.

import {
  Channel,
  ChannelDraft,
  type TChannel,
  type TChannelDraft,
} from '@commercetools-test-data/channel';

const channel = Channel.random().build<TChannel>();
const channelDraft = ChannelDraft.random().build<TChannelDraft>();

// Presets
const withInventorySupplyAndProductDistributionRoles = ChannelDraft.presets
  .withInventorySupplyAndProductDistributionRoles()
  .build<TChannelDraft>();

Keywords

javascript

FAQs

Package last updated on 07 May 2025

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