Skip to content

Releases: commercetools/test-data

@commercetools/composable-commerce-test-data@13.13.1

10 Feb 15:09
79cc6d3

Choose a tag to compare

Patch Changes

  • #1008 f230439 Thanks @nima-ct! - Export staged types from the standalone-price entry point. TStagedStandalonePrice, TStagedStandalonePriceBuilder, TStagedPriceDraft, TStagedPriceDraftBuilder and related types are now re-exported from @commercetools/composable-commerce-test-data/standalone-price.

@commercetools/composable-commerce-test-data@13.13.0

04 Feb 15:01
54e0f85

Choose a tag to compare

Minor Changes

  • #997 b60bcce Thanks @krishhna123! - We're introducing new models named, line-item-recurrence-info and line-item-recurrence-info-draft, custom-line-item-recurrence-info and custom-line-item-recurrence-info-draft. All these models can be consumed from the @commercetools/composable-commerce-test-data/cart entry point.

    This is how new models could be used:

    import {
      LineItemRecurrenceInfoRest,
      LineItemRecurrenceInfoGraphql,
      LineItemRecurrenceInfoDraftRest,
      LineItemRecurrenceInfoDraftGraphql,
      CustomLineItemRecurrenceInfoRest,
      CustomLineItemRecurrenceInfoGraphql,
      CustomLineItemRecurrenceInfoDraftRest,
      CustomLineItemRecurrenceInfoDraftGraphql,
    } from '@commercetools/composable-commerce-test-data/cart';
    
    // Line item recurrence models
    const lineItemRecurrenceInfoRest =
      LineItemRecurrenceInfoRest.random().build();
    const lineItemRecurrenceInfoGraphql =
      LineItemRecurrenceInfoGraphql.random().build();
    const lineItemRecurrenceInfoDraftRest =
      LineItemRecurrenceInfoDraftRest.random().build();
    const lineItemRecurrenceInfoDraftGraphql =
      LineItemRecurrenceInfoDraftGraphql.random().build();
    
    // Custom line item recurrence models
    const customLineItemRecurrenceInfoRest =
      CustomLineItemRecurrenceInfoRest.random().build();
    const customLineItemRecurrenceInfoGraphql =
      CustomLineItemRecurrenceInfoGraphql.random().build();
    const customLineItemRecurrenceInfoDraftRest =
      CustomLineItemRecurrenceInfoDraftRest.random().build();
    const customLineItemRecurrenceInfoDraftGraphql =
      CustomLineItemRecurrenceInfoDraftGraphql.random().build();
  • #1003 fccb6bb Thanks @mario-priceless! - Jest 30 upgrade - Upgrade guide

@commercetools/composable-commerce-test-data@13.12.0

03 Dec 11:11
2337a83

Choose a tag to compare

Minor Changes

  • #930 9ae8ecf Thanks @NickDevG! - Exporting missing shopping list submodels ShoppingListDraft, ShoppingListDraftRest, ShoppingListDraftGraphql, ShoppingListLineItemDraftRest, ShoppingListLineItemDraftGraphql, TextLineItemDraftRest and TextLineItemDraftGraphql,

    Exporting missing state draft submodels StateDraftRest, StateDraftGraphql and StateDraft as well as the types for the module.

Patch Changes

  • #993 133dd9e Thanks @CarlosCortizasCT! - We've migrated the Payment and PaymentDraft models to the new implementation patterns.

    This change does not have any impact on consumers, however the Payment and PaymentDraft models are now deprecated and you're expected to start using the PaymentGraphql or PaymentDraftRest models instead depending of the type of API you're mocking.

    import {
      PaymentGraphql,
      PaymentRest,
      PaymentDraftGraphql,
      PaymentDraftRest,
    } from '@commercetools/composable-commerce-test-data/payment';
    
    const graphqlPayment = PaymentGraphql.random().build();
    const restPayment = PaymentRest.random().build();
    
    const graphqlPaymentDraft = PaymentDraftGraphql.random().build();
    const restPaymentDraft = PaymentDraftRest.random().build();
  • #991 f3729ec Thanks @CarlosCortizasCT! - We've migrated the PaymentStatus and PaymentStatusDraft models to the new implementation patterns.

    This change does not have any impact on consumers, however the PaymentStatus and PaymentStatusDraft models are now deprecated and you're expected to start using the PaymentStatusGraphql or PaymentStatusDraftRest models instead depending of the type of API you're mocking.

    import {
      PaymentStatusGraphql,
      PaymentStatusRest,
      PaymentStatusDraftGraphql,
      PaymentStatusDraftRest,
    } from '@commercetools/composable-commerce-test-data/payment';
    
    const graphqlPaymentStatus = PaymentStatusGraphql.random().build();
    const restPaymentStatus = PaymentStatusRest.random().build();
    
    const graphqlPaymentStatusDraft = PaymentStatusDraftGraphql.random().build();
    const restPaymentStatusDraft = PaymentStatusDraftRest.random().build();
  • #992 52abb24 Thanks @CarlosCortizasCT! - We've migrated the PaymentMethodInfo and PaymentMethodInfoDraft models to the new implementation patterns.

    This change does not have any impact on consumers, however the PaymentMethodInfo and PaymentMethodInfoDraft models are now deprecated and you're expected to start using the PaymentMethodInfoGraphql or PaymentMethodInfoDraftRest models instead depending of the type of API you're mocking.

    import {
      PaymentMethodInfoGraphql,
      PaymentMethodInfoRest,
      PaymentMethodInfoDraftGraphql,
      PaymentMethodInfoDraftRest,
    } from '@commercetools/composable-commerce-test-data/payment';
    
    const graphqlPaymentMethodInfo = PaymentMethodInfoGraphql.random().build();
    const restPaymentMethodInfo = PaymentMethodInfoRest.random().build();
    
    const graphqlPaymentMethodInfoDraft =
      PaymentMethodInfoDraftGraphql.random().build();
    const restPaymentMethodInfoDraft =
      PaymentMethodInfoDraftRest.random().build();
  • #989 fab39e9 Thanks @CarlosCortizasCT! - We've migrated the Transaction and TransactionDraft models to the new implementation patterns.

    This change does not have any impact on consumers, however the Transaction and TransactionDraft models are now deprecated and you're expected to start using the TransactionGraphql or TransactionDraftRest models instead depending of the type of API you're mocking.

    import {
      TransactionGraphql,
      TransactionRest,
      TransactionDraftGraphql,
      TransactionDraftRest,
    } from '@commercetools/composable-commerce-test-data/payment';
    
    const graphqlTransaction = TransactionGraphql.random().build();
    const restTransaction = TransactionRest.random().build();
    
    const graphqlTransactionDraft = TransactionDraftGraphql.random().build();
    const restTransactionDraft = TransactionDraftRest.random().build();

@commercetools/composable-commerce-test-data@13.11.0

22 Oct 14:50
25723ff

Choose a tag to compare

Minor Changes

  • #985 437def9 Thanks @CarlosCortizasCT! - We're introducing a new model named DashboardView can be consumed from the @commercetools/composable-commerce-test-data/my-view entry point.

    There's only a GraphQL version for this model as it only exists in the MC Settings services which only expose a GraphQL API.

    This is how the new model could be used:

    import { DashboardViewGraphql } from '@commercetools/composable-commerce-test-data/my-view';
    
    const dashboardView = DashboardViewGraphql.random().build();

@commercetools/composable-commerce-test-data@13.10.0

21 Oct 09:00
ad4834e

Choose a tag to compare

Minor Changes

  • #983 b0f9eb8 Thanks @CarlosCortizasCT! - We're introducing a new model named OrderDetailView can be consumed from the @commercetools/composable-commerce-test-data/my-view entry point.

    There's only a GraphQL version for this model as it only exists in the MC Settings services which only expose a GraphQL API.

    This is how the new model could be used:

    import { OrderDetailViewGraphql } from '@commercetools/composable-commerce-test-data/my-view';
    
    const orderDetailView = OrderDetailViewGraphql.random().build();

@commercetools/composable-commerce-test-data@13.9.0

15 Oct 15:21
5d12900

Choose a tag to compare

Minor Changes

  • #976 62026f2 Thanks @krishhna123! - We're introducing new models named, day-of-month-schedule, day-of-month-schedule-draft, and day-of-month-schedule-input. All these modules can be consumed from the @commercetools/composable-commerce-test-data/recurring-order entry point.

    This is how new models could be used:

    import {
        DayOfMonthScheuleRest,
        DayOfMonthScheduleGraphql,
        DayOfMonthScheduleDraft,
        DayOfMonthScheuleInput
    } from '@commercetools/composable-commerce-test-data/recurring-order';
    
    // rest models
    const dayOfMonthScheduleDraft = DayOfMonthScheduleDraft.random().build();,
    const dayOfMonthScheuleRest = DayOfMonthScheuleRest.random().build();
    
    // graphql models
    const dayOfMonthScheuleInput = DayOfMonthScheuleInput.random().build();
    const dayOfMonthScheduleGraphql = DayOfMonthScheduleGraphql.random().build();

Patch Changes

  • #982 dca5318 Thanks @rajrdk! - We've identified some models where the default dates that were used to populate some of their fields where not always accurate. The returned default values were past dates instead of a future ones.

    These are the affected models and the properties:

    • InventoryEntryDraft.expectedDelivery
    • RecurringOrderDraft.startsAt
  • #981 b6112e2 Thanks @rajrdk! - Fixed an error with both Price and PriceDraft models causing the default value for the validUntil property to not be a string representation of a future date.

    Now that default value will always represent a date one year ahead.

@commercetools/composable-commerce-test-data@13.8.3

13 Oct 08:04
52c8293

Choose a tag to compare

Patch Changes

  • #977 1b76a63 Thanks @CarlosCortizasCT! - We've migrated the Zone and ZoneDraft models to the new implementation patterns.

    This change does not have any impact on consumers, however the Zone and ZoneDraft models are now deprecated and you're expected to start using the ZoneGraphql, ZoneRest, ZoneDraftGraphql or ZoneDraftRest models instead depending of the type of API you're mocking.

    import {
      ZoneGraphql,
      ZoneRest,
      ZoneDraftRest,
      ZoneDraftGraphql,
    } from '@commercetools/composable-commerce-test-data/zone';
    
    const graphqlZone = ZoneGraphql.random().build();
    const restZone = ZoneRest.random().build();
    
    const graphqlZoneDraft = ZoneDraftGraphql.random().build();
    const restZoneDraft = ZoneDraftRest.random().build();
  • #978 9cf1001 Thanks @CarlosCortizasCT! - Fixed an issue with both the Price and PriceDraft models regarding the default value of their validUntil property as it was being populated with the current timestamp where it's expected to be a future timestamp instead.

@commercetools/composable-commerce-test-data@13.8.2

09 Oct 12:45
9caad00

Choose a tag to compare

Patch Changes

  • #974 4da5a8c Thanks @nima-ct! - Fix zone rate models exports

    The shipping-method index was using aliased wildcard exports (export * as ZoneRate) for zone rate models and zone rate draft models.
    This fix replaces with direct named exports.

    import { ZoneRate } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    // BEFORE
    const graphqlZoneRate = ZoneRate.ZoneRate.random();
    
    // AFTER
    const graphqlZoneRate = ZoneRate.random();

@commercetools/composable-commerce-test-data@13.8.1

09 Oct 09:39
1e5246c

Choose a tag to compare

Patch Changes

  • #971 bf111b2 Thanks @CarlosCortizasCT! - We've migrated the AttributeGroup model to the new implementation patterns.

    This change does not have any impact on consumers, however the AttributeGroup model is now deprecated and you're expected to start using the AttributeGroupGraphql or AttributeGroupRest models instead depending of the type of API you're mocking.

    import {
      AttributeGroupGraphql,
      AttributeGroupRest,
    } from '@commercetools/composable-commerce-test-data/attribute-group';
    
    const graphqlAttributeGroup = AttributeGroupGraphql.random().build();
    const restAttributeGroup = AttributeGroupRest.random().build();
  • #970 34fe95b Thanks @CarlosCortizasCT! - We've fixed an error in the AttributeGroupDraft test-data model as its name was not populated with a draft model.

    Also, we've updated the entry point of the @commercetools/composable-commerce-test-data/attribute-group package entry point so it also exports the AttributeReference model.
    It can be used like this:

    import {
      AttributeReferenceGraphql,
      AttributeReferenceRest,
    } from '@commercetools/composable-commerce-test-data/attribute-group';
    
    const graphqlModel = AttributeReferenceGraphql.random().build();
    const restModel = AttributeReferenceRest.random().build();
  • #973 55cf64b Thanks @nima-ct! - We've migrated the ShippingMethod model to the new implementation patterns.

    This change does not have any impact on consumers, however the ShippingMethod model is now deprecated and you're expected to start using the ShippingMethodGraphql or ShippingMethodRest models instead depending of the type of API you're mocking.

    import {
      ShippingMethodGraphql,
      ShippingMethodRest,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const graphqlShippingMethod = ShippingMethodGraphql.random().build();
    const restShippingMethod = ShippingMethodRest.random().build();

    We've migrated the ShippingMethodDraft model to the new implementation patterns.

    This change does not have any impact on consumers, however the ShippingMethodDraft model is now deprecated and you're expected to start using the ShippingMethodDraftGraphql or ShippingMethodDraftRest models instead depending of the type of API you're mocking.

    import {
      ShippingMethodDraftGraphql,
      ShippingMethodDraftRest,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const graphqlDraft = ShippingMethodDraftGraphql.random().build();
    const restDraft = ShippingMethodDraftRest.random().build();
  • #969 e85472b Thanks @nima-ct! - We've migrated the ZoneRate model to the new implementation patterns.

    This change does not have any impact on consumers, however the ZoneRate model is now deprecated and you're expected to start using the ZoneRateGraphql or ZoneRateRest models instead depending of the type of API you're mocking.

    import {
      ZoneRateGraphql,
      ZoneRateRest,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const graphqlZoneRate = ZoneRateGraphql.random().build();
    const restZoneRate = ZoneRateRest.random().build();

    We've migrated the ZoneRateDraft model to the new implementation patterns.

    This change does not have any impact on consumers, however the ZoneRateDraft model is now deprecated and you're expected to start using the ZoneRateDraftGraphql or ZoneRateDraftRest models instead depending of the type of API you're mocking.

    import {
      ZoneRateDraftGraphql,
      ZoneRateDraftRest,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const graphqlDraft = ZoneRateDraftGraphql.random().build();
    const restDraft = ZoneRateDraftRest.random().build();

@commercetools/composable-commerce-test-data@13.8.0

07 Oct 08:08
436cd67

Choose a tag to compare

Minor Changes

  • #968 1561155 Thanks @tylermorrisford! - Introduces the attribute-group-draft model and an empty preset; and the attribute-reference, which is used internally by attribute-group-draft.

    import {
      AttributeGroupDraftGraphql,
      AttributeGroupDraftRest,
    } from '@commercetools/composable-commerce-test-data/attribute-group';
    
    const graphqlModel = AttributeGroupDraftGraphql.random().build();
    
    const restModel = AttributeGroupDraftRest.random().build();
    
    // empty preset
    const emptyGraphqlModel = AttributeGroupDraftGraphql.presets.empty().build();
    
    const emptyRestModel = AttributeGroupDraftRest.presets.empty().build();
  • #967 0052689 Thanks @nima-ct! - ## New Shipping Rate Price Tier Models

    We're introducing new shipping rate price tier models that provide support for mocking different types of shipping rate pricing tiers:

    import {
      CartClassificationPriceTierDraftRest,
      CartValuePriceTierDraftRest,
      CartScorePriceTierDraftRest,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const cartClassificationTier =
      CartClassificationPriceTierDraftRest.random().build();
    const cartValueTier = CartValuePriceTierDraftRest.random().build();
    const cartScoreTier = CartScorePriceTierDraftRest.random().build();
    import {
      CartClassificationPriceTierGraphql,
      CartValuePriceTierGraphql,
      CartScorePriceTierGraphql,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const cartClassificationTier =
      CartClassificationPriceTierGraphql.random().build();
    const cartValueTier = CartValuePriceTierGraphql.random().build();
    const cartScoreTier = CartScorePriceTierGraphql.random().build();

    Migrated Shipping Rate Model

    The shipping rate models have been migrated to the new model structure:

    import {
      ShippingRateRest,
      ShippingRateGraphql,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const restShippingRate = ShippingRateRest.random().build();
    const graphqlShippingRate = ShippingRateGraphql.random().build();

    Migrated Shipping Rate Draft Model

    The shipping rate draft models have been migrated with enhanced preset support:

    import {
      ShippingRateDraftRest,
      ShippingRateDraftGraphql,
    } from '@commercetools/composable-commerce-test-data/shipping-method';
    
    const restDraft = ShippingRateDraftRest.random().build();
    const graphqlDraft = ShippingRateDraftGraphql.random().build();

Patch Changes

  • #962 572ac19 Thanks @CarlosCortizasCT! - Updated the way constants are exported for the ProductSelection models.

    We were exporting them independently but we usually add them as part of the models instead.

    // BEFORE
    import {
      ProductSelectionGraphql,
      productSelectionMode as productSelectionModeConstants,
    } from '@commercetools/composable-commerce-test-data/product-selection';
    
    const productSelectionDraftInclusion = ProductSelectionGraphql.random()
      .mode(productSelectionModeConstants.Individual)
      .build();
    
    // AFTER
    import { ProductSelectionGraphql } from '@commercetools/composable-commerce-test-data/product-selection';
    
    const productSelectionDraftInclusion = ProductSelectionGraphql.random()
      .mode(ProductSelectionGraphql.constants.productSelectionMode.Individual)
      .build();