@munchi_oy/core 1.9.74 → 1.9.76
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.
- package/dist/generated/api.d.ts +957 -33
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/generated/api.ts +1267 -35
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/generated/api.ts
CHANGED
|
@@ -3668,10 +3668,10 @@ export interface CreateManualSessionDto {
|
|
|
3668
3668
|
'tipAmount'?: number;
|
|
3669
3669
|
/**
|
|
3670
3670
|
*
|
|
3671
|
-
* @type {
|
|
3671
|
+
* @type {CreateManualSessionDtoSplitContext}
|
|
3672
3672
|
* @memberof CreateManualSessionDto
|
|
3673
3673
|
*/
|
|
3674
|
-
'splitContext'?:
|
|
3674
|
+
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
3675
3675
|
/**
|
|
3676
3676
|
* Arbitrary client metadata persisted on the session (e.g. voucher code, gift card id, employee id, external reference, notes). Surfaced to reconciliation when building the order paymentEvent.
|
|
3677
3677
|
* @type {object}
|
|
@@ -3930,6 +3930,33 @@ export interface CreateManualSessionDtoOrder {
|
|
|
3930
3930
|
}
|
|
3931
3931
|
|
|
3932
3932
|
|
|
3933
|
+
/**
|
|
3934
|
+
* Split context. Omit for a full-cart payment, or send { mode, partId|seatId } for a split. Must match the order\'s checkoutModel.
|
|
3935
|
+
* @export
|
|
3936
|
+
* @interface CreateManualSessionDtoSplitContext
|
|
3937
|
+
*/
|
|
3938
|
+
export interface CreateManualSessionDtoSplitContext {
|
|
3939
|
+
/**
|
|
3940
|
+
*
|
|
3941
|
+
* @type {CheckoutModelEnum}
|
|
3942
|
+
* @memberof CreateManualSessionDtoSplitContext
|
|
3943
|
+
*/
|
|
3944
|
+
'mode': CheckoutModelEnum;
|
|
3945
|
+
/**
|
|
3946
|
+
* Equal-split part id. Required when mode=EQUAL_SPLIT; ignored otherwise.
|
|
3947
|
+
* @type {string}
|
|
3948
|
+
* @memberof CreateManualSessionDtoSplitContext
|
|
3949
|
+
*/
|
|
3950
|
+
'partId'?: string;
|
|
3951
|
+
/**
|
|
3952
|
+
* Item-split seat id. Required when mode=ITEM_SPLIT; ignored otherwise.
|
|
3953
|
+
* @type {string}
|
|
3954
|
+
* @memberof CreateManualSessionDtoSplitContext
|
|
3955
|
+
*/
|
|
3956
|
+
'seatId'?: string;
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
|
|
3933
3960
|
/**
|
|
3934
3961
|
*
|
|
3935
3962
|
* @export
|
|
@@ -6703,10 +6730,10 @@ export interface InitiateNetsSessionDto {
|
|
|
6703
6730
|
'amount': number;
|
|
6704
6731
|
/**
|
|
6705
6732
|
*
|
|
6706
|
-
* @type {
|
|
6733
|
+
* @type {CreateManualSessionDtoSplitContext}
|
|
6707
6734
|
* @memberof InitiateNetsSessionDto
|
|
6708
6735
|
*/
|
|
6709
|
-
'splitContext'?:
|
|
6736
|
+
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
6710
6737
|
}
|
|
6711
6738
|
/**
|
|
6712
6739
|
*
|
|
@@ -6796,10 +6823,10 @@ export interface InitiateVivaA2aSessionDto {
|
|
|
6796
6823
|
'showTransactionResult'?: boolean;
|
|
6797
6824
|
/**
|
|
6798
6825
|
*
|
|
6799
|
-
* @type {
|
|
6826
|
+
* @type {CreateManualSessionDtoSplitContext}
|
|
6800
6827
|
* @memberof InitiateVivaA2aSessionDto
|
|
6801
6828
|
*/
|
|
6802
|
-
'splitContext'?:
|
|
6829
|
+
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
6803
6830
|
}
|
|
6804
6831
|
|
|
6805
6832
|
|
|
@@ -6940,38 +6967,11 @@ export interface InitiateVivaSessionDto {
|
|
|
6940
6967
|
'amount': number;
|
|
6941
6968
|
/**
|
|
6942
6969
|
*
|
|
6943
|
-
* @type {
|
|
6970
|
+
* @type {CreateManualSessionDtoSplitContext}
|
|
6944
6971
|
* @memberof InitiateVivaSessionDto
|
|
6945
6972
|
*/
|
|
6946
|
-
'splitContext'?:
|
|
6973
|
+
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
6947
6974
|
}
|
|
6948
|
-
/**
|
|
6949
|
-
* Split context. Omit for a full-cart payment, or send { mode, partId|seatId } for a split. Must match the order\'s checkoutModel.
|
|
6950
|
-
* @export
|
|
6951
|
-
* @interface InitiateVivaSessionDtoSplitContext
|
|
6952
|
-
*/
|
|
6953
|
-
export interface InitiateVivaSessionDtoSplitContext {
|
|
6954
|
-
/**
|
|
6955
|
-
*
|
|
6956
|
-
* @type {CheckoutModelEnum}
|
|
6957
|
-
* @memberof InitiateVivaSessionDtoSplitContext
|
|
6958
|
-
*/
|
|
6959
|
-
'mode': CheckoutModelEnum;
|
|
6960
|
-
/**
|
|
6961
|
-
* Equal-split part id. Required when mode=EQUAL_SPLIT; ignored otherwise.
|
|
6962
|
-
* @type {string}
|
|
6963
|
-
* @memberof InitiateVivaSessionDtoSplitContext
|
|
6964
|
-
*/
|
|
6965
|
-
'partId'?: string;
|
|
6966
|
-
/**
|
|
6967
|
-
* Item-split seat id. Required when mode=ITEM_SPLIT; ignored otherwise.
|
|
6968
|
-
* @type {string}
|
|
6969
|
-
* @memberof InitiateVivaSessionDtoSplitContext
|
|
6970
|
-
*/
|
|
6971
|
-
'seatId'?: string;
|
|
6972
|
-
}
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
6975
|
/**
|
|
6976
6976
|
*
|
|
6977
6977
|
* @export
|
|
@@ -7084,6 +7084,74 @@ export interface InitiateVivaSessionResponseDtoVivaIntent {
|
|
|
7084
7084
|
}
|
|
7085
7085
|
|
|
7086
7086
|
|
|
7087
|
+
/**
|
|
7088
|
+
*
|
|
7089
|
+
* @export
|
|
7090
|
+
* @interface InitiateWorldlineSessionDto
|
|
7091
|
+
*/
|
|
7092
|
+
export interface InitiateWorldlineSessionDto {
|
|
7093
|
+
/**
|
|
7094
|
+
* The internal business ID.
|
|
7095
|
+
* @type {number}
|
|
7096
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7097
|
+
*/
|
|
7098
|
+
'businessId': number;
|
|
7099
|
+
/**
|
|
7100
|
+
* The POS order ID this payment session is for.
|
|
7101
|
+
* @type {string}
|
|
7102
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7103
|
+
*/
|
|
7104
|
+
'orderId': string;
|
|
7105
|
+
/**
|
|
7106
|
+
* Amount to charge in smallest currency unit (cents).
|
|
7107
|
+
* @type {number}
|
|
7108
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7109
|
+
*/
|
|
7110
|
+
'amount': number;
|
|
7111
|
+
/**
|
|
7112
|
+
* Optional tip amount in the smallest currency unit (cents).
|
|
7113
|
+
* @type {number}
|
|
7114
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7115
|
+
*/
|
|
7116
|
+
'tipAmount'?: number;
|
|
7117
|
+
/**
|
|
7118
|
+
* Whether the terminal should print the customer receipt.
|
|
7119
|
+
* @type {boolean}
|
|
7120
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7121
|
+
*/
|
|
7122
|
+
'showReceipt'?: boolean;
|
|
7123
|
+
/**
|
|
7124
|
+
*
|
|
7125
|
+
* @type {CreateManualSessionDtoSplitContext}
|
|
7126
|
+
* @memberof InitiateWorldlineSessionDto
|
|
7127
|
+
*/
|
|
7128
|
+
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
7129
|
+
}
|
|
7130
|
+
/**
|
|
7131
|
+
*
|
|
7132
|
+
* @export
|
|
7133
|
+
* @interface InitiateWorldlineSessionResponseDto
|
|
7134
|
+
*/
|
|
7135
|
+
export interface InitiateWorldlineSessionResponseDto {
|
|
7136
|
+
/**
|
|
7137
|
+
* Opaque token returned to the client. Used by the client to poll/sync the session via GET /payment-session/:clientToken.
|
|
7138
|
+
* @type {string}
|
|
7139
|
+
* @memberof InitiateWorldlineSessionResponseDto
|
|
7140
|
+
*/
|
|
7141
|
+
'clientToken': string;
|
|
7142
|
+
/**
|
|
7143
|
+
* Internal session ID — equal to the Worldline operationId the webhook resolves against.
|
|
7144
|
+
* @type {string}
|
|
7145
|
+
* @memberof InitiateWorldlineSessionResponseDto
|
|
7146
|
+
*/
|
|
7147
|
+
'sessionId': string;
|
|
7148
|
+
/**
|
|
7149
|
+
* The Worldline operationId. Same value as sessionId; exposed so the client can correlate terminal/Ably updates during the transition.
|
|
7150
|
+
* @type {string}
|
|
7151
|
+
* @memberof InitiateWorldlineSessionResponseDto
|
|
7152
|
+
*/
|
|
7153
|
+
'operationId': string;
|
|
7154
|
+
}
|
|
7087
7155
|
/**
|
|
7088
7156
|
*
|
|
7089
7157
|
* @export
|
|
@@ -11564,6 +11632,172 @@ export interface OrderResponseDtoPriceSummary {
|
|
|
11564
11632
|
*/
|
|
11565
11633
|
'totalNet': number;
|
|
11566
11634
|
}
|
|
11635
|
+
/**
|
|
11636
|
+
*
|
|
11637
|
+
* @export
|
|
11638
|
+
* @interface OrderSettlementStatusDto
|
|
11639
|
+
*/
|
|
11640
|
+
export interface OrderSettlementStatusDto {
|
|
11641
|
+
/**
|
|
11642
|
+
* The internal business ID.
|
|
11643
|
+
* @type {number}
|
|
11644
|
+
* @memberof OrderSettlementStatusDto
|
|
11645
|
+
*/
|
|
11646
|
+
'businessId': number;
|
|
11647
|
+
/**
|
|
11648
|
+
* The order ID the settlement is computed for.
|
|
11649
|
+
* @type {string}
|
|
11650
|
+
* @memberof OrderSettlementStatusDto
|
|
11651
|
+
*/
|
|
11652
|
+
'orderId': string;
|
|
11653
|
+
/**
|
|
11654
|
+
* The order\'s checkout model (FULL / EQUAL_SPLIT / ITEM_SPLIT).
|
|
11655
|
+
* @type {string}
|
|
11656
|
+
* @memberof OrderSettlementStatusDto
|
|
11657
|
+
*/
|
|
11658
|
+
'checkoutModel': string;
|
|
11659
|
+
/**
|
|
11660
|
+
* Overall settlement status: \'underpaid\' | \'settled\' | \'overpaid\'.
|
|
11661
|
+
* @type {string}
|
|
11662
|
+
* @memberof OrderSettlementStatusDto
|
|
11663
|
+
*/
|
|
11664
|
+
'status': string;
|
|
11665
|
+
/**
|
|
11666
|
+
* True once the order is fully paid (settled or overpaid). The FE\'s stop condition.
|
|
11667
|
+
* @type {boolean}
|
|
11668
|
+
* @memberof OrderSettlementStatusDto
|
|
11669
|
+
*/
|
|
11670
|
+
'isFullyPaid': boolean;
|
|
11671
|
+
/**
|
|
11672
|
+
* Order total in the smallest currency unit (cents).
|
|
11673
|
+
* @type {number}
|
|
11674
|
+
* @memberof OrderSettlementStatusDto
|
|
11675
|
+
*/
|
|
11676
|
+
'cartTotal': number;
|
|
11677
|
+
/**
|
|
11678
|
+
* Sum of settled payments in cents.
|
|
11679
|
+
* @type {number}
|
|
11680
|
+
* @memberof OrderSettlementStatusDto
|
|
11681
|
+
*/
|
|
11682
|
+
'paidAmount': number;
|
|
11683
|
+
/**
|
|
11684
|
+
* Outstanding balance in cents (0 when settled/overpaid).
|
|
11685
|
+
* @type {number}
|
|
11686
|
+
* @memberof OrderSettlementStatusDto
|
|
11687
|
+
*/
|
|
11688
|
+
'remainingAmount': number;
|
|
11689
|
+
/**
|
|
11690
|
+
* Amount still payable in cents (never negative).
|
|
11691
|
+
* @type {number}
|
|
11692
|
+
* @memberof OrderSettlementStatusDto
|
|
11693
|
+
*/
|
|
11694
|
+
'amountLeftToPay': number;
|
|
11695
|
+
/**
|
|
11696
|
+
* Number of paymentEvents currently on the order.
|
|
11697
|
+
* @type {number}
|
|
11698
|
+
* @memberof OrderSettlementStatusDto
|
|
11699
|
+
*/
|
|
11700
|
+
'paymentEventCount': number;
|
|
11701
|
+
}
|
|
11702
|
+
/**
|
|
11703
|
+
*
|
|
11704
|
+
* @export
|
|
11705
|
+
* @interface OrderSettlementStatusRequestDto
|
|
11706
|
+
*/
|
|
11707
|
+
export interface OrderSettlementStatusRequestDto {
|
|
11708
|
+
/**
|
|
11709
|
+
* Cash change handed back to the customer (cents), netted out of the paid amount so an over-tender does not read as overpaid. Omit or 0 for no adjustment.
|
|
11710
|
+
* @type {number}
|
|
11711
|
+
* @memberof OrderSettlementStatusRequestDto
|
|
11712
|
+
*/
|
|
11713
|
+
'cashChange'?: number;
|
|
11714
|
+
/**
|
|
11715
|
+
* Override the cart total (cents) instead of the persisted order total. For FULL-cart callers whose total differs from the snapshot (e.g. cash-rounded).
|
|
11716
|
+
* @type {number}
|
|
11717
|
+
* @memberof OrderSettlementStatusRequestDto
|
|
11718
|
+
*/
|
|
11719
|
+
'cartTotalAmount'?: number;
|
|
11720
|
+
}
|
|
11721
|
+
/**
|
|
11722
|
+
*
|
|
11723
|
+
* @export
|
|
11724
|
+
* @interface OrderSettlementStatusResponseDto
|
|
11725
|
+
*/
|
|
11726
|
+
export interface OrderSettlementStatusResponseDto {
|
|
11727
|
+
/**
|
|
11728
|
+
*
|
|
11729
|
+
* @type {OrderSettlementStatusResponseDtoSettlement}
|
|
11730
|
+
* @memberof OrderSettlementStatusResponseDto
|
|
11731
|
+
*/
|
|
11732
|
+
'settlement': OrderSettlementStatusResponseDtoSettlement | null;
|
|
11733
|
+
}
|
|
11734
|
+
/**
|
|
11735
|
+
* The settlement status, or null when the order is unavailable / not computable.
|
|
11736
|
+
* @export
|
|
11737
|
+
* @interface OrderSettlementStatusResponseDtoSettlement
|
|
11738
|
+
*/
|
|
11739
|
+
export interface OrderSettlementStatusResponseDtoSettlement {
|
|
11740
|
+
/**
|
|
11741
|
+
* The internal business ID.
|
|
11742
|
+
* @type {number}
|
|
11743
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11744
|
+
*/
|
|
11745
|
+
'businessId': number;
|
|
11746
|
+
/**
|
|
11747
|
+
* The order ID the settlement is computed for.
|
|
11748
|
+
* @type {string}
|
|
11749
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11750
|
+
*/
|
|
11751
|
+
'orderId': string;
|
|
11752
|
+
/**
|
|
11753
|
+
* The order\'s checkout model (FULL / EQUAL_SPLIT / ITEM_SPLIT).
|
|
11754
|
+
* @type {string}
|
|
11755
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11756
|
+
*/
|
|
11757
|
+
'checkoutModel': string;
|
|
11758
|
+
/**
|
|
11759
|
+
* Overall settlement status: \'underpaid\' | \'settled\' | \'overpaid\'.
|
|
11760
|
+
* @type {string}
|
|
11761
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11762
|
+
*/
|
|
11763
|
+
'status': string;
|
|
11764
|
+
/**
|
|
11765
|
+
* True once the order is fully paid (settled or overpaid). The FE\'s stop condition.
|
|
11766
|
+
* @type {boolean}
|
|
11767
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11768
|
+
*/
|
|
11769
|
+
'isFullyPaid': boolean;
|
|
11770
|
+
/**
|
|
11771
|
+
* Order total in the smallest currency unit (cents).
|
|
11772
|
+
* @type {number}
|
|
11773
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11774
|
+
*/
|
|
11775
|
+
'cartTotal': number;
|
|
11776
|
+
/**
|
|
11777
|
+
* Sum of settled payments in cents.
|
|
11778
|
+
* @type {number}
|
|
11779
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11780
|
+
*/
|
|
11781
|
+
'paidAmount': number;
|
|
11782
|
+
/**
|
|
11783
|
+
* Outstanding balance in cents (0 when settled/overpaid).
|
|
11784
|
+
* @type {number}
|
|
11785
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11786
|
+
*/
|
|
11787
|
+
'remainingAmount': number;
|
|
11788
|
+
/**
|
|
11789
|
+
* Amount still payable in cents (never negative).
|
|
11790
|
+
* @type {number}
|
|
11791
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11792
|
+
*/
|
|
11793
|
+
'amountLeftToPay': number;
|
|
11794
|
+
/**
|
|
11795
|
+
* Number of paymentEvents currently on the order.
|
|
11796
|
+
* @type {number}
|
|
11797
|
+
* @memberof OrderSettlementStatusResponseDtoSettlement
|
|
11798
|
+
*/
|
|
11799
|
+
'paymentEventCount': number;
|
|
11800
|
+
}
|
|
11567
11801
|
/**
|
|
11568
11802
|
*
|
|
11569
11803
|
* @export
|
|
@@ -14124,6 +14358,19 @@ export interface PollVivaSessionDto {
|
|
|
14124
14358
|
*/
|
|
14125
14359
|
'sessionId': string;
|
|
14126
14360
|
}
|
|
14361
|
+
/**
|
|
14362
|
+
*
|
|
14363
|
+
* @export
|
|
14364
|
+
* @interface PollWorldlineSessionDto
|
|
14365
|
+
*/
|
|
14366
|
+
export interface PollWorldlineSessionDto {
|
|
14367
|
+
/**
|
|
14368
|
+
* The Worldline session id (= operationId) to poll.
|
|
14369
|
+
* @type {string}
|
|
14370
|
+
* @memberof PollWorldlineSessionDto
|
|
14371
|
+
*/
|
|
14372
|
+
'sessionId': string;
|
|
14373
|
+
}
|
|
14127
14374
|
/**
|
|
14128
14375
|
*
|
|
14129
14376
|
* @export
|
|
@@ -19846,6 +20093,275 @@ export interface SupportedChannelDto {
|
|
|
19846
20093
|
}
|
|
19847
20094
|
|
|
19848
20095
|
|
|
20096
|
+
/**
|
|
20097
|
+
*
|
|
20098
|
+
* @export
|
|
20099
|
+
* @interface SyncKioskOrderDto
|
|
20100
|
+
*/
|
|
20101
|
+
export interface SyncKioskOrderDto {
|
|
20102
|
+
/**
|
|
20103
|
+
*
|
|
20104
|
+
* @type {SyncKioskOrderDtoOrder}
|
|
20105
|
+
* @memberof SyncKioskOrderDto
|
|
20106
|
+
*/
|
|
20107
|
+
'order': SyncKioskOrderDtoOrder;
|
|
20108
|
+
}
|
|
20109
|
+
/**
|
|
20110
|
+
* Kiosk order snapshot to persist (same shape as PosOrderDto). Transitional: paymentEvents are still client-owned and persisted as sent.
|
|
20111
|
+
* @export
|
|
20112
|
+
* @interface SyncKioskOrderDtoOrder
|
|
20113
|
+
*/
|
|
20114
|
+
export interface SyncKioskOrderDtoOrder {
|
|
20115
|
+
/**
|
|
20116
|
+
*
|
|
20117
|
+
* @type {string}
|
|
20118
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20119
|
+
*/
|
|
20120
|
+
'id': string;
|
|
20121
|
+
/**
|
|
20122
|
+
*
|
|
20123
|
+
* @type {string}
|
|
20124
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20125
|
+
*/
|
|
20126
|
+
'businessId': string;
|
|
20127
|
+
/**
|
|
20128
|
+
*
|
|
20129
|
+
* @type {ProviderEnum}
|
|
20130
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20131
|
+
*/
|
|
20132
|
+
'provider': ProviderEnum;
|
|
20133
|
+
/**
|
|
20134
|
+
*
|
|
20135
|
+
* @type {CurrencyCode}
|
|
20136
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20137
|
+
*/
|
|
20138
|
+
'currency': CurrencyCode;
|
|
20139
|
+
/**
|
|
20140
|
+
*
|
|
20141
|
+
* @type {PosBusinessDto}
|
|
20142
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20143
|
+
*/
|
|
20144
|
+
'business': PosBusinessDto;
|
|
20145
|
+
/**
|
|
20146
|
+
*
|
|
20147
|
+
* @type {string}
|
|
20148
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20149
|
+
*/
|
|
20150
|
+
'createdAt': string;
|
|
20151
|
+
/**
|
|
20152
|
+
*
|
|
20153
|
+
* @type {OrderStatusEnum}
|
|
20154
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20155
|
+
*/
|
|
20156
|
+
'status': OrderStatusEnum;
|
|
20157
|
+
/**
|
|
20158
|
+
*
|
|
20159
|
+
* @type {string}
|
|
20160
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20161
|
+
*/
|
|
20162
|
+
'updatedAt': string;
|
|
20163
|
+
/**
|
|
20164
|
+
*
|
|
20165
|
+
* @type {string}
|
|
20166
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20167
|
+
*/
|
|
20168
|
+
'completedAt'?: string;
|
|
20169
|
+
/**
|
|
20170
|
+
*
|
|
20171
|
+
* @type {string}
|
|
20172
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20173
|
+
*/
|
|
20174
|
+
'orderNumber': string;
|
|
20175
|
+
/**
|
|
20176
|
+
*
|
|
20177
|
+
* @type {CheckoutModelEnum}
|
|
20178
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20179
|
+
*/
|
|
20180
|
+
'checkoutModel': CheckoutModelEnum;
|
|
20181
|
+
/**
|
|
20182
|
+
*
|
|
20183
|
+
* @type {OrderTypePOS}
|
|
20184
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20185
|
+
*/
|
|
20186
|
+
'orderType': OrderTypePOS;
|
|
20187
|
+
/**
|
|
20188
|
+
*
|
|
20189
|
+
* @type {string}
|
|
20190
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20191
|
+
*/
|
|
20192
|
+
'spotNumber': string | null;
|
|
20193
|
+
/**
|
|
20194
|
+
* ID of the floor plan dining table linked to this order
|
|
20195
|
+
* @type {string}
|
|
20196
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20197
|
+
*/
|
|
20198
|
+
'tableId'?: string | null;
|
|
20199
|
+
/**
|
|
20200
|
+
*
|
|
20201
|
+
* @type {string}
|
|
20202
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20203
|
+
*/
|
|
20204
|
+
'comments': string | null;
|
|
20205
|
+
/**
|
|
20206
|
+
*
|
|
20207
|
+
* @type {PosOrderDtoTableService}
|
|
20208
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20209
|
+
*/
|
|
20210
|
+
'tableService'?: PosOrderDtoTableService | null;
|
|
20211
|
+
/**
|
|
20212
|
+
*
|
|
20213
|
+
* @type {PosOrderDtoEqualSplitState}
|
|
20214
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20215
|
+
*/
|
|
20216
|
+
'equalSplitState'?: PosOrderDtoEqualSplitState | null;
|
|
20217
|
+
/**
|
|
20218
|
+
* Id of the staff in shift
|
|
20219
|
+
* @type {string}
|
|
20220
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20221
|
+
*/
|
|
20222
|
+
'staffId': string | null;
|
|
20223
|
+
/**
|
|
20224
|
+
* Id of the shift
|
|
20225
|
+
* @type {string}
|
|
20226
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20227
|
+
*/
|
|
20228
|
+
'shiftId': string | null;
|
|
20229
|
+
/**
|
|
20230
|
+
*
|
|
20231
|
+
* @type {OrderRefundStatus}
|
|
20232
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20233
|
+
*/
|
|
20234
|
+
'orderRefundStatus': OrderRefundStatus;
|
|
20235
|
+
/**
|
|
20236
|
+
*
|
|
20237
|
+
* @type {LocatorType}
|
|
20238
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20239
|
+
*/
|
|
20240
|
+
'locatorType': LocatorType;
|
|
20241
|
+
/**
|
|
20242
|
+
*
|
|
20243
|
+
* @type {PosOrderPriceDto}
|
|
20244
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20245
|
+
*/
|
|
20246
|
+
'basketPrice': PosOrderPriceDto;
|
|
20247
|
+
/**
|
|
20248
|
+
*
|
|
20249
|
+
* @type {Array<PosOrderItemDto>}
|
|
20250
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20251
|
+
*/
|
|
20252
|
+
'items': Array<PosOrderItemDto>;
|
|
20253
|
+
/**
|
|
20254
|
+
*
|
|
20255
|
+
* @type {Array<PosDiscountDto>}
|
|
20256
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20257
|
+
*/
|
|
20258
|
+
'discounts': Array<PosDiscountDto>;
|
|
20259
|
+
/**
|
|
20260
|
+
*
|
|
20261
|
+
* @type {PosCustomerDto}
|
|
20262
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20263
|
+
*/
|
|
20264
|
+
'customer': PosCustomerDto | null;
|
|
20265
|
+
/**
|
|
20266
|
+
*
|
|
20267
|
+
* @type {Array<TransactionDto>}
|
|
20268
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20269
|
+
*/
|
|
20270
|
+
'paymentEvents': Array<TransactionDto>;
|
|
20271
|
+
/**
|
|
20272
|
+
*
|
|
20273
|
+
* @type {Array<PaymentRefundDto>}
|
|
20274
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20275
|
+
*/
|
|
20276
|
+
'refunds'?: Array<PaymentRefundDto>;
|
|
20277
|
+
/**
|
|
20278
|
+
* Data version code
|
|
20279
|
+
* @type {string}
|
|
20280
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20281
|
+
*/
|
|
20282
|
+
'version': string;
|
|
20283
|
+
/**
|
|
20284
|
+
*
|
|
20285
|
+
* @type {OrderFormat}
|
|
20286
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20287
|
+
*/
|
|
20288
|
+
'orderFormat'?: OrderFormat;
|
|
20289
|
+
/**
|
|
20290
|
+
* The ID of the loyalty program active during this order.
|
|
20291
|
+
* @type {string}
|
|
20292
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20293
|
+
*/
|
|
20294
|
+
'loyaltyProgramId': string | null;
|
|
20295
|
+
/**
|
|
20296
|
+
* An array of loyalty transaction IDs related to this order.
|
|
20297
|
+
* @type {Array<string>}
|
|
20298
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20299
|
+
*/
|
|
20300
|
+
'loyaltyTransactionIds': Array<string>;
|
|
20301
|
+
/**
|
|
20302
|
+
*
|
|
20303
|
+
* @type {PosOrderDtoTaxSummary}
|
|
20304
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20305
|
+
*/
|
|
20306
|
+
'taxSummary'?: PosOrderDtoTaxSummary;
|
|
20307
|
+
/**
|
|
20308
|
+
* Name of staff member who created the order
|
|
20309
|
+
* @type {string}
|
|
20310
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20311
|
+
*/
|
|
20312
|
+
'staffName'?: string | null;
|
|
20313
|
+
/**
|
|
20314
|
+
*
|
|
20315
|
+
* @type {PosOrderDtoInvoiceCompany}
|
|
20316
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20317
|
+
*/
|
|
20318
|
+
'invoiceCompany'?: PosOrderDtoInvoiceCompany | null;
|
|
20319
|
+
/**
|
|
20320
|
+
*
|
|
20321
|
+
* @type {object}
|
|
20322
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20323
|
+
*/
|
|
20324
|
+
'lastPaymentError'?: object;
|
|
20325
|
+
/**
|
|
20326
|
+
*
|
|
20327
|
+
* @type {Array<OrderFeeDto>}
|
|
20328
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20329
|
+
*/
|
|
20330
|
+
'fees'?: Array<OrderFeeDto> | null;
|
|
20331
|
+
/**
|
|
20332
|
+
* Loyalty user ID associated with this order
|
|
20333
|
+
* @type {number}
|
|
20334
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20335
|
+
*/
|
|
20336
|
+
'targetUserId'?: number;
|
|
20337
|
+
/**
|
|
20338
|
+
* ID of the table group this order belongs to
|
|
20339
|
+
* @type {string}
|
|
20340
|
+
* @memberof SyncKioskOrderDtoOrder
|
|
20341
|
+
*/
|
|
20342
|
+
'tableGroupId'?: string | null;
|
|
20343
|
+
}
|
|
20344
|
+
|
|
20345
|
+
|
|
20346
|
+
/**
|
|
20347
|
+
*
|
|
20348
|
+
* @export
|
|
20349
|
+
* @interface SyncKioskOrderResponseDto
|
|
20350
|
+
*/
|
|
20351
|
+
export interface SyncKioskOrderResponseDto {
|
|
20352
|
+
/**
|
|
20353
|
+
* Whether the order snapshot was persisted.
|
|
20354
|
+
* @type {boolean}
|
|
20355
|
+
* @memberof SyncKioskOrderResponseDto
|
|
20356
|
+
*/
|
|
20357
|
+
'synced': boolean;
|
|
20358
|
+
/**
|
|
20359
|
+
* Id of the synced order.
|
|
20360
|
+
* @type {string}
|
|
20361
|
+
* @memberof SyncKioskOrderResponseDto
|
|
20362
|
+
*/
|
|
20363
|
+
'orderId': string;
|
|
20364
|
+
}
|
|
19849
20365
|
/**
|
|
19850
20366
|
*
|
|
19851
20367
|
* @export
|
|
@@ -25365,6 +25881,12 @@ export interface WorldlineRefundRequestDataDto {
|
|
|
25365
25881
|
* @memberof WorldlineRefundRequestDataDto
|
|
25366
25882
|
*/
|
|
25367
25883
|
'amounts': WorldlineRefundRequestDataDtoAmounts;
|
|
25884
|
+
/**
|
|
25885
|
+
* Receipt number of the original payment (from PaymentCompleted.receiptNumber). Required for a REVERSAL — it identifies which transaction on the terminal to void. Omit for a ReturnOfGoods refund.
|
|
25886
|
+
* @type {string}
|
|
25887
|
+
* @memberof WorldlineRefundRequestDataDto
|
|
25888
|
+
*/
|
|
25889
|
+
'receiptNumber'?: string;
|
|
25368
25890
|
/**
|
|
25369
25891
|
* Cashier identifier
|
|
25370
25892
|
* @type {string}
|
|
@@ -25421,6 +25943,65 @@ export interface WorldlineRefundRequestDataDtoAmounts {
|
|
|
25421
25943
|
*/
|
|
25422
25944
|
'tip'?: number;
|
|
25423
25945
|
}
|
|
25946
|
+
/**
|
|
25947
|
+
*
|
|
25948
|
+
* @export
|
|
25949
|
+
* @enum {string}
|
|
25950
|
+
*/
|
|
25951
|
+
|
|
25952
|
+
export const WorldlineRevertMethod = {
|
|
25953
|
+
Reversal: 'REVERSAL',
|
|
25954
|
+
Refund: 'REFUND'
|
|
25955
|
+
} as const;
|
|
25956
|
+
|
|
25957
|
+
export type WorldlineRevertMethod = typeof WorldlineRevertMethod[keyof typeof WorldlineRevertMethod];
|
|
25958
|
+
|
|
25959
|
+
|
|
25960
|
+
/**
|
|
25961
|
+
*
|
|
25962
|
+
* @export
|
|
25963
|
+
* @interface WorldlineRevertResponseDto
|
|
25964
|
+
*/
|
|
25965
|
+
export interface WorldlineRevertResponseDto {
|
|
25966
|
+
/**
|
|
25967
|
+
*
|
|
25968
|
+
* @type {WorldlineRevertMethod}
|
|
25969
|
+
* @memberof WorldlineRevertResponseDto
|
|
25970
|
+
*/
|
|
25971
|
+
'method': WorldlineRevertMethod;
|
|
25972
|
+
/**
|
|
25973
|
+
* True when the customer must tap their card to complete (REFUND); false for a REVERSAL, which settles without a tap.
|
|
25974
|
+
* @type {boolean}
|
|
25975
|
+
* @memberof WorldlineRevertResponseDto
|
|
25976
|
+
*/
|
|
25977
|
+
'requiresCardTap': boolean;
|
|
25978
|
+
/**
|
|
25979
|
+
* Opaque token to poll GET /payment-session/:clientToken for the final outcome.
|
|
25980
|
+
* @type {string}
|
|
25981
|
+
* @memberof WorldlineRevertResponseDto
|
|
25982
|
+
*/
|
|
25983
|
+
'clientToken': string;
|
|
25984
|
+
/**
|
|
25985
|
+
* Internal session id — the Worldline operationId the webhook resolves against.
|
|
25986
|
+
* @type {string}
|
|
25987
|
+
* @memberof WorldlineRevertResponseDto
|
|
25988
|
+
*/
|
|
25989
|
+
'sessionId': string;
|
|
25990
|
+
/**
|
|
25991
|
+
* Amount being reverted, in the smallest currency unit (cents).
|
|
25992
|
+
* @type {number}
|
|
25993
|
+
* @memberof WorldlineRevertResponseDto
|
|
25994
|
+
*/
|
|
25995
|
+
'amount': number;
|
|
25996
|
+
/**
|
|
25997
|
+
*
|
|
25998
|
+
* @type {PaymentSessionStatus}
|
|
25999
|
+
* @memberof WorldlineRevertResponseDto
|
|
26000
|
+
*/
|
|
26001
|
+
'status': PaymentSessionStatus;
|
|
26002
|
+
}
|
|
26003
|
+
|
|
26004
|
+
|
|
25424
26005
|
|
|
25425
26006
|
/**
|
|
25426
26007
|
* AblyApi - axios parameter creator
|
|
@@ -34618,6 +35199,44 @@ export class KDSApi extends BaseAPI implements KDSApiInterface {
|
|
|
34618
35199
|
*/
|
|
34619
35200
|
export const KiosksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34620
35201
|
return {
|
|
35202
|
+
/**
|
|
35203
|
+
* Fresh read of the persisted kiosk order (same PosOrderDto shape as POS): basketPrice, paymentEvents, targetUserId, etc. 404 when the order snapshot does not exist. Replaces the client\'s direct Firestore reads for the receipt screen and the recovery paid-status gate.
|
|
35204
|
+
* @summary Get the full kiosk order snapshot by id
|
|
35205
|
+
* @param {string} orderId The unique ID of the order.
|
|
35206
|
+
* @param {string} businessId The unique ID of the business.
|
|
35207
|
+
* @param {*} [options] Override http request option.
|
|
35208
|
+
* @throws {RequiredError}
|
|
35209
|
+
*/
|
|
35210
|
+
getKioskOrder: async (orderId: string, businessId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35211
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
35212
|
+
assertParamExists('getKioskOrder', 'orderId', orderId)
|
|
35213
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
35214
|
+
assertParamExists('getKioskOrder', 'businessId', businessId)
|
|
35215
|
+
const localVarPath = `/api/v1/kiosk/orders/{orderId}/{businessId}`
|
|
35216
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)))
|
|
35217
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
35218
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
35219
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
35220
|
+
let baseOptions;
|
|
35221
|
+
if (configuration) {
|
|
35222
|
+
baseOptions = configuration.baseOptions;
|
|
35223
|
+
}
|
|
35224
|
+
|
|
35225
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
35226
|
+
const localVarHeaderParameter = {} as any;
|
|
35227
|
+
const localVarQueryParameter = {} as any;
|
|
35228
|
+
|
|
35229
|
+
|
|
35230
|
+
|
|
35231
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
35232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
35233
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
35234
|
+
|
|
35235
|
+
return {
|
|
35236
|
+
url: toPathString(localVarUrlObj),
|
|
35237
|
+
options: localVarRequestOptions,
|
|
35238
|
+
};
|
|
35239
|
+
},
|
|
34621
35240
|
/**
|
|
34622
35241
|
*
|
|
34623
35242
|
* @param {string} orderId The unique ID of the order to validate against the system.
|
|
@@ -34692,6 +35311,42 @@ export const KiosksApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
34692
35311
|
options: localVarRequestOptions,
|
|
34693
35312
|
};
|
|
34694
35313
|
},
|
|
35314
|
+
/**
|
|
35315
|
+
*
|
|
35316
|
+
* @summary Sync a kiosk order snapshot
|
|
35317
|
+
* @param {SyncKioskOrderDto} syncKioskOrderDto
|
|
35318
|
+
* @param {*} [options] Override http request option.
|
|
35319
|
+
* @throws {RequiredError}
|
|
35320
|
+
*/
|
|
35321
|
+
syncKioskOrder: async (syncKioskOrderDto: SyncKioskOrderDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
35322
|
+
// verify required parameter 'syncKioskOrderDto' is not null or undefined
|
|
35323
|
+
assertParamExists('syncKioskOrder', 'syncKioskOrderDto', syncKioskOrderDto)
|
|
35324
|
+
const localVarPath = `/api/v1/kiosk/orders/sync`;
|
|
35325
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
35326
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
35327
|
+
let baseOptions;
|
|
35328
|
+
if (configuration) {
|
|
35329
|
+
baseOptions = configuration.baseOptions;
|
|
35330
|
+
}
|
|
35331
|
+
|
|
35332
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
35333
|
+
const localVarHeaderParameter = {} as any;
|
|
35334
|
+
const localVarQueryParameter = {} as any;
|
|
35335
|
+
|
|
35336
|
+
|
|
35337
|
+
|
|
35338
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
35339
|
+
|
|
35340
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
35341
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
35342
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
35343
|
+
localVarRequestOptions.data = serializeDataIfNeeded(syncKioskOrderDto, localVarRequestOptions, configuration)
|
|
35344
|
+
|
|
35345
|
+
return {
|
|
35346
|
+
url: toPathString(localVarUrlObj),
|
|
35347
|
+
options: localVarRequestOptions,
|
|
35348
|
+
};
|
|
35349
|
+
},
|
|
34695
35350
|
/**
|
|
34696
35351
|
*
|
|
34697
35352
|
* @param {string} terminalId The unique ID of the terminal to validate against the system.
|
|
@@ -34745,6 +35400,18 @@ export const KiosksApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
34745
35400
|
export const KiosksApiFp = function(configuration?: Configuration) {
|
|
34746
35401
|
const localVarAxiosParamCreator = KiosksApiAxiosParamCreator(configuration)
|
|
34747
35402
|
return {
|
|
35403
|
+
/**
|
|
35404
|
+
* Fresh read of the persisted kiosk order (same PosOrderDto shape as POS): basketPrice, paymentEvents, targetUserId, etc. 404 when the order snapshot does not exist. Replaces the client\'s direct Firestore reads for the receipt screen and the recovery paid-status gate.
|
|
35405
|
+
* @summary Get the full kiosk order snapshot by id
|
|
35406
|
+
* @param {string} orderId The unique ID of the order.
|
|
35407
|
+
* @param {string} businessId The unique ID of the business.
|
|
35408
|
+
* @param {*} [options] Override http request option.
|
|
35409
|
+
* @throws {RequiredError}
|
|
35410
|
+
*/
|
|
35411
|
+
async getKioskOrder(orderId: string, businessId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PosOrderDto>> {
|
|
35412
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getKioskOrder(orderId, businessId, options);
|
|
35413
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
35414
|
+
},
|
|
34748
35415
|
/**
|
|
34749
35416
|
*
|
|
34750
35417
|
* @param {string} orderId The unique ID of the order to validate against the system.
|
|
@@ -34767,6 +35434,17 @@ export const KiosksApiFp = function(configuration?: Configuration) {
|
|
|
34767
35434
|
const localVarAxiosArgs = await localVarAxiosParamCreator.recoverOrder(orderId, businessId, options);
|
|
34768
35435
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
34769
35436
|
},
|
|
35437
|
+
/**
|
|
35438
|
+
*
|
|
35439
|
+
* @summary Sync a kiosk order snapshot
|
|
35440
|
+
* @param {SyncKioskOrderDto} syncKioskOrderDto
|
|
35441
|
+
* @param {*} [options] Override http request option.
|
|
35442
|
+
* @throws {RequiredError}
|
|
35443
|
+
*/
|
|
35444
|
+
async syncKioskOrder(syncKioskOrderDto: SyncKioskOrderDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SyncKioskOrderResponseDto>> {
|
|
35445
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncKioskOrder(syncKioskOrderDto, options);
|
|
35446
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
35447
|
+
},
|
|
34770
35448
|
/**
|
|
34771
35449
|
*
|
|
34772
35450
|
* @param {string} terminalId The unique ID of the terminal to validate against the system.
|
|
@@ -34788,6 +35466,17 @@ export const KiosksApiFp = function(configuration?: Configuration) {
|
|
|
34788
35466
|
export const KiosksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
34789
35467
|
const localVarFp = KiosksApiFp(configuration)
|
|
34790
35468
|
return {
|
|
35469
|
+
/**
|
|
35470
|
+
* Fresh read of the persisted kiosk order (same PosOrderDto shape as POS): basketPrice, paymentEvents, targetUserId, etc. 404 when the order snapshot does not exist. Replaces the client\'s direct Firestore reads for the receipt screen and the recovery paid-status gate.
|
|
35471
|
+
* @summary Get the full kiosk order snapshot by id
|
|
35472
|
+
* @param {string} orderId The unique ID of the order.
|
|
35473
|
+
* @param {string} businessId The unique ID of the business.
|
|
35474
|
+
* @param {*} [options] Override http request option.
|
|
35475
|
+
* @throws {RequiredError}
|
|
35476
|
+
*/
|
|
35477
|
+
getKioskOrder(orderId: string, businessId: string, options?: any): AxiosPromise<PosOrderDto> {
|
|
35478
|
+
return localVarFp.getKioskOrder(orderId, businessId, options).then((request) => request(axios, basePath));
|
|
35479
|
+
},
|
|
34791
35480
|
/**
|
|
34792
35481
|
*
|
|
34793
35482
|
* @param {string} orderId The unique ID of the order to validate against the system.
|
|
@@ -34808,6 +35497,16 @@ export const KiosksApiFactory = function (configuration?: Configuration, basePat
|
|
|
34808
35497
|
recoverOrder(orderId: string, businessId: string, options?: any): AxiosPromise<void> {
|
|
34809
35498
|
return localVarFp.recoverOrder(orderId, businessId, options).then((request) => request(axios, basePath));
|
|
34810
35499
|
},
|
|
35500
|
+
/**
|
|
35501
|
+
*
|
|
35502
|
+
* @summary Sync a kiosk order snapshot
|
|
35503
|
+
* @param {SyncKioskOrderDto} syncKioskOrderDto
|
|
35504
|
+
* @param {*} [options] Override http request option.
|
|
35505
|
+
* @throws {RequiredError}
|
|
35506
|
+
*/
|
|
35507
|
+
syncKioskOrder(syncKioskOrderDto: SyncKioskOrderDto, options?: any): AxiosPromise<SyncKioskOrderResponseDto> {
|
|
35508
|
+
return localVarFp.syncKioskOrder(syncKioskOrderDto, options).then((request) => request(axios, basePath));
|
|
35509
|
+
},
|
|
34811
35510
|
/**
|
|
34812
35511
|
*
|
|
34813
35512
|
* @param {string} terminalId The unique ID of the terminal to validate against the system.
|
|
@@ -34827,6 +35526,17 @@ export const KiosksApiFactory = function (configuration?: Configuration, basePat
|
|
|
34827
35526
|
* @interface KiosksApi
|
|
34828
35527
|
*/
|
|
34829
35528
|
export interface KiosksApiInterface {
|
|
35529
|
+
/**
|
|
35530
|
+
* Fresh read of the persisted kiosk order (same PosOrderDto shape as POS): basketPrice, paymentEvents, targetUserId, etc. 404 when the order snapshot does not exist. Replaces the client\'s direct Firestore reads for the receipt screen and the recovery paid-status gate.
|
|
35531
|
+
* @summary Get the full kiosk order snapshot by id
|
|
35532
|
+
* @param {string} orderId The unique ID of the order.
|
|
35533
|
+
* @param {string} businessId The unique ID of the business.
|
|
35534
|
+
* @param {*} [options] Override http request option.
|
|
35535
|
+
* @throws {RequiredError}
|
|
35536
|
+
* @memberof KiosksApiInterface
|
|
35537
|
+
*/
|
|
35538
|
+
getKioskOrder(orderId: string, businessId: string, options?: AxiosRequestConfig): AxiosPromise<PosOrderDto>;
|
|
35539
|
+
|
|
34830
35540
|
/**
|
|
34831
35541
|
*
|
|
34832
35542
|
* @param {string} orderId The unique ID of the order to validate against the system.
|
|
@@ -34847,6 +35557,16 @@ export interface KiosksApiInterface {
|
|
|
34847
35557
|
*/
|
|
34848
35558
|
recoverOrder(orderId: string, businessId: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
34849
35559
|
|
|
35560
|
+
/**
|
|
35561
|
+
*
|
|
35562
|
+
* @summary Sync a kiosk order snapshot
|
|
35563
|
+
* @param {SyncKioskOrderDto} syncKioskOrderDto
|
|
35564
|
+
* @param {*} [options] Override http request option.
|
|
35565
|
+
* @throws {RequiredError}
|
|
35566
|
+
* @memberof KiosksApiInterface
|
|
35567
|
+
*/
|
|
35568
|
+
syncKioskOrder(syncKioskOrderDto: SyncKioskOrderDto, options?: AxiosRequestConfig): AxiosPromise<SyncKioskOrderResponseDto>;
|
|
35569
|
+
|
|
34850
35570
|
/**
|
|
34851
35571
|
*
|
|
34852
35572
|
* @param {string} terminalId The unique ID of the terminal to validate against the system.
|
|
@@ -34866,6 +35586,19 @@ export interface KiosksApiInterface {
|
|
|
34866
35586
|
* @extends {BaseAPI}
|
|
34867
35587
|
*/
|
|
34868
35588
|
export class KiosksApi extends BaseAPI implements KiosksApiInterface {
|
|
35589
|
+
/**
|
|
35590
|
+
* Fresh read of the persisted kiosk order (same PosOrderDto shape as POS): basketPrice, paymentEvents, targetUserId, etc. 404 when the order snapshot does not exist. Replaces the client\'s direct Firestore reads for the receipt screen and the recovery paid-status gate.
|
|
35591
|
+
* @summary Get the full kiosk order snapshot by id
|
|
35592
|
+
* @param {string} orderId The unique ID of the order.
|
|
35593
|
+
* @param {string} businessId The unique ID of the business.
|
|
35594
|
+
* @param {*} [options] Override http request option.
|
|
35595
|
+
* @throws {RequiredError}
|
|
35596
|
+
* @memberof KiosksApi
|
|
35597
|
+
*/
|
|
35598
|
+
public getKioskOrder(orderId: string, businessId: string, options?: AxiosRequestConfig) {
|
|
35599
|
+
return KiosksApiFp(this.configuration).getKioskOrder(orderId, businessId, options).then((request) => request(this.axios, this.basePath));
|
|
35600
|
+
}
|
|
35601
|
+
|
|
34869
35602
|
/**
|
|
34870
35603
|
*
|
|
34871
35604
|
* @param {string} orderId The unique ID of the order to validate against the system.
|
|
@@ -34890,6 +35623,18 @@ export class KiosksApi extends BaseAPI implements KiosksApiInterface {
|
|
|
34890
35623
|
return KiosksApiFp(this.configuration).recoverOrder(orderId, businessId, options).then((request) => request(this.axios, this.basePath));
|
|
34891
35624
|
}
|
|
34892
35625
|
|
|
35626
|
+
/**
|
|
35627
|
+
*
|
|
35628
|
+
* @summary Sync a kiosk order snapshot
|
|
35629
|
+
* @param {SyncKioskOrderDto} syncKioskOrderDto
|
|
35630
|
+
* @param {*} [options] Override http request option.
|
|
35631
|
+
* @throws {RequiredError}
|
|
35632
|
+
* @memberof KiosksApi
|
|
35633
|
+
*/
|
|
35634
|
+
public syncKioskOrder(syncKioskOrderDto: SyncKioskOrderDto, options?: AxiosRequestConfig) {
|
|
35635
|
+
return KiosksApiFp(this.configuration).syncKioskOrder(syncKioskOrderDto, options).then((request) => request(this.axios, this.basePath));
|
|
35636
|
+
}
|
|
35637
|
+
|
|
34893
35638
|
/**
|
|
34894
35639
|
*
|
|
34895
35640
|
* @param {string} terminalId The unique ID of the terminal to validate against the system.
|
|
@@ -40911,6 +41656,48 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
40911
41656
|
options: localVarRequestOptions,
|
|
40912
41657
|
};
|
|
40913
41658
|
},
|
|
41659
|
+
/**
|
|
41660
|
+
* Unified paid-status check for both POS and kiosk. Reads the order from the channel-appropriate collection (via the x-app-x channel header) and derives the settlement from its persisted paymentEvents — the same events reconciliation writes for every provider (Viva/Nets/Worldline, card or manual). The FE polls this after a payment and stops when isFullyPaid is true. Send an empty body for the plain check, or optional { cashChange, cartTotalAmount } overrides. Always 200: `settlement` is null while the order snapshot does not yet exist / cannot be computed (treat as pending).
|
|
41661
|
+
* @summary Get an order\'s paid/reconcile status (POS or kiosk)
|
|
41662
|
+
* @param {number} businessId The internal business ID.
|
|
41663
|
+
* @param {string} orderId The order ID.
|
|
41664
|
+
* @param {OrderSettlementStatusRequestDto} [orderSettlementStatusRequestDto]
|
|
41665
|
+
* @param {*} [options] Override http request option.
|
|
41666
|
+
* @throws {RequiredError}
|
|
41667
|
+
*/
|
|
41668
|
+
getOrderSettlementStatus: async (businessId: number, orderId: string, orderSettlementStatusRequestDto?: OrderSettlementStatusRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41669
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41670
|
+
assertParamExists('getOrderSettlementStatus', 'businessId', businessId)
|
|
41671
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
41672
|
+
assertParamExists('getOrderSettlementStatus', 'orderId', orderId)
|
|
41673
|
+
const localVarPath = `/api/v1/payment-session/order-settlement/{businessId}/{orderId}`
|
|
41674
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
41675
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
41676
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41677
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41678
|
+
let baseOptions;
|
|
41679
|
+
if (configuration) {
|
|
41680
|
+
baseOptions = configuration.baseOptions;
|
|
41681
|
+
}
|
|
41682
|
+
|
|
41683
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
41684
|
+
const localVarHeaderParameter = {} as any;
|
|
41685
|
+
const localVarQueryParameter = {} as any;
|
|
41686
|
+
|
|
41687
|
+
|
|
41688
|
+
|
|
41689
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41690
|
+
|
|
41691
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41692
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41693
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41694
|
+
localVarRequestOptions.data = serializeDataIfNeeded(orderSettlementStatusRequestDto, localVarRequestOptions, configuration)
|
|
41695
|
+
|
|
41696
|
+
return {
|
|
41697
|
+
url: toPathString(localVarUrlObj),
|
|
41698
|
+
options: localVarRequestOptions,
|
|
41699
|
+
};
|
|
41700
|
+
},
|
|
40914
41701
|
/**
|
|
40915
41702
|
* Reads PaymentSession from Postgres. Use this to poll session lifecycle without hitting the Viva API.
|
|
40916
41703
|
* @summary Get payment session status by clientToken
|
|
@@ -41063,6 +41850,47 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
41063
41850
|
options: localVarRequestOptions,
|
|
41064
41851
|
};
|
|
41065
41852
|
},
|
|
41853
|
+
/**
|
|
41854
|
+
* Creates a PaymentSession row and pushes the transaction to the station\'s Worldline terminal via the Worldline microservice (async — the result arrives via the Worldline webhook). Returns a client-facing token to poll. The backend owns the order mutation (webhook → reconciliation), replacing the legacy FE-writes-from-Ably flow. Idempotent via X-Idempotency-Key header.
|
|
41855
|
+
* @summary Initiate a Worldline terminal payment session
|
|
41856
|
+
* @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
|
|
41857
|
+
* @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
|
|
41858
|
+
* @param {*} [options] Override http request option.
|
|
41859
|
+
* @throws {RequiredError}
|
|
41860
|
+
*/
|
|
41861
|
+
initiateWorldlineSession: async (initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41862
|
+
// verify required parameter 'initiateWorldlineSessionDto' is not null or undefined
|
|
41863
|
+
assertParamExists('initiateWorldlineSession', 'initiateWorldlineSessionDto', initiateWorldlineSessionDto)
|
|
41864
|
+
const localVarPath = `/api/v1/payment-session/worldline/initiate`;
|
|
41865
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41866
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41867
|
+
let baseOptions;
|
|
41868
|
+
if (configuration) {
|
|
41869
|
+
baseOptions = configuration.baseOptions;
|
|
41870
|
+
}
|
|
41871
|
+
|
|
41872
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
41873
|
+
const localVarHeaderParameter = {} as any;
|
|
41874
|
+
const localVarQueryParameter = {} as any;
|
|
41875
|
+
|
|
41876
|
+
if (xIdempotencyKey != null) {
|
|
41877
|
+
localVarHeaderParameter['X-Idempotency-Key'] = String(xIdempotencyKey);
|
|
41878
|
+
}
|
|
41879
|
+
|
|
41880
|
+
|
|
41881
|
+
|
|
41882
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41883
|
+
|
|
41884
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41885
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41886
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41887
|
+
localVarRequestOptions.data = serializeDataIfNeeded(initiateWorldlineSessionDto, localVarRequestOptions, configuration)
|
|
41888
|
+
|
|
41889
|
+
return {
|
|
41890
|
+
url: toPathString(localVarUrlObj),
|
|
41891
|
+
options: localVarRequestOptions,
|
|
41892
|
+
};
|
|
41893
|
+
},
|
|
41066
41894
|
/**
|
|
41067
41895
|
* 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.
|
|
41068
41896
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -41099,6 +41927,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
41099
41927
|
options: localVarRequestOptions,
|
|
41100
41928
|
};
|
|
41101
41929
|
},
|
|
41930
|
+
/**
|
|
41931
|
+
* Called by a Cloud Task (not the client). Polls the Worldline microservice by operationId for up to ~45s; as soon as the operation is terminal it finalizes the PaymentSession through the same sweep the webhook uses (CAS-guarded, so a webhook + poll never double-write). Ensures the session resolves even if the webhook is slow or never arrives.
|
|
41932
|
+
* @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
|
|
41933
|
+
* @param {PollWorldlineSessionDto} pollWorldlineSessionDto
|
|
41934
|
+
* @param {*} [options] Override http request option.
|
|
41935
|
+
* @throws {RequiredError}
|
|
41936
|
+
*/
|
|
41937
|
+
pollWorldlineSession: async (pollWorldlineSessionDto: PollWorldlineSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41938
|
+
// verify required parameter 'pollWorldlineSessionDto' is not null or undefined
|
|
41939
|
+
assertParamExists('pollWorldlineSession', 'pollWorldlineSessionDto', pollWorldlineSessionDto)
|
|
41940
|
+
const localVarPath = `/api/v1/payment-session/worldline/poll`;
|
|
41941
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41942
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41943
|
+
let baseOptions;
|
|
41944
|
+
if (configuration) {
|
|
41945
|
+
baseOptions = configuration.baseOptions;
|
|
41946
|
+
}
|
|
41947
|
+
|
|
41948
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
41949
|
+
const localVarHeaderParameter = {} as any;
|
|
41950
|
+
const localVarQueryParameter = {} as any;
|
|
41951
|
+
|
|
41952
|
+
|
|
41953
|
+
|
|
41954
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41955
|
+
|
|
41956
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41957
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41958
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41959
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pollWorldlineSessionDto, localVarRequestOptions, configuration)
|
|
41960
|
+
|
|
41961
|
+
return {
|
|
41962
|
+
url: toPathString(localVarUrlObj),
|
|
41963
|
+
options: localVarRequestOptions,
|
|
41964
|
+
};
|
|
41965
|
+
},
|
|
41102
41966
|
/**
|
|
41103
41967
|
* Records a non-gateway payment (cash / voucher / CardManual / gift card / …) through PaymentSession so every device sees it. Card paymethods (Card/Debit/Credit/Edenred) use a gateway initiate. Resolves to SUCCESS immediately; reconciliation writes the paymentEvent.
|
|
41104
41968
|
* @summary Record a manual payment session
|
|
@@ -41195,6 +42059,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
41195
42059
|
|
|
41196
42060
|
|
|
41197
42061
|
|
|
42062
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
42063
|
+
|
|
42064
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
42065
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
42066
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
42067
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reverseSessionDto, localVarRequestOptions, configuration)
|
|
42068
|
+
|
|
42069
|
+
return {
|
|
42070
|
+
url: toPathString(localVarUrlObj),
|
|
42071
|
+
options: localVarRequestOptions,
|
|
42072
|
+
};
|
|
42073
|
+
},
|
|
42074
|
+
/**
|
|
42075
|
+
* Starts a terminal-present ReturnOfGoods on the station\'s Worldline terminal for the given sessionId, refunding the payload `amount` (defaults to the full session amount). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. Does NOT write a reversal paymentEvent to the order.
|
|
42076
|
+
* @summary Refund a settled Worldline payment session (gateway only, async)
|
|
42077
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42078
|
+
* @param {*} [options] Override http request option.
|
|
42079
|
+
* @throws {RequiredError}
|
|
42080
|
+
*/
|
|
42081
|
+
refundWorldlineSession: async (reverseSessionDto: ReverseSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42082
|
+
// verify required parameter 'reverseSessionDto' is not null or undefined
|
|
42083
|
+
assertParamExists('refundWorldlineSession', 'reverseSessionDto', reverseSessionDto)
|
|
42084
|
+
const localVarPath = `/api/v1/payment-session/worldline/refund`;
|
|
42085
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42086
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
42087
|
+
let baseOptions;
|
|
42088
|
+
if (configuration) {
|
|
42089
|
+
baseOptions = configuration.baseOptions;
|
|
42090
|
+
}
|
|
42091
|
+
|
|
42092
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
42093
|
+
const localVarHeaderParameter = {} as any;
|
|
42094
|
+
const localVarQueryParameter = {} as any;
|
|
42095
|
+
|
|
42096
|
+
|
|
42097
|
+
|
|
41198
42098
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41199
42099
|
|
|
41200
42100
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -41267,6 +42167,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
41267
42167
|
|
|
41268
42168
|
|
|
41269
42169
|
|
|
42170
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
42171
|
+
|
|
42172
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
42173
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
42174
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
42175
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reverseSessionDto, localVarRequestOptions, configuration)
|
|
42176
|
+
|
|
42177
|
+
return {
|
|
42178
|
+
url: toPathString(localVarUrlObj),
|
|
42179
|
+
options: localVarRequestOptions,
|
|
42180
|
+
};
|
|
42181
|
+
},
|
|
42182
|
+
/**
|
|
42183
|
+
* Starts a terminal reversal for the full remaining amount AND writes a reversal paymentEvent to the order once the reversal settles (via reconciliation). Returns a PENDING refund session — poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. A reversal typically settles without a card tap; if the payment is already batched/settled the reversal fails and the client should fall back to /worldline/refund.
|
|
42184
|
+
* @summary Revert (fully reverse) a settled Worldline payment session (async)
|
|
42185
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42186
|
+
* @param {*} [options] Override http request option.
|
|
42187
|
+
* @throws {RequiredError}
|
|
42188
|
+
*/
|
|
42189
|
+
revertWorldlineSession: async (reverseSessionDto: ReverseSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42190
|
+
// verify required parameter 'reverseSessionDto' is not null or undefined
|
|
42191
|
+
assertParamExists('revertWorldlineSession', 'reverseSessionDto', reverseSessionDto)
|
|
42192
|
+
const localVarPath = `/api/v1/payment-session/worldline/revert`;
|
|
42193
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42194
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
42195
|
+
let baseOptions;
|
|
42196
|
+
if (configuration) {
|
|
42197
|
+
baseOptions = configuration.baseOptions;
|
|
42198
|
+
}
|
|
42199
|
+
|
|
42200
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
42201
|
+
const localVarHeaderParameter = {} as any;
|
|
42202
|
+
const localVarQueryParameter = {} as any;
|
|
42203
|
+
|
|
42204
|
+
|
|
42205
|
+
|
|
41270
42206
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41271
42207
|
|
|
41272
42208
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -41336,6 +42272,19 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
41336
42272
|
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelSession(clientToken, options);
|
|
41337
42273
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41338
42274
|
},
|
|
42275
|
+
/**
|
|
42276
|
+
* Unified paid-status check for both POS and kiosk. Reads the order from the channel-appropriate collection (via the x-app-x channel header) and derives the settlement from its persisted paymentEvents — the same events reconciliation writes for every provider (Viva/Nets/Worldline, card or manual). The FE polls this after a payment and stops when isFullyPaid is true. Send an empty body for the plain check, or optional { cashChange, cartTotalAmount } overrides. Always 200: `settlement` is null while the order snapshot does not yet exist / cannot be computed (treat as pending).
|
|
42277
|
+
* @summary Get an order\'s paid/reconcile status (POS or kiosk)
|
|
42278
|
+
* @param {number} businessId The internal business ID.
|
|
42279
|
+
* @param {string} orderId The order ID.
|
|
42280
|
+
* @param {OrderSettlementStatusRequestDto} [orderSettlementStatusRequestDto]
|
|
42281
|
+
* @param {*} [options] Override http request option.
|
|
42282
|
+
* @throws {RequiredError}
|
|
42283
|
+
*/
|
|
42284
|
+
async getOrderSettlementStatus(businessId: number, orderId: string, orderSettlementStatusRequestDto?: OrderSettlementStatusRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderSettlementStatusResponseDto>> {
|
|
42285
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderSettlementStatus(businessId, orderId, orderSettlementStatusRequestDto, options);
|
|
42286
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
42287
|
+
},
|
|
41339
42288
|
/**
|
|
41340
42289
|
* Reads PaymentSession from Postgres. Use this to poll session lifecycle without hitting the Viva API.
|
|
41341
42290
|
* @summary Get payment session status by clientToken
|
|
@@ -41382,6 +42331,18 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
41382
42331
|
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options);
|
|
41383
42332
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41384
42333
|
},
|
|
42334
|
+
/**
|
|
42335
|
+
* Creates a PaymentSession row and pushes the transaction to the station\'s Worldline terminal via the Worldline microservice (async — the result arrives via the Worldline webhook). Returns a client-facing token to poll. The backend owns the order mutation (webhook → reconciliation), replacing the legacy FE-writes-from-Ably flow. Idempotent via X-Idempotency-Key header.
|
|
42336
|
+
* @summary Initiate a Worldline terminal payment session
|
|
42337
|
+
* @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
|
|
42338
|
+
* @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
|
|
42339
|
+
* @param {*} [options] Override http request option.
|
|
42340
|
+
* @throws {RequiredError}
|
|
42341
|
+
*/
|
|
42342
|
+
async initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateWorldlineSessionResponseDto>> {
|
|
42343
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options);
|
|
42344
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
42345
|
+
},
|
|
41385
42346
|
/**
|
|
41386
42347
|
* 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.
|
|
41387
42348
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -41393,6 +42354,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
41393
42354
|
const localVarAxiosArgs = await localVarAxiosParamCreator.pollVivaSession(pollVivaSessionDto, options);
|
|
41394
42355
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41395
42356
|
},
|
|
42357
|
+
/**
|
|
42358
|
+
* Called by a Cloud Task (not the client). Polls the Worldline microservice by operationId for up to ~45s; as soon as the operation is terminal it finalizes the PaymentSession through the same sweep the webhook uses (CAS-guarded, so a webhook + poll never double-write). Ensures the session resolves even if the webhook is slow or never arrives.
|
|
42359
|
+
* @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
|
|
42360
|
+
* @param {PollWorldlineSessionDto} pollWorldlineSessionDto
|
|
42361
|
+
* @param {*} [options] Override http request option.
|
|
42362
|
+
* @throws {RequiredError}
|
|
42363
|
+
*/
|
|
42364
|
+
async pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
42365
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.pollWorldlineSession(pollWorldlineSessionDto, options);
|
|
42366
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
42367
|
+
},
|
|
41396
42368
|
/**
|
|
41397
42369
|
* Records a non-gateway payment (cash / voucher / CardManual / gift card / …) through PaymentSession so every device sees it. Card paymethods (Card/Debit/Credit/Edenred) use a gateway initiate. Resolves to SUCCESS immediately; reconciliation writes the paymentEvent.
|
|
41398
42370
|
* @summary Record a manual payment session
|
|
@@ -41426,6 +42398,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
41426
42398
|
const localVarAxiosArgs = await localVarAxiosParamCreator.refundVivaSession(reverseSessionDto, options);
|
|
41427
42399
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41428
42400
|
},
|
|
42401
|
+
/**
|
|
42402
|
+
* Starts a terminal-present ReturnOfGoods on the station\'s Worldline terminal for the given sessionId, refunding the payload `amount` (defaults to the full session amount). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. Does NOT write a reversal paymentEvent to the order.
|
|
42403
|
+
* @summary Refund a settled Worldline payment session (gateway only, async)
|
|
42404
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42405
|
+
* @param {*} [options] Override http request option.
|
|
42406
|
+
* @throws {RequiredError}
|
|
42407
|
+
*/
|
|
42408
|
+
async refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentSessionViewDto>> {
|
|
42409
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.refundWorldlineSession(reverseSessionDto, options);
|
|
42410
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
42411
|
+
},
|
|
41429
42412
|
/**
|
|
41430
42413
|
* Starts a terminal-present ReturnOfGoods for the full remaining amount AND writes a reversal paymentEvent to the order once the refund settles (via reconciliation). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED.
|
|
41431
42414
|
* @summary Revert (fully reverse) a settled Nets payment session (async)
|
|
@@ -41448,6 +42431,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
41448
42431
|
const localVarAxiosArgs = await localVarAxiosParamCreator.revertVivaSession(reverseSessionDto, options);
|
|
41449
42432
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41450
42433
|
},
|
|
42434
|
+
/**
|
|
42435
|
+
* Starts a terminal reversal for the full remaining amount AND writes a reversal paymentEvent to the order once the reversal settles (via reconciliation). Returns a PENDING refund session — poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. A reversal typically settles without a card tap; if the payment is already batched/settled the reversal fails and the client should fall back to /worldline/refund.
|
|
42436
|
+
* @summary Revert (fully reverse) a settled Worldline payment session (async)
|
|
42437
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42438
|
+
* @param {*} [options] Override http request option.
|
|
42439
|
+
* @throws {RequiredError}
|
|
42440
|
+
*/
|
|
42441
|
+
async revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorldlineRevertResponseDto>> {
|
|
42442
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.revertWorldlineSession(reverseSessionDto, options);
|
|
42443
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
42444
|
+
},
|
|
41451
42445
|
/**
|
|
41452
42446
|
* Reverses a manually-recorded payment (cash / voucher / CardManual / gift card / …) by its sessionId (the order paymentEvent referenceId). Not for card paymethods (Card/Debit/Credit/Edenred) — those use cancel/refund. Idempotent: re-calling a voided session is a no-op.
|
|
41453
42447
|
* @summary Void a manual payment session
|
|
@@ -41479,6 +42473,18 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
41479
42473
|
cancelSession(clientToken: string, options?: any): AxiosPromise<PaymentSessionViewDto> {
|
|
41480
42474
|
return localVarFp.cancelSession(clientToken, options).then((request) => request(axios, basePath));
|
|
41481
42475
|
},
|
|
42476
|
+
/**
|
|
42477
|
+
* Unified paid-status check for both POS and kiosk. Reads the order from the channel-appropriate collection (via the x-app-x channel header) and derives the settlement from its persisted paymentEvents — the same events reconciliation writes for every provider (Viva/Nets/Worldline, card or manual). The FE polls this after a payment and stops when isFullyPaid is true. Send an empty body for the plain check, or optional { cashChange, cartTotalAmount } overrides. Always 200: `settlement` is null while the order snapshot does not yet exist / cannot be computed (treat as pending).
|
|
42478
|
+
* @summary Get an order\'s paid/reconcile status (POS or kiosk)
|
|
42479
|
+
* @param {number} businessId The internal business ID.
|
|
42480
|
+
* @param {string} orderId The order ID.
|
|
42481
|
+
* @param {OrderSettlementStatusRequestDto} [orderSettlementStatusRequestDto]
|
|
42482
|
+
* @param {*} [options] Override http request option.
|
|
42483
|
+
* @throws {RequiredError}
|
|
42484
|
+
*/
|
|
42485
|
+
getOrderSettlementStatus(businessId: number, orderId: string, orderSettlementStatusRequestDto?: OrderSettlementStatusRequestDto, options?: any): AxiosPromise<OrderSettlementStatusResponseDto> {
|
|
42486
|
+
return localVarFp.getOrderSettlementStatus(businessId, orderId, orderSettlementStatusRequestDto, options).then((request) => request(axios, basePath));
|
|
42487
|
+
},
|
|
41482
42488
|
/**
|
|
41483
42489
|
* Reads PaymentSession from Postgres. Use this to poll session lifecycle without hitting the Viva API.
|
|
41484
42490
|
* @summary Get payment session status by clientToken
|
|
@@ -41521,6 +42527,17 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
41521
42527
|
initiateVivaSession(initiateVivaSessionDto: InitiateVivaSessionDto, xIdempotencyKey?: string, options?: any): AxiosPromise<InitiateVivaSessionResponseDto> {
|
|
41522
42528
|
return localVarFp.initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options).then((request) => request(axios, basePath));
|
|
41523
42529
|
},
|
|
42530
|
+
/**
|
|
42531
|
+
* Creates a PaymentSession row and pushes the transaction to the station\'s Worldline terminal via the Worldline microservice (async — the result arrives via the Worldline webhook). Returns a client-facing token to poll. The backend owns the order mutation (webhook → reconciliation), replacing the legacy FE-writes-from-Ably flow. Idempotent via X-Idempotency-Key header.
|
|
42532
|
+
* @summary Initiate a Worldline terminal payment session
|
|
42533
|
+
* @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
|
|
42534
|
+
* @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
|
|
42535
|
+
* @param {*} [options] Override http request option.
|
|
42536
|
+
* @throws {RequiredError}
|
|
42537
|
+
*/
|
|
42538
|
+
initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: any): AxiosPromise<InitiateWorldlineSessionResponseDto> {
|
|
42539
|
+
return localVarFp.initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options).then((request) => request(axios, basePath));
|
|
42540
|
+
},
|
|
41524
42541
|
/**
|
|
41525
42542
|
* 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.
|
|
41526
42543
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -41531,6 +42548,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
41531
42548
|
pollVivaSession(pollVivaSessionDto: PollVivaSessionDto, options?: any): AxiosPromise<void> {
|
|
41532
42549
|
return localVarFp.pollVivaSession(pollVivaSessionDto, options).then((request) => request(axios, basePath));
|
|
41533
42550
|
},
|
|
42551
|
+
/**
|
|
42552
|
+
* Called by a Cloud Task (not the client). Polls the Worldline microservice by operationId for up to ~45s; as soon as the operation is terminal it finalizes the PaymentSession through the same sweep the webhook uses (CAS-guarded, so a webhook + poll never double-write). Ensures the session resolves even if the webhook is slow or never arrives.
|
|
42553
|
+
* @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
|
|
42554
|
+
* @param {PollWorldlineSessionDto} pollWorldlineSessionDto
|
|
42555
|
+
* @param {*} [options] Override http request option.
|
|
42556
|
+
* @throws {RequiredError}
|
|
42557
|
+
*/
|
|
42558
|
+
pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: any): AxiosPromise<void> {
|
|
42559
|
+
return localVarFp.pollWorldlineSession(pollWorldlineSessionDto, options).then((request) => request(axios, basePath));
|
|
42560
|
+
},
|
|
41534
42561
|
/**
|
|
41535
42562
|
* Records a non-gateway payment (cash / voucher / CardManual / gift card / …) through PaymentSession so every device sees it. Card paymethods (Card/Debit/Credit/Edenred) use a gateway initiate. Resolves to SUCCESS immediately; reconciliation writes the paymentEvent.
|
|
41536
42563
|
* @summary Record a manual payment session
|
|
@@ -41561,6 +42588,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
41561
42588
|
refundVivaSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
|
|
41562
42589
|
return localVarFp.refundVivaSession(reverseSessionDto, options).then((request) => request(axios, basePath));
|
|
41563
42590
|
},
|
|
42591
|
+
/**
|
|
42592
|
+
* Starts a terminal-present ReturnOfGoods on the station\'s Worldline terminal for the given sessionId, refunding the payload `amount` (defaults to the full session amount). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. Does NOT write a reversal paymentEvent to the order.
|
|
42593
|
+
* @summary Refund a settled Worldline payment session (gateway only, async)
|
|
42594
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42595
|
+
* @param {*} [options] Override http request option.
|
|
42596
|
+
* @throws {RequiredError}
|
|
42597
|
+
*/
|
|
42598
|
+
refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
|
|
42599
|
+
return localVarFp.refundWorldlineSession(reverseSessionDto, options).then((request) => request(axios, basePath));
|
|
42600
|
+
},
|
|
41564
42601
|
/**
|
|
41565
42602
|
* Starts a terminal-present ReturnOfGoods for the full remaining amount AND writes a reversal paymentEvent to the order once the refund settles (via reconciliation). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED.
|
|
41566
42603
|
* @summary Revert (fully reverse) a settled Nets payment session (async)
|
|
@@ -41581,6 +42618,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
41581
42618
|
revertVivaSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
|
|
41582
42619
|
return localVarFp.revertVivaSession(reverseSessionDto, options).then((request) => request(axios, basePath));
|
|
41583
42620
|
},
|
|
42621
|
+
/**
|
|
42622
|
+
* Starts a terminal reversal for the full remaining amount AND writes a reversal paymentEvent to the order once the reversal settles (via reconciliation). Returns a PENDING refund session — poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. A reversal typically settles without a card tap; if the payment is already batched/settled the reversal fails and the client should fall back to /worldline/refund.
|
|
42623
|
+
* @summary Revert (fully reverse) a settled Worldline payment session (async)
|
|
42624
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42625
|
+
* @param {*} [options] Override http request option.
|
|
42626
|
+
* @throws {RequiredError}
|
|
42627
|
+
*/
|
|
42628
|
+
revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<WorldlineRevertResponseDto> {
|
|
42629
|
+
return localVarFp.revertWorldlineSession(reverseSessionDto, options).then((request) => request(axios, basePath));
|
|
42630
|
+
},
|
|
41584
42631
|
/**
|
|
41585
42632
|
* Reverses a manually-recorded payment (cash / voucher / CardManual / gift card / …) by its sessionId (the order paymentEvent referenceId). Not for card paymethods (Card/Debit/Credit/Edenred) — those use cancel/refund. Idempotent: re-calling a voided session is a no-op.
|
|
41586
42633
|
* @summary Void a manual payment session
|
|
@@ -41610,6 +42657,18 @@ export interface PaymentSessionApiInterface {
|
|
|
41610
42657
|
*/
|
|
41611
42658
|
cancelSession(clientToken: string, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
|
|
41612
42659
|
|
|
42660
|
+
/**
|
|
42661
|
+
* Unified paid-status check for both POS and kiosk. Reads the order from the channel-appropriate collection (via the x-app-x channel header) and derives the settlement from its persisted paymentEvents — the same events reconciliation writes for every provider (Viva/Nets/Worldline, card or manual). The FE polls this after a payment and stops when isFullyPaid is true. Send an empty body for the plain check, or optional { cashChange, cartTotalAmount } overrides. Always 200: `settlement` is null while the order snapshot does not yet exist / cannot be computed (treat as pending).
|
|
42662
|
+
* @summary Get an order\'s paid/reconcile status (POS or kiosk)
|
|
42663
|
+
* @param {number} businessId The internal business ID.
|
|
42664
|
+
* @param {string} orderId The order ID.
|
|
42665
|
+
* @param {OrderSettlementStatusRequestDto} [orderSettlementStatusRequestDto]
|
|
42666
|
+
* @param {*} [options] Override http request option.
|
|
42667
|
+
* @throws {RequiredError}
|
|
42668
|
+
* @memberof PaymentSessionApiInterface
|
|
42669
|
+
*/
|
|
42670
|
+
getOrderSettlementStatus(businessId: number, orderId: string, orderSettlementStatusRequestDto?: OrderSettlementStatusRequestDto, options?: AxiosRequestConfig): AxiosPromise<OrderSettlementStatusResponseDto>;
|
|
42671
|
+
|
|
41613
42672
|
/**
|
|
41614
42673
|
* Reads PaymentSession from Postgres. Use this to poll session lifecycle without hitting the Viva API.
|
|
41615
42674
|
* @summary Get payment session status by clientToken
|
|
@@ -41652,6 +42711,17 @@ export interface PaymentSessionApiInterface {
|
|
|
41652
42711
|
*/
|
|
41653
42712
|
initiateVivaSession(initiateVivaSessionDto: InitiateVivaSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateVivaSessionResponseDto>;
|
|
41654
42713
|
|
|
42714
|
+
/**
|
|
42715
|
+
* Creates a PaymentSession row and pushes the transaction to the station\'s Worldline terminal via the Worldline microservice (async — the result arrives via the Worldline webhook). Returns a client-facing token to poll. The backend owns the order mutation (webhook → reconciliation), replacing the legacy FE-writes-from-Ably flow. Idempotent via X-Idempotency-Key header.
|
|
42716
|
+
* @summary Initiate a Worldline terminal payment session
|
|
42717
|
+
* @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
|
|
42718
|
+
* @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
|
|
42719
|
+
* @param {*} [options] Override http request option.
|
|
42720
|
+
* @throws {RequiredError}
|
|
42721
|
+
* @memberof PaymentSessionApiInterface
|
|
42722
|
+
*/
|
|
42723
|
+
initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateWorldlineSessionResponseDto>;
|
|
42724
|
+
|
|
41655
42725
|
/**
|
|
41656
42726
|
* 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.
|
|
41657
42727
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -41662,6 +42732,16 @@ export interface PaymentSessionApiInterface {
|
|
|
41662
42732
|
*/
|
|
41663
42733
|
pollVivaSession(pollVivaSessionDto: PollVivaSessionDto, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
41664
42734
|
|
|
42735
|
+
/**
|
|
42736
|
+
* Called by a Cloud Task (not the client). Polls the Worldline microservice by operationId for up to ~45s; as soon as the operation is terminal it finalizes the PaymentSession through the same sweep the webhook uses (CAS-guarded, so a webhook + poll never double-write). Ensures the session resolves even if the webhook is slow or never arrives.
|
|
42737
|
+
* @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
|
|
42738
|
+
* @param {PollWorldlineSessionDto} pollWorldlineSessionDto
|
|
42739
|
+
* @param {*} [options] Override http request option.
|
|
42740
|
+
* @throws {RequiredError}
|
|
42741
|
+
* @memberof PaymentSessionApiInterface
|
|
42742
|
+
*/
|
|
42743
|
+
pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
42744
|
+
|
|
41665
42745
|
/**
|
|
41666
42746
|
* Records a non-gateway payment (cash / voucher / CardManual / gift card / …) through PaymentSession so every device sees it. Card paymethods (Card/Debit/Credit/Edenred) use a gateway initiate. Resolves to SUCCESS immediately; reconciliation writes the paymentEvent.
|
|
41667
42747
|
* @summary Record a manual payment session
|
|
@@ -41692,6 +42772,16 @@ export interface PaymentSessionApiInterface {
|
|
|
41692
42772
|
*/
|
|
41693
42773
|
refundVivaSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
|
|
41694
42774
|
|
|
42775
|
+
/**
|
|
42776
|
+
* Starts a terminal-present ReturnOfGoods on the station\'s Worldline terminal for the given sessionId, refunding the payload `amount` (defaults to the full session amount). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. Does NOT write a reversal paymentEvent to the order.
|
|
42777
|
+
* @summary Refund a settled Worldline payment session (gateway only, async)
|
|
42778
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42779
|
+
* @param {*} [options] Override http request option.
|
|
42780
|
+
* @throws {RequiredError}
|
|
42781
|
+
* @memberof PaymentSessionApiInterface
|
|
42782
|
+
*/
|
|
42783
|
+
refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
|
|
42784
|
+
|
|
41695
42785
|
/**
|
|
41696
42786
|
* Starts a terminal-present ReturnOfGoods for the full remaining amount AND writes a reversal paymentEvent to the order once the refund settles (via reconciliation). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED.
|
|
41697
42787
|
* @summary Revert (fully reverse) a settled Nets payment session (async)
|
|
@@ -41712,6 +42802,16 @@ export interface PaymentSessionApiInterface {
|
|
|
41712
42802
|
*/
|
|
41713
42803
|
revertVivaSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
|
|
41714
42804
|
|
|
42805
|
+
/**
|
|
42806
|
+
* Starts a terminal reversal for the full remaining amount AND writes a reversal paymentEvent to the order once the reversal settles (via reconciliation). Returns a PENDING refund session — poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. A reversal typically settles without a card tap; if the payment is already batched/settled the reversal fails and the client should fall back to /worldline/refund.
|
|
42807
|
+
* @summary Revert (fully reverse) a settled Worldline payment session (async)
|
|
42808
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42809
|
+
* @param {*} [options] Override http request option.
|
|
42810
|
+
* @throws {RequiredError}
|
|
42811
|
+
* @memberof PaymentSessionApiInterface
|
|
42812
|
+
*/
|
|
42813
|
+
revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<WorldlineRevertResponseDto>;
|
|
42814
|
+
|
|
41715
42815
|
/**
|
|
41716
42816
|
* Reverses a manually-recorded payment (cash / voucher / CardManual / gift card / …) by its sessionId (the order paymentEvent referenceId). Not for card paymethods (Card/Debit/Credit/Edenred) — those use cancel/refund. Idempotent: re-calling a voided session is a no-op.
|
|
41717
42817
|
* @summary Void a manual payment session
|
|
@@ -41743,6 +42843,20 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
41743
42843
|
return PaymentSessionApiFp(this.configuration).cancelSession(clientToken, options).then((request) => request(this.axios, this.basePath));
|
|
41744
42844
|
}
|
|
41745
42845
|
|
|
42846
|
+
/**
|
|
42847
|
+
* Unified paid-status check for both POS and kiosk. Reads the order from the channel-appropriate collection (via the x-app-x channel header) and derives the settlement from its persisted paymentEvents — the same events reconciliation writes for every provider (Viva/Nets/Worldline, card or manual). The FE polls this after a payment and stops when isFullyPaid is true. Send an empty body for the plain check, or optional { cashChange, cartTotalAmount } overrides. Always 200: `settlement` is null while the order snapshot does not yet exist / cannot be computed (treat as pending).
|
|
42848
|
+
* @summary Get an order\'s paid/reconcile status (POS or kiosk)
|
|
42849
|
+
* @param {number} businessId The internal business ID.
|
|
42850
|
+
* @param {string} orderId The order ID.
|
|
42851
|
+
* @param {OrderSettlementStatusRequestDto} [orderSettlementStatusRequestDto]
|
|
42852
|
+
* @param {*} [options] Override http request option.
|
|
42853
|
+
* @throws {RequiredError}
|
|
42854
|
+
* @memberof PaymentSessionApi
|
|
42855
|
+
*/
|
|
42856
|
+
public getOrderSettlementStatus(businessId: number, orderId: string, orderSettlementStatusRequestDto?: OrderSettlementStatusRequestDto, options?: AxiosRequestConfig) {
|
|
42857
|
+
return PaymentSessionApiFp(this.configuration).getOrderSettlementStatus(businessId, orderId, orderSettlementStatusRequestDto, options).then((request) => request(this.axios, this.basePath));
|
|
42858
|
+
}
|
|
42859
|
+
|
|
41746
42860
|
/**
|
|
41747
42861
|
* Reads PaymentSession from Postgres. Use this to poll session lifecycle without hitting the Viva API.
|
|
41748
42862
|
* @summary Get payment session status by clientToken
|
|
@@ -41793,6 +42907,19 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
41793
42907
|
return PaymentSessionApiFp(this.configuration).initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
41794
42908
|
}
|
|
41795
42909
|
|
|
42910
|
+
/**
|
|
42911
|
+
* Creates a PaymentSession row and pushes the transaction to the station\'s Worldline terminal via the Worldline microservice (async — the result arrives via the Worldline webhook). Returns a client-facing token to poll. The backend owns the order mutation (webhook → reconciliation), replacing the legacy FE-writes-from-Ably flow. Idempotent via X-Idempotency-Key header.
|
|
42912
|
+
* @summary Initiate a Worldline terminal payment session
|
|
42913
|
+
* @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
|
|
42914
|
+
* @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
|
|
42915
|
+
* @param {*} [options] Override http request option.
|
|
42916
|
+
* @throws {RequiredError}
|
|
42917
|
+
* @memberof PaymentSessionApi
|
|
42918
|
+
*/
|
|
42919
|
+
public initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig) {
|
|
42920
|
+
return PaymentSessionApiFp(this.configuration).initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
42921
|
+
}
|
|
42922
|
+
|
|
41796
42923
|
/**
|
|
41797
42924
|
* 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.
|
|
41798
42925
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -41805,6 +42932,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
41805
42932
|
return PaymentSessionApiFp(this.configuration).pollVivaSession(pollVivaSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
41806
42933
|
}
|
|
41807
42934
|
|
|
42935
|
+
/**
|
|
42936
|
+
* Called by a Cloud Task (not the client). Polls the Worldline microservice by operationId for up to ~45s; as soon as the operation is terminal it finalizes the PaymentSession through the same sweep the webhook uses (CAS-guarded, so a webhook + poll never double-write). Ensures the session resolves even if the webhook is slow or never arrives.
|
|
42937
|
+
* @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
|
|
42938
|
+
* @param {PollWorldlineSessionDto} pollWorldlineSessionDto
|
|
42939
|
+
* @param {*} [options] Override http request option.
|
|
42940
|
+
* @throws {RequiredError}
|
|
42941
|
+
* @memberof PaymentSessionApi
|
|
42942
|
+
*/
|
|
42943
|
+
public pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig) {
|
|
42944
|
+
return PaymentSessionApiFp(this.configuration).pollWorldlineSession(pollWorldlineSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
42945
|
+
}
|
|
42946
|
+
|
|
41808
42947
|
/**
|
|
41809
42948
|
* Records a non-gateway payment (cash / voucher / CardManual / gift card / …) through PaymentSession so every device sees it. Card paymethods (Card/Debit/Credit/Edenred) use a gateway initiate. Resolves to SUCCESS immediately; reconciliation writes the paymentEvent.
|
|
41810
42949
|
* @summary Record a manual payment session
|
|
@@ -41841,6 +42980,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
41841
42980
|
return PaymentSessionApiFp(this.configuration).refundVivaSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
41842
42981
|
}
|
|
41843
42982
|
|
|
42983
|
+
/**
|
|
42984
|
+
* Starts a terminal-present ReturnOfGoods on the station\'s Worldline terminal for the given sessionId, refunding the payload `amount` (defaults to the full session amount). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. Does NOT write a reversal paymentEvent to the order.
|
|
42985
|
+
* @summary Refund a settled Worldline payment session (gateway only, async)
|
|
42986
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
42987
|
+
* @param {*} [options] Override http request option.
|
|
42988
|
+
* @throws {RequiredError}
|
|
42989
|
+
* @memberof PaymentSessionApi
|
|
42990
|
+
*/
|
|
42991
|
+
public refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig) {
|
|
42992
|
+
return PaymentSessionApiFp(this.configuration).refundWorldlineSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
42993
|
+
}
|
|
42994
|
+
|
|
41844
42995
|
/**
|
|
41845
42996
|
* Starts a terminal-present ReturnOfGoods for the full remaining amount AND writes a reversal paymentEvent to the order once the refund settles (via reconciliation). Returns a PENDING refund session — the customer must tap their card; poll GET /:clientToken until REFUNDED/FAILED/CANCELLED.
|
|
41846
42997
|
* @summary Revert (fully reverse) a settled Nets payment session (async)
|
|
@@ -41865,6 +43016,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
41865
43016
|
return PaymentSessionApiFp(this.configuration).revertVivaSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
41866
43017
|
}
|
|
41867
43018
|
|
|
43019
|
+
/**
|
|
43020
|
+
* Starts a terminal reversal for the full remaining amount AND writes a reversal paymentEvent to the order once the reversal settles (via reconciliation). Returns a PENDING refund session — poll GET /:clientToken until REFUNDED/FAILED/CANCELLED. A reversal typically settles without a card tap; if the payment is already batched/settled the reversal fails and the client should fall back to /worldline/refund.
|
|
43021
|
+
* @summary Revert (fully reverse) a settled Worldline payment session (async)
|
|
43022
|
+
* @param {ReverseSessionDto} reverseSessionDto
|
|
43023
|
+
* @param {*} [options] Override http request option.
|
|
43024
|
+
* @throws {RequiredError}
|
|
43025
|
+
* @memberof PaymentSessionApi
|
|
43026
|
+
*/
|
|
43027
|
+
public revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig) {
|
|
43028
|
+
return PaymentSessionApiFp(this.configuration).revertWorldlineSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
|
|
43029
|
+
}
|
|
43030
|
+
|
|
41868
43031
|
/**
|
|
41869
43032
|
* Reverses a manually-recorded payment (cash / voucher / CardManual / gift card / …) by its sessionId (the order paymentEvent referenceId). Not for card paymethods (Card/Debit/Credit/Edenred) — those use cancel/refund. Idempotent: re-calling a voided session is a no-op.
|
|
41870
43033
|
* @summary Void a manual payment session
|
|
@@ -47337,6 +48500,36 @@ export const WebhookApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
47337
48500
|
|
|
47338
48501
|
|
|
47339
48502
|
|
|
48503
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
48504
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
48505
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
48506
|
+
|
|
48507
|
+
return {
|
|
48508
|
+
url: toPathString(localVarUrlObj),
|
|
48509
|
+
options: localVarRequestOptions,
|
|
48510
|
+
};
|
|
48511
|
+
},
|
|
48512
|
+
/**
|
|
48513
|
+
* Per-operation callback registered at initiate (x-munchi-webhook-address). Finalizes the PaymentSession to SUCCESS/FAILED/CANCELLED and triggers order reconciliation. The legacy /worldline/events (FE-writes-from-Ably) stays untouched.
|
|
48514
|
+
* @summary Handle Worldline webhook events for the payment-session flow
|
|
48515
|
+
* @param {*} [options] Override http request option.
|
|
48516
|
+
* @throws {RequiredError}
|
|
48517
|
+
*/
|
|
48518
|
+
handleWorldlineSessionEvents: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
48519
|
+
const localVarPath = `/api/webhook/worldline/payments`;
|
|
48520
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
48521
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48522
|
+
let baseOptions;
|
|
48523
|
+
if (configuration) {
|
|
48524
|
+
baseOptions = configuration.baseOptions;
|
|
48525
|
+
}
|
|
48526
|
+
|
|
48527
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
48528
|
+
const localVarHeaderParameter = {} as any;
|
|
48529
|
+
const localVarQueryParameter = {} as any;
|
|
48530
|
+
|
|
48531
|
+
|
|
48532
|
+
|
|
47340
48533
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
47341
48534
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
47342
48535
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -47634,6 +48827,16 @@ export const WebhookApiFp = function(configuration?: Configuration) {
|
|
|
47634
48827
|
const localVarAxiosArgs = await localVarAxiosParamCreator.handleWorldlineEvents(options);
|
|
47635
48828
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
47636
48829
|
},
|
|
48830
|
+
/**
|
|
48831
|
+
* Per-operation callback registered at initiate (x-munchi-webhook-address). Finalizes the PaymentSession to SUCCESS/FAILED/CANCELLED and triggers order reconciliation. The legacy /worldline/events (FE-writes-from-Ably) stays untouched.
|
|
48832
|
+
* @summary Handle Worldline webhook events for the payment-session flow
|
|
48833
|
+
* @param {*} [options] Override http request option.
|
|
48834
|
+
* @throws {RequiredError}
|
|
48835
|
+
*/
|
|
48836
|
+
async handleWorldlineSessionEvents(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
48837
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.handleWorldlineSessionEvents(options);
|
|
48838
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
48839
|
+
},
|
|
47637
48840
|
/**
|
|
47638
48841
|
*
|
|
47639
48842
|
* @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
|
|
@@ -47821,6 +49024,15 @@ export const WebhookApiFactory = function (configuration?: Configuration, basePa
|
|
|
47821
49024
|
handleWorldlineEvents(options?: any): AxiosPromise<void> {
|
|
47822
49025
|
return localVarFp.handleWorldlineEvents(options).then((request) => request(axios, basePath));
|
|
47823
49026
|
},
|
|
49027
|
+
/**
|
|
49028
|
+
* Per-operation callback registered at initiate (x-munchi-webhook-address). Finalizes the PaymentSession to SUCCESS/FAILED/CANCELLED and triggers order reconciliation. The legacy /worldline/events (FE-writes-from-Ably) stays untouched.
|
|
49029
|
+
* @summary Handle Worldline webhook events for the payment-session flow
|
|
49030
|
+
* @param {*} [options] Override http request option.
|
|
49031
|
+
* @throws {RequiredError}
|
|
49032
|
+
*/
|
|
49033
|
+
handleWorldlineSessionEvents(options?: any): AxiosPromise<void> {
|
|
49034
|
+
return localVarFp.handleWorldlineSessionEvents(options).then((request) => request(axios, basePath));
|
|
49035
|
+
},
|
|
47824
49036
|
/**
|
|
47825
49037
|
*
|
|
47826
49038
|
* @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
|
|
@@ -48003,6 +49215,15 @@ export interface WebhookApiInterface {
|
|
|
48003
49215
|
*/
|
|
48004
49216
|
handleWorldlineEvents(options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
48005
49217
|
|
|
49218
|
+
/**
|
|
49219
|
+
* Per-operation callback registered at initiate (x-munchi-webhook-address). Finalizes the PaymentSession to SUCCESS/FAILED/CANCELLED and triggers order reconciliation. The legacy /worldline/events (FE-writes-from-Ably) stays untouched.
|
|
49220
|
+
* @summary Handle Worldline webhook events for the payment-session flow
|
|
49221
|
+
* @param {*} [options] Override http request option.
|
|
49222
|
+
* @throws {RequiredError}
|
|
49223
|
+
* @memberof WebhookApiInterface
|
|
49224
|
+
*/
|
|
49225
|
+
handleWorldlineSessionEvents(options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
49226
|
+
|
|
48006
49227
|
/**
|
|
48007
49228
|
*
|
|
48008
49229
|
* @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
|
|
@@ -48217,6 +49438,17 @@ export class WebhookApi extends BaseAPI implements WebhookApiInterface {
|
|
|
48217
49438
|
return WebhookApiFp(this.configuration).handleWorldlineEvents(options).then((request) => request(this.axios, this.basePath));
|
|
48218
49439
|
}
|
|
48219
49440
|
|
|
49441
|
+
/**
|
|
49442
|
+
* Per-operation callback registered at initiate (x-munchi-webhook-address). Finalizes the PaymentSession to SUCCESS/FAILED/CANCELLED and triggers order reconciliation. The legacy /worldline/events (FE-writes-from-Ably) stays untouched.
|
|
49443
|
+
* @summary Handle Worldline webhook events for the payment-session flow
|
|
49444
|
+
* @param {*} [options] Override http request option.
|
|
49445
|
+
* @throws {RequiredError}
|
|
49446
|
+
* @memberof WebhookApi
|
|
49447
|
+
*/
|
|
49448
|
+
public handleWorldlineSessionEvents(options?: AxiosRequestConfig) {
|
|
49449
|
+
return WebhookApiFp(this.configuration).handleWorldlineSessionEvents(options).then((request) => request(this.axios, this.basePath));
|
|
49450
|
+
}
|
|
49451
|
+
|
|
48220
49452
|
/**
|
|
48221
49453
|
*
|
|
48222
49454
|
* @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
|