Skip to content

Recurrence info models#997

Merged
krishhna123 merged 6 commits into
mainfrom
recurrence-info-models
Dec 10, 2025
Merged

Recurrence info models#997
krishhna123 merged 6 commits into
mainfrom
recurrence-info-models

Conversation

@krishhna123
Copy link
Copy Markdown
Contributor

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();

@krishhna123 krishhna123 requested review from a team as code owners December 4, 2025 13:15
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 4, 2025

🦋 Changeset detected

Latest commit: 4338d60

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@commercetools/composable-commerce-test-data Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@rajrdk rajrdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krishhna123 , nice work 💯 .
Just a suggestion: In the GraphQL validators in spec.ts file, we usually just check the __typename property. If that one is ok, we can rest assured the object has the right shape.
Reference : #815 (comment)

@krishhna123
Copy link
Copy Markdown
Contributor Author

@krishhna123 , nice work 💯 . Just a suggestion: In the GraphQL validators in spec.ts file, we usually just check the __typename property. If that one is ok, we can rest assured the object has the right shape. Reference : #815 (comment)

Hey @rajrdk Thank you for the feedback. I have updated the tests now.

@krishhna123 krishhna123 merged commit b60bcce into main Dec 10, 2025
5 checks passed
@krishhna123 krishhna123 deleted the recurrence-info-models branch December 10, 2025 09:02
@ct-changesets ct-changesets Bot mentioned this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants