@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,126 @@
|
|
|
1
|
+
import { ResourceMethod } from "./resource-method";
|
|
2
|
+
/**
|
|
3
|
+
* Constructs a new Resource instance, initialized with the supplied path parameter and optionally with the second, configuration object parameter.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Resource {
|
|
6
|
+
/** The URL path for this resource. */
|
|
7
|
+
sPath: string;
|
|
8
|
+
/** The resource configuration mapping methods to handler specifications. */
|
|
9
|
+
cfg: any;
|
|
10
|
+
/** The optional controller instance. */
|
|
11
|
+
controller: any;
|
|
12
|
+
/** Bound execute function from the controller. */
|
|
13
|
+
execute: Function | undefined;
|
|
14
|
+
/** Additional mappings object. */
|
|
15
|
+
mappings: any;
|
|
16
|
+
/**
|
|
17
|
+
* @param sPath The base URL path for the resource.
|
|
18
|
+
* @param oConfiguration Optional configuration object (map of method handlers).
|
|
19
|
+
* @param controller Optional controller instance containing an execute method.
|
|
20
|
+
* @param mappings Optional object for resource mappings.
|
|
21
|
+
*/
|
|
22
|
+
constructor(sPath: string, oConfiguration?: any, controller?: any, mappings?: any);
|
|
23
|
+
/**
|
|
24
|
+
* Sets the URL path for this resource, overriding the one specified upon its construction,
|
|
25
|
+
* if a path string is provided as argument ot the method (i.e. acts as setter),
|
|
26
|
+
* or returns the path set for this resource, if the method is invoked without arguments (i.e. acts as getter).
|
|
27
|
+
*
|
|
28
|
+
* @param sPath The path property to be set for this resource.
|
|
29
|
+
* @returns The resource instance for method chaining (setter mode), or the path set for this resource (getter mode).
|
|
30
|
+
*/
|
|
31
|
+
path(sPath?: string): Resource | string;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new HTTP method handling specification.
|
|
34
|
+
*
|
|
35
|
+
* @param sHttpMethod The HTTP method (method) (e.g., "GET").
|
|
36
|
+
* @param oConfiguration The handler specification(s) for this HTTP method. Can be a single object or array.
|
|
37
|
+
* @returns The ResourceMethod instance, or an array of ResourceMethod instances.
|
|
38
|
+
*/
|
|
39
|
+
method(sHttpMethod: string, oConfiguration?: any | any[]): ResourceMethod | ResourceMethod[];
|
|
40
|
+
/**
|
|
41
|
+
* Internal utility method to handle the logic for HTTP verb shortcut methods (get, post, etc.).
|
|
42
|
+
*
|
|
43
|
+
* @param sMethodName The HTTP method name (e.g., 'get').
|
|
44
|
+
* @param args The arguments passed to the shortcut method.
|
|
45
|
+
* @returns The ResourceMethod instance or an array of instances.
|
|
46
|
+
*/
|
|
47
|
+
private buildMethod;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a handling specification for the HTTP method "GET".
|
|
50
|
+
* @param fServeCb|oConfiguration Serve function callback or configuration object to initialize the method.
|
|
51
|
+
* @returns The ResourceMethod instance or array.
|
|
52
|
+
*/
|
|
53
|
+
get(fServeCb: Function): ResourceMethod;
|
|
54
|
+
get(oConfiguration: any): ResourceMethod | ResourceMethod[];
|
|
55
|
+
get(): ResourceMethod;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a handling specification for the HTTP method "POST".
|
|
58
|
+
* @param fServeCb|oConfiguration Serve function callback or configuration object to initialize the method.
|
|
59
|
+
* @returns The ResourceMethod instance or array.
|
|
60
|
+
*/
|
|
61
|
+
post(fServeCb: Function): ResourceMethod;
|
|
62
|
+
post(oConfiguration: any): ResourceMethod | ResourceMethod[];
|
|
63
|
+
post(): ResourceMethod;
|
|
64
|
+
/**
|
|
65
|
+
* Creates a handling specification for the HTTP method "PUT".
|
|
66
|
+
* @param fServeCb|oConfiguration Serve function callback or configuration object to initialize the method.
|
|
67
|
+
* @returns The ResourceMethod instance or array.
|
|
68
|
+
*/
|
|
69
|
+
put(fServeCb: Function): ResourceMethod;
|
|
70
|
+
put(oConfiguration: any): ResourceMethod | ResourceMethod[];
|
|
71
|
+
put(): ResourceMethod;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a handling specification for the HTTP method "DELETE".
|
|
74
|
+
* @param fServeCb|oConfiguration Serve function callback or configuration object to initialize the method.
|
|
75
|
+
* @returns The ResourceMethod instance or array.
|
|
76
|
+
*/
|
|
77
|
+
delete(fServeCb: Function): ResourceMethod;
|
|
78
|
+
delete(oConfiguration: any): ResourceMethod | ResourceMethod[];
|
|
79
|
+
delete(): ResourceMethod;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a handling specification for the HTTP method "DELETE" (alias for delete()).
|
|
82
|
+
* @param fServeCb|oConfiguration Serve function callback or configuration object to initialize the method.
|
|
83
|
+
* @returns The ResourceMethod instance or array.
|
|
84
|
+
*/
|
|
85
|
+
remove(fServeCb: Function): ResourceMethod;
|
|
86
|
+
remove(oConfiguration: any): ResourceMethod | ResourceMethod[];
|
|
87
|
+
remove(): ResourceMethod;
|
|
88
|
+
/**
|
|
89
|
+
* Finds a ResourceMethod with the given constraints.
|
|
90
|
+
*
|
|
91
|
+
* @param sVerb The name of the method property of the ResourceMethod in search (e.g., "GET").
|
|
92
|
+
* @param arrConsumesMimeTypeStrings The consumes constraint property of the ResourceMethod in search.
|
|
93
|
+
* @param arrProducesMimeTypeStrings The produces constraint property of the ResourceMethod in search.
|
|
94
|
+
* @returns The found ResourceMethod instance, or undefined if not found.
|
|
95
|
+
*/
|
|
96
|
+
find(sVerb: string, arrConsumesMimeTypeStrings?: string[], arrProducesMimeTypeStrings?: string[]): ResourceMethod | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the configuration of this resource.
|
|
99
|
+
*
|
|
100
|
+
* @returns The resource configuration object.
|
|
101
|
+
*/
|
|
102
|
+
configuration(): any;
|
|
103
|
+
/**
|
|
104
|
+
* Instructs redirection of the request base don the parameter. If it is a stirng representing URI, the request will be
|
|
105
|
+
* redirected to this URI for any method. If it's a function it will be invoked and epxected to return a URI string to redirect to.
|
|
106
|
+
*
|
|
107
|
+
* @param fRedirector The function or string URI to redirect to.
|
|
108
|
+
* @returns The resource instance for method chaining.
|
|
109
|
+
*/
|
|
110
|
+
redirect(fRedirector: string | Function): Resource;
|
|
111
|
+
/**
|
|
112
|
+
* Disables the ResourceMethods that match the given constraints
|
|
113
|
+
*
|
|
114
|
+
* @param sVerb The HTTP verb (e.g., "GET").
|
|
115
|
+
* @param arrConsumesTypeStrings The consumes constraint property of the ResourceMethod in search.
|
|
116
|
+
* @param arrProducesTypeStrings The produces constraint property of the ResourceMethod in search.
|
|
117
|
+
* @returns The resource instance for method chaining.
|
|
118
|
+
*/
|
|
119
|
+
disable(sVerb?: string, arrConsumesTypeStrings?: string[], arrProducesTypeStrings?: string[]): Resource;
|
|
120
|
+
/**
|
|
121
|
+
* Disables all but 'read' HTTP methods in this resource (GET, HEAD, TRACE).
|
|
122
|
+
*
|
|
123
|
+
* @returns The resource instance for method chaining.
|
|
124
|
+
*/
|
|
125
|
+
readonly(): Resource;
|
|
126
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade (`Session` class) for accessing and manipulating
|
|
3
|
+
* the HTTP session associated with the current request. This module is often used
|
|
4
|
+
* to store user-specific data during their interaction with the application.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The static Session class provides methods to interact with the current user session
|
|
8
|
+
* (e.g., storing attributes, checking status, managing lifetime).
|
|
9
|
+
*/
|
|
10
|
+
export declare class Session {
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a session is currently valid and active for the request context.
|
|
13
|
+
* @returns True if the session is valid, false otherwise (e.g., if it has been invalidated or timed out).
|
|
14
|
+
*/
|
|
15
|
+
static isValid(): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves the value of a named attribute stored in the session.
|
|
18
|
+
* Note: The underlying Java facade typically stores strings, but the value may represent
|
|
19
|
+
* serialized data that should be parsed if complex.
|
|
20
|
+
* @param name The name of the attribute.
|
|
21
|
+
* @returns The attribute value as a string, or null/undefined if not found.
|
|
22
|
+
*/
|
|
23
|
+
static getAttribute(name: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves an array of all attribute names currently stored in the session.
|
|
26
|
+
* The names are retrieved as a JSON string from the facade and then parsed.
|
|
27
|
+
* @returns An array of attribute names (strings), or an empty array if no attributes are present.
|
|
28
|
+
*/
|
|
29
|
+
static getAttributeNames(): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Returns the time at which this session was created, converted to a JavaScript Date object.
|
|
32
|
+
* @returns A Date object representing the session's creation time.
|
|
33
|
+
*/
|
|
34
|
+
static getCreationTime(): Date;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the unique identifier assigned to this session.
|
|
37
|
+
* @returns The session ID string.
|
|
38
|
+
*/
|
|
39
|
+
static getId(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the last time the client accessed this session, converted to a JavaScript Date object.
|
|
42
|
+
* Access includes requests that retrieve or set session attributes.
|
|
43
|
+
* @returns A Date object representing the last access time.
|
|
44
|
+
*/
|
|
45
|
+
static getLastAccessedTime(): Date;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the maximum time interval, in seconds, that the server should keep this session open
|
|
48
|
+
* between client requests. After this interval, the session will be invalidated.
|
|
49
|
+
* @returns The maximum inactive interval in seconds.
|
|
50
|
+
*/
|
|
51
|
+
static getMaxInactiveInterval(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Invalidates this session, unbinding any objects bound to it.
|
|
54
|
+
* After this call, the session is no longer valid.
|
|
55
|
+
*/
|
|
56
|
+
static invalidate(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if the client does not yet know about the session, typically meaning
|
|
59
|
+
* the server has not yet returned the session ID via a cookie or encoded URL.
|
|
60
|
+
* @returns True if the session is new (not yet used in a response), false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
static isNew(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Binds an object to this session, using the specified name.
|
|
65
|
+
* This is the primary way to store data in the user's session.
|
|
66
|
+
* @param name The name to bind the object under.
|
|
67
|
+
* @param value The value/object to store in the session.
|
|
68
|
+
*/
|
|
69
|
+
static setAttribute(name: string, value: any): void;
|
|
70
|
+
/**
|
|
71
|
+
* Removes the attribute with the given name from the session.
|
|
72
|
+
* @param name The name of the attribute to remove.
|
|
73
|
+
*/
|
|
74
|
+
static removeAttribute(name: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Specifies the maximum time interval, in seconds, that the server should keep this session open
|
|
77
|
+
* between client requests before automatically invalidating it.
|
|
78
|
+
* @param interval The new interval in seconds.
|
|
79
|
+
*/
|
|
80
|
+
static setMaxInactiveInterval(interval: number): void;
|
|
81
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade (`Upload` class) for checking and parsing
|
|
3
|
+
* multipart/form-data HTTP requests, typically used for file uploads.
|
|
4
|
+
*/
|
|
5
|
+
import { InputStream } from "@aerokit/sdk/io/streams";
|
|
6
|
+
/**
|
|
7
|
+
* The static Upload class provides methods to determine if a request contains
|
|
8
|
+
* multipart content and to parse that content into file items.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Upload {
|
|
11
|
+
/**
|
|
12
|
+
* Checks if the current incoming HTTP request contains multipart content
|
|
13
|
+
* (e.g., from an HTML form with `enctype="multipart/form-data"`).
|
|
14
|
+
* @returns True if the request is multipart, false otherwise.
|
|
15
|
+
*/
|
|
16
|
+
static isMultipartContent(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Parses the incoming multipart request content into a collection of file items.
|
|
19
|
+
* This operation typically consumes the request body.
|
|
20
|
+
* @returns A FileItems object representing all parts (files and form fields) of the request.
|
|
21
|
+
*/
|
|
22
|
+
static parseRequest(): FileItems;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents a collection of uploaded file and form field items parsed from a multipart request.
|
|
26
|
+
*/
|
|
27
|
+
export declare class FileItems {
|
|
28
|
+
private readonly native;
|
|
29
|
+
/**
|
|
30
|
+
* @param native The native Java collection object holding the file items.
|
|
31
|
+
*/
|
|
32
|
+
constructor(native: any);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves a specific item (file or form field) by its index in the collection.
|
|
35
|
+
* @param index The zero-based index of the item.
|
|
36
|
+
* @returns A FileItem object representing the item at the specified index.
|
|
37
|
+
*/
|
|
38
|
+
get(index: number): FileItem;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the total number of items (files and form fields) in the collection.
|
|
41
|
+
* @returns The size of the collection.
|
|
42
|
+
*/
|
|
43
|
+
size(): number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Represents a single item (either an uploaded file or a regular form field)
|
|
47
|
+
* within a multipart request.
|
|
48
|
+
*/
|
|
49
|
+
export declare class FileItem {
|
|
50
|
+
private readonly native;
|
|
51
|
+
/**
|
|
52
|
+
* @param native The native Java object representing the file item.
|
|
53
|
+
*/
|
|
54
|
+
constructor(native: any);
|
|
55
|
+
/**
|
|
56
|
+
* For a file upload, returns the original filename as reported by the client.
|
|
57
|
+
* For a regular form field, this is typically null or undefined.
|
|
58
|
+
* @returns The original filename string.
|
|
59
|
+
*/
|
|
60
|
+
getName(): string;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the MIME type of the uploaded file or content part.
|
|
63
|
+
* @returns The content type string (e.g., 'image/png', 'text/plain').
|
|
64
|
+
*/
|
|
65
|
+
getContentType(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Checks if the uploaded item is empty (e.g., a file upload with zero bytes).
|
|
68
|
+
* @returns True if the item is empty, false otherwise.
|
|
69
|
+
*/
|
|
70
|
+
isEmpty(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the size of the uploaded item in bytes.
|
|
73
|
+
* @returns The size as a number.
|
|
74
|
+
*/
|
|
75
|
+
getSize(): number;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves the content of the file item as a JavaScript array of bytes.
|
|
78
|
+
* This uses a utility (`Bytes.toJavaScriptBytes`) to convert the native Java byte array.
|
|
79
|
+
* @returns An array of bytes (`any[]`).
|
|
80
|
+
*/
|
|
81
|
+
getBytes(): any[];
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves the content of the file item as the native Java byte array.
|
|
84
|
+
* @returns The native byte array (`any[]`).
|
|
85
|
+
*/
|
|
86
|
+
getBytesNative(): any[];
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves the content of the file item as a string.
|
|
89
|
+
* Note: This assumes the content is text and may not handle all encodings correctly.
|
|
90
|
+
* It relies on JavaScript's `String.fromCharCode.apply` for conversion.
|
|
91
|
+
* @returns The content as a string.
|
|
92
|
+
*/
|
|
93
|
+
getText(): string;
|
|
94
|
+
/**
|
|
95
|
+
* Gets an input stream for reading the content of the file item.
|
|
96
|
+
* This is useful for handling large files without loading the entire content into memory.
|
|
97
|
+
* @returns An InputStream object wrapping the native input stream.
|
|
98
|
+
*/
|
|
99
|
+
getInputStream(): InputStream;
|
|
100
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides convenient static methods for sending standard HTTP responses.
|
|
3
|
+
* All responses are automatically formatted as 'application/json'.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HttpUtils {
|
|
6
|
+
/**
|
|
7
|
+
* Sends a successful response with HTTP status 200 (OK).
|
|
8
|
+
* The provided entity is serialized as the JSON response body.
|
|
9
|
+
* @param entity The data entity to return in the response body.
|
|
10
|
+
*/
|
|
11
|
+
static sendResponseOk(entity: any): void;
|
|
12
|
+
/**
|
|
13
|
+
* Sends a successful response with HTTP status 201 (Created).
|
|
14
|
+
* Typically used after a resource has been successfully created.
|
|
15
|
+
* @param entity The data entity of the newly created resource.
|
|
16
|
+
*/
|
|
17
|
+
static sendResponseCreated(entity: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Sends a successful response with HTTP status 204 (No Content).
|
|
20
|
+
* Typically used for successful DELETE requests or updates that do not return a body.
|
|
21
|
+
*/
|
|
22
|
+
static sendResponseNoContent(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Sends an error response with HTTP status 400 (Bad Request).
|
|
25
|
+
* Used when the request could not be understood or processed due to client-side errors (e.g., validation failure).
|
|
26
|
+
* @param message A descriptive error message explaining why the request was invalid.
|
|
27
|
+
*/
|
|
28
|
+
static sendResponseBadRequest(message: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Sends an error response with HTTP status 403 (Forbidden).
|
|
31
|
+
* Used when the client is authenticated but does not have the necessary permissions to access the resource.
|
|
32
|
+
* @param message A descriptive error message.
|
|
33
|
+
*/
|
|
34
|
+
static sendForbiddenRequest(message: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Sends an error response with HTTP status 404 (Not Found).
|
|
37
|
+
* Used when the requested resource could not be found.
|
|
38
|
+
* @param message A descriptive error message.
|
|
39
|
+
*/
|
|
40
|
+
static sendResponseNotFound(message: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Sends an error response with HTTP status 500 (Internal Server Error).
|
|
43
|
+
* Used for unexpected server-side conditions encountered during processing.
|
|
44
|
+
* @param message A descriptive error message (should mask internal details in production).
|
|
45
|
+
*/
|
|
46
|
+
static sendInternalServerError(message: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Generic private method to set the response status, content type, and body.
|
|
49
|
+
* If a body is provided, it is stringified into JSON and written to the response.
|
|
50
|
+
* @param status The HTTP status code to set (e.g., 200, 404, 500).
|
|
51
|
+
* @param body The JavaScript object or string to be serialized as the response body (optional).
|
|
52
|
+
*/
|
|
53
|
+
private static sendResponse;
|
|
54
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade (`Searcher` class) for performing
|
|
3
|
+
* term-based and time-based queries against a native indexing service.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The Searcher class provides methods for querying a specific index
|
|
7
|
+
* using keywords or date ranges.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Searcher {
|
|
10
|
+
/**
|
|
11
|
+
* Executes a keyword search against a specified index.
|
|
12
|
+
* @param index The name or identifier of the index to search (e.g., 'documents', 'products').
|
|
13
|
+
* @param term The keyword or search phrase to look for.
|
|
14
|
+
* @returns An array of result objects, parsed from the native JSON string output.
|
|
15
|
+
*/
|
|
16
|
+
static search(index: string, term: string): {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
}[];
|
|
19
|
+
/**
|
|
20
|
+
* Finds all entries in the index that were indexed before the specified date.
|
|
21
|
+
* @param index The name or identifier of the index.
|
|
22
|
+
* @param date The Date object representing the upper bound (exclusive) of the time range.
|
|
23
|
+
* @returns An array of result objects, parsed from the native JSON string output.
|
|
24
|
+
*/
|
|
25
|
+
static before(index: string, date: Date): {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
}[];
|
|
28
|
+
/**
|
|
29
|
+
* Finds all entries in the index that were indexed after the specified date.
|
|
30
|
+
* @param index The name or identifier of the index.
|
|
31
|
+
* @param date The Date object representing the lower bound (exclusive) of the time range.
|
|
32
|
+
* @returns An array of result objects, parsed from the native JSON string output.
|
|
33
|
+
*/
|
|
34
|
+
static after(index: string, date: Date): {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
}[];
|
|
37
|
+
/**
|
|
38
|
+
* Finds all entries in the index that were indexed within the specified date range.
|
|
39
|
+
* @param index The name or identifier of the index.
|
|
40
|
+
* @param lower The Date object for the lower bound (exclusive).
|
|
41
|
+
* @param upper The Date object for the upper bound (exclusive).
|
|
42
|
+
* @returns An array of result objects, parsed from the native JSON string output.
|
|
43
|
+
*/
|
|
44
|
+
static between(index: string, lower: Date, upper: Date): {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
}[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade (`Writer` class) for adding new documents
|
|
3
|
+
* or content to the native indexing service.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The Writer class provides a static method for indexing documents, allowing
|
|
7
|
+
* for full-text content, a last modification timestamp, and optional metadata.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Writer {
|
|
10
|
+
/**
|
|
11
|
+
* Adds a new document entry to the specified index.
|
|
12
|
+
*
|
|
13
|
+
* @param index The name or identifier of the index (e.g., 'documents', 'users').
|
|
14
|
+
* @param location A unique identifier or path for the indexed document (e.g., a file path or URL).
|
|
15
|
+
* @param contents The full-text content of the document to be indexed and made searchable.
|
|
16
|
+
* @param lastModified The Date object representing the last modification time of the document. Defaults to the current date/time if omitted.
|
|
17
|
+
* @param parameters Optional key-value map of additional metadata to associate with the document.
|
|
18
|
+
*/
|
|
19
|
+
static add(index: string, location: string, contents: string, lastModified?: Date, parameters?: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
}): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade for interacting with Apache Camel routes
|
|
3
|
+
* within the execution environment. This allows JavaScript code to synchronously
|
|
4
|
+
* invoke integration routes and access the current message context.
|
|
5
|
+
*/
|
|
6
|
+
declare const CamelMessage: any;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the structure for Camel Message Headers, typically used for
|
|
9
|
+
* standard communication metadata. Keys are strings, and values can be
|
|
10
|
+
* a single string or an array of strings.
|
|
11
|
+
*/
|
|
12
|
+
export interface HeadersMap {
|
|
13
|
+
[key: string]: string | string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Defines the structure for Camel Exchange Properties, which are context-specific
|
|
17
|
+
* variables used for processing within a single route execution. Keys are strings,
|
|
18
|
+
* and values can be a single string or an array of strings.
|
|
19
|
+
*/
|
|
20
|
+
export interface ExchangeProperties {
|
|
21
|
+
[key: string]: string | string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents the Camel message currently being processed. This interface mirrors
|
|
25
|
+
* key functionality of the underlying Apache Camel Message and Exchange objects.
|
|
26
|
+
*/
|
|
27
|
+
export interface IntegrationMessage {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs an IntegrationMessage wrapper around a native message object.
|
|
30
|
+
* @param message The native message object (usually a Camel Message or Exchange).
|
|
31
|
+
*/
|
|
32
|
+
constructor(message: any): any;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the body of the message.
|
|
35
|
+
* @returns The message body (can be any type, e.g., string, object, stream).
|
|
36
|
+
*/
|
|
37
|
+
getBody(): any;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves a specific property from the current Exchange context.
|
|
40
|
+
* @param propertyName The name of the exchange property.
|
|
41
|
+
* @returns The value of the exchange property.
|
|
42
|
+
*/
|
|
43
|
+
getExchangeProperty(propertyName: string): any;
|
|
44
|
+
/**
|
|
45
|
+
* Sets a specific property on the current Exchange context.
|
|
46
|
+
* @param propertyName The name of the exchange property.
|
|
47
|
+
* @param propertyValue The value to set.
|
|
48
|
+
*/
|
|
49
|
+
setExchangeProperty(propertyName: string, propertyValue: any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves all properties from the current Exchange context.
|
|
52
|
+
* @returns A map of all exchange properties.
|
|
53
|
+
*/
|
|
54
|
+
getExchangeProperties(): Record<string, any>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the body of the message as a string.
|
|
57
|
+
* @returns The message body converted to a string.
|
|
58
|
+
*/
|
|
59
|
+
getBodyAsString(): string;
|
|
60
|
+
/**
|
|
61
|
+
* Sets the body of the message.
|
|
62
|
+
* @param body The new body content.
|
|
63
|
+
*/
|
|
64
|
+
setBody(body: any): void;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves all headers associated with the message.
|
|
67
|
+
* @returns A map of headers.
|
|
68
|
+
*/
|
|
69
|
+
getHeaders(): HeadersMap;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves a specific header value.
|
|
72
|
+
* @param key The header key.
|
|
73
|
+
* @returns The header value(s).
|
|
74
|
+
*/
|
|
75
|
+
getHeader(key: string): string | string[];
|
|
76
|
+
/**
|
|
77
|
+
* Sets multiple headers on the message.
|
|
78
|
+
* @param headers The map of headers to set.
|
|
79
|
+
*/
|
|
80
|
+
setHeaders(headers: HeadersMap): void;
|
|
81
|
+
/**
|
|
82
|
+
* Sets a single header on the message.
|
|
83
|
+
* @param key The header key.
|
|
84
|
+
* @param value The header value.
|
|
85
|
+
*/
|
|
86
|
+
setHeader(key: string, value: string | string[]): void;
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves the underlying native Camel Message object.
|
|
89
|
+
* @returns The raw Camel Message instance.
|
|
90
|
+
*/
|
|
91
|
+
getCamelMessage(): typeof CamelMessage;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The Integrations class provides utility methods for triggering and interacting
|
|
95
|
+
* with predefined Apache Camel integration routes.
|
|
96
|
+
*/
|
|
97
|
+
export declare class Integrations {
|
|
98
|
+
/**
|
|
99
|
+
* Synchronously invokes a specified Camel route.
|
|
100
|
+
*
|
|
101
|
+
* @param routeId The unique identifier of the Camel route to be executed.
|
|
102
|
+
* @param payload The initial message body/payload for the route.
|
|
103
|
+
* @param headers A map of headers to set on the initial Camel Message.
|
|
104
|
+
* @param exchangeProperties A map of properties to set on the Camel Exchange context.
|
|
105
|
+
* @returns The final result (the body of the resulting Camel Message) after the route has completed execution.
|
|
106
|
+
*/
|
|
107
|
+
static invokeRoute(routeId: string, payload: any, headers: HeadersMap, exchangeProperties: ExchangeProperties): any;
|
|
108
|
+
/**
|
|
109
|
+
* Retrieves the current message being processed by the underlying integration
|
|
110
|
+
* engine's context. This is typically used within a route endpoint (e.g., a script component)
|
|
111
|
+
* to access or modify the message.
|
|
112
|
+
*
|
|
113
|
+
* Note: '__context' is assumed to be a global or context-injected variable.
|
|
114
|
+
* @returns The current IntegrationMessage wrapper.
|
|
115
|
+
*/
|
|
116
|
+
static getInvokingRouteMessage(): IntegrationMessage;
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides utilities for converting and manipulating byte arrays,
|
|
3
|
+
* facilitating conversions between JavaScript arrays, Java arrays, text, and integers.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The Bytes class provides static methods for byte array operations, primarily
|
|
7
|
+
* used to bridge data types between the JavaScript environment and native Java components.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Bytes {
|
|
10
|
+
/**
|
|
11
|
+
* Converts a native JavaScript byte array (an array of numbers) to a Java byte array.
|
|
12
|
+
* This is used internally by the API layer to pass data to Java methods.
|
|
13
|
+
*
|
|
14
|
+
* @param bytes The JavaScript array of bytes (e.g., [104, 101, 108, 108, 111]).
|
|
15
|
+
* @returns A native Java byte array (internal representation).
|
|
16
|
+
*/
|
|
17
|
+
static toJavaBytes(bytes: any[]): any[];
|
|
18
|
+
/**
|
|
19
|
+
* Converts a native Java byte array back to a JavaScript array of numbers.
|
|
20
|
+
* This is used internally by the API layer to retrieve data from Java methods.
|
|
21
|
+
*
|
|
22
|
+
* @param internalBytes The native Java byte array.
|
|
23
|
+
* @returns A JavaScript array containing the byte values (numbers).
|
|
24
|
+
*/
|
|
25
|
+
static toJavaScriptBytes(internalBytes: any[]): any[];
|
|
26
|
+
/**
|
|
27
|
+
* Converts a standard text string into a byte array using the default platform encoding.
|
|
28
|
+
*
|
|
29
|
+
* @param text The input text string.
|
|
30
|
+
* @returns A JavaScript array representing the bytes of the text.
|
|
31
|
+
*/
|
|
32
|
+
static textToByteArray(text: string): any[];
|
|
33
|
+
/**
|
|
34
|
+
* Converts a byte array back into a text string.
|
|
35
|
+
*
|
|
36
|
+
* @param data The JavaScript array of bytes.
|
|
37
|
+
* @returns The reconstructed text string.
|
|
38
|
+
*/
|
|
39
|
+
static byteArrayToText(data: any[]): string;
|
|
40
|
+
/**
|
|
41
|
+
* Converts a 32-bit integer value into a byte array, respecting the specified byte order.
|
|
42
|
+
*
|
|
43
|
+
* @param value The integer value to convert.
|
|
44
|
+
* @param byteOrder Specifies the byte ordering: "BIG_ENDIAN" (most significant byte first) or "LITTLE_ENDIAN" (least significant byte first).
|
|
45
|
+
* @returns A JavaScript array representing the 4-byte integer.
|
|
46
|
+
*/
|
|
47
|
+
static intToByteArray(value: number, byteOrder: "BIG_ENDIAN" | "LITTLE_ENDIAN"): any[];
|
|
48
|
+
/**
|
|
49
|
+
* Converts a 4-byte array back into a 32-bit integer value, respecting the specified byte order.
|
|
50
|
+
*
|
|
51
|
+
* @param data The 4-byte array (JavaScript array of numbers).
|
|
52
|
+
* @param byteOrder Specifies the byte ordering used during conversion.
|
|
53
|
+
* @returns The reconstructed integer value.
|
|
54
|
+
*/
|
|
55
|
+
static byteArrayToInt(data: any[], byteOrder: "BIG_ENDIAN" | "LITTLE_ENDIAN"): number;
|
|
56
|
+
}
|