@mikemo-coposit/am-accounting-shared 0.0.14 → 0.0.15
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/index.js +105 -85
- package/dist/cjs/schemas/cma/cma-search.rest.schemal.d.ts +477 -459
- package/dist/cjs/schemas/cma/cma-search.rest.schemal.d.ts.map +1 -1
- package/dist/cjs/schemas/cma-account-period/cma-account-period-closing-summary.rest.schema.d.ts +1 -1
- package/dist/cjs/schemas/cma-account-period/cma-account-period-closing-summary.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/cma-reconciliation/create-cma-reconciliation.rest.schema.d.ts +3 -2
- package/dist/cjs/schemas/cma-reconciliation/create-cma-reconciliation.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/cma-transaction/cma-transaction-search.rest.schema.d.ts +746 -708
- package/dist/cjs/schemas/cma-transaction/cma-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/common/date/index.d.ts +1 -0
- package/dist/cjs/schemas/common/date/index.d.ts.map +1 -1
- package/dist/cjs/schemas/common/date/string-to-bool.schema.d.ts +4 -0
- package/dist/cjs/schemas/common/date/string-to-bool.schema.d.ts.map +1 -0
- package/dist/cjs/schemas/common/date/string-to-end-of-day.schema.d.ts +1 -1
- package/dist/cjs/schemas/common/date/string-to-end-of-day.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/common/date/string-to-start-of-day.schema.d.ts +1 -1
- package/dist/cjs/schemas/common/date/string-to-start-of-day.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/common/search/bool-filter.schema.d.ts +9 -2
- package/dist/cjs/schemas/common/search/bool-filter.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/common/search/pagination-req.schema.d.ts +2 -2
- package/dist/cjs/schemas/common/search/string-filter.schema.d.ts +28 -5
- package/dist/cjs/schemas/common/search/string-filter.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-reconciliation/create-mta-reconciliation.rest.schema.d.ts +3 -2
- package/dist/cjs/schemas/mta-reconciliation/create-mta-reconciliation.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-transaction/create-mta-transactionrest.schema.d.ts +1 -1
- package/dist/cjs/schemas/mta-transaction/create-mta-transactionrest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/mta-transaction/mta-transaction-search.rest.schema.d.ts +491 -463
- package/dist/cjs/schemas/mta-transaction/mta-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/payout/payout-search.rest.schema.d.ts +140 -135
- package/dist/cjs/schemas/payout/payout-search.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/payout-transaction/payout-transaction-search.rest.schema.d.ts +168 -162
- package/dist/cjs/schemas/payout-transaction/payout-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/property/property-search.rest.schema.d.ts +252 -243
- package/dist/cjs/schemas/property/property-search.rest.schema.d.ts.map +1 -1
- package/dist/cjs/schemas/report/bank-reconciliation-summary.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/common-report-with-cma-selection.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/common-report.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/customer-ledger.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/payment-list.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/project-ledger.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/receipt-list.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/reconciled-items-list.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/trust-trial.rest.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/unknown-receipt-ledger.schema.d.ts +2 -2
- package/dist/cjs/schemas/report/unreconciled-items-list.rest.schema.d.ts +2 -2
- package/dist/esm/index.mjs +89 -72
- package/dist/esm/schemas/cma/cma-search.rest.schemal.d.ts +477 -459
- package/dist/esm/schemas/cma/cma-search.rest.schemal.d.ts.map +1 -1
- package/dist/esm/schemas/cma-account-period/cma-account-period-closing-summary.rest.schema.d.ts +1 -1
- package/dist/esm/schemas/cma-account-period/cma-account-period-closing-summary.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/cma-reconciliation/create-cma-reconciliation.rest.schema.d.ts +3 -2
- package/dist/esm/schemas/cma-reconciliation/create-cma-reconciliation.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/cma-transaction/cma-transaction-search.rest.schema.d.ts +746 -708
- package/dist/esm/schemas/cma-transaction/cma-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/common/date/index.d.ts +1 -0
- package/dist/esm/schemas/common/date/index.d.ts.map +1 -1
- package/dist/esm/schemas/common/date/string-to-bool.schema.d.ts +4 -0
- package/dist/esm/schemas/common/date/string-to-bool.schema.d.ts.map +1 -0
- package/dist/esm/schemas/common/date/string-to-end-of-day.schema.d.ts +1 -1
- package/dist/esm/schemas/common/date/string-to-end-of-day.schema.d.ts.map +1 -1
- package/dist/esm/schemas/common/date/string-to-start-of-day.schema.d.ts +1 -1
- package/dist/esm/schemas/common/date/string-to-start-of-day.schema.d.ts.map +1 -1
- package/dist/esm/schemas/common/search/bool-filter.schema.d.ts +9 -2
- package/dist/esm/schemas/common/search/bool-filter.schema.d.ts.map +1 -1
- package/dist/esm/schemas/common/search/pagination-req.schema.d.ts +2 -2
- package/dist/esm/schemas/common/search/string-filter.schema.d.ts +28 -5
- package/dist/esm/schemas/common/search/string-filter.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-reconciliation/create-mta-reconciliation.rest.schema.d.ts +3 -2
- package/dist/esm/schemas/mta-reconciliation/create-mta-reconciliation.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-transaction/create-mta-transactionrest.schema.d.ts +1 -1
- package/dist/esm/schemas/mta-transaction/create-mta-transactionrest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/mta-transaction/mta-transaction-search.rest.schema.d.ts +491 -463
- package/dist/esm/schemas/mta-transaction/mta-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/payout/payout-search.rest.schema.d.ts +140 -135
- package/dist/esm/schemas/payout/payout-search.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/payout-transaction/payout-transaction-search.rest.schema.d.ts +168 -162
- package/dist/esm/schemas/payout-transaction/payout-transaction-search.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/property/property-search.rest.schema.d.ts +252 -243
- package/dist/esm/schemas/property/property-search.rest.schema.d.ts.map +1 -1
- package/dist/esm/schemas/report/bank-reconciliation-summary.schema.d.ts +2 -2
- package/dist/esm/schemas/report/common-report-with-cma-selection.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/common-report.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/customer-ledger.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/payment-list.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/project-ledger.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/receipt-list.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/reconciled-items-list.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/trust-trial.rest.schema.d.ts +2 -2
- package/dist/esm/schemas/report/unknown-receipt-ledger.schema.d.ts +2 -2
- package/dist/esm/schemas/report/unreconciled-items-list.rest.schema.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2673,6 +2673,7 @@ var __webpack_exports__ = {};
|
|
|
2673
2673
|
mtaToCmaPayoutTargetDetailRestSchema: ()=>mtaToCmaPayoutTargetDetailRestSchema,
|
|
2674
2674
|
payoutTransactionEntitySchema: ()=>payoutTransactionEntitySchema,
|
|
2675
2675
|
safeParseDateFromStr: ()=>safeParseDateFromStr,
|
|
2676
|
+
stringToBoolSchema: ()=>stringToBoolSchema,
|
|
2676
2677
|
createCmaReconciliationRestReqSchema: ()=>createCmaReconciliationRestReqSchema,
|
|
2677
2678
|
cancelCmaTransactionRestReqSchema: ()=>cancelCmaTransactionRestReqSchema,
|
|
2678
2679
|
createMtaRestReqSchema: ()=>createMtaRestReqSchema,
|
|
@@ -4151,12 +4152,25 @@ var __webpack_exports__ = {};
|
|
|
4151
4152
|
endDate: stringToDateSchema,
|
|
4152
4153
|
closingDescription: external_zod_namespaceObject.z.string().optional()
|
|
4153
4154
|
});
|
|
4155
|
+
const stringToEndOfDaySchema = external_zod_namespaceObject.z.union([
|
|
4156
|
+
external_zod_namespaceObject.z.string(),
|
|
4157
|
+
external_zod_namespaceObject.z.date(),
|
|
4158
|
+
external_zod_namespaceObject.z.iso.datetime()
|
|
4159
|
+
]).transform((val, ctx)=>{
|
|
4160
|
+
const { dayjs, isValid, reason } = safeParseDateFromStr(val);
|
|
4161
|
+
if (!isValid) return ctx.issues.push({
|
|
4162
|
+
code: 'invalid_value',
|
|
4163
|
+
message: reason ?? 'Invalid date',
|
|
4164
|
+
input: val.toString(),
|
|
4165
|
+
values: [
|
|
4166
|
+
val.toString()
|
|
4167
|
+
]
|
|
4168
|
+
});
|
|
4169
|
+
return dayjs.endOf('day').toDate();
|
|
4170
|
+
}).pipe(external_zod_namespaceObject.z.date());
|
|
4154
4171
|
const cmaAccountPeriodClosingSummaryRestReqSchema = external_zod_namespaceObject.z.object({
|
|
4155
4172
|
cmaAccountPeriodId: external_zod_namespaceObject.z.uuid(),
|
|
4156
|
-
endDate:
|
|
4157
|
-
external_zod_namespaceObject.z.string(),
|
|
4158
|
-
external_zod_namespaceObject.z.date()
|
|
4159
|
-
]).transform((arg)=>external_dayjs_default()(arg).endOf('day').toDate()).pipe(external_zod_namespaceObject.z.date())
|
|
4173
|
+
endDate: stringToEndOfDaySchema
|
|
4160
4174
|
});
|
|
4161
4175
|
const cmaAccountPeriodClosingSummaryRestResSchema = external_zod_namespaceObject.z.object({
|
|
4162
4176
|
startDate: external_zod_namespaceObject.z.date(),
|
|
@@ -4234,7 +4248,7 @@ var __webpack_exports__ = {};
|
|
|
4234
4248
|
});
|
|
4235
4249
|
const createCmaReconciliationRestReqSchema = external_zod_namespaceObject.z.object({
|
|
4236
4250
|
bankStatementBalanceCents: dollarsToCentsSchema,
|
|
4237
|
-
reconciledTo:
|
|
4251
|
+
reconciledTo: stringToEndOfDaySchema,
|
|
4238
4252
|
cmaAccountPeriodId: external_zod_namespaceObject.z.uuid()
|
|
4239
4253
|
});
|
|
4240
4254
|
const updateCmaOpenReconciliationCurrentBankStatementBalanceRestReqSchema = external_zod_namespaceObject.z.object({
|
|
@@ -4273,15 +4287,39 @@ var __webpack_exports__ = {};
|
|
|
4273
4287
|
]).optional()
|
|
4274
4288
|
});
|
|
4275
4289
|
const paginationReqSchema = external_zod_namespaceObject.z.object({
|
|
4276
|
-
page: external_zod_namespaceObject.z.coerce.number().prefault(1).pipe(external_zod_namespaceObject.z.int().positive()),
|
|
4277
|
-
pageSize: external_zod_namespaceObject.z.coerce.number().pipe(external_zod_namespaceObject.z.int().positive())
|
|
4290
|
+
page: external_zod_namespaceObject.z.coerce.number().prefault(1).pipe(external_zod_namespaceObject.z.int().positive()).optional(),
|
|
4291
|
+
pageSize: external_zod_namespaceObject.z.coerce.number().pipe(external_zod_namespaceObject.z.int().positive()).optional()
|
|
4292
|
+
});
|
|
4293
|
+
const stringToBoolSchema = external_zod_namespaceObject.z.union([
|
|
4294
|
+
external_zod_namespaceObject.z.boolean(),
|
|
4295
|
+
external_zod_namespaceObject.z.string()
|
|
4296
|
+
]).transform((input, ctx)=>{
|
|
4297
|
+
if ('string' == typeof input) {
|
|
4298
|
+
const result = external_zod_namespaceObject.z.stringbool().safeParse(input);
|
|
4299
|
+
if (result.success) return result.data;
|
|
4300
|
+
ctx.issues.push({
|
|
4301
|
+
code: 'invalid_value',
|
|
4302
|
+
message: result.error.message,
|
|
4303
|
+
input,
|
|
4304
|
+
values: [
|
|
4305
|
+
input
|
|
4306
|
+
]
|
|
4307
|
+
});
|
|
4308
|
+
return external_zod_namespaceObject.z.NEVER;
|
|
4309
|
+
}
|
|
4310
|
+
if ('boolean' == typeof input) return input;
|
|
4311
|
+
ctx.issues.push({
|
|
4312
|
+
code: 'invalid_value',
|
|
4313
|
+
message: 'Invalid boolean',
|
|
4314
|
+
input: JSON.stringify(input),
|
|
4315
|
+
values: [
|
|
4316
|
+
JSON.stringify(input)
|
|
4317
|
+
]
|
|
4318
|
+
});
|
|
4319
|
+
return external_zod_namespaceObject.z.NEVER;
|
|
4278
4320
|
});
|
|
4279
4321
|
const boolFilterBaseSchema = external_zod_namespaceObject.z.strictObject({
|
|
4280
|
-
equals:
|
|
4281
|
-
not: external_zod_namespaceObject.z.union([
|
|
4282
|
-
external_zod_namespaceObject.z.boolean(),
|
|
4283
|
-
external_zod_namespaceObject.z.lazy(()=>boolFilterBaseSchema)
|
|
4284
|
-
]).optional()
|
|
4322
|
+
equals: stringToBoolSchema
|
|
4285
4323
|
});
|
|
4286
4324
|
const boolFilterSchema = boolFilterBaseSchema.extend({
|
|
4287
4325
|
not: external_zod_namespaceObject.z.union([
|
|
@@ -4336,11 +4374,11 @@ var __webpack_exports__ = {};
|
|
|
4336
4374
|
]).optional(),
|
|
4337
4375
|
isCanceled: external_zod_namespaceObject.z.union([
|
|
4338
4376
|
external_zod_namespaceObject.z.lazy(()=>boolFilterSchema),
|
|
4339
|
-
external_zod_namespaceObject.z.
|
|
4377
|
+
external_zod_namespaceObject.z.boolean()
|
|
4340
4378
|
]).optional(),
|
|
4341
4379
|
isRefunded: external_zod_namespaceObject.z.union([
|
|
4342
4380
|
external_zod_namespaceObject.z.lazy(()=>boolFilterSchema),
|
|
4343
|
-
external_zod_namespaceObject.z.
|
|
4381
|
+
external_zod_namespaceObject.z.boolean()
|
|
4344
4382
|
]).optional(),
|
|
4345
4383
|
status: external_zod_namespaceObject.z.union([
|
|
4346
4384
|
external_zod_namespaceObject.z.lazy(()=>stringFilterSchema),
|
|
@@ -4357,9 +4395,8 @@ var __webpack_exports__ = {};
|
|
|
4357
4395
|
debitAmountCents: external_zod_namespaceObject.z.union([
|
|
4358
4396
|
external_zod_namespaceObject.z.lazy(()=>bigIntFilterSchema),
|
|
4359
4397
|
external_zod_namespaceObject.z.bigint()
|
|
4360
|
-
]).optional()
|
|
4361
|
-
|
|
4362
|
-
});
|
|
4398
|
+
]).optional()
|
|
4399
|
+
}).and(paginationReqSchema.optional());
|
|
4363
4400
|
const createCmaTransactionRestReqSchema = external_zod_namespaceObject.z.object({
|
|
4364
4401
|
amount: external_zod_namespaceObject.z.number().positive().transform(fromDollarsToCents).pipe(external_zod_namespaceObject.z.bigint()),
|
|
4365
4402
|
clearedAt: stringToDateSchema,
|
|
@@ -4387,22 +4424,6 @@ var __webpack_exports__ = {};
|
|
|
4387
4424
|
const accountNumberValidationSchema = external_zod_namespaceObject.z.coerce.string().min(1, 'Account Number is required').max(9, 'Account Number must be less than 9 digits').regex(/^\d+$/, {
|
|
4388
4425
|
error: 'Account number must be all digits'
|
|
4389
4426
|
});
|
|
4390
|
-
const stringToEndOfDaySchema = external_zod_namespaceObject.z.union([
|
|
4391
|
-
external_zod_namespaceObject.z.string(),
|
|
4392
|
-
external_zod_namespaceObject.z.date(),
|
|
4393
|
-
external_zod_namespaceObject.z.iso.datetime()
|
|
4394
|
-
]).transform((val, ctx)=>{
|
|
4395
|
-
const { dayjs, isValid, reason } = safeParseDateFromStr(val);
|
|
4396
|
-
if (!isValid) return ctx.issues.push({
|
|
4397
|
-
code: 'invalid_value',
|
|
4398
|
-
message: reason ?? 'Invalid date',
|
|
4399
|
-
input: val.toString(),
|
|
4400
|
-
values: [
|
|
4401
|
-
val.toString()
|
|
4402
|
-
]
|
|
4403
|
-
});
|
|
4404
|
-
return dayjs.endOf('day').toDate();
|
|
4405
|
-
});
|
|
4406
4427
|
const stringToStartOfDaySchema = external_zod_namespaceObject.z.union([
|
|
4407
4428
|
external_zod_namespaceObject.z.string(),
|
|
4408
4429
|
external_zod_namespaceObject.z.date(),
|
|
@@ -4418,7 +4439,7 @@ var __webpack_exports__ = {};
|
|
|
4418
4439
|
]
|
|
4419
4440
|
});
|
|
4420
4441
|
return dayjs.startOf('day').toDate();
|
|
4421
|
-
});
|
|
4442
|
+
}).pipe(external_zod_namespaceObject.z.date());
|
|
4422
4443
|
const InputJsonValueSchema = external_zod_namespaceObject.z.lazy(()=>external_zod_namespaceObject.z.union([
|
|
4423
4444
|
external_zod_namespaceObject.z.string(),
|
|
4424
4445
|
external_zod_namespaceObject.z.number(),
|
|
@@ -4775,10 +4796,7 @@ var __webpack_exports__ = {};
|
|
|
4775
4796
|
});
|
|
4776
4797
|
const createMtaReconciliationRestReqSchema = external_zod_namespaceObject.z.object({
|
|
4777
4798
|
bankStatementBalanceCents: dollarsToCentsSchema,
|
|
4778
|
-
reconciledTo:
|
|
4779
|
-
external_zod_namespaceObject.z.string(),
|
|
4780
|
-
external_zod_namespaceObject.z.date()
|
|
4781
|
-
]).transform((arg)=>external_dayjs_default()(arg).endOf('day').toDate()).pipe(external_zod_namespaceObject.z.coerce.date()),
|
|
4799
|
+
reconciledTo: stringToEndOfDaySchema,
|
|
4782
4800
|
mtaAccountPeriodId: external_zod_namespaceObject.z.uuid()
|
|
4783
4801
|
});
|
|
4784
4802
|
const updateOpenReconciliationCurrentBankStatementBalanceRestReqSchema = external_zod_namespaceObject.z.object({
|
|
@@ -4802,7 +4820,7 @@ var __webpack_exports__ = {};
|
|
|
4802
4820
|
});
|
|
4803
4821
|
const createMtaTransactionRestReqSchema = external_zod_namespaceObject.z.object({
|
|
4804
4822
|
amount: external_zod_namespaceObject.z.number().positive().transform(fromDollarsToCents).pipe(external_zod_namespaceObject.z.bigint()),
|
|
4805
|
-
clearedAt:
|
|
4823
|
+
clearedAt: stringToDateSchema,
|
|
4806
4824
|
description: external_zod_namespaceObject.z.string().transform((val)=>val.trim()),
|
|
4807
4825
|
inputType: external_zod_namespaceObject.z["enum"](mta_input_type_constant_MtaTransactionInputType),
|
|
4808
4826
|
transactionType: external_zod_namespaceObject.z["enum"](MtaTransactionType),
|
|
@@ -4854,11 +4872,11 @@ var __webpack_exports__ = {};
|
|
|
4854
4872
|
]).optional(),
|
|
4855
4873
|
isCanceled: external_zod_namespaceObject.z.union([
|
|
4856
4874
|
external_zod_namespaceObject.z.lazy(()=>boolFilterSchema),
|
|
4857
|
-
external_zod_namespaceObject.z.
|
|
4875
|
+
external_zod_namespaceObject.z.boolean()
|
|
4858
4876
|
]).optional(),
|
|
4859
4877
|
isRefunded: external_zod_namespaceObject.z.union([
|
|
4860
4878
|
external_zod_namespaceObject.z.lazy(()=>boolFilterSchema),
|
|
4861
|
-
external_zod_namespaceObject.z.
|
|
4879
|
+
external_zod_namespaceObject.z.boolean()
|
|
4862
4880
|
]).optional(),
|
|
4863
4881
|
mtaId: external_zod_namespaceObject.z.union([
|
|
4864
4882
|
external_zod_namespaceObject.z.lazy(()=>stringFilterSchema),
|
|
@@ -5755,7 +5773,7 @@ var __webpack_exports__ = {};
|
|
|
5755
5773
|
asap,
|
|
5756
5774
|
isIterable
|
|
5757
5775
|
};
|
|
5758
|
-
function
|
|
5776
|
+
function AxiosError(message, code, config, request, response) {
|
|
5759
5777
|
Error.call(this);
|
|
5760
5778
|
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
5761
5779
|
else this.stack = new Error().stack;
|
|
@@ -5769,7 +5787,7 @@ var __webpack_exports__ = {};
|
|
|
5769
5787
|
this.status = response.status ? response.status : null;
|
|
5770
5788
|
}
|
|
5771
5789
|
}
|
|
5772
|
-
utils.inherits(
|
|
5790
|
+
utils.inherits(AxiosError, Error, {
|
|
5773
5791
|
toJSON: function() {
|
|
5774
5792
|
return {
|
|
5775
5793
|
message: this.message,
|
|
@@ -5786,7 +5804,7 @@ var __webpack_exports__ = {};
|
|
|
5786
5804
|
};
|
|
5787
5805
|
}
|
|
5788
5806
|
});
|
|
5789
|
-
const AxiosError_prototype =
|
|
5807
|
+
const AxiosError_prototype = AxiosError.prototype;
|
|
5790
5808
|
const AxiosError_descriptors = {};
|
|
5791
5809
|
[
|
|
5792
5810
|
'ERR_BAD_OPTION_VALUE',
|
|
@@ -5806,22 +5824,22 @@ var __webpack_exports__ = {};
|
|
|
5806
5824
|
value: code
|
|
5807
5825
|
};
|
|
5808
5826
|
});
|
|
5809
|
-
Object.defineProperties(
|
|
5827
|
+
Object.defineProperties(AxiosError, AxiosError_descriptors);
|
|
5810
5828
|
Object.defineProperty(AxiosError_prototype, 'isAxiosError', {
|
|
5811
5829
|
value: true
|
|
5812
5830
|
});
|
|
5813
|
-
|
|
5831
|
+
AxiosError.from = (error, code, config, request, response, customProps)=>{
|
|
5814
5832
|
const axiosError = Object.create(AxiosError_prototype);
|
|
5815
5833
|
utils.toFlatObject(error, axiosError, function(obj) {
|
|
5816
5834
|
return obj !== Error.prototype;
|
|
5817
5835
|
}, (prop)=>'isAxiosError' !== prop);
|
|
5818
|
-
|
|
5836
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
5819
5837
|
axiosError.cause = error;
|
|
5820
5838
|
axiosError.name = error.name;
|
|
5821
5839
|
customProps && Object.assign(axiosError, customProps);
|
|
5822
5840
|
return axiosError;
|
|
5823
5841
|
};
|
|
5824
|
-
const
|
|
5842
|
+
const core_AxiosError = AxiosError;
|
|
5825
5843
|
var form_data = __webpack_require__("./node_modules/.pnpm/form-data@4.0.4/node_modules/form-data/lib/form_data.js");
|
|
5826
5844
|
const classes_FormData = form_data;
|
|
5827
5845
|
function isVisitable(thing) {
|
|
@@ -5864,7 +5882,7 @@ var __webpack_exports__ = {};
|
|
|
5864
5882
|
if (null === value) return '';
|
|
5865
5883
|
if (utils.isDate(value)) return value.toISOString();
|
|
5866
5884
|
if (utils.isBoolean(value)) return value.toString();
|
|
5867
|
-
if (!useBlob && utils.isBlob(value)) throw new
|
|
5885
|
+
if (!useBlob && utils.isBlob(value)) throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
5868
5886
|
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) return useBlob && 'function' == typeof Blob ? new Blob([
|
|
5869
5887
|
value
|
|
5870
5888
|
]) : Buffer.from(value);
|
|
@@ -6161,7 +6179,7 @@ var __webpack_exports__ = {};
|
|
|
6161
6179
|
return JSON.parse(data);
|
|
6162
6180
|
} catch (e) {
|
|
6163
6181
|
if (strictJSONParsing) {
|
|
6164
|
-
if ('SyntaxError' === e.name) throw
|
|
6182
|
+
if ('SyntaxError' === e.name) throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
6165
6183
|
throw e;
|
|
6166
6184
|
}
|
|
6167
6185
|
}
|
|
@@ -6458,19 +6476,19 @@ var __webpack_exports__ = {};
|
|
|
6458
6476
|
return !!(value && value.__CANCEL__);
|
|
6459
6477
|
}
|
|
6460
6478
|
function CanceledError(message, config, request) {
|
|
6461
|
-
|
|
6479
|
+
core_AxiosError.call(this, null == message ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
|
|
6462
6480
|
this.name = 'CanceledError';
|
|
6463
6481
|
}
|
|
6464
|
-
utils.inherits(CanceledError,
|
|
6482
|
+
utils.inherits(CanceledError, core_AxiosError, {
|
|
6465
6483
|
__CANCEL__: true
|
|
6466
6484
|
});
|
|
6467
6485
|
const cancel_CanceledError = CanceledError;
|
|
6468
6486
|
function settle(resolve, reject, response) {
|
|
6469
6487
|
const validateStatus = response.config.validateStatus;
|
|
6470
6488
|
if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response);
|
|
6471
|
-
else reject(new
|
|
6472
|
-
|
|
6473
|
-
|
|
6489
|
+
else reject(new core_AxiosError('Request failed with status code ' + response.status, [
|
|
6490
|
+
core_AxiosError.ERR_BAD_REQUEST,
|
|
6491
|
+
core_AxiosError.ERR_BAD_RESPONSE
|
|
6474
6492
|
][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
6475
6493
|
}
|
|
6476
6494
|
function isAbsoluteURL(url) {
|
|
@@ -6503,13 +6521,13 @@ var __webpack_exports__ = {};
|
|
|
6503
6521
|
if ('data' === protocol) {
|
|
6504
6522
|
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
6505
6523
|
const match = DATA_URL_PATTERN.exec(uri);
|
|
6506
|
-
if (!match) throw new
|
|
6524
|
+
if (!match) throw new core_AxiosError('Invalid URL', core_AxiosError.ERR_INVALID_URL);
|
|
6507
6525
|
const mime = match[1];
|
|
6508
6526
|
const isBase64 = match[2];
|
|
6509
6527
|
const body = match[3];
|
|
6510
6528
|
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
|
|
6511
6529
|
if (asBlob) {
|
|
6512
|
-
if (!_Blob) throw new
|
|
6530
|
+
if (!_Blob) throw new core_AxiosError('Blob is not supported', core_AxiosError.ERR_NOT_SUPPORT);
|
|
6513
6531
|
return new _Blob([
|
|
6514
6532
|
buffer
|
|
6515
6533
|
], {
|
|
@@ -6518,7 +6536,7 @@ var __webpack_exports__ = {};
|
|
|
6518
6536
|
}
|
|
6519
6537
|
return buffer;
|
|
6520
6538
|
}
|
|
6521
|
-
throw new
|
|
6539
|
+
throw new core_AxiosError('Unsupported protocol ' + protocol, core_AxiosError.ERR_NOT_SUPPORT);
|
|
6522
6540
|
}
|
|
6523
6541
|
var external_stream_ = __webpack_require__("stream");
|
|
6524
6542
|
const kInternals = Symbol('internals');
|
|
@@ -6946,7 +6964,7 @@ var __webpack_exports__ = {};
|
|
|
6946
6964
|
Blob: config.env && config.env.Blob
|
|
6947
6965
|
});
|
|
6948
6966
|
} catch (err) {
|
|
6949
|
-
throw
|
|
6967
|
+
throw core_AxiosError.from(err, core_AxiosError.ERR_BAD_REQUEST, config);
|
|
6950
6968
|
}
|
|
6951
6969
|
if ('text' === responseType) {
|
|
6952
6970
|
convertedData = convertedData.toString(responseEncoding);
|
|
@@ -6960,7 +6978,7 @@ var __webpack_exports__ = {};
|
|
|
6960
6978
|
config
|
|
6961
6979
|
});
|
|
6962
6980
|
}
|
|
6963
|
-
if (-1 === supportedProtocols.indexOf(protocol)) return reject(new
|
|
6981
|
+
if (-1 === supportedProtocols.indexOf(protocol)) return reject(new core_AxiosError('Unsupported protocol ' + protocol, core_AxiosError.ERR_BAD_REQUEST, config));
|
|
6964
6982
|
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
6965
6983
|
headers.set('User-Agent', 'axios/' + VERSION, false);
|
|
6966
6984
|
const { onUploadProgress, onDownloadProgress } = config;
|
|
@@ -6989,11 +7007,11 @@ var __webpack_exports__ = {};
|
|
|
6989
7007
|
if (Buffer.isBuffer(data)) ;
|
|
6990
7008
|
else if (utils.isArrayBuffer(data)) data = Buffer.from(new Uint8Array(data));
|
|
6991
7009
|
else {
|
|
6992
|
-
if (!utils.isString(data)) return reject(new
|
|
7010
|
+
if (!utils.isString(data)) return reject(new core_AxiosError('Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', core_AxiosError.ERR_BAD_REQUEST, config));
|
|
6993
7011
|
data = Buffer.from(data, 'utf-8');
|
|
6994
7012
|
}
|
|
6995
7013
|
headers.setContentLength(data.length, false);
|
|
6996
|
-
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new
|
|
7014
|
+
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new core_AxiosError('Request body larger than maxBodyLength limit', core_AxiosError.ERR_BAD_REQUEST, config));
|
|
6997
7015
|
}
|
|
6998
7016
|
const contentLength = utils.toFiniteNumber(headers.getContentLength());
|
|
6999
7017
|
if (utils.isArray(maxRate)) {
|
|
@@ -7130,18 +7148,18 @@ var __webpack_exports__ = {};
|
|
|
7130
7148
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
7131
7149
|
rejected = true;
|
|
7132
7150
|
responseStream.destroy();
|
|
7133
|
-
reject(new
|
|
7151
|
+
reject(new core_AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', core_AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
7134
7152
|
}
|
|
7135
7153
|
});
|
|
7136
7154
|
responseStream.on('aborted', function() {
|
|
7137
7155
|
if (rejected) return;
|
|
7138
|
-
const err = new
|
|
7156
|
+
const err = new core_AxiosError('stream has been aborted', core_AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
7139
7157
|
responseStream.destroy(err);
|
|
7140
7158
|
reject(err);
|
|
7141
7159
|
});
|
|
7142
7160
|
responseStream.on('error', function(err) {
|
|
7143
7161
|
if (req.destroyed) return;
|
|
7144
|
-
reject(
|
|
7162
|
+
reject(core_AxiosError.from(err, null, config, lastRequest));
|
|
7145
7163
|
});
|
|
7146
7164
|
responseStream.on('end', function() {
|
|
7147
7165
|
try {
|
|
@@ -7152,7 +7170,7 @@ var __webpack_exports__ = {};
|
|
|
7152
7170
|
}
|
|
7153
7171
|
response.data = responseData;
|
|
7154
7172
|
} catch (err) {
|
|
7155
|
-
return reject(
|
|
7173
|
+
return reject(core_AxiosError.from(err, null, config, response.request, response));
|
|
7156
7174
|
}
|
|
7157
7175
|
settle(resolve, reject, response);
|
|
7158
7176
|
});
|
|
@@ -7169,20 +7187,20 @@ var __webpack_exports__ = {};
|
|
|
7169
7187
|
req.destroy(err);
|
|
7170
7188
|
});
|
|
7171
7189
|
req.on('error', function(err) {
|
|
7172
|
-
reject(
|
|
7190
|
+
reject(core_AxiosError.from(err, null, config, req));
|
|
7173
7191
|
});
|
|
7174
7192
|
req.on('socket', function(socket) {
|
|
7175
7193
|
socket.setKeepAlive(true, 60000);
|
|
7176
7194
|
});
|
|
7177
7195
|
if (config.timeout) {
|
|
7178
7196
|
const timeout = parseInt(config.timeout, 10);
|
|
7179
|
-
if (Number.isNaN(timeout)) return void reject(new
|
|
7197
|
+
if (Number.isNaN(timeout)) return void reject(new core_AxiosError('error trying to parse `config.timeout` to int', core_AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
7180
7198
|
req.setTimeout(timeout, function() {
|
|
7181
7199
|
if (isDone) return;
|
|
7182
7200
|
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
7183
7201
|
const transitional = config.transitional || defaults_transitional;
|
|
7184
7202
|
if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage;
|
|
7185
|
-
reject(new
|
|
7203
|
+
reject(new core_AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED, config, req));
|
|
7186
7204
|
abort();
|
|
7187
7205
|
});
|
|
7188
7206
|
}
|
|
@@ -7376,18 +7394,18 @@ var __webpack_exports__ = {};
|
|
|
7376
7394
|
};
|
|
7377
7395
|
request.onabort = function() {
|
|
7378
7396
|
if (!request) return;
|
|
7379
|
-
reject(new
|
|
7397
|
+
reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
|
|
7380
7398
|
request = null;
|
|
7381
7399
|
};
|
|
7382
7400
|
request.onerror = function() {
|
|
7383
|
-
reject(new
|
|
7401
|
+
reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
|
|
7384
7402
|
request = null;
|
|
7385
7403
|
};
|
|
7386
7404
|
request.ontimeout = function() {
|
|
7387
7405
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
7388
7406
|
const transitional = _config.transitional || defaults_transitional;
|
|
7389
7407
|
if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
7390
|
-
reject(new
|
|
7408
|
+
reject(new core_AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED, config, request));
|
|
7391
7409
|
request = null;
|
|
7392
7410
|
};
|
|
7393
7411
|
void 0 === requestData && requestHeaders.setContentType(null);
|
|
@@ -7416,7 +7434,7 @@ var __webpack_exports__ = {};
|
|
|
7416
7434
|
if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
7417
7435
|
}
|
|
7418
7436
|
const protocol = parseProtocol(_config.url);
|
|
7419
|
-
if (protocol && -1 === platform.protocols.indexOf(protocol)) return void reject(new
|
|
7437
|
+
if (protocol && -1 === platform.protocols.indexOf(protocol)) return void reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
|
|
7420
7438
|
request.send(requestData || null);
|
|
7421
7439
|
});
|
|
7422
7440
|
};
|
|
@@ -7430,12 +7448,12 @@ var __webpack_exports__ = {};
|
|
|
7430
7448
|
aborted = true;
|
|
7431
7449
|
unsubscribe();
|
|
7432
7450
|
const err = reason instanceof Error ? reason : this.reason;
|
|
7433
|
-
controller.abort(err instanceof
|
|
7451
|
+
controller.abort(err instanceof core_AxiosError ? err : new cancel_CanceledError(err instanceof Error ? err.message : err));
|
|
7434
7452
|
}
|
|
7435
7453
|
};
|
|
7436
7454
|
let timer = timeout && setTimeout(()=>{
|
|
7437
7455
|
timer = null;
|
|
7438
|
-
onabort(new
|
|
7456
|
+
onabort(new core_AxiosError(`timeout ${timeout} of ms exceeded`, core_AxiosError.ETIMEDOUT));
|
|
7439
7457
|
}, timeout);
|
|
7440
7458
|
const unsubscribe = ()=>{
|
|
7441
7459
|
if (signals) {
|
|
@@ -7555,7 +7573,7 @@ var __webpack_exports__ = {};
|
|
|
7555
7573
|
'stream'
|
|
7556
7574
|
].forEach((type)=>{
|
|
7557
7575
|
resolvers[type] || (resolvers[type] = utils.isFunction(res[type]) ? (res)=>res[type]() : (_, config)=>{
|
|
7558
|
-
throw new
|
|
7576
|
+
throw new core_AxiosError(`Response type '${type}' is not supported`, core_AxiosError.ERR_NOT_SUPPORT, config);
|
|
7559
7577
|
});
|
|
7560
7578
|
});
|
|
7561
7579
|
})(new Response);
|
|
@@ -7647,10 +7665,10 @@ var __webpack_exports__ = {};
|
|
|
7647
7665
|
});
|
|
7648
7666
|
} catch (err) {
|
|
7649
7667
|
unsubscribe && unsubscribe();
|
|
7650
|
-
if (err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new
|
|
7668
|
+
if (err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request), {
|
|
7651
7669
|
cause: err.cause || err
|
|
7652
7670
|
});
|
|
7653
|
-
throw
|
|
7671
|
+
throw core_AxiosError.from(err, err && err.code, config, request);
|
|
7654
7672
|
}
|
|
7655
7673
|
});
|
|
7656
7674
|
const knownAdapters = {
|
|
@@ -7687,7 +7705,7 @@ var __webpack_exports__ = {};
|
|
|
7687
7705
|
adapter = nameOrAdapter;
|
|
7688
7706
|
if (!isResolvedHandle(nameOrAdapter)) {
|
|
7689
7707
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
7690
|
-
if (void 0 === adapter) throw new
|
|
7708
|
+
if (void 0 === adapter) throw new core_AxiosError(`Unknown adapter '${id}'`);
|
|
7691
7709
|
}
|
|
7692
7710
|
if (adapter) break;
|
|
7693
7711
|
rejectedReasons[id || '#' + i] = adapter;
|
|
@@ -7695,7 +7713,7 @@ var __webpack_exports__ = {};
|
|
|
7695
7713
|
if (!adapter) {
|
|
7696
7714
|
const reasons = Object.entries(rejectedReasons).map(([id, state])=>`adapter ${id} ` + (false === state ? 'is not supported by the environment' : 'is not available in the build'));
|
|
7697
7715
|
let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
7698
|
-
throw new
|
|
7716
|
+
throw new core_AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
|
|
7699
7717
|
}
|
|
7700
7718
|
return adapter;
|
|
7701
7719
|
},
|
|
@@ -7750,7 +7768,7 @@ var __webpack_exports__ = {};
|
|
|
7750
7768
|
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
7751
7769
|
}
|
|
7752
7770
|
return (value, opt, opts)=>{
|
|
7753
|
-
if (false === validator) throw new
|
|
7771
|
+
if (false === validator) throw new core_AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), core_AxiosError.ERR_DEPRECATED);
|
|
7754
7772
|
if (version && !deprecatedWarnings[opt]) {
|
|
7755
7773
|
deprecatedWarnings[opt] = true;
|
|
7756
7774
|
console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'));
|
|
@@ -7765,7 +7783,7 @@ var __webpack_exports__ = {};
|
|
|
7765
7783
|
};
|
|
7766
7784
|
};
|
|
7767
7785
|
function assertOptions(options, schema, allowUnknown) {
|
|
7768
|
-
if ('object' != typeof options) throw new
|
|
7786
|
+
if ('object' != typeof options) throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE);
|
|
7769
7787
|
const keys = Object.keys(options);
|
|
7770
7788
|
let i = keys.length;
|
|
7771
7789
|
while(i-- > 0){
|
|
@@ -7774,10 +7792,10 @@ var __webpack_exports__ = {};
|
|
|
7774
7792
|
if (validator) {
|
|
7775
7793
|
const value = options[opt];
|
|
7776
7794
|
const result = void 0 === value || validator(value, opt, options);
|
|
7777
|
-
if (true !== result) throw new
|
|
7795
|
+
if (true !== result) throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE);
|
|
7778
7796
|
continue;
|
|
7779
7797
|
}
|
|
7780
|
-
if (true !== allowUnknown) throw new
|
|
7798
|
+
if (true !== allowUnknown) throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION);
|
|
7781
7799
|
}
|
|
7782
7800
|
}
|
|
7783
7801
|
const helpers_validator = {
|
|
@@ -8105,7 +8123,7 @@ var __webpack_exports__ = {};
|
|
|
8105
8123
|
axios.isCancel = isCancel;
|
|
8106
8124
|
axios.VERSION = VERSION;
|
|
8107
8125
|
axios.toFormData = helpers_toFormData;
|
|
8108
|
-
axios.AxiosError =
|
|
8126
|
+
axios.AxiosError = core_AxiosError;
|
|
8109
8127
|
axios.Cancel = axios.CanceledError;
|
|
8110
8128
|
axios.all = function(promises) {
|
|
8111
8129
|
return Promise.all(promises);
|
|
@@ -8446,6 +8464,7 @@ exports.simpleStringFilterSchema = __webpack_exports__.simpleStringFilterSchema;
|
|
|
8446
8464
|
exports.sortReqSchema = __webpack_exports__.sortReqSchema;
|
|
8447
8465
|
exports.stateCodeSchema = __webpack_exports__.stateCodeSchema;
|
|
8448
8466
|
exports.stringFilterSchema = __webpack_exports__.stringFilterSchema;
|
|
8467
|
+
exports.stringToBoolSchema = __webpack_exports__.stringToBoolSchema;
|
|
8449
8468
|
exports.stringToDateSchema = __webpack_exports__.stringToDateSchema;
|
|
8450
8469
|
exports.stringToEndOfDaySchema = __webpack_exports__.stringToEndOfDaySchema;
|
|
8451
8470
|
exports.stringToStartOfDaySchema = __webpack_exports__.stringToStartOfDaySchema;
|
|
@@ -8704,6 +8723,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
|
8704
8723
|
"sortReqSchema",
|
|
8705
8724
|
"stateCodeSchema",
|
|
8706
8725
|
"stringFilterSchema",
|
|
8726
|
+
"stringToBoolSchema",
|
|
8707
8727
|
"stringToDateSchema",
|
|
8708
8728
|
"stringToEndOfDaySchema",
|
|
8709
8729
|
"stringToStartOfDaySchema",
|