Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for as-associate endpoints #259

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

mvantellingen
Copy link
Member

This implements the carts and orders endpoints via the as-associate
endpoints. It doesn’t do any permission checking for now, just proxies
the requests to the existing code.

In the future we should filter the responses atleast on the business
units

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 10 changed files in this pull request and generated no suggestions.

Files not reviewed (5)
  • .changeset/lemon-monkeys-compete.md: Evaluated as low risk
  • src/services/as-associate-order.test.ts: Evaluated as low risk
  • src/services/index.ts: Evaluated as low risk
  • src/ctMock.ts: Evaluated as low risk
  • src/types.ts: Evaluated as low risk
Comments skipped due to low confidence (3)

src/services/as-associate-order.ts:18

  • The comment is misleading as it refers to handling the /me/active-cart path, which is not relevant for the AsAssociateOrderService. It should be corrected to reflect the actual functionality.
// Overwrite this function to be able to handle /me/active-cart path.

src/services/as-associate-order.ts:14

  • [nitpick] Consider using a constant for the base path to avoid potential typos and improve maintainability.
return "orders";

src/services/as-associate.ts:34

  • The new routes introduced in the AsAssociateService class should be covered by tests to ensure they are correctly set up and the sub-services are properly instantiated.
}
This implements the carts and orders endpoints via the as-associate
endpoints. It doesn’t do any permission checking for now, just proxies
the requests to the existing code.

In the future we should filter the responses atleast on the business
units
@mvantellingen mvantellingen force-pushed the feature/as-associate-endpoints branch from daabaff to b305c55 Compare December 10, 2024 14:05
Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: b305c55

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

This PR includes changesets to release 1 package
Name Type
@labdigital/commercetools-mock 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

@mvantellingen mvantellingen merged commit a7166d7 into main Dec 10, 2024
9 checks passed
@mvantellingen mvantellingen deleted the feature/as-associate-endpoints branch December 10, 2024 14:06
@github-actions github-actions bot mentioned this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant