@munchi_oy/core 1.9.98 → 1.9.100
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 +355 -11
- 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/src/version.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/generated/api.ts +516 -11
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/generated/api.ts
CHANGED
|
@@ -7035,12 +7035,6 @@ export interface InitiateVivaA2aSessionDto {
|
|
|
7035
7035
|
* @memberof InitiateVivaA2aSessionDto
|
|
7036
7036
|
*/
|
|
7037
7037
|
'splitContext'?: CreateManualSessionDtoSplitContext;
|
|
7038
|
-
/**
|
|
7039
|
-
* Pay-terminal chargeId (from the pay-terminal-protocol relay) for this attempt. Stamped onto the session\'s metadata so the charge-status fallback can address this exact attempt directly, even when other charges are concurrently in flight on the same order (e.g. a split payment dispatched to a different paired terminal).
|
|
7040
|
-
* @type {string}
|
|
7041
|
-
* @memberof InitiateVivaA2aSessionDto
|
|
7042
|
-
*/
|
|
7043
|
-
'chargeId'?: string;
|
|
7044
7038
|
}
|
|
7045
7039
|
|
|
7046
7040
|
|
|
@@ -10207,6 +10201,93 @@ export interface MunchiGiftCardDataItemDto {
|
|
|
10207
10201
|
}
|
|
10208
10202
|
|
|
10209
10203
|
|
|
10204
|
+
/**
|
|
10205
|
+
*
|
|
10206
|
+
* @export
|
|
10207
|
+
* @interface MunchiPaySessionDto
|
|
10208
|
+
*/
|
|
10209
|
+
export interface MunchiPaySessionDto {
|
|
10210
|
+
/**
|
|
10211
|
+
* PaymentSession primary key.
|
|
10212
|
+
* @type {string}
|
|
10213
|
+
* @memberof MunchiPaySessionDto
|
|
10214
|
+
*/
|
|
10215
|
+
'id': string;
|
|
10216
|
+
/**
|
|
10217
|
+
* Internal session ID.
|
|
10218
|
+
* @type {string}
|
|
10219
|
+
* @memberof MunchiPaySessionDto
|
|
10220
|
+
*/
|
|
10221
|
+
'sessionId': string;
|
|
10222
|
+
/**
|
|
10223
|
+
*
|
|
10224
|
+
* @type {ProviderEnum}
|
|
10225
|
+
* @memberof MunchiPaySessionDto
|
|
10226
|
+
*/
|
|
10227
|
+
'channel': ProviderEnum;
|
|
10228
|
+
/**
|
|
10229
|
+
* Business ID (string form of a BigInt).
|
|
10230
|
+
* @type {string}
|
|
10231
|
+
* @memberof MunchiPaySessionDto
|
|
10232
|
+
*/
|
|
10233
|
+
'businessId': string;
|
|
10234
|
+
/**
|
|
10235
|
+
* Order reference. A standalone Munchi Pay charge with no POS order carries a fixed placeholder value.
|
|
10236
|
+
* @type {string}
|
|
10237
|
+
* @memberof MunchiPaySessionDto
|
|
10238
|
+
*/
|
|
10239
|
+
'orderId': string;
|
|
10240
|
+
/**
|
|
10241
|
+
* SALE or REFUND.
|
|
10242
|
+
* @type {string}
|
|
10243
|
+
* @memberof MunchiPaySessionDto
|
|
10244
|
+
*/
|
|
10245
|
+
'purpose': string;
|
|
10246
|
+
/**
|
|
10247
|
+
* Amount in cents.
|
|
10248
|
+
* @type {number}
|
|
10249
|
+
* @memberof MunchiPaySessionDto
|
|
10250
|
+
*/
|
|
10251
|
+
'amount': number;
|
|
10252
|
+
/**
|
|
10253
|
+
* Currency.
|
|
10254
|
+
* @type {string}
|
|
10255
|
+
* @memberof MunchiPaySessionDto
|
|
10256
|
+
*/
|
|
10257
|
+
'currency': string;
|
|
10258
|
+
/**
|
|
10259
|
+
* Session status (state machine).
|
|
10260
|
+
* @type {string}
|
|
10261
|
+
* @memberof MunchiPaySessionDto
|
|
10262
|
+
*/
|
|
10263
|
+
'status': string;
|
|
10264
|
+
/**
|
|
10265
|
+
* Viva transaction ID.
|
|
10266
|
+
* @type {string}
|
|
10267
|
+
* @memberof MunchiPaySessionDto
|
|
10268
|
+
*/
|
|
10269
|
+
'providerTransactionId'?: string | null;
|
|
10270
|
+
/**
|
|
10271
|
+
* Provider-specific metadata.
|
|
10272
|
+
* @type {object}
|
|
10273
|
+
* @memberof MunchiPaySessionDto
|
|
10274
|
+
*/
|
|
10275
|
+
'metadata'?: object;
|
|
10276
|
+
/**
|
|
10277
|
+
*
|
|
10278
|
+
* @type {string}
|
|
10279
|
+
* @memberof MunchiPaySessionDto
|
|
10280
|
+
*/
|
|
10281
|
+
'createdAt': string;
|
|
10282
|
+
/**
|
|
10283
|
+
*
|
|
10284
|
+
* @type {string}
|
|
10285
|
+
* @memberof MunchiPaySessionDto
|
|
10286
|
+
*/
|
|
10287
|
+
'updatedAt': string;
|
|
10288
|
+
}
|
|
10289
|
+
|
|
10290
|
+
|
|
10210
10291
|
/**
|
|
10211
10292
|
*
|
|
10212
10293
|
* @export
|
|
@@ -19842,6 +19923,25 @@ export interface RefundedItemDto {
|
|
|
19842
19923
|
*/
|
|
19843
19924
|
'amount': number;
|
|
19844
19925
|
}
|
|
19926
|
+
/**
|
|
19927
|
+
*
|
|
19928
|
+
* @export
|
|
19929
|
+
* @interface RegisterChargeMappingDto
|
|
19930
|
+
*/
|
|
19931
|
+
export interface RegisterChargeMappingDto {
|
|
19932
|
+
/**
|
|
19933
|
+
* POS-generated id for this charge attempt (from the pay-terminal Ably relay).
|
|
19934
|
+
* @type {string}
|
|
19935
|
+
* @memberof RegisterChargeMappingDto
|
|
19936
|
+
*/
|
|
19937
|
+
'chargeId': string;
|
|
19938
|
+
/**
|
|
19939
|
+
* The Viva app-to-app session\'s sessionId (== clientTransactionId). Known on the paying device once the SDK\'s onRequiresInput callback fires, right after the session is created and before the card is tapped. Globally unique per attempt, so this mapping can\'t collide with a concurrent charge on the same order (e.g. a split payment on another terminal).
|
|
19940
|
+
* @type {string}
|
|
19941
|
+
* @memberof RegisterChargeMappingDto
|
|
19942
|
+
*/
|
|
19943
|
+
'sessionId': string;
|
|
19944
|
+
}
|
|
19845
19945
|
/**
|
|
19846
19946
|
*
|
|
19847
19947
|
* @export
|
|
@@ -25534,6 +25634,69 @@ export interface VideoBackgroundConfig {
|
|
|
25534
25634
|
}
|
|
25535
25635
|
|
|
25536
25636
|
|
|
25637
|
+
/**
|
|
25638
|
+
*
|
|
25639
|
+
* @export
|
|
25640
|
+
* @interface VivaA2aRefundDto
|
|
25641
|
+
*/
|
|
25642
|
+
export interface VivaA2aRefundDto {
|
|
25643
|
+
/**
|
|
25644
|
+
* The internal business ID.
|
|
25645
|
+
* @type {number}
|
|
25646
|
+
* @memberof VivaA2aRefundDto
|
|
25647
|
+
*/
|
|
25648
|
+
'businessId': number;
|
|
25649
|
+
/**
|
|
25650
|
+
* The Viva transaction ID of the charge to refund.
|
|
25651
|
+
* @type {string}
|
|
25652
|
+
* @memberof VivaA2aRefundDto
|
|
25653
|
+
*/
|
|
25654
|
+
'transactionId': string;
|
|
25655
|
+
/**
|
|
25656
|
+
* Refund amount in the smallest currency unit (e.g., cents).
|
|
25657
|
+
* @type {number}
|
|
25658
|
+
* @memberof VivaA2aRefundDto
|
|
25659
|
+
*/
|
|
25660
|
+
'amount': number;
|
|
25661
|
+
}
|
|
25662
|
+
/**
|
|
25663
|
+
*
|
|
25664
|
+
* @export
|
|
25665
|
+
* @interface VivaA2aSessionDetailResponseDto
|
|
25666
|
+
*/
|
|
25667
|
+
export interface VivaA2aSessionDetailResponseDto {
|
|
25668
|
+
/**
|
|
25669
|
+
*
|
|
25670
|
+
* @type {MunchiPaySessionDto}
|
|
25671
|
+
* @memberof VivaA2aSessionDetailResponseDto
|
|
25672
|
+
*/
|
|
25673
|
+
'session': MunchiPaySessionDto;
|
|
25674
|
+
/**
|
|
25675
|
+
* REFUND rows linked back to this session\'s Viva transaction ID.
|
|
25676
|
+
* @type {Array<MunchiPaySessionDto>}
|
|
25677
|
+
* @memberof VivaA2aSessionDetailResponseDto
|
|
25678
|
+
*/
|
|
25679
|
+
'refunds': Array<MunchiPaySessionDto>;
|
|
25680
|
+
}
|
|
25681
|
+
/**
|
|
25682
|
+
*
|
|
25683
|
+
* @export
|
|
25684
|
+
* @interface VivaA2aSessionListResponseDto
|
|
25685
|
+
*/
|
|
25686
|
+
export interface VivaA2aSessionListResponseDto {
|
|
25687
|
+
/**
|
|
25688
|
+
*
|
|
25689
|
+
* @type {Array<MunchiPaySessionDto>}
|
|
25690
|
+
* @memberof VivaA2aSessionListResponseDto
|
|
25691
|
+
*/
|
|
25692
|
+
'sessions': Array<MunchiPaySessionDto>;
|
|
25693
|
+
/**
|
|
25694
|
+
*
|
|
25695
|
+
* @type {PaginationDto}
|
|
25696
|
+
* @memberof VivaA2aSessionListResponseDto
|
|
25697
|
+
*/
|
|
25698
|
+
'pagination': PaginationDto;
|
|
25699
|
+
}
|
|
25537
25700
|
/**
|
|
25538
25701
|
*
|
|
25539
25702
|
* @export
|
|
@@ -43893,7 +44056,7 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
43893
44056
|
};
|
|
43894
44057
|
},
|
|
43895
44058
|
/**
|
|
43896
|
-
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44059
|
+
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
43897
44060
|
* @summary Poll a charge\'s outcome by chargeId.
|
|
43898
44061
|
* @param {string} chargeId
|
|
43899
44062
|
* @param {*} [options] Override http request option.
|
|
@@ -43926,6 +44089,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
|
|
|
43926
44089
|
options: localVarRequestOptions,
|
|
43927
44090
|
};
|
|
43928
44091
|
},
|
|
44092
|
+
/**
|
|
44093
|
+
* Called by the paying device (e.g. a paired Munchi Pay terminal) once the Viva app-to-app session is created (sessionId known via the SDK\'s onRequiresInput callback), so the POS can fall back to polling if the Ably charge_result message never arrives.
|
|
44094
|
+
* @summary Register a POS-generated chargeId against a Viva session so its outcome can be polled.
|
|
44095
|
+
* @param {RegisterChargeMappingDto} registerChargeMappingDto
|
|
44096
|
+
* @param {*} [options] Override http request option.
|
|
44097
|
+
* @throws {RequiredError}
|
|
44098
|
+
*/
|
|
44099
|
+
paymentSessionRegisterChargeMapping: async (registerChargeMappingDto: RegisterChargeMappingDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44100
|
+
// verify required parameter 'registerChargeMappingDto' is not null or undefined
|
|
44101
|
+
assertParamExists('paymentSessionRegisterChargeMapping', 'registerChargeMappingDto', registerChargeMappingDto)
|
|
44102
|
+
const localVarPath = `/api/v1/payment-session/charge-status/register`;
|
|
44103
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44104
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44105
|
+
let baseOptions;
|
|
44106
|
+
if (configuration) {
|
|
44107
|
+
baseOptions = configuration.baseOptions;
|
|
44108
|
+
}
|
|
44109
|
+
|
|
44110
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44111
|
+
const localVarHeaderParameter = {} as any;
|
|
44112
|
+
const localVarQueryParameter = {} as any;
|
|
44113
|
+
|
|
44114
|
+
|
|
44115
|
+
|
|
44116
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44117
|
+
|
|
44118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44120
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44121
|
+
localVarRequestOptions.data = serializeDataIfNeeded(registerChargeMappingDto, localVarRequestOptions, configuration)
|
|
44122
|
+
|
|
44123
|
+
return {
|
|
44124
|
+
url: toPathString(localVarUrlObj),
|
|
44125
|
+
options: localVarRequestOptions,
|
|
44126
|
+
};
|
|
44127
|
+
},
|
|
43929
44128
|
/**
|
|
43930
44129
|
* 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.
|
|
43931
44130
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -44379,7 +44578,7 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
44379
44578
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
44380
44579
|
},
|
|
44381
44580
|
/**
|
|
44382
|
-
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44581
|
+
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44383
44582
|
* @summary Poll a charge\'s outcome by chargeId.
|
|
44384
44583
|
* @param {string} chargeId
|
|
44385
44584
|
* @param {*} [options] Override http request option.
|
|
@@ -44389,6 +44588,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
|
|
|
44389
44588
|
const localVarAxiosArgs = await localVarAxiosParamCreator.paymentSessionGetChargeStatus(chargeId, options);
|
|
44390
44589
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
44391
44590
|
},
|
|
44591
|
+
/**
|
|
44592
|
+
* Called by the paying device (e.g. a paired Munchi Pay terminal) once the Viva app-to-app session is created (sessionId known via the SDK\'s onRequiresInput callback), so the POS can fall back to polling if the Ably charge_result message never arrives.
|
|
44593
|
+
* @summary Register a POS-generated chargeId against a Viva session so its outcome can be polled.
|
|
44594
|
+
* @param {RegisterChargeMappingDto} registerChargeMappingDto
|
|
44595
|
+
* @param {*} [options] Override http request option.
|
|
44596
|
+
* @throws {RequiredError}
|
|
44597
|
+
*/
|
|
44598
|
+
async paymentSessionRegisterChargeMapping(registerChargeMappingDto: RegisterChargeMappingDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
44599
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.paymentSessionRegisterChargeMapping(registerChargeMappingDto, options);
|
|
44600
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
44601
|
+
},
|
|
44392
44602
|
/**
|
|
44393
44603
|
* 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.
|
|
44394
44604
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -44585,7 +44795,7 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
44585
44795
|
return localVarFp.initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options).then((request) => request(axios, basePath));
|
|
44586
44796
|
},
|
|
44587
44797
|
/**
|
|
44588
|
-
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44798
|
+
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44589
44799
|
* @summary Poll a charge\'s outcome by chargeId.
|
|
44590
44800
|
* @param {string} chargeId
|
|
44591
44801
|
* @param {*} [options] Override http request option.
|
|
@@ -44594,6 +44804,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
|
|
|
44594
44804
|
paymentSessionGetChargeStatus(chargeId: string, options?: any): AxiosPromise<ChargeStatusResponseDto> {
|
|
44595
44805
|
return localVarFp.paymentSessionGetChargeStatus(chargeId, options).then((request) => request(axios, basePath));
|
|
44596
44806
|
},
|
|
44807
|
+
/**
|
|
44808
|
+
* Called by the paying device (e.g. a paired Munchi Pay terminal) once the Viva app-to-app session is created (sessionId known via the SDK\'s onRequiresInput callback), so the POS can fall back to polling if the Ably charge_result message never arrives.
|
|
44809
|
+
* @summary Register a POS-generated chargeId against a Viva session so its outcome can be polled.
|
|
44810
|
+
* @param {RegisterChargeMappingDto} registerChargeMappingDto
|
|
44811
|
+
* @param {*} [options] Override http request option.
|
|
44812
|
+
* @throws {RequiredError}
|
|
44813
|
+
*/
|
|
44814
|
+
paymentSessionRegisterChargeMapping(registerChargeMappingDto: RegisterChargeMappingDto, options?: any): AxiosPromise<void> {
|
|
44815
|
+
return localVarFp.paymentSessionRegisterChargeMapping(registerChargeMappingDto, options).then((request) => request(axios, basePath));
|
|
44816
|
+
},
|
|
44597
44817
|
/**
|
|
44598
44818
|
* 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.
|
|
44599
44819
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -44779,7 +44999,7 @@ export interface PaymentSessionApiInterface {
|
|
|
44779
44999
|
initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateWorldlineSessionResponseDto>;
|
|
44780
45000
|
|
|
44781
45001
|
/**
|
|
44782
|
-
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
45002
|
+
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44783
45003
|
* @summary Poll a charge\'s outcome by chargeId.
|
|
44784
45004
|
* @param {string} chargeId
|
|
44785
45005
|
* @param {*} [options] Override http request option.
|
|
@@ -44788,6 +45008,16 @@ export interface PaymentSessionApiInterface {
|
|
|
44788
45008
|
*/
|
|
44789
45009
|
paymentSessionGetChargeStatus(chargeId: string, options?: AxiosRequestConfig): AxiosPromise<ChargeStatusResponseDto>;
|
|
44790
45010
|
|
|
45011
|
+
/**
|
|
45012
|
+
* Called by the paying device (e.g. a paired Munchi Pay terminal) once the Viva app-to-app session is created (sessionId known via the SDK\'s onRequiresInput callback), so the POS can fall back to polling if the Ably charge_result message never arrives.
|
|
45013
|
+
* @summary Register a POS-generated chargeId against a Viva session so its outcome can be polled.
|
|
45014
|
+
* @param {RegisterChargeMappingDto} registerChargeMappingDto
|
|
45015
|
+
* @param {*} [options] Override http request option.
|
|
45016
|
+
* @throws {RequiredError}
|
|
45017
|
+
* @memberof PaymentSessionApiInterface
|
|
45018
|
+
*/
|
|
45019
|
+
paymentSessionRegisterChargeMapping(registerChargeMappingDto: RegisterChargeMappingDto, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
45020
|
+
|
|
44791
45021
|
/**
|
|
44792
45022
|
* 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.
|
|
44793
45023
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -44987,7 +45217,7 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
44987
45217
|
}
|
|
44988
45218
|
|
|
44989
45219
|
/**
|
|
44990
|
-
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
45220
|
+
* Fallback for when the pay-terminal Ably charge_result message is lost to a flaky connection. Returns \'pending\' until the backend observes the underlying PaymentSession reach a terminal state, regardless of either device\'s connectivity.
|
|
44991
45221
|
* @summary Poll a charge\'s outcome by chargeId.
|
|
44992
45222
|
* @param {string} chargeId
|
|
44993
45223
|
* @param {*} [options] Override http request option.
|
|
@@ -44998,6 +45228,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
|
|
|
44998
45228
|
return PaymentSessionApiFp(this.configuration).paymentSessionGetChargeStatus(chargeId, options).then((request) => request(this.axios, this.basePath));
|
|
44999
45229
|
}
|
|
45000
45230
|
|
|
45231
|
+
/**
|
|
45232
|
+
* Called by the paying device (e.g. a paired Munchi Pay terminal) once the Viva app-to-app session is created (sessionId known via the SDK\'s onRequiresInput callback), so the POS can fall back to polling if the Ably charge_result message never arrives.
|
|
45233
|
+
* @summary Register a POS-generated chargeId against a Viva session so its outcome can be polled.
|
|
45234
|
+
* @param {RegisterChargeMappingDto} registerChargeMappingDto
|
|
45235
|
+
* @param {*} [options] Override http request option.
|
|
45236
|
+
* @throws {RequiredError}
|
|
45237
|
+
* @memberof PaymentSessionApi
|
|
45238
|
+
*/
|
|
45239
|
+
public paymentSessionRegisterChargeMapping(registerChargeMappingDto: RegisterChargeMappingDto, options?: AxiosRequestConfig) {
|
|
45240
|
+
return PaymentSessionApiFp(this.configuration).paymentSessionRegisterChargeMapping(registerChargeMappingDto, options).then((request) => request(this.axios, this.basePath));
|
|
45241
|
+
}
|
|
45242
|
+
|
|
45001
45243
|
/**
|
|
45002
45244
|
* 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.
|
|
45003
45245
|
* @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
|
|
@@ -51534,6 +51776,128 @@ export const VivaApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
51534
51776
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
51535
51777
|
localVarRequestOptions.data = serializeDataIfNeeded(createTerminalPaymentDto, localVarRequestOptions, configuration)
|
|
51536
51778
|
|
|
51779
|
+
return {
|
|
51780
|
+
url: toPathString(localVarUrlObj),
|
|
51781
|
+
options: localVarRequestOptions,
|
|
51782
|
+
};
|
|
51783
|
+
},
|
|
51784
|
+
/**
|
|
51785
|
+
*
|
|
51786
|
+
* @summary Get a single Viva payment session, with linked refunds
|
|
51787
|
+
* @param {string} id
|
|
51788
|
+
* @param {*} [options] Override http request option.
|
|
51789
|
+
* @throws {RequiredError}
|
|
51790
|
+
*/
|
|
51791
|
+
getVivaSession: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
51792
|
+
// verify required parameter 'id' is not null or undefined
|
|
51793
|
+
assertParamExists('getVivaSession', 'id', id)
|
|
51794
|
+
const localVarPath = `/api/v1/viva/sessions/{id}`
|
|
51795
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
51796
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51797
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51798
|
+
let baseOptions;
|
|
51799
|
+
if (configuration) {
|
|
51800
|
+
baseOptions = configuration.baseOptions;
|
|
51801
|
+
}
|
|
51802
|
+
|
|
51803
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
51804
|
+
const localVarHeaderParameter = {} as any;
|
|
51805
|
+
const localVarQueryParameter = {} as any;
|
|
51806
|
+
|
|
51807
|
+
|
|
51808
|
+
|
|
51809
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51810
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
51811
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
51812
|
+
|
|
51813
|
+
return {
|
|
51814
|
+
url: toPathString(localVarUrlObj),
|
|
51815
|
+
options: localVarRequestOptions,
|
|
51816
|
+
};
|
|
51817
|
+
},
|
|
51818
|
+
/**
|
|
51819
|
+
*
|
|
51820
|
+
* @summary List Viva payment sessions for a business
|
|
51821
|
+
* @param {number} businessId The internal business ID.
|
|
51822
|
+
* @param {number} [page] Page number
|
|
51823
|
+
* @param {number} [rowPerPage] Number of rows per page
|
|
51824
|
+
* @param {string} [terminalId] Optional terminal identifier filter (same concept as ConnectedTerminal.terminalId).
|
|
51825
|
+
* @param {*} [options] Override http request option.
|
|
51826
|
+
* @throws {RequiredError}
|
|
51827
|
+
*/
|
|
51828
|
+
listVivaSessions: async (businessId: number, page?: number, rowPerPage?: number, terminalId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
51829
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
51830
|
+
assertParamExists('listVivaSessions', 'businessId', businessId)
|
|
51831
|
+
const localVarPath = `/api/v1/viva/sessions`;
|
|
51832
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51833
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51834
|
+
let baseOptions;
|
|
51835
|
+
if (configuration) {
|
|
51836
|
+
baseOptions = configuration.baseOptions;
|
|
51837
|
+
}
|
|
51838
|
+
|
|
51839
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
51840
|
+
const localVarHeaderParameter = {} as any;
|
|
51841
|
+
const localVarQueryParameter = {} as any;
|
|
51842
|
+
|
|
51843
|
+
if (businessId !== undefined) {
|
|
51844
|
+
localVarQueryParameter['businessId'] = businessId;
|
|
51845
|
+
}
|
|
51846
|
+
|
|
51847
|
+
if (page !== undefined) {
|
|
51848
|
+
localVarQueryParameter['page'] = page;
|
|
51849
|
+
}
|
|
51850
|
+
|
|
51851
|
+
if (rowPerPage !== undefined) {
|
|
51852
|
+
localVarQueryParameter['rowPerPage'] = rowPerPage;
|
|
51853
|
+
}
|
|
51854
|
+
|
|
51855
|
+
if (terminalId !== undefined) {
|
|
51856
|
+
localVarQueryParameter['terminalId'] = terminalId;
|
|
51857
|
+
}
|
|
51858
|
+
|
|
51859
|
+
|
|
51860
|
+
|
|
51861
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51862
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
51863
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
51864
|
+
|
|
51865
|
+
return {
|
|
51866
|
+
url: toPathString(localVarUrlObj),
|
|
51867
|
+
options: localVarRequestOptions,
|
|
51868
|
+
};
|
|
51869
|
+
},
|
|
51870
|
+
/**
|
|
51871
|
+
*
|
|
51872
|
+
* @summary Refund a Viva transaction
|
|
51873
|
+
* @param {VivaA2aRefundDto} vivaA2aRefundDto
|
|
51874
|
+
* @param {*} [options] Override http request option.
|
|
51875
|
+
* @throws {RequiredError}
|
|
51876
|
+
*/
|
|
51877
|
+
refundVivaPayment: async (vivaA2aRefundDto: VivaA2aRefundDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
51878
|
+
// verify required parameter 'vivaA2aRefundDto' is not null or undefined
|
|
51879
|
+
assertParamExists('refundVivaPayment', 'vivaA2aRefundDto', vivaA2aRefundDto)
|
|
51880
|
+
const localVarPath = `/api/v1/viva/refund`;
|
|
51881
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51882
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51883
|
+
let baseOptions;
|
|
51884
|
+
if (configuration) {
|
|
51885
|
+
baseOptions = configuration.baseOptions;
|
|
51886
|
+
}
|
|
51887
|
+
|
|
51888
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
51889
|
+
const localVarHeaderParameter = {} as any;
|
|
51890
|
+
const localVarQueryParameter = {} as any;
|
|
51891
|
+
|
|
51892
|
+
|
|
51893
|
+
|
|
51894
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
51895
|
+
|
|
51896
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51897
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
51898
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
51899
|
+
localVarRequestOptions.data = serializeDataIfNeeded(vivaA2aRefundDto, localVarRequestOptions, configuration)
|
|
51900
|
+
|
|
51537
51901
|
return {
|
|
51538
51902
|
url: toPathString(localVarUrlObj),
|
|
51539
51903
|
options: localVarRequestOptions,
|
|
@@ -51560,6 +51924,42 @@ export const VivaApiFp = function(configuration?: Configuration) {
|
|
|
51560
51924
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createVivaAppToAppPayment(createTerminalPaymentDto, options);
|
|
51561
51925
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
51562
51926
|
},
|
|
51927
|
+
/**
|
|
51928
|
+
*
|
|
51929
|
+
* @summary Get a single Viva payment session, with linked refunds
|
|
51930
|
+
* @param {string} id
|
|
51931
|
+
* @param {*} [options] Override http request option.
|
|
51932
|
+
* @throws {RequiredError}
|
|
51933
|
+
*/
|
|
51934
|
+
async getVivaSession(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VivaA2aSessionDetailResponseDto>> {
|
|
51935
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getVivaSession(id, options);
|
|
51936
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
51937
|
+
},
|
|
51938
|
+
/**
|
|
51939
|
+
*
|
|
51940
|
+
* @summary List Viva payment sessions for a business
|
|
51941
|
+
* @param {number} businessId The internal business ID.
|
|
51942
|
+
* @param {number} [page] Page number
|
|
51943
|
+
* @param {number} [rowPerPage] Number of rows per page
|
|
51944
|
+
* @param {string} [terminalId] Optional terminal identifier filter (same concept as ConnectedTerminal.terminalId).
|
|
51945
|
+
* @param {*} [options] Override http request option.
|
|
51946
|
+
* @throws {RequiredError}
|
|
51947
|
+
*/
|
|
51948
|
+
async listVivaSessions(businessId: number, page?: number, rowPerPage?: number, terminalId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VivaA2aSessionListResponseDto>> {
|
|
51949
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listVivaSessions(businessId, page, rowPerPage, terminalId, options);
|
|
51950
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
51951
|
+
},
|
|
51952
|
+
/**
|
|
51953
|
+
*
|
|
51954
|
+
* @summary Refund a Viva transaction
|
|
51955
|
+
* @param {VivaA2aRefundDto} vivaA2aRefundDto
|
|
51956
|
+
* @param {*} [options] Override http request option.
|
|
51957
|
+
* @throws {RequiredError}
|
|
51958
|
+
*/
|
|
51959
|
+
async refundVivaPayment(vivaA2aRefundDto: VivaA2aRefundDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MunchiPaySessionDto>> {
|
|
51960
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.refundVivaPayment(vivaA2aRefundDto, options);
|
|
51961
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
51962
|
+
},
|
|
51563
51963
|
}
|
|
51564
51964
|
};
|
|
51565
51965
|
|
|
@@ -51580,6 +51980,39 @@ export const VivaApiFactory = function (configuration?: Configuration, basePath?
|
|
|
51580
51980
|
createVivaAppToAppPayment(createTerminalPaymentDto: CreateTerminalPaymentDto, options?: any): AxiosPromise<VivaAppToAppInitResponseDto> {
|
|
51581
51981
|
return localVarFp.createVivaAppToAppPayment(createTerminalPaymentDto, options).then((request) => request(axios, basePath));
|
|
51582
51982
|
},
|
|
51983
|
+
/**
|
|
51984
|
+
*
|
|
51985
|
+
* @summary Get a single Viva payment session, with linked refunds
|
|
51986
|
+
* @param {string} id
|
|
51987
|
+
* @param {*} [options] Override http request option.
|
|
51988
|
+
* @throws {RequiredError}
|
|
51989
|
+
*/
|
|
51990
|
+
getVivaSession(id: string, options?: any): AxiosPromise<VivaA2aSessionDetailResponseDto> {
|
|
51991
|
+
return localVarFp.getVivaSession(id, options).then((request) => request(axios, basePath));
|
|
51992
|
+
},
|
|
51993
|
+
/**
|
|
51994
|
+
*
|
|
51995
|
+
* @summary List Viva payment sessions for a business
|
|
51996
|
+
* @param {number} businessId The internal business ID.
|
|
51997
|
+
* @param {number} [page] Page number
|
|
51998
|
+
* @param {number} [rowPerPage] Number of rows per page
|
|
51999
|
+
* @param {string} [terminalId] Optional terminal identifier filter (same concept as ConnectedTerminal.terminalId).
|
|
52000
|
+
* @param {*} [options] Override http request option.
|
|
52001
|
+
* @throws {RequiredError}
|
|
52002
|
+
*/
|
|
52003
|
+
listVivaSessions(businessId: number, page?: number, rowPerPage?: number, terminalId?: string, options?: any): AxiosPromise<VivaA2aSessionListResponseDto> {
|
|
52004
|
+
return localVarFp.listVivaSessions(businessId, page, rowPerPage, terminalId, options).then((request) => request(axios, basePath));
|
|
52005
|
+
},
|
|
52006
|
+
/**
|
|
52007
|
+
*
|
|
52008
|
+
* @summary Refund a Viva transaction
|
|
52009
|
+
* @param {VivaA2aRefundDto} vivaA2aRefundDto
|
|
52010
|
+
* @param {*} [options] Override http request option.
|
|
52011
|
+
* @throws {RequiredError}
|
|
52012
|
+
*/
|
|
52013
|
+
refundVivaPayment(vivaA2aRefundDto: VivaA2aRefundDto, options?: any): AxiosPromise<MunchiPaySessionDto> {
|
|
52014
|
+
return localVarFp.refundVivaPayment(vivaA2aRefundDto, options).then((request) => request(axios, basePath));
|
|
52015
|
+
},
|
|
51583
52016
|
};
|
|
51584
52017
|
};
|
|
51585
52018
|
|
|
@@ -51599,6 +52032,39 @@ export interface VivaApiInterface {
|
|
|
51599
52032
|
*/
|
|
51600
52033
|
createVivaAppToAppPayment(createTerminalPaymentDto: CreateTerminalPaymentDto, options?: AxiosRequestConfig): AxiosPromise<VivaAppToAppInitResponseDto>;
|
|
51601
52034
|
|
|
52035
|
+
/**
|
|
52036
|
+
*
|
|
52037
|
+
* @summary Get a single Viva payment session, with linked refunds
|
|
52038
|
+
* @param {string} id
|
|
52039
|
+
* @param {*} [options] Override http request option.
|
|
52040
|
+
* @throws {RequiredError}
|
|
52041
|
+
* @memberof VivaApiInterface
|
|
52042
|
+
*/
|
|
52043
|
+
getVivaSession(id: string, options?: AxiosRequestConfig): AxiosPromise<VivaA2aSessionDetailResponseDto>;
|
|
52044
|
+
|
|
52045
|
+
/**
|
|
52046
|
+
*
|
|
52047
|
+
* @summary List Viva payment sessions for a business
|
|
52048
|
+
* @param {number} businessId The internal business ID.
|
|
52049
|
+
* @param {number} [page] Page number
|
|
52050
|
+
* @param {number} [rowPerPage] Number of rows per page
|
|
52051
|
+
* @param {string} [terminalId] Optional terminal identifier filter (same concept as ConnectedTerminal.terminalId).
|
|
52052
|
+
* @param {*} [options] Override http request option.
|
|
52053
|
+
* @throws {RequiredError}
|
|
52054
|
+
* @memberof VivaApiInterface
|
|
52055
|
+
*/
|
|
52056
|
+
listVivaSessions(businessId: number, page?: number, rowPerPage?: number, terminalId?: string, options?: AxiosRequestConfig): AxiosPromise<VivaA2aSessionListResponseDto>;
|
|
52057
|
+
|
|
52058
|
+
/**
|
|
52059
|
+
*
|
|
52060
|
+
* @summary Refund a Viva transaction
|
|
52061
|
+
* @param {VivaA2aRefundDto} vivaA2aRefundDto
|
|
52062
|
+
* @param {*} [options] Override http request option.
|
|
52063
|
+
* @throws {RequiredError}
|
|
52064
|
+
* @memberof VivaApiInterface
|
|
52065
|
+
*/
|
|
52066
|
+
refundVivaPayment(vivaA2aRefundDto: VivaA2aRefundDto, options?: AxiosRequestConfig): AxiosPromise<MunchiPaySessionDto>;
|
|
52067
|
+
|
|
51602
52068
|
}
|
|
51603
52069
|
|
|
51604
52070
|
/**
|
|
@@ -51619,6 +52085,45 @@ export class VivaApi extends BaseAPI implements VivaApiInterface {
|
|
|
51619
52085
|
public createVivaAppToAppPayment(createTerminalPaymentDto: CreateTerminalPaymentDto, options?: AxiosRequestConfig) {
|
|
51620
52086
|
return VivaApiFp(this.configuration).createVivaAppToAppPayment(createTerminalPaymentDto, options).then((request) => request(this.axios, this.basePath));
|
|
51621
52087
|
}
|
|
52088
|
+
|
|
52089
|
+
/**
|
|
52090
|
+
*
|
|
52091
|
+
* @summary Get a single Viva payment session, with linked refunds
|
|
52092
|
+
* @param {string} id
|
|
52093
|
+
* @param {*} [options] Override http request option.
|
|
52094
|
+
* @throws {RequiredError}
|
|
52095
|
+
* @memberof VivaApi
|
|
52096
|
+
*/
|
|
52097
|
+
public getVivaSession(id: string, options?: AxiosRequestConfig) {
|
|
52098
|
+
return VivaApiFp(this.configuration).getVivaSession(id, options).then((request) => request(this.axios, this.basePath));
|
|
52099
|
+
}
|
|
52100
|
+
|
|
52101
|
+
/**
|
|
52102
|
+
*
|
|
52103
|
+
* @summary List Viva payment sessions for a business
|
|
52104
|
+
* @param {number} businessId The internal business ID.
|
|
52105
|
+
* @param {number} [page] Page number
|
|
52106
|
+
* @param {number} [rowPerPage] Number of rows per page
|
|
52107
|
+
* @param {string} [terminalId] Optional terminal identifier filter (same concept as ConnectedTerminal.terminalId).
|
|
52108
|
+
* @param {*} [options] Override http request option.
|
|
52109
|
+
* @throws {RequiredError}
|
|
52110
|
+
* @memberof VivaApi
|
|
52111
|
+
*/
|
|
52112
|
+
public listVivaSessions(businessId: number, page?: number, rowPerPage?: number, terminalId?: string, options?: AxiosRequestConfig) {
|
|
52113
|
+
return VivaApiFp(this.configuration).listVivaSessions(businessId, page, rowPerPage, terminalId, options).then((request) => request(this.axios, this.basePath));
|
|
52114
|
+
}
|
|
52115
|
+
|
|
52116
|
+
/**
|
|
52117
|
+
*
|
|
52118
|
+
* @summary Refund a Viva transaction
|
|
52119
|
+
* @param {VivaA2aRefundDto} vivaA2aRefundDto
|
|
52120
|
+
* @param {*} [options] Override http request option.
|
|
52121
|
+
* @throws {RequiredError}
|
|
52122
|
+
* @memberof VivaApi
|
|
52123
|
+
*/
|
|
52124
|
+
public refundVivaPayment(vivaA2aRefundDto: VivaA2aRefundDto, options?: AxiosRequestConfig) {
|
|
52125
|
+
return VivaApiFp(this.configuration).refundVivaPayment(vivaA2aRefundDto, options).then((request) => request(this.axios, this.basePath));
|
|
52126
|
+
}
|
|
51622
52127
|
}
|
|
51623
52128
|
|
|
51624
52129
|
|
package/package.json
CHANGED
package/src/version.ts
CHANGED