@commercetools-test-data/inventory-entry
TypeScript icon, indicating that this package has built-in type declarations

10.11.1 • Public • Published

@commercetools-test-data/inventory-entry

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

https://docs.commercetools.com/api/projects/inventory#inventoryentry

Install

$ yarn add -D @commercetools-test-data/inventory-entry

Usage

import {
  InventoryEntryRest,
  InventoryEntryDraftRest,
  InventoryEntryGraphql,
  InventoryEntryDraftGraphql,
} from '@commercetools-test-data/inventory-entry';

const inventoryEntryRest = InventoryEntryRest.random().build();
const inventoryEntryDraftRest = InventoryEntryDraftRest.random().build();

const inventoryEntryGraphql = InventoryEntryGraphql.random().build();
const inventoryEntryDraftGraphql = InventoryEntryDraftGraphql.random().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 type {
  TInventoryEntry,
  TInventoryEntryDraft,
} from '@commercetools-test-data/inventory-entry';
import * as InventoryEntry from '@commercetools-test-data/inventory-entry';

const inventoryEntry = InventoryEntry.random().build<TInventoryEntry>();
const inventoryEntryDraft =
  InventoryEntry.InventoryEntryDraft.random().build<TInventoryEntryDraft>();

Package Sidebar

Install

npm i @commercetools-test-data/inventory-entry

Weekly Downloads

1,680

Version

10.11.1

License

MIT

Unpacked Size

1.97 MB

Total Files

11

Last publish

Collaborators

  • emmenko
  • commercetools-admin
  • tdeekens