@paydock/client-sdk 1.123.2 → 1.124.1

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.
@@ -958,7 +958,7 @@
958
958
  version: 'x-sdk-version',
959
959
  type: 'x-sdk-type'
960
960
  });
961
- SDK._version = 'v1.123.2';
961
+ SDK._version = 'v1.124.1';
962
962
 
963
963
  /******************************************************************************
964
964
  Copyright (c) Microsoft Corporation.
@@ -4239,11 +4239,11 @@
4239
4239
  var gateway = 'bam.nr-data.net';
4240
4240
  var params = {
4241
4241
  enabled: 'true',
4242
- accountId: '974691',
4243
- agentId: '1386157152',
4244
- applicationId: '1386157152',
4245
- licenseKey: '4848a32285',
4246
- trustKey: '974691'
4242
+ accountId: '',
4243
+ agentId: '',
4244
+ applicationId: '',
4245
+ licenseKey: '',
4246
+ trustKey: ''
4247
4247
  };
4248
4248
  var disabled = function disabled() {
4249
4249
  return {
@@ -13205,10 +13205,13 @@
13205
13205
  var _a, _b, _c;
13206
13206
  if (((_a = this.meta) === null || _a === void 0 ? void 0 : _a.style) && _typeof$1((_b = this.meta) === null || _b === void 0 ? void 0 : _b.style) === 'object') {
13207
13207
  var metaStyles = JSON.parse(JSON.stringify((_c = this.meta) === null || _c === void 0 ? void 0 : _c.style));
13208
- if ('google' in metaStyles)
13208
+ if ('google' in metaStyles) {
13209
13209
  // biome-ignore lint/performance/noDelete: <explanation>
13210
13210
  metaStyles === null || metaStyles === void 0 ? true : delete metaStyles.google; // to offer backward compatibility
13211
- if ('apple' in metaStyles) return metaStyles === null || metaStyles === void 0 ? void 0 : metaStyles.apple;
13211
+ }
13212
+ if ('apple' in metaStyles) {
13213
+ return metaStyles === null || metaStyles === void 0 ? void 0 : metaStyles.apple;
13214
+ }
13212
13215
  return metaStyles; // to offer backward compatibility
13213
13216
  }
13214
13217
  return null;
@@ -13219,10 +13222,13 @@
13219
13222
  var _a, _b, _c, _d;
13220
13223
  if (((_a = this.meta) === null || _a === void 0 ? void 0 : _a.raw_data_initialization) && ((_b = this.meta) === null || _b === void 0 ? void 0 : _b.raw_data_initialization) && _typeof$1((_c = this.meta) === null || _c === void 0 ? void 0 : _c.raw_data_initialization) === 'object') {
13221
13224
  var metaRawDataInit = JSON.parse(JSON.stringify((_d = this.meta) === null || _d === void 0 ? void 0 : _d.raw_data_initialization));
13222
- if ('google' in metaRawDataInit)
13225
+ if ('google' in metaRawDataInit) {
13223
13226
  // biome-ignore lint/performance/noDelete: <explanation>
13224
13227
  metaRawDataInit === null || metaRawDataInit === void 0 ? true : delete metaRawDataInit.google; // to offer backward compatibility
13225
- if ('apple' in metaRawDataInit) return metaRawDataInit === null || metaRawDataInit === void 0 ? void 0 : metaRawDataInit.apple;
13228
+ }
13229
+ if ('apple' in metaRawDataInit) {
13230
+ return metaRawDataInit === null || metaRawDataInit === void 0 ? void 0 : metaRawDataInit.apple;
13231
+ }
13226
13232
  return metaRawDataInit; // to offer backward compatibility
13227
13233
  }
13228
13234
  return null;
@@ -13250,28 +13256,16 @@
13250
13256
  });
13251
13257
  return;
13252
13258
  }
13259
+ if (customElements === null || customElements === void 0 ? void 0 : customElements.get('apple-pay-button')) {
13260
+ this.onScriptLoaded(container);
13261
+ return;
13262
+ }
13253
13263
  var applePayScript = document.createElement('script');
13254
13264
  applePayScript.src = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
13255
13265
  applePayScript.type = "text/javascript";
13256
13266
  applePayScript.crossOrigin = 'anonymous';
13257
13267
  applePayScript.onload = function () {
13258
- _this2.checkAvailability().then(function (available) {
13259
- var _a;
13260
- if (!available) {
13261
- _this2.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
13262
- wallet: WALLET_TYPE.APPLE
13263
- });
13264
- return;
13265
- }
13266
- // Store default shipping option
13267
- if (_this2.isShippingRequired() && _this2.hasShippingOptions()) {
13268
- _this2.selectedShippingOption = (_a = _this2.meta) === null || _a === void 0 ? void 0 : _a.shipping_options[0];
13269
- _this2.latestShippingData.shippingMethod = _this2.formatShippingOptions([_this2.selectedShippingOption])[0];
13270
- }
13271
- _this2.mount(container);
13272
- })["catch"](function (err) {
13273
- return console.error("Error checking ApplePay availability", err);
13274
- });
13268
+ _this2.onScriptLoaded(container);
13275
13269
  };
13276
13270
  applePayScript.onerror = function (err) {
13277
13271
  console.error("AppleWalletService: Error loading ApplePay script", err);
@@ -13282,15 +13276,43 @@
13282
13276
  };
13283
13277
  document.head.appendChild(applePayScript);
13284
13278
  }
13279
+ }, {
13280
+ key: "onScriptLoaded",
13281
+ value: function onScriptLoaded(container) {
13282
+ var _this3 = this;
13283
+ this.checkAvailability().then(function (available) {
13284
+ var _a;
13285
+ if (!available) {
13286
+ _this3.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
13287
+ wallet: WALLET_TYPE.APPLE
13288
+ });
13289
+ return;
13290
+ }
13291
+ // Store default shipping option
13292
+ if (_this3.isShippingRequired() && _this3.hasShippingOptions()) {
13293
+ _this3.selectedShippingOption = (_a = _this3.meta) === null || _a === void 0 ? void 0 : _a.shipping_options[0];
13294
+ _this3.latestShippingData.shippingMethod = _this3.formatShippingOptions([_this3.selectedShippingOption])[0];
13295
+ }
13296
+ _this3.mount(container);
13297
+ })["catch"](function (err) {
13298
+ return console.error("Error checking ApplePay availability", err);
13299
+ });
13300
+ }
13285
13301
  }, {
13286
13302
  key: "update",
13287
13303
  value: function update(data) {
13288
13304
  var _a, _b, _c;
13289
- if (!this.latestShippingChangePromiseResolve || !this.latestShippingChangePromiseReject) return;
13290
- if (!data.success || !data.body) return this.latestShippingChangePromiseReject();
13305
+ if (!this.latestShippingChangePromiseResolve || !this.latestShippingChangePromiseReject) {
13306
+ return;
13307
+ }
13308
+ if (!data.success || !data.body) {
13309
+ return this.latestShippingChangePromiseReject();
13310
+ }
13291
13311
  var newAmount = (_a = data === null || data === void 0 ? void 0 : data.body) === null || _a === void 0 ? void 0 : _a.amount;
13292
13312
  var newShippingOptions = (_b = data === null || data === void 0 ? void 0 : data.body) === null || _b === void 0 ? void 0 : _b.shipping_options;
13293
- if (newAmount) this.meta.amount = newAmount;
13313
+ if (newAmount) {
13314
+ this.meta.amount = newAmount;
13315
+ }
13294
13316
  if (newShippingOptions) {
13295
13317
  this.meta.shipping_options = newShippingOptions;
13296
13318
  this.selectedShippingOption = newShippingOptions ? newShippingOptions[0] : undefined;
@@ -13310,17 +13332,17 @@
13310
13332
  }, {
13311
13333
  key: "checkAvailability",
13312
13334
  value: function checkAvailability() {
13313
- var _this3 = this;
13335
+ var _this4 = this;
13314
13336
  return new Promise(function (resolve, _reject) {
13315
13337
  var _a;
13316
13338
  if (!window.ApplePaySession || !ApplePaySession) {
13317
13339
  resolve(false);
13318
13340
  }
13319
13341
  var formattedCapabilities = DEFAULT_APPLE_PAY_CAPABILITIES$1;
13320
- if (((_a = _this3.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
13321
- formattedCapabilities = _this3.formatCapabilities(_this3.meta.apple_pay_capabilities);
13342
+ if (((_a = _this4.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
13343
+ formattedCapabilities = _this4.formatCapabilities(_this4.meta.apple_pay_capabilities);
13322
13344
  }
13323
- ApplePaySession.applePayCapabilities(_this3.getMerchantId()).then(function (capabilities) {
13345
+ ApplePaySession.applePayCapabilities(_this4.getMerchantId()).then(function (capabilities) {
13324
13346
  var canMakePayment = formattedCapabilities.includes(capabilities === null || capabilities === void 0 ? void 0 : capabilities.paymentCredentialStatus);
13325
13347
  resolve(canMakePayment);
13326
13348
  })["catch"](function (_err) {
@@ -13368,11 +13390,17 @@
13368
13390
  var _a;
13369
13391
  var rawDataInitialization = this.getMetaRawDataInitialization();
13370
13392
  if (rawDataInitialization && _typeof$1(rawDataInitialization) === 'object') {
13371
- if (_typeof$1(rawDataInitialization.total) === 'object') rawDataInitialization.total.amount = this.meta.amount.toString();else rawDataInitialization.total = {
13372
- label: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.amount_label) || '',
13373
- amount: this.meta.amount.toString()
13374
- };
13375
- if (this.isShippingRequired() && this.hasShippingOptions()) rawDataInitialization.shippingMethods = this.formatShippingOptions(this.meta.shipping_options);
13393
+ if (_typeof$1(rawDataInitialization.total) === 'object') {
13394
+ rawDataInitialization.total.amount = this.meta.amount.toString();
13395
+ } else {
13396
+ rawDataInitialization.total = {
13397
+ label: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.amount_label) || '',
13398
+ amount: this.meta.amount.toString()
13399
+ };
13400
+ }
13401
+ if (this.isShippingRequired() && this.hasShippingOptions()) {
13402
+ rawDataInitialization.shippingMethods = this.formatShippingOptions(this.meta.shipping_options);
13403
+ }
13376
13404
  }
13377
13405
  return rawDataInitialization || _extends(_extends(_extends({
13378
13406
  countryCode: this.meta.country.toUpperCase(),
@@ -13396,22 +13424,22 @@
13396
13424
  }, {
13397
13425
  key: "getMerchantSession",
13398
13426
  value: function getMerchantSession() {
13399
- var _this4 = this;
13427
+ var _this5 = this;
13400
13428
  return new Promise(function (resolve, reject) {
13401
- return _this4.eventEmitter.emit(WALLET_EVENT.CALLBACK, {
13429
+ return _this5.eventEmitter.emit(WALLET_EVENT.CALLBACK, {
13402
13430
  data: _extends({
13403
13431
  request_type: "CREATE_SESSION",
13404
13432
  wallet_type: WALLET_TYPE.APPLE,
13405
13433
  session_id: window.location.hostname
13406
- }, _this4.isShippingRequired() && {
13407
- request_shipping: _this4.meta.request_shipping
13434
+ }, _this5.isShippingRequired() && {
13435
+ request_shipping: _this5.meta.request_shipping
13408
13436
  }),
13409
13437
  onSuccess: function onSuccess(res) {
13410
13438
  return resolve(res);
13411
13439
  },
13412
13440
  onError: function onError(message) {
13413
13441
  console.error('Error generating order id', message);
13414
- _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_ERROR, {
13442
+ _this5.eventEmitter.emit(WALLET_EVENT.PAYMENT_ERROR, {
13415
13443
  message: message
13416
13444
  });
13417
13445
  reject(message);
@@ -13422,10 +13450,10 @@
13422
13450
  }, {
13423
13451
  key: "handleMerchantOnButtonClickEvent",
13424
13452
  value: function handleMerchantOnButtonClickEvent() {
13425
- var _this5 = this;
13453
+ var _this6 = this;
13426
13454
  return new Promise(function (resolve, reject) {
13427
13455
  var merchantResult;
13428
- _this5.eventEmitter.emit(WALLET_EVENT.BUTTON_CLICK, {
13456
+ _this6.eventEmitter.emit(WALLET_EVENT.BUTTON_CLICK, {
13429
13457
  attachResult: function attachResult(value) {
13430
13458
  merchantResult = value;
13431
13459
  }
@@ -18607,7 +18635,8 @@
18607
18635
  this.checkoutApi.callback({
18608
18636
  event: 'callback.generic.ready',
18609
18637
  payload: {
18610
- platform: 'web'
18638
+ platform: 'web',
18639
+ sdk_version: this.api.ctx.sdkVersion
18611
18640
  }
18612
18641
  }).then(function () {
18613
18642
  return Spinner.hide();
@@ -19293,17 +19322,13 @@
19293
19322
  _classCallCheck(this, ApplePayWalletButtonExpress);
19294
19323
  _this = _callSuper(this, ApplePayWalletButtonExpress, [selector, publicKeyOrAccessToken, gatewayId, meta, ['amount_label', 'country']]);
19295
19324
  _this.onApplePayButtonClicked = function () {
19296
- return _this.handleMerchantOnExpressButtonClickEvent().then(function () {
19297
- _this.paymentSession = new ApplePaySession(14, _this.createRequest());
19298
- _this.paymentSession.onvalidatemerchant = _this.onValidateMerchant;
19299
- _this.paymentSession.onpaymentauthorized = _this.onPaymentAuthorized;
19300
- _this.paymentSession.oncancel = _this.onCancelPayment;
19301
- _this.paymentSession.onshippingmethodselected = _this.onApplePayShippingMethodUpdate;
19302
- _this.paymentSession.onshippingcontactselected = _this.onApplePayShippingContactUpdate;
19303
- _this.paymentSession.begin();
19304
- })["catch"](function () {
19305
- _this.handleCheckoutClose();
19306
- });
19325
+ _this.paymentSession = new ApplePaySession(14, _this.createRequest());
19326
+ _this.paymentSession.onvalidatemerchant = _this.onValidateMerchant;
19327
+ _this.paymentSession.onpaymentauthorized = _this.onPaymentAuthorized;
19328
+ _this.paymentSession.oncancel = _this.onCancelPayment;
19329
+ _this.paymentSession.onshippingmethodselected = _this.onApplePayShippingMethodUpdate;
19330
+ _this.paymentSession.onshippingcontactselected = _this.onApplePayShippingContactUpdate;
19331
+ _this.paymentSession.begin();
19307
19332
  };
19308
19333
  _this.onValidateMerchant = function (event) {
19309
19334
  _this.handleMerchantOnExpressButtonClickEvent().then(function () {
@@ -19429,22 +19454,18 @@
19429
19454
  key: "load",
19430
19455
  value: function load() {
19431
19456
  var _this4 = this;
19432
- if (!window.Promise) return this.handleOnUnavailable();
19457
+ if (!window.Promise) {
19458
+ return this.handleOnUnavailable();
19459
+ }
19460
+ if (customElements === null || customElements === void 0 ? void 0 : customElements.get('apple-pay-button')) {
19461
+ return this.onScriptLoaded();
19462
+ }
19433
19463
  var applePayScript = document.createElement('script');
19434
19464
  applePayScript.src = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
19435
19465
  applePayScript.type = "text/javascript";
19436
19466
  applePayScript.crossOrigin = 'anonymous';
19437
19467
  applePayScript.onload = function () {
19438
- _this4.getGatewayWalletConfig().then(function (config) {
19439
- if (!config || config.type !== 'MasterCard' || !config.credentials || !config.credentials.apple || !config.credentials.apple.merchant) throw new Error('Invalid configuration');
19440
- return _this4.checkAvailability(config);
19441
- }).then(function (available) {
19442
- if (!available) return _this4.handleOnUnavailable();
19443
- return _this4.mount();
19444
- })["catch"](function (err) {
19445
- if (err) _this4.handleOnError(err);
19446
- _this4.handleOnUnavailable();
19447
- });
19468
+ _this4.onScriptLoaded();
19448
19469
  };
19449
19470
  applePayScript.onerror = function (err) {
19450
19471
  console.error("ApplePayWalletButtonExpress: Error loading ApplePay script", err);
@@ -19453,6 +19474,27 @@
19453
19474
  };
19454
19475
  document.head.appendChild(applePayScript);
19455
19476
  }
19477
+ }, {
19478
+ key: "onScriptLoaded",
19479
+ value: function onScriptLoaded() {
19480
+ var _this5 = this;
19481
+ this.getGatewayWalletConfig().then(function (config) {
19482
+ if (!config || config.type !== 'MasterCard' || !config.credentials || !config.credentials.apple || !config.credentials.apple.merchant) {
19483
+ throw new Error('Invalid configuration');
19484
+ }
19485
+ return _this5.checkAvailability(config);
19486
+ }).then(function (available) {
19487
+ if (!available) {
19488
+ return _this5.handleOnUnavailable();
19489
+ }
19490
+ return _this5.mount();
19491
+ })["catch"](function (err) {
19492
+ if (err) {
19493
+ _this5.handleOnError(err);
19494
+ }
19495
+ _this5.handleOnUnavailable();
19496
+ });
19497
+ }
19456
19498
  /**
19457
19499
  * Call this method if updating the originally-provided meta object after order information changed.
19458
19500
  * For example, if the order amount has changed from the time where the button was originally rendered.
@@ -19470,15 +19512,15 @@
19470
19512
  }, {
19471
19513
  key: "checkAvailability",
19472
19514
  value: function checkAvailability(config) {
19473
- var _this5 = this;
19515
+ var _this6 = this;
19474
19516
  return new Promise(function (resolve, _reject) {
19475
19517
  var _a;
19476
19518
  if (!window.ApplePaySession || !ApplePaySession) {
19477
19519
  resolve(false);
19478
19520
  }
19479
19521
  var formattedCapabilities = DEFAULT_APPLE_PAY_CAPABILITIES;
19480
- if (((_a = _this5.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
19481
- formattedCapabilities = _this5.formatCapabilities(_this5.meta.apple_pay_capabilities);
19522
+ if (((_a = _this6.meta.apple_pay_capabilities) === null || _a === void 0 ? void 0 : _a.length) > 0) {
19523
+ formattedCapabilities = _this6.formatCapabilities(_this6.meta.apple_pay_capabilities);
19482
19524
  }
19483
19525
  ApplePaySession.applePayCapabilities(config.credentials[WALLET_TYPE.APPLE].merchant).then(function (capabilities) {
19484
19526
  var canMakePayment = formattedCapabilities.includes(capabilities === null || capabilities === void 0 ? void 0 : capabilities.paymentCredentialStatus);
@@ -20413,6 +20455,8 @@
20413
20455
  }]);
20414
20456
  }();
20415
20457
 
20458
+ window.postMessage("PAYDOCK_PAYMENTS_WIDGET_LOADED");
20459
+
20416
20460
  class Timer {
20417
20461
  constructor(opts, ms) {
20418
20462
  if (!opts.onEnd) throw new Error('onEnd handler is required');
@@ -153,7 +153,7 @@ declare class ApiBase {
153
153
  reportEvent: ReportEventFn;
154
154
  reportError: ReportErrorFn;
155
155
  protected newApiRequest(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): XMLHttpRequest;
156
- protected get ctx(): {
156
+ get ctx(): {
157
157
  sdkVersion: string;
158
158
  className: string;
159
159
  environment: string;
@@ -4269,6 +4269,7 @@ declare class ApplePayWalletButtonExpress extends BaseWalletButton<ApplePayWalle
4269
4269
  * button.load();
4270
4270
  */
4271
4271
  load(): void;
4272
+ private onScriptLoaded;
4272
4273
  /**
4273
4274
  * Call this method if updating the originally-provided meta object after order information changed.
4274
4275
  * For example, if the order amount has changed from the time where the button was originally rendered.
@@ -4751,4 +4752,27 @@ declare class PayPalSavePaymentSourceWidget {
4751
4752
  onCancel(callback?: (data?: IOnCancelEventData) => void): () => void;
4752
4753
  }
4753
4754
 
4755
+ declare global {
4756
+ interface Window {
4757
+ paydock: {
4758
+ WalletButtons: typeof WalletButtons;
4759
+ PaypalCheckoutButton: typeof PaypalCheckoutButton;
4760
+ AfterpayCheckoutButton: typeof AfterpayCheckoutButton;
4761
+ ZipmoneyCheckoutButton: typeof ZipmoneyCheckoutButton;
4762
+ PaymentSourceWidget: typeof PaymentSourceWidget;
4763
+ VaultDisplayWidget: typeof VaultDisplayWidget;
4764
+ ClickToPay: typeof ClickToPay;
4765
+ ExternalCheckoutBuilder: typeof Builder$1;
4766
+ ExternalCheckoutChecker: typeof Checker;
4767
+ PaymentSourceBuilder: typeof Builder;
4768
+ Canvas3DS: typeof Canvas3ds;
4769
+ MultiWidget: typeof MultiWidget;
4770
+ HtmlMultiWidget: typeof HtmlMultiWidget;
4771
+ HtmlWidget: typeof HtmlWidget;
4772
+ PayPalDataCollector: typeof PayPalDataCollector;
4773
+ PayPalSavePaymentSource: typeof PayPalSavePaymentSourceWidget;
4774
+ };
4775
+ }
4776
+ }
4777
+
4754
4778
  export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, FRAUD_PREVENTION_EVENTS, type FraudPreventionEvent, type FraudPreventionEventType, type FraudPreventionProvider, FraudPreventionService, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IClickToPayMeta, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IEventData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, type IWalletMeta, type IWalletOnClickEvent, type IWalletPaymentSuccessfulEvent, type IWalletUnavailableEvent, type IWalletUpdateData, type IWalletUpdateEvent, InstructionDebugger, MultiWidget, PAYMENT_TYPE, PURPOSE, PayPalDataCollector, PayPalSavePaymentSourceWidget, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };
@@ -153,7 +153,7 @@ declare class ApiBase {
153
153
  reportEvent: ReportEventFn;
154
154
  reportError: ReportErrorFn;
155
155
  protected newApiRequest(method: Extract<HttpRequestMethod, 'GET' | 'POST'>, link: string): XMLHttpRequest;
156
- protected get ctx(): {
156
+ get ctx(): {
157
157
  sdkVersion: string;
158
158
  className: string;
159
159
  environment: string;
@@ -4269,6 +4269,7 @@ declare class ApplePayWalletButtonExpress extends BaseWalletButton<ApplePayWalle
4269
4269
  * button.load();
4270
4270
  */
4271
4271
  load(): void;
4272
+ private onScriptLoaded;
4272
4273
  /**
4273
4274
  * Call this method if updating the originally-provided meta object after order information changed.
4274
4275
  * For example, if the order amount has changed from the time where the button was originally rendered.
@@ -4751,4 +4752,27 @@ declare class PayPalSavePaymentSourceWidget {
4751
4752
  onCancel(callback?: (data?: IOnCancelEventData) => void): () => void;
4752
4753
  }
4753
4754
 
4755
+ declare global {
4756
+ interface Window {
4757
+ paydock: {
4758
+ WalletButtons: typeof WalletButtons;
4759
+ PaypalCheckoutButton: typeof PaypalCheckoutButton;
4760
+ AfterpayCheckoutButton: typeof AfterpayCheckoutButton;
4761
+ ZipmoneyCheckoutButton: typeof ZipmoneyCheckoutButton;
4762
+ PaymentSourceWidget: typeof PaymentSourceWidget;
4763
+ VaultDisplayWidget: typeof VaultDisplayWidget;
4764
+ ClickToPay: typeof ClickToPay;
4765
+ ExternalCheckoutBuilder: typeof Builder$1;
4766
+ ExternalCheckoutChecker: typeof Checker;
4767
+ PaymentSourceBuilder: typeof Builder;
4768
+ Canvas3DS: typeof Canvas3ds;
4769
+ MultiWidget: typeof MultiWidget;
4770
+ HtmlMultiWidget: typeof HtmlMultiWidget;
4771
+ HtmlWidget: typeof HtmlWidget;
4772
+ PayPalDataCollector: typeof PayPalDataCollector;
4773
+ PayPalSavePaymentSource: typeof PayPalSavePaymentSourceWidget;
4774
+ };
4775
+ }
4776
+ }
4777
+
4754
4778
  export { AfterpayCheckoutButton, Api, ApplePayWalletButtonExpress, CHECKOUT_BUTTON_EVENT, Canvas3ds, Checkout, ClickToPay, Configuration, ELEMENT, EVENT$1 as EVENT, Builder$1 as ExternalCheckoutBuilder, Checker as ExternalCheckoutChecker, FORM_FIELD, FRAUD_PREVENTION_EVENTS, type FraudPreventionEvent, type FraudPreventionEventType, type FraudPreventionProvider, FraudPreventionService, HtmlMultiWidget, HtmlPaymentSourceWidget, HtmlWidget, type ICheckout, type IClickToPayMeta, type IDetails, type IElementStyleInput, type IEventCheckoutFinishData, type IEventData, type IPayPalMeta, type IStyles$1 as IStyles, type ITexts, type IWalletMeta, type IWalletOnClickEvent, type IWalletPaymentSuccessfulEvent, type IWalletUnavailableEvent, type IWalletUpdateData, type IWalletUpdateEvent, InstructionDebugger, MultiWidget, PAYMENT_TYPE, PURPOSE, PayPalDataCollector, PayPalSavePaymentSourceWidget, Builder as PaymentSourceBuilder, PaymentSourceWidget, PaypalCheckoutButton, PaypalWalletButtonExpress, STYLABLE_ELEMENT, STYLABLE_ELEMENT_STATE, STYLE, SUPPORTED_CARD_TYPES, TEXT, TRIGGER, TYPE, VAULT_DISPLAY_STYLE, type VaultDisplayStyle, VaultDisplayWidget, WalletButtons, ZipmoneyCheckoutButton };