@atlantjs/arch 15.6.5 → 15.6.7
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/biome.json +1 -1
- package/package.json +11 -11
- package/{@tool-box → src/@tool-box}/tests/builder.abstract.util.d.ts +1 -0
- package/src/@tool-box/tests/builder.abstract.util.d.ts.map +1 -0
- package/src/@tool-box/tests/builders/datetime/datetime.edge.builder.d.ts +7 -0
- package/src/@tool-box/tests/builders/datetime/datetime.edge.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/datetime/datetime.edge.builder.js +3 -3
- package/src/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts +5 -0
- package/src/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/failures/dummies/failure.dummy.js +1 -1
- package/{@tool-box → src/@tool-box}/tests/builders/failures/failure.builder.d.ts +2 -1
- package/src/@tool-box/tests/builders/failures/failure.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/failures/failure.builder.js +2 -2
- package/src/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts +7 -0
- package/src/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/metadata/metadata-uv.builder.js +3 -3
- package/src/@tool-box/tests/builders/metadata/metadata.edge.builder.d.ts +7 -0
- package/src/@tool-box/tests/builders/metadata/metadata.edge.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/metadata/metadata.edge.builder.js +3 -3
- package/src/@tool-box/tests/builders/user/email.edge.builder.d.ts +7 -0
- package/src/@tool-box/tests/builders/user/email.edge.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/user/email.edge.builder.js +3 -3
- package/src/@tool-box/tests/builders/user/username.edge.builder.d.ts +7 -0
- package/src/@tool-box/tests/builders/user/username.edge.builder.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/tests/builders/user/username.edge.builder.js +3 -3
- package/{@tool-box → src/@tool-box}/tests/faker/faker.d.ts +1 -0
- package/src/@tool-box/tests/faker/faker.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/convert-units/convert-units.d.ts +6 -5
- package/src/@tool-box/utils/convert-units/convert-units.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/convert-units/convert-units.js +5 -5
- package/src/@tool-box/utils/datatypes/boolean-utils.d.ts +2 -0
- package/src/@tool-box/utils/datatypes/boolean-utils.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/datatypes/boolean-utils.js +1 -10
- package/{@tool-box → src/@tool-box}/utils/datatypes/generic-types.d.ts +1 -0
- package/src/@tool-box/utils/datatypes/generic-types.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/datatypes/plainify.d.ts +1 -0
- package/src/@tool-box/utils/datatypes/plainify.d.ts.map +1 -0
- package/src/@tool-box/utils/datatypes/string-utils.d.ts +2 -0
- package/src/@tool-box/utils/datatypes/string-utils.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/datatypes/string-utils.js +1 -0
- package/src/@tool-box/utils/datetime/mappers/month.mapper.d.ts +7 -0
- package/src/@tool-box/utils/datetime/mappers/month.mapper.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/datetime/mappers/month.mapper.js +2 -2
- package/{@tool-box → src/@tool-box}/utils/datetime/mappers/points/month-abbreviation.enum.d.ts +1 -0
- package/src/@tool-box/utils/datetime/mappers/points/month-abbreviation.enum.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/datetime/mappers/points/month-number.enum.d.ts +1 -0
- package/src/@tool-box/utils/datetime/mappers/points/month-number.enum.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/ducts/common.d.ts +1 -0
- package/src/@tool-box/utils/ducts/common.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/ducts/common.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/ducts/optional-type.d.ts +2 -1
- package/src/@tool-box/utils/ducts/optional-type.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/ducts/optional-type.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/ducts/return-type.d.ts +3 -2
- package/src/@tool-box/utils/ducts/return-type.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/ducts/return-type.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider-failure-response.d.ts +3 -3
- package/src/@tool-box/utils/http-provider/http-provider-failure-response.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider-failure-response.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider-success-response.d.ts +2 -1
- package/src/@tool-box/utils/http-provider/http-provider-success-response.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider.d.ts +5 -4
- package/src/@tool-box/utils/http-provider/http-provider.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider.js +4 -4
- package/{@tool-box → src/@tool-box}/utils/logger/index.d.ts +1 -0
- package/src/@tool-box/utils/logger/index.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/map/map.abstract.d.ts +1 -0
- package/src/@tool-box/utils/map/map.abstract.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/random/random.d.ts +1 -0
- package/src/@tool-box/utils/random/random.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/type-guard/guardian-exception.d.ts +1 -0
- package/src/@tool-box/utils/type-guard/guardian-exception.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/type-guard/guardian.d.ts +3 -2
- package/src/@tool-box/utils/type-guard/guardian.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/type-guard/guardian.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/type-guard/guardian.type.d.ts +1 -0
- package/src/@tool-box/utils/type-guard/guardian.type.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-cron-expression.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-cron-expression.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-date-string.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-date-string.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-password-match.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-password-match.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-password-match.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/validators/is-password-policy.validator.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-password-policy.validator.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-password-policy.validator.js +1 -1
- package/{@tool-box → src/@tool-box}/utils/validators/is-schedule.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-schedule.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-time-string.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-time-string.d.ts.map +1 -0
- package/{@tool-box → src/@tool-box}/utils/validators/is-ulid.d.ts +1 -0
- package/src/@tool-box/utils/validators/is-ulid.d.ts.map +1 -0
- package/src/index.d.ts +77 -0
- package/src/index.d.ts.map +1 -0
- package/{index.js → src/index.js} +68 -68
- package/{objects → src/objects}/@common/edges/email.edge.d.ts +2 -1
- package/src/objects/@common/edges/email.edge.d.ts.map +1 -0
- package/{objects → src/objects}/@common/edges/email.edge.js +1 -2
- package/{objects → src/objects}/@common/edges/ulid.sketch.edge.d.ts +1 -0
- package/src/objects/@common/edges/ulid.sketch.edge.d.ts.map +1 -0
- package/{objects → src/objects}/@common/edges/ulid.sketch.edge.js +1 -1
- package/{objects → src/objects}/@common/edges/url.edge.d.ts +2 -1
- package/src/objects/@common/edges/url.edge.d.ts.map +1 -0
- package/{objects → src/objects}/@common/edges/url.edge.js +1 -1
- package/{objects → src/objects}/@common/edges/username.edge.d.ts +2 -1
- package/src/objects/@common/edges/username.edge.d.ts.map +1 -0
- package/{objects → src/objects}/@common/edges/username.edge.js +1 -1
- package/{objects → src/objects}/@common/edges/uuid.sketch.edge.d.ts +1 -0
- package/src/objects/@common/edges/uuid.sketch.edge.d.ts.map +1 -0
- package/{objects → src/objects}/@common/edges/uuid.sketch.edge.js +1 -1
- package/{objects → src/objects}/@common/points/environment.point.d.ts +1 -0
- package/src/objects/@common/points/environment.point.d.ts.map +1 -0
- package/{objects → src/objects}/@common/points/header-token-name.point.d.ts +1 -0
- package/src/objects/@common/points/header-token-name.point.d.ts.map +1 -0
- package/{objects → src/objects}/@common/points/http-status-codes.point.d.ts +1 -0
- package/src/objects/@common/points/http-status-codes.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/amount-value.edge.d.ts +2 -1
- package/src/objects/amount/amount-value.edge.d.ts.map +1 -0
- package/{objects → src/objects}/amount/amount-value.edge.js +1 -1
- package/{objects → src/objects}/amount/amount.edge.d.ts +143 -133
- package/src/objects/amount/amount.edge.d.ts.map +1 -0
- package/{objects → src/objects}/amount/amount.edge.js +175 -148
- package/{objects → src/objects}/amount/amount.polygon.d.ts +1 -0
- package/src/objects/amount/amount.polygon.d.ts.map +1 -0
- package/src/objects/amount/amount.uv.d.ts +9 -0
- package/src/objects/amount/amount.uv.d.ts.map +1 -0
- package/{objects → src/objects}/amount/amount.uv.js +2 -2
- package/{objects → src/objects}/amount/points/duration-unit.point.d.ts +1 -0
- package/src/objects/amount/points/duration-unit.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/energy-unit.point.d.ts +1 -0
- package/src/objects/amount/points/energy-unit.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/length-unit.point.d.ts +1 -0
- package/src/objects/amount/points/length-unit.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/mass-unit.point.d.ts +1 -0
- package/src/objects/amount/points/mass-unit.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/month-name.point.d.ts +1 -0
- package/src/objects/amount/points/month-name.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/object-unit.point.d.ts +1 -0
- package/src/objects/amount/points/object-unit.point.d.ts.map +1 -0
- package/src/objects/amount/points/units.point.d.ts +7 -0
- package/src/objects/amount/points/units.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/volume-unit.point.d.ts +1 -0
- package/src/objects/amount/points/volume-unit.point.d.ts.map +1 -0
- package/{objects → src/objects}/amount/points/week-day.point.d.ts +1 -0
- package/src/objects/amount/points/week-day.point.d.ts.map +1 -0
- package/src/objects/datetime/edges/datetime.edge.d.ts +467 -0
- package/src/objects/datetime/edges/datetime.edge.d.ts.map +1 -0
- package/{objects → src/objects}/datetime/edges/datetime.edge.js +209 -220
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.d.ts +5 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.js +19 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.d.ts +5 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.js +19 -0
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.d.ts +6 -0
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.js +15 -0
- package/src/objects/datetime/edges/locale/holidays-country.type.d.ts +3 -0
- package/src/objects/datetime/edges/locale/holidays-country.type.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.d.ts +5 -0
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.js +24 -0
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.d.ts +5 -0
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.d.ts.map +1 -0
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.js +24 -0
- package/{objects → src/objects}/datetime/points/month-name.enum.d.ts +1 -0
- package/src/objects/datetime/points/month-name.enum.d.ts.map +1 -0
- package/{objects → src/objects}/datetime/points/week-day.enum.d.ts +1 -0
- package/src/objects/datetime/points/week-day.enum.d.ts.map +1 -0
- package/{objects → src/objects}/failure/edges/failure.abstract.d.ts +2 -1
- package/src/objects/failure/edges/failure.abstract.d.ts.map +1 -0
- package/{objects → src/objects}/failure/edges/failure.abstract.js +2 -2
- package/{objects → src/objects}/failure/edges/failure.abstract.polygon.d.ts +1 -0
- package/src/objects/failure/edges/failure.abstract.polygon.d.ts.map +1 -0
- package/{objects → src/objects}/language/points/language.point.d.ts +1 -0
- package/src/objects/language/points/language.point.d.ts.map +1 -0
- package/{objects → src/objects}/metadata/metadata.edge.d.ts +4 -3
- package/src/objects/metadata/metadata.edge.d.ts.map +1 -0
- package/{objects → src/objects}/metadata/metadata.edge.js +2 -2
- package/{objects → src/objects}/metadata/metadata.polygon.d.ts +1 -0
- package/src/objects/metadata/metadata.polygon.d.ts.map +1 -0
- package/{objects → src/objects}/metadata/metadata.uv.d.ts +2 -1
- package/src/objects/metadata/metadata.uv.d.ts.map +1 -0
- package/{objects → src/objects}/metadata/metadata.uv.js +2 -2
- package/{objects → src/objects}/password/password.edge.d.ts +3 -2
- package/src/objects/password/password.edge.d.ts.map +1 -0
- package/{objects → src/objects}/password/password.edge.js +5 -5
- package/src/objects/password/password.polygon.d.ts +6 -0
- package/src/objects/password/password.polygon.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-consecutive-chars-step.d.ts +3 -2
- package/src/objects/password/steps/not-allowing-consecutive-chars-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-consecutive-chars-step.js +1 -1
- package/{objects → src/objects}/password/steps/not-allowing-date-step.d.ts +3 -2
- package/src/objects/password/steps/not-allowing-date-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-date-step.js +1 -1
- package/src/objects/password/steps/not-allowing-phone-step.d.ts +8 -0
- package/src/objects/password/steps/not-allowing-phone-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-phone-step.js +1 -1
- package/{objects → src/objects}/password/steps/not-allowing-repeated-chars-step.d.ts +3 -2
- package/src/objects/password/steps/not-allowing-repeated-chars-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-repeated-chars-step.js +1 -1
- package/{objects → src/objects}/password/steps/not-allowing-string-step.d.ts +3 -2
- package/src/objects/password/steps/not-allowing-string-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-string-step.js +1 -1
- package/{objects → src/objects}/password/steps/not-allowing-these-chars-step.d.ts +3 -2
- package/src/objects/password/steps/not-allowing-these-chars-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/not-allowing-these-chars-step.js +1 -1
- package/src/objects/password/steps/numeric-step.d.ts +6 -0
- package/src/objects/password/steps/numeric-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/numeric-step.js +1 -1
- package/src/objects/password/steps/with-at-least-one-letter-step.d.ts +6 -0
- package/src/objects/password/steps/with-at-least-one-letter-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/with-at-least-one-letter-step.js +1 -1
- package/src/objects/password/steps/with-at-least-one-number-digit-step.d.ts +6 -0
- package/src/objects/password/steps/with-at-least-one-number-digit-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/with-at-least-one-number-digit-step.js +1 -1
- package/src/objects/password/steps/with-at-least-one-special-char-step.d.ts +6 -0
- package/src/objects/password/steps/with-at-least-one-special-char-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/with-at-least-one-special-char-step.js +1 -1
- package/{objects → src/objects}/password/steps/with-length-step.d.ts +3 -2
- package/src/objects/password/steps/with-length-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/steps/with-length-step.js +1 -1
- package/{objects → src/objects}/password/validation-step.d.ts +2 -1
- package/src/objects/password/validation-step.d.ts.map +1 -0
- package/{objects → src/objects}/password/validation-step.type.d.ts +1 -0
- package/src/objects/password/validation-step.type.d.ts.map +1 -0
- package/src/objects/password/validation-step.type.js +2 -0
- package/{objects → src/objects}/primitives/boolean.edge.sketch.d.ts +1 -0
- package/src/objects/primitives/boolean.edge.sketch.d.ts.map +1 -0
- package/src/objects/primitives/datetime.edge.sketch.d.ts +4 -0
- package/src/objects/primitives/datetime.edge.sketch.d.ts.map +1 -0
- package/{objects → src/objects}/primitives/datetime.edge.sketch.js +1 -1
- package/{objects → src/objects}/primitives/number.edge.sketch.d.ts +1 -0
- package/src/objects/primitives/number.edge.sketch.d.ts.map +1 -0
- package/{objects → src/objects}/primitives/number.edge.sketch.js +1 -1
- package/{objects → src/objects}/primitives/string.edge.sketch.d.ts +1 -0
- package/src/objects/primitives/string.edge.sketch.d.ts.map +1 -0
- package/{objects → src/objects}/scheduling/scheduling.edge.d.ts +7 -6
- package/src/objects/scheduling/scheduling.edge.d.ts.map +1 -0
- package/src/objects/scheduling/scheduling.edge.failure.d.ts +5 -0
- package/src/objects/scheduling/scheduling.edge.failure.d.ts.map +1 -0
- package/{objects → src/objects}/scheduling/scheduling.edge.failure.js +1 -1
- package/{objects → src/objects}/scheduling/scheduling.edge.js +5 -5
- package/{objects → src/objects}/time/time.edge.d.ts +2 -1
- package/src/objects/time/time.edge.d.ts.map +1 -0
- package/{objects → src/objects}/time/time.edge.js +2 -2
- package/src/objects-interface/edges/edge.abstract.d.ts +5 -0
- package/src/objects-interface/edges/edge.abstract.d.ts.map +1 -0
- package/{objects-interface → src/objects-interface}/face.abstract.d.ts +3 -2
- package/src/objects-interface/face.abstract.d.ts.map +1 -0
- package/{objects-interface → src/objects-interface}/solid.abstract.d.ts +6 -5
- package/src/objects-interface/solid.abstract.d.ts.map +1 -0
- package/{objects-interface → src/objects-interface}/solid.abstract.js +1 -1
- package/src/objects-interface/uv.abstract.d.ts +7 -0
- package/src/objects-interface/uv.abstract.d.ts.map +1 -0
- package/{objects-interface → src/objects-interface}/vertices/vertex.abstract.d.ts +6 -5
- package/src/objects-interface/vertices/vertex.abstract.d.ts.map +1 -0
- package/{objects-interface → src/objects-interface}/vertices/vertex.abstract.js +1 -1
- package/{shared → src/shared}/payload.abstract.d.ts +1 -0
- package/src/shared/payload.abstract.d.ts.map +1 -0
- package/{shared → src/shared}/request.abstract.d.ts +6 -5
- package/src/shared/request.abstract.d.ts.map +1 -0
- package/src/shared/request.abstract.js +3 -0
- package/{shared → src/shared}/response.abstract.d.ts +1 -0
- package/src/shared/response.abstract.d.ts.map +1 -0
- package/tsconfig-default.json +2 -2
- package/tsconfig-lib.json +3 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/types/boolean.d.ts +19 -0
- package/types/string.d.ts +33 -0
- package/@tool-box/tests/builders/datetime/datetime.edge.builder.d.ts +0 -6
- package/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts +0 -4
- package/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts +0 -6
- package/@tool-box/tests/builders/metadata/metadata.edge.builder.d.ts +0 -6
- package/@tool-box/tests/builders/user/email.edge.builder.d.ts +0 -6
- package/@tool-box/tests/builders/user/username.edge.builder.d.ts +0 -6
- package/@tool-box/utils/datatypes/boolean-utils.d.ts +0 -16
- package/@tool-box/utils/datatypes/string-utils.d.ts +0 -27
- package/@tool-box/utils/datetime/mappers/month.mapper.d.ts +0 -6
- package/index.d.ts +0 -76
- package/objects/amount/amount.uv.d.ts +0 -8
- package/objects/amount/points/units.point.d.ts +0 -6
- package/objects/datetime/edges/datetime.edge.d.ts +0 -455
- package/objects/password/password.polygon.d.ts +0 -5
- package/objects/password/steps/not-allowing-phone-step.d.ts +0 -7
- package/objects/password/steps/numeric-step.d.ts +0 -5
- package/objects/password/steps/with-at-least-one-letter-step.d.ts +0 -5
- package/objects/password/steps/with-at-least-one-number-digit-step.d.ts +0 -5
- package/objects/password/steps/with-at-least-one-special-char-step.d.ts +0 -5
- package/objects/primitives/datetime.edge.sketch.d.ts +0 -3
- package/objects/scheduling/scheduling.edge.failure.d.ts +0 -4
- package/objects-interface/edges/edge.abstract.d.ts +0 -4
- package/objects-interface/uv.abstract.d.ts +0 -6
- package/shared/request.abstract.js +0 -3
- /package/{@tool-box → src/@tool-box}/tests/builder.abstract.util.js +0 -0
- /package/{@tool-box → src/@tool-box}/tests/faker/faker.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/datatypes/generic-types.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/datatypes/plainify.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/datetime/mappers/points/month-abbreviation.enum.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/datetime/mappers/points/month-number.enum.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/http-provider/http-provider-success-response.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/logger/index.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/map/map.abstract.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/random/random.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/type-guard/guardian-exception.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/type-guard/guardian.type.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/validators/is-cron-expression.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/validators/is-date-string.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/validators/is-schedule.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/validators/is-time-string.js +0 -0
- /package/{@tool-box → src/@tool-box}/utils/validators/is-ulid.js +0 -0
- /package/{objects → src/objects}/@common/points/environment.point.js +0 -0
- /package/{objects → src/objects}/@common/points/header-token-name.point.js +0 -0
- /package/{objects → src/objects}/@common/points/http-status-codes.point.js +0 -0
- /package/{objects → src/objects}/amount/amount.polygon.js +0 -0
- /package/{objects → src/objects}/amount/points/duration-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/energy-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/length-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/mass-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/month-name.point.js +0 -0
- /package/{objects → src/objects}/amount/points/object-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/units.point.js +0 -0
- /package/{objects → src/objects}/amount/points/volume-unit.point.js +0 -0
- /package/{objects → src/objects}/amount/points/week-day.point.js +0 -0
- /package/{objects/failure/edges/failure.abstract.polygon.js → src/objects/datetime/edges/locale/holidays-country.type.js} +0 -0
- /package/{objects → src/objects}/datetime/points/month-name.enum.js +0 -0
- /package/{objects → src/objects}/datetime/points/week-day.enum.js +0 -0
- /package/{objects/metadata/metadata.polygon.js → src/objects/failure/edges/failure.abstract.polygon.js} +0 -0
- /package/{objects → src/objects}/language/points/language.point.js +0 -0
- /package/{objects/password/password.polygon.js → src/objects/metadata/metadata.polygon.js} +0 -0
- /package/{objects/password/validation-step.type.js → src/objects/password/password.polygon.js} +0 -0
- /package/{objects → src/objects}/password/validation-step.js +0 -0
- /package/{objects → src/objects}/primitives/boolean.edge.sketch.js +0 -0
- /package/{objects → src/objects}/primitives/string.edge.sketch.js +0 -0
- /package/{objects-interface → src/objects-interface}/edges/edge.abstract.js +0 -0
- /package/{objects-interface → src/objects-interface}/face.abstract.js +0 -0
- /package/{objects-interface → src/objects-interface}/uv.abstract.js +0 -0
- /package/{shared → src/shared}/payload.abstract.js +0 -0
- /package/{shared → src/shared}/response.abstract.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmountPolygon } from "
|
|
1
|
+
import { AmountPolygon } from "#/objects/amount/amount.polygon";
|
|
2
2
|
export declare class AmountEdge<TUnitsPoint> {
|
|
3
3
|
protected _value: number;
|
|
4
4
|
protected _unit: TUnitsPoint;
|
|
@@ -6,108 +6,110 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
6
6
|
get value(): number;
|
|
7
7
|
get unit(): TUnitsPoint;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @returns this
|
|
9
|
+
* Rounds the value to the nearest integer.
|
|
10
|
+
* @returns `this` to allow method chaining.
|
|
11
11
|
* @example
|
|
12
12
|
* const amount = new AmountEdge(5.7, MassUnitPoint.gram);
|
|
13
|
-
* amount.round(); //
|
|
13
|
+
* amount.round(); // value is now 6
|
|
14
14
|
*/
|
|
15
15
|
round(): this;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @returns this
|
|
17
|
+
* Rounds the value up to the next highest integer.
|
|
18
|
+
* @returns `this` to allow method chaining.
|
|
19
19
|
* @example
|
|
20
20
|
* const amount = new AmountEdge(5.2, MassUnitPoint.gram);
|
|
21
|
-
* amount.ceil(); //
|
|
21
|
+
* amount.ceil(); // value is now 6
|
|
22
22
|
*/
|
|
23
23
|
ceil(): this;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @returns this
|
|
25
|
+
* Rounds the value down to the next lowest integer.
|
|
26
|
+
* @returns `this` to allow method chaining.
|
|
27
27
|
* @example
|
|
28
28
|
* const amount = new AmountEdge(5.9, MassUnitPoint.gram);
|
|
29
|
-
* amount.floor(); //
|
|
29
|
+
* amount.floor(); // value is now 5
|
|
30
30
|
*/
|
|
31
31
|
floor(): this;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @param precision -
|
|
35
|
-
* @returns this
|
|
33
|
+
* Rounds the value to a specified number of decimal places.
|
|
34
|
+
* @param precision - The number of decimal places to keep.
|
|
35
|
+
* @returns `this` to allow method chaining.
|
|
36
36
|
* @example
|
|
37
37
|
* const amount = new AmountEdge(5.6789, MassUnitPoint.gram);
|
|
38
|
-
* amount.toFixed(2); //
|
|
38
|
+
* amount.toFixed(2); // value is now 5.68
|
|
39
39
|
*/
|
|
40
40
|
toFixed(precision: number): this;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @returns this
|
|
42
|
+
* Returns the absolute value (without sign).
|
|
43
|
+
* @returns `this` to allow method chaining.
|
|
44
44
|
* @example
|
|
45
45
|
* const amount = new AmountEdge(-5.5, MassUnitPoint.gram);
|
|
46
|
-
* amount.abs(); //
|
|
46
|
+
* amount.abs(); // value is now 5.5
|
|
47
47
|
*/
|
|
48
48
|
abs(): this;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* Compacts the amount into a more appropriate unit based on its value.
|
|
51
|
+
* For example, 1000 grams is converted to 1 kilogram.
|
|
52
|
+
*
|
|
53
|
+
* @returns A new instance with the compacted unit.
|
|
54
|
+
*
|
|
53
55
|
* @example
|
|
54
56
|
* const amount = new AmountEdge(1500, MassUnitPoint.gram);
|
|
55
57
|
* const compact = amount.compact(); // 1.5 kg
|
|
56
58
|
*/
|
|
57
59
|
compact(): AmountEdge<TUnitsPoint>;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
60
|
-
* @param amount -
|
|
61
|
-
* @returns this
|
|
61
|
+
* Adds another amount to the current value.
|
|
62
|
+
* @param amount - The amount to be added.
|
|
63
|
+
* @returns `this` to allow method chaining.
|
|
62
64
|
* @example
|
|
63
65
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
64
66
|
* const amount2 = new AmountEdge(3, MassUnitPoint.gram);
|
|
65
|
-
* amount1.sum(amount2); //
|
|
67
|
+
* amount1.sum(amount2); // value is now 8
|
|
66
68
|
*/
|
|
67
69
|
sum(amount: AmountEdge<TUnitsPoint>): this;
|
|
68
70
|
/**
|
|
69
|
-
*
|
|
70
|
-
* @param amount -
|
|
71
|
-
* @returns this
|
|
71
|
+
* Subtracts another amount from the current value.
|
|
72
|
+
* @param amount - The amount to be subtracted.
|
|
73
|
+
* @returns `this` to allow method chaining.
|
|
72
74
|
* @example
|
|
73
75
|
* const amount1 = new AmountEdge(8, MassUnitPoint.gram);
|
|
74
76
|
* const amount2 = new AmountEdge(3, MassUnitPoint.gram);
|
|
75
|
-
* amount1.subtract(amount2); //
|
|
77
|
+
* amount1.subtract(amount2); // value is now 5
|
|
76
78
|
*/
|
|
77
79
|
subtract(amount: AmountEdge<TUnitsPoint>): this;
|
|
78
80
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @param amount - Divisor (
|
|
81
|
-
* @returns this
|
|
81
|
+
* Divides the value by a number or another amount.
|
|
82
|
+
* @param amount - Divisor (number or AmountEdge)
|
|
83
|
+
* @returns `this` to allow method chaining
|
|
82
84
|
* @example
|
|
83
85
|
* const amount = new AmountEdge(10, MassUnitPoint.gram);
|
|
84
|
-
* amount.divideBy(2); //
|
|
85
|
-
* amount.divideBy(new AmountEdge(2, MassUnitPoint.gram)); //
|
|
86
|
+
* amount.divideBy(2); // value is now 5
|
|
87
|
+
* amount.divideBy(new AmountEdge(2, MassUnitPoint.gram)); // value is now 2.5
|
|
86
88
|
*/
|
|
87
89
|
divideBy(amount: AmountEdge<TUnitsPoint> | number): this;
|
|
88
90
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @param amount -
|
|
91
|
-
* @returns this
|
|
91
|
+
* Multiplies the value by a number or another amount.
|
|
92
|
+
* @param amount - Multiplier (number or AmountEdge)
|
|
93
|
+
* @returns `this` to allow method chaining
|
|
92
94
|
* @example
|
|
93
95
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
94
|
-
* amount.multiplyBy(2); //
|
|
95
|
-
* amount.multiplyBy(new AmountEdge(3, MassUnitPoint.gram)); //
|
|
96
|
+
* amount.multiplyBy(2); // value is now 10
|
|
97
|
+
* amount.multiplyBy(new AmountEdge(3, MassUnitPoint.gram)); // value is now 30
|
|
96
98
|
*/
|
|
97
99
|
multiplyBy(amount: AmountEdge<TUnitsPoint> | number): this;
|
|
98
100
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @param amount -
|
|
101
|
-
* @returns this
|
|
101
|
+
* Calculates the remainder (modulus) of the current value.
|
|
102
|
+
* @param amount - The divisor, either a number or an AmountEdge instance.
|
|
103
|
+
* @returns `this` to allow method chaining.
|
|
102
104
|
* @example
|
|
103
105
|
* const amount = new AmountEdge(10, MassUnitPoint.gram);
|
|
104
|
-
* amount.modBy(3); //
|
|
106
|
+
* amount.modBy(3); // value is now 1
|
|
105
107
|
*/
|
|
106
108
|
modBy(amount: AmountEdge<TUnitsPoint> | number): this;
|
|
107
109
|
/**
|
|
108
|
-
*
|
|
109
|
-
* @param amount -
|
|
110
|
-
* @returns
|
|
110
|
+
* Calculates the absolute difference between this amount and another.
|
|
111
|
+
* @param amount - The amount to compare against
|
|
112
|
+
* @returns A new instance with the absolute difference
|
|
111
113
|
* @example
|
|
112
114
|
* const amount1 = new AmountEdge(10, MassUnitPoint.gram);
|
|
113
115
|
* const amount2 = new AmountEdge(3, MassUnitPoint.gram);
|
|
@@ -115,18 +117,23 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
115
117
|
*/
|
|
116
118
|
difference(amount: AmountEdge<TUnitsPoint>): AmountEdge<TUnitsPoint>;
|
|
117
119
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @param percentage -
|
|
120
|
-
* @returns this
|
|
120
|
+
* Applies a percentage to the current value.
|
|
121
|
+
* @param percentage - The percentage to apply (0-100)
|
|
122
|
+
* @returns `this` to allow method chaining
|
|
121
123
|
* @example
|
|
122
124
|
* const amount = new AmountEdge(100, MassUnitPoint.gram);
|
|
123
|
-
* amount.applyPercentage(20); //
|
|
125
|
+
* amount.applyPercentage(20); // value is now 120 (100 + 20%)
|
|
124
126
|
*/
|
|
125
127
|
applyPercentage(percentage: number): this;
|
|
126
128
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @param total -
|
|
129
|
-
* @returns
|
|
129
|
+
* Calculates the percentage that this amount represents of a total.
|
|
130
|
+
* @param total - The total amount
|
|
131
|
+
* @returns The percentage as a number (0-100)
|
|
132
|
+
* @example
|
|
133
|
+
* const amount = new AmountEdge(25, MassUnitPoint.gram);
|
|
134
|
+
* const total = new AmountEdge(100, MassUnitPoint.gram);
|
|
135
|
+
* const percentage = amount.percentageOf(total); // 25
|
|
136
|
+
* @returns The percentage as a number (0-100)
|
|
130
137
|
* @example
|
|
131
138
|
* const amount = new AmountEdge(25, MassUnitPoint.gram);
|
|
132
139
|
* const total = new AmountEdge(100, MassUnitPoint.gram);
|
|
@@ -134,9 +141,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
134
141
|
*/
|
|
135
142
|
percentageOf(total: AmountEdge<TUnitsPoint>): number;
|
|
136
143
|
/**
|
|
137
|
-
*
|
|
138
|
-
* @param amount -
|
|
139
|
-
* @returns true
|
|
144
|
+
* Checks whether this amount is equal to another amount.
|
|
145
|
+
* @param amount - The amount to compare against.
|
|
146
|
+
* @returns `true` if both amounts have the same value and unit; otherwise, `false`.
|
|
140
147
|
* @example
|
|
141
148
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
142
149
|
* const amount2 = new AmountEdge(5, MassUnitPoint.gram);
|
|
@@ -144,9 +151,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
144
151
|
*/
|
|
145
152
|
isEqual(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
146
153
|
/**
|
|
147
|
-
*
|
|
148
|
-
* @param amount -
|
|
149
|
-
* @returns true
|
|
154
|
+
* Checks whether this amount is different from another amount.
|
|
155
|
+
* @param amount - The amount to compare against.
|
|
156
|
+
* @returns `true` if the amounts are different; otherwise, `false`.
|
|
150
157
|
* @example
|
|
151
158
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
152
159
|
* const amount2 = new AmountEdge(3, MassUnitPoint.gram);
|
|
@@ -154,9 +161,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
154
161
|
*/
|
|
155
162
|
isDifferent(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
156
163
|
/**
|
|
157
|
-
*
|
|
158
|
-
* @param amount -
|
|
159
|
-
* @returns true
|
|
164
|
+
* Checks whether this amount is greater than another amount.
|
|
165
|
+
* @param amount - The amount to compare against.
|
|
166
|
+
* @returns `true` if this amount's value is greater than `amount`'s value; otherwise, `false`.
|
|
160
167
|
* @example
|
|
161
168
|
* const amount1 = new AmountEdge(10, MassUnitPoint.gram);
|
|
162
169
|
* const amount2 = new AmountEdge(5, MassUnitPoint.gram);
|
|
@@ -164,9 +171,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
164
171
|
*/
|
|
165
172
|
isGreaterThan(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
166
173
|
/**
|
|
167
|
-
*
|
|
168
|
-
* @param amount -
|
|
169
|
-
* @returns true
|
|
174
|
+
* Checks whether this amount is less than another amount.
|
|
175
|
+
* @param amount - The amount to compare against.
|
|
176
|
+
* @returns `true` if this amount's value is less than `amount`'s value; otherwise, `false`.
|
|
170
177
|
* @example
|
|
171
178
|
* const amount1 = new AmountEdge(3, MassUnitPoint.gram);
|
|
172
179
|
* const amount2 = new AmountEdge(5, MassUnitPoint.gram);
|
|
@@ -174,9 +181,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
174
181
|
*/
|
|
175
182
|
isLessThan(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
176
183
|
/**
|
|
177
|
-
*
|
|
178
|
-
* @param amount -
|
|
179
|
-
* @returns true
|
|
184
|
+
* Checks whether this amount is greater than or equal to another amount.
|
|
185
|
+
* @param amount - The amount to compare against.
|
|
186
|
+
* @returns `true` if this amount's value is greater than or equal to `amount`'s value; otherwise, `false`.
|
|
180
187
|
* @example
|
|
181
188
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
182
189
|
* const amount2 = new AmountEdge(5, MassUnitPoint.gram);
|
|
@@ -184,9 +191,9 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
184
191
|
*/
|
|
185
192
|
isGreaterThanOrEqual(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
186
193
|
/**
|
|
187
|
-
*
|
|
188
|
-
* @param amount -
|
|
189
|
-
* @returns true
|
|
194
|
+
* Checks whether this amount is less than or equal to another amount.
|
|
195
|
+
* @param amount - The amount to compare against.
|
|
196
|
+
* @returns `true` if this amount's value is less than or equal to `amount`'s value; otherwise, `false`.
|
|
190
197
|
* @example
|
|
191
198
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
192
199
|
* const amount2 = new AmountEdge(5, MassUnitPoint.gram);
|
|
@@ -194,10 +201,10 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
194
201
|
*/
|
|
195
202
|
isLessThanOrEqual(amount: AmountEdge<TUnitsPoint>): boolean;
|
|
196
203
|
/**
|
|
197
|
-
*
|
|
198
|
-
* @param min -
|
|
199
|
-
* @param max -
|
|
200
|
-
* @returns true
|
|
204
|
+
* Checks whether this amount is between two bounds (inclusive).
|
|
205
|
+
* @param min - The minimum amount.
|
|
206
|
+
* @param max - The maximum amount.
|
|
207
|
+
* @returns `true` if the value is between min and max; otherwise, `false`.
|
|
201
208
|
* @example
|
|
202
209
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
203
210
|
* const min = new AmountEdge(1, MassUnitPoint.gram);
|
|
@@ -206,33 +213,33 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
206
213
|
*/
|
|
207
214
|
isBetween(min: AmountEdge<TUnitsPoint>, max: AmountEdge<TUnitsPoint>): boolean;
|
|
208
215
|
/**
|
|
209
|
-
*
|
|
210
|
-
* @returns true
|
|
216
|
+
* Checks whether the value is zero.
|
|
217
|
+
* @returns `true` if this.value === 0, `false` otherwise
|
|
211
218
|
* @example
|
|
212
219
|
* const amount = new AmountEdge(0, MassUnitPoint.gram);
|
|
213
220
|
* amount.isZero(); // true
|
|
214
221
|
*/
|
|
215
222
|
isZero(): boolean;
|
|
216
223
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @returns true
|
|
224
|
+
* Checks whether the value is positive (greater than zero).
|
|
225
|
+
* @returns `true` if this.value > 0, `false` otherwise
|
|
219
226
|
* @example
|
|
220
227
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
221
228
|
* amount.isPositive(); // true
|
|
222
229
|
*/
|
|
223
230
|
isPositive(): boolean;
|
|
224
231
|
/**
|
|
225
|
-
*
|
|
226
|
-
* @returns true
|
|
232
|
+
* Checks whether the value is negative (less than zero).
|
|
233
|
+
* @returns `true` if this.value < 0, `false` otherwise
|
|
227
234
|
* @example
|
|
228
235
|
* const amount = new AmountEdge(-5, MassUnitPoint.gram);
|
|
229
236
|
* amount.isNegative(); // true
|
|
230
237
|
*/
|
|
231
238
|
isNegative(): boolean;
|
|
232
239
|
/**
|
|
233
|
-
*
|
|
234
|
-
* @param unit -
|
|
235
|
-
* @returns true
|
|
240
|
+
* Checks whether the amount has a specific unit.
|
|
241
|
+
* @param unit - The unit to compare against.
|
|
242
|
+
* @returns `true` if the unit matches; otherwise, `false`.
|
|
236
243
|
* @example
|
|
237
244
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
238
245
|
* amount.hasUnit(MassUnitPoint.gram); // true
|
|
@@ -240,74 +247,76 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
240
247
|
*/
|
|
241
248
|
hasUnit(unit: TUnitsPoint): boolean;
|
|
242
249
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
250
|
+
* Creates an independent copy of this amount.
|
|
251
|
+
* Useful for avoiding unintended mutations.
|
|
252
|
+
*
|
|
253
|
+
* @returns A new instance with the same value and unit.
|
|
254
|
+
*
|
|
246
255
|
* @example
|
|
247
256
|
* const amount1 = new AmountEdge(5, MassUnitPoint.gram);
|
|
248
257
|
* const amount2 = amount1.clone();
|
|
249
|
-
* amount2.multiplyBy(2); // amount1
|
|
258
|
+
* amount2.multiplyBy(2); // amount1 remains 5, amount2 is 10
|
|
250
259
|
*/
|
|
251
260
|
clone(): AmountEdge<TUnitsPoint>;
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* @param value -
|
|
256
|
-
* @returns
|
|
262
|
+
* Returns a new instance with the value changed.
|
|
263
|
+
* Maintains the immutability of the original instance.
|
|
264
|
+
* @param value - New value
|
|
265
|
+
* @returns New instance with the changed value
|
|
257
266
|
* @example
|
|
258
267
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
259
268
|
* const newAmount = amount.withValue(10); // amount continua 5, newAmount é 10
|
|
260
269
|
*/
|
|
261
270
|
withValue(value: number): AmountEdge<TUnitsPoint>;
|
|
262
271
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* @param unit -
|
|
266
|
-
* @returns
|
|
272
|
+
* Returns a new instance with the unit changed.
|
|
273
|
+
* Maintains the immutability of the original instance.
|
|
274
|
+
* @param unit - New unit
|
|
275
|
+
* @returns New instance with the changed unit
|
|
267
276
|
* @example
|
|
268
277
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
269
278
|
* const newAmount = amount.withUnit(MassUnitPoint.kilogram);
|
|
270
279
|
*/
|
|
271
280
|
withUnit(unit: TUnitsPoint): AmountEdge<TUnitsPoint>;
|
|
272
281
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @returns
|
|
282
|
+
* Returns a string representation of the amount.
|
|
283
|
+
* @returns A string in the format "value unit".
|
|
275
284
|
* @example
|
|
276
285
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
277
286
|
* amount.toString(); // "5 g"
|
|
278
287
|
*/
|
|
279
288
|
toString(): string;
|
|
280
289
|
/**
|
|
281
|
-
*
|
|
282
|
-
* @param locale -
|
|
283
|
-
* @param precision -
|
|
284
|
-
* @returns
|
|
290
|
+
* Formats the amount as a string with a thousands separator and decimal precision.
|
|
291
|
+
* @param locale - Locale for formatting (e.g., 'en-US', 'pt-BR')
|
|
292
|
+
* @param precision - NNumber of decimal places
|
|
293
|
+
* @returns Formatted string
|
|
285
294
|
* @example
|
|
286
295
|
* const amount = new AmountEdge(1234.5678, MassUnitPoint.gram);
|
|
287
296
|
* amount.toFormattedString('pt-BR', 2); // "1.234,57 g"
|
|
288
297
|
*/
|
|
289
298
|
toFormattedString(locale?: string, precision?: number): string;
|
|
290
299
|
/**
|
|
291
|
-
*
|
|
292
|
-
* @param precision -
|
|
293
|
-
* @returns
|
|
300
|
+
* Returns only the value as a string with specific precision.
|
|
301
|
+
* @param precision - NNumber of decimal places
|
|
302
|
+
* @returns Formatted value string
|
|
294
303
|
* @example
|
|
295
304
|
* const amount = new AmountEdge(5.6789, MassUnitPoint.gram);
|
|
296
305
|
* amount.toValueString(2); // "5.68"
|
|
297
306
|
*/
|
|
298
307
|
toValueString(precision?: number): string;
|
|
299
308
|
/**
|
|
300
|
-
*
|
|
301
|
-
* @param precision -
|
|
302
|
-
* @returns
|
|
309
|
+
* Converts the amount to a Polygon object.
|
|
310
|
+
* @param precision - The number of decimal places to retain.
|
|
311
|
+
* @returns A Polygon object containing the value and unit.
|
|
303
312
|
* @example
|
|
304
313
|
* const amount = new AmountEdge(5.6789, MassUnitPoint.gram);
|
|
305
314
|
* amount.toPolygon(2); // { value: 5.68, unit: MassUnitPoint.gram }
|
|
306
315
|
*/
|
|
307
316
|
toPolygon(precision?: number): AmountPolygon<TUnitsPoint>;
|
|
308
317
|
/**
|
|
309
|
-
*
|
|
310
|
-
* @returns
|
|
318
|
+
* Converts the amount to a JSON object.
|
|
319
|
+
* @returns JSON object with value and unit
|
|
311
320
|
* @example
|
|
312
321
|
* const amount = new AmountEdge(5, MassUnitPoint.gram);
|
|
313
322
|
* amount.toJSON(); // { value: 5, unit: "g" }
|
|
@@ -317,19 +326,19 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
317
326
|
unit: TUnitsPoint;
|
|
318
327
|
};
|
|
319
328
|
/**
|
|
320
|
-
*
|
|
321
|
-
* @template T -
|
|
322
|
-
* @param unit -
|
|
323
|
-
* @returns
|
|
329
|
+
* Creates a new amount with a value of zero.
|
|
330
|
+
* @template T - The unit type.
|
|
331
|
+
* @param unit - The unit of the amount.
|
|
332
|
+
* @returns A new instance with a value of zero.
|
|
324
333
|
* @example
|
|
325
334
|
* const zero = AmountEdge.zero(MassUnitPoint.gram); // 0 g
|
|
326
335
|
*/
|
|
327
336
|
static zero<T>(unit: T): AmountEdge<T>;
|
|
328
337
|
/**
|
|
329
|
-
*
|
|
330
|
-
* @template T -
|
|
331
|
-
* @param amounts -
|
|
332
|
-
* @returns
|
|
338
|
+
* Sums a list of amounts.
|
|
339
|
+
* @template T - The unit type.
|
|
340
|
+
* @param amounts - An array of amounts to sum.
|
|
341
|
+
* @returns A new instance containing the total sum.
|
|
333
342
|
* @example
|
|
334
343
|
* const amounts = [
|
|
335
344
|
* new AmountEdge(5, MassUnitPoint.gram),
|
|
@@ -340,10 +349,10 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
340
349
|
*/
|
|
341
350
|
static sumAll<T>(amounts: AmountEdge<T>[]): AmountEdge<T>;
|
|
342
351
|
/**
|
|
343
|
-
*
|
|
344
|
-
* @template T -
|
|
345
|
-
* @param amounts -
|
|
346
|
-
* @returns
|
|
352
|
+
* Returns the maximum amount from a list.
|
|
353
|
+
* @template T - The unit type.
|
|
354
|
+
* @param amounts - n array of amounts.
|
|
355
|
+
* @returns A new instance with the maximum value.
|
|
347
356
|
* @example
|
|
348
357
|
* const amounts = [
|
|
349
358
|
* new AmountEdge(5, MassUnitPoint.gram),
|
|
@@ -354,10 +363,10 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
354
363
|
*/
|
|
355
364
|
static max<T>(amounts: AmountEdge<T>[]): AmountEdge<T>;
|
|
356
365
|
/**
|
|
357
|
-
*
|
|
358
|
-
* @template T -
|
|
359
|
-
* @param amounts -
|
|
360
|
-
* @returns
|
|
366
|
+
* Returns the minimum amount from a list.
|
|
367
|
+
* @template T - The unit type.
|
|
368
|
+
* @param amounts - An array of amounts.
|
|
369
|
+
* @returns A new instance containing the smallest value.
|
|
361
370
|
* @example
|
|
362
371
|
* const amounts = [
|
|
363
372
|
* new AmountEdge(5, MassUnitPoint.gram),
|
|
@@ -368,10 +377,10 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
368
377
|
*/
|
|
369
378
|
static min<T>(amounts: AmountEdge<T>[]): AmountEdge<T>;
|
|
370
379
|
/**
|
|
371
|
-
*
|
|
372
|
-
* @template T -
|
|
373
|
-
* @param amounts -
|
|
374
|
-
* @returns
|
|
380
|
+
* Calculates the average of a list of amounts.
|
|
381
|
+
* @template T - The unit type.
|
|
382
|
+
* @param amounts - n array of amounts.
|
|
383
|
+
* @returns A new instance with the average value.
|
|
375
384
|
* @example
|
|
376
385
|
* const amounts = [
|
|
377
386
|
* new AmountEdge(10, MassUnitPoint.gram),
|
|
@@ -382,13 +391,14 @@ export declare class AmountEdge<TUnitsPoint> {
|
|
|
382
391
|
*/
|
|
383
392
|
static average<T>(amounts: AmountEdge<T>[]): AmountEdge<T>;
|
|
384
393
|
/**
|
|
385
|
-
*
|
|
386
|
-
* @template T -
|
|
387
|
-
* @param polygon -
|
|
388
|
-
* @returns
|
|
394
|
+
* Creates an amount from a Polygon object.
|
|
395
|
+
* @template T - The unit type.
|
|
396
|
+
* @param polygon - A Polygon object containing `value` and `unit`.
|
|
397
|
+
* @returns A new AmountEdge instance.
|
|
389
398
|
* @example
|
|
390
399
|
* const polygon = { value: 5, unit: MassUnitPoint.gram };
|
|
391
400
|
* const amount = AmountEdge.fromPolygon(polygon); // 5 g
|
|
392
401
|
*/
|
|
393
402
|
static fromPolygon<T>(polygon: AmountPolygon<T>): AmountEdge<T>;
|
|
394
403
|
}
|
|
404
|
+
//# sourceMappingURL=amount.edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amount.edge.d.ts","sourceRoot":"","sources":["../../../../src/objects/amount/amount.edge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAOhE,qBAAa,UAAU,CAAC,WAAW;IAEj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