@munchi_oy/core 1.9.96 → 1.9.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2677,6 +2677,42 @@ export interface ChargeDtoPaymentMethodDetails {
2677
2677
  */
2678
2678
  'affirmDetails'?: PaymentMethodDetailsDtoAffirmDetails;
2679
2679
  }
2680
+ /**
2681
+ *
2682
+ * @export
2683
+ * @enum {string}
2684
+ */
2685
+ export declare const ChargeStatusEnum: {
2686
+ readonly Pending: "pending";
2687
+ readonly Success: "success";
2688
+ readonly Failure: "failure";
2689
+ };
2690
+ export type ChargeStatusEnum = typeof ChargeStatusEnum[keyof typeof ChargeStatusEnum];
2691
+ /**
2692
+ *
2693
+ * @export
2694
+ * @interface ChargeStatusResponseDto
2695
+ */
2696
+ export interface ChargeStatusResponseDto {
2697
+ /**
2698
+ *
2699
+ * @type {ChargeStatusEnum}
2700
+ * @memberof ChargeStatusResponseDto
2701
+ */
2702
+ 'status': ChargeStatusEnum;
2703
+ /**
2704
+ *
2705
+ * @type {string}
2706
+ * @memberof ChargeStatusResponseDto
2707
+ */
2708
+ 'transactionId'?: string | null;
2709
+ /**
2710
+ *
2711
+ * @type {string}
2712
+ * @memberof ChargeStatusResponseDto
2713
+ */
2714
+ 'errorCode'?: string | null;
2715
+ }
2680
2716
  /**
2681
2717
  *
2682
2718
  * @export
@@ -6777,6 +6813,12 @@ export interface InitiateVivaA2aSessionDto {
6777
6813
  * @memberof InitiateVivaA2aSessionDto
6778
6814
  */
6779
6815
  'splitContext'?: CreateManualSessionDtoSplitContext;
6816
+ /**
6817
+ * Pay-terminal chargeId (from the pay-terminal-protocol relay) for this attempt. Stamped onto the session\'s metadata so the charge-status fallback can address this exact attempt directly, even when other charges are concurrently in flight on the same order (e.g. a split payment dispatched to a different paired terminal).
6818
+ * @type {string}
6819
+ * @memberof InitiateVivaA2aSessionDto
6820
+ */
6821
+ 'chargeId'?: string;
6780
6822
  }
6781
6823
  /**
6782
6824
  *
@@ -6917,12 +6959,6 @@ export interface InitiateVivaSessionDto {
6917
6959
  * @memberof InitiateVivaSessionDto
6918
6960
  */
6919
6961
  'splitContext'?: CreateManualSessionDtoSplitContext;
6920
- /**
6921
- * Paired Munchi Pay terminal id (from @munchi_oy/pay-terminal-protocol pairing) that should execute this app-to-app charge. Bound onto the session so the paired terminal is discoverable/auditable; the POS still owns polling as source of truth. Distinct from the Viva cloud-terminal hardware id.
6922
- * @type {string}
6923
- * @memberof InitiateVivaSessionDto
6924
- */
6925
- 'payTerminalId'?: string;
6926
6962
  }
6927
6963
  /**
6928
6964
  *
@@ -35411,6 +35447,14 @@ export declare const PaymentSessionApiAxiosParamCreator: (configuration?: Config
35411
35447
  * @throws {RequiredError}
35412
35448
  */
35413
35449
  initiateWorldlineSession: (initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
35450
+ /**
35451
+ * Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity. chargeId is stamped onto the session\'s own metadata at /viva/a2a initiate time, so this addresses one specific charge attempt even when other charges are concurrently in flight on the same order (e.g. a split payment across multiple paired terminals).
35452
+ * @summary Poll a charge\'s outcome by chargeId.
35453
+ * @param {string} chargeId
35454
+ * @param {*} [options] Override http request option.
35455
+ * @throws {RequiredError}
35456
+ */
35457
+ paymentSessionGetChargeStatus: (chargeId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
35414
35458
  /**
35415
35459
  * Called by a Cloud Task (not the client). Holds the request open and long-polls Viva by sessionId for up to ~45s. As soon as the transaction is terminal it updates the session status and, on success, triggers order reconciliation — guarded by a CAS claim (tryClose) so a late webhook never double-writes the paymentEvent — so the order closes even if the webhook never arrives.
35416
35460
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -35558,6 +35602,14 @@ export declare const PaymentSessionApiFp: (configuration?: Configuration) => {
35558
35602
  * @throws {RequiredError}
35559
35603
  */
35560
35604
  initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateWorldlineSessionResponseDto>>;
35605
+ /**
35606
+ * Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity. chargeId is stamped onto the session\'s own metadata at /viva/a2a initiate time, so this addresses one specific charge attempt even when other charges are concurrently in flight on the same order (e.g. a split payment across multiple paired terminals).
35607
+ * @summary Poll a charge\'s outcome by chargeId.
35608
+ * @param {string} chargeId
35609
+ * @param {*} [options] Override http request option.
35610
+ * @throws {RequiredError}
35611
+ */
35612
+ paymentSessionGetChargeStatus(chargeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChargeStatusResponseDto>>;
35561
35613
  /**
35562
35614
  * Called by a Cloud Task (not the client). Holds the request open and long-polls Viva by sessionId for up to ~45s. As soon as the transaction is terminal it updates the session status and, on success, triggers order reconciliation — guarded by a CAS claim (tryClose) so a late webhook never double-writes the paymentEvent — so the order closes even if the webhook never arrives.
35563
35615
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -35705,6 +35757,14 @@ export declare const PaymentSessionApiFactory: (configuration?: Configuration, b
35705
35757
  * @throws {RequiredError}
35706
35758
  */
35707
35759
  initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: any): AxiosPromise<InitiateWorldlineSessionResponseDto>;
35760
+ /**
35761
+ * Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity. chargeId is stamped onto the session\'s own metadata at /viva/a2a initiate time, so this addresses one specific charge attempt even when other charges are concurrently in flight on the same order (e.g. a split payment across multiple paired terminals).
35762
+ * @summary Poll a charge\'s outcome by chargeId.
35763
+ * @param {string} chargeId
35764
+ * @param {*} [options] Override http request option.
35765
+ * @throws {RequiredError}
35766
+ */
35767
+ paymentSessionGetChargeStatus(chargeId: string, options?: any): AxiosPromise<ChargeStatusResponseDto>;
35708
35768
  /**
35709
35769
  * Called by a Cloud Task (not the client). Holds the request open and long-polls Viva by sessionId for up to ~45s. As soon as the transaction is terminal it updates the session status and, on success, triggers order reconciliation — guarded by a CAS claim (tryClose) so a late webhook never double-writes the paymentEvent — so the order closes even if the webhook never arrives.
35710
35770
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -35860,6 +35920,15 @@ export interface PaymentSessionApiInterface {
35860
35920
  * @memberof PaymentSessionApiInterface
35861
35921
  */
35862
35922
  initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateWorldlineSessionResponseDto>;
35923
+ /**
35924
+ * Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity. chargeId is stamped onto the session\'s own metadata at /viva/a2a initiate time, so this addresses one specific charge attempt even when other charges are concurrently in flight on the same order (e.g. a split payment across multiple paired terminals).
35925
+ * @summary Poll a charge\'s outcome by chargeId.
35926
+ * @param {string} chargeId
35927
+ * @param {*} [options] Override http request option.
35928
+ * @throws {RequiredError}
35929
+ * @memberof PaymentSessionApiInterface
35930
+ */
35931
+ paymentSessionGetChargeStatus(chargeId: string, options?: AxiosRequestConfig): AxiosPromise<ChargeStatusResponseDto>;
35863
35932
  /**
35864
35933
  * Called by a Cloud Task (not the client). Holds the request open and long-polls Viva by sessionId for up to ~45s. As soon as the transaction is terminal it updates the session status and, on success, triggers order reconciliation — guarded by a CAS claim (tryClose) so a late webhook never double-writes the paymentEvent — so the order closes even if the webhook never arrives.
35865
35934
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -36026,6 +36095,15 @@ export declare class PaymentSessionApi extends BaseAPI implements PaymentSession
36026
36095
  * @memberof PaymentSessionApi
36027
36096
  */
36028
36097
  initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiateWorldlineSessionResponseDto, any, {}>>;
36098
+ /**
36099
+ * Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity. chargeId is stamped onto the session\'s own metadata at /viva/a2a initiate time, so this addresses one specific charge attempt even when other charges are concurrently in flight on the same order (e.g. a split payment across multiple paired terminals).
36100
+ * @summary Poll a charge\'s outcome by chargeId.
36101
+ * @param {string} chargeId
36102
+ * @param {*} [options] Override http request option.
36103
+ * @throws {RequiredError}
36104
+ * @memberof PaymentSessionApi
36105
+ */
36106
+ paymentSessionGetChargeStatus(chargeId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChargeStatusResponseDto, any, {}>>;
36029
36107
  /**
36030
36108
  * Called by a Cloud Task (not the client). Holds the request open and long-polls Viva by sessionId for up to ~45s. As soon as the transaction is terminal it updates the session status and, on success, triggers order reconciliation — guarded by a CAS claim (tryClose) so a late webhook never double-writes the paymentEvent — so the order closes even if the webhook never arrives.
36031
36109
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)