@munchi_oy/core 1.9.74 → 1.9.75

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/generated/api.ts CHANGED
@@ -3668,10 +3668,10 @@ export interface CreateManualSessionDto {
3668
3668
  'tipAmount'?: number;
3669
3669
  /**
3670
3670
  *
3671
- * @type {InitiateVivaSessionDtoSplitContext}
3671
+ * @type {CreateManualSessionDtoSplitContext}
3672
3672
  * @memberof CreateManualSessionDto
3673
3673
  */
3674
- 'splitContext'?: InitiateVivaSessionDtoSplitContext;
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 {InitiateVivaSessionDtoSplitContext}
6733
+ * @type {CreateManualSessionDtoSplitContext}
6707
6734
  * @memberof InitiateNetsSessionDto
6708
6735
  */
6709
- 'splitContext'?: InitiateVivaSessionDtoSplitContext;
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 {InitiateVivaSessionDtoSplitContext}
6826
+ * @type {CreateManualSessionDtoSplitContext}
6800
6827
  * @memberof InitiateVivaA2aSessionDto
6801
6828
  */
6802
- 'splitContext'?: InitiateVivaSessionDtoSplitContext;
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 {InitiateVivaSessionDtoSplitContext}
6970
+ * @type {CreateManualSessionDtoSplitContext}
6944
6971
  * @memberof InitiateVivaSessionDto
6945
6972
  */
6946
- 'splitContext'?: InitiateVivaSessionDtoSplitContext;
6947
- }
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;
6973
+ 'splitContext'?: CreateManualSessionDtoSplitContext;
6972
6974
  }
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
@@ -14124,6 +14192,19 @@ export interface PollVivaSessionDto {
14124
14192
  */
14125
14193
  'sessionId': string;
14126
14194
  }
14195
+ /**
14196
+ *
14197
+ * @export
14198
+ * @interface PollWorldlineSessionDto
14199
+ */
14200
+ export interface PollWorldlineSessionDto {
14201
+ /**
14202
+ * The Worldline session id (= operationId) to poll.
14203
+ * @type {string}
14204
+ * @memberof PollWorldlineSessionDto
14205
+ */
14206
+ 'sessionId': string;
14207
+ }
14127
14208
  /**
14128
14209
  *
14129
14210
  * @export
@@ -25365,6 +25446,12 @@ export interface WorldlineRefundRequestDataDto {
25365
25446
  * @memberof WorldlineRefundRequestDataDto
25366
25447
  */
25367
25448
  'amounts': WorldlineRefundRequestDataDtoAmounts;
25449
+ /**
25450
+ * 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.
25451
+ * @type {string}
25452
+ * @memberof WorldlineRefundRequestDataDto
25453
+ */
25454
+ 'receiptNumber'?: string;
25368
25455
  /**
25369
25456
  * Cashier identifier
25370
25457
  * @type {string}
@@ -25421,6 +25508,65 @@ export interface WorldlineRefundRequestDataDtoAmounts {
25421
25508
  */
25422
25509
  'tip'?: number;
25423
25510
  }
25511
+ /**
25512
+ *
25513
+ * @export
25514
+ * @enum {string}
25515
+ */
25516
+
25517
+ export const WorldlineRevertMethod = {
25518
+ Reversal: 'REVERSAL',
25519
+ Refund: 'REFUND'
25520
+ } as const;
25521
+
25522
+ export type WorldlineRevertMethod = typeof WorldlineRevertMethod[keyof typeof WorldlineRevertMethod];
25523
+
25524
+
25525
+ /**
25526
+ *
25527
+ * @export
25528
+ * @interface WorldlineRevertResponseDto
25529
+ */
25530
+ export interface WorldlineRevertResponseDto {
25531
+ /**
25532
+ *
25533
+ * @type {WorldlineRevertMethod}
25534
+ * @memberof WorldlineRevertResponseDto
25535
+ */
25536
+ 'method': WorldlineRevertMethod;
25537
+ /**
25538
+ * True when the customer must tap their card to complete (REFUND); false for a REVERSAL, which settles without a tap.
25539
+ * @type {boolean}
25540
+ * @memberof WorldlineRevertResponseDto
25541
+ */
25542
+ 'requiresCardTap': boolean;
25543
+ /**
25544
+ * Opaque token to poll GET /payment-session/:clientToken for the final outcome.
25545
+ * @type {string}
25546
+ * @memberof WorldlineRevertResponseDto
25547
+ */
25548
+ 'clientToken': string;
25549
+ /**
25550
+ * Internal session id — the Worldline operationId the webhook resolves against.
25551
+ * @type {string}
25552
+ * @memberof WorldlineRevertResponseDto
25553
+ */
25554
+ 'sessionId': string;
25555
+ /**
25556
+ * Amount being reverted, in the smallest currency unit (cents).
25557
+ * @type {number}
25558
+ * @memberof WorldlineRevertResponseDto
25559
+ */
25560
+ 'amount': number;
25561
+ /**
25562
+ *
25563
+ * @type {PaymentSessionStatus}
25564
+ * @memberof WorldlineRevertResponseDto
25565
+ */
25566
+ 'status': PaymentSessionStatus;
25567
+ }
25568
+
25569
+
25424
25570
 
25425
25571
  /**
25426
25572
  * AblyApi - axios parameter creator
@@ -41063,6 +41209,47 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
41063
41209
  options: localVarRequestOptions,
41064
41210
  };
41065
41211
  },
41212
+ /**
41213
+ * 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.
41214
+ * @summary Initiate a Worldline terminal payment session
41215
+ * @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
41216
+ * @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
41217
+ * @param {*} [options] Override http request option.
41218
+ * @throws {RequiredError}
41219
+ */
41220
+ initiateWorldlineSession: async (initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41221
+ // verify required parameter 'initiateWorldlineSessionDto' is not null or undefined
41222
+ assertParamExists('initiateWorldlineSession', 'initiateWorldlineSessionDto', initiateWorldlineSessionDto)
41223
+ const localVarPath = `/api/v1/payment-session/worldline/initiate`;
41224
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41225
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41226
+ let baseOptions;
41227
+ if (configuration) {
41228
+ baseOptions = configuration.baseOptions;
41229
+ }
41230
+
41231
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
41232
+ const localVarHeaderParameter = {} as any;
41233
+ const localVarQueryParameter = {} as any;
41234
+
41235
+ if (xIdempotencyKey != null) {
41236
+ localVarHeaderParameter['X-Idempotency-Key'] = String(xIdempotencyKey);
41237
+ }
41238
+
41239
+
41240
+
41241
+ localVarHeaderParameter['Content-Type'] = 'application/json';
41242
+
41243
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
41244
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
41245
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
41246
+ localVarRequestOptions.data = serializeDataIfNeeded(initiateWorldlineSessionDto, localVarRequestOptions, configuration)
41247
+
41248
+ return {
41249
+ url: toPathString(localVarUrlObj),
41250
+ options: localVarRequestOptions,
41251
+ };
41252
+ },
41066
41253
  /**
41067
41254
  * 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
41255
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -41099,6 +41286,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
41099
41286
  options: localVarRequestOptions,
41100
41287
  };
41101
41288
  },
41289
+ /**
41290
+ * 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.
41291
+ * @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
41292
+ * @param {PollWorldlineSessionDto} pollWorldlineSessionDto
41293
+ * @param {*} [options] Override http request option.
41294
+ * @throws {RequiredError}
41295
+ */
41296
+ pollWorldlineSession: async (pollWorldlineSessionDto: PollWorldlineSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41297
+ // verify required parameter 'pollWorldlineSessionDto' is not null or undefined
41298
+ assertParamExists('pollWorldlineSession', 'pollWorldlineSessionDto', pollWorldlineSessionDto)
41299
+ const localVarPath = `/api/v1/payment-session/worldline/poll`;
41300
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41301
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41302
+ let baseOptions;
41303
+ if (configuration) {
41304
+ baseOptions = configuration.baseOptions;
41305
+ }
41306
+
41307
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
41308
+ const localVarHeaderParameter = {} as any;
41309
+ const localVarQueryParameter = {} as any;
41310
+
41311
+
41312
+
41313
+ localVarHeaderParameter['Content-Type'] = 'application/json';
41314
+
41315
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
41316
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
41317
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
41318
+ localVarRequestOptions.data = serializeDataIfNeeded(pollWorldlineSessionDto, localVarRequestOptions, configuration)
41319
+
41320
+ return {
41321
+ url: toPathString(localVarUrlObj),
41322
+ options: localVarRequestOptions,
41323
+ };
41324
+ },
41102
41325
  /**
41103
41326
  * 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
41327
  * @summary Record a manual payment session
@@ -41195,6 +41418,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
41195
41418
 
41196
41419
 
41197
41420
 
41421
+ localVarHeaderParameter['Content-Type'] = 'application/json';
41422
+
41423
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
41424
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
41425
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
41426
+ localVarRequestOptions.data = serializeDataIfNeeded(reverseSessionDto, localVarRequestOptions, configuration)
41427
+
41428
+ return {
41429
+ url: toPathString(localVarUrlObj),
41430
+ options: localVarRequestOptions,
41431
+ };
41432
+ },
41433
+ /**
41434
+ * 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.
41435
+ * @summary Refund a settled Worldline payment session (gateway only, async)
41436
+ * @param {ReverseSessionDto} reverseSessionDto
41437
+ * @param {*} [options] Override http request option.
41438
+ * @throws {RequiredError}
41439
+ */
41440
+ refundWorldlineSession: async (reverseSessionDto: ReverseSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41441
+ // verify required parameter 'reverseSessionDto' is not null or undefined
41442
+ assertParamExists('refundWorldlineSession', 'reverseSessionDto', reverseSessionDto)
41443
+ const localVarPath = `/api/v1/payment-session/worldline/refund`;
41444
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41445
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41446
+ let baseOptions;
41447
+ if (configuration) {
41448
+ baseOptions = configuration.baseOptions;
41449
+ }
41450
+
41451
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
41452
+ const localVarHeaderParameter = {} as any;
41453
+ const localVarQueryParameter = {} as any;
41454
+
41455
+
41456
+
41198
41457
  localVarHeaderParameter['Content-Type'] = 'application/json';
41199
41458
 
41200
41459
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -41267,6 +41526,42 @@ export const PaymentSessionApiAxiosParamCreator = function (configuration?: Conf
41267
41526
 
41268
41527
 
41269
41528
 
41529
+ localVarHeaderParameter['Content-Type'] = 'application/json';
41530
+
41531
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
41532
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
41533
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
41534
+ localVarRequestOptions.data = serializeDataIfNeeded(reverseSessionDto, localVarRequestOptions, configuration)
41535
+
41536
+ return {
41537
+ url: toPathString(localVarUrlObj),
41538
+ options: localVarRequestOptions,
41539
+ };
41540
+ },
41541
+ /**
41542
+ * 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.
41543
+ * @summary Revert (fully reverse) a settled Worldline payment session (async)
41544
+ * @param {ReverseSessionDto} reverseSessionDto
41545
+ * @param {*} [options] Override http request option.
41546
+ * @throws {RequiredError}
41547
+ */
41548
+ revertWorldlineSession: async (reverseSessionDto: ReverseSessionDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41549
+ // verify required parameter 'reverseSessionDto' is not null or undefined
41550
+ assertParamExists('revertWorldlineSession', 'reverseSessionDto', reverseSessionDto)
41551
+ const localVarPath = `/api/v1/payment-session/worldline/revert`;
41552
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41553
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41554
+ let baseOptions;
41555
+ if (configuration) {
41556
+ baseOptions = configuration.baseOptions;
41557
+ }
41558
+
41559
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
41560
+ const localVarHeaderParameter = {} as any;
41561
+ const localVarQueryParameter = {} as any;
41562
+
41563
+
41564
+
41270
41565
  localVarHeaderParameter['Content-Type'] = 'application/json';
41271
41566
 
41272
41567
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -41382,6 +41677,18 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
41382
41677
  const localVarAxiosArgs = await localVarAxiosParamCreator.initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options);
41383
41678
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41384
41679
  },
41680
+ /**
41681
+ * 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.
41682
+ * @summary Initiate a Worldline terminal payment session
41683
+ * @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
41684
+ * @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
41685
+ * @param {*} [options] Override http request option.
41686
+ * @throws {RequiredError}
41687
+ */
41688
+ async initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateWorldlineSessionResponseDto>> {
41689
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options);
41690
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41691
+ },
41385
41692
  /**
41386
41693
  * 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
41694
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -41393,6 +41700,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
41393
41700
  const localVarAxiosArgs = await localVarAxiosParamCreator.pollVivaSession(pollVivaSessionDto, options);
41394
41701
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41395
41702
  },
41703
+ /**
41704
+ * 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.
41705
+ * @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
41706
+ * @param {PollWorldlineSessionDto} pollWorldlineSessionDto
41707
+ * @param {*} [options] Override http request option.
41708
+ * @throws {RequiredError}
41709
+ */
41710
+ async pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
41711
+ const localVarAxiosArgs = await localVarAxiosParamCreator.pollWorldlineSession(pollWorldlineSessionDto, options);
41712
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41713
+ },
41396
41714
  /**
41397
41715
  * 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
41716
  * @summary Record a manual payment session
@@ -41426,6 +41744,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
41426
41744
  const localVarAxiosArgs = await localVarAxiosParamCreator.refundVivaSession(reverseSessionDto, options);
41427
41745
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41428
41746
  },
41747
+ /**
41748
+ * 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.
41749
+ * @summary Refund a settled Worldline payment session (gateway only, async)
41750
+ * @param {ReverseSessionDto} reverseSessionDto
41751
+ * @param {*} [options] Override http request option.
41752
+ * @throws {RequiredError}
41753
+ */
41754
+ async refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentSessionViewDto>> {
41755
+ const localVarAxiosArgs = await localVarAxiosParamCreator.refundWorldlineSession(reverseSessionDto, options);
41756
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41757
+ },
41429
41758
  /**
41430
41759
  * 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
41760
  * @summary Revert (fully reverse) a settled Nets payment session (async)
@@ -41448,6 +41777,17 @@ export const PaymentSessionApiFp = function(configuration?: Configuration) {
41448
41777
  const localVarAxiosArgs = await localVarAxiosParamCreator.revertVivaSession(reverseSessionDto, options);
41449
41778
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41450
41779
  },
41780
+ /**
41781
+ * 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.
41782
+ * @summary Revert (fully reverse) a settled Worldline payment session (async)
41783
+ * @param {ReverseSessionDto} reverseSessionDto
41784
+ * @param {*} [options] Override http request option.
41785
+ * @throws {RequiredError}
41786
+ */
41787
+ async revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorldlineRevertResponseDto>> {
41788
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revertWorldlineSession(reverseSessionDto, options);
41789
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
41790
+ },
41451
41791
  /**
41452
41792
  * 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
41793
  * @summary Void a manual payment session
@@ -41521,6 +41861,17 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
41521
41861
  initiateVivaSession(initiateVivaSessionDto: InitiateVivaSessionDto, xIdempotencyKey?: string, options?: any): AxiosPromise<InitiateVivaSessionResponseDto> {
41522
41862
  return localVarFp.initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options).then((request) => request(axios, basePath));
41523
41863
  },
41864
+ /**
41865
+ * 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.
41866
+ * @summary Initiate a Worldline terminal payment session
41867
+ * @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
41868
+ * @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
41869
+ * @param {*} [options] Override http request option.
41870
+ * @throws {RequiredError}
41871
+ */
41872
+ initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: any): AxiosPromise<InitiateWorldlineSessionResponseDto> {
41873
+ return localVarFp.initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options).then((request) => request(axios, basePath));
41874
+ },
41524
41875
  /**
41525
41876
  * 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
41877
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -41531,6 +41882,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
41531
41882
  pollVivaSession(pollVivaSessionDto: PollVivaSessionDto, options?: any): AxiosPromise<void> {
41532
41883
  return localVarFp.pollVivaSession(pollVivaSessionDto, options).then((request) => request(axios, basePath));
41533
41884
  },
41885
+ /**
41886
+ * 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.
41887
+ * @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
41888
+ * @param {PollWorldlineSessionDto} pollWorldlineSessionDto
41889
+ * @param {*} [options] Override http request option.
41890
+ * @throws {RequiredError}
41891
+ */
41892
+ pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: any): AxiosPromise<void> {
41893
+ return localVarFp.pollWorldlineSession(pollWorldlineSessionDto, options).then((request) => request(axios, basePath));
41894
+ },
41534
41895
  /**
41535
41896
  * 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
41897
  * @summary Record a manual payment session
@@ -41561,6 +41922,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
41561
41922
  refundVivaSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
41562
41923
  return localVarFp.refundVivaSession(reverseSessionDto, options).then((request) => request(axios, basePath));
41563
41924
  },
41925
+ /**
41926
+ * 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.
41927
+ * @summary Refund a settled Worldline payment session (gateway only, async)
41928
+ * @param {ReverseSessionDto} reverseSessionDto
41929
+ * @param {*} [options] Override http request option.
41930
+ * @throws {RequiredError}
41931
+ */
41932
+ refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
41933
+ return localVarFp.refundWorldlineSession(reverseSessionDto, options).then((request) => request(axios, basePath));
41934
+ },
41564
41935
  /**
41565
41936
  * 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
41937
  * @summary Revert (fully reverse) a settled Nets payment session (async)
@@ -41581,6 +41952,16 @@ export const PaymentSessionApiFactory = function (configuration?: Configuration,
41581
41952
  revertVivaSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<PaymentSessionViewDto> {
41582
41953
  return localVarFp.revertVivaSession(reverseSessionDto, options).then((request) => request(axios, basePath));
41583
41954
  },
41955
+ /**
41956
+ * 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.
41957
+ * @summary Revert (fully reverse) a settled Worldline payment session (async)
41958
+ * @param {ReverseSessionDto} reverseSessionDto
41959
+ * @param {*} [options] Override http request option.
41960
+ * @throws {RequiredError}
41961
+ */
41962
+ revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: any): AxiosPromise<WorldlineRevertResponseDto> {
41963
+ return localVarFp.revertWorldlineSession(reverseSessionDto, options).then((request) => request(axios, basePath));
41964
+ },
41584
41965
  /**
41585
41966
  * 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
41967
  * @summary Void a manual payment session
@@ -41652,6 +42033,17 @@ export interface PaymentSessionApiInterface {
41652
42033
  */
41653
42034
  initiateVivaSession(initiateVivaSessionDto: InitiateVivaSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateVivaSessionResponseDto>;
41654
42035
 
42036
+ /**
42037
+ * 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.
42038
+ * @summary Initiate a Worldline terminal payment session
42039
+ * @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
42040
+ * @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
42041
+ * @param {*} [options] Override http request option.
42042
+ * @throws {RequiredError}
42043
+ * @memberof PaymentSessionApiInterface
42044
+ */
42045
+ initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig): AxiosPromise<InitiateWorldlineSessionResponseDto>;
42046
+
41655
42047
  /**
41656
42048
  * 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
42049
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -41662,6 +42054,16 @@ export interface PaymentSessionApiInterface {
41662
42054
  */
41663
42055
  pollVivaSession(pollVivaSessionDto: PollVivaSessionDto, options?: AxiosRequestConfig): AxiosPromise<void>;
41664
42056
 
42057
+ /**
42058
+ * 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.
42059
+ * @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
42060
+ * @param {PollWorldlineSessionDto} pollWorldlineSessionDto
42061
+ * @param {*} [options] Override http request option.
42062
+ * @throws {RequiredError}
42063
+ * @memberof PaymentSessionApiInterface
42064
+ */
42065
+ pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig): AxiosPromise<void>;
42066
+
41665
42067
  /**
41666
42068
  * 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
42069
  * @summary Record a manual payment session
@@ -41692,6 +42094,16 @@ export interface PaymentSessionApiInterface {
41692
42094
  */
41693
42095
  refundVivaSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
41694
42096
 
42097
+ /**
42098
+ * 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.
42099
+ * @summary Refund a settled Worldline payment session (gateway only, async)
42100
+ * @param {ReverseSessionDto} reverseSessionDto
42101
+ * @param {*} [options] Override http request option.
42102
+ * @throws {RequiredError}
42103
+ * @memberof PaymentSessionApiInterface
42104
+ */
42105
+ refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
42106
+
41695
42107
  /**
41696
42108
  * 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
42109
  * @summary Revert (fully reverse) a settled Nets payment session (async)
@@ -41712,6 +42124,16 @@ export interface PaymentSessionApiInterface {
41712
42124
  */
41713
42125
  revertVivaSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<PaymentSessionViewDto>;
41714
42126
 
42127
+ /**
42128
+ * 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.
42129
+ * @summary Revert (fully reverse) a settled Worldline payment session (async)
42130
+ * @param {ReverseSessionDto} reverseSessionDto
42131
+ * @param {*} [options] Override http request option.
42132
+ * @throws {RequiredError}
42133
+ * @memberof PaymentSessionApiInterface
42134
+ */
42135
+ revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig): AxiosPromise<WorldlineRevertResponseDto>;
42136
+
41715
42137
  /**
41716
42138
  * 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
42139
  * @summary Void a manual payment session
@@ -41793,6 +42215,19 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
41793
42215
  return PaymentSessionApiFp(this.configuration).initiateVivaSession(initiateVivaSessionDto, xIdempotencyKey, options).then((request) => request(this.axios, this.basePath));
41794
42216
  }
41795
42217
 
42218
+ /**
42219
+ * 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.
42220
+ * @summary Initiate a Worldline terminal payment session
42221
+ * @param {InitiateWorldlineSessionDto} initiateWorldlineSessionDto
42222
+ * @param {string} [xIdempotencyKey] Client-generated UUID. If a session already exists for this key, the existing session is returned.
42223
+ * @param {*} [options] Override http request option.
42224
+ * @throws {RequiredError}
42225
+ * @memberof PaymentSessionApi
42226
+ */
42227
+ public initiateWorldlineSession(initiateWorldlineSessionDto: InitiateWorldlineSessionDto, xIdempotencyKey?: string, options?: AxiosRequestConfig) {
42228
+ return PaymentSessionApiFp(this.configuration).initiateWorldlineSession(initiateWorldlineSessionDto, xIdempotencyKey, options).then((request) => request(this.axios, this.basePath));
42229
+ }
42230
+
41796
42231
  /**
41797
42232
  * 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
42233
  * @summary Internal: long-poll Viva for a stuck payment session (Cloud Task callback)
@@ -41805,6 +42240,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
41805
42240
  return PaymentSessionApiFp(this.configuration).pollVivaSession(pollVivaSessionDto, options).then((request) => request(this.axios, this.basePath));
41806
42241
  }
41807
42242
 
42243
+ /**
42244
+ * 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.
42245
+ * @summary Internal: poll Worldline for a stuck payment session (Cloud Task callback)
42246
+ * @param {PollWorldlineSessionDto} pollWorldlineSessionDto
42247
+ * @param {*} [options] Override http request option.
42248
+ * @throws {RequiredError}
42249
+ * @memberof PaymentSessionApi
42250
+ */
42251
+ public pollWorldlineSession(pollWorldlineSessionDto: PollWorldlineSessionDto, options?: AxiosRequestConfig) {
42252
+ return PaymentSessionApiFp(this.configuration).pollWorldlineSession(pollWorldlineSessionDto, options).then((request) => request(this.axios, this.basePath));
42253
+ }
42254
+
41808
42255
  /**
41809
42256
  * 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
42257
  * @summary Record a manual payment session
@@ -41841,6 +42288,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
41841
42288
  return PaymentSessionApiFp(this.configuration).refundVivaSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
41842
42289
  }
41843
42290
 
42291
+ /**
42292
+ * 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.
42293
+ * @summary Refund a settled Worldline payment session (gateway only, async)
42294
+ * @param {ReverseSessionDto} reverseSessionDto
42295
+ * @param {*} [options] Override http request option.
42296
+ * @throws {RequiredError}
42297
+ * @memberof PaymentSessionApi
42298
+ */
42299
+ public refundWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig) {
42300
+ return PaymentSessionApiFp(this.configuration).refundWorldlineSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
42301
+ }
42302
+
41844
42303
  /**
41845
42304
  * 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
42305
  * @summary Revert (fully reverse) a settled Nets payment session (async)
@@ -41865,6 +42324,18 @@ export class PaymentSessionApi extends BaseAPI implements PaymentSessionApiInter
41865
42324
  return PaymentSessionApiFp(this.configuration).revertVivaSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
41866
42325
  }
41867
42326
 
42327
+ /**
42328
+ * 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.
42329
+ * @summary Revert (fully reverse) a settled Worldline payment session (async)
42330
+ * @param {ReverseSessionDto} reverseSessionDto
42331
+ * @param {*} [options] Override http request option.
42332
+ * @throws {RequiredError}
42333
+ * @memberof PaymentSessionApi
42334
+ */
42335
+ public revertWorldlineSession(reverseSessionDto: ReverseSessionDto, options?: AxiosRequestConfig) {
42336
+ return PaymentSessionApiFp(this.configuration).revertWorldlineSession(reverseSessionDto, options).then((request) => request(this.axios, this.basePath));
42337
+ }
42338
+
41868
42339
  /**
41869
42340
  * 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
42341
  * @summary Void a manual payment session
@@ -47337,6 +47808,36 @@ export const WebhookApiAxiosParamCreator = function (configuration?: Configurati
47337
47808
 
47338
47809
 
47339
47810
 
47811
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
47812
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
47813
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
47814
+
47815
+ return {
47816
+ url: toPathString(localVarUrlObj),
47817
+ options: localVarRequestOptions,
47818
+ };
47819
+ },
47820
+ /**
47821
+ * 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.
47822
+ * @summary Handle Worldline webhook events for the payment-session flow
47823
+ * @param {*} [options] Override http request option.
47824
+ * @throws {RequiredError}
47825
+ */
47826
+ handleWorldlineSessionEvents: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
47827
+ const localVarPath = `/api/webhook/worldline/payments`;
47828
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47829
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47830
+ let baseOptions;
47831
+ if (configuration) {
47832
+ baseOptions = configuration.baseOptions;
47833
+ }
47834
+
47835
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
47836
+ const localVarHeaderParameter = {} as any;
47837
+ const localVarQueryParameter = {} as any;
47838
+
47839
+
47840
+
47340
47841
  setSearchParams(localVarUrlObj, localVarQueryParameter);
47341
47842
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
47342
47843
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -47634,6 +48135,16 @@ export const WebhookApiFp = function(configuration?: Configuration) {
47634
48135
  const localVarAxiosArgs = await localVarAxiosParamCreator.handleWorldlineEvents(options);
47635
48136
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
47636
48137
  },
48138
+ /**
48139
+ * 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.
48140
+ * @summary Handle Worldline webhook events for the payment-session flow
48141
+ * @param {*} [options] Override http request option.
48142
+ * @throws {RequiredError}
48143
+ */
48144
+ async handleWorldlineSessionEvents(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
48145
+ const localVarAxiosArgs = await localVarAxiosParamCreator.handleWorldlineSessionEvents(options);
48146
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
48147
+ },
47637
48148
  /**
47638
48149
  *
47639
48150
  * @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
@@ -47821,6 +48332,15 @@ export const WebhookApiFactory = function (configuration?: Configuration, basePa
47821
48332
  handleWorldlineEvents(options?: any): AxiosPromise<void> {
47822
48333
  return localVarFp.handleWorldlineEvents(options).then((request) => request(axios, basePath));
47823
48334
  },
48335
+ /**
48336
+ * 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.
48337
+ * @summary Handle Worldline webhook events for the payment-session flow
48338
+ * @param {*} [options] Override http request option.
48339
+ * @throws {RequiredError}
48340
+ */
48341
+ handleWorldlineSessionEvents(options?: any): AxiosPromise<void> {
48342
+ return localVarFp.handleWorldlineSessionEvents(options).then((request) => request(axios, basePath));
48343
+ },
47824
48344
  /**
47825
48345
  *
47826
48346
  * @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
@@ -48003,6 +48523,15 @@ export interface WebhookApiInterface {
48003
48523
  */
48004
48524
  handleWorldlineEvents(options?: AxiosRequestConfig): AxiosPromise<void>;
48005
48525
 
48526
+ /**
48527
+ * 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.
48528
+ * @summary Handle Worldline webhook events for the payment-session flow
48529
+ * @param {*} [options] Override http request option.
48530
+ * @throws {RequiredError}
48531
+ * @memberof WebhookApiInterface
48532
+ */
48533
+ handleWorldlineSessionEvents(options?: AxiosRequestConfig): AxiosPromise<void>;
48534
+
48006
48535
  /**
48007
48536
  *
48008
48537
  * @summary Process a queued POS order-actions job (triggered by Cloud Tasks)
@@ -48217,6 +48746,17 @@ export class WebhookApi extends BaseAPI implements WebhookApiInterface {
48217
48746
  return WebhookApiFp(this.configuration).handleWorldlineEvents(options).then((request) => request(this.axios, this.basePath));
48218
48747
  }
48219
48748
 
48749
+ /**
48750
+ * 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.
48751
+ * @summary Handle Worldline webhook events for the payment-session flow
48752
+ * @param {*} [options] Override http request option.
48753
+ * @throws {RequiredError}
48754
+ * @memberof WebhookApi
48755
+ */
48756
+ public handleWorldlineSessionEvents(options?: AxiosRequestConfig) {
48757
+ return WebhookApiFp(this.configuration).handleWorldlineSessionEvents(options).then((request) => request(this.axios, this.basePath));
48758
+ }
48759
+
48220
48760
  /**
48221
48761
  *
48222
48762
  * @summary Process a queued POS order-actions job (triggered by Cloud Tasks)