@mikemo-coposit/am-accounting-shared 0.0.21 → 1.0.1-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/constants/common/package-version.constant.d.ts +1 -1
- package/dist/cjs/constants/common/package-version.constant.d.ts.map +1 -1
- package/dist/cjs/index.js +250 -147
- package/dist/cjs/schemas/mta/create-mta.rest.schema.d.ts +1 -0
- package/dist/cjs/schemas/mta/create-mta.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-account-period/mta-account-period-closing-summary.rest.schema.d.ts +8 -0
- package/dist/cjs/schemas/mta-account-period/mta-account-period-closing-summary.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-reconciled-transaction/mta-reconciled-transaction.rest.schema.d.ts +4 -0
- package/dist/cjs/schemas/mta-reconciled-transaction/mta-reconciled-transaction.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-transaction/mta-transaction.rest.schema.d.ts +3 -0
- package/dist/cjs/schemas/mta-transaction/mta-transaction.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/payout/mta-to-cma-payout/provision-data.mta-to-cma-payout.rest.schema.d.ts +12 -0
- package/dist/cjs/schemas/payout/mta-to-cma-payout/provision-data.mta-to-cma-payout.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/payout/payout.rest.schema.d.ts +47 -0
- package/dist/cjs/schemas/payout/payout.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/payout-transaction/payout-transaction.rest.entity.d.ts +5 -0
- package/dist/cjs/schemas/payout-transaction/payout-transaction.rest.entity.d.ts.map +1 -1
- package/dist/cjs/schemas/property/property.rest.schema.d.ts +4 -0
- package/dist/cjs/schemas/property/property.rest.schema.d.ts.map +1 -1
- package/dist/esm/constants/common/package-version.constant.d.ts +1 -1
- package/dist/esm/constants/common/package-version.constant.d.ts.map +1 -1
- package/dist/esm/index.mjs +198 -145
- package/dist/esm/schemas/mta/create-mta.rest.schema.d.ts +1 -0
- package/dist/esm/schemas/mta/create-mta.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-account-period/mta-account-period-closing-summary.rest.schema.d.ts +8 -0
- package/dist/esm/schemas/mta-account-period/mta-account-period-closing-summary.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-reconciled-transaction/mta-reconciled-transaction.rest.schema.d.ts +4 -0
- package/dist/esm/schemas/mta-reconciled-transaction/mta-reconciled-transaction.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-transaction/mta-transaction.rest.schema.d.ts +3 -0
- package/dist/esm/schemas/mta-transaction/mta-transaction.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/payout/mta-to-cma-payout/provision-data.mta-to-cma-payout.rest.schema.d.ts +12 -0
- package/dist/esm/schemas/payout/mta-to-cma-payout/provision-data.mta-to-cma-payout.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/payout/payout.rest.schema.d.ts +47 -0
- package/dist/esm/schemas/payout/payout.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/payout-transaction/payout-transaction.rest.entity.d.ts +5 -0
- package/dist/esm/schemas/payout-transaction/payout-transaction.rest.entity.d.ts.map +1 -1
- package/dist/esm/schemas/property/property.rest.schema.d.ts +4 -0
- package/dist/esm/schemas/property/property.rest.schema.d.ts.map +1 -1
- package/package.json +15 -22
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "
|
|
1
|
+
export declare const PACKAGE_VERSION = "1.0.1-dev.1";
|
|
2
2
|
//# sourceMappingURL=package-version.constant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-version.constant.d.ts","sourceRoot":"","sources":["../../../../packages/constants/common/package-version.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"package-version.constant.d.ts","sourceRoot":"","sources":["../../../../packages/constants/common/package-version.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,gBAAgB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -2720,7 +2720,7 @@ var __webpack_exports__ = {};
|
|
|
2720
2720
|
CmaTransactionPaymentMethod: ()=>cma_payment_method_constant_CmaTransactionPaymentMethod,
|
|
2721
2721
|
balanceRestResSchema: ()=>balanceRestResSchema,
|
|
2722
2722
|
bigIntFilterSchema: ()=>bigIntFilterSchema,
|
|
2723
|
-
PACKAGE_VERSION: ()=>
|
|
2723
|
+
PACKAGE_VERSION: ()=>PACKAGE_VERSION,
|
|
2724
2724
|
stateCodeSchema: ()=>stateCodeSchema,
|
|
2725
2725
|
queryModeSchema: ()=>queryModeSchema,
|
|
2726
2726
|
settlementPayoutTargetDetailEntitySchema: ()=>settlementPayoutTargetDetailEntitySchema,
|
|
@@ -2800,7 +2800,7 @@ var __webpack_exports__ = {};
|
|
|
2800
2800
|
stringToStartOfDaySchema: ()=>stringToStartOfDaySchema,
|
|
2801
2801
|
payoutStatusSummaryRestResSchema: ()=>payoutStatusSummaryRestResSchema,
|
|
2802
2802
|
DEFAULT_DATE_FORMAT_WITH_TIME: ()=>DEFAULT_DATE_FORMAT_WITH_TIME,
|
|
2803
|
-
DEFAULT_PAGE: ()=>
|
|
2803
|
+
DEFAULT_PAGE: ()=>DEFAULT_PAGE,
|
|
2804
2804
|
DEFAULT_PAYOUT_SOURCE_DESCRIPTION: ()=>DEFAULT_PAYOUT_SOURCE_DESCRIPTION,
|
|
2805
2805
|
updateCmaOpenReconciliationCurrentBankStatementBalanceRestReqSchema: ()=>updateCmaOpenReconciliationCurrentBankStatementBalanceRestReqSchema,
|
|
2806
2806
|
cmaSearchRestReqSchema: ()=>cmaSearchRestReqSchema,
|
|
@@ -2855,7 +2855,7 @@ var __webpack_exports__ = {};
|
|
|
2855
2855
|
markCmaTransactionAsClearedRestReqSchema: ()=>markCmaTransactionAsClearedRestReqSchema,
|
|
2856
2856
|
createSettlementPayoutRestReqSchema: ()=>createSettlementPayoutRestReqSchema,
|
|
2857
2857
|
propertySyncFromAmmozeGrpcReqSchema: ()=>propertySyncFromAmmozeGrpcReqSchema,
|
|
2858
|
-
DEFAULT_PAGE_SIZE: ()=>
|
|
2858
|
+
DEFAULT_PAGE_SIZE: ()=>DEFAULT_PAGE_SIZE,
|
|
2859
2859
|
InputJsonValueSchema: ()=>InputJsonValueSchema,
|
|
2860
2860
|
MtaPayoutTransactionType: ()=>MtaPayoutTransactionType,
|
|
2861
2861
|
cmaTransactionRestResBaseSchema: ()=>cmaTransactionRestResBaseSchema,
|
|
@@ -2996,6 +2996,9 @@ var __webpack_exports__ = {};
|
|
|
2996
2996
|
SYNCED: 'synced',
|
|
2997
2997
|
FAILED: 'failed'
|
|
2998
2998
|
};
|
|
2999
|
+
const PACKAGE_VERSION = '1.0.1-dev.1';
|
|
3000
|
+
const DEFAULT_PAGE_SIZE = 500;
|
|
3001
|
+
const DEFAULT_PAGE = 1;
|
|
2999
3002
|
var payment_method_constant_PaymentMethod = /*#__PURE__*/ function(PaymentMethod) {
|
|
3000
3003
|
PaymentMethod["EFT"] = "EFT";
|
|
3001
3004
|
return PaymentMethod;
|
|
@@ -4844,6 +4847,9 @@ var __webpack_exports__ = {};
|
|
|
4844
4847
|
get reconciledTransactions () {
|
|
4845
4848
|
return external_zod_namespaceObject.z.array(mtaReconciledTransactionRestResSchema).nullish();
|
|
4846
4849
|
},
|
|
4850
|
+
get payout () {
|
|
4851
|
+
return payoutEntitySchema.nullish();
|
|
4852
|
+
},
|
|
4847
4853
|
isUnknown: external_zod_namespaceObject.z.boolean().optional(),
|
|
4848
4854
|
isReceipt: external_zod_namespaceObject.z.boolean().optional(),
|
|
4849
4855
|
isPayment: external_zod_namespaceObject.z.boolean().optional(),
|
|
@@ -5705,14 +5711,14 @@ var __webpack_exports__ = {};
|
|
|
5705
5711
|
})();
|
|
5706
5712
|
const isContextDefined = (context)=>!isUndefined(context) && context !== _global;
|
|
5707
5713
|
function utils_merge() {
|
|
5708
|
-
const { caseless } = isContextDefined(this) && this || {};
|
|
5714
|
+
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
5709
5715
|
const result = {};
|
|
5710
5716
|
const assignValue = (val, key)=>{
|
|
5711
5717
|
const targetKey = caseless && findKey(result, key) || key;
|
|
5712
5718
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = utils_merge(result[targetKey], val);
|
|
5713
5719
|
else if (isPlainObject(val)) result[targetKey] = utils_merge({}, val);
|
|
5714
5720
|
else if (isArray(val)) result[targetKey] = val.slice();
|
|
5715
|
-
else result[targetKey] = val;
|
|
5721
|
+
else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val;
|
|
5716
5722
|
};
|
|
5717
5723
|
for(let i = 0, l = arguments.length; i < l; i++)arguments[i] && forEach(arguments[i], assignValue);
|
|
5718
5724
|
return result;
|
|
@@ -5996,9 +6002,14 @@ var __webpack_exports__ = {};
|
|
|
5996
6002
|
utils.toFlatObject(error, axiosError, function(obj) {
|
|
5997
6003
|
return obj !== Error.prototype;
|
|
5998
6004
|
}, (prop)=>'isAxiosError' !== prop);
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
axiosError
|
|
6005
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
6006
|
+
const errCode = null == code && error ? error.code : code;
|
|
6007
|
+
AxiosError_AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
6008
|
+
if (error && null == axiosError.cause) Object.defineProperty(axiosError, 'cause', {
|
|
6009
|
+
value: error,
|
|
6010
|
+
configurable: true
|
|
6011
|
+
});
|
|
6012
|
+
axiosError.name = error && error.name || 'Error';
|
|
6002
6013
|
customProps && Object.assign(axiosError, customProps);
|
|
6003
6014
|
return axiosError;
|
|
6004
6015
|
};
|
|
@@ -6129,7 +6140,7 @@ var __webpack_exports__ = {};
|
|
|
6129
6140
|
};
|
|
6130
6141
|
const AxiosURLSearchParams = AxiosURLSearchParams_AxiosURLSearchParams;
|
|
6131
6142
|
function buildURL_encode(val) {
|
|
6132
|
-
return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+')
|
|
6143
|
+
return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
|
|
6133
6144
|
}
|
|
6134
6145
|
function buildURL(url, params, options) {
|
|
6135
6146
|
if (!params) return url;
|
|
@@ -6339,7 +6350,7 @@ var __webpack_exports__ = {};
|
|
|
6339
6350
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
6340
6351
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
6341
6352
|
try {
|
|
6342
|
-
return JSON.parse(data);
|
|
6353
|
+
return JSON.parse(data, this.parseReviver);
|
|
6343
6354
|
} catch (e) {
|
|
6344
6355
|
if (strictJSONParsing) {
|
|
6345
6356
|
if ('SyntaxError' === e.name) throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
@@ -6671,6 +6682,7 @@ var __webpack_exports__ = {};
|
|
|
6671
6682
|
var external_util_ = __webpack_require__("util");
|
|
6672
6683
|
var follow_redirects = __webpack_require__("./node_modules/.pnpm/follow-redirects@1.15.11/node_modules/follow-redirects/index.js");
|
|
6673
6684
|
const external_zlib_namespaceObject = require("zlib");
|
|
6685
|
+
const VERSION = "1.12.2";
|
|
6674
6686
|
function parseProtocol(url) {
|
|
6675
6687
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
6676
6688
|
return match && match[1] || '';
|
|
@@ -6992,6 +7004,48 @@ var __webpack_exports__ = {};
|
|
|
6992
7004
|
];
|
|
6993
7005
|
};
|
|
6994
7006
|
const asyncDecorator = (fn)=>(...args)=>utils.asap(()=>fn(...args));
|
|
7007
|
+
function estimateDataURLDecodedBytes(url) {
|
|
7008
|
+
if (!url || 'string' != typeof url) return 0;
|
|
7009
|
+
if (!url.startsWith('data:')) return 0;
|
|
7010
|
+
const comma = url.indexOf(',');
|
|
7011
|
+
if (comma < 0) return 0;
|
|
7012
|
+
const meta = url.slice(5, comma);
|
|
7013
|
+
const body = url.slice(comma + 1);
|
|
7014
|
+
const isBase64 = /;base64/i.test(meta);
|
|
7015
|
+
if (isBase64) {
|
|
7016
|
+
let effectiveLen = body.length;
|
|
7017
|
+
const len = body.length;
|
|
7018
|
+
for(let i = 0; i < len; i++)if (37 === body.charCodeAt(i) && i + 2 < len) {
|
|
7019
|
+
const a = body.charCodeAt(i + 1);
|
|
7020
|
+
const b = body.charCodeAt(i + 2);
|
|
7021
|
+
const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
|
|
7022
|
+
if (isHex) {
|
|
7023
|
+
effectiveLen -= 2;
|
|
7024
|
+
i += 2;
|
|
7025
|
+
}
|
|
7026
|
+
}
|
|
7027
|
+
let pad = 0;
|
|
7028
|
+
let idx = len - 1;
|
|
7029
|
+
const tailIsPct3D = (j)=>j >= 2 && 37 === body.charCodeAt(j - 2) && 51 === body.charCodeAt(j - 1) && (68 === body.charCodeAt(j) || 100 === body.charCodeAt(j));
|
|
7030
|
+
if (idx >= 0) {
|
|
7031
|
+
if (61 === body.charCodeAt(idx)) {
|
|
7032
|
+
pad++;
|
|
7033
|
+
idx--;
|
|
7034
|
+
} else if (tailIsPct3D(idx)) {
|
|
7035
|
+
pad++;
|
|
7036
|
+
idx -= 3;
|
|
7037
|
+
}
|
|
7038
|
+
}
|
|
7039
|
+
if (1 === pad && idx >= 0) {
|
|
7040
|
+
if (61 === body.charCodeAt(idx)) pad++;
|
|
7041
|
+
else if (tailIsPct3D(idx)) pad++;
|
|
7042
|
+
}
|
|
7043
|
+
const groups = Math.floor(effectiveLen / 4);
|
|
7044
|
+
const bytes = 3 * groups - (pad || 0);
|
|
7045
|
+
return bytes > 0 ? bytes : 0;
|
|
7046
|
+
}
|
|
7047
|
+
return Buffer.byteLength(body, 'utf8');
|
|
7048
|
+
}
|
|
6995
7049
|
const zlibOptions = {
|
|
6996
7050
|
flush: external_zlib_namespaceObject.constants.Z_SYNC_FLUSH,
|
|
6997
7051
|
finishFlush: external_zlib_namespaceObject.constants.Z_SYNC_FLUSH
|
|
@@ -7114,6 +7168,11 @@ var __webpack_exports__ = {};
|
|
|
7114
7168
|
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
|
|
7115
7169
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
7116
7170
|
if ('data:' === protocol) {
|
|
7171
|
+
if (config.maxContentLength > -1) {
|
|
7172
|
+
const dataUrl = String(config.url || fullPath || '');
|
|
7173
|
+
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
7174
|
+
if (estimated > config.maxContentLength) return reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config));
|
|
7175
|
+
}
|
|
7117
7176
|
let convertedData;
|
|
7118
7177
|
if ('GET' !== method) return settle(resolve, reject, {
|
|
7119
7178
|
status: 405,
|
|
@@ -7142,7 +7201,7 @@ var __webpack_exports__ = {};
|
|
|
7142
7201
|
}
|
|
7143
7202
|
if (-1 === supportedProtocols.indexOf(protocol)) return reject(new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config));
|
|
7144
7203
|
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
7145
|
-
headers.set('User-Agent',
|
|
7204
|
+
headers.set('User-Agent', 'axios/' + VERSION, false);
|
|
7146
7205
|
const { onUploadProgress, onDownloadProgress } = config;
|
|
7147
7206
|
const maxRate = config.maxRate;
|
|
7148
7207
|
let maxUploadRate;
|
|
@@ -7152,7 +7211,7 @@ var __webpack_exports__ = {};
|
|
|
7152
7211
|
data = helpers_formDataToStream(data, (formHeaders)=>{
|
|
7153
7212
|
headers.set(formHeaders);
|
|
7154
7213
|
}, {
|
|
7155
|
-
tag:
|
|
7214
|
+
tag: `axios-${VERSION}-boundary`,
|
|
7156
7215
|
boundary: userBoundary && userBoundary[1] || void 0
|
|
7157
7216
|
});
|
|
7158
7217
|
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
|
@@ -7488,15 +7547,17 @@ var __webpack_exports__ = {};
|
|
|
7488
7547
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
7489
7548
|
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
7490
7549
|
if (auth) headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
|
|
7491
|
-
let contentType;
|
|
7492
7550
|
if (utils.isFormData(data)) {
|
|
7493
7551
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
|
|
7494
|
-
else if (
|
|
7495
|
-
const
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
]
|
|
7552
|
+
else if (utils.isFunction(data.getHeaders)) {
|
|
7553
|
+
const formHeaders = data.getHeaders();
|
|
7554
|
+
const allowedHeaders = [
|
|
7555
|
+
'content-type',
|
|
7556
|
+
'content-length'
|
|
7557
|
+
];
|
|
7558
|
+
Object.entries(formHeaders).forEach(([key, val])=>{
|
|
7559
|
+
if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
|
|
7560
|
+
});
|
|
7500
7561
|
}
|
|
7501
7562
|
}
|
|
7502
7563
|
if (platform.hasStandardBrowserEnv) {
|
|
@@ -7559,8 +7620,11 @@ var __webpack_exports__ = {};
|
|
|
7559
7620
|
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
7560
7621
|
request = null;
|
|
7561
7622
|
};
|
|
7562
|
-
request.onerror = function() {
|
|
7563
|
-
|
|
7623
|
+
request.onerror = function(event) {
|
|
7624
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
7625
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
7626
|
+
err.event = event || null;
|
|
7627
|
+
reject(err);
|
|
7564
7628
|
request = null;
|
|
7565
7629
|
};
|
|
7566
7630
|
request.ontimeout = function() {
|
|
@@ -7699,9 +7763,13 @@ var __webpack_exports__ = {};
|
|
|
7699
7763
|
highWaterMark: 2
|
|
7700
7764
|
});
|
|
7701
7765
|
};
|
|
7702
|
-
const
|
|
7703
|
-
const
|
|
7704
|
-
const
|
|
7766
|
+
const DEFAULT_CHUNK_SIZE = 65536;
|
|
7767
|
+
const { isFunction: fetch_isFunction } = utils;
|
|
7768
|
+
const globalFetchAPI = (({ Request, Response })=>({
|
|
7769
|
+
Request,
|
|
7770
|
+
Response
|
|
7771
|
+
}))(utils.global);
|
|
7772
|
+
const { ReadableStream: fetch_ReadableStream, TextEncoder: fetch_TextEncoder } = utils.global;
|
|
7705
7773
|
const test = (fn, ...args)=>{
|
|
7706
7774
|
try {
|
|
7707
7775
|
return !!fn(...args);
|
|
@@ -7709,134 +7777,170 @@ var __webpack_exports__ = {};
|
|
|
7709
7777
|
return false;
|
|
7710
7778
|
}
|
|
7711
7779
|
};
|
|
7712
|
-
const
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
stream: supportsResponseStream && ((res)=>res.body)
|
|
7728
|
-
};
|
|
7729
|
-
isFetchSupported && ((res)=>{
|
|
7730
|
-
[
|
|
7731
|
-
'text',
|
|
7732
|
-
'arrayBuffer',
|
|
7733
|
-
'blob',
|
|
7734
|
-
'formData',
|
|
7735
|
-
'stream'
|
|
7736
|
-
].forEach((type)=>{
|
|
7737
|
-
resolvers[type] || (resolvers[type] = utils.isFunction(res[type]) ? (res)=>res[type]() : (_, config)=>{
|
|
7738
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
7739
|
-
});
|
|
7740
|
-
});
|
|
7741
|
-
})(new Response);
|
|
7742
|
-
const getBodyLength = async (body)=>{
|
|
7743
|
-
if (null == body) return 0;
|
|
7744
|
-
if (utils.isBlob(body)) return body.size;
|
|
7745
|
-
if (utils.isSpecCompliantForm(body)) {
|
|
7746
|
-
const _request = new Request(platform.origin, {
|
|
7780
|
+
const factory = (env)=>{
|
|
7781
|
+
env = utils.merge.call({
|
|
7782
|
+
skipUndefined: true
|
|
7783
|
+
}, globalFetchAPI, env);
|
|
7784
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
7785
|
+
const isFetchSupported = envFetch ? fetch_isFunction(envFetch) : 'function' == typeof fetch;
|
|
7786
|
+
const isRequestSupported = fetch_isFunction(Request);
|
|
7787
|
+
const isResponseSupported = fetch_isFunction(Response);
|
|
7788
|
+
if (!isFetchSupported) return false;
|
|
7789
|
+
const isReadableStreamSupported = isFetchSupported && fetch_isFunction(fetch_ReadableStream);
|
|
7790
|
+
const encodeText = isFetchSupported && ('function' == typeof fetch_TextEncoder ? ((encoder)=>(str)=>encoder.encode(str))(new fetch_TextEncoder()) : async (str)=>new Uint8Array(await new Request(str).arrayBuffer()));
|
|
7791
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(()=>{
|
|
7792
|
+
let duplexAccessed = false;
|
|
7793
|
+
const hasContentType = new Request(platform.origin, {
|
|
7794
|
+
body: new fetch_ReadableStream(),
|
|
7747
7795
|
method: 'POST',
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
if (utils.isString(body)) return (await encodeText(body)).byteLength;
|
|
7755
|
-
};
|
|
7756
|
-
const resolveBodyLength = async (headers, body)=>{
|
|
7757
|
-
const length = utils.toFiniteNumber(headers.getContentLength());
|
|
7758
|
-
return null == length ? getBodyLength(body) : length;
|
|
7759
|
-
};
|
|
7760
|
-
const adapters_fetch = isFetchSupported && (async (config)=>{
|
|
7761
|
-
let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = 'same-origin', fetchOptions } = resolveConfig(config);
|
|
7762
|
-
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
7763
|
-
let composedSignal = helpers_composeSignals([
|
|
7764
|
-
signal,
|
|
7765
|
-
cancelToken && cancelToken.toAbortSignal()
|
|
7766
|
-
], timeout);
|
|
7767
|
-
let request;
|
|
7768
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (()=>{
|
|
7769
|
-
composedSignal.unsubscribe();
|
|
7796
|
+
get duplex () {
|
|
7797
|
+
duplexAccessed = true;
|
|
7798
|
+
return 'half';
|
|
7799
|
+
}
|
|
7800
|
+
}).headers.has('Content-Type');
|
|
7801
|
+
return duplexAccessed && !hasContentType;
|
|
7770
7802
|
});
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7803
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(()=>utils.isReadableStream(new Response('').body));
|
|
7804
|
+
const resolvers = {
|
|
7805
|
+
stream: supportsResponseStream && ((res)=>res.body)
|
|
7806
|
+
};
|
|
7807
|
+
isFetchSupported && (()=>{
|
|
7808
|
+
[
|
|
7809
|
+
'text',
|
|
7810
|
+
'arrayBuffer',
|
|
7811
|
+
'blob',
|
|
7812
|
+
'formData',
|
|
7813
|
+
'stream'
|
|
7814
|
+
].forEach((type)=>{
|
|
7815
|
+
resolvers[type] || (resolvers[type] = (res, config)=>{
|
|
7816
|
+
let method = res && res[type];
|
|
7817
|
+
if (method) return method.call(res);
|
|
7818
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
7819
|
+
});
|
|
7820
|
+
});
|
|
7821
|
+
})();
|
|
7822
|
+
const getBodyLength = async (body)=>{
|
|
7823
|
+
if (null == body) return 0;
|
|
7824
|
+
if (utils.isBlob(body)) return body.size;
|
|
7825
|
+
if (utils.isSpecCompliantForm(body)) {
|
|
7826
|
+
const _request = new Request(platform.origin, {
|
|
7775
7827
|
method: 'POST',
|
|
7776
|
-
body
|
|
7777
|
-
duplex: "half"
|
|
7828
|
+
body
|
|
7778
7829
|
});
|
|
7779
|
-
|
|
7780
|
-
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) headers.setContentType(contentTypeHeader);
|
|
7781
|
-
if (_request.body) {
|
|
7782
|
-
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
7783
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
7784
|
-
}
|
|
7830
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
7785
7831
|
}
|
|
7786
|
-
if (
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7832
|
+
if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) return body.byteLength;
|
|
7833
|
+
if (utils.isURLSearchParams(body)) body += '';
|
|
7834
|
+
if (utils.isString(body)) return (await encodeText(body)).byteLength;
|
|
7835
|
+
};
|
|
7836
|
+
const resolveBodyLength = async (headers, body)=>{
|
|
7837
|
+
const length = utils.toFiniteNumber(headers.getContentLength());
|
|
7838
|
+
return null == length ? getBodyLength(body) : length;
|
|
7839
|
+
};
|
|
7840
|
+
return async (config)=>{
|
|
7841
|
+
let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = 'same-origin', fetchOptions } = resolveConfig(config);
|
|
7842
|
+
let _fetch = envFetch || fetch;
|
|
7843
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
7844
|
+
let composedSignal = helpers_composeSignals([
|
|
7845
|
+
signal,
|
|
7846
|
+
cancelToken && cancelToken.toAbortSignal()
|
|
7847
|
+
], timeout);
|
|
7848
|
+
let request = null;
|
|
7849
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (()=>{
|
|
7850
|
+
composedSignal.unsubscribe();
|
|
7796
7851
|
});
|
|
7797
|
-
let
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7852
|
+
let requestContentLength;
|
|
7853
|
+
try {
|
|
7854
|
+
if (onUploadProgress && supportsRequestStream && 'get' !== method && 'head' !== method && 0 !== (requestContentLength = await resolveBodyLength(headers, data))) {
|
|
7855
|
+
let _request = new Request(url, {
|
|
7856
|
+
method: 'POST',
|
|
7857
|
+
body: data,
|
|
7858
|
+
duplex: "half"
|
|
7859
|
+
});
|
|
7860
|
+
let contentTypeHeader;
|
|
7861
|
+
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) headers.setContentType(contentTypeHeader);
|
|
7862
|
+
if (_request.body) {
|
|
7863
|
+
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
7864
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
if (!utils.isString(withCredentials)) withCredentials = withCredentials ? 'include' : 'omit';
|
|
7868
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
7869
|
+
const resolvedOptions = {
|
|
7870
|
+
...fetchOptions,
|
|
7871
|
+
signal: composedSignal,
|
|
7872
|
+
method: method.toUpperCase(),
|
|
7873
|
+
headers: headers.normalize().toJSON(),
|
|
7874
|
+
body: data,
|
|
7875
|
+
duplex: "half",
|
|
7876
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
7877
|
+
};
|
|
7878
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
7879
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
7880
|
+
const isStreamResponse = supportsResponseStream && ('stream' === responseType || 'response' === responseType);
|
|
7881
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
7882
|
+
const options = {};
|
|
7883
|
+
[
|
|
7884
|
+
'status',
|
|
7885
|
+
'statusText',
|
|
7886
|
+
'headers'
|
|
7887
|
+
].forEach((prop)=>{
|
|
7888
|
+
options[prop] = response[prop];
|
|
7889
|
+
});
|
|
7890
|
+
const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));
|
|
7891
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
7892
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, ()=>{
|
|
7893
|
+
flush && flush();
|
|
7894
|
+
unsubscribe && unsubscribe();
|
|
7895
|
+
}), options);
|
|
7896
|
+
}
|
|
7897
|
+
responseType = responseType || 'text';
|
|
7898
|
+
let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);
|
|
7899
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
7900
|
+
return await new Promise((resolve, reject)=>{
|
|
7901
|
+
settle(resolve, reject, {
|
|
7902
|
+
data: responseData,
|
|
7903
|
+
headers: AxiosHeaders.from(response.headers),
|
|
7904
|
+
status: response.status,
|
|
7905
|
+
statusText: response.statusText,
|
|
7906
|
+
config,
|
|
7907
|
+
request
|
|
7908
|
+
});
|
|
7807
7909
|
});
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
unsubscribe && unsubscribe();
|
|
7813
|
-
}), options);
|
|
7814
|
-
}
|
|
7815
|
-
responseType = responseType || 'text';
|
|
7816
|
-
let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);
|
|
7817
|
-
!isStreamResponse && unsubscribe && unsubscribe();
|
|
7818
|
-
return await new Promise((resolve, reject)=>{
|
|
7819
|
-
settle(resolve, reject, {
|
|
7820
|
-
data: responseData,
|
|
7821
|
-
headers: AxiosHeaders.from(response.headers),
|
|
7822
|
-
status: response.status,
|
|
7823
|
-
statusText: response.statusText,
|
|
7824
|
-
config,
|
|
7825
|
-
request
|
|
7910
|
+
} catch (err) {
|
|
7911
|
+
unsubscribe && unsubscribe();
|
|
7912
|
+
if (err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
|
|
7913
|
+
cause: err.cause || err
|
|
7826
7914
|
});
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
}
|
|
7835
|
-
|
|
7915
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
7916
|
+
}
|
|
7917
|
+
};
|
|
7918
|
+
};
|
|
7919
|
+
const seedCache = new Map();
|
|
7920
|
+
const getFetch = (config)=>{
|
|
7921
|
+
let env = config ? config.env : {};
|
|
7922
|
+
const { fetch: fetch1, Request, Response } = env;
|
|
7923
|
+
const seeds = [
|
|
7924
|
+
Request,
|
|
7925
|
+
Response,
|
|
7926
|
+
fetch1
|
|
7927
|
+
];
|
|
7928
|
+
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
7929
|
+
while(i--){
|
|
7930
|
+
seed = seeds[i];
|
|
7931
|
+
target = map.get(seed);
|
|
7932
|
+
void 0 === target && map.set(seed, target = i ? new Map() : factory(env));
|
|
7933
|
+
map = target;
|
|
7934
|
+
}
|
|
7935
|
+
return target;
|
|
7936
|
+
};
|
|
7937
|
+
getFetch();
|
|
7836
7938
|
const knownAdapters = {
|
|
7837
7939
|
http: http,
|
|
7838
7940
|
xhr: xhr,
|
|
7839
|
-
fetch:
|
|
7941
|
+
fetch: {
|
|
7942
|
+
get: getFetch
|
|
7943
|
+
}
|
|
7840
7944
|
};
|
|
7841
7945
|
utils.forEach(knownAdapters, (fn, value)=>{
|
|
7842
7946
|
if (fn) {
|
|
@@ -7853,7 +7957,7 @@ var __webpack_exports__ = {};
|
|
|
7853
7957
|
const renderReason = (reason)=>`- ${reason}`;
|
|
7854
7958
|
const isResolvedHandle = (adapter)=>utils.isFunction(adapter) || null === adapter || false === adapter;
|
|
7855
7959
|
const adapters_adapters = {
|
|
7856
|
-
getAdapter: (adapters)=>{
|
|
7960
|
+
getAdapter: (adapters, config)=>{
|
|
7857
7961
|
adapters = utils.isArray(adapters) ? adapters : [
|
|
7858
7962
|
adapters
|
|
7859
7963
|
];
|
|
@@ -7869,7 +7973,7 @@ var __webpack_exports__ = {};
|
|
|
7869
7973
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
7870
7974
|
if (void 0 === adapter) throw new AxiosError(`Unknown adapter '${id}'`);
|
|
7871
7975
|
}
|
|
7872
|
-
if (adapter) break;
|
|
7976
|
+
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) break;
|
|
7873
7977
|
rejectedReasons[id || '#' + i] = adapter;
|
|
7874
7978
|
}
|
|
7875
7979
|
if (!adapter) {
|
|
@@ -7894,7 +7998,7 @@ var __webpack_exports__ = {};
|
|
|
7894
7998
|
'put',
|
|
7895
7999
|
'patch'
|
|
7896
8000
|
].indexOf(config.method)) config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
7897
|
-
const adapter = adapters_adapters.getAdapter(config.adapter || lib_defaults.adapter);
|
|
8001
|
+
const adapter = adapters_adapters.getAdapter(config.adapter || lib_defaults.adapter, config);
|
|
7898
8002
|
return adapter(config).then(function(response) {
|
|
7899
8003
|
throwIfCancellationRequested(config);
|
|
7900
8004
|
response.data = transformData.call(config, config.transformResponse, response);
|
|
@@ -7927,7 +8031,7 @@ var __webpack_exports__ = {};
|
|
|
7927
8031
|
const deprecatedWarnings = {};
|
|
7928
8032
|
validators.transitional = function(validator, version, message) {
|
|
7929
8033
|
function formatMessage(opt, desc) {
|
|
7930
|
-
return
|
|
8034
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
7931
8035
|
}
|
|
7932
8036
|
return (value, opt, opts)=>{
|
|
7933
8037
|
if (false === validator) throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
|
|
@@ -8058,7 +8162,6 @@ var __webpack_exports__ = {};
|
|
|
8058
8162
|
}
|
|
8059
8163
|
len = requestInterceptorChain.length;
|
|
8060
8164
|
let newConfig = config;
|
|
8061
|
-
i = 0;
|
|
8062
8165
|
while(i < len){
|
|
8063
8166
|
const onFulfilled = requestInterceptorChain[i++];
|
|
8064
8167
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -8283,7 +8386,7 @@ var __webpack_exports__ = {};
|
|
|
8283
8386
|
axios.CanceledError = cancel_CanceledError;
|
|
8284
8387
|
axios.CancelToken = CancelToken;
|
|
8285
8388
|
axios.isCancel = isCancel;
|
|
8286
|
-
axios.VERSION =
|
|
8389
|
+
axios.VERSION = VERSION;
|
|
8287
8390
|
axios.toFormData = helpers_toFormData;
|
|
8288
8391
|
axios.AxiosError = AxiosError;
|
|
8289
8392
|
axios.Cancel = axios.CanceledError;
|
|
@@ -14,4 +14,5 @@ export declare const createMtaRestReqSchema: z.ZodObject<{
|
|
|
14
14
|
zeptoBankAccountId: z.ZodUUID;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type CreateMtaRestReq = z.input<typeof createMtaRestReqSchema>;
|
|
17
|
+
export type CreateMtaReq = z.output<typeof createMtaRestReqSchema>;
|
|
17
18
|
//# sourceMappingURL=create-mta.rest.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-mta.rest.schema.d.ts","sourceRoot":"","sources":["../../../../packages/schemas/mta/create-mta.rest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAkBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-mta.rest.schema.d.ts","sourceRoot":"","sources":["../../../../packages/schemas/mta/create-mta.rest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAkBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|