@blockchyp/blockchyp-ts 2.30.4 → 2.30.5
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/_bundles/blockchyp.js +100 -65
- package/_bundles/blockchyp.js.map +1 -1
- package/_bundles/blockchyp.min.js +1 -1
- package/_bundles/blockchyp.min.js.LICENSE.txt +1 -1
- package/_bundles/blockchyp.min.js.map +1 -1
- package/lib/src/models.d.ts +13 -1
- package/lib/src/models.js +4 -1
- package/lib/src/models.js.map +1 -1
- package/package.json +1 -1
- package/src/models.ts +21 -0
package/_bundles/blockchyp.js
CHANGED
|
@@ -31533,7 +31533,7 @@ exports.WhiteListedCard = WhiteListedCard;
|
|
|
31533
31533
|
*/
|
|
31534
31534
|
class AuthorizationRequest {
|
|
31535
31535
|
// Constructor with default values for optional fields
|
|
31536
|
-
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, country = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, sigFile = undefined, sigFormat = undefined, sigWidth = 0, disableSignature = false, tipAmount = undefined, taxAmount = undefined, terminalName = undefined, resetConnection = null, transactionId = undefined, onlineAuthCode = undefined, enroll = false, bypassDupeFilter = false, description = undefined, promptForTip = false, cashBackEnabled = false, cardOnFile = false, recurring = false, cit = false, mit = false, subscription = false, purchaseOrderNumber = undefined, supplierReferenceNumber = undefined, lineItems = null, altPrices = undefined, customer = undefined, roundingMode = undefined, healthcareMetadata = undefined, cryptocurrency = undefined, cryptoNetwork = undefined, cryptoReceiveAddress = undefined, paymentRequestLabel = undefined, paymentRequestMessage = undefined, simulateChipRejection = false, simulateOutOfOrderReversal = false, asyncReversals = false, passthroughSurcharge = undefined, healthcare = false, healthcareTotal = undefined, ebtTotal = undefined, cardMetadataLookup = false, totalDiscountAmount = undefined, shippingAmount = undefined, dutyAmount = undefined, processorId = undefined, externalCustomerId = undefined, destinationCountryCode = undefined, shipFromPostalCode = undefined, shipToPostalCode = undefined, orderDate = undefined, shipmentCount = null, shipmentNumber = null, externalPartnerMetadata = undefined) {
|
|
31536
|
+
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, country = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, sigFile = undefined, sigFormat = undefined, sigWidth = 0, disableSignature = false, tipAmount = undefined, taxAmount = undefined, terminalName = undefined, resetConnection = null, transactionId = undefined, onlineAuthCode = undefined, enroll = false, bypassDupeFilter = false, description = undefined, promptForTip = false, cashBackEnabled = false, cardOnFile = false, recurring = false, cit = false, mit = false, subscription = false, purchaseOrderNumber = undefined, supplierReferenceNumber = undefined, lineItems = null, altPrices = undefined, customer = undefined, roundingMode = undefined, healthcareMetadata = undefined, cryptocurrency = undefined, cryptoNetwork = undefined, cryptoReceiveAddress = undefined, paymentRequestLabel = undefined, paymentRequestMessage = undefined, simulateChipRejection = false, simulateOutOfOrderReversal = false, asyncReversals = false, passthroughSurcharge = undefined, healthcare = false, healthcareTotal = undefined, ebtTotal = undefined, cardMetadataLookup = false, totalDiscountAmount = undefined, shippingAmount = undefined, dutyAmount = undefined, processorId = undefined, externalCustomerId = undefined, destinationCountryCode = undefined, shipFromPostalCode = undefined, shipToPostalCode = undefined, orderDate = undefined, shipmentCount = null, shipmentNumber = null, externalPartnerMetadata = undefined, externalCustomerEmail = undefined, externalCustomerPhone = undefined, externalCustomerCompany = undefined) {
|
|
31537
31537
|
/**
|
|
31538
31538
|
* The request timeout in seconds.
|
|
31539
31539
|
*/
|
|
@@ -31680,6 +31680,9 @@ class AuthorizationRequest {
|
|
|
31680
31680
|
this.shipmentCount = shipmentCount;
|
|
31681
31681
|
this.shipmentNumber = shipmentNumber;
|
|
31682
31682
|
this.externalPartnerMetadata = externalPartnerMetadata;
|
|
31683
|
+
this.externalCustomerEmail = externalCustomerEmail;
|
|
31684
|
+
this.externalCustomerPhone = externalCustomerPhone;
|
|
31685
|
+
this.externalCustomerCompany = externalCustomerCompany;
|
|
31683
31686
|
}
|
|
31684
31687
|
}
|
|
31685
31688
|
exports.AuthorizationRequest = AuthorizationRequest;
|
|
@@ -41306,7 +41309,7 @@ exports.CoreResponse = CoreResponse;
|
|
|
41306
41309
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41307
41310
|
|
|
41308
41311
|
"use strict";
|
|
41309
|
-
/*! Axios v1.16.
|
|
41312
|
+
/*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
41310
41313
|
|
|
41311
41314
|
|
|
41312
41315
|
/**
|
|
@@ -42083,11 +42086,11 @@ function isSpecCompliantForm(thing) {
|
|
|
42083
42086
|
* @returns {Object} The JSON-compatible object.
|
|
42084
42087
|
*/
|
|
42085
42088
|
const toJSONObject = (obj) => {
|
|
42086
|
-
const
|
|
42089
|
+
const visited = new WeakSet();
|
|
42087
42090
|
|
|
42088
|
-
const visit = (source
|
|
42091
|
+
const visit = (source) => {
|
|
42089
42092
|
if (isObject(source)) {
|
|
42090
|
-
if (
|
|
42093
|
+
if (visited.has(source)) {
|
|
42091
42094
|
return;
|
|
42092
42095
|
}
|
|
42093
42096
|
|
|
@@ -42097,15 +42100,16 @@ const toJSONObject = (obj) => {
|
|
|
42097
42100
|
}
|
|
42098
42101
|
|
|
42099
42102
|
if (!('toJSON' in source)) {
|
|
42100
|
-
|
|
42103
|
+
// add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
|
|
42104
|
+
visited.add(source);
|
|
42101
42105
|
const target = isArray(source) ? [] : {};
|
|
42102
42106
|
|
|
42103
42107
|
forEach(source, (value, key) => {
|
|
42104
|
-
const reducedValue = visit(value
|
|
42108
|
+
const reducedValue = visit(value);
|
|
42105
42109
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
42106
42110
|
});
|
|
42107
42111
|
|
|
42108
|
-
|
|
42112
|
+
visited.delete(source);
|
|
42109
42113
|
|
|
42110
42114
|
return target;
|
|
42111
42115
|
}
|
|
@@ -42114,7 +42118,7 @@ const toJSONObject = (obj) => {
|
|
|
42114
42118
|
return source;
|
|
42115
42119
|
};
|
|
42116
42120
|
|
|
42117
|
-
return visit(obj
|
|
42121
|
+
return visit(obj);
|
|
42118
42122
|
};
|
|
42119
42123
|
|
|
42120
42124
|
/**
|
|
@@ -42316,10 +42320,6 @@ var parseHeaders = (rawHeaders) => {
|
|
|
42316
42320
|
return parsed;
|
|
42317
42321
|
};
|
|
42318
42322
|
|
|
42319
|
-
const $internals = Symbol('internals');
|
|
42320
|
-
|
|
42321
|
-
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
42322
|
-
|
|
42323
42323
|
function trimSPorHTAB(str) {
|
|
42324
42324
|
let start = 0;
|
|
42325
42325
|
let end = str.length;
|
|
@@ -42347,12 +42347,40 @@ function trimSPorHTAB(str) {
|
|
|
42347
42347
|
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
42348
42348
|
}
|
|
42349
42349
|
|
|
42350
|
-
|
|
42351
|
-
|
|
42350
|
+
// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
|
|
42351
|
+
// eslint-disable-next-line no-control-regex
|
|
42352
|
+
const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g');
|
|
42353
|
+
// eslint-disable-next-line no-control-regex
|
|
42354
|
+
const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
|
|
42355
|
+
|
|
42356
|
+
function sanitizeValue(value, invalidChars) {
|
|
42357
|
+
if (utils$1.isArray(value)) {
|
|
42358
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
42359
|
+
}
|
|
42360
|
+
|
|
42361
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ''));
|
|
42352
42362
|
}
|
|
42353
42363
|
|
|
42354
|
-
|
|
42355
|
-
|
|
42364
|
+
const sanitizeHeaderValue = (value) =>
|
|
42365
|
+
sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
42366
|
+
|
|
42367
|
+
const sanitizeByteStringHeaderValue = (value) =>
|
|
42368
|
+
sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
42369
|
+
|
|
42370
|
+
function toByteStringHeaderObject(headers) {
|
|
42371
|
+
const byteStringHeaders = Object.create(null);
|
|
42372
|
+
|
|
42373
|
+
utils$1.forEach(headers.toJSON(), (value, header) => {
|
|
42374
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
42375
|
+
});
|
|
42376
|
+
|
|
42377
|
+
return byteStringHeaders;
|
|
42378
|
+
}
|
|
42379
|
+
|
|
42380
|
+
const $internals = Symbol('internals');
|
|
42381
|
+
|
|
42382
|
+
function normalizeHeader(header) {
|
|
42383
|
+
return header && String(header).trim().toLowerCase();
|
|
42356
42384
|
}
|
|
42357
42385
|
|
|
42358
42386
|
function normalizeValue(value) {
|
|
@@ -43451,7 +43479,7 @@ function formDataToJSON(formData) {
|
|
|
43451
43479
|
return !isNumericKey;
|
|
43452
43480
|
}
|
|
43453
43481
|
|
|
43454
|
-
if (!target
|
|
43482
|
+
if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
|
|
43455
43483
|
target[name] = [];
|
|
43456
43484
|
}
|
|
43457
43485
|
|
|
@@ -43816,6 +43844,9 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43816
43844
|
const _speedometer = speedometer(50, 250);
|
|
43817
43845
|
|
|
43818
43846
|
return throttle((e) => {
|
|
43847
|
+
if (!e || typeof e.loaded !== 'number') {
|
|
43848
|
+
return;
|
|
43849
|
+
}
|
|
43819
43850
|
const rawLoaded = e.loaded;
|
|
43820
43851
|
const total = e.lengthComputable ? e.total : undefined;
|
|
43821
43852
|
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
@@ -44347,7 +44378,7 @@ var xhrAdapter = isXHRAdapterSupported &&
|
|
|
44347
44378
|
|
|
44348
44379
|
// Add headers to the request
|
|
44349
44380
|
if ('setRequestHeader' in request) {
|
|
44350
|
-
utils$1.forEach(requestHeaders
|
|
44381
|
+
utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
44351
44382
|
request.setRequestHeader(key, val);
|
|
44352
44383
|
});
|
|
44353
44384
|
}
|
|
@@ -44417,54 +44448,55 @@ var xhrAdapter = isXHRAdapterSupported &&
|
|
|
44417
44448
|
};
|
|
44418
44449
|
|
|
44419
44450
|
const composeSignals = (signals, timeout) => {
|
|
44420
|
-
|
|
44421
|
-
|
|
44422
|
-
if (timeout || length) {
|
|
44423
|
-
let controller = new AbortController();
|
|
44424
|
-
|
|
44425
|
-
let aborted;
|
|
44426
|
-
|
|
44427
|
-
const onabort = function (reason) {
|
|
44428
|
-
if (!aborted) {
|
|
44429
|
-
aborted = true;
|
|
44430
|
-
unsubscribe();
|
|
44431
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
44432
|
-
controller.abort(
|
|
44433
|
-
err instanceof AxiosError
|
|
44434
|
-
? err
|
|
44435
|
-
: new CanceledError(err instanceof Error ? err.message : err)
|
|
44436
|
-
);
|
|
44437
|
-
}
|
|
44438
|
-
};
|
|
44451
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
44439
44452
|
|
|
44440
|
-
|
|
44441
|
-
|
|
44442
|
-
|
|
44443
|
-
|
|
44444
|
-
|
|
44445
|
-
}, timeout);
|
|
44446
|
-
|
|
44447
|
-
const unsubscribe = () => {
|
|
44448
|
-
if (signals) {
|
|
44449
|
-
timer && clearTimeout(timer);
|
|
44450
|
-
timer = null;
|
|
44451
|
-
signals.forEach((signal) => {
|
|
44452
|
-
signal.unsubscribe
|
|
44453
|
-
? signal.unsubscribe(onabort)
|
|
44454
|
-
: signal.removeEventListener('abort', onabort);
|
|
44455
|
-
});
|
|
44456
|
-
signals = null;
|
|
44457
|
-
}
|
|
44458
|
-
};
|
|
44453
|
+
if (!timeout && !signals.length) {
|
|
44454
|
+
return;
|
|
44455
|
+
}
|
|
44456
|
+
|
|
44457
|
+
const controller = new AbortController();
|
|
44459
44458
|
|
|
44460
|
-
|
|
44459
|
+
let aborted = false;
|
|
44461
44460
|
|
|
44462
|
-
|
|
44461
|
+
const onabort = function (reason) {
|
|
44462
|
+
if (!aborted) {
|
|
44463
|
+
aborted = true;
|
|
44464
|
+
unsubscribe();
|
|
44465
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
44466
|
+
controller.abort(
|
|
44467
|
+
err instanceof AxiosError
|
|
44468
|
+
? err
|
|
44469
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
44470
|
+
);
|
|
44471
|
+
}
|
|
44472
|
+
};
|
|
44473
|
+
|
|
44474
|
+
let timer =
|
|
44475
|
+
timeout &&
|
|
44476
|
+
setTimeout(() => {
|
|
44477
|
+
timer = null;
|
|
44478
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
44479
|
+
}, timeout);
|
|
44480
|
+
|
|
44481
|
+
const unsubscribe = () => {
|
|
44482
|
+
if (!signals) { return; }
|
|
44483
|
+
timer && clearTimeout(timer);
|
|
44484
|
+
timer = null;
|
|
44485
|
+
signals.forEach((signal) => {
|
|
44486
|
+
signal.unsubscribe
|
|
44487
|
+
? signal.unsubscribe(onabort)
|
|
44488
|
+
: signal.removeEventListener('abort', onabort);
|
|
44489
|
+
});
|
|
44490
|
+
signals = null;
|
|
44491
|
+
};
|
|
44463
44492
|
|
|
44464
|
-
|
|
44493
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
44465
44494
|
|
|
44466
|
-
|
|
44467
|
-
|
|
44495
|
+
const { signal } = controller;
|
|
44496
|
+
|
|
44497
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
44498
|
+
|
|
44499
|
+
return signal;
|
|
44468
44500
|
};
|
|
44469
44501
|
|
|
44470
44502
|
const streamChunk = function* (chunk, chunkSize) {
|
|
@@ -44658,7 +44690,7 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
44658
44690
|
return bytes;
|
|
44659
44691
|
}
|
|
44660
44692
|
|
|
44661
|
-
const VERSION = "1.16.
|
|
44693
|
+
const VERSION = "1.16.1";
|
|
44662
44694
|
|
|
44663
44695
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
44664
44696
|
|
|
@@ -44673,7 +44705,10 @@ const test = (fn, ...args) => {
|
|
|
44673
44705
|
};
|
|
44674
44706
|
|
|
44675
44707
|
const factory = (env) => {
|
|
44676
|
-
const globalObject =
|
|
44708
|
+
const globalObject =
|
|
44709
|
+
utils$1.global !== undefined && utils$1.global !== null
|
|
44710
|
+
? utils$1.global
|
|
44711
|
+
: globalThis;
|
|
44677
44712
|
const { ReadableStream, TextEncoder } = globalObject;
|
|
44678
44713
|
|
|
44679
44714
|
env = utils$1.merge.call(
|
|
@@ -44930,7 +44965,7 @@ const factory = (env) => {
|
|
|
44930
44965
|
...fetchOptions,
|
|
44931
44966
|
signal: composedSignal,
|
|
44932
44967
|
method: method.toUpperCase(),
|
|
44933
|
-
headers: headers.normalize()
|
|
44968
|
+
headers: toByteStringHeaderObject(headers.normalize()),
|
|
44934
44969
|
body: data,
|
|
44935
44970
|
duplex: 'half',
|
|
44936
44971
|
credentials: isCredentialsSupported ? withCredentials : undefined,
|