@aerokit/sdk 12.44.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/LICENSE +277 -0
- package/README.md +170 -0
- package/dist/cjs/bpm/deployer.js +57 -0
- package/dist/cjs/bpm/index.js +35 -0
- package/dist/cjs/bpm/process.js +636 -0
- package/dist/cjs/bpm/tasks.js +973 -0
- package/dist/cjs/bpm/values.js +82 -0
- package/dist/cjs/cache/cache.js +64 -0
- package/dist/cjs/cache/index.js +26 -0
- package/dist/cjs/cms/cmis.js +689 -0
- package/dist/cjs/cms/index.js +26 -0
- package/dist/cjs/component/decorators.js +126 -0
- package/dist/cjs/component/index.js +36 -0
- package/dist/cjs/core/configurations.js +110 -0
- package/dist/cjs/core/context.js +47 -0
- package/dist/cjs/core/env.js +45 -0
- package/dist/cjs/core/globals.js +54 -0
- package/dist/cjs/core/index.js +35 -0
- package/dist/cjs/db/dao.js +795 -0
- package/dist/cjs/db/database.js +904 -0
- package/dist/cjs/db/decorators.js +167 -0
- package/dist/cjs/db/index.js +72 -0
- package/dist/cjs/db/insert.js +51 -0
- package/dist/cjs/db/orm.js +245 -0
- package/dist/cjs/db/ormstatements.js +243 -0
- package/dist/cjs/db/procedure.js +112 -0
- package/dist/cjs/db/query.js +57 -0
- package/dist/cjs/db/repository.js +148 -0
- package/dist/cjs/db/sequence.js +59 -0
- package/dist/cjs/db/sql.js +516 -0
- package/dist/cjs/db/store.js +172 -0
- package/dist/cjs/db/translator.js +100 -0
- package/dist/cjs/db/update.js +43 -0
- package/dist/cjs/etcd/client.js +174 -0
- package/dist/cjs/etcd/index.js +26 -0
- package/dist/cjs/extensions/decorators.js +40 -0
- package/dist/cjs/extensions/extensions.js +108 -0
- package/dist/cjs/extensions/index.js +39 -0
- package/dist/cjs/git/client.js +277 -0
- package/dist/cjs/git/index.js +26 -0
- package/dist/cjs/http/client-async.js +224 -0
- package/dist/cjs/http/client.js +145 -0
- package/dist/cjs/http/decorators.js +76 -0
- package/dist/cjs/http/errors/ForbiddenError.js +41 -0
- package/dist/cjs/http/errors/ValidationError.js +41 -0
- package/dist/cjs/http/errors.js +26 -0
- package/dist/cjs/http/index.js +59 -0
- package/dist/cjs/http/request.js +281 -0
- package/dist/cjs/http/response.js +452 -0
- package/dist/cjs/http/rs/resource-common.js +32 -0
- package/dist/cjs/http/rs/resource-http-controller.js +306 -0
- package/dist/cjs/http/rs/resource-mappings.js +130 -0
- package/dist/cjs/http/rs/resource-method.js +218 -0
- package/dist/cjs/http/rs/resource.js +232 -0
- package/dist/cjs/http/rs.js +31 -0
- package/dist/cjs/http/session.js +124 -0
- package/dist/cjs/http/upload.js +144 -0
- package/dist/cjs/http/utils.js +106 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/indexing/index.js +29 -0
- package/dist/cjs/indexing/searcher.js +70 -0
- package/dist/cjs/indexing/writer.js +45 -0
- package/dist/cjs/integrations/index.js +26 -0
- package/dist/cjs/integrations/integrations.js +55 -0
- package/dist/cjs/io/bytes.js +101 -0
- package/dist/cjs/io/files.js +344 -0
- package/dist/cjs/io/image.js +43 -0
- package/dist/cjs/io/index.js +38 -0
- package/dist/cjs/io/streams.js +243 -0
- package/dist/cjs/io/zip.js +251 -0
- package/dist/cjs/job/decorators.js +40 -0
- package/dist/cjs/job/index.js +39 -0
- package/dist/cjs/job/scheduler.js +347 -0
- package/dist/cjs/junit/index.js +18 -0
- package/dist/cjs/junit/junit.js +67 -0
- package/dist/cjs/kafka/consumer.js +70 -0
- package/dist/cjs/kafka/index.js +29 -0
- package/dist/cjs/kafka/producer.js +70 -0
- package/dist/cjs/log/index.js +26 -0
- package/dist/cjs/log/logging.js +174 -0
- package/dist/cjs/mail/client.js +153 -0
- package/dist/cjs/mail/index.js +26 -0
- package/dist/cjs/messaging/consumer.js +83 -0
- package/dist/cjs/messaging/decorators.js +40 -0
- package/dist/cjs/messaging/index.js +42 -0
- package/dist/cjs/messaging/producer.js +81 -0
- package/dist/cjs/mongodb/client.js +627 -0
- package/dist/cjs/mongodb/dao.js +390 -0
- package/dist/cjs/mongodb/index.js +36 -0
- package/dist/cjs/net/decorators.js +40 -0
- package/dist/cjs/net/index.js +42 -0
- package/dist/cjs/net/soap.js +228 -0
- package/dist/cjs/net/websockets.js +151 -0
- package/dist/cjs/net/wrappers/onClose.js +2 -0
- package/dist/cjs/net/wrappers/onError.js +2 -0
- package/dist/cjs/net/wrappers/onMessage.js +2 -0
- package/dist/cjs/net/wrappers/onOpen.js +2 -0
- package/dist/cjs/pdf/index.js +26 -0
- package/dist/cjs/pdf/pdf.js +160 -0
- package/dist/cjs/platform/command.js +47 -0
- package/dist/cjs/platform/engines.js +70 -0
- package/dist/cjs/platform/index.js +47 -0
- package/dist/cjs/platform/lifecycle.js +49 -0
- package/dist/cjs/platform/os.js +51 -0
- package/dist/cjs/platform/problems.js +127 -0
- package/dist/cjs/platform/registry.js +319 -0
- package/dist/cjs/platform/repository.js +498 -0
- package/dist/cjs/platform/workspace.js +574 -0
- package/dist/cjs/qldb/index.js +26 -0
- package/dist/cjs/qldb/qldb.js +24 -0
- package/dist/cjs/rabbitmq/consumer.js +50 -0
- package/dist/cjs/rabbitmq/index.js +29 -0
- package/dist/cjs/rabbitmq/producer.js +38 -0
- package/dist/cjs/redis/client.js +190 -0
- package/dist/cjs/redis/index.js +26 -0
- package/dist/cjs/security/decorators.js +48 -0
- package/dist/cjs/security/index.js +40 -0
- package/dist/cjs/security/oauth.js +75 -0
- package/dist/cjs/security/user.js +88 -0
- package/dist/cjs/template/engines.js +139 -0
- package/dist/cjs/template/index.js +26 -0
- package/dist/cjs/utils/alphanumeric.js +107 -0
- package/dist/cjs/utils/base64.js +104 -0
- package/dist/cjs/utils/converter.js +78 -0
- package/dist/cjs/utils/digest.js +167 -0
- package/dist/cjs/utils/escape.js +160 -0
- package/dist/cjs/utils/hex.js +104 -0
- package/dist/cjs/utils/index.js +68 -0
- package/dist/cjs/utils/jsonpath.js +489 -0
- package/dist/cjs/utils/qrcode.js +41 -0
- package/dist/cjs/utils/url.js +82 -0
- package/dist/cjs/utils/utf8.js +61 -0
- package/dist/cjs/utils/uuid.js +48 -0
- package/dist/cjs/utils/xml.js +57 -0
- package/dist/dts/bpm/deployer.d.ts +29 -0
- package/dist/dts/bpm/index.d.ts +8 -0
- package/dist/dts/bpm/process.d.ts +433 -0
- package/dist/dts/bpm/tasks.d.ts +2022 -0
- package/dist/dts/bpm/values.d.ts +38 -0
- package/dist/dts/cache/cache.d.ts +30 -0
- package/dist/dts/cache/index.d.ts +2 -0
- package/dist/dts/cms/cmis.d.ts +413 -0
- package/dist/dts/cms/index.d.ts +2 -0
- package/dist/dts/component/decorators.d.ts +52 -0
- package/dist/dts/component/index.d.ts +2 -0
- package/dist/dts/core/configurations.d.ts +65 -0
- package/dist/dts/core/context.d.ts +19 -0
- package/dist/dts/core/env.d.ts +23 -0
- package/dist/dts/core/globals.d.ts +30 -0
- package/dist/dts/core/index.d.ts +8 -0
- package/dist/dts/db/dao.d.ts +8 -0
- package/dist/dts/db/database.d.ts +507 -0
- package/dist/dts/db/decorators.d.ts +89 -0
- package/dist/dts/db/index.d.ts +25 -0
- package/dist/dts/db/insert.d.ts +32 -0
- package/dist/dts/db/orm.d.ts +44 -0
- package/dist/dts/db/ormstatements.d.ts +4 -0
- package/dist/dts/db/procedure.d.ts +25 -0
- package/dist/dts/db/query.d.ts +48 -0
- package/dist/dts/db/repository.d.ts +64 -0
- package/dist/dts/db/sequence.d.ts +34 -0
- package/dist/dts/db/sql.d.ts +267 -0
- package/dist/dts/db/store.d.ts +138 -0
- package/dist/dts/db/translator.d.ts +26 -0
- package/dist/dts/db/update.d.ts +21 -0
- package/dist/dts/etcd/client.d.ts +92 -0
- package/dist/dts/etcd/index.d.ts +2 -0
- package/dist/dts/extensions/decorators.d.ts +11 -0
- package/dist/dts/extensions/extensions.d.ts +41 -0
- package/dist/dts/extensions/index.d.ts +4 -0
- package/dist/dts/git/client.d.ts +478 -0
- package/dist/dts/git/index.d.ts +2 -0
- package/dist/dts/http/client-async.d.ts +158 -0
- package/dist/dts/http/client.d.ts +180 -0
- package/dist/dts/http/decorators.d.ts +11 -0
- package/dist/dts/http/errors/ForbiddenError.d.ts +20 -0
- package/dist/dts/http/errors/ValidationError.d.ts +20 -0
- package/dist/dts/http/errors.d.ts +2 -0
- package/dist/dts/http/index.d.ts +16 -0
- package/dist/dts/http/request.d.ts +158 -0
- package/dist/dts/http/response.d.ts +281 -0
- package/dist/dts/http/rs/resource-common.d.ts +11 -0
- package/dist/dts/http/rs/resource-http-controller.d.ts +43 -0
- package/dist/dts/http/rs/resource-mappings.d.ts +70 -0
- package/dist/dts/http/rs/resource-method.d.ts +206 -0
- package/dist/dts/http/rs/resource.d.ts +126 -0
- package/dist/dts/http/rs.d.ts +4 -0
- package/dist/dts/http/session.d.ts +81 -0
- package/dist/dts/http/upload.d.ts +100 -0
- package/dist/dts/http/utils.d.ts +54 -0
- package/dist/dts/index.d.ts +0 -0
- package/dist/dts/indexing/index.d.ts +4 -0
- package/dist/dts/indexing/searcher.d.ts +47 -0
- package/dist/dts/indexing/writer.d.ts +22 -0
- package/dist/dts/integrations/index.d.ts +2 -0
- package/dist/dts/integrations/integrations.d.ts +118 -0
- package/dist/dts/io/bytes.d.ts +56 -0
- package/dist/dts/io/files.d.ts +261 -0
- package/dist/dts/io/image.d.ts +22 -0
- package/dist/dts/io/index.d.ts +10 -0
- package/dist/dts/io/streams.d.ts +172 -0
- package/dist/dts/io/zip.d.ts +178 -0
- package/dist/dts/job/decorators.d.ts +11 -0
- package/dist/dts/job/index.d.ts +4 -0
- package/dist/dts/job/scheduler.d.ts +250 -0
- package/dist/dts/junit/index.d.ts +1 -0
- package/dist/dts/junit/junit.d.ts +50 -0
- package/dist/dts/kafka/consumer.d.ts +48 -0
- package/dist/dts/kafka/index.d.ts +4 -0
- package/dist/dts/kafka/producer.d.ts +50 -0
- package/dist/dts/log/index.d.ts +2 -0
- package/dist/dts/log/logging.d.ts +102 -0
- package/dist/dts/mail/client.d.ts +90 -0
- package/dist/dts/mail/index.d.ts +2 -0
- package/dist/dts/messaging/consumer.d.ts +61 -0
- package/dist/dts/messaging/decorators.d.ts +11 -0
- package/dist/dts/messaging/index.d.ts +6 -0
- package/dist/dts/messaging/producer.d.ts +59 -0
- package/dist/dts/mongodb/client.d.ts +367 -0
- package/dist/dts/mongodb/dao.d.ts +24 -0
- package/dist/dts/mongodb/index.d.ts +2 -0
- package/dist/dts/net/decorators.d.ts +11 -0
- package/dist/dts/net/index.d.ts +6 -0
- package/dist/dts/net/soap.d.ts +115 -0
- package/dist/dts/net/websockets.d.ts +100 -0
- package/dist/dts/net/wrappers/onClose.d.ts +0 -0
- package/dist/dts/net/wrappers/onError.d.ts +0 -0
- package/dist/dts/net/wrappers/onMessage.d.ts +0 -0
- package/dist/dts/net/wrappers/onOpen.d.ts +0 -0
- package/dist/dts/pdf/index.d.ts +2 -0
- package/dist/dts/pdf/pdf.d.ts +72 -0
- package/dist/dts/platform/command.d.ts +41 -0
- package/dist/dts/platform/engines.d.ts +35 -0
- package/dist/dts/platform/index.d.ts +16 -0
- package/dist/dts/platform/lifecycle.d.ts +22 -0
- package/dist/dts/platform/os.d.ts +23 -0
- package/dist/dts/platform/problems.d.ts +114 -0
- package/dist/dts/platform/registry.d.ts +227 -0
- package/dist/dts/platform/repository.d.ts +354 -0
- package/dist/dts/platform/workspace.d.ts +421 -0
- package/dist/dts/qldb/index.d.ts +2 -0
- package/dist/dts/qldb/qldb.d.ts +1 -0
- package/dist/dts/rabbitmq/consumer.d.ts +25 -0
- package/dist/dts/rabbitmq/index.d.ts +4 -0
- package/dist/dts/rabbitmq/producer.d.ts +15 -0
- package/dist/dts/redis/client.d.ts +134 -0
- package/dist/dts/redis/index.d.ts +2 -0
- package/dist/dts/security/decorators.d.ts +4 -0
- package/dist/dts/security/index.d.ts +5 -0
- package/dist/dts/security/oauth.d.ts +39 -0
- package/dist/dts/security/user.d.ts +51 -0
- package/dist/dts/template/engines.d.ts +98 -0
- package/dist/dts/template/index.d.ts +2 -0
- package/dist/dts/utils/alphanumeric.d.ts +39 -0
- package/dist/dts/utils/base64.d.ts +48 -0
- package/dist/dts/utils/converter.d.ts +44 -0
- package/dist/dts/utils/digest.d.ts +50 -0
- package/dist/dts/utils/escape.d.ts +110 -0
- package/dist/dts/utils/hex.d.ts +48 -0
- package/dist/dts/utils/index.d.ts +23 -0
- package/dist/dts/utils/jsonpath.d.ts +22 -0
- package/dist/dts/utils/qrcode.d.ts +16 -0
- package/dist/dts/utils/url.d.ts +50 -0
- package/dist/dts/utils/utf8.d.ts +33 -0
- package/dist/dts/utils/uuid.d.ts +21 -0
- package/dist/dts/utils/xml.d.ts +22 -0
- package/dist/esm/bpm/deployer.mjs +38 -0
- package/dist/esm/bpm/index.mjs +15 -0
- package/dist/esm/bpm/process.mjs +617 -0
- package/dist/esm/bpm/tasks.mjs +954 -0
- package/dist/esm/bpm/values.mjs +63 -0
- package/dist/esm/cache/cache.mjs +45 -0
- package/dist/esm/cache/index.mjs +6 -0
- package/dist/esm/cms/cmis.mjs +660 -0
- package/dist/esm/cms/index.mjs +6 -0
- package/dist/esm/component/decorators.mjs +107 -0
- package/dist/esm/component/index.mjs +6 -0
- package/dist/esm/core/configurations.mjs +91 -0
- package/dist/esm/core/context.mjs +28 -0
- package/dist/esm/core/env.mjs +26 -0
- package/dist/esm/core/globals.mjs +35 -0
- package/dist/esm/core/index.mjs +15 -0
- package/dist/esm/db/dao.mjs +775 -0
- package/dist/esm/db/database.mjs +885 -0
- package/dist/esm/db/decorators.mjs +148 -0
- package/dist/esm/db/index.mjs +42 -0
- package/dist/esm/db/insert.mjs +32 -0
- package/dist/esm/db/orm.mjs +225 -0
- package/dist/esm/db/ormstatements.mjs +223 -0
- package/dist/esm/db/procedure.mjs +93 -0
- package/dist/esm/db/query.mjs +38 -0
- package/dist/esm/db/repository.mjs +129 -0
- package/dist/esm/db/sequence.mjs +40 -0
- package/dist/esm/db/sql.mjs +497 -0
- package/dist/esm/db/store.mjs +153 -0
- package/dist/esm/db/translator.mjs +81 -0
- package/dist/esm/db/update.mjs +24 -0
- package/dist/esm/etcd/client.mjs +155 -0
- package/dist/esm/etcd/index.mjs +6 -0
- package/dist/esm/extensions/decorators.mjs +21 -0
- package/dist/esm/extensions/extensions.mjs +89 -0
- package/dist/esm/extensions/index.mjs +9 -0
- package/dist/esm/git/client.mjs +258 -0
- package/dist/esm/git/index.mjs +6 -0
- package/dist/esm/http/client-async.mjs +205 -0
- package/dist/esm/http/client.mjs +126 -0
- package/dist/esm/http/decorators.mjs +47 -0
- package/dist/esm/http/errors/ForbiddenError.mjs +22 -0
- package/dist/esm/http/errors/ValidationError.mjs +22 -0
- package/dist/esm/http/errors.mjs +7 -0
- package/dist/esm/http/index.mjs +29 -0
- package/dist/esm/http/request.mjs +262 -0
- package/dist/esm/http/response.mjs +433 -0
- package/dist/esm/http/rs/resource-common.mjs +13 -0
- package/dist/esm/http/rs/resource-http-controller.mjs +287 -0
- package/dist/esm/http/rs/resource-mappings.mjs +111 -0
- package/dist/esm/http/rs/resource-method.mjs +199 -0
- package/dist/esm/http/rs/resource.mjs +213 -0
- package/dist/esm/http/rs.mjs +12 -0
- package/dist/esm/http/session.mjs +105 -0
- package/dist/esm/http/upload.mjs +125 -0
- package/dist/esm/http/utils.mjs +87 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/indexing/index.mjs +9 -0
- package/dist/esm/indexing/searcher.mjs +51 -0
- package/dist/esm/indexing/writer.mjs +26 -0
- package/dist/esm/integrations/index.mjs +6 -0
- package/dist/esm/integrations/integrations.mjs +36 -0
- package/dist/esm/io/bytes.mjs +82 -0
- package/dist/esm/io/files.mjs +325 -0
- package/dist/esm/io/image.mjs +24 -0
- package/dist/esm/io/index.mjs +18 -0
- package/dist/esm/io/streams.mjs +224 -0
- package/dist/esm/io/zip.mjs +232 -0
- package/dist/esm/job/decorators.mjs +21 -0
- package/dist/esm/job/index.mjs +9 -0
- package/dist/esm/job/scheduler.mjs +328 -0
- package/dist/esm/junit/index.mjs +2 -0
- package/dist/esm/junit/junit.mjs +48 -0
- package/dist/esm/kafka/consumer.mjs +51 -0
- package/dist/esm/kafka/index.mjs +9 -0
- package/dist/esm/kafka/producer.mjs +51 -0
- package/dist/esm/log/index.mjs +6 -0
- package/dist/esm/log/logging.mjs +155 -0
- package/dist/esm/mail/client.mjs +134 -0
- package/dist/esm/mail/index.mjs +6 -0
- package/dist/esm/messaging/consumer.mjs +64 -0
- package/dist/esm/messaging/decorators.mjs +21 -0
- package/dist/esm/messaging/index.mjs +12 -0
- package/dist/esm/messaging/producer.mjs +62 -0
- package/dist/esm/mongodb/client.mjs +608 -0
- package/dist/esm/mongodb/dao.mjs +360 -0
- package/dist/esm/mongodb/index.mjs +7 -0
- package/dist/esm/net/decorators.mjs +21 -0
- package/dist/esm/net/index.mjs +12 -0
- package/dist/esm/net/soap.mjs +209 -0
- package/dist/esm/net/websockets.mjs +132 -0
- package/dist/esm/net/wrappers/onClose.mjs +2 -0
- package/dist/esm/net/wrappers/onError.mjs +2 -0
- package/dist/esm/net/wrappers/onMessage.mjs +2 -0
- package/dist/esm/net/wrappers/onOpen.mjs +2 -0
- package/dist/esm/pdf/index.mjs +6 -0
- package/dist/esm/pdf/pdf.mjs +141 -0
- package/dist/esm/platform/command.mjs +28 -0
- package/dist/esm/platform/engines.mjs +51 -0
- package/dist/esm/platform/index.mjs +27 -0
- package/dist/esm/platform/lifecycle.mjs +30 -0
- package/dist/esm/platform/os.mjs +32 -0
- package/dist/esm/platform/problems.mjs +108 -0
- package/dist/esm/platform/registry.mjs +300 -0
- package/dist/esm/platform/repository.mjs +479 -0
- package/dist/esm/platform/workspace.mjs +555 -0
- package/dist/esm/qldb/index.mjs +6 -0
- package/dist/esm/qldb/qldb.mjs +5 -0
- package/dist/esm/rabbitmq/consumer.mjs +31 -0
- package/dist/esm/rabbitmq/index.mjs +9 -0
- package/dist/esm/rabbitmq/producer.mjs +19 -0
- package/dist/esm/redis/client.mjs +171 -0
- package/dist/esm/redis/index.mjs +6 -0
- package/dist/esm/security/decorators.mjs +29 -0
- package/dist/esm/security/index.mjs +10 -0
- package/dist/esm/security/oauth.mjs +56 -0
- package/dist/esm/security/user.mjs +69 -0
- package/dist/esm/template/engines.mjs +120 -0
- package/dist/esm/template/index.mjs +6 -0
- package/dist/esm/utils/alphanumeric.mjs +88 -0
- package/dist/esm/utils/base64.mjs +85 -0
- package/dist/esm/utils/converter.mjs +59 -0
- package/dist/esm/utils/digest.mjs +148 -0
- package/dist/esm/utils/escape.mjs +141 -0
- package/dist/esm/utils/hex.mjs +85 -0
- package/dist/esm/utils/index.mjs +38 -0
- package/dist/esm/utils/jsonpath.mjs +470 -0
- package/dist/esm/utils/qrcode.mjs +22 -0
- package/dist/esm/utils/url.mjs +63 -0
- package/dist/esm/utils/utf8.mjs +42 -0
- package/dist/esm/utils/uuid.mjs +29 -0
- package/dist/esm/utils/xml.mjs +38 -0
- package/package.json +58 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides static access to the currently authenticated user's security and session context.
|
|
3
|
+
* This class acts as a facade for the underlying UserFacade component.
|
|
4
|
+
*/
|
|
5
|
+
export declare class User {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the principal name (username or ID) of the currently authenticated user.
|
|
8
|
+
*
|
|
9
|
+
* @returns The user's name or identifier as a string.
|
|
10
|
+
*/
|
|
11
|
+
static getName(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the currently authenticated user is assigned to a specific security role.
|
|
14
|
+
*
|
|
15
|
+
* @param role The name of the role to check (e.g., 'Administrator', 'User').
|
|
16
|
+
* @returns True if the user is in the specified role, false otherwise.
|
|
17
|
+
*/
|
|
18
|
+
static isInRole(role: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the remaining session timeout for the current user session in seconds.
|
|
21
|
+
*
|
|
22
|
+
* @returns The session timeout duration in seconds.
|
|
23
|
+
*/
|
|
24
|
+
static getTimeout(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the authentication mechanism used for the current session (e.g., 'BASIC', 'FORM').
|
|
27
|
+
*
|
|
28
|
+
* @returns The type of authentication used.
|
|
29
|
+
*/
|
|
30
|
+
static getAuthType(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the security token associated with the current user session.
|
|
33
|
+
* This might be a session ID or an access token.
|
|
34
|
+
*
|
|
35
|
+
* @returns The security token as a string.
|
|
36
|
+
*/
|
|
37
|
+
static getSecurityToken(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the number of requests (invocations) made by the current user
|
|
40
|
+
* during the lifecycle of the current session.
|
|
41
|
+
*
|
|
42
|
+
* @returns The total invocation count.
|
|
43
|
+
*/
|
|
44
|
+
static getInvocationCount(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves the preferred language setting (e.g., 'en', 'de', 'es') for the current user.
|
|
47
|
+
*
|
|
48
|
+
* @returns The user's preferred language code.
|
|
49
|
+
*/
|
|
50
|
+
static getLanguage(): string;
|
|
51
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An internal wrapper class that adapts a native template engine implementation.
|
|
3
|
+
* It manages the engine instance and optional custom start/end markers.
|
|
4
|
+
*/
|
|
5
|
+
declare class TemplateEngine {
|
|
6
|
+
private engine;
|
|
7
|
+
/** The start marker string (e.g., '{{' for Mustache). */
|
|
8
|
+
private sm;
|
|
9
|
+
/** The end marker string (e.g., '}}' for Mustache). */
|
|
10
|
+
private em;
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of TemplateEngine.
|
|
13
|
+
*
|
|
14
|
+
* @param engine The native template engine object from the Facade.
|
|
15
|
+
* @param type The type of the engine ('mustache', 'velocity', 'javascript').
|
|
16
|
+
*/
|
|
17
|
+
constructor(engine: any, type: string);
|
|
18
|
+
/**
|
|
19
|
+
* Generates the final output by executing the template with the provided parameters.
|
|
20
|
+
* Note: Parameters are internally serialized to JSON before being passed to the native engine.
|
|
21
|
+
*
|
|
22
|
+
* @param location A string identifying the template (used for error reporting/caching, often a file path).
|
|
23
|
+
* @param template The raw template string content to process.
|
|
24
|
+
* @param parameters An object containing the context data to be used in the template.
|
|
25
|
+
* @returns The processed output string.
|
|
26
|
+
*/
|
|
27
|
+
generate(location: string, template: string, parameters: {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}): string;
|
|
30
|
+
/**
|
|
31
|
+
* Sets a custom start marker for the template engine. This is primarily useful for Mustache.
|
|
32
|
+
*
|
|
33
|
+
* @param sm The new start marker string.
|
|
34
|
+
*/
|
|
35
|
+
setSm(sm: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Sets a custom end marker for the template engine. This is primarily useful for Mustache.
|
|
38
|
+
*
|
|
39
|
+
* @param em The new end marker string.
|
|
40
|
+
*/
|
|
41
|
+
setEm(em: any): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Provides access to various server-side template engines (Velocity, Mustache, JavaScript).
|
|
45
|
+
* It offers utility methods for generating content from templates directly or from files
|
|
46
|
+
* stored in the registry.
|
|
47
|
+
*/
|
|
48
|
+
export declare class TemplateEngines {
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves the default template engine, which is currently the Velocity engine.
|
|
51
|
+
*
|
|
52
|
+
* @returns The default template engine instance.
|
|
53
|
+
*/
|
|
54
|
+
static getDefaultEngine(): TemplateEngine;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the Mustache template engine instance.
|
|
57
|
+
* Mustache is often used for logic-less templating and uses '{{' and '}}' as default markers.
|
|
58
|
+
*
|
|
59
|
+
* @returns The Mustache template engine instance.
|
|
60
|
+
*/
|
|
61
|
+
static getMustacheEngine(): TemplateEngine;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the Velocity template engine instance.
|
|
64
|
+
* Velocity is often used for complex templating with directives (e.g., #set, #foreach).
|
|
65
|
+
*
|
|
66
|
+
* @returns The Velocity template engine instance.
|
|
67
|
+
*/
|
|
68
|
+
static getVelocityEngine(): TemplateEngine;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the JavaScript template engine instance (usually used for server-side evaluation).
|
|
71
|
+
*
|
|
72
|
+
* @returns The JavaScript template engine instance.
|
|
73
|
+
*/
|
|
74
|
+
static getJavascriptEngine(): TemplateEngine;
|
|
75
|
+
/**
|
|
76
|
+
* Generates output by processing a raw template string using the **default template engine (Velocity)**.
|
|
77
|
+
*
|
|
78
|
+
* @param location A string identifying the template (used for error reporting/caching, often a file path).
|
|
79
|
+
* @param template The raw template string content to process.
|
|
80
|
+
* @param parameters An object containing key-value pairs to be used as context variables in the template.
|
|
81
|
+
* @returns The processed output string.
|
|
82
|
+
*/
|
|
83
|
+
static generate(location: string, template: string, parameters: {
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}): string;
|
|
86
|
+
/**
|
|
87
|
+
* Loads a template from the public registry, selects an appropriate engine, and generates output.
|
|
88
|
+
* It uses the **Mustache engine** if the file extension is `.mustache`, otherwise it uses the **default (Velocity)**.
|
|
89
|
+
*
|
|
90
|
+
* @param location The path to the template file within the `/registry/public/` directory (e.g., 'templates/email.mustache').
|
|
91
|
+
* @param parameters An object containing key-value pairs to be used as context variables in the template.
|
|
92
|
+
* @returns The processed output string, or `undefined` if the resource does not exist.
|
|
93
|
+
*/
|
|
94
|
+
static generateFromFile(location: string, parameters: {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}): string | undefined;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a string to an alphanumeric sequence, stripping non-conformant characters for it.
|
|
3
|
+
* @param string {String} the string to transform
|
|
4
|
+
*/
|
|
5
|
+
export declare class Alphanumeric {
|
|
6
|
+
static toAlphanumeric(string: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Generates a random alphanumeric sequence with the specified length
|
|
9
|
+
* @param length {Integer} Defaults to 4
|
|
10
|
+
*/
|
|
11
|
+
static randomString(length: number, charset: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Generates a random alphanumeric sequence with the specified length
|
|
14
|
+
* @param length {Integer} Defaults to 4
|
|
15
|
+
* @param lowercase {Boolean} Defaults to true
|
|
16
|
+
*/
|
|
17
|
+
static alphanumeric(length: number, lowercase: boolean): string;
|
|
18
|
+
/**
|
|
19
|
+
* Generates a random ASCII sequence with the specified length
|
|
20
|
+
* @param length {Integer} Defaults to 4
|
|
21
|
+
* @param lowercase {Boolean} Defaults to true
|
|
22
|
+
*/
|
|
23
|
+
static alpha(length: number, lowercase: boolean): string;
|
|
24
|
+
/**
|
|
25
|
+
* Generates a random numeric value
|
|
26
|
+
* @param length {Integer} Defaults to 4
|
|
27
|
+
*/
|
|
28
|
+
static numeric(length: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* Tests is the provided `str` argument is a valid numeric sequence.
|
|
31
|
+
* @param str {String} the string to test
|
|
32
|
+
*/
|
|
33
|
+
static isNumeric(str: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Tests is the provided `str` argument is a valid alphanumeric sequence.
|
|
36
|
+
* @param str {String} the string to test
|
|
37
|
+
*/
|
|
38
|
+
static isAlphanumeric(str: string): boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for performing **Base64 encoding and decoding** of data.
|
|
3
|
+
* It handles conversion between JavaScript strings, JavaScript byte arrays (any[]),
|
|
4
|
+
* and the native Java byte arrays required by the underlying Base64Facade.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Base64 {
|
|
7
|
+
/**
|
|
8
|
+
* Base64 encoding: Converts the input data (text or byte array) into a
|
|
9
|
+
* standard **Base64 encoded string representation**.
|
|
10
|
+
*
|
|
11
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
12
|
+
* @returns The resulting Base64 encoded string.
|
|
13
|
+
*/
|
|
14
|
+
static encode(input: string | any[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Base64 encoding: Converts the input data (text or byte array) into a
|
|
17
|
+
* **JavaScript byte array (any[])** containing the Base64 encoded representation.
|
|
18
|
+
*
|
|
19
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
20
|
+
* @returns The resulting byte array containing the Base64 encoded data.
|
|
21
|
+
*/
|
|
22
|
+
static encodeAsBytes(input: string | any[]): any[];
|
|
23
|
+
/**
|
|
24
|
+
* Base64 encoding: Converts the input data (text or byte array) into a
|
|
25
|
+
* **native Java byte array** containing the Base64 encoded representation.
|
|
26
|
+
* This method is generally for internal use.
|
|
27
|
+
*
|
|
28
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
29
|
+
* @returns The resulting native Java byte array containing the Base64 data.
|
|
30
|
+
*/
|
|
31
|
+
static encodeAsNativeBytes(input: string | any[]): any[];
|
|
32
|
+
/**
|
|
33
|
+
* Base64 decoding: Converts a Base64 input (text or byte array) back into
|
|
34
|
+
* the original **raw byte array (JavaScript any[])**.
|
|
35
|
+
*
|
|
36
|
+
* @param input The Base64 data to decode, either as a string or a JavaScript byte array (any[]).
|
|
37
|
+
* @returns The decoded raw byte array (any[]). Returns null if decoding fails or input is null.
|
|
38
|
+
*/
|
|
39
|
+
static decode(input: string | any[]): any[];
|
|
40
|
+
/**
|
|
41
|
+
* Base64 decoding: Converts a Base64 input (text or byte array) back into
|
|
42
|
+
* the original **native Java raw byte array**. This method is generally for internal use.
|
|
43
|
+
*
|
|
44
|
+
* @param input The Base64 data to decode, either as a string or a JavaScript byte array (any[]).
|
|
45
|
+
* @returns The decoded native Java byte array.
|
|
46
|
+
*/
|
|
47
|
+
static decodeAsNativeBytes(input: string | any[]): any[];
|
|
48
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for converting and normalizing common data types (Date, Boolean)
|
|
3
|
+
* within an object structure, typically for persistence or API consumption.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Converter {
|
|
6
|
+
/**
|
|
7
|
+
* Converts a date property value within an object into a Unix timestamp (milliseconds since epoch).
|
|
8
|
+
*
|
|
9
|
+
* @param obj The object containing the property to be converted.
|
|
10
|
+
* @param property The string name of the date property (e.g., 'dateCreated').
|
|
11
|
+
* @example
|
|
12
|
+
* // Before: { date: "2024-01-01T10:00:00Z" }
|
|
13
|
+
* Converter.setDate(obj, 'date');
|
|
14
|
+
* // After: { date: 1704096000000 }
|
|
15
|
+
*/
|
|
16
|
+
static setDate(obj: any, property: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Converts a date property value into an ISO 8601 string, adjusted to represent
|
|
19
|
+
* the start of that day (local midnight) to handle timezone offsets consistently.
|
|
20
|
+
* This is typically used for fields that should represent a date *only*, without time of day ambiguity.
|
|
21
|
+
*
|
|
22
|
+
* @param obj The object containing the property to be converted.
|
|
23
|
+
* @param property The string name of the date property (e.g., 'birthday').
|
|
24
|
+
* @example
|
|
25
|
+
* // If local timezone is EST (UTC-5):
|
|
26
|
+
* // Before: { date: "2024-01-01" }
|
|
27
|
+
* Converter.setLocalDate(obj, 'date');
|
|
28
|
+
* // After: { date: "2024-01-01T05:00:00.000Z" } (start of day UTC)
|
|
29
|
+
*/
|
|
30
|
+
static setLocalDate(obj: any, property: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Explicitly coerces a property value to a strict boolean type (`true` or `false`).
|
|
33
|
+
* This handles truthy/falsy values like `1`, `0`, `null`, and empty strings.
|
|
34
|
+
*
|
|
35
|
+
* @param obj The object containing the property to be converted.
|
|
36
|
+
* @param property The string name of the boolean property (e.g., 'isActive').
|
|
37
|
+
* @example
|
|
38
|
+
* // Before: { flag: 1, other: null }
|
|
39
|
+
* Converter.setBoolean(obj, 'flag');
|
|
40
|
+
* Converter.setBoolean(obj, 'other');
|
|
41
|
+
* // After: { flag: true, other: false }
|
|
42
|
+
*/
|
|
43
|
+
static setBoolean(obj: any, property: string): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare class Digest {
|
|
2
|
+
/**
|
|
3
|
+
* Calculate MD5 digest from input (text or byte array) and return result as byte array
|
|
4
|
+
*/
|
|
5
|
+
static md5(input: string | any[]): any[];
|
|
6
|
+
/**
|
|
7
|
+
* Calculate MD5 digest from input (text or byte array) and return result as 16 elements java native byte array
|
|
8
|
+
*/
|
|
9
|
+
static md5AsNativeBytes(input: string | any[]): any[];
|
|
10
|
+
/**
|
|
11
|
+
* Calculate MD5 digest from input (text or byte array) and return result as 32 character hex string
|
|
12
|
+
*/
|
|
13
|
+
static md5Hex(input: string | any[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* Calculate SHA1 digest from input (text or byte array) and return result as 20 elements byte array
|
|
16
|
+
*/
|
|
17
|
+
static sha1(input: string | any[]): any[];
|
|
18
|
+
/**
|
|
19
|
+
* Calculate SHA1 digest from input (text or byte array) and return result as 20 elements java native byte array
|
|
20
|
+
*/
|
|
21
|
+
static sha1AsNativeBytes(input: string | any[]): any[];
|
|
22
|
+
/**
|
|
23
|
+
* Calculate SHA256 digest from input (text or byte array) and return result as 32 elements byte array
|
|
24
|
+
*/
|
|
25
|
+
static sha256(input: string | any[]): any[];
|
|
26
|
+
/**
|
|
27
|
+
* Calculate SHA256 digest from input (text or byte array) and return result as 32 elements java native byte array
|
|
28
|
+
*/
|
|
29
|
+
static sha256AsNativeBytes(input: string | any[]): any[];
|
|
30
|
+
/**
|
|
31
|
+
* Calculate SHA384 digest from input (text or byte array) and return result as 48 elements byte array
|
|
32
|
+
*/
|
|
33
|
+
static sha384(input: string | any[]): any[];
|
|
34
|
+
/**
|
|
35
|
+
* Calculate SHA384 digest from input (text or byte array) and return result as 48 elements java native byte array
|
|
36
|
+
*/
|
|
37
|
+
static sha384AsNativeBytes(input: string | any[]): any[];
|
|
38
|
+
/**
|
|
39
|
+
* Calculate SHA512 digest from input (text or byte array) and return result as 64 elements byte array
|
|
40
|
+
*/
|
|
41
|
+
static sha512(input: string | any[]): any[];
|
|
42
|
+
/**
|
|
43
|
+
* Calculate SHA512 digest from input (text or byte array) and return result as 64 elements java native byte array
|
|
44
|
+
*/
|
|
45
|
+
static sha512AsNativeBytes(input: string | any[]): any;
|
|
46
|
+
/**
|
|
47
|
+
* Calculate SHA1 digest from input (text or byte array) and return result as 40 character hex string
|
|
48
|
+
*/
|
|
49
|
+
static sha1Hex(input: string | any[]): string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for performing context-aware string escaping and unescaping operations,
|
|
3
|
+
* delegating to a native Java EscapeFacade. These methods are essential for security
|
|
4
|
+
* (preventing injection attacks) and ensuring correct data serialization across different formats.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Escape {
|
|
7
|
+
/**
|
|
8
|
+
* Escapes special characters in a string to make it safe for use as a value within a CSV file.
|
|
9
|
+
* Typically handles double quotes, commas, and newlines.
|
|
10
|
+
*
|
|
11
|
+
* @param input The string to be escaped.
|
|
12
|
+
* @returns The CSV-safe escaped string.
|
|
13
|
+
*/
|
|
14
|
+
static escapeCsv(input: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Escapes characters in a string to create a valid JavaScript string literal.
|
|
17
|
+
* This makes it safe for embedding string values within JavaScript code blocks.
|
|
18
|
+
*
|
|
19
|
+
* @param input The string to be escaped.
|
|
20
|
+
* @returns The JavaScript-safe escaped string.
|
|
21
|
+
*/
|
|
22
|
+
static escapeJavascript(input: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Escapes characters in a string using HTML 3.2 entity references.
|
|
25
|
+
*
|
|
26
|
+
* @param input The string to be escaped.
|
|
27
|
+
* @returns The HTML 3.2 escaped string.
|
|
28
|
+
*/
|
|
29
|
+
static escapeHtml3(input: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Escapes characters in a string using HTML 4.0 entity references.
|
|
32
|
+
* This is the common standard for escaping characters like <, >, &, and ".
|
|
33
|
+
*
|
|
34
|
+
* @param input The string to be escaped.
|
|
35
|
+
* @returns The HTML 4.0 escaped string.
|
|
36
|
+
*/
|
|
37
|
+
static escapeHtml4(input: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Escapes characters in a string to create a valid Java string literal.
|
|
40
|
+
*
|
|
41
|
+
* @param input The string to be escaped.
|
|
42
|
+
* @returns The Java-safe escaped string.
|
|
43
|
+
*/
|
|
44
|
+
static escapeJava(input: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Escapes characters (like quotes, backslashes, and control characters) in a string
|
|
47
|
+
* to make it safe for embedding as a value within a JSON document.
|
|
48
|
+
*
|
|
49
|
+
* @param input The string to be escaped.
|
|
50
|
+
* @returns The JSON-safe escaped string.
|
|
51
|
+
*/
|
|
52
|
+
static escapeJson(input: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Escapes characters in a string to make it valid for use within an XML document.
|
|
55
|
+
* Typically handles characters like <, >, &, ", and '.
|
|
56
|
+
*
|
|
57
|
+
* @param input The string to be escaped.
|
|
58
|
+
* @returns The XML-safe escaped string.
|
|
59
|
+
*/
|
|
60
|
+
static escapeXml(input: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* The inverse of `escapeCsv`: unescapes CSV-specific escape sequences back to their original form.
|
|
63
|
+
*
|
|
64
|
+
* @param input The CSV-escaped string.
|
|
65
|
+
* @returns The unescaped string.
|
|
66
|
+
*/
|
|
67
|
+
static unescapeCsv(input: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* The inverse of `escapeJavascript`: unescapes JavaScript string literals.
|
|
70
|
+
*
|
|
71
|
+
* @param input The JavaScript-escaped string.
|
|
72
|
+
* @returns The unescaped string.
|
|
73
|
+
*/
|
|
74
|
+
static unescapeJavascript(input: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* The inverse of `escapeHtml3`: unescapes HTML 3.2 entity references.
|
|
77
|
+
*
|
|
78
|
+
* @param input The HTML 3.2 escaped string.
|
|
79
|
+
* @returns The unescaped string.
|
|
80
|
+
*/
|
|
81
|
+
static unescapeHtml3(input: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* The inverse of `escapeHtml4`: unescapes HTML 4.0 entity references.
|
|
84
|
+
*
|
|
85
|
+
* @param input The HTML 4.0 escaped string.
|
|
86
|
+
* @returns The unescaped string.
|
|
87
|
+
*/
|
|
88
|
+
static unescapeHtml4(input: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* The inverse of `escapeJava`: unescapes Java string literals.
|
|
91
|
+
*
|
|
92
|
+
* @param input The Java-escaped string.
|
|
93
|
+
* @returns The unescaped string.
|
|
94
|
+
*/
|
|
95
|
+
static unescapeJava(input: string): string;
|
|
96
|
+
/**
|
|
97
|
+
* The inverse of `escapeJson`: unescapes JSON string escape sequences.
|
|
98
|
+
*
|
|
99
|
+
* @param input The JSON-escaped string.
|
|
100
|
+
* @returns The unescaped string.
|
|
101
|
+
*/
|
|
102
|
+
static unescapeJson(input: string): string;
|
|
103
|
+
/**
|
|
104
|
+
* The inverse of `escapeXml`: unescapes XML entity references.
|
|
105
|
+
*
|
|
106
|
+
* @param input The XML-escaped string.
|
|
107
|
+
* @returns The unescaped string.
|
|
108
|
+
*/
|
|
109
|
+
static unescapeXml(input: string): string;
|
|
110
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for performing **Hexadecimal encoding and decoding** of data.
|
|
3
|
+
* It handles conversion between JavaScript strings, JavaScript byte arrays (any[]),
|
|
4
|
+
* and the native Java byte arrays required by the underlying HexFacade.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Hex {
|
|
7
|
+
/**
|
|
8
|
+
* Hexadecimal encoding: Converts the input data (text or byte array) into a
|
|
9
|
+
* standard **hexadecimal string representation**.
|
|
10
|
+
*
|
|
11
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
12
|
+
* @returns The resulting hexadecimal string.
|
|
13
|
+
*/
|
|
14
|
+
static encode(input: string | any[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Hexadecimal encoding: Converts the input data (text or byte array) into a
|
|
17
|
+
* **JavaScript byte array (any[])** containing the hexadecimal representation.
|
|
18
|
+
*
|
|
19
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
20
|
+
* @returns The resulting byte array containing the hexadecimal data.
|
|
21
|
+
*/
|
|
22
|
+
static encodeAsBytes(input: string | any[]): any[];
|
|
23
|
+
/**
|
|
24
|
+
* Hexadecimal encoding: Converts the input data (text or byte array) into a
|
|
25
|
+
* **native Java byte array** containing the hexadecimal representation.
|
|
26
|
+
* This method is generally for internal use.
|
|
27
|
+
*
|
|
28
|
+
* @param input The data to encode, either as a string or a JavaScript byte array (any[]).
|
|
29
|
+
* @returns The resulting native Java byte array.
|
|
30
|
+
*/
|
|
31
|
+
static encodeAsNativeBytes(input: string | any[]): any[];
|
|
32
|
+
/**
|
|
33
|
+
* Hexadecimal decoding: Converts a hexadecimal input (text or byte array) back into
|
|
34
|
+
* the original **raw byte array (JavaScript any[])**.
|
|
35
|
+
*
|
|
36
|
+
* @param input The hexadecimal data to decode, either as a string or a JavaScript byte array (any[]).
|
|
37
|
+
* @returns The decoded raw byte array (any[]). Returns null if decoding fails or input is null.
|
|
38
|
+
*/
|
|
39
|
+
static decode(input: string | any[]): any[];
|
|
40
|
+
/**
|
|
41
|
+
* Hexadecimal decoding: Converts a hexadecimal input (text or byte array) back into
|
|
42
|
+
* the original **native Java raw byte array**. This method is generally for internal use.
|
|
43
|
+
*
|
|
44
|
+
* @param input The hexadecimal data to decode, either as a string or a JavaScript byte array (any[]).
|
|
45
|
+
* @returns The decoded native Java byte array.
|
|
46
|
+
*/
|
|
47
|
+
static decodeAsNativeBytes(input: string | any[]): any;
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from "./alphanumeric";
|
|
2
|
+
export { Alphanumeric as alphanumeric } from "./alphanumeric";
|
|
3
|
+
export * from "./base64";
|
|
4
|
+
export { Base64 as base64 } from "./base64";
|
|
5
|
+
export * from "./digest";
|
|
6
|
+
export { Digest as digest } from "./digest";
|
|
7
|
+
export * from "./escape";
|
|
8
|
+
export { Escape as escape } from "./escape";
|
|
9
|
+
export * from "./hex";
|
|
10
|
+
export { Hex as hex } from "./hex";
|
|
11
|
+
export * as jsonpath from "./jsonpath";
|
|
12
|
+
export * from "./qrcode";
|
|
13
|
+
export { QRCode as qrcode } from "./qrcode";
|
|
14
|
+
export * from "./url";
|
|
15
|
+
export { URL as url } from "./url";
|
|
16
|
+
export * from "./utf8";
|
|
17
|
+
export { UTF8 as utf8 } from "./utf8";
|
|
18
|
+
export * from "./uuid";
|
|
19
|
+
export { UUID as uuid } from "./uuid";
|
|
20
|
+
export * from "./xml";
|
|
21
|
+
export { XML as xml } from "./xml";
|
|
22
|
+
export * from "./converter";
|
|
23
|
+
export { Converter as converter } from "./converter";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Object} [opts] If present, must be an object
|
|
3
|
+
* @param {string} expr JSON path to evaluate
|
|
4
|
+
* @param {JSON} obj JSON object to evaluate against
|
|
5
|
+
* @param {Function} callback Passed 3 arguments: 1) desired payload per `resultType`,
|
|
6
|
+
* 2) `"value"|"property"`, 3) Full returned object with all payloads
|
|
7
|
+
* @param {Function} otherTypeCallback If `@other()` is at the end of one's query, this
|
|
8
|
+
* will be invoked with the value of the item, its path, its parent, and its parent's
|
|
9
|
+
* property name, and it should return a boolean indicating whether the supplied value
|
|
10
|
+
* belongs to the "other" type or not (or it may handle transformations and return `false`).
|
|
11
|
+
* @returns {JSONPath}
|
|
12
|
+
* @class
|
|
13
|
+
*/
|
|
14
|
+
export declare function JSONPath(opts: any, expr: any, obj: any, callback: any, otherTypeCallback: any): void;
|
|
15
|
+
export declare namespace JSONPath {
|
|
16
|
+
var prototype: any;
|
|
17
|
+
var cache: {};
|
|
18
|
+
var toPathString: (pathArr: any) => string;
|
|
19
|
+
var toPointer: (pointer: any) => string;
|
|
20
|
+
var toPathArray: (expr: any) => any;
|
|
21
|
+
}
|
|
22
|
+
export default JSONPath;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for generating QR codes.
|
|
3
|
+
* It uses the underlying native Java QRCodeFacade to convert text into
|
|
4
|
+
* a QR code image represented as a raw byte array.
|
|
5
|
+
*/
|
|
6
|
+
export declare class QRCode {
|
|
7
|
+
/**
|
|
8
|
+
* Generates a QR code image byte array from the given text.
|
|
9
|
+
* The returned byte array represents the image data (e.g., PNG or JPEG format,
|
|
10
|
+
* depending on the native implementation's default output).
|
|
11
|
+
*
|
|
12
|
+
* @param text The string content to be encoded in the QR code.
|
|
13
|
+
* @returns A **JavaScript byte array (any[])** containing the raw QR code image data.
|
|
14
|
+
*/
|
|
15
|
+
static generateQRCode(text: string): any[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for performing various forms of URL encoding and decoding.
|
|
3
|
+
* It wraps native Java URL utility methods for handling query parameters,
|
|
4
|
+
* path segments, and form data.
|
|
5
|
+
*/
|
|
6
|
+
export declare class URL {
|
|
7
|
+
/**
|
|
8
|
+
* URL-encodes the input string, typically used for encoding query parameter values.
|
|
9
|
+
*
|
|
10
|
+
* @param input The string to be encoded.
|
|
11
|
+
* @param charset The character set (e.g., 'UTF-8', 'ISO-8859-1') to use for encoding. Defaults to the system's preferred encoding if omitted.
|
|
12
|
+
* @returns The URL-encoded string.
|
|
13
|
+
*/
|
|
14
|
+
static encode(input: string, charset?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* URL-decodes the input string, typically used for decoding query parameter values.
|
|
17
|
+
*
|
|
18
|
+
* @param input The string to be decoded.
|
|
19
|
+
* @param charset The character set (e.g., 'UTF-8', 'ISO-8859-1') that was used for encoding. Defaults to the system's preferred encoding if omitted.
|
|
20
|
+
* @returns The URL-decoded string.
|
|
21
|
+
*/
|
|
22
|
+
static decode(input: string, charset?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Escapes the input string using general URL escaping rules.
|
|
25
|
+
* This is typically equivalent to `encodeURIComponent` and is suitable for
|
|
26
|
+
* encoding query parameter *values*.
|
|
27
|
+
*
|
|
28
|
+
* @param input The string to escape.
|
|
29
|
+
* @returns The escaped string.
|
|
30
|
+
*/
|
|
31
|
+
static escape(input: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Escapes the input string specifically for use as a **URL path segment**.
|
|
34
|
+
* It typically preserves path delimiters like `/` that might otherwise be escaped
|
|
35
|
+
* in standard URL encoding.
|
|
36
|
+
*
|
|
37
|
+
* @param input The path string to escape.
|
|
38
|
+
* @returns The escaped path string.
|
|
39
|
+
*/
|
|
40
|
+
static escapePath(input: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Escapes the input string according to the rules for **HTML Form Data**
|
|
43
|
+
* (application/x-www-form-urlencoded). This typically replaces spaces with `+`
|
|
44
|
+
* instead of `%20`.
|
|
45
|
+
*
|
|
46
|
+
* @param input The form data string to escape.
|
|
47
|
+
* @returns The escaped form data string.
|
|
48
|
+
*/
|
|
49
|
+
static escapeForm(input: string): string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for performing UTF-8 encoding and decoding operations.
|
|
3
|
+
* It provides methods to handle conversions between standard JavaScript strings and
|
|
4
|
+
* raw UTF-8 byte representations.
|
|
5
|
+
*/
|
|
6
|
+
export declare class UTF8 {
|
|
7
|
+
/**
|
|
8
|
+
* Encodes the input (either a standard JavaScript string or a raw byte array)
|
|
9
|
+
* into a UTF-8 encoded string representation.
|
|
10
|
+
*
|
|
11
|
+
* @param input The text string to be encoded, or a byte array to convert to its string representation.
|
|
12
|
+
* @returns The resulting UTF-8 encoded string.
|
|
13
|
+
*/
|
|
14
|
+
static encode(input: string | any[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Decodes the input (either a UTF-8 encoded string or a raw byte array)
|
|
17
|
+
* back into a standard JavaScript string.
|
|
18
|
+
*
|
|
19
|
+
* @param input The UTF-8 encoded string or byte array to be decoded.
|
|
20
|
+
* @returns The resulting standard decoded string.
|
|
21
|
+
*/
|
|
22
|
+
static decode(input: string | any[]): string;
|
|
23
|
+
/**
|
|
24
|
+
* Decodes a specific segment of a raw byte array into a standard string
|
|
25
|
+
* using UTF-8 encoding.
|
|
26
|
+
*
|
|
27
|
+
* @param bytes The raw byte array containing the UTF-8 data.
|
|
28
|
+
* @param offset The starting index (inclusive) from which to begin decoding.
|
|
29
|
+
* @param length The number of bytes to decode starting from the offset.
|
|
30
|
+
* @returns The decoded string segment.
|
|
31
|
+
*/
|
|
32
|
+
static bytesToString(bytes: any[], offset: number, length: number): string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for generating and validating Universally Unique Identifiers (UUIDs).
|
|
3
|
+
* It typically provides access to Type 4 (randomly generated) UUIDs.
|
|
4
|
+
*/
|
|
5
|
+
export declare class UUID {
|
|
6
|
+
/**
|
|
7
|
+
* Generates a new random UUID (Type 4).
|
|
8
|
+
* The generated string is typically in the format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.
|
|
9
|
+
*
|
|
10
|
+
* @returns A string representing the newly generated UUID.
|
|
11
|
+
*/
|
|
12
|
+
static random(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Validates if the provided string conforms to the standard UUID format
|
|
15
|
+
* (e.g., a valid 36-character string including hyphens).
|
|
16
|
+
*
|
|
17
|
+
* @param input The string to validate.
|
|
18
|
+
* @returns true if the input string is a valid UUID, false otherwise.
|
|
19
|
+
*/
|
|
20
|
+
static validate(input: string): boolean;
|
|
21
|
+
}
|