@flowcore/data-pump 0.1.2
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/CHANGELOG.md +32 -0
- package/README.md +28 -0
- package/esm/_dnt.shims.d.ts +9 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +64 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.d.ts +46 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.js +94 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.d.ts +28 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.js +60 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.d.ts +27 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.js +58 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.d.ts +43 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.js +44 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.js +94 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.js +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.d.ts +55 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.js +59 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.d.ts +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.js +40 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.d.ts +41 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.js +43 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.d.ts +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.js +44 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.d.ts +41 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.js +107 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.js +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.d.ts +49 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.js +59 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.d.ts +31 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.js +36 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.d.ts +41 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.js +107 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.js +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.d.ts +53 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.js +41 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.d.ts +58 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.js +54 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.d.ts +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.js +44 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.d.ts +54 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.js +127 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.d.ts +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.js +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.d.ts +55 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.js +59 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.d.ts +31 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.js +36 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.js +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.d.ts +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.js +40 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.d.ts +30 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.js +60 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.d.ts +28 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.js +60 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.d.ts +26 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.js +63 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.d.ts +42 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.js +79 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.d.ts +20 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.js +65 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.d.ts +31 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.js +66 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.d.ts +28 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.js +63 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.d.ts +27 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.js +69 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.d.ts +85 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.js +129 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.d.ts +56 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.js +126 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.d.ts +90 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.js +247 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.d.ts +14 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.js +9 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.d.ts +41 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.js +42 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.d.ts +37 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.js +39 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.d.ts +20 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.js +15 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.d.ts +34 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.js +34 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.d.ts +6 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.js +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.d.ts +50 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.js +33 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.d.ts +13 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.js +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.d.ts +9 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.js +20 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.d.ts +7 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.js +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.d.ts +5 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.js +4 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.d.ts +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.js +15 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.d.ts +7 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.js +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.d.ts +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js +7 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.d.ts +8 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.js +14 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.d.ts +6 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.d.ts.map +1 -0
- package/esm/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.js +16 -0
- package/esm/lib/data-pump-client.d.ts +30 -0
- package/esm/lib/data-pump-client.d.ts.map +1 -0
- package/esm/lib/data-pump-client.js +52 -0
- package/esm/lib/data-pump.d.ts +75 -0
- package/esm/lib/data-pump.d.ts.map +1 -0
- package/esm/lib/data-pump.js +364 -0
- package/esm/lib/nats-notifier.d.ts +18 -0
- package/esm/lib/nats-notifier.d.ts.map +1 -0
- package/esm/lib/nats-notifier.js +88 -0
- package/esm/lib/time-uuid.d.ts +13 -0
- package/esm/lib/time-uuid.d.ts.map +1 -0
- package/esm/lib/time-uuid.js +36 -0
- package/esm/lib/ws-notifier.d.ts +28 -0
- package/esm/lib/ws-notifier.d.ts.map +1 -0
- package/esm/lib/ws-notifier.js +87 -0
- package/esm/mod.d.ts +3 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +2 -0
- package/esm/package.json +3 -0
- package/package.json +38 -0
- package/script/_dnt.shims.d.ts +9 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +72 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.d.ts +46 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.create.js +98 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.d.ts +28 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.delete.js +64 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.d.ts +27 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/api-key/api-key.list.js +62 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.d.ts +43 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.create.js +48 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.delete-request.js +98 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.exists.js +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.d.ts +55 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.fetch.js +63 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.d.ts +33 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.list.js +44 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.d.ts +41 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/data-core/data-core.update.js +47 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.d.ts +39 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.create.js +48 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.d.ts +41 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.delete-request.js +111 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.exists.js +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.d.ts +49 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.fetch.js +63 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.d.ts +31 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.list.js +40 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.d.ts +41 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.truncate-request.js +111 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/event-type/event-type.update.js +43 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.d.ts +53 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch-time-buckets-by-names.js +45 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.d.ts +58 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/events/events.fetch.js +58 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.d.ts +39 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.create.js +48 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.d.ts +54 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.delete-request.js +131 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.d.ts +39 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.exists.js +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.d.ts +55 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.fetch.js +63 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.d.ts +31 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.list.js +40 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/flow-type/flow-type.update.js +43 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.d.ts +33 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/index.js +56 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.d.ts +30 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.create.js +64 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.d.ts +28 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.delete.js +64 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.d.ts +26 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/secret/secret.list.js +67 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.d.ts +42 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.fetch.js +83 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.d.ts +20 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/tenant/tenant.list.js +69 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.d.ts +31 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.js +70 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.d.ts +28 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.js +67 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.d.ts +27 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.js +73 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.d.ts +85 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.js +134 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.d.ts +56 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.js +130 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.d.ts +90 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/notification-client.js +274 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.d.ts +14 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/api-key.js +12 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.d.ts +41 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/data-core.js +46 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.d.ts +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event-type.js +43 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.d.ts +20 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/event.js +18 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.d.ts +34 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/flow-type.js +38 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.d.ts +6 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/index.js +2 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.d.ts +50 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/tenant.js +37 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.d.ts +13 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/contracts/variable.js +11 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.d.ts +9 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/client-error.js +24 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.d.ts +7 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/command-error.js +12 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.d.ts +5 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/index.js +20 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.d.ts +8 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/invalid-response.js +19 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.d.ts +7 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/exceptions/not-found.js +12 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.d.ts +8 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js +23 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.d.ts +8 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.js +17 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.d.ts +6 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.d.ts.map +1 -0
- package/script/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.js +20 -0
- package/script/lib/data-pump-client.d.ts +30 -0
- package/script/lib/data-pump-client.d.ts.map +1 -0
- package/script/lib/data-pump-client.js +58 -0
- package/script/lib/data-pump.d.ts +75 -0
- package/script/lib/data-pump.d.ts.map +1 -0
- package/script/lib/data-pump.js +368 -0
- package/script/lib/nats-notifier.d.ts +18 -0
- package/script/lib/nats-notifier.d.ts.map +1 -0
- package/script/lib/nats-notifier.js +115 -0
- package/script/lib/time-uuid.d.ts +13 -0
- package/script/lib/time-uuid.d.ts.map +1 -0
- package/script/lib/time-uuid.js +40 -0
- package/script/lib/ws-notifier.d.ts +28 -0
- package/script/lib/ws-notifier.d.ts.map +1 -0
- package/script/lib/ws-notifier.js +94 -0
- package/script/mod.d.ts +3 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +18 -0
- package/script/package.json +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./commands/index.js"), exports);
|
|
18
|
+
__exportStar(require("./common/command.js"), exports);
|
|
19
|
+
__exportStar(require("./common/flowcore-client.js"), exports);
|
|
20
|
+
__exportStar(require("./common/notification-client.js"), exports);
|
|
21
|
+
__exportStar(require("./contracts/index.js"), exports);
|
|
22
|
+
__exportStar(require("./exceptions/index.js"), exports);
|
|
23
|
+
__exportStar(require("./utils/parse-response-helper.js"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Logger = {
|
|
2
|
+
debug: (message: string, meta?: Record<string, unknown>) => void;
|
|
3
|
+
info: (message: string, meta?: Record<string, unknown>) => void;
|
|
4
|
+
warn: (message: string, meta?: Record<string, unknown>) => void;
|
|
5
|
+
error: (message: string | Error, meta?: Record<string, unknown>) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const defaultLogger: Logger;
|
|
8
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/logger.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAChE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC/D,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC/D,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;CACzE,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,MAa3B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultLogger = void 0;
|
|
4
|
+
exports.defaultLogger = {
|
|
5
|
+
debug: (message, meta) => {
|
|
6
|
+
console.debug(message, meta);
|
|
7
|
+
},
|
|
8
|
+
info: (message, meta) => {
|
|
9
|
+
console.info(message, meta);
|
|
10
|
+
},
|
|
11
|
+
warn: (message, meta) => {
|
|
12
|
+
console.warn(message, meta);
|
|
13
|
+
},
|
|
14
|
+
error: (message, meta) => {
|
|
15
|
+
console.error(message, meta);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Static, TSchema } from "@sinclair/typebox";
|
|
2
|
+
/**
|
|
3
|
+
* Helper method for parsing the response
|
|
4
|
+
*/
|
|
5
|
+
export declare const parseResponseHelper: <T extends TSchema>(schema: T, response: unknown) => Static<T>;
|
|
6
|
+
//# sourceMappingURL=parse-response-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-response-helper.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/utils/parse-response-helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAGxD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,OAAO,UAAU,CAAC,YAAY,OAAO,KAAG,MAAM,CAAC,CAAC,CAU7F,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseResponseHelper = void 0;
|
|
4
|
+
const value_1 = require("@sinclair/typebox/value");
|
|
5
|
+
const invalid_response_js_1 = require("../exceptions/invalid-response.js");
|
|
6
|
+
/**
|
|
7
|
+
* Helper method for parsing the response
|
|
8
|
+
*/
|
|
9
|
+
const parseResponseHelper = (schema, response) => {
|
|
10
|
+
if (!value_1.Value.Check(schema, response)) {
|
|
11
|
+
const parseErrors = value_1.Value.Errors(schema, response);
|
|
12
|
+
const errors = {};
|
|
13
|
+
for (const error of parseErrors) {
|
|
14
|
+
errors[error.path] = error.message;
|
|
15
|
+
}
|
|
16
|
+
throw new invalid_response_js_1.InvalidResponseException("Invalid response", errors);
|
|
17
|
+
}
|
|
18
|
+
return response;
|
|
19
|
+
};
|
|
20
|
+
exports.parseResponseHelper = parseResponseHelper;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type FlowcoreEvent } from "../deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js";
|
|
2
|
+
import { DataPump, type DataPumpStateManager, type Logger } from "./data-pump.js";
|
|
3
|
+
export interface DataPumpClientOptions {
|
|
4
|
+
logger?: Logger;
|
|
5
|
+
auth: {
|
|
6
|
+
clientId: string;
|
|
7
|
+
clientSecret: string;
|
|
8
|
+
authUrl?: string;
|
|
9
|
+
};
|
|
10
|
+
dataSource: {
|
|
11
|
+
tenant: string;
|
|
12
|
+
dataCore: string;
|
|
13
|
+
flowType: string;
|
|
14
|
+
eventTypes: string[];
|
|
15
|
+
};
|
|
16
|
+
buffer?: {
|
|
17
|
+
size?: number;
|
|
18
|
+
threshold?: number;
|
|
19
|
+
maxDeliveryCount?: number;
|
|
20
|
+
achknowledgeTimeoutMs?: number;
|
|
21
|
+
};
|
|
22
|
+
stateManager?: DataPumpStateManager;
|
|
23
|
+
processor?: {
|
|
24
|
+
concurrency?: number;
|
|
25
|
+
onEvents: (events: FlowcoreEvent[]) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
natsServers?: string[];
|
|
28
|
+
}
|
|
29
|
+
export declare function createDataPump(options: DataPumpClientOptions): DataPump;
|
|
30
|
+
//# sourceMappingURL=data-pump-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-pump-client.d.ts","sourceRoot":"","sources":["../../src/lib/data-pump-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,gDAAgD,CAAA;AACnG,OAAO,EAAE,QAAQ,EAAE,KAAK,oBAAoB,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAMjF,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,UAAU,EAAE,MAAM,EAAE,CAAA;KACrB,CAAA;IACD,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACnC,SAAS,CAAC,EAAE;QACV,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KACrD,CAAA;IACD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,CAuDvE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createDataPump = createDataPump;
|
|
7
|
+
const sdk_oidc_client_1 = __importDefault(require("@flowcore/sdk-oidc-client"));
|
|
8
|
+
const mod_js_1 = require("../deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js");
|
|
9
|
+
const data_pump_js_1 = require("./data-pump.js");
|
|
10
|
+
const ws_notifier_js_1 = require("./ws-notifier.js");
|
|
11
|
+
const nats_notifier_js_1 = require("./nats-notifier.js");
|
|
12
|
+
const defaultAuthUrl = "https://auth.flowcore.io/realms/flowcore/.well-known/openid-configuration";
|
|
13
|
+
function createDataPump(options) {
|
|
14
|
+
const authClient = new sdk_oidc_client_1.default.OidcClient(options.auth.clientId, options.auth.clientSecret, options.auth.authUrl ?? defaultAuthUrl);
|
|
15
|
+
const flowcoreClient = new mod_js_1.FlowcoreClient({
|
|
16
|
+
getBearerToken: async () => (await authClient.getToken()).accessToken ?? null,
|
|
17
|
+
});
|
|
18
|
+
const stateManager = options.stateManager ?? {
|
|
19
|
+
getState: () => null,
|
|
20
|
+
setState: () => { },
|
|
21
|
+
};
|
|
22
|
+
const notifier = options.natsServers
|
|
23
|
+
? new nats_notifier_js_1.NatsNotifier({
|
|
24
|
+
servers: options.natsServers,
|
|
25
|
+
})
|
|
26
|
+
: new ws_notifier_js_1.WebSocketNotifier({
|
|
27
|
+
auth: {
|
|
28
|
+
clientId: options.auth.clientId,
|
|
29
|
+
clientSecret: options.auth.clientSecret,
|
|
30
|
+
authUrl: options.auth.authUrl ?? defaultAuthUrl,
|
|
31
|
+
},
|
|
32
|
+
dataSource: options.dataSource,
|
|
33
|
+
logger: options.logger,
|
|
34
|
+
});
|
|
35
|
+
const bufferSize = options.buffer?.size ?? 1000;
|
|
36
|
+
const buffer = {
|
|
37
|
+
size: bufferSize,
|
|
38
|
+
threshold: options.buffer?.threshold ?? Math.round(bufferSize * 0.1),
|
|
39
|
+
maxDeliveryCount: options.buffer?.maxDeliveryCount ?? 3,
|
|
40
|
+
achknowledgeTimeoutMs: options.buffer?.achknowledgeTimeoutMs ?? 10_000,
|
|
41
|
+
};
|
|
42
|
+
const processor = options.processor
|
|
43
|
+
? {
|
|
44
|
+
concurrency: options.processor.concurrency ?? 1,
|
|
45
|
+
onEvents: options.processor.onEvents,
|
|
46
|
+
}
|
|
47
|
+
: undefined;
|
|
48
|
+
const dataPump = new data_pump_js_1.DataPump({
|
|
49
|
+
flowcoreClient,
|
|
50
|
+
stateManager,
|
|
51
|
+
dataSource: options.dataSource,
|
|
52
|
+
buffer,
|
|
53
|
+
processor,
|
|
54
|
+
notifier: notifier.getNotifier(),
|
|
55
|
+
logger: options.logger,
|
|
56
|
+
});
|
|
57
|
+
return dataPump;
|
|
58
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type FlowcoreClient, type FlowcoreEvent } from "../deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js";
|
|
2
|
+
export interface Logger {
|
|
3
|
+
debug(message: string, ...meta: unknown[]): void;
|
|
4
|
+
info(message: string, ...meta: unknown[]): void;
|
|
5
|
+
warn(message: string, ...meta: unknown[]): void;
|
|
6
|
+
error(message: string | Error, ...meta: unknown[]): void;
|
|
7
|
+
}
|
|
8
|
+
interface DataPumpOptions {
|
|
9
|
+
flowcoreClient: FlowcoreClient;
|
|
10
|
+
stateManager: DataPumpStateManager;
|
|
11
|
+
logger?: Logger;
|
|
12
|
+
notifier: DataPumpNotifier;
|
|
13
|
+
dataSource: {
|
|
14
|
+
tenant: string;
|
|
15
|
+
dataCore: string;
|
|
16
|
+
flowType: string;
|
|
17
|
+
eventTypes: string[];
|
|
18
|
+
};
|
|
19
|
+
buffer: {
|
|
20
|
+
size: number;
|
|
21
|
+
threshold: number;
|
|
22
|
+
maxDeliveryCount: number;
|
|
23
|
+
achknowledgeTimeoutMs: number;
|
|
24
|
+
};
|
|
25
|
+
processor?: {
|
|
26
|
+
concurrency: number;
|
|
27
|
+
onEvents: (events: FlowcoreEvent[]) => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface DataPumpState {
|
|
31
|
+
timeBucket: string;
|
|
32
|
+
eventId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DataPumpStateManager {
|
|
35
|
+
getState(): Promise<DataPumpState | null> | DataPumpState | null;
|
|
36
|
+
setState(state: DataPumpState): Promise<void> | void;
|
|
37
|
+
}
|
|
38
|
+
export interface DataPumpNotifier {
|
|
39
|
+
wait(dataSource: DataPumpOptions["dataSource"] & {
|
|
40
|
+
dataCoreId: string;
|
|
41
|
+
}, signal?: AbortSignal): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
export declare class DataPump {
|
|
44
|
+
private options;
|
|
45
|
+
private logger?;
|
|
46
|
+
private state;
|
|
47
|
+
private _timeBuckets;
|
|
48
|
+
private buffer;
|
|
49
|
+
private bufferWaiter;
|
|
50
|
+
private waiter;
|
|
51
|
+
private running;
|
|
52
|
+
private notifierAbortController?;
|
|
53
|
+
private dataCoreId?;
|
|
54
|
+
constructor(options: DataPumpOptions);
|
|
55
|
+
start(): Promise<void>;
|
|
56
|
+
stop(): void;
|
|
57
|
+
private proceccor;
|
|
58
|
+
private eventBufferLoop;
|
|
59
|
+
private reOpen;
|
|
60
|
+
private updateState;
|
|
61
|
+
private get timeBuckets();
|
|
62
|
+
private getClosestTimeBucket;
|
|
63
|
+
private updateTimeBuckets;
|
|
64
|
+
private pullInner;
|
|
65
|
+
private acknowledgeInner;
|
|
66
|
+
private waitForNotifier;
|
|
67
|
+
private waitForEvents;
|
|
68
|
+
private waitForBufferThreshold;
|
|
69
|
+
private getNowTimeBucket;
|
|
70
|
+
private getDataCoreId;
|
|
71
|
+
pull(amount: number): Promise<FlowcoreEvent[]>;
|
|
72
|
+
acknowledge(eventIds: string[]): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=data-pump.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-pump.d.ts","sourceRoot":"","sources":["../../src/lib/data-pump.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,MAAM,gDAAgD,CAAA;AAiBvD,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CACzD;AAED,UAAU,eAAe;IACvB,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,oBAAoB,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,UAAU,EAAE,MAAM,EAAE,CAAA;KACrB,CAAA;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,MAAM,CAAA;QACjB,gBAAgB,EAAE,MAAM,CAAA;QACxB,qBAAqB,EAAE,MAAM,CAAA;KAC9B,CAAA;IACD,SAAS,CAAC,EAAE;QACV,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KACrD,CAAA;CACF;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,aAAa,GAAG,IAAI,CAAA;IAChE,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9G;AAED,qBAAa,QAAQ;IAWP,OAAO,CAAC,OAAO;IAV3B,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,YAAY,CAA8C;IAClE,OAAO,CAAC,MAAM,CAA8C;IAC5D,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,uBAAuB,CAAC,CAAiB;IACjD,OAAO,CAAC,UAAU,CAAC,CAAQ;gBAEP,OAAO,EAAE,eAAe;IAO/B,KAAK;IAiCX,IAAI;YAWG,SAAS;YAmBT,eAAe;IAwF7B,OAAO,CAAC,MAAM;IAgBd,OAAO,CAAC,WAAW;IAUnB,OAAO,KAAK,WAAW,GAMtB;IAED,OAAO,CAAC,oBAAoB;YAUd,iBAAiB;YAoBjB,SAAS;YAsCT,gBAAgB;YAiBhB,eAAe;YAUf,aAAa;YAab,sBAAsB;IAepC,OAAO,CAAC,gBAAgB;YAIV,aAAa;IAmBpB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAO9C,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAMtD"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataPump = void 0;
|
|
4
|
+
const mod_js_1 = require("../deps/jsr.io/@flowcore/sdk/1.11.4/src/mod.js");
|
|
5
|
+
const time_uuid_js_1 = require("./time-uuid.js");
|
|
6
|
+
const date_fns_1 = require("date-fns");
|
|
7
|
+
const utc_1 = require("@date-fns/utc");
|
|
8
|
+
var FlowcoreBufferEventStatus;
|
|
9
|
+
(function (FlowcoreBufferEventStatus) {
|
|
10
|
+
FlowcoreBufferEventStatus["OPEN"] = "open";
|
|
11
|
+
FlowcoreBufferEventStatus["DELIVERED"] = "delivered";
|
|
12
|
+
})(FlowcoreBufferEventStatus || (FlowcoreBufferEventStatus = {}));
|
|
13
|
+
class DataPump {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
Object.defineProperty(this, "options", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: options
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(this, "logger", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: void 0
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "state", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: void 0
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "_timeBuckets", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: []
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "buffer", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: []
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(this, "bufferWaiter", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value: null
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(this, "waiter", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
configurable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
value: null
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(this, "running", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
value: false
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(this, "notifierAbortController", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
value: void 0
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(this, "dataCoreId", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
configurable: true,
|
|
72
|
+
writable: true,
|
|
73
|
+
value: void 0
|
|
74
|
+
});
|
|
75
|
+
this.state = {
|
|
76
|
+
timeBucket: this.getNowTimeBucket(),
|
|
77
|
+
};
|
|
78
|
+
this.logger = options.logger ?? undefined;
|
|
79
|
+
}
|
|
80
|
+
async start() {
|
|
81
|
+
if (this.running) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
await this.updateTimeBuckets();
|
|
85
|
+
const newState = await this.options.stateManager.getState();
|
|
86
|
+
if (!newState) {
|
|
87
|
+
this.state.timeBucket = this.getClosestTimeBucket(this.getNowTimeBucket());
|
|
88
|
+
this.state.eventId = time_uuid_js_1.TimeUuid.fromNow().toString();
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.state.timeBucket = this.getClosestTimeBucket(newState.timeBucket);
|
|
92
|
+
this.state.eventId = newState.eventId;
|
|
93
|
+
}
|
|
94
|
+
this.running = true;
|
|
95
|
+
this.logger?.debug("Starting event buffer loop");
|
|
96
|
+
this.eventBufferLoop()
|
|
97
|
+
.then(() => this.logger?.debug("Event buffer loop stopped"))
|
|
98
|
+
.catch((error) => this.logger?.error("Error in event buffer loop", { error }))
|
|
99
|
+
.finally(() => this.stop());
|
|
100
|
+
if (this.options.processor) {
|
|
101
|
+
this.logger?.debug("Starting processor");
|
|
102
|
+
this.proceccor()
|
|
103
|
+
.then(() => this.logger?.debug("Processor stopped"))
|
|
104
|
+
.catch((error) => this.logger?.error("Error in processor", { error }))
|
|
105
|
+
.finally(() => this.stop());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
stop() {
|
|
109
|
+
if (!this.running) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.logger?.debug("Stopping data pump");
|
|
113
|
+
this.running = false;
|
|
114
|
+
this.notifierAbortController?.abort("stopping");
|
|
115
|
+
this.bufferWaiter?.(true);
|
|
116
|
+
this.waiter?.(true);
|
|
117
|
+
}
|
|
118
|
+
async proceccor() {
|
|
119
|
+
if (!this.options.processor) {
|
|
120
|
+
throw new Error("Processor not set");
|
|
121
|
+
}
|
|
122
|
+
while (this.running) {
|
|
123
|
+
try {
|
|
124
|
+
const events = await this.pullInner(this.options.processor.concurrency);
|
|
125
|
+
if (!this.running) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
await this.options.processor.onEvents(events);
|
|
129
|
+
await this.acknowledgeInner(events.map((event) => event.eventId));
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
this.logger?.error("Error in processor", { error });
|
|
133
|
+
this.stop();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async eventBufferLoop() {
|
|
138
|
+
// Stop buffer loop if we are not running
|
|
139
|
+
if (!this.running) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// Buffer is full, wait for some space
|
|
143
|
+
if (this.buffer.length >= this.options.buffer.size - this.options.buffer.threshold && this.running) {
|
|
144
|
+
this.logger?.debug("Buffer is full, waiting for some space");
|
|
145
|
+
await this.waitForBufferThreshold();
|
|
146
|
+
}
|
|
147
|
+
// Stop buffer loop if we are not running
|
|
148
|
+
if (!this.running) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// How many events should we fetch
|
|
152
|
+
const eventsToFetch = this.options.buffer.size - this.buffer.length;
|
|
153
|
+
this.logger?.debug(`fetching ${eventsToFetch} events from ${this.state.timeBucket} @ ${this.state.eventId ?? "-"}`);
|
|
154
|
+
const timeStart = Date.now();
|
|
155
|
+
const command = new mod_js_1.EventsFetchCommand({
|
|
156
|
+
tenant: this.options.dataSource.tenant,
|
|
157
|
+
dataCoreId: await this.getDataCoreId(),
|
|
158
|
+
flowType: this.options.dataSource.flowType,
|
|
159
|
+
eventTypes: this.options.dataSource.eventTypes,
|
|
160
|
+
timeBucket: this.state.timeBucket,
|
|
161
|
+
afterEventId: this.state.eventId,
|
|
162
|
+
pageSize: eventsToFetch,
|
|
163
|
+
});
|
|
164
|
+
const result = await this.options.flowcoreClient.execute(command);
|
|
165
|
+
const time = Date.now() - timeStart;
|
|
166
|
+
// Stop buffer loop if we are not running
|
|
167
|
+
if (!this.running) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const events = result.events.map((event) => ({
|
|
171
|
+
event,
|
|
172
|
+
status: FlowcoreBufferEventStatus.OPEN,
|
|
173
|
+
deliveryCount: 0,
|
|
174
|
+
deliveryTime: 0,
|
|
175
|
+
deliveryId: "",
|
|
176
|
+
}));
|
|
177
|
+
this.buffer.push(...events);
|
|
178
|
+
// Check if we have a waiter and if we have events, notify the waiter
|
|
179
|
+
events.length && this.waiter?.();
|
|
180
|
+
this.logger?.debug(`Got ${result.events.length} events from ${this.state.timeBucket} @ ${this.state.eventId ?? "-"} in ${time}ms. Buffer size ${this.buffer.length}`);
|
|
181
|
+
// Update buffer state
|
|
182
|
+
this.state.eventId = result.events[result.events.length - 1]?.eventId ?? this.state.eventId;
|
|
183
|
+
// If we don't have a next cursor move to next time bucket
|
|
184
|
+
if (!result.nextCursor) {
|
|
185
|
+
// Get next time bucket
|
|
186
|
+
const nextTimeBucketIndex = this.timeBuckets.indexOf(this.state.timeBucket) + 1;
|
|
187
|
+
// There is no next time bucket
|
|
188
|
+
if (!this.timeBuckets[nextTimeBucketIndex]) {
|
|
189
|
+
if (result.events.length) {
|
|
190
|
+
// If we got events, we can try to get more one more time
|
|
191
|
+
this.logger?.debug("Try to get more events");
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
// If we didn't get events, we wait for notifier
|
|
195
|
+
await this.waitForNotifier();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
// Set next time bucket
|
|
200
|
+
this.state.timeBucket = this.timeBuckets[nextTimeBucketIndex];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return this.eventBufferLoop();
|
|
204
|
+
}
|
|
205
|
+
reOpen(eventIds, deliveryId) {
|
|
206
|
+
if (!eventIds.length) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.buffer.forEach((event) => {
|
|
210
|
+
if (event.deliveryId === deliveryId && eventIds.includes(event.event.eventId)) {
|
|
211
|
+
event.status = FlowcoreBufferEventStatus.OPEN;
|
|
212
|
+
event.deliveryId = "";
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
if (this.bufferWaiter && this.buffer.length <= this.options.buffer.size - this.options.buffer.threshold) {
|
|
216
|
+
this.bufferWaiter();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
updateState() {
|
|
220
|
+
const firstEvent = this.buffer[0];
|
|
221
|
+
if (!firstEvent) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const timeUuid = time_uuid_js_1.TimeUuid.fromString(firstEvent.event.eventId);
|
|
225
|
+
const timeBucket = firstEvent.event.timeBucket;
|
|
226
|
+
return this.options.stateManager.setState({ timeBucket, eventId: timeUuid.getBefore().toString() });
|
|
227
|
+
}
|
|
228
|
+
get timeBuckets() {
|
|
229
|
+
const timeBucketNow = this.getNowTimeBucket();
|
|
230
|
+
if (this._timeBuckets[this._timeBuckets.length - 1] !== timeBucketNow) {
|
|
231
|
+
return [...this._timeBuckets, timeBucketNow];
|
|
232
|
+
}
|
|
233
|
+
return this._timeBuckets;
|
|
234
|
+
}
|
|
235
|
+
getClosestTimeBucket(timeBucket) {
|
|
236
|
+
if (!timeBucket.match(/^\d{14}$/)) {
|
|
237
|
+
throw new Error(`Invalid timebucket: ${timeBucket}`);
|
|
238
|
+
}
|
|
239
|
+
return (this.timeBuckets.find((t) => Number.parseFloat(t) >= Number.parseFloat(timeBucket)) ??
|
|
240
|
+
this.timeBuckets[this.timeBuckets.length - 1]);
|
|
241
|
+
}
|
|
242
|
+
async updateTimeBuckets() {
|
|
243
|
+
this._timeBuckets = [];
|
|
244
|
+
let first = true;
|
|
245
|
+
let cursor;
|
|
246
|
+
while (cursor !== undefined || first) {
|
|
247
|
+
first = false;
|
|
248
|
+
const command = new mod_js_1.EventsFetchTimeBucketsByNamesCommand({
|
|
249
|
+
tenant: this.options.dataSource.tenant,
|
|
250
|
+
dataCoreId: await this.getDataCoreId(),
|
|
251
|
+
flowType: this.options.dataSource.flowType,
|
|
252
|
+
eventTypes: this.options.dataSource.eventTypes,
|
|
253
|
+
pageSize: 10_000,
|
|
254
|
+
});
|
|
255
|
+
// sdkCommandCount.labels("EventsFetchTimeBucketsByNamesCommand").inc(1)
|
|
256
|
+
const result = await this.options.flowcoreClient.execute(command);
|
|
257
|
+
this._timeBuckets.push(...result.timeBuckets);
|
|
258
|
+
cursor = result.nextCursor;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
async pullInner(amount) {
|
|
262
|
+
if (!this.running) {
|
|
263
|
+
throw new Error("Data pump not running");
|
|
264
|
+
}
|
|
265
|
+
const deliveryId = crypto.randomUUID();
|
|
266
|
+
const events = [];
|
|
267
|
+
for (const event of this.buffer) {
|
|
268
|
+
if (event.status === FlowcoreBufferEventStatus.OPEN) {
|
|
269
|
+
event.status = FlowcoreBufferEventStatus.DELIVERED;
|
|
270
|
+
event.deliveryCount++;
|
|
271
|
+
event.deliveryId = deliveryId;
|
|
272
|
+
events.push(event.event);
|
|
273
|
+
if (events.length >= amount) {
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (!events.length) {
|
|
279
|
+
await this.waitForEvents();
|
|
280
|
+
if (!this.running) {
|
|
281
|
+
return [];
|
|
282
|
+
}
|
|
283
|
+
return this.pullInner(amount);
|
|
284
|
+
}
|
|
285
|
+
setTimeout(() => {
|
|
286
|
+
this.reOpen(events.map((event) => event.eventId), deliveryId);
|
|
287
|
+
}, this.options.buffer.achknowledgeTimeoutMs);
|
|
288
|
+
return events;
|
|
289
|
+
}
|
|
290
|
+
async acknowledgeInner(eventIds) {
|
|
291
|
+
if (!eventIds.length) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
// this.logger.info("Acknowledging events", { events: eventIds.length })
|
|
295
|
+
this.buffer = this.buffer.filter((event) => {
|
|
296
|
+
if (eventIds.includes(event.event.eventId)) {
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
return true;
|
|
300
|
+
});
|
|
301
|
+
if (this.bufferWaiter && this.buffer.length <= this.options.buffer.size - this.options.buffer.threshold) {
|
|
302
|
+
this.bufferWaiter();
|
|
303
|
+
}
|
|
304
|
+
await this.updateState();
|
|
305
|
+
}
|
|
306
|
+
async waitForNotifier() {
|
|
307
|
+
this.logger?.debug("No more events, waiting for notifier...");
|
|
308
|
+
this.notifierAbortController = new AbortController();
|
|
309
|
+
await this.options.notifier.wait({ ...this.options.dataSource, dataCoreId: await this.getDataCoreId() }, this.notifierAbortController.signal);
|
|
310
|
+
this.notifierAbortController = undefined;
|
|
311
|
+
}
|
|
312
|
+
async waitForEvents() {
|
|
313
|
+
this.logger?.debug("No events, waiting for events");
|
|
314
|
+
await new Promise((resolve) => {
|
|
315
|
+
this.waiter = (stopping) => {
|
|
316
|
+
if (!stopping) {
|
|
317
|
+
this.logger?.debug("Notifying waiter that we have events");
|
|
318
|
+
}
|
|
319
|
+
resolve();
|
|
320
|
+
};
|
|
321
|
+
});
|
|
322
|
+
this.waiter = null;
|
|
323
|
+
}
|
|
324
|
+
async waitForBufferThreshold() {
|
|
325
|
+
if (this.buffer.length < this.options.buffer.size - this.options.buffer.threshold) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
await new Promise((resolve) => {
|
|
329
|
+
this.bufferWaiter = (stopping) => {
|
|
330
|
+
if (!stopping) {
|
|
331
|
+
this.logger?.debug("Notifying buffer waiter that we are under threshold");
|
|
332
|
+
}
|
|
333
|
+
resolve();
|
|
334
|
+
};
|
|
335
|
+
});
|
|
336
|
+
this.bufferWaiter = null;
|
|
337
|
+
}
|
|
338
|
+
getNowTimeBucket() {
|
|
339
|
+
return (0, date_fns_1.format)((0, date_fns_1.startOfHour)((0, utc_1.utc)(new Date())), "yyyyMMddHH0000");
|
|
340
|
+
}
|
|
341
|
+
async getDataCoreId() {
|
|
342
|
+
if (this.dataCoreId) {
|
|
343
|
+
return this.dataCoreId;
|
|
344
|
+
}
|
|
345
|
+
const tenant = await this.options.flowcoreClient.execute(new mod_js_1.TenantFetchCommand({
|
|
346
|
+
tenant: this.options.dataSource.tenant,
|
|
347
|
+
}));
|
|
348
|
+
const dataCore = await this.options.flowcoreClient.execute(new mod_js_1.DataCoreFetchCommand({
|
|
349
|
+
dataCore: this.options.dataSource.dataCore,
|
|
350
|
+
tenantId: tenant.id,
|
|
351
|
+
}));
|
|
352
|
+
this.dataCoreId = dataCore.id;
|
|
353
|
+
return this.dataCoreId;
|
|
354
|
+
}
|
|
355
|
+
pull(amount) {
|
|
356
|
+
if (this.options.processor) {
|
|
357
|
+
throw new Error("Pull is not supported when processor is set");
|
|
358
|
+
}
|
|
359
|
+
return this.pullInner(amount);
|
|
360
|
+
}
|
|
361
|
+
acknowledge(eventIds) {
|
|
362
|
+
if (this.options.processor) {
|
|
363
|
+
throw new Error("Acknowledge is not supported when processor is set");
|
|
364
|
+
}
|
|
365
|
+
return this.acknowledgeInner(eventIds);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
exports.DataPump = DataPump;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DataPumpNotifier } from "./data-pump.js";
|
|
2
|
+
interface NatsClientOptions {
|
|
3
|
+
servers: string[];
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class NatsNotifier {
|
|
7
|
+
private readonly options;
|
|
8
|
+
private nats;
|
|
9
|
+
private timeoutMs;
|
|
10
|
+
constructor(options: NatsClientOptions);
|
|
11
|
+
private start;
|
|
12
|
+
private stop;
|
|
13
|
+
private awaitMessage;
|
|
14
|
+
private getSubscription;
|
|
15
|
+
getNotifier(): DataPumpNotifier;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=nats-notifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nats-notifier.d.ts","sourceRoot":"","sources":["../../src/lib/nats-notifier.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,qBAAa,YAAY;IAGX,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,IAAI,CAAiC;IAC7C,OAAO,CAAC,SAAS,CAAQ;gBACI,OAAO,EAAE,iBAAiB;YAIzC,KAAK;YAOL,IAAI;IAOlB,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,eAAe;IAgBhB,WAAW,IAAI,gBAAgB;CAavC"}
|