@zajno/common 2.3.17 → 2.4.0
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/cjs/api/call.js +61 -0
- package/cjs/api/call.js.map +1 -0
- package/cjs/api/endpoint.js.map +1 -0
- package/cjs/api/endpoint.types.js.map +1 -0
- package/cjs/api/error.js.map +1 -0
- package/cjs/api/helpers.js +29 -0
- package/cjs/api/helpers.js.map +1 -0
- package/cjs/api/index.js.map +1 -0
- package/cjs/api/logging.js.map +1 -0
- package/cjs/api/methods.js.map +1 -0
- package/cjs/api/processor.js.map +1 -0
- package/cjs/api/register.js +25 -0
- package/cjs/api/register.js.map +1 -0
- package/cjs/api/statusCodes.js.map +1 -0
- package/cjs/async/arrays.js +38 -0
- package/cjs/async/arrays.js.map +1 -0
- package/cjs/async/misc.js +26 -0
- package/cjs/async/misc.js.map +1 -0
- package/cjs/async/timeout.js +63 -0
- package/cjs/async/timeout.js.map +1 -0
- package/cjs/dates/calc.js +62 -0
- package/cjs/dates/calc.js.map +1 -0
- package/cjs/dates/calendarIndex.js +85 -0
- package/cjs/dates/calendarIndex.js.map +1 -0
- package/cjs/dates/convert.js +127 -0
- package/cjs/dates/convert.js.map +1 -0
- package/cjs/dates/datex.js +101 -0
- package/cjs/dates/datex.js.map +1 -0
- package/cjs/dates/decompose.js +43 -0
- package/cjs/dates/decompose.js.map +1 -0
- package/cjs/dates/format.js.map +1 -0
- package/cjs/dates/index.js.map +1 -0
- package/cjs/dates/parse.js +49 -0
- package/cjs/dates/parse.js.map +1 -0
- package/cjs/dates/period.js.map +1 -0
- package/cjs/dates/shift.js +96 -0
- package/cjs/dates/shift.js.map +1 -0
- package/cjs/dates/types.js.map +1 -0
- package/cjs/dates/tz.js.map +1 -0
- package/cjs/dates/yearDate.js.map +1 -0
- package/cjs/fields/filter.js +28 -0
- package/cjs/fields/filter.js.map +1 -0
- package/cjs/fields/index.js.map +1 -0
- package/cjs/fields/skip.js.map +1 -0
- package/cjs/fields/transfer.js +46 -0
- package/cjs/fields/transfer.js.map +1 -0
- package/cjs/fields/update.js +78 -0
- package/cjs/fields/update.js.map +1 -0
- package/cjs/functions/assert.js +20 -0
- package/cjs/functions/assert.js.map +1 -0
- package/cjs/functions/disposer.js +73 -0
- package/cjs/functions/disposer.js.map +1 -0
- package/cjs/functions/disposer.symbols.js +29 -0
- package/cjs/functions/disposer.symbols.js.map +1 -0
- package/cjs/functions/safe.js +7 -0
- package/cjs/functions/safe.js.map +1 -0
- package/cjs/functions/throttle.js.map +1 -0
- package/cjs/lazy/light.js +23 -0
- package/cjs/lazy/light.js.map +1 -0
- package/cjs/lazy/promise.js +72 -0
- package/cjs/lazy/promise.js.map +1 -0
- package/cjs/lazy/singleton.js +69 -0
- package/cjs/lazy/singleton.js.map +1 -0
- package/cjs/lazy/types.js.map +1 -0
- package/cjs/logger/abstractions.js.map +1 -0
- package/cjs/logger/batch.js +11 -0
- package/cjs/logger/batch.js.map +1 -0
- package/cjs/logger/console.js.map +1 -0
- package/cjs/logger/file.js.map +1 -0
- package/cjs/logger/index.js +28 -0
- package/cjs/logger/index.js.map +1 -0
- package/cjs/logger/manager.js +89 -0
- package/cjs/logger/manager.js.map +1 -0
- package/cjs/logger/named.js.map +1 -0
- package/cjs/logger/proxy.js.map +1 -0
- package/cjs/math/arrays.js +289 -0
- package/cjs/math/arrays.js.map +1 -0
- package/cjs/math/calc.js +84 -0
- package/cjs/math/calc.js.map +1 -0
- package/cjs/math/distribution.js +15 -0
- package/cjs/math/distribution.js.map +1 -0
- package/cjs/math/index.js +29 -0
- package/cjs/math/index.js.map +1 -0
- package/cjs/math/object/helpers.js +28 -0
- package/cjs/math/object/helpers.js.map +1 -0
- package/cjs/math/object/index.js.map +1 -0
- package/cjs/math/object/math.composite.js.map +1 -0
- package/cjs/math/object/math.js.map +1 -0
- package/cjs/math/object/ops.composite.js.map +1 -0
- package/cjs/math/object/ops.js.map +1 -0
- package/cjs/math/object/types.js.map +1 -0
- package/cjs/models/EntityWithStatus.js.map +1 -0
- package/cjs/models/File.js.map +1 -0
- package/cjs/models/Model.js.map +1 -0
- package/cjs/models/ValuesCollector.js.map +1 -0
- package/cjs/models/types.js.map +1 -0
- package/cjs/models/wrappers.js +79 -0
- package/cjs/models/wrappers.js.map +1 -0
- package/cjs/observing/event.js +99 -0
- package/cjs/observing/event.js.map +1 -0
- package/cjs/observing/event.late.js.map +1 -0
- package/cjs/observing/progressTracker.js.map +1 -0
- package/cjs/observing/throttledEvent.js.map +1 -0
- package/cjs/observing/timer.js.map +1 -0
- package/cjs/package.json +3 -0
- package/cjs/storage/index.js.map +1 -0
- package/cjs/storage/types.js.map +1 -0
- package/cjs/storage/wrappers.js.map +1 -0
- package/cjs/structures/expire.js +22 -0
- package/cjs/structures/expire.js.map +1 -0
- package/cjs/structures/helpers/enum.js.map +1 -0
- package/cjs/structures/helpers/name.js.map +1 -0
- package/cjs/structures/linkedList.js.map +1 -0
- package/cjs/structures/nameof.js +26 -0
- package/cjs/structures/nameof.js.map +1 -0
- package/cjs/structures/path/builder.js +170 -0
- package/cjs/structures/path/builder.js.map +1 -0
- package/cjs/structures/path/index.js.map +1 -0
- package/cjs/structures/path/types.js +3 -0
- package/cjs/structures/path/types.js.map +1 -0
- package/cjs/structures/path/utils.js +61 -0
- package/cjs/structures/path/utils.js.map +1 -0
- package/cjs/structures/pool.js.map +1 -0
- package/cjs/structures/promiseCache.js.map +1 -0
- package/cjs/structures/promiseExtended.js +195 -0
- package/cjs/structures/promiseExtended.js.map +1 -0
- package/cjs/structures/promiseProxy.js +92 -0
- package/cjs/structures/promiseProxy.js.map +1 -0
- package/cjs/structures/queue/parallel.js.map +1 -0
- package/cjs/structures/queue/tasks.js.map +1 -0
- package/cjs/structures/subscribersMap.js.map +1 -0
- package/cjs/structures/tempoCache.js +59 -0
- package/cjs/structures/tempoCache.js.map +1 -0
- package/cjs/types/arrays.js +11 -0
- package/cjs/types/arrays.js.map +1 -0
- package/cjs/types/comparator.js.map +1 -0
- package/cjs/types/deep.js.map +1 -0
- package/cjs/types/functions.js.map +1 -0
- package/cjs/types/getter.js +26 -0
- package/cjs/types/getter.js.map +1 -0
- package/cjs/types/ident.js.map +1 -0
- package/cjs/types/index.js.map +1 -0
- package/cjs/types/misc.js.map +1 -0
- package/cjs/validation/ValidationErrors.js.map +1 -0
- package/cjs/validation/creditCard.js.map +1 -0
- package/cjs/validation/emails.js +11 -0
- package/cjs/validation/emails.js.map +1 -0
- package/cjs/validation/helpers.js +77 -0
- package/cjs/validation/helpers.js.map +1 -0
- package/cjs/validation/index.js.map +1 -0
- package/cjs/validation/throwers.js +33 -0
- package/cjs/validation/throwers.js.map +1 -0
- package/cjs/validation/types.js.map +1 -0
- package/cjs/validation/validators.js.map +1 -0
- package/cjs/validation/wrappers.js.map +1 -0
- package/esm/api/call.js +58 -0
- package/esm/api/call.js.map +1 -0
- package/esm/api/endpoint.js +65 -0
- package/esm/api/endpoint.js.map +1 -0
- package/esm/api/endpoint.types.js +8 -0
- package/esm/api/endpoint.types.js.map +1 -0
- package/esm/api/error.js +31 -0
- package/esm/api/error.js.map +1 -0
- package/esm/api/helpers.js +22 -0
- package/esm/api/helpers.js.map +1 -0
- package/esm/api/index.js +7 -0
- package/esm/api/index.js.map +1 -0
- package/esm/api/logging.js +25 -0
- package/esm/api/logging.js.map +1 -0
- package/esm/api/methods.js +8 -0
- package/esm/api/methods.js.map +1 -0
- package/esm/api/processor.js +46 -0
- package/esm/api/processor.js.map +1 -0
- package/esm/api/register.js +19 -0
- package/esm/api/register.js.map +1 -0
- package/esm/api/statusCodes.js +18 -0
- package/esm/api/statusCodes.js.map +1 -0
- package/esm/async/arrays.js +32 -0
- package/esm/async/arrays.js.map +1 -0
- package/esm/async/misc.js +21 -0
- package/esm/async/misc.js.map +1 -0
- package/esm/async/timeout.js +58 -0
- package/esm/async/timeout.js.map +1 -0
- package/esm/dates/calc.js +53 -0
- package/esm/dates/calc.js.map +1 -0
- package/esm/dates/calendarIndex.js +79 -0
- package/esm/dates/calendarIndex.js.map +1 -0
- package/esm/dates/convert.js +115 -0
- package/esm/dates/convert.js.map +1 -0
- package/esm/dates/datex.js +97 -0
- package/esm/dates/datex.js.map +1 -0
- package/esm/dates/decompose.js +39 -0
- package/esm/dates/decompose.js.map +1 -0
- package/esm/dates/format.js +121 -0
- package/esm/dates/format.js.map +1 -0
- package/esm/dates/index.js +11 -0
- package/esm/dates/index.js.map +1 -0
- package/esm/dates/parse.js +44 -0
- package/esm/dates/parse.js.map +1 -0
- package/esm/dates/period.js +22 -0
- package/esm/dates/period.js.map +1 -0
- package/esm/dates/shift.js +88 -0
- package/esm/dates/shift.js.map +1 -0
- package/esm/dates/types.js +48 -0
- package/esm/dates/types.js.map +1 -0
- package/esm/dates/tz.js +49 -0
- package/esm/dates/tz.js.map +1 -0
- package/esm/dates/yearDate.js +35 -0
- package/esm/dates/yearDate.js.map +1 -0
- package/esm/fields/filter.js +25 -0
- package/esm/fields/filter.js.map +1 -0
- package/esm/fields/index.js +4 -0
- package/esm/fields/index.js.map +1 -0
- package/esm/fields/skip.js +29 -0
- package/esm/fields/skip.js.map +1 -0
- package/esm/fields/transfer.js +41 -0
- package/esm/fields/transfer.js.map +1 -0
- package/esm/fields/update.js +73 -0
- package/esm/fields/update.js.map +1 -0
- package/esm/functions/assert.js +16 -0
- package/esm/functions/assert.js.map +1 -0
- package/esm/functions/disposer.js +66 -0
- package/esm/functions/disposer.js.map +1 -0
- package/esm/functions/disposer.symbols.js +24 -0
- package/esm/functions/disposer.symbols.js.map +1 -0
- package/esm/functions/safe.js +4 -0
- package/esm/functions/safe.js.map +1 -0
- package/esm/functions/throttle.js +132 -0
- package/esm/functions/throttle.js.map +1 -0
- package/esm/lazy/light.js +20 -0
- package/esm/lazy/light.js.map +1 -0
- package/esm/lazy/promise.js +68 -0
- package/esm/lazy/promise.js.map +1 -0
- package/esm/lazy/singleton.js +65 -0
- package/esm/lazy/singleton.js.map +1 -0
- package/esm/lazy/types.js +2 -0
- package/esm/lazy/types.js.map +1 -0
- package/esm/logger/abstractions.js +2 -0
- package/esm/logger/abstractions.js.map +1 -0
- package/esm/logger/batch.js +8 -0
- package/esm/logger/batch.js.map +1 -0
- package/esm/logger/console.js +43 -0
- package/esm/logger/console.js.map +1 -0
- package/esm/logger/file.js +60 -0
- package/esm/logger/file.js.map +1 -0
- package/esm/logger/index.js +19 -0
- package/esm/logger/index.js.map +1 -0
- package/esm/logger/manager.js +85 -0
- package/esm/logger/manager.js.map +1 -0
- package/esm/logger/named.js +32 -0
- package/esm/logger/named.js.map +1 -0
- package/esm/logger/proxy.js +24 -0
- package/esm/logger/proxy.js.map +1 -0
- package/esm/math/arrays.js +262 -0
- package/esm/math/arrays.js.map +1 -0
- package/esm/math/calc.js +72 -0
- package/esm/math/calc.js.map +1 -0
- package/esm/math/distribution.js +12 -0
- package/esm/math/distribution.js.map +1 -0
- package/esm/math/index.js +24 -0
- package/esm/math/index.js.map +1 -0
- package/esm/math/object/helpers.js +23 -0
- package/esm/math/object/helpers.js.map +1 -0
- package/esm/math/object/index.js +6 -0
- package/esm/math/object/index.js.map +1 -0
- package/esm/math/object/math.composite.js +58 -0
- package/esm/math/object/math.composite.js.map +1 -0
- package/esm/math/object/math.js +120 -0
- package/esm/math/object/math.js.map +1 -0
- package/esm/math/object/ops.composite.js +46 -0
- package/esm/math/object/ops.composite.js.map +1 -0
- package/esm/math/object/ops.js +85 -0
- package/esm/math/object/ops.js.map +1 -0
- package/esm/math/object/types.js +2 -0
- package/esm/math/object/types.js.map +1 -0
- package/esm/models/EntityWithStatus.js +45 -0
- package/esm/models/EntityWithStatus.js.map +1 -0
- package/esm/models/File.js +2 -0
- package/esm/models/File.js.map +1 -0
- package/esm/models/Model.js +20 -0
- package/esm/models/Model.js.map +1 -0
- package/esm/models/ValuesCollector.js +45 -0
- package/esm/models/ValuesCollector.js.map +1 -0
- package/esm/models/types.js +2 -0
- package/esm/models/types.js.map +1 -0
- package/esm/models/wrappers.js +72 -0
- package/esm/models/wrappers.js.map +1 -0
- package/esm/observing/event.js +94 -0
- package/esm/observing/event.js.map +1 -0
- package/esm/observing/event.late.js +35 -0
- package/esm/observing/event.late.js.map +1 -0
- package/esm/observing/progressTracker.js +72 -0
- package/esm/observing/progressTracker.js.map +1 -0
- package/esm/observing/throttledEvent.js +16 -0
- package/esm/observing/throttledEvent.js.map +1 -0
- package/esm/observing/timer.js +81 -0
- package/esm/observing/timer.js.map +1 -0
- package/esm/package.json +3 -0
- package/esm/storage/index.js +3 -0
- package/esm/storage/index.js.map +1 -0
- package/esm/storage/types.js +2 -0
- package/esm/storage/types.js.map +1 -0
- package/esm/storage/wrappers.js +51 -0
- package/esm/storage/wrappers.js.map +1 -0
- package/esm/structures/expire.js +18 -0
- package/esm/structures/expire.js.map +1 -0
- package/esm/structures/helpers/enum.js +104 -0
- package/esm/structures/helpers/enum.js.map +1 -0
- package/esm/structures/helpers/name.js +42 -0
- package/esm/structures/helpers/name.js.map +1 -0
- package/esm/structures/linkedList.js +78 -0
- package/esm/structures/linkedList.js.map +1 -0
- package/esm/structures/nameof.js +23 -0
- package/esm/structures/nameof.js.map +1 -0
- package/esm/structures/path/builder.js +164 -0
- package/esm/structures/path/builder.js.map +1 -0
- package/esm/structures/path/index.js +3 -0
- package/esm/structures/path/index.js.map +1 -0
- package/esm/structures/path/types.js +2 -0
- package/esm/structures/path/types.js.map +1 -0
- package/esm/structures/path/utils.js +56 -0
- package/esm/structures/path/utils.js.map +1 -0
- package/esm/structures/pool.js +45 -0
- package/esm/structures/pool.js.map +1 -0
- package/esm/structures/promiseCache.js +266 -0
- package/esm/structures/promiseCache.js.map +1 -0
- package/esm/structures/promiseExtended.js +191 -0
- package/esm/structures/promiseExtended.js.map +1 -0
- package/esm/structures/promiseProxy.js +89 -0
- package/esm/structures/promiseProxy.js.map +1 -0
- package/esm/structures/queue/parallel.js +116 -0
- package/esm/structures/queue/parallel.js.map +1 -0
- package/esm/structures/queue/tasks.js +72 -0
- package/esm/structures/queue/tasks.js.map +1 -0
- package/esm/structures/subscribersMap.js +94 -0
- package/esm/structures/subscribersMap.js.map +1 -0
- package/esm/structures/tempoCache.js +55 -0
- package/esm/structures/tempoCache.js.map +1 -0
- package/esm/types/arrays.js +7 -0
- package/esm/types/arrays.js.map +1 -0
- package/esm/types/comparator.js +5 -0
- package/esm/types/comparator.js.map +1 -0
- package/esm/types/deep.js +2 -0
- package/esm/types/deep.js.map +1 -0
- package/esm/types/functions.js +2 -0
- package/esm/types/functions.js.map +1 -0
- package/esm/types/getter.js +23 -0
- package/esm/types/getter.js.map +1 -0
- package/esm/types/ident.js +2 -0
- package/esm/types/ident.js.map +1 -0
- package/esm/types/index.js +5 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/misc.js +2 -0
- package/esm/types/misc.js.map +1 -0
- package/esm/validation/ValidationErrors.js +30 -0
- package/esm/validation/ValidationErrors.js.map +1 -0
- package/esm/validation/creditCard.js +22 -0
- package/esm/validation/creditCard.js.map +1 -0
- package/esm/validation/emails.js +8 -0
- package/esm/validation/emails.js.map +1 -0
- package/esm/validation/helpers.js +68 -0
- package/esm/validation/helpers.js.map +1 -0
- package/esm/validation/index.js +9 -0
- package/esm/validation/index.js.map +1 -0
- package/esm/validation/throwers.js +28 -0
- package/esm/validation/throwers.js.map +1 -0
- package/esm/validation/types.js +8 -0
- package/esm/validation/types.js.map +1 -0
- package/esm/validation/validators.js +48 -0
- package/esm/validation/validators.js.map +1 -0
- package/esm/validation/wrappers.js +23 -0
- package/esm/validation/wrappers.js.map +1 -0
- package/package.json +80 -11
- package/tsconfig.cjs.tsbuildinfo +1 -0
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.types.tsbuildinfo +1 -0
- package/types/api/call.d.ts +35 -0
- package/types/api/endpoint.d.ts +38 -0
- package/types/api/endpoint.types.d.ts +45 -0
- package/types/api/error.d.ts +17 -0
- package/types/api/helpers.d.ts +9 -0
- package/types/api/index.d.ts +8 -0
- package/types/api/logging.d.ts +13 -0
- package/types/api/methods.d.ts +6 -0
- package/types/api/processor.d.ts +7 -0
- package/types/api/register.d.ts +7 -0
- package/types/api/statusCodes.d.ts +16 -0
- package/types/async/arrays.d.ts +4 -0
- package/types/async/misc.d.ts +8 -0
- package/types/async/timeout.d.ts +8 -0
- package/types/dates/calc.d.ts +9 -0
- package/types/dates/calendarIndex.d.ts +47 -0
- package/types/dates/convert.d.ts +15 -0
- package/types/dates/datex.d.ts +23 -0
- package/types/dates/decompose.d.ts +4 -0
- package/types/dates/format.d.ts +22 -0
- package/types/dates/index.d.ts +10 -0
- package/types/dates/parse.d.ts +10 -0
- package/types/dates/period.d.ts +11 -0
- package/types/dates/shift.d.ts +8 -0
- package/types/dates/types.d.ts +9 -0
- package/types/dates/tz.d.ts +7 -0
- package/types/dates/yearDate.d.ts +12 -0
- package/types/fields/filter.d.ts +9 -0
- package/types/fields/index.d.ts +3 -0
- package/types/fields/skip.d.ts +16 -0
- package/types/fields/transfer.d.ts +14 -0
- package/types/fields/update.d.ts +27 -0
- package/types/functions/assert.d.ts +2 -0
- package/types/functions/disposer.d.ts +24 -0
- package/types/functions/disposer.symbols.d.ts +6 -0
- package/types/functions/safe.d.ts +1 -0
- package/types/functions/throttle.d.ts +38 -0
- package/types/lazy/light.d.ts +2 -0
- package/types/lazy/promise.d.ts +23 -0
- package/types/lazy/singleton.d.ts +21 -0
- package/types/lazy/types.d.ts +12 -0
- package/types/logger/abstractions.d.ts +10 -0
- package/types/logger/batch.d.ts +2 -0
- package/types/logger/console.d.ts +18 -0
- package/types/logger/file.d.ts +15 -0
- package/types/logger/index.d.ts +13 -0
- package/types/logger/manager.d.ts +22 -0
- package/types/logger/named.d.ts +13 -0
- package/types/logger/proxy.d.ts +9 -0
- package/types/math/arrays.d.ts +44 -0
- package/types/math/calc.d.ts +17 -0
- package/types/math/distribution.d.ts +5 -0
- package/types/math/index.d.ts +5 -0
- package/types/math/object/helpers.d.ts +7 -0
- package/types/math/object/index.d.ts +5 -0
- package/types/math/object/math.composite.d.ts +16 -0
- package/types/math/object/math.d.ts +17 -0
- package/types/math/object/ops.composite.d.ts +14 -0
- package/types/math/object/ops.d.ts +20 -0
- package/types/math/object/types.d.ts +36 -0
- package/types/models/EntityWithStatus.d.ts +17 -0
- package/types/models/File.d.ts +9 -0
- package/types/models/Model.d.ts +12 -0
- package/types/models/ValuesCollector.d.ts +25 -0
- package/types/models/types.d.ts +24 -0
- package/types/models/wrappers.d.ts +17 -0
- package/types/observing/event.d.ts +25 -0
- package/types/observing/event.late.d.ts +10 -0
- package/types/observing/progressTracker.d.ts +27 -0
- package/types/observing/throttledEvent.d.ts +7 -0
- package/types/observing/timer.d.ts +41 -0
- package/types/storage/index.d.ts +2 -0
- package/types/storage/types.d.ts +12 -0
- package/types/storage/wrappers.d.ts +10 -0
- package/types/structures/expire.d.ts +13 -0
- package/types/structures/helpers/enum.d.ts +36 -0
- package/types/structures/helpers/name.d.ts +15 -0
- package/types/structures/linkedList.d.ts +38 -0
- package/types/structures/nameof.d.ts +13 -0
- package/types/structures/path/builder.d.ts +15 -0
- package/types/structures/path/index.d.ts +2 -0
- package/types/structures/path/types.d.ts +61 -0
- package/types/structures/path/utils.d.ts +14 -0
- package/types/structures/pool.d.ts +16 -0
- package/types/structures/promiseCache.d.ts +85 -0
- package/types/structures/promiseExtended.d.ts +70 -0
- package/types/structures/promiseProxy.d.ts +29 -0
- package/types/structures/queue/parallel.d.ts +23 -0
- package/types/structures/queue/tasks.d.ts +16 -0
- package/types/structures/subscribersMap.d.ts +22 -0
- package/types/structures/tempoCache.d.ts +29 -0
- package/types/types/arrays.d.ts +3 -0
- package/types/types/comparator.d.ts +4 -0
- package/types/types/deep.d.ts +25 -0
- package/types/types/functions.d.ts +15 -0
- package/types/types/getter.d.ts +9 -0
- package/types/types/ident.d.ts +5 -0
- package/types/types/index.d.ts +4 -0
- package/types/types/misc.d.ts +37 -0
- package/types/validation/ValidationErrors.d.ts +25 -0
- package/types/validation/creditCard.d.ts +8 -0
- package/types/validation/emails.d.ts +3 -0
- package/types/validation/helpers.d.ts +10 -0
- package/types/validation/index.d.ts +5 -0
- package/types/validation/throwers.d.ts +14 -0
- package/types/validation/types.d.ts +18 -0
- package/types/validation/validators.d.ts +30 -0
- package/types/validation/wrappers.d.ts +6 -0
- package/api/call.d.ts +0 -36
- package/api/call.d.ts.map +0 -1
- package/api/call.js +0 -62
- package/api/call.js.map +0 -1
- package/api/endpoint.d.ts +0 -39
- package/api/endpoint.d.ts.map +0 -1
- package/api/endpoint.js.map +0 -1
- package/api/endpoint.types.d.ts +0 -46
- package/api/endpoint.types.d.ts.map +0 -1
- package/api/endpoint.types.js.map +0 -1
- package/api/error.d.ts +0 -18
- package/api/error.d.ts.map +0 -1
- package/api/error.js.map +0 -1
- package/api/helpers.d.ts +0 -10
- package/api/helpers.d.ts.map +0 -1
- package/api/helpers.js +0 -29
- package/api/helpers.js.map +0 -1
- package/api/index.d.ts +0 -9
- package/api/index.d.ts.map +0 -1
- package/api/index.js.map +0 -1
- package/api/logging.d.ts +0 -14
- package/api/logging.d.ts.map +0 -1
- package/api/logging.js.map +0 -1
- package/api/methods.d.ts +0 -7
- package/api/methods.d.ts.map +0 -1
- package/api/methods.js.map +0 -1
- package/api/processor.d.ts +0 -8
- package/api/processor.d.ts.map +0 -1
- package/api/processor.js.map +0 -1
- package/api/register.d.ts +0 -8
- package/api/register.d.ts.map +0 -1
- package/api/register.js +0 -25
- package/api/register.js.map +0 -1
- package/api/statusCodes.d.ts +0 -17
- package/api/statusCodes.d.ts.map +0 -1
- package/api/statusCodes.js.map +0 -1
- package/async/arrays.d.ts +0 -5
- package/async/arrays.d.ts.map +0 -1
- package/async/arrays.js +0 -39
- package/async/arrays.js.map +0 -1
- package/async/misc.d.ts +0 -9
- package/async/misc.d.ts.map +0 -1
- package/async/misc.js +0 -27
- package/async/misc.js.map +0 -1
- package/async/timeout.d.ts +0 -9
- package/async/timeout.d.ts.map +0 -1
- package/async/timeout.js +0 -64
- package/async/timeout.js.map +0 -1
- package/dates/calc.d.ts +0 -10
- package/dates/calc.d.ts.map +0 -1
- package/dates/calc.js +0 -63
- package/dates/calc.js.map +0 -1
- package/dates/calendarIndex.d.ts +0 -48
- package/dates/calendarIndex.d.ts.map +0 -1
- package/dates/calendarIndex.js +0 -85
- package/dates/calendarIndex.js.map +0 -1
- package/dates/convert.d.ts +0 -16
- package/dates/convert.d.ts.map +0 -1
- package/dates/convert.js +0 -128
- package/dates/convert.js.map +0 -1
- package/dates/datex.d.ts +0 -24
- package/dates/datex.d.ts.map +0 -1
- package/dates/datex.js +0 -101
- package/dates/datex.js.map +0 -1
- package/dates/decompose.d.ts +0 -5
- package/dates/decompose.d.ts.map +0 -1
- package/dates/decompose.js +0 -44
- package/dates/decompose.js.map +0 -1
- package/dates/format.d.ts +0 -23
- package/dates/format.d.ts.map +0 -1
- package/dates/format.js.map +0 -1
- package/dates/index.d.ts +0 -11
- package/dates/index.d.ts.map +0 -1
- package/dates/index.js.map +0 -1
- package/dates/parse.d.ts +0 -11
- package/dates/parse.d.ts.map +0 -1
- package/dates/parse.js +0 -49
- package/dates/parse.js.map +0 -1
- package/dates/period.d.ts +0 -12
- package/dates/period.d.ts.map +0 -1
- package/dates/period.js.map +0 -1
- package/dates/shift.d.ts +0 -9
- package/dates/shift.d.ts.map +0 -1
- package/dates/shift.js +0 -96
- package/dates/shift.js.map +0 -1
- package/dates/types.d.ts +0 -10
- package/dates/types.d.ts.map +0 -1
- package/dates/types.js.map +0 -1
- package/dates/tz.d.ts +0 -8
- package/dates/tz.d.ts.map +0 -1
- package/dates/tz.js.map +0 -1
- package/dates/yearDate.d.ts +0 -13
- package/dates/yearDate.d.ts.map +0 -1
- package/dates/yearDate.js.map +0 -1
- package/fields/filter.d.ts +0 -10
- package/fields/filter.d.ts.map +0 -1
- package/fields/filter.js +0 -29
- package/fields/filter.js.map +0 -1
- package/fields/index.d.ts +0 -4
- package/fields/index.d.ts.map +0 -1
- package/fields/index.js.map +0 -1
- package/fields/skip.d.ts +0 -17
- package/fields/skip.d.ts.map +0 -1
- package/fields/skip.js.map +0 -1
- package/fields/transfer.d.ts +0 -15
- package/fields/transfer.d.ts.map +0 -1
- package/fields/transfer.js +0 -47
- package/fields/transfer.js.map +0 -1
- package/fields/update.d.ts +0 -28
- package/fields/update.d.ts.map +0 -1
- package/fields/update.js +0 -79
- package/fields/update.js.map +0 -1
- package/functions/assert.d.ts +0 -3
- package/functions/assert.d.ts.map +0 -1
- package/functions/assert.js +0 -21
- package/functions/assert.js.map +0 -1
- package/functions/disposer.d.ts +0 -25
- package/functions/disposer.d.ts.map +0 -1
- package/functions/disposer.js +0 -73
- package/functions/disposer.js.map +0 -1
- package/functions/disposer.symbols.d.ts +0 -7
- package/functions/disposer.symbols.d.ts.map +0 -1
- package/functions/disposer.symbols.js +0 -29
- package/functions/disposer.symbols.js.map +0 -1
- package/functions/safe.d.ts +0 -2
- package/functions/safe.d.ts.map +0 -1
- package/functions/safe.js +0 -8
- package/functions/safe.js.map +0 -1
- package/functions/throttle.d.ts +0 -39
- package/functions/throttle.d.ts.map +0 -1
- package/functions/throttle.js.map +0 -1
- package/lazy/light.d.ts +0 -9
- package/lazy/light.d.ts.map +0 -1
- package/lazy/light.js +0 -23
- package/lazy/light.js.map +0 -1
- package/lazy/promise.d.ts +0 -24
- package/lazy/promise.d.ts.map +0 -1
- package/lazy/promise.js +0 -56
- package/lazy/promise.js.map +0 -1
- package/lazy/singleton.d.ts +0 -18
- package/lazy/singleton.d.ts.map +0 -1
- package/lazy/singleton.js +0 -44
- package/lazy/singleton.js.map +0 -1
- package/logger/abstractions.d.ts +0 -11
- package/logger/abstractions.d.ts.map +0 -1
- package/logger/abstractions.js.map +0 -1
- package/logger/batch.d.ts +0 -3
- package/logger/batch.d.ts.map +0 -1
- package/logger/batch.js +0 -12
- package/logger/batch.js.map +0 -1
- package/logger/console.d.ts +0 -19
- package/logger/console.d.ts.map +0 -1
- package/logger/console.js.map +0 -1
- package/logger/file.d.ts +0 -16
- package/logger/file.d.ts.map +0 -1
- package/logger/file.js.map +0 -1
- package/logger/index.d.ts +0 -16
- package/logger/index.d.ts.map +0 -1
- package/logger/index.js +0 -64
- package/logger/index.js.map +0 -1
- package/logger/named.d.ts +0 -14
- package/logger/named.d.ts.map +0 -1
- package/logger/named.js.map +0 -1
- package/logger/proxy.d.ts +0 -10
- package/logger/proxy.d.ts.map +0 -1
- package/logger/proxy.js.map +0 -1
- package/math/arrays.d.ts +0 -43
- package/math/arrays.d.ts.map +0 -1
- package/math/arrays.js +0 -273
- package/math/arrays.js.map +0 -1
- package/math/calc.d.ts +0 -18
- package/math/calc.d.ts.map +0 -1
- package/math/calc.js +0 -85
- package/math/calc.js.map +0 -1
- package/math/distribution.d.ts +0 -6
- package/math/distribution.d.ts.map +0 -1
- package/math/distribution.js +0 -16
- package/math/distribution.js.map +0 -1
- package/math/index.d.ts +0 -6
- package/math/index.d.ts.map +0 -1
- package/math/index.js +0 -30
- package/math/index.js.map +0 -1
- package/math/object/helpers.d.ts +0 -8
- package/math/object/helpers.d.ts.map +0 -1
- package/math/object/helpers.js +0 -29
- package/math/object/helpers.js.map +0 -1
- package/math/object/index.d.ts +0 -6
- package/math/object/index.d.ts.map +0 -1
- package/math/object/index.js.map +0 -1
- package/math/object/math.composite.d.ts +0 -17
- package/math/object/math.composite.d.ts.map +0 -1
- package/math/object/math.composite.js.map +0 -1
- package/math/object/math.d.ts +0 -18
- package/math/object/math.d.ts.map +0 -1
- package/math/object/math.js.map +0 -1
- package/math/object/ops.composite.d.ts +0 -15
- package/math/object/ops.composite.d.ts.map +0 -1
- package/math/object/ops.composite.js.map +0 -1
- package/math/object/ops.d.ts +0 -21
- package/math/object/ops.d.ts.map +0 -1
- package/math/object/ops.js.map +0 -1
- package/math/object/types.d.ts +0 -37
- package/math/object/types.d.ts.map +0 -1
- package/math/object/types.js.map +0 -1
- package/models/EntityWithStatus.d.ts +0 -18
- package/models/EntityWithStatus.d.ts.map +0 -1
- package/models/EntityWithStatus.js.map +0 -1
- package/models/File.d.ts +0 -10
- package/models/File.d.ts.map +0 -1
- package/models/File.js.map +0 -1
- package/models/Model.d.ts +0 -13
- package/models/Model.d.ts.map +0 -1
- package/models/Model.js.map +0 -1
- package/models/ValuesCollector.d.ts +0 -26
- package/models/ValuesCollector.d.ts.map +0 -1
- package/models/ValuesCollector.js.map +0 -1
- package/models/types.d.ts +0 -25
- package/models/types.d.ts.map +0 -1
- package/models/types.js.map +0 -1
- package/models/wrappers.d.ts +0 -18
- package/models/wrappers.d.ts.map +0 -1
- package/models/wrappers.js +0 -80
- package/models/wrappers.js.map +0 -1
- package/observing/event.d.ts +0 -26
- package/observing/event.d.ts.map +0 -1
- package/observing/event.js +0 -99
- package/observing/event.js.map +0 -1
- package/observing/event.late.d.ts +0 -11
- package/observing/event.late.d.ts.map +0 -1
- package/observing/event.late.js.map +0 -1
- package/observing/progressTracker.d.ts +0 -28
- package/observing/progressTracker.d.ts.map +0 -1
- package/observing/progressTracker.js.map +0 -1
- package/observing/throttledEvent.d.ts +0 -8
- package/observing/throttledEvent.d.ts.map +0 -1
- package/observing/throttledEvent.js.map +0 -1
- package/observing/timer.d.ts +0 -42
- package/observing/timer.d.ts.map +0 -1
- package/observing/timer.js.map +0 -1
- package/storage/index.d.ts +0 -3
- package/storage/index.d.ts.map +0 -1
- package/storage/index.js.map +0 -1
- package/storage/types.d.ts +0 -13
- package/storage/types.d.ts.map +0 -1
- package/storage/types.js.map +0 -1
- package/storage/wrappers.d.ts +0 -11
- package/storage/wrappers.d.ts.map +0 -1
- package/storage/wrappers.js.map +0 -1
- package/structures/helpers/enum.d.ts +0 -37
- package/structures/helpers/enum.d.ts.map +0 -1
- package/structures/helpers/enum.js.map +0 -1
- package/structures/helpers/name.d.ts +0 -16
- package/structures/helpers/name.d.ts.map +0 -1
- package/structures/helpers/name.js.map +0 -1
- package/structures/linkedList.d.ts +0 -39
- package/structures/linkedList.d.ts.map +0 -1
- package/structures/linkedList.js.map +0 -1
- package/structures/nameof.d.ts +0 -14
- package/structures/nameof.d.ts.map +0 -1
- package/structures/nameof.js +0 -27
- package/structures/nameof.js.map +0 -1
- package/structures/path/builder.d.ts +0 -16
- package/structures/path/builder.d.ts.map +0 -1
- package/structures/path/builder.js +0 -170
- package/structures/path/builder.js.map +0 -1
- package/structures/path/index.d.ts +0 -3
- package/structures/path/index.d.ts.map +0 -1
- package/structures/path/index.js.map +0 -1
- package/structures/path/types.d.ts +0 -62
- package/structures/path/types.d.ts.map +0 -1
- package/structures/path/types.js.map +0 -1
- package/structures/path/utils.d.ts +0 -15
- package/structures/path/utils.d.ts.map +0 -1
- package/structures/path/utils.js +0 -61
- package/structures/path/utils.js.map +0 -1
- package/structures/pool.d.ts +0 -17
- package/structures/pool.d.ts.map +0 -1
- package/structures/pool.js.map +0 -1
- package/structures/promiseCache.d.ts +0 -86
- package/structures/promiseCache.d.ts.map +0 -1
- package/structures/promiseCache.js.map +0 -1
- package/structures/promiseExtended.d.ts +0 -71
- package/structures/promiseExtended.d.ts.map +0 -1
- package/structures/promiseExtended.js +0 -193
- package/structures/promiseExtended.js.map +0 -1
- package/structures/promiseProxy.d.ts +0 -30
- package/structures/promiseProxy.d.ts.map +0 -1
- package/structures/promiseProxy.js +0 -93
- package/structures/promiseProxy.js.map +0 -1
- package/structures/queue/parallel.d.ts +0 -24
- package/structures/queue/parallel.d.ts.map +0 -1
- package/structures/queue/parallel.js.map +0 -1
- package/structures/queue/tasks.d.ts +0 -17
- package/structures/queue/tasks.d.ts.map +0 -1
- package/structures/queue/tasks.js.map +0 -1
- package/structures/subscribersMap.d.ts +0 -23
- package/structures/subscribersMap.d.ts.map +0 -1
- package/structures/subscribersMap.js.map +0 -1
- package/structures/tempoCache.d.ts +0 -10
- package/structures/tempoCache.d.ts.map +0 -1
- package/structures/tempoCache.js +0 -23
- package/structures/tempoCache.js.map +0 -1
- package/types/arrays.d.ts +0 -4
- package/types/arrays.d.ts.map +0 -1
- package/types/arrays.js +0 -12
- package/types/arrays.js.map +0 -1
- package/types/comparator.d.ts +0 -5
- package/types/comparator.d.ts.map +0 -1
- package/types/comparator.js.map +0 -1
- package/types/deep.d.ts +0 -26
- package/types/deep.d.ts.map +0 -1
- package/types/deep.js.map +0 -1
- package/types/functions.d.ts +0 -16
- package/types/functions.d.ts.map +0 -1
- package/types/functions.js.map +0 -1
- package/types/getter.d.ts +0 -5
- package/types/getter.d.ts.map +0 -1
- package/types/getter.js +0 -14
- package/types/getter.js.map +0 -1
- package/types/ident.d.ts +0 -6
- package/types/ident.d.ts.map +0 -1
- package/types/ident.js.map +0 -1
- package/types/index.d.ts +0 -5
- package/types/index.d.ts.map +0 -1
- package/types/index.js.map +0 -1
- package/types/misc.d.ts +0 -38
- package/types/misc.d.ts.map +0 -1
- package/types/misc.js.map +0 -1
- package/validation/ValidationErrors.d.ts +0 -26
- package/validation/ValidationErrors.d.ts.map +0 -1
- package/validation/ValidationErrors.js.map +0 -1
- package/validation/creditCard.d.ts +0 -9
- package/validation/creditCard.d.ts.map +0 -1
- package/validation/creditCard.js.map +0 -1
- package/validation/emails.d.ts +0 -4
- package/validation/emails.d.ts.map +0 -1
- package/validation/emails.js +0 -12
- package/validation/emails.js.map +0 -1
- package/validation/helpers.d.ts +0 -11
- package/validation/helpers.d.ts.map +0 -1
- package/validation/helpers.js +0 -78
- package/validation/helpers.js.map +0 -1
- package/validation/index.d.ts +0 -6
- package/validation/index.d.ts.map +0 -1
- package/validation/index.js.map +0 -1
- package/validation/throwers.d.ts +0 -14
- package/validation/throwers.d.ts.map +0 -1
- package/validation/throwers.js +0 -29
- package/validation/throwers.js.map +0 -1
- package/validation/types.d.ts +0 -19
- package/validation/types.d.ts.map +0 -1
- package/validation/types.js.map +0 -1
- package/validation/validators.d.ts +0 -31
- package/validation/validators.d.ts.map +0 -1
- package/validation/validators.js.map +0 -1
- package/validation/wrappers.d.ts +0 -7
- package/validation/wrappers.d.ts.map +0 -1
- package/validation/wrappers.js.map +0 -1
- /package/{api → cjs/api}/endpoint.js +0 -0
- /package/{api → cjs/api}/endpoint.types.js +0 -0
- /package/{api → cjs/api}/error.js +0 -0
- /package/{api → cjs/api}/index.js +0 -0
- /package/{api → cjs/api}/logging.js +0 -0
- /package/{api → cjs/api}/methods.js +0 -0
- /package/{api → cjs/api}/processor.js +0 -0
- /package/{api → cjs/api}/statusCodes.js +0 -0
- /package/{dates → cjs/dates}/format.js +0 -0
- /package/{dates → cjs/dates}/index.js +0 -0
- /package/{dates → cjs/dates}/period.js +0 -0
- /package/{dates → cjs/dates}/types.js +0 -0
- /package/{dates → cjs/dates}/tz.js +0 -0
- /package/{dates → cjs/dates}/yearDate.js +0 -0
- /package/{fields → cjs/fields}/index.js +0 -0
- /package/{fields → cjs/fields}/skip.js +0 -0
- /package/{functions → cjs/functions}/throttle.js +0 -0
- /package/{math/object → cjs/lazy}/types.js +0 -0
- /package/{logger → cjs/logger}/abstractions.js +0 -0
- /package/{logger → cjs/logger}/console.js +0 -0
- /package/{logger → cjs/logger}/file.js +0 -0
- /package/{logger → cjs/logger}/named.js +0 -0
- /package/{logger → cjs/logger}/proxy.js +0 -0
- /package/{math → cjs/math}/object/index.js +0 -0
- /package/{math → cjs/math}/object/math.composite.js +0 -0
- /package/{math → cjs/math}/object/math.js +0 -0
- /package/{math → cjs/math}/object/ops.composite.js +0 -0
- /package/{math → cjs/math}/object/ops.js +0 -0
- /package/{models → cjs/math/object}/types.js +0 -0
- /package/{models → cjs/models}/EntityWithStatus.js +0 -0
- /package/{models → cjs/models}/File.js +0 -0
- /package/{models → cjs/models}/Model.js +0 -0
- /package/{models → cjs/models}/ValuesCollector.js +0 -0
- /package/{storage → cjs/models}/types.js +0 -0
- /package/{observing → cjs/observing}/event.late.js +0 -0
- /package/{observing → cjs/observing}/progressTracker.js +0 -0
- /package/{observing → cjs/observing}/throttledEvent.js +0 -0
- /package/{observing → cjs/observing}/timer.js +0 -0
- /package/{storage → cjs/storage}/index.js +0 -0
- /package/{structures/path → cjs/storage}/types.js +0 -0
- /package/{storage → cjs/storage}/wrappers.js +0 -0
- /package/{structures → cjs/structures}/helpers/enum.js +0 -0
- /package/{structures → cjs/structures}/helpers/name.js +0 -0
- /package/{structures → cjs/structures}/linkedList.js +0 -0
- /package/{structures → cjs/structures}/path/index.js +0 -0
- /package/{structures → cjs/structures}/pool.js +0 -0
- /package/{structures → cjs/structures}/promiseCache.js +0 -0
- /package/{structures → cjs/structures}/queue/parallel.js +0 -0
- /package/{structures → cjs/structures}/queue/tasks.js +0 -0
- /package/{structures → cjs/structures}/subscribersMap.js +0 -0
- /package/{types → cjs/types}/comparator.js +0 -0
- /package/{types → cjs/types}/deep.js +0 -0
- /package/{types → cjs/types}/functions.js +0 -0
- /package/{types → cjs/types}/ident.js +0 -0
- /package/{types → cjs/types}/index.js +0 -0
- /package/{types → cjs/types}/misc.js +0 -0
- /package/{validation → cjs/validation}/ValidationErrors.js +0 -0
- /package/{validation → cjs/validation}/creditCard.js +0 -0
- /package/{validation → cjs/validation}/index.js +0 -0
- /package/{validation → cjs/validation}/types.js +0 -0
- /package/{validation → cjs/validation}/validators.js +0 -0
- /package/{validation → cjs/validation}/wrappers.js +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Nullable } from '../types/misc';
|
|
2
|
+
/**
|
|
3
|
+
* The idea here is to wrap a promise (or promise getter) so it will never throw natively, but still be able to provide success/fail results:
|
|
4
|
+
* - `onSuccess` for handling successful result: like `then` but to be called only if there was no error
|
|
5
|
+
* - `onError` for handling error: like `catch` but with extended error format
|
|
6
|
+
* - `expectError` adds a specific Error sub-class caster and adds it to the error data; useful when expecting some kind of specific error
|
|
7
|
+
*
|
|
8
|
+
* Important: all methods are chainable however will return the same PromiseExtended instance,
|
|
9
|
+
* while native Promise methods return a new Promise instance on each `then`/`catch`/`finally` call.
|
|
10
|
+
* Internally it just replaces the promise reference.
|
|
11
|
+
*
|
|
12
|
+
* Usage example:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* function doWork() {
|
|
16
|
+
* return PromiseExtended
|
|
17
|
+
* .run(async () => {
|
|
18
|
+
* // return 42;
|
|
19
|
+
* throw new Error('Some error');
|
|
20
|
+
* });
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* dowWork()
|
|
24
|
+
* // if no error, will return 42
|
|
25
|
+
* .onSuccess(data => console.log('Success:', data))
|
|
26
|
+
* // if error, will return { error: 'Some error', source: Error }
|
|
27
|
+
* .onError(({ error, source }) => console.error('Error Message:', error, '; original:', source))
|
|
28
|
+
* // this is possible to be called only if handlers throw
|
|
29
|
+
* .catch(err => console.error('Really unexpected error:', err));
|
|
30
|
+
*
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* NOTE: regular `then`/`catch` will still work, but they will go after `catch` in the chain,
|
|
34
|
+
* so basically every `then` will be called unless some previous handler throws,
|
|
35
|
+
* and every `catch` will NOT be called unless there was an error in any previous handler.
|
|
36
|
+
*
|
|
37
|
+
* If passed promise resolve is `PromiseExtended` instance, current instance will redirect everything to it.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class PromiseExtended<T, TCustomErrors extends Record<string, unknown> = Record<never, unknown>> implements Promise<T> {
|
|
41
|
+
protected _error: PromiseExtended.ErrorData | null;
|
|
42
|
+
private _promise;
|
|
43
|
+
private readonly _errorProcessors;
|
|
44
|
+
private constructor();
|
|
45
|
+
static run<T, TErrors extends Record<string, unknown> = Record<never, unknown>>(worker: Promise<T> | (() => Promise<T>)): PromiseExtended<T, TErrors>;
|
|
46
|
+
static succeeded<T>(data: T): PromiseExtended<T>;
|
|
47
|
+
static errored<T, TErrors extends Record<string, unknown>>(source: Error | Error[] | string): PromiseExtended<T, TErrors>;
|
|
48
|
+
onError(cb: Nullable<(data: PromiseExtended.ErrorData & TCustomErrors) => void>): this;
|
|
49
|
+
onSuccess(cb: Nullable<(data: T) => void>): this;
|
|
50
|
+
expectError<TName extends string, TError2 extends Error>(name: TName, ErrCtor: new (...args: any[]) => TError2, processor?: (value: TError2) => void | Partial<TCustomErrors & Record<TName, TError2>>): PromiseExtended<T, TCustomErrors & Record<TName, TError2>>;
|
|
51
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseExtended<TResult1 | TResult2, TCustomErrors>;
|
|
52
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): PromiseExtended<T | TResult, TCustomErrors>;
|
|
53
|
+
finally(onfinally?: (() => void) | null): this;
|
|
54
|
+
toSuccessPromise(): Promise<boolean>;
|
|
55
|
+
get [Symbol.toStringTag](): string;
|
|
56
|
+
private getError;
|
|
57
|
+
private _catch;
|
|
58
|
+
/** Adds to the end of chain special marker that allow outer PromiseExtended to correctly process this instance with its own onSuccess/onError callbacks.
|
|
59
|
+
*
|
|
60
|
+
* See `example for combining` test case for more details.
|
|
61
|
+
*/
|
|
62
|
+
pop(): PromiseExtended<T, TCustomErrors>;
|
|
63
|
+
protected onErrorCaught(data: PromiseExtended.ErrorData): void;
|
|
64
|
+
}
|
|
65
|
+
export declare namespace PromiseExtended {
|
|
66
|
+
type ErrorData = {
|
|
67
|
+
error: string;
|
|
68
|
+
source: Error;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LazyPromise } from '../lazy/promise';
|
|
2
|
+
import { AnyObject, FunctionKeys, StringKeys } from '../types';
|
|
3
|
+
declare const PromiseGetter = "__promise";
|
|
4
|
+
type AllowedFnKeys<T extends AnyObject> = FunctionKeys<T, any[], void>;
|
|
5
|
+
type PromiseProxy<T extends AnyObject, TKeys extends StringKeys<T> = StringKeys<T>, TFnKeys = never, TWrap extends object = object> = {
|
|
6
|
+
[K in TKeys]: T[K] extends (...args: any) => any ? (K extends TFnKeys ? T[K] : never) : T[K];
|
|
7
|
+
} & {
|
|
8
|
+
readonly [PromiseGetter]: Promise<T>;
|
|
9
|
+
} & TWrap;
|
|
10
|
+
type ForbiddenKeys = typeof PromiseGetter;
|
|
11
|
+
type NoForbiddenKeys<T> = {
|
|
12
|
+
[K in keyof T]: K extends ForbiddenKeys ? never : T[K];
|
|
13
|
+
};
|
|
14
|
+
type Options<T, TFnKeys, TWrap, TLazy> = {
|
|
15
|
+
loader: () => Promise<T>;
|
|
16
|
+
fnKeys?: TFnKeys[];
|
|
17
|
+
wrap?: TWrap;
|
|
18
|
+
lazy?: TLazy;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Creates a proxy object that will be resolved to the object returned by the loader function. // Thanks CoPilot for this comment :)
|
|
22
|
+
*
|
|
23
|
+
* @param loader a function returning a promise that resolves to a proxied object
|
|
24
|
+
* @param fnKeys an array of keys that should be treated as functions so that they can be called before the object is resolved
|
|
25
|
+
* @param wrap an object that will be used as a wrapper for the proxied object. can contain any fields that will be copied to the resolved object
|
|
26
|
+
* @returns a proxy object that will be resolved to the object returned by the loader function
|
|
27
|
+
*/
|
|
28
|
+
export declare function createPromiseProxy<T extends NoForbiddenKeys<T>, TFnKeys extends AllowedFnKeys<T> = never, TWrap extends object = object>(options: Options<T, TFnKeys, TWrap, typeof LazyPromise>): PromiseProxy<T, StringKeys<T>, TFnKeys, TWrap>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type QueueItem = () => void | Promise<void>;
|
|
2
|
+
export declare class ParallelQueue {
|
|
3
|
+
private readonly _queues;
|
|
4
|
+
private _inProgress;
|
|
5
|
+
private _currentIndex;
|
|
6
|
+
private _maxIndex;
|
|
7
|
+
private _logger;
|
|
8
|
+
private readonly _beforePriorityRun;
|
|
9
|
+
private readonly _afterPriorityRun;
|
|
10
|
+
private readonly _finished;
|
|
11
|
+
get currentPriority(): number;
|
|
12
|
+
get inProgress(): boolean;
|
|
13
|
+
get beforePriorityRun(): import("../../observing/event").IEvent<number>;
|
|
14
|
+
get afterPriorityRun(): import("../../observing/event").IEvent<number>;
|
|
15
|
+
get finished(): import("../../observing/event").IEvent<any>;
|
|
16
|
+
withLogger(name?: string): this;
|
|
17
|
+
/** @returns A callback that will try to cancel queued item */
|
|
18
|
+
enqueue(cb: QueueItem, priority?: number): () => void;
|
|
19
|
+
start(): Promise<boolean | undefined>;
|
|
20
|
+
private getQueue;
|
|
21
|
+
private tryStartQueue;
|
|
22
|
+
private _executeLoader;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ILogger } from '../../logger';
|
|
2
|
+
type Factory<T> = () => Promise<T>;
|
|
3
|
+
export declare class TasksQueue<T> {
|
|
4
|
+
readonly limit: number;
|
|
5
|
+
private readonly _items;
|
|
6
|
+
private _running;
|
|
7
|
+
private _logger;
|
|
8
|
+
constructor(limit: number);
|
|
9
|
+
get isFull(): boolean;
|
|
10
|
+
get running(): number;
|
|
11
|
+
addLogger(logger: ILogger): this;
|
|
12
|
+
enqueue(factory: Factory<T>, name?: string): Promise<T>;
|
|
13
|
+
private _runFactory;
|
|
14
|
+
private _tryRunNext;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IDisposable } from '../functions/disposer';
|
|
2
|
+
type Unsub = () => void;
|
|
3
|
+
export declare class SubscribersMap implements IDisposable {
|
|
4
|
+
readonly subscribe: null | ((key: string) => Promise<Unsub[]>);
|
|
5
|
+
readonly name?: string | undefined;
|
|
6
|
+
/** Unsubscribers map: key => unsub fn */
|
|
7
|
+
private readonly _map;
|
|
8
|
+
/** Timeouts map: key => timeout handle */
|
|
9
|
+
private readonly _timeouts;
|
|
10
|
+
private readonly _logger;
|
|
11
|
+
protected _count: number;
|
|
12
|
+
constructor(subscribe: null | ((key: string) => Promise<Unsub[]>), name?: string | undefined);
|
|
13
|
+
get count(): number;
|
|
14
|
+
getIsObserving(key: string): boolean;
|
|
15
|
+
getHasObserveTimeout(key: string): boolean;
|
|
16
|
+
enable(key: string, enable: boolean, clearAfter?: number | null, existingUnsubs?: Unsub[] | null): Promise<void>;
|
|
17
|
+
private refreshTimeout;
|
|
18
|
+
protected setCount(v: number): void;
|
|
19
|
+
clear(): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ILazy, ILazyPromise } from '../lazy/types';
|
|
2
|
+
import { ExpireTracker } from './expire';
|
|
3
|
+
/**
|
|
4
|
+
* Calls factory fn to fetch and store some value for a limited time.
|
|
5
|
+
*
|
|
6
|
+
* To factory method be called, `current` getter must be accessed.
|
|
7
|
+
*/
|
|
8
|
+
export declare class TempoCache<T> {
|
|
9
|
+
readonly factory: () => T;
|
|
10
|
+
private _current;
|
|
11
|
+
readonly tracker: ExpireTracker;
|
|
12
|
+
constructor(factory: () => T, lifetimeMs: number);
|
|
13
|
+
get isExpired(): boolean;
|
|
14
|
+
get current(): T | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace TempoCache {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a TempoCache instance which caches `ILazy.value` for a specified time.
|
|
19
|
+
*
|
|
20
|
+
* Note a limitation: calling `reset` (or changing the stored value directly in other way) on `lazy` will not affect the value cached by `TempoCache` instance.
|
|
21
|
+
*/
|
|
22
|
+
function createFromLazy<T>(lazy: ILazy<T>, lifetimeMs: number): TempoCache<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a TempoCache instance which caches `ILazyPromise.promise` for a specified time.
|
|
25
|
+
*
|
|
26
|
+
* Note a limitation: calling `reset` (or changing the stored value directly in other way) on `lazy` will not affect the value cached by `TempoCache` instance.
|
|
27
|
+
*/
|
|
28
|
+
function createFromLazyPromise<T>(lazy: ILazyPromise<T>, lifetimeMs: number): TempoCache<Promise<T>>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AnyFunction } from './misc';
|
|
2
|
+
export type DeepReadonly<T> = T extends Array<infer U> ? ReadonlyArray<DeepReadonly<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
3
|
+
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
4
|
+
} : T));
|
|
5
|
+
export type DeepMutable<T> = T extends ReadonlyArray<infer U> ? Array<DeepMutable<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
6
|
+
-readonly [P in keyof T]: DeepMutable<T[P]>;
|
|
7
|
+
} : T));
|
|
8
|
+
export type DeepReadonlyPartial<T> = T extends Array<infer U> ? ReadonlyArray<DeepReadonlyPartial<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
9
|
+
readonly [P in keyof T]?: DeepReadonlyPartial<T[P]>;
|
|
10
|
+
} : T));
|
|
11
|
+
export type DeepPartial<T> = T extends Array<infer U> ? Array<DeepPartial<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
12
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
13
|
+
} : T));
|
|
14
|
+
export type DeepRequired<T> = T extends Array<infer U> ? Array<DeepRequired<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
15
|
+
[P in keyof T]-?: DeepRequired<T[P]>;
|
|
16
|
+
} : T));
|
|
17
|
+
export type DeepPickNullable<T, K extends keyof T> = {
|
|
18
|
+
[P in K]?: null | undefined | DeepPartialNullable<T[P]>;
|
|
19
|
+
};
|
|
20
|
+
export type DeepNullable<T> = T extends Array<infer U> ? Array<DeepNullable<U>> : (T extends AnyFunction ? T : (T extends object ? {
|
|
21
|
+
[P in keyof T]: null | DeepNullable<T[P]>;
|
|
22
|
+
} : T));
|
|
23
|
+
export type DeepPartialNullable<T> = T extends object ? {
|
|
24
|
+
[P in keyof T]?: null | undefined | DeepPartialNullable<T[P]>;
|
|
25
|
+
} : (T extends Array<infer U> ? Array<DeepPartialNullable<U>> : T);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyFunction } from './misc';
|
|
2
|
+
export type TypedFn<A extends unknown[], R> = (...args: A) => R;
|
|
3
|
+
export type Asyncify<T> = {
|
|
4
|
+
[P in keyof T]: T[P] extends TypedFn<unknown[], Promise<unknown>> ? T[P] : (T[P] extends TypedFn<infer A, infer R> ? (...args: A) => Promise<R> : T[P]);
|
|
5
|
+
};
|
|
6
|
+
export type Awaitify<T> = {
|
|
7
|
+
[P in keyof T]: T[P] extends TypedFn<infer A, Promise<infer R>> ? (...args: A) => R : T[P];
|
|
8
|
+
};
|
|
9
|
+
export type PropertiesOf<T> = Exclude<{
|
|
10
|
+
[K in keyof T]: T[K] extends AnyFunction ? never : K;
|
|
11
|
+
}[keyof T], undefined>;
|
|
12
|
+
export type RemoveFunctionFields<T> = {
|
|
13
|
+
readonly [P in PropertiesOf<T>]: T[P];
|
|
14
|
+
};
|
|
15
|
+
export type RemoveFirstParameter<T> = T extends (a: any, ...args: infer A) => infer R ? (...args: A) => R : T;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Fn<T> = () => T;
|
|
2
|
+
export type Getter<T> = Fn<T> | T;
|
|
3
|
+
export declare namespace Getter {
|
|
4
|
+
/** @deprecated use {@link toValue} instead */
|
|
5
|
+
function getValue<T>(getter: Getter<T>): T;
|
|
6
|
+
function toValue<T>(getter: Getter<T>): T;
|
|
7
|
+
function toFn<T>(getter: Getter<T>): Fn<T>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type Predicate<T> = (value: T) => boolean;
|
|
2
|
+
/** Type for extracting only string keys from T (skips number & symbol keys) */
|
|
3
|
+
export type StringKeys<T extends AnyObject> = {
|
|
4
|
+
[K in keyof T]: K extends string ? K : never;
|
|
5
|
+
}[keyof T];
|
|
6
|
+
/** Type for extracting string keys of type `T` values of each are of certain type `K` */
|
|
7
|
+
export type TypedKeys<T extends AnyObject, K> = {
|
|
8
|
+
[P in StringKeys<T>]: T[P] extends K ? P : never;
|
|
9
|
+
}[StringKeys<T>];
|
|
10
|
+
/** Type for extraction only keys, values of which are functions with certain args and return result */
|
|
11
|
+
export type FunctionKeys<T extends AnyObject, TArgs extends any[] = any[], TRes = any> = TypedKeys<T, (...args: TArgs) => TRes>;
|
|
12
|
+
export type ArrayTail<T> = T extends [any, ...infer P] ? [...P] : T;
|
|
13
|
+
export type NestedPick<T, K extends ReadonlyArray<any>> = K extends ReadonlyArray<never> ? T : {
|
|
14
|
+
[P in K[0]]: P extends keyof T ? NestedPick<T[P], ArrayTail<K>> : never;
|
|
15
|
+
};
|
|
16
|
+
export type Mutable<T> = {
|
|
17
|
+
-readonly [P in keyof T]: T[P];
|
|
18
|
+
};
|
|
19
|
+
export type LengthArray<T, N extends number, R extends T[] = []> = number extends N ? T[] : (R['length'] extends N ? R : LengthArray<T, N, [T, ...R]>);
|
|
20
|
+
export type EmptyArray = [] & {
|
|
21
|
+
length: 0;
|
|
22
|
+
};
|
|
23
|
+
export type NonEmptyArray<T = any> = T[] & {
|
|
24
|
+
0: T;
|
|
25
|
+
};
|
|
26
|
+
export type AnyObject = Record<string, any>;
|
|
27
|
+
export type EmptyObject = Record<PropertyKey, never>;
|
|
28
|
+
export type AnyFunction = (...args: any[]) => any;
|
|
29
|
+
export type Primitive = number | string | symbol | boolean | null | undefined | bigint;
|
|
30
|
+
export type ObjectOrPrimitive = AnyObject | Primitive;
|
|
31
|
+
export type ToPlainObject<T> = T extends (AnyFunction | Primitive) ? never : (T extends AnyObject ? T : never);
|
|
32
|
+
export type Nullable<T> = T | null | undefined;
|
|
33
|
+
export type PickNullable<T, K extends keyof T> = {
|
|
34
|
+
[P in K]?: Nullable<T[P]>;
|
|
35
|
+
};
|
|
36
|
+
export type EmptyObjectNullable = (EmptyObject | null | undefined);
|
|
37
|
+
export type Coalesce<T, TReplace = EmptyObjectNullable> = [T] extends [never] | [null] | [undefined] ? TReplace : T;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import EnumHelper from '../structures/helpers/enum';
|
|
2
|
+
export declare enum ValidationErrors {
|
|
3
|
+
None = 0,
|
|
4
|
+
ShouldBeNonEmpty = 1,
|
|
5
|
+
ShouldBeEqualTo = 2,
|
|
6
|
+
InvalidFormat = 3,
|
|
7
|
+
Inconsistent = 4,
|
|
8
|
+
InvalidNameFormat = 5,
|
|
9
|
+
InvalidEmailFormat = 6,
|
|
10
|
+
InvalidPasswordFormat = 7,
|
|
11
|
+
OnlyEnglishLetters = 8,
|
|
12
|
+
InvalidPhoneFormat = 9,
|
|
13
|
+
InvalidCreditCardFormat = 10,
|
|
14
|
+
InvalidCreditCardExpiryDateFormat = 11,
|
|
15
|
+
InvalidCreditCardCvvFormat = 12,
|
|
16
|
+
OnlyDigit = 13,
|
|
17
|
+
EmailIsInUse = 14,
|
|
18
|
+
FirstName = 15,
|
|
19
|
+
LastName = 16,
|
|
20
|
+
Website = 17,
|
|
21
|
+
Linkedin = 18
|
|
22
|
+
}
|
|
23
|
+
export declare namespace ValidationErrors {
|
|
24
|
+
const Helper: EnumHelper<ValidationErrors>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyObject } from '../types';
|
|
2
|
+
import { ValidationErrors } from './ValidationErrors';
|
|
3
|
+
import { ValidationConfig, ValidationResults, ValidationVoid, ValidatorFunction, ValidatorFunctionAsync } from './types';
|
|
4
|
+
export declare function createShouldBeEqualTo<T = string>(getter: () => T): ValidatorFunction<T>;
|
|
5
|
+
export declare function throwNotOk(result: ValidationErrors, message?: string): void;
|
|
6
|
+
export declare function validateObject<T extends AnyObject, TErrors = ValidationErrors>(obj: T, validators: ValidationConfig<T, TErrors>, onlyTruthy?: boolean, context?: T): ValidationResults<T, TErrors>;
|
|
7
|
+
export declare function combineValidators<T = string, TErrors = ValidationErrors, TContext = any>(...validators: ValidatorFunction<T, TErrors, TContext>[]): (val: T, ctx?: TContext) => ValidationErrors.None | NonNullable<TErrors>;
|
|
8
|
+
export declare function combineValidatorsAsync<T = string, TErrors = ValidationErrors, TContext = any>(...validators: ValidatorFunctionAsync<T, TErrors, TContext>[]): Promise<(val: T, ctx?: TContext) => Promise<ValidationErrors.None | NonNullable<Awaited<TErrors>>>>;
|
|
9
|
+
export declare function IsSomeInvalid(validatables: ReadonlyArray<ValidationVoid>, stopOnFail?: boolean): Promise<boolean>;
|
|
10
|
+
export declare function getFirstValidationError(...validatables: ValidationVoid[]): Promise<string | null | undefined>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** A validation method that is not tied to ValidationErrors but instead should just throw an Error with error messages */
|
|
2
|
+
export type ValidationThrower<T> = (value: T) => Promise<void> | void;
|
|
3
|
+
export declare namespace ValidationThrower {
|
|
4
|
+
function isValid<T>(value: T, validator: ValidationThrower<T>): Promise<boolean>;
|
|
5
|
+
}
|
|
6
|
+
export interface ValidationGenericLike<T> {
|
|
7
|
+
validate(value: T): Promise<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export type ValidatorsSchema = Record<string, ValidationGenericLike<any>>;
|
|
10
|
+
export type ValidatorThrowers<T extends ValidatorsSchema> = {
|
|
11
|
+
[P in (string & keyof T)]: T[P] extends ValidationGenericLike<infer K> ? ValidationThrower<K> : never;
|
|
12
|
+
};
|
|
13
|
+
export declare function createThrower<T>(schema: ValidationGenericLike<T>): ValidationThrower<T>;
|
|
14
|
+
export declare function createThrowers<T extends ValidatorsSchema>(validators: T): ValidatorThrowers<T>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ValidationErrors } from './ValidationErrors';
|
|
2
|
+
export type ValidatorFunction<T = string, TErrors = ValidationErrors, TContext = any> = (val: T, ctx?: TContext) => TErrors;
|
|
3
|
+
export type ValidatorFunctionAsync<T = string, TErrors = ValidationErrors, TContext = any> = (val: T, ctx?: TContext) => Promise<TErrors>;
|
|
4
|
+
export type ValidationConfig<T, TErrors> = {
|
|
5
|
+
[P in keyof T]?: ValidatorFunction<T[P], TErrors, T>;
|
|
6
|
+
};
|
|
7
|
+
export type ValidationResults<T, TErrors> = {
|
|
8
|
+
[P in keyof T]?: TErrors;
|
|
9
|
+
};
|
|
10
|
+
export type WrapperFunction = (val: ValidatorFunction) => ValidatorFunction;
|
|
11
|
+
export declare class ValidationError<TErrors = ValidationErrors> extends Error {
|
|
12
|
+
readonly code: TErrors;
|
|
13
|
+
constructor(message: string, code: TErrors);
|
|
14
|
+
}
|
|
15
|
+
export interface ValidationVoid {
|
|
16
|
+
readonly error?: string | null | undefined;
|
|
17
|
+
validate(): Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ValidationErrors } from './ValidationErrors';
|
|
2
|
+
export declare const ValidatorsRegExps: {
|
|
3
|
+
name: RegExp;
|
|
4
|
+
englishLetters: RegExp;
|
|
5
|
+
email: RegExp;
|
|
6
|
+
password: RegExp;
|
|
7
|
+
phoneNumber: RegExp;
|
|
8
|
+
onlyDigit: RegExp;
|
|
9
|
+
creditCardNumber: RegExp;
|
|
10
|
+
expiryDateCard: RegExp;
|
|
11
|
+
cvv: RegExp;
|
|
12
|
+
website: RegExp;
|
|
13
|
+
linkedin: RegExp;
|
|
14
|
+
};
|
|
15
|
+
export declare const Validators: {
|
|
16
|
+
notEmpty: <T = string>(val: T) => ValidationErrors.None | ValidationErrors.ShouldBeNonEmpty;
|
|
17
|
+
firstName: <T = string>(val: T) => ValidationErrors.None | ValidationErrors.FirstName;
|
|
18
|
+
lastName: <T = string>(val: T) => ValidationErrors.None | ValidationErrors.LastName;
|
|
19
|
+
fullName: (val: string) => ValidationErrors.None | ValidationErrors.InvalidNameFormat;
|
|
20
|
+
onlyEnglish: (val: string) => ValidationErrors.None | ValidationErrors.OnlyEnglishLetters;
|
|
21
|
+
email: (val: string) => ValidationErrors.None | ValidationErrors.InvalidEmailFormat;
|
|
22
|
+
password: (val: string) => ValidationErrors.None | ValidationErrors.InvalidPasswordFormat;
|
|
23
|
+
onlyDigit: (val: string) => ValidationErrors.None | ValidationErrors.OnlyDigit;
|
|
24
|
+
creditCardNumber: (val: string) => ValidationErrors.None | ValidationErrors.InvalidCreditCardFormat;
|
|
25
|
+
creditCardExpiryDate: (val: string) => ValidationErrors.None | ValidationErrors.InvalidCreditCardExpiryDateFormat;
|
|
26
|
+
creditCardCvv: (val: string) => ValidationErrors.None | ValidationErrors.InvalidCreditCardCvvFormat;
|
|
27
|
+
website: (val: string) => ValidationErrors.None | ValidationErrors.Website;
|
|
28
|
+
linkedin: (val: string) => ValidationErrors.None | ValidationErrors.Linkedin;
|
|
29
|
+
regex: (regex: RegExp) => (val: string) => ValidationErrors.None | ValidationErrors.InvalidFormat;
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ValidatorFunction } from './types';
|
|
2
|
+
export declare const Wrappers: {
|
|
3
|
+
required<T = string>(validator: ValidatorFunction<T>): ValidatorFunction<T>;
|
|
4
|
+
notRequired<T = string>(validator: ValidatorFunction<T>): ValidatorFunction<T>;
|
|
5
|
+
thrower<T = string>(validator: ValidatorFunction<T>): (val: T) => void;
|
|
6
|
+
};
|
package/api/call.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../types';
|
|
2
|
-
import { IEndpointInfo } from './endpoint';
|
|
3
|
-
import { EndpointMethods } from './methods';
|
|
4
|
-
import { LogTypes } from './logging';
|
|
5
|
-
/** Request options to be used by call implementation (e.g. interceptor). Passed as separate object argument to the call method. */
|
|
6
|
-
type Extra<T> = {
|
|
7
|
-
headers?: IEndpointInfo.ExtractHeaders<T>;
|
|
8
|
-
log?: LogTypes<IEndpointInfo.ExtractIn<T>, IEndpointInfo.ExtractOut<T>>;
|
|
9
|
-
noLoader?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type RequestConfig<TIn> = {
|
|
12
|
-
method: EndpointMethods | string & Record<never, never>;
|
|
13
|
-
url: string;
|
|
14
|
-
data: TIn | null | undefined;
|
|
15
|
-
headers: AnyObject;
|
|
16
|
-
};
|
|
17
|
-
/** Compiled request config object passed to `request` implementation */
|
|
18
|
-
export type RequestConfigDetails<T extends IEndpointInfo = IEndpointInfo, TIn = IEndpointInfo.ExtractIn<T>, TExtra extends object = Record<string, any>> = RequestConfig<TIn> & {
|
|
19
|
-
_api: T;
|
|
20
|
-
_noLoader?: boolean;
|
|
21
|
-
_log?: LogTypes;
|
|
22
|
-
/** Additional data passed to the request implementation */
|
|
23
|
-
_extra?: TExtra;
|
|
24
|
-
};
|
|
25
|
-
type CallerOptions<TExtra extends object = Record<string, any>> = {
|
|
26
|
-
/** Additional hook before hading request config to implementation */
|
|
27
|
-
bodyValidation?: (api: IEndpointInfo, input: any) => Promise<void>;
|
|
28
|
-
/** Request implementation */
|
|
29
|
-
request: <TIn, TOut>(config: RequestConfigDetails<IEndpointInfo, TIn, TExtra>) => Promise<{
|
|
30
|
-
data: TOut;
|
|
31
|
-
}>;
|
|
32
|
-
};
|
|
33
|
-
export type EndpointCallArgs<T extends IEndpointInfo> = IEndpointInfo.ExtractIn<T> | IEndpointInfo.ExtractPath<T> | IEndpointInfo.ExtractQuery<T>;
|
|
34
|
-
export declare function buildApiCaller<TExtra extends object = Record<string, any>>(options: CallerOptions<TExtra>): <T extends IEndpointInfo>(api: T, data: EndpointCallArgs<T>, extra?: Extra<T> & TExtra) => Promise<IEndpointInfo.ExtractOut<T>>;
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=call.d.ts.map
|
package/api/call.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/api/call.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,oIAAoI;AACpI,KAAK,KAAK,CAAC,CAAC,IAAI;IAC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M,CAAC,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAC7G,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAElJ,wBAAgB,cAAc,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,kCAK7F,CAAC,QACA,iBAAiB,CAAC,CAAC,UACjB,MAAM,CAAC,CAAC,GAAG,MAAM,0CAwEhC"}
|
package/api/call.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildApiCaller = void 0;
|
|
4
|
-
const register_1 = require("./register");
|
|
5
|
-
const helpers_1 = require("./helpers");
|
|
6
|
-
function buildApiCaller(options) {
|
|
7
|
-
const { bodyValidation, request } = options;
|
|
8
|
-
return async function callApi(api, data, extra) {
|
|
9
|
-
const { headers, log = 'res', noLoader, ...restExtra } = extra || {};
|
|
10
|
-
const resultInput = data && { ...data };
|
|
11
|
-
const pathInputs = {};
|
|
12
|
-
let queryStr = '';
|
|
13
|
-
const pathKeys = api.pathBuilder.args;
|
|
14
|
-
if (resultInput && pathKeys?.length) {
|
|
15
|
-
for (const key of pathKeys) {
|
|
16
|
-
pathInputs[key] = resultInput[key];
|
|
17
|
-
delete resultInput[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const queryKeysExpected = api.queryKeys;
|
|
21
|
-
if (resultInput && queryKeysExpected?.length) {
|
|
22
|
-
const queryInputs = {};
|
|
23
|
-
let empty = true;
|
|
24
|
-
for (const key of queryKeysExpected) {
|
|
25
|
-
const v = resultInput[key];
|
|
26
|
-
if (v != null) {
|
|
27
|
-
queryInputs[key] = v;
|
|
28
|
-
empty = false;
|
|
29
|
-
}
|
|
30
|
-
delete resultInput[key];
|
|
31
|
-
}
|
|
32
|
-
if (!empty) {
|
|
33
|
-
const params = new URLSearchParams(queryInputs);
|
|
34
|
-
queryStr = '?' + params.toString();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (resultInput && bodyValidation) {
|
|
38
|
-
await bodyValidation(api, resultInput);
|
|
39
|
-
}
|
|
40
|
-
const sendingData = resultInput && Object.keys(resultInput).length > 0
|
|
41
|
-
? resultInput
|
|
42
|
-
: undefined;
|
|
43
|
-
const method = api.method || 'GET';
|
|
44
|
-
const config = {
|
|
45
|
-
method,
|
|
46
|
-
url: (0, helpers_1.getPath)(api, pathInputs) + queryStr,
|
|
47
|
-
data: register_1.PreProcessors.process(api, sendingData) || undefined,
|
|
48
|
-
headers: headers || {},
|
|
49
|
-
_api: api,
|
|
50
|
-
_noLoader: noLoader ?? method === 'GET',
|
|
51
|
-
_log: log,
|
|
52
|
-
_extra: restExtra,
|
|
53
|
-
};
|
|
54
|
-
if (api.isForm) {
|
|
55
|
-
config.headers['Content-Type'] = 'multipart/form-data';
|
|
56
|
-
}
|
|
57
|
-
const response = await request(config);
|
|
58
|
-
return register_1.PostProcessors.process(api, response.data);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
exports.buildApiCaller = buildApiCaller;
|
|
62
|
-
//# sourceMappingURL=call.js.map
|
package/api/call.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/api/call.ts"],"names":[],"mappings":";;;AAAA,yCAA2D;AAK3D,uCAAoC;AAuCpC,SAAgB,cAAc,CAA8C,OAA8B;IAEtG,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5C,OAAO,KAAK,UAAU,OAAO,CACzB,GAAM,EAC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,CAAC;QAED,IAAI,WAAW,IAAI,cAAc,EAAE,CAAC;YAChC,MAAM,cAAc,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,WAAW,GAAG,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC;YAClE,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,KAAK,CAAC;QACnC,MAAM,MAAM,GAAyC;YACjD,MAAM;YACN,GAAG,EAAE,IAAA,iBAAO,EAAC,GAAG,EAAE,UAA0C,CAAC,GAAG,QAAQ;YACxE,IAAI,EAAE,wBAAa,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,SAAS;YAC1D,OAAO,EAAE,OAAoB,IAAI,EAAE;YACnC,IAAI,EAAE,GAAG;YAET,SAAS,EAAE,QAAQ,IAAI,MAAgB,KAAK,KAAK;YACjD,IAAI,EAAE,GAAG;YACT,MAAM,EAAE,SAAmB;SAC9B,CAAC;QAEF,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,qBAAqB,CAAC;QAC3D,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,MAAM,CAAmB,CAAC;QACzD,OAAO,yBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC;AACN,CAAC;AA/ED,wCA+EC"}
|
package/api/endpoint.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AnyObject } from '../types';
|
|
2
|
-
import { Path } from '../structures/path';
|
|
3
|
-
import { EndpointMethods } from './methods';
|
|
4
|
-
import { IEndpointInfo } from './endpoint.types';
|
|
5
|
-
export type { IEndpointInfo };
|
|
6
|
-
export declare class ApiEndpoint<TIn extends object | null, TOut, TPath extends readonly string[], TQuery extends object, TErrors, THeaders> implements IEndpointInfo, IEndpointInfo.IIn<TIn>, IEndpointInfo.IOut<TOut>, IEndpointInfo.IPath<TPath>, IEndpointInfo.IQuery<TQuery>, IEndpointInfo.IErrors<TErrors>, IEndpointInfo.IHeaders<THeaders> {
|
|
7
|
-
method: EndpointMethods;
|
|
8
|
-
path: Path.SwitchBuilder<TPath>;
|
|
9
|
-
isForm?: boolean;
|
|
10
|
-
displayName?: string;
|
|
11
|
-
in?: TIn;
|
|
12
|
-
out?: TOut;
|
|
13
|
-
queryKeys?: (string & keyof TQuery)[];
|
|
14
|
-
queryTemplate?: TQuery;
|
|
15
|
-
errorProcessor?: (err: TErrors) => void;
|
|
16
|
-
headers?: THeaders;
|
|
17
|
-
get pathBuilder(): Path.IBuilder;
|
|
18
|
-
static construct<TIn extends object | null, TOut>(method?: EndpointMethods, displayName?: string): ApiEndpoint<TIn, TOut, readonly [], object, any, AnyObject>;
|
|
19
|
-
/** Creates an instance and applies 'GET' method for it. */
|
|
20
|
-
static get<TOut>(displayName?: string): ApiEndpoint<null, TOut, readonly [], object, any, AnyObject>;
|
|
21
|
-
/** Creates an instance and applies 'POST' method for it. */
|
|
22
|
-
static post<TIn extends object | null, TOut = void>(displayName?: string): ApiEndpoint<TIn, TOut, readonly [], object, any, AnyObject>;
|
|
23
|
-
/** Creates an instance and applies 'DELETE' method for it. */
|
|
24
|
-
static delete<TOut>(displayName?: string): ApiEndpoint<null, TOut, readonly [], object, any, AnyObject>;
|
|
25
|
-
/** Applies a type based on {@link Path.IBuilder} type by accepting arguments for {@link Path.construct} function */
|
|
26
|
-
withPath<P extends Path.BaseInput[]>(...path: P): ApiEndpoint<TIn, TOut, Path.ExtractArgs<Path.CombineBuilders<P>>, TQuery, TErrors, THeaders>;
|
|
27
|
-
/** Applies query type and also store query keys to make api caller be able to distinguish which keys should be ejected from request body. */
|
|
28
|
-
withQuery<TQ extends object>(...queryKeys: (string & keyof TQ)[]): ApiEndpoint<TIn, TOut, TPath, TQ, TErrors, THeaders>;
|
|
29
|
-
/** Applies error type, optionally stores error processor. */
|
|
30
|
-
withErrors<TErr>(errorProcessor?: (err: TErr) => void): ApiEndpoint<TIn, TOut, TPath, TQuery, TErr, THeaders>;
|
|
31
|
-
/** Applies headers type. */
|
|
32
|
-
withHeaders<THeads>(_headersMarker?: THeads): ApiEndpoint<TIn, TOut, TPath, TQuery, TErrors, THeads>;
|
|
33
|
-
/** Marks this instance as one has to be sent as form.
|
|
34
|
-
*
|
|
35
|
-
* TODO: introduce more content types support.
|
|
36
|
-
*/
|
|
37
|
-
asForm(): this;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=endpoint.d.ts.map
|
package/api/endpoint.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../src/api/endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,qBAAa,WAAW,CACpB,GAAG,SAAS,MAAM,GAAG,IAAI,EACzB,IAAI,EACJ,KAAK,SAAS,SAAS,MAAM,EAAE,EAC/B,MAAM,SAAS,MAAM,EACrB,OAAO,EACP,QAAQ,CACV,YACF,aAAa,EACb,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EACtB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EACxB,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1B,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,EAC5B,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,EAC9B,aAAa,CAAC,QAAQ,CAAC,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