@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,65 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
3
|
+
import { TenantV0Schema, tenantV0ToTenant } from "../../contracts/tenant.js";
|
|
4
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
5
|
+
const graphQlQueryById = `
|
|
6
|
+
query FLOWCORE_SDK_TENANT_LIST {
|
|
7
|
+
me {
|
|
8
|
+
organizations {
|
|
9
|
+
linkType
|
|
10
|
+
organization {
|
|
11
|
+
id
|
|
12
|
+
org
|
|
13
|
+
displayName
|
|
14
|
+
description
|
|
15
|
+
website
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const responseSchema = Type.Object({
|
|
22
|
+
data: Type.Object({
|
|
23
|
+
me: Type.Object({
|
|
24
|
+
organizations: Type.Array(Type.Object({
|
|
25
|
+
linkType: Type.Union([Type.Literal("OWNER"), Type.Literal("COLLABORATOR")]),
|
|
26
|
+
organization: TenantV0Schema,
|
|
27
|
+
})),
|
|
28
|
+
}),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* List tenants
|
|
33
|
+
*/
|
|
34
|
+
export class TenantListCommand extends GraphQlCommand {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
/**
|
|
38
|
+
* The allowed modes for the command
|
|
39
|
+
*/
|
|
40
|
+
Object.defineProperty(this, "allowedModes", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: ["bearer"]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse the response
|
|
49
|
+
*/
|
|
50
|
+
parseResponse(rawResponse) {
|
|
51
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
52
|
+
return response.data.me.organizations.flatMap((organization) => ({
|
|
53
|
+
...tenantV0ToTenant(organization.organization),
|
|
54
|
+
linkType: organization.linkType,
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get the body for the request
|
|
59
|
+
*/
|
|
60
|
+
getBody() {
|
|
61
|
+
return {
|
|
62
|
+
query: graphQlQueryById,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import type { Variable } from "../../contracts/variable.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the variable create command
|
|
5
|
+
*/
|
|
6
|
+
export interface VariableCreateInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
/** The key of the variable */
|
|
10
|
+
key: string;
|
|
11
|
+
/** The value of the variable */
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a variable
|
|
16
|
+
*/
|
|
17
|
+
export declare class VariableCreateCommand extends GraphQlCommand<VariableCreateInput, Variable> {
|
|
18
|
+
/**
|
|
19
|
+
* The allowed modes for the command
|
|
20
|
+
*/
|
|
21
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
22
|
+
/**
|
|
23
|
+
* Parse the response
|
|
24
|
+
*/
|
|
25
|
+
protected parseResponse(rawResponse: unknown): Variable;
|
|
26
|
+
/**
|
|
27
|
+
* Get the body for the request
|
|
28
|
+
*/
|
|
29
|
+
protected getBody(): Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=variable.create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable.create.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;CACd;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IACtF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAchE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
3
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
+
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
|
+
const graphQlQueryById = `
|
|
6
|
+
mutation FLOWCORE_SDK_VARIABLE_CREATE($tenantId: ID!, $key: String!, $value: String!) {
|
|
7
|
+
organization(id: $tenantId) {
|
|
8
|
+
createVariable(key: $key, value: $value)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
const responseSchema = Type.Object({
|
|
13
|
+
errors: Type.Optional(Type.Array(Type.Object({
|
|
14
|
+
message: Type.String(),
|
|
15
|
+
}))),
|
|
16
|
+
data: Type.Union([
|
|
17
|
+
Type.Object({
|
|
18
|
+
organization: Type.Object({
|
|
19
|
+
createVariable: Type.Union([Type.Boolean(), Type.Null()]),
|
|
20
|
+
}),
|
|
21
|
+
}),
|
|
22
|
+
Type.Null(),
|
|
23
|
+
]),
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Create a variable
|
|
27
|
+
*/
|
|
28
|
+
export class VariableCreateCommand extends GraphQlCommand {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
/**
|
|
32
|
+
* The allowed modes for the command
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(this, "allowedModes", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: ["bearer"]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
46
|
+
if (response.errors) {
|
|
47
|
+
throw new CommandError(this.constructor.name, response.errors[0].message);
|
|
48
|
+
}
|
|
49
|
+
if (!response.data || response.data.organization.createVariable !== true) {
|
|
50
|
+
throw new CommandError(this.constructor.name, "Failed to create variable");
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
key: this.input.key,
|
|
54
|
+
value: this.input.value,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get the body for the request
|
|
59
|
+
*/
|
|
60
|
+
getBody() {
|
|
61
|
+
return {
|
|
62
|
+
query: graphQlQueryById,
|
|
63
|
+
variables: this.input,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
/**
|
|
3
|
+
* The input for the variable delete command
|
|
4
|
+
*/
|
|
5
|
+
export interface VariableDeleteInput {
|
|
6
|
+
/** The tenant id */
|
|
7
|
+
tenantId: string;
|
|
8
|
+
/** The key of the variable */
|
|
9
|
+
key: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a variable
|
|
13
|
+
*/
|
|
14
|
+
export declare class VariableDeleteCommand extends GraphQlCommand<VariableDeleteInput, boolean> {
|
|
15
|
+
/**
|
|
16
|
+
* The allowed modes for the command
|
|
17
|
+
*/
|
|
18
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
19
|
+
/**
|
|
20
|
+
* Parse the response
|
|
21
|
+
*/
|
|
22
|
+
protected parseResponse(rawResponse: unknown): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get the body for the request
|
|
25
|
+
*/
|
|
26
|
+
protected getBody(): Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=variable.delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable.delete.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;CACZ;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACrF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
3
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
+
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
|
+
const graphQlQueryById = `
|
|
6
|
+
mutation FLOWCORE_SDK_VARIABLE_DELETE($tenantId: ID!, $key: String!) {
|
|
7
|
+
organization(id: $tenantId) {
|
|
8
|
+
removeVariable(key: $key)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
const responseSchema = Type.Object({
|
|
13
|
+
errors: Type.Optional(Type.Array(Type.Object({
|
|
14
|
+
message: Type.String(),
|
|
15
|
+
}))),
|
|
16
|
+
data: Type.Union([
|
|
17
|
+
Type.Object({
|
|
18
|
+
organization: Type.Object({
|
|
19
|
+
removeVariable: Type.Union([Type.Boolean(), Type.Null()]),
|
|
20
|
+
}),
|
|
21
|
+
}),
|
|
22
|
+
Type.Null(),
|
|
23
|
+
]),
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Create a variable
|
|
27
|
+
*/
|
|
28
|
+
export class VariableDeleteCommand extends GraphQlCommand {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
/**
|
|
32
|
+
* The allowed modes for the command
|
|
33
|
+
*/
|
|
34
|
+
Object.defineProperty(this, "allowedModes", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: ["bearer"]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
46
|
+
if (response.errors) {
|
|
47
|
+
throw new CommandError(this.constructor.name, response.errors[0].message);
|
|
48
|
+
}
|
|
49
|
+
if (!response.data || response.data.organization.removeVariable !== true) {
|
|
50
|
+
throw new CommandError(this.constructor.name, "Failed to delete variable");
|
|
51
|
+
}
|
|
52
|
+
return response.data.organization.removeVariable;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get the body for the request
|
|
56
|
+
*/
|
|
57
|
+
getBody() {
|
|
58
|
+
return {
|
|
59
|
+
query: graphQlQueryById,
|
|
60
|
+
variables: this.input,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import type { Variable } from "../../contracts/variable.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the variable list command
|
|
5
|
+
*/
|
|
6
|
+
export interface VariableListInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List variables
|
|
12
|
+
*/
|
|
13
|
+
export declare class VariableListCommand extends GraphQlCommand<VariableListInput, Variable[]> {
|
|
14
|
+
/**
|
|
15
|
+
* The allowed modes for the command
|
|
16
|
+
*/
|
|
17
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
18
|
+
/**
|
|
19
|
+
* Parse the response
|
|
20
|
+
*/
|
|
21
|
+
protected parseResponse(rawResponse: unknown): Variable[];
|
|
22
|
+
/**
|
|
23
|
+
* Get the body for the request
|
|
24
|
+
*/
|
|
25
|
+
protected getBody(): Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=variable.list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable.list.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/commands/variable/variable.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAkCD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IACpF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;IAWlE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
3
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
+
import { CommandError } from "../../exceptions/command-error.js";
|
|
5
|
+
const graphQlQueryById = `
|
|
6
|
+
query FLOWCORE_SDK_VARIABLE_LIST($tenantId: ID!) {
|
|
7
|
+
organization(search: {id: $tenantId}) {
|
|
8
|
+
variables {
|
|
9
|
+
key
|
|
10
|
+
value
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
const responseSchema = Type.Object({
|
|
16
|
+
errors: Type.Optional(Type.Array(Type.Object({
|
|
17
|
+
message: Type.String(),
|
|
18
|
+
}))),
|
|
19
|
+
data: Type.Union([
|
|
20
|
+
Type.Object({
|
|
21
|
+
organization: Type.Object({
|
|
22
|
+
variables: Type.Array(Type.Object({
|
|
23
|
+
key: Type.String(),
|
|
24
|
+
value: Type.String(),
|
|
25
|
+
})),
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
Type.Null(),
|
|
29
|
+
]),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* List variables
|
|
33
|
+
*/
|
|
34
|
+
export class VariableListCommand extends GraphQlCommand {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
/**
|
|
38
|
+
* The allowed modes for the command
|
|
39
|
+
*/
|
|
40
|
+
Object.defineProperty(this, "allowedModes", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: ["bearer"]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse the response
|
|
49
|
+
*/
|
|
50
|
+
parseResponse(rawResponse) {
|
|
51
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
52
|
+
if (response.errors) {
|
|
53
|
+
throw new CommandError(this.constructor.name, response.errors[0].message);
|
|
54
|
+
}
|
|
55
|
+
if (!response.data) {
|
|
56
|
+
throw new CommandError(this.constructor.name, "Failed to list variables");
|
|
57
|
+
}
|
|
58
|
+
return response.data.organization.variables;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get the body for the request
|
|
62
|
+
*/
|
|
63
|
+
getBody() {
|
|
64
|
+
return {
|
|
65
|
+
query: graphQlQueryById,
|
|
66
|
+
variables: this.input,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ClientError } from "../exceptions/client-error.js";
|
|
2
|
+
import type { FlowcoreClient } from "./flowcore-client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Abstract command for executing requests
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class Command<Input, Output> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the command should retry on failure
|
|
9
|
+
*/
|
|
10
|
+
protected readonly retryOnFailure: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The allowed modes for the command
|
|
13
|
+
*/
|
|
14
|
+
protected readonly allowedModes: ("apiKey" | "bearer")[];
|
|
15
|
+
/**
|
|
16
|
+
* The input for the command
|
|
17
|
+
*/
|
|
18
|
+
protected readonly input: Input;
|
|
19
|
+
constructor(input: Input);
|
|
20
|
+
/**
|
|
21
|
+
* Get the base URL for the request
|
|
22
|
+
*/
|
|
23
|
+
protected abstract getBaseUrl(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get the method for the request
|
|
26
|
+
*/
|
|
27
|
+
protected getMethod(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the path for the request
|
|
30
|
+
*/
|
|
31
|
+
protected getPath(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the body for the request
|
|
34
|
+
*/
|
|
35
|
+
protected getBody(): Record<string, unknown> | Array<unknown> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Get the headers for the request
|
|
38
|
+
*/
|
|
39
|
+
protected getHeaders(): Record<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* Parse the response
|
|
42
|
+
*/
|
|
43
|
+
protected abstract parseResponse(response: unknown): Output;
|
|
44
|
+
/**
|
|
45
|
+
* Handle the client error
|
|
46
|
+
*/
|
|
47
|
+
protected handleClientError(error: ClientError): void;
|
|
48
|
+
/**
|
|
49
|
+
* Get the request object
|
|
50
|
+
*/
|
|
51
|
+
getRequest(_client: FlowcoreClient): Promise<{
|
|
52
|
+
allowedModes: ("apiKey" | "bearer")[];
|
|
53
|
+
body: string | Record<string, unknown> | Array<unknown> | undefined;
|
|
54
|
+
headers: Record<string, string>;
|
|
55
|
+
baseUrl: string;
|
|
56
|
+
path: string;
|
|
57
|
+
method: string;
|
|
58
|
+
parseResponse: (response: unknown) => Output | Promise<Output>;
|
|
59
|
+
processResponse: (client: FlowcoreClient, response: Output) => Promise<Output>;
|
|
60
|
+
handleClientError: (error: ClientError) => void;
|
|
61
|
+
retryOnFailure: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Wait for the response
|
|
65
|
+
*/
|
|
66
|
+
protected processResponse(_client: FlowcoreClient, response: Output): Promise<Output>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Abstract command for executing GraphQL requests
|
|
70
|
+
*/
|
|
71
|
+
export declare abstract class GraphQlCommand<Input, Output> extends Command<Input, Output> {
|
|
72
|
+
/**
|
|
73
|
+
* The allowed modes for the command
|
|
74
|
+
*/
|
|
75
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
76
|
+
/**
|
|
77
|
+
* Get the base URL for the request
|
|
78
|
+
*/
|
|
79
|
+
protected getBaseUrl(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Get the path for the request
|
|
82
|
+
*/
|
|
83
|
+
protected getPath(): string;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;GAEG;AACH,8BAAsB,OAAO,CAAC,KAAK,EAAE,MAAM;IACzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAO;IAEjD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAuB;IAE/E;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;gBAEnB,KAAK,EAAE,KAAK;IAOxB;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,MAAM;IAEvC;;OAEG;IACH,SAAS,CAAC,SAAS,IAAI,MAAM;IAI7B;;OAEG;IACH,SAAS,CAAC,OAAO,IAAI,MAAM;IAI3B;;OAEG;IACH,SAAS,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS;IAOzE;;OAEG;IACH,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ9C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM;IAE3D;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAIrD;;OAEG;IAEU,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;QACxD,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;QACnE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9D,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9E,iBAAiB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;QAC/C,cAAc,EAAE,OAAO,CAAA;KACxB,CAAC;IAeF;;OAEG;cAEa,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F;AAED;;GAEG;AACH,8BAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAChF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;CAGrC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract command for executing requests
|
|
3
|
+
*/
|
|
4
|
+
export class Command {
|
|
5
|
+
constructor(input) {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the command should retry on failure
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* The allowed modes for the command
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(this, "allowedModes", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: ["apiKey", "bearer"]
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* The input for the command
|
|
26
|
+
*/
|
|
27
|
+
Object.defineProperty(this, "input", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: void 0
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* The input for the command
|
|
35
|
+
*/
|
|
36
|
+
this.input = input;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the method for the request
|
|
40
|
+
*/
|
|
41
|
+
getMethod() {
|
|
42
|
+
return "POST";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get the path for the request
|
|
46
|
+
*/
|
|
47
|
+
getPath() {
|
|
48
|
+
return "/";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the body for the request
|
|
52
|
+
*/
|
|
53
|
+
getBody() {
|
|
54
|
+
if (this.getMethod() === "GET") {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
return this.input ?? undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the headers for the request
|
|
61
|
+
*/
|
|
62
|
+
getHeaders() {
|
|
63
|
+
return typeof this.getBody() === "object"
|
|
64
|
+
? {
|
|
65
|
+
"Content-Type": "application/json",
|
|
66
|
+
}
|
|
67
|
+
: {};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Handle the client error
|
|
71
|
+
*/
|
|
72
|
+
handleClientError(error) {
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the request object
|
|
77
|
+
*/
|
|
78
|
+
// deno-lint-ignore require-await
|
|
79
|
+
async getRequest(_client) {
|
|
80
|
+
return {
|
|
81
|
+
allowedModes: this.allowedModes,
|
|
82
|
+
body: this.getBody(),
|
|
83
|
+
headers: this.getHeaders(),
|
|
84
|
+
baseUrl: this.getBaseUrl(),
|
|
85
|
+
path: this.getPath(),
|
|
86
|
+
method: this.getMethod(),
|
|
87
|
+
parseResponse: this.parseResponse.bind(this),
|
|
88
|
+
processResponse: this.processResponse.bind(this),
|
|
89
|
+
handleClientError: this.handleClientError.bind(this),
|
|
90
|
+
retryOnFailure: this.retryOnFailure,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Wait for the response
|
|
95
|
+
*/
|
|
96
|
+
// deno-lint-ignore require-await
|
|
97
|
+
async processResponse(_client, response) {
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Abstract command for executing GraphQL requests
|
|
103
|
+
*/
|
|
104
|
+
export class GraphQlCommand extends Command {
|
|
105
|
+
constructor() {
|
|
106
|
+
super(...arguments);
|
|
107
|
+
/**
|
|
108
|
+
* The allowed modes for the command
|
|
109
|
+
*/
|
|
110
|
+
Object.defineProperty(this, "allowedModes", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
configurable: true,
|
|
113
|
+
writable: true,
|
|
114
|
+
value: ["bearer"]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get the base URL for the request
|
|
119
|
+
*/
|
|
120
|
+
getBaseUrl() {
|
|
121
|
+
return "https://graph.api.flowcore.io";
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get the path for the request
|
|
125
|
+
*/
|
|
126
|
+
getPath() {
|
|
127
|
+
return "/graphql";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Command } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* The options for the bearer token
|
|
4
|
+
*/
|
|
5
|
+
interface ClientOptionsBearer {
|
|
6
|
+
getBearerToken: () => Promise<string | null> | string | null;
|
|
7
|
+
apiKeyId?: never;
|
|
8
|
+
apiKey?: never;
|
|
9
|
+
retry?: {
|
|
10
|
+
delay: number;
|
|
11
|
+
maxRetries: number;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The options for the api key
|
|
16
|
+
*/
|
|
17
|
+
interface ClientOptionsApiKey {
|
|
18
|
+
apiKeyId: string;
|
|
19
|
+
apiKey: string;
|
|
20
|
+
getBearerToken?: never;
|
|
21
|
+
retry?: {
|
|
22
|
+
delay: number;
|
|
23
|
+
maxRetries: number;
|
|
24
|
+
} | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The options for the client
|
|
28
|
+
*/
|
|
29
|
+
export type ClientOptions = ClientOptionsBearer | ClientOptionsApiKey;
|
|
30
|
+
/**
|
|
31
|
+
* A base client for executing commands
|
|
32
|
+
*/
|
|
33
|
+
export declare class FlowcoreClient {
|
|
34
|
+
private readonly options;
|
|
35
|
+
private mode;
|
|
36
|
+
private baseUrl;
|
|
37
|
+
constructor(options: ClientOptions);
|
|
38
|
+
/**
|
|
39
|
+
* Get the auth header
|
|
40
|
+
*/
|
|
41
|
+
private getAuthHeader;
|
|
42
|
+
/**
|
|
43
|
+
* Execute a command (inner method)
|
|
44
|
+
*/
|
|
45
|
+
private innerExecute;
|
|
46
|
+
/**
|
|
47
|
+
* Override the base URL for all commands
|
|
48
|
+
*/
|
|
49
|
+
setBaseUrl(baseUrl: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Execute a command
|
|
52
|
+
*/
|
|
53
|
+
execute<Input, Output>(command: Command<Input, Output>): Promise<Output>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=flowcore-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@flowcore/sdk/1.11.4/src/common/flowcore-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAA;AAErE;;GAEG;AACH,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,OAAO,CAAoB;gBAEN,OAAO,EAAE,aAAa;IAiBnD;;OAEG;YACW,aAAa;IAc3B;;OAEG;YACW,YAAY;IAiE1B;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CAGzE"}
|