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

Add pos.cart.update.event.observe event type #2608

Merged

Conversation

ProdigyXable
Copy link
Contributor

@ProdigyXable ProdigyXable commented Jan 31, 2025

Background

Related Issue: https://github.com/Shopify/retail-hq-store-management/issues/725
Related GSD Project: POS Channel: Add event-initiated extension targets to allow EU partners to build fiscalization compliance Extensions for POS App

This PR provides support for the pos.cart-update.event.observe event target

Solution

  • Add types for pos.cart-update.event.observe
  • Add documentation for pos.cart-update.event.observe

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

@ProdigyXable ProdigyXable self-assigned this Jan 31, 2025
@ProdigyXable ProdigyXable force-pushed the sam/add-event-type/pos.cart-update.event.observe branch from f676039 to 0775542 Compare January 31, 2025 17:34
@ProdigyXable ProdigyXable changed the title Add pos.cart update.event.observe event type Add pos.cart.update.event.observe event type Jan 31, 2025
@ProdigyXable ProdigyXable force-pushed the sam/add-event-type/pos.cart-update.event.observe branch from 71c2e3d to 4643bf8 Compare January 31, 2025 18:57
import {BaseInput} from './BaseInput';
import {Cart} from '../../api';

export interface CartUpdateEventInput extends BaseInput {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export interface CartUpdateEventInput extends BaseInput {
export interface CartUpdatetInput extends BaseInput {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a name collision with a pre-existing CartUpdateInput related to bulk cart updates. So both cannot be ultimately exported from the package. See 4643bf8 for reference. With that context do you suggest another alternative name?

Copy link
Contributor

@js-goupil js-goupil left a comment

Choose a reason for hiding this comment

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

Just a small comment on the input type def

@@ -52,6 +52,7 @@ Refer to the [migration guide](/docs/api/pos-ui-extensions/migrating) for more i
- Added support for cash tracking session. ${TargetLink.PosCashTrackingSessionStartObserve}, ${TargetLink.PosCashTrackingSessionCancelObserve}, ${TargetLink.PosCashTrackingSessionCompleteObserve} targets.
- Added support for the ${TargetLink.PosPrepareReceiptInject} target.
- Added support for adding custom lines to receipts. ${TargetLink.PosPrepareReceiptInject} target.
- Added support for adding custom lines to receipts. ${TargetLink.PosCartUpdateObserve} target.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this sentence better reflect PosCartUpdateObserve?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😂, of course! Looks like I missed a spot from a copy/paste. Addressed in d3cdc1d.

@ProdigyXable ProdigyXable merged commit 95f581a into unstable Feb 3, 2025
6 checks passed
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.

4 participants