Releases: commercetools/test-data
@commercetools/composable-commerce-test-data@13.13.1
Patch Changes
@commercetools/composable-commerce-test-data@13.13.0
Minor Changes
-
#997
b60bcceThanks @krishhna123! - We're introducing new models named,line-item-recurrence-infoandline-item-recurrence-info-draft,custom-line-item-recurrence-infoandcustom-line-item-recurrence-info-draft. All these models can be consumed from the@commercetools/composable-commerce-test-data/cartentry 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
fccb6bbThanks @mario-priceless! - Jest 30 upgrade - Upgrade guide
@commercetools/composable-commerce-test-data@13.12.0
Minor Changes
-
#930
9ae8ecfThanks @NickDevG! - Exporting missing shopping list submodelsShoppingListDraft,ShoppingListDraftRest,ShoppingListDraftGraphql,ShoppingListLineItemDraftRest,ShoppingListLineItemDraftGraphql,TextLineItemDraftRestandTextLineItemDraftGraphql,Exporting missing state draft submodels
StateDraftRest,StateDraftGraphqlandStateDraftas well as the types for the module.
Patch Changes
-
#993
133dd9eThanks @CarlosCortizasCT! - We've migrated thePaymentandPaymentDraftmodels to the new implementation patterns.This change does not have any impact on consumers, however the
PaymentandPaymentDraftmodels are now deprecated and you're expected to start using thePaymentGraphqlorPaymentDraftRestmodels 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
f3729ecThanks @CarlosCortizasCT! - We've migrated thePaymentStatusandPaymentStatusDraftmodels to the new implementation patterns.This change does not have any impact on consumers, however the
PaymentStatusandPaymentStatusDraftmodels are now deprecated and you're expected to start using thePaymentStatusGraphqlorPaymentStatusDraftRestmodels 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
52abb24Thanks @CarlosCortizasCT! - We've migrated thePaymentMethodInfoandPaymentMethodInfoDraftmodels to the new implementation patterns.This change does not have any impact on consumers, however the
PaymentMethodInfoandPaymentMethodInfoDraftmodels are now deprecated and you're expected to start using thePaymentMethodInfoGraphqlorPaymentMethodInfoDraftRestmodels 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
fab39e9Thanks @CarlosCortizasCT! - We've migrated theTransactionandTransactionDraftmodels to the new implementation patterns.This change does not have any impact on consumers, however the
TransactionandTransactionDraftmodels are now deprecated and you're expected to start using theTransactionGraphqlorTransactionDraftRestmodels 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
Minor Changes
-
#985
437def9Thanks @CarlosCortizasCT! - We're introducing a new model namedDashboardViewcan be consumed from the@commercetools/composable-commerce-test-data/my-viewentry 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
Minor Changes
-
#983
b0f9eb8Thanks @CarlosCortizasCT! - We're introducing a new model namedOrderDetailViewcan be consumed from the@commercetools/composable-commerce-test-data/my-viewentry 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
Minor Changes
-
#976
62026f2Thanks @krishhna123! - We're introducing new models named,day-of-month-schedule,day-of-month-schedule-draft, andday-of-month-schedule-input. All these modules can be consumed from the@commercetools/composable-commerce-test-data/recurring-orderentry 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
dca5318Thanks @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.expectedDeliveryRecurringOrderDraft.startsAt
-
#981
b6112e2Thanks @rajrdk! - Fixed an error with bothPriceandPriceDraftmodels causing the default value for thevalidUntilproperty 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
Patch Changes
-
#977
1b76a63Thanks @CarlosCortizasCT! - We've migrated theZoneandZoneDraftmodels to the new implementation patterns.This change does not have any impact on consumers, however the
ZoneandZoneDraftmodels are now deprecated and you're expected to start using theZoneGraphql,ZoneRest,ZoneDraftGraphqlorZoneDraftRestmodels 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
9cf1001Thanks @CarlosCortizasCT! - Fixed an issue with both thePriceandPriceDraftmodels regarding the default value of theirvalidUntilproperty 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
Patch Changes
-
#974
4da5a8cThanks @nima-ct! - Fix zone rate models exportsThe 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
Patch Changes
-
#971
bf111b2Thanks @CarlosCortizasCT! - We've migrated theAttributeGroupmodel to the new implementation patterns.This change does not have any impact on consumers, however the
AttributeGroupmodel is now deprecated and you're expected to start using theAttributeGroupGraphqlorAttributeGroupRestmodels 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
34fe95bThanks @CarlosCortizasCT! - We've fixed an error in theAttributeGroupDrafttest-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-grouppackage entry point so it also exports theAttributeReferencemodel.
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
55cf64bThanks @nima-ct! - We've migrated theShippingMethodmodel to the new implementation patterns.This change does not have any impact on consumers, however the
ShippingMethodmodel is now deprecated and you're expected to start using theShippingMethodGraphqlorShippingMethodRestmodels 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
ShippingMethodDraftmodel to the new implementation patterns.This change does not have any impact on consumers, however the
ShippingMethodDraftmodel is now deprecated and you're expected to start using theShippingMethodDraftGraphqlorShippingMethodDraftRestmodels 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
e85472bThanks @nima-ct! - We've migrated theZoneRatemodel to the new implementation patterns.This change does not have any impact on consumers, however the
ZoneRatemodel is now deprecated and you're expected to start using theZoneRateGraphqlorZoneRateRestmodels 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
ZoneRateDraftmodel to the new implementation patterns.This change does not have any impact on consumers, however the
ZoneRateDraftmodel is now deprecated and you're expected to start using theZoneRateDraftGraphqlorZoneRateDraftRestmodels 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
Minor Changes
-
#968
1561155Thanks @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
0052689Thanks @nima-ct! - ## New Shipping Rate Price Tier ModelsWe'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
572ac19Thanks @CarlosCortizasCT! - Updated the way constants are exported for theProductSelectionmodels.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();