@transai/connector-runner-dummy-node 0.12.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/index.cjs +1 -1
- package/index.cjs.map +3 -3
- package/libs/connector-runner-dummy-node/src/lib/connector-runner-dummy-node.d.ts +1 -2
- package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +1 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +17 -0
- package/libs/connector-runtime-sdk/src/lib/types/action.d.ts +17 -3
- package/package.json +1 -1
- package/index.js +0 -2
- package/index.js.map +0 -7
- package/libs/types/src/index.d.ts +0 -7
- package/libs/types/src/lib/cube-query-config.types.d.ts +0 -20
- package/libs/types/src/lib/file-action.types.d.ts +0 -5
- package/libs/types/src/lib/http-status-codes.enum.d.ts +0 -64
- package/libs/types/src/lib/management-api/action-definition.interface.d.ts +0 -12
- package/libs/types/src/lib/management-api/author.interface.d.ts +0 -11
- package/libs/types/src/lib/management-api/chart.interface.d.ts +0 -9
- package/libs/types/src/lib/management-api/connector/connector.interface.d.ts +0 -52
- package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +0 -38
- package/libs/types/src/lib/management-api/connector-orchestrator-config.interface.d.ts +0 -14
- package/libs/types/src/lib/management-api/cube-dataset.interface.d.ts +0 -94
- package/libs/types/src/lib/management-api/dashboard.interface.d.ts +0 -35
- package/libs/types/src/lib/management-api/dataset/collection.interface.d.ts +0 -10
- package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +0 -41
- package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +0 -118
- package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +0 -96
- package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +0 -53
- package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +0 -33
- package/libs/types/src/lib/management-api/dataset/filter-group.interface.d.ts +0 -8
- package/libs/types/src/lib/management-api/dataset/filter.interface.d.ts +0 -14
- package/libs/types/src/lib/management-api/dataset/filters.interface.d.ts +0 -7
- package/libs/types/src/lib/management-api/dataset/measure.interface.d.ts +0 -27
- package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +0 -17
- package/libs/types/src/lib/management-api/dataset/meta.interface.d.ts +0 -9
- package/libs/types/src/lib/management-api/dataset/pre-aggregate.interface.d.ts +0 -41
- package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +0 -26
- package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +0 -16
- package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +0 -12
- package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +0 -17
- package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +0 -15
- package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +0 -20
- package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +0 -15
- package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +0 -14
- package/libs/types/src/lib/management-api/event-origin.interface.d.ts +0 -24
- package/libs/types/src/lib/management-api/index.d.ts +0 -40
- package/libs/types/src/lib/management-api/semantic-trigger/custom-cron-trigger-record.interface.d.ts +0 -6
- package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +0 -6
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +0 -12
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +0 -10
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-record.interface.d.ts +0 -6
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger.interface.d.ts +0 -35
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +0 -22
- package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +0 -150
- package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +0 -314
- package/libs/types/src/lib/management-api/template.interface.d.ts +0 -190
- package/libs/types/src/lib/management-api/tenant.interface.d.ts +0 -8
- package/libs/types/src/lib/management-api/type-enums.d.ts +0 -91
- package/libs/types/src/lib/management-api/web/generic-filter.dto.d.ts +0 -37
- package/libs/types/src/lib/management-api/web/index.d.ts +0 -2
- package/libs/types/src/lib/management-api/web/paginated-response.interface.d.ts +0 -17
- package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +0 -71
- package/libs/types/src/lib/management-api/workflow/enums/index.d.ts +0 -3
- package/libs/types/src/lib/management-api/workflow/enums/node-types.enum.d.ts +0 -14
- package/libs/types/src/lib/management-api/workflow/enums/trigger-types.enum.d.ts +0 -14
- package/libs/types/src/lib/management-api/workflow/enums/workflow-status.enum.d.ts +0 -16
- package/libs/types/src/lib/management-api/workflow/index.d.ts +0 -7
- package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +0 -14
- package/libs/types/src/lib/management-api/workflow/parameter-mapper.interface.d.ts +0 -26
- package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +0 -66
- package/libs/types/src/lib/management-api/workflow/workflow-drawing.interface.d.ts +0 -96
- package/libs/types/src/lib/management-api/workflow/workflow-run.interface.d.ts +0 -57
- package/libs/types/src/lib/message.types.d.ts +0 -59
- package/libs/types/src/lib/response.types.d.ts +0 -27
- package/libs/types/src/lib/types.d.ts +0 -134
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 0.14.0 (2026-03-16)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @transai/connector-runtime-sdk to 0.10.0
|
|
6
|
+
|
|
7
|
+
## 0.13.0 (2026-03-13)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- use sdk typings instead of general typings ([#1087](https://github.com/xip-online-applications/xod-core/pull/1087))
|
|
12
|
+
|
|
13
|
+
### 🧱 Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated @transai/connector-runtime-sdk to 0.9.3
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Youri Lefers @yourilefers
|
|
20
|
+
|
|
21
|
+
## 0.12.0 (2026-03-06)
|
|
22
|
+
|
|
23
|
+
This was a version bump only for connector-runner-dummy-node to align it with other projects, there were no code changes.
|
|
24
|
+
|
|
1
25
|
## 0.11.1 (2026-03-06)
|
|
2
26
|
|
|
3
27
|
This was a version bump only for connector-runner-dummy-node to align it with other projects, there were no code changes.
|
package/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var l=Object.create;var
|
|
1
|
+
"use strict";var l=Object.create;var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var y=(t,r)=>{for(var e in r)i(t,e,{get:r[e],enumerable:!0})},m=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of g(r))!b.call(t,o)&&o!==e&&i(t,o,{get:()=>r[o],enumerable:!(n=d(r,o))||n.enumerable});return t};var P=(t,r,e)=>(e=t!=null?l(I(t)):{},m(r||!t||!t.__esModule?i(e,"default",{value:t,enumerable:!0}):e,t)),x=t=>m(i({},"__esModule",{value:!0}),t);var C={};y(C,{ConnectorRunnerDummyNode:()=>p});module.exports=x(C);var a=P(require("node:process")),s=class{#r="connector-runtime";#e;constructor(r,e){this.#e=e,a.default.on?a.default.on("message",n=>{n.cmd===this.#r&&e.logger.verbose(`${a.default.pid} Received message from parent process:`,n)}):e.logger.warn("IPC channel is not available. process.on is undefined."),a.default.send||e.logger.warn("IPC channel is not available. process.send is undefined."),r.actions?.forEach(n=>{if(n.config.templates===void 0)return;let o={};Object.entries(n.config.templates).forEach(([c,f])=>{try{o[c]=e.templating.compile(f)}catch(u){e.logger.error(`Error compiling template ${c} for action ${n.identifier}`,u)}}),n.config.parsedTemplates=o})}init=()=>Promise.resolve();start=()=>Promise.resolve();stop=()=>Promise.resolve();set callbackFunction(r){this.connectorSDK.receiver.registerCallback(this.#t(r))}get connectorSDK(){return this.#e}#t(r){return async e=>{let n=await this.#e.receiver.getActionConfig(e);return n?r(e,n):this.#e.receiver.responses.badRequest("Action not found")(e)}}};var p=class extends s{CONNECTOR_INSTANCE="XOD_CONNECTOR_DUMMY_NODE_CONFIG";init=async()=>{let{config:r}=this.connectorSDK,e=r.failProbability||0;e>0&&this.connectorSDK.logger.debug("Fail probability set to",e);let n=()=>Math.random()<e;this.callbackFunction=async(o,c)=>(this.connectorSDK.logger.info("Received message: ",o.testRun?"(test run)":"",o.eventId,o.payload),n()?(this.connectorSDK.logger.error("Dummy process failed"),this.connectorSDK.receiver.responses.internalServerError("Dummy process failed")(o)):this.connectorSDK.receiver.responses.ok()(o))}};0&&(module.exports={ConnectorRunnerDummyNode});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../libs/connector-runner-dummy-node/src/index.ts", "../../../libs/connector-runtime-sdk/src/lib/connector-runtime.ts", "../../../libs/connector-runner-dummy-node/src/lib/connector-runner-dummy-node.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './lib/connector-runner-dummy-node';\n", "import process from 'node:process';\n\nimport { ConnectorRuntimeInterface } from './connector-runtime.interface';\nimport { CompileDelegate, ConnectorSDKInterface } from './sdk';\nimport {\n ActionInterface,\n BaseConnectorConfig,\n ConnectorInterface,\n KafkaCallbackResponse,\n XodJobType,\n} from './types';\n\nexport interface IpcMessage {\n cmd: string;\n message: string;\n}\n\nexport abstract class ConnectorRuntimeSDK<\n T extends BaseConnectorConfig = BaseConnectorConfig,\n> implements ConnectorRuntimeInterface {\n readonly #IPC_CHANNEL = 'connector-runtime';\n\n readonly #connectorSDK: ConnectorSDKInterface<T>;\n\n constructor(\n connector: ConnectorInterface,\n connectorSDK: ConnectorSDKInterface,\n ) {\n this.#connectorSDK = connectorSDK as ConnectorSDKInterface<T>;\n\n if (process.on) {\n process.on('message', (message: IpcMessage) => {\n if (message.cmd === this.#IPC_CHANNEL) {\n connectorSDK.logger.verbose(\n `${process.pid} Received message from parent process:`,\n message,\n );\n }\n });\n } else {\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.on is undefined.',\n );\n }\n\n if (!process.send) {\n // Check if process.send is available\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.send is undefined.',\n );\n }\n\n // eslint-disable-next-line no-restricted-syntax\n connector.actions?.forEach((action: ActionInterface) => {\n if (action.config['templates'] === undefined) {\n return;\n }\n\n const containers: {\n [key: string]: CompileDelegate;\n } = {};\n\n Object.entries(action.config['templates']).forEach(([key, value]) => {\n try {\n // eslint-disable-next-line security/detect-object-injection\n containers[key] = connectorSDK.templating.compile(value);\n } catch (error: unknown) {\n connectorSDK.logger.error(\n `Error compiling template ${key} for action ${action.identifier}`,\n error,\n );\n }\n });\n\n // eslint-disable-next-line no-param-reassign\n action.config['parsedTemplates'] = containers;\n });\n }\n\n public init: () => Promise<void> = () => Promise.resolve();\n\n public start: () => Promise<void> = () => Promise.resolve();\n\n public stop: () => Promise<void> = () => Promise.resolve();\n\n set callbackFunction(\n callback: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ) {\n this.connectorSDK.receiver.registerCallback(\n this.#enrichWithActionConfig(callback),\n );\n }\n\n protected get connectorSDK(): ConnectorSDKInterface<T> {\n return this.#connectorSDK;\n }\n\n #enrichWithActionConfig(\n callbackFunction: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ): (message: XodJobType) => Promise<KafkaCallbackResponse> {\n return async (message: XodJobType) => {\n const action = await this.#connectorSDK.receiver.getActionConfig(message);\n if (!action) {\n return this.#connectorSDK.receiver.responses.badRequest(\n 'Action not found',\n )(message);\n }\n return callbackFunction(message, action);\n };\n }\n}\n", "import {
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAoB,2BAiBEC,EAAf,KAEgC,
|
|
6
|
-
"names": ["index_exports", "__export", "ConnectorRunnerDummyNode", "__toCommonJS", "import_node_process", "ConnectorRuntimeSDK", "
|
|
4
|
+
"sourcesContent": ["export * from './lib/connector-runner-dummy-node';\n", "import process from 'node:process';\n\nimport { ConnectorRuntimeInterface } from './connector-runtime.interface';\nimport { CompileDelegate, ConnectorSDKInterface } from './sdk';\nimport {\n ActionInterface,\n BaseConnectorConfig,\n ConnectorInterface,\n KafkaCallbackResponse,\n XodJobType,\n} from './types';\n\nexport interface IpcMessage {\n cmd: string;\n message: string;\n}\n\nexport abstract class ConnectorRuntimeSDK<\n T extends BaseConnectorConfig = BaseConnectorConfig,\n> implements ConnectorRuntimeInterface {\n readonly #IPC_CHANNEL = 'connector-runtime';\n\n readonly #connectorSDK: ConnectorSDKInterface<T>;\n\n constructor(\n connector: ConnectorInterface,\n connectorSDK: ConnectorSDKInterface,\n ) {\n this.#connectorSDK = connectorSDK as ConnectorSDKInterface<T>;\n\n if (process.on) {\n process.on('message', (message: IpcMessage) => {\n if (message.cmd === this.#IPC_CHANNEL) {\n connectorSDK.logger.verbose(\n `${process.pid} Received message from parent process:`,\n message,\n );\n }\n });\n } else {\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.on is undefined.',\n );\n }\n\n if (!process.send) {\n // Check if process.send is available\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.send is undefined.',\n );\n }\n\n // eslint-disable-next-line no-restricted-syntax\n connector.actions?.forEach((action: ActionInterface) => {\n if (action.config['templates'] === undefined) {\n return;\n }\n\n const containers: {\n [key: string]: CompileDelegate;\n } = {};\n\n Object.entries(action.config['templates']).forEach(([key, value]) => {\n try {\n // eslint-disable-next-line security/detect-object-injection\n containers[key] = connectorSDK.templating.compile(value);\n } catch (error: unknown) {\n connectorSDK.logger.error(\n `Error compiling template ${key} for action ${action.identifier}`,\n error,\n );\n }\n });\n\n // eslint-disable-next-line no-param-reassign\n action.config['parsedTemplates'] = containers;\n });\n }\n\n public init: () => Promise<void> = () => Promise.resolve();\n\n public start: () => Promise<void> = () => Promise.resolve();\n\n public stop: () => Promise<void> = () => Promise.resolve();\n\n set callbackFunction(\n callback: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ) {\n this.connectorSDK.receiver.registerCallback(\n this.#enrichWithActionConfig(callback),\n );\n }\n\n protected get connectorSDK(): ConnectorSDKInterface<T> {\n return this.#connectorSDK;\n }\n\n #enrichWithActionConfig(\n callbackFunction: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ): (message: XodJobType) => Promise<KafkaCallbackResponse> {\n return async (message: XodJobType) => {\n const action = await this.#connectorSDK.receiver.getActionConfig(message);\n if (!action) {\n return this.#connectorSDK.receiver.responses.badRequest(\n 'Action not found',\n )(message);\n }\n return callbackFunction(message, action);\n };\n }\n}\n", "import {\n ActionInterface,\n BaseConnectorConfig,\n ConnectorRuntimeSDK,\n KafkaCallbackResponse,\n XodJobType,\n} from '@transai/connector-runtime-sdk';\n\nexport class ConnectorRunnerDummyNode extends ConnectorRuntimeSDK<\n {\n failProbability?: number;\n } & BaseConnectorConfig\n> {\n readonly CONNECTOR_INSTANCE: string = 'XOD_CONNECTOR_DUMMY_NODE_CONFIG';\n\n override init = async (): Promise<void> => {\n const { config } = this.connectorSDK;\n\n const failProbability = config.failProbability || 0.0;\n if (failProbability > 0) {\n this.connectorSDK.logger.debug(\n 'Fail probability set to',\n failProbability,\n );\n }\n\n const dummyProcessFailed = (): boolean => {\n return Math.random() < failProbability;\n };\n\n this.callbackFunction = async (\n message: XodJobType,\n action: ActionInterface,\n ): Promise<KafkaCallbackResponse> => {\n this.connectorSDK.logger.info(\n 'Received message: ',\n message.testRun ? '(test run)' : '',\n message.eventId,\n message.payload,\n );\n\n if (dummyProcessFailed()) {\n this.connectorSDK.logger.error('Dummy process failed');\n return this.connectorSDK.receiver.responses.internalServerError(\n 'Dummy process failed',\n )(message);\n }\n\n return this.connectorSDK.receiver.responses.ok()(message);\n };\n };\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAoB,2BAiBEC,EAAf,KAEgC,CAC5BC,GAAe,oBAEfC,GAET,YACEC,EACAC,EACA,CACA,KAAKF,GAAgBE,EAEjB,EAAAC,QAAQ,GACV,EAAAA,QAAQ,GAAG,UAAYC,GAAwB,CACzCA,EAAQ,MAAQ,KAAKL,IACvBG,EAAa,OAAO,QAClB,GAAG,EAAAC,QAAQ,GAAG,yCACdC,CACF,CAEJ,CAAC,EAEDF,EAAa,OAAO,KAClB,wDACF,EAGG,EAAAC,QAAQ,MAEXD,EAAa,OAAO,KAClB,0DACF,EAIFD,EAAU,SAAS,QAASI,GAA4B,CACtD,GAAIA,EAAO,OAAO,YAAiB,OACjC,OAGF,IAAMC,EAEF,CAAC,EAEL,OAAO,QAAQD,EAAO,OAAO,SAAY,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CACnE,GAAI,CAEFF,EAAWC,CAAG,EAAIL,EAAa,WAAW,QAAQM,CAAK,CACzD,OAASC,EAAgB,CACvBP,EAAa,OAAO,MAClB,4BAA4BK,CAAG,eAAeF,EAAO,UAAU,GAC/DI,CACF,CACF,CACF,CAAC,EAGDJ,EAAO,OAAO,gBAAqBC,CACrC,CAAC,CACH,CAEO,KAA4B,IAAM,QAAQ,QAAQ,EAElD,MAA6B,IAAM,QAAQ,QAAQ,EAEnD,KAA4B,IAAM,QAAQ,QAAQ,EAEzD,IAAI,iBACFI,EAIA,CACA,KAAK,aAAa,SAAS,iBACzB,KAAKC,GAAwBD,CAAQ,CACvC,CACF,CAEA,IAAc,cAAyC,CACrD,OAAO,KAAKV,EACd,CAEAW,GACEC,EAIyD,CACzD,MAAO,OAAOR,GAAwB,CACpC,IAAMC,EAAS,MAAM,KAAKL,GAAc,SAAS,gBAAgBI,CAAO,EACxE,OAAKC,EAKEO,EAAiBR,EAASC,CAAM,EAJ9B,KAAKL,GAAc,SAAS,UAAU,WAC3C,kBACF,EAAEI,CAAO,CAGb,CACF,CACF,EC5GO,IAAMS,EAAN,cAAuCC,CAI5C,CACS,mBAA6B,kCAE7B,KAAO,SAA2B,CACzC,GAAM,CAAE,OAAAC,CAAO,EAAI,KAAK,aAElBC,EAAkBD,EAAO,iBAAmB,EAC9CC,EAAkB,GACpB,KAAK,aAAa,OAAO,MACvB,0BACAA,CACF,EAGF,IAAMC,EAAqB,IAClB,KAAK,OAAO,EAAID,EAGzB,KAAK,iBAAmB,MACtBE,EACAC,KAEA,KAAK,aAAa,OAAO,KACvB,qBACAD,EAAQ,QAAU,aAAe,GACjCA,EAAQ,QACRA,EAAQ,OACV,EAEID,EAAmB,GACrB,KAAK,aAAa,OAAO,MAAM,sBAAsB,EAC9C,KAAK,aAAa,SAAS,UAAU,oBAC1C,sBACF,EAAEC,CAAO,GAGJ,KAAK,aAAa,SAAS,UAAU,GAAG,EAAEA,CAAO,EAE5D,CACF",
|
|
6
|
+
"names": ["index_exports", "__export", "ConnectorRunnerDummyNode", "__toCommonJS", "import_node_process", "ConnectorRuntimeSDK", "#IPC_CHANNEL", "#connectorSDK", "connector", "connectorSDK", "process", "message", "action", "containers", "key", "value", "error", "callback", "#enrichWithActionConfig", "callbackFunction", "ConnectorRunnerDummyNode", "ConnectorRuntimeSDK", "config", "failProbability", "dummyProcessFailed", "message", "action"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ConnectorRuntimeSDK } from '@transai/connector-runtime-sdk';
|
|
2
|
-
import { BaseConnectorConfig } from '@xip-online-data/types';
|
|
1
|
+
import { BaseConnectorConfig, ConnectorRuntimeSDK } from '@transai/connector-runtime-sdk';
|
|
3
2
|
export declare class ConnectorRunnerDummyNode extends ConnectorRuntimeSDK<{
|
|
4
3
|
failProbability?: number;
|
|
5
4
|
} & BaseConnectorConfig> {
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
/** The default timeout is 10 minutes */
|
|
2
|
+
export declare const DEFAULT_TIMEOUT_SECONDS: number;
|
|
1
3
|
export interface IntervalHandler {
|
|
2
4
|
name?: string;
|
|
3
5
|
onInit?: () => Promise<void> | void;
|
|
4
6
|
onRun: () => Promise<void> | void;
|
|
5
7
|
onStop?: () => Promise<void> | void;
|
|
6
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Options for configuring an interval registered via {@link ProcessingSDKInterface.registerInterval}.
|
|
11
|
+
*/
|
|
7
12
|
export type RegisterIntervalOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* If true, the handler will be invoked immediately once on registration,
|
|
15
|
+
* in addition to subsequent scheduled executions.
|
|
16
|
+
*/
|
|
8
17
|
immediate?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional timeout, in seconds, for the interval.
|
|
20
|
+
*
|
|
21
|
+
* This value should be a positive number representing the maximum time,
|
|
22
|
+
* in seconds, that the interval is allowed to run before being considered
|
|
23
|
+
* timed out. Callers should not pass 0 or negative values.
|
|
24
|
+
*/
|
|
25
|
+
timeout?: number;
|
|
9
26
|
};
|
|
10
27
|
export interface ProcessingSDKInterface {
|
|
11
28
|
registerInterval(intervalSeconds: number, handler: IntervalHandler, options?: RegisterIntervalOptions): Promise<string>;
|
|
@@ -23,13 +23,26 @@ export interface NumberOutputParameterInterface extends OutputItemParameterInter
|
|
|
23
23
|
export interface OutputParameterInterface {
|
|
24
24
|
[key: string]: OutputItemParameterInterface | ArrayOutputParameterInterface | NumberOutputParameterInterface;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
interface BaseInputParameter {
|
|
27
27
|
name: string;
|
|
28
28
|
description?: string;
|
|
29
|
-
type: 'string' | 'number' | 'boolean' | 'array';
|
|
30
29
|
required?: boolean;
|
|
31
|
-
items?: Array<InputParameterInterface>;
|
|
32
30
|
}
|
|
31
|
+
export interface ValueInputParameter extends BaseInputParameter {
|
|
32
|
+
type: 'string' | 'number' | 'boolean';
|
|
33
|
+
}
|
|
34
|
+
export interface SimpleArrayInputParameter extends BaseInputParameter {
|
|
35
|
+
type: 'simple-array';
|
|
36
|
+
itemType: 'string' | 'number' | 'boolean';
|
|
37
|
+
}
|
|
38
|
+
export interface ArrayInputParameter extends BaseInputParameter {
|
|
39
|
+
type: 'array';
|
|
40
|
+
items: Array<InputParameterInterface>;
|
|
41
|
+
}
|
|
42
|
+
export interface UnknownInputParameter extends BaseInputParameter {
|
|
43
|
+
type: 'unknown';
|
|
44
|
+
}
|
|
45
|
+
export type InputParameterInterface = ValueInputParameter | SimpleArrayInputParameter | ArrayInputParameter | UnknownInputParameter;
|
|
33
46
|
export interface ActionInterface {
|
|
34
47
|
identifier: string;
|
|
35
48
|
version: string;
|
|
@@ -47,3 +60,4 @@ export interface ActionInterface {
|
|
|
47
60
|
mode?: ConnectorOrigin;
|
|
48
61
|
createdAt: Date;
|
|
49
62
|
}
|
|
63
|
+
export {};
|
package/package.json
CHANGED
package/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import a from"node:process";var i=class{constructor(o,r){this.#r="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#e=r,a.on?a.on("message",e=>{e.cmd===this.#r&&r.logger.verbose(`${a.pid} Received message from parent process:`,e)}):r.logger.warn("IPC channel is not available. process.on is undefined."),a.send||r.logger.warn("IPC channel is not available. process.send is undefined."),o.actions?.forEach(e=>{if(e.config.templates===void 0)return;let n={};Object.entries(e.config.templates).forEach(([t,c])=>{try{n[t]=r.templating.compile(c)}catch(p){r.logger.error(`Error compiling template ${t} for action ${e.identifier}`,p)}}),e.config.parsedTemplates=n})}#r;#e;set callbackFunction(o){this.connectorSDK.receiver.registerCallback(this.#t(o))}get connectorSDK(){return this.#e}#t(o){return async r=>{let e=await this.#e.receiver.getActionConfig(r);return e?o(r,e):this.#e.receiver.responses.badRequest("Action not found")(r)}}};var s=class extends i{constructor(){super(...arguments);this.CONNECTOR_INSTANCE="XOD_CONNECTOR_DUMMY_NODE_CONFIG";this.init=async()=>{let{config:r}=this.connectorSDK,e=r.failProbability||0;e>0&&this.connectorSDK.logger.debug("Fail probability set to",e);let n=()=>Math.random()<e;this.callbackFunction=async(t,c)=>(this.connectorSDK.logger.info("Received message: ",t.testRun?"(test run)":"",t.eventId,t.payload),n()?(this.connectorSDK.logger.error("Dummy process failed"),this.connectorSDK.receiver.responses.internalServerError("Dummy process failed")(t)):this.connectorSDK.receiver.responses.ok()(t))}}};export{s as ConnectorRunnerDummyNode};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
package/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../libs/connector-runtime-sdk/src/lib/connector-runtime.ts", "../../../libs/connector-runner-dummy-node/src/lib/connector-runner-dummy-node.ts"],
|
|
4
|
-
"sourcesContent": ["import process from 'node:process';\n\nimport { ConnectorRuntimeInterface } from './connector-runtime.interface';\nimport { CompileDelegate, ConnectorSDKInterface } from './sdk';\nimport {\n ActionInterface,\n BaseConnectorConfig,\n ConnectorInterface,\n KafkaCallbackResponse,\n XodJobType,\n} from './types';\n\nexport interface IpcMessage {\n cmd: string;\n message: string;\n}\n\nexport abstract class ConnectorRuntimeSDK<\n T extends BaseConnectorConfig = BaseConnectorConfig,\n> implements ConnectorRuntimeInterface {\n readonly #IPC_CHANNEL = 'connector-runtime';\n\n readonly #connectorSDK: ConnectorSDKInterface<T>;\n\n constructor(\n connector: ConnectorInterface,\n connectorSDK: ConnectorSDKInterface,\n ) {\n this.#connectorSDK = connectorSDK as ConnectorSDKInterface<T>;\n\n if (process.on) {\n process.on('message', (message: IpcMessage) => {\n if (message.cmd === this.#IPC_CHANNEL) {\n connectorSDK.logger.verbose(\n `${process.pid} Received message from parent process:`,\n message,\n );\n }\n });\n } else {\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.on is undefined.',\n );\n }\n\n if (!process.send) {\n // Check if process.send is available\n connectorSDK.logger.warn(\n 'IPC channel is not available. process.send is undefined.',\n );\n }\n\n // eslint-disable-next-line no-restricted-syntax\n connector.actions?.forEach((action: ActionInterface) => {\n if (action.config['templates'] === undefined) {\n return;\n }\n\n const containers: {\n [key: string]: CompileDelegate;\n } = {};\n\n Object.entries(action.config['templates']).forEach(([key, value]) => {\n try {\n // eslint-disable-next-line security/detect-object-injection\n containers[key] = connectorSDK.templating.compile(value);\n } catch (error: unknown) {\n connectorSDK.logger.error(\n `Error compiling template ${key} for action ${action.identifier}`,\n error,\n );\n }\n });\n\n // eslint-disable-next-line no-param-reassign\n action.config['parsedTemplates'] = containers;\n });\n }\n\n public init: () => Promise<void> = () => Promise.resolve();\n\n public start: () => Promise<void> = () => Promise.resolve();\n\n public stop: () => Promise<void> = () => Promise.resolve();\n\n set callbackFunction(\n callback: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ) {\n this.connectorSDK.receiver.registerCallback(\n this.#enrichWithActionConfig(callback),\n );\n }\n\n protected get connectorSDK(): ConnectorSDKInterface<T> {\n return this.#connectorSDK;\n }\n\n #enrichWithActionConfig(\n callbackFunction: (\n message: XodJobType,\n action: ActionInterface,\n ) => Promise<KafkaCallbackResponse>,\n ): (message: XodJobType) => Promise<KafkaCallbackResponse> {\n return async (message: XodJobType) => {\n const action = await this.#connectorSDK.receiver.getActionConfig(message);\n if (!action) {\n return this.#connectorSDK.receiver.responses.badRequest(\n 'Action not found',\n )(message);\n }\n return callbackFunction(message, action);\n };\n }\n}\n", "import { ConnectorRuntimeSDK } from '@transai/connector-runtime-sdk';\nimport {\n ActionInterface,\n BaseConnectorConfig,\n KafkaCallbackResponse,\n XodJobType,\n} from '@xip-online-data/types';\n\nexport class ConnectorRunnerDummyNode extends ConnectorRuntimeSDK<\n {\n failProbability?: number;\n } & BaseConnectorConfig\n> {\n readonly CONNECTOR_INSTANCE: string = 'XOD_CONNECTOR_DUMMY_NODE_CONFIG';\n\n override init = async (): Promise<void> => {\n const { config } = this.connectorSDK;\n\n const failProbability = config.failProbability || 0.0;\n if (failProbability > 0) {\n this.connectorSDK.logger.debug(\n 'Fail probability set to',\n failProbability,\n );\n }\n\n const dummyProcessFailed = (): boolean => {\n return Math.random() < failProbability;\n };\n\n this.callbackFunction = async (\n message: XodJobType,\n action: ActionInterface,\n ): Promise<KafkaCallbackResponse> => {\n this.connectorSDK.logger.info(\n 'Received message: ',\n message.testRun ? '(test run)' : '',\n message.eventId,\n message.payload,\n );\n\n if (dummyProcessFailed()) {\n this.connectorSDK.logger.error('Dummy process failed');\n return this.connectorSDK.receiver.responses.internalServerError(\n 'Dummy process failed',\n )(message);\n }\n\n return this.connectorSDK.receiver.responses.ok()(message);\n };\n };\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAa,eAiBb,IAAeC,EAAf,KAEgC,CAKrC,YACEC,EACAC,EACA,CAPF,KAASC,GAAe,oBA2DxB,KAAO,KAA4B,IAAM,QAAQ,QAAQ,EAEzD,KAAO,MAA6B,IAAM,QAAQ,QAAQ,EAE1D,KAAO,KAA4B,IAAM,QAAQ,QAAQ,EAvDvD,KAAKC,GAAgBF,EAEjBH,EAAQ,GACVA,EAAQ,GAAG,UAAYM,GAAwB,CACzCA,EAAQ,MAAQ,KAAKF,IACvBD,EAAa,OAAO,QAClB,GAAGH,EAAQ,GAAG,yCACdM,CACF,CAEJ,CAAC,EAEDH,EAAa,OAAO,KAClB,wDACF,EAGGH,EAAQ,MAEXG,EAAa,OAAO,KAClB,0DACF,EAIFD,EAAU,SAAS,QAASK,GAA4B,CACtD,GAAIA,EAAO,OAAO,YAAiB,OACjC,OAGF,IAAMC,EAEF,CAAC,EAEL,OAAO,QAAQD,EAAO,OAAO,SAAY,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CACnE,GAAI,CAEFF,EAAWC,CAAG,EAAIN,EAAa,WAAW,QAAQO,CAAK,CACzD,OAASC,EAAgB,CACvBR,EAAa,OAAO,MAClB,4BAA4BM,CAAG,eAAeF,EAAO,UAAU,GAC/DI,CACF,CACF,CACF,CAAC,EAGDJ,EAAO,OAAO,gBAAqBC,CACrC,CAAC,CACH,CAzDSJ,GAEAC,GA+DT,IAAI,iBACFO,EAIA,CACA,KAAK,aAAa,SAAS,iBACzB,KAAKC,GAAwBD,CAAQ,CACvC,CACF,CAEA,IAAc,cAAyC,CACrD,OAAO,KAAKP,EACd,CAEAQ,GACEC,EAIyD,CACzD,MAAO,OAAOR,GAAwB,CACpC,IAAMC,EAAS,MAAM,KAAKF,GAAc,SAAS,gBAAgBC,CAAO,EACxE,OAAKC,EAKEO,EAAiBR,EAASC,CAAM,EAJ9B,KAAKF,GAAc,SAAS,UAAU,WAC3C,kBACF,EAAEC,CAAO,CAGb,CACF,CACF,EC5GO,IAAMS,EAAN,cAAuCC,CAI5C,CAJK,kCAKL,KAAS,mBAA6B,kCAEtC,KAAS,KAAO,SAA2B,CACzC,GAAM,CAAE,OAAAC,CAAO,EAAI,KAAK,aAElBC,EAAkBD,EAAO,iBAAmB,EAC9CC,EAAkB,GACpB,KAAK,aAAa,OAAO,MACvB,0BACAA,CACF,EAGF,IAAMC,EAAqB,IAClB,KAAK,OAAO,EAAID,EAGzB,KAAK,iBAAmB,MACtBE,EACAC,KAEA,KAAK,aAAa,OAAO,KACvB,qBACAD,EAAQ,QAAU,aAAe,GACjCA,EAAQ,QACRA,EAAQ,OACV,EAEID,EAAmB,GACrB,KAAK,aAAa,OAAO,MAAM,sBAAsB,EAC9C,KAAK,aAAa,SAAS,UAAU,oBAC1C,sBACF,EAAEC,CAAO,GAGJ,KAAK,aAAa,SAAS,UAAU,GAAG,EAAEA,CAAO,EAE5D,EACF",
|
|
6
|
-
"names": ["process", "ConnectorRuntimeSDK", "connector", "connectorSDK", "#IPC_CHANNEL", "#connectorSDK", "message", "action", "containers", "key", "value", "error", "callback", "#enrichWithActionConfig", "callbackFunction", "ConnectorRunnerDummyNode", "ConnectorRuntimeSDK", "config", "failProbability", "dummyProcessFailed", "message", "action"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './lib/types';
|
|
2
|
-
export * from './lib/response.types';
|
|
3
|
-
export * from './lib/message.types';
|
|
4
|
-
export * from './lib/cube-query-config.types';
|
|
5
|
-
export * from './lib/file-action.types';
|
|
6
|
-
export * from './lib/management-api';
|
|
7
|
-
export * from './lib/http-status-codes.enum';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Query } from '@cubejs-client/core';
|
|
2
|
-
export interface CubeQueryConfig {
|
|
3
|
-
tenantId: string;
|
|
4
|
-
query: Query;
|
|
5
|
-
nullable?: boolean;
|
|
6
|
-
subqueries: Array<CubeSubQueryConfig>;
|
|
7
|
-
}
|
|
8
|
-
export interface CubeSubQueryConfig {
|
|
9
|
-
tenantId?: string;
|
|
10
|
-
query: Query;
|
|
11
|
-
nullable?: boolean;
|
|
12
|
-
field: string;
|
|
13
|
-
joinConditions: Array<CubeJoinCondition>;
|
|
14
|
-
}
|
|
15
|
-
export interface CubeJoinCondition {
|
|
16
|
-
selectField: string;
|
|
17
|
-
operator: string;
|
|
18
|
-
valueField: Array<string>;
|
|
19
|
-
valueMap?: Array<any>;
|
|
20
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export declare enum HttpStatusCode {
|
|
2
|
-
Continue = 100,
|
|
3
|
-
SwitchingProtocols = 101,
|
|
4
|
-
Processing = 102,
|
|
5
|
-
OK = 200,
|
|
6
|
-
Created = 201,
|
|
7
|
-
Accepted = 202,
|
|
8
|
-
NonAuthoritativeInformation = 203,
|
|
9
|
-
NoContent = 204,
|
|
10
|
-
ResetContent = 205,
|
|
11
|
-
PartialContent = 206,
|
|
12
|
-
MultiStatus = 207,
|
|
13
|
-
AlreadyReported = 208,
|
|
14
|
-
IMUsed = 226,
|
|
15
|
-
MultipleChoices = 300,
|
|
16
|
-
MovedPermanently = 301,
|
|
17
|
-
Found = 302,
|
|
18
|
-
SeeOther = 303,
|
|
19
|
-
NotModified = 304,
|
|
20
|
-
UseProxy = 305,
|
|
21
|
-
TemporaryRedirect = 307,
|
|
22
|
-
PermanentRedirect = 308,
|
|
23
|
-
BadRequest = 400,
|
|
24
|
-
Unauthorized = 401,
|
|
25
|
-
PaymentRequired = 402,
|
|
26
|
-
Forbidden = 403,
|
|
27
|
-
NotFound = 404,
|
|
28
|
-
MethodNotAllowed = 405,
|
|
29
|
-
NotAcceptable = 406,
|
|
30
|
-
ProxyAuthenticationRequired = 407,
|
|
31
|
-
RequestTimeout = 408,
|
|
32
|
-
Conflict = 409,
|
|
33
|
-
Gone = 410,
|
|
34
|
-
LengthRequired = 411,
|
|
35
|
-
PreconditionFailed = 412,
|
|
36
|
-
PayloadTooLarge = 413,
|
|
37
|
-
URITooLong = 414,
|
|
38
|
-
UnsupportedMediaType = 415,
|
|
39
|
-
RangeNotSatisfiable = 416,
|
|
40
|
-
ExpectationFailed = 417,
|
|
41
|
-
ImATeapot = 418,
|
|
42
|
-
MisdirectedRequest = 421,
|
|
43
|
-
UnprocessableEntity = 422,
|
|
44
|
-
Locked = 423,
|
|
45
|
-
FailedDependency = 424,
|
|
46
|
-
TooEarly = 425,
|
|
47
|
-
UpgradeRequired = 426,
|
|
48
|
-
PreconditionRequired = 428,
|
|
49
|
-
TooManyRequests = 429,
|
|
50
|
-
RequestHeaderFieldsTooLarge = 431,
|
|
51
|
-
UnavailableForLegalReasons = 451,
|
|
52
|
-
InternalServerError = 500,
|
|
53
|
-
NotImplemented = 501,
|
|
54
|
-
BadGateway = 502,
|
|
55
|
-
ServiceUnavailable = 503,
|
|
56
|
-
GatewayTimeout = 504,
|
|
57
|
-
HTTPVersionNotSupported = 505,
|
|
58
|
-
VariantAlsoNegotiates = 506,
|
|
59
|
-
InsufficientStorage = 507,
|
|
60
|
-
LoopDetected = 508,
|
|
61
|
-
NotExtended = 510,
|
|
62
|
-
NetworkAuthenticationRequired = 511,
|
|
63
|
-
Aborted = 512
|
|
64
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TenantInterface } from './tenant.interface';
|
|
2
|
-
import { CubeQueryConfig } from '../cube-query-config.types';
|
|
3
|
-
export interface ActionDefinitionInterface {
|
|
4
|
-
tenant: TenantInterface;
|
|
5
|
-
eventType: string;
|
|
6
|
-
eventTopic: string;
|
|
7
|
-
destinationTopic: string;
|
|
8
|
-
actionIdentifier: string;
|
|
9
|
-
template: string;
|
|
10
|
-
fileNameTemplate: string | undefined;
|
|
11
|
-
queryConfig: CubeQueryConfig | undefined;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export interface AuthorInterface {
|
|
3
|
-
name: string;
|
|
4
|
-
email?: string;
|
|
5
|
-
website?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const AuthorSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
8
|
-
name: z.ZodString;
|
|
9
|
-
email: z.ZodOptional<z.ZodEmail>;
|
|
10
|
-
website: z.ZodOptional<z.ZodURL>;
|
|
11
|
-
}, z.core.$strip>]>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { BaseConnectorConfig, ConfiguredConnectorTypes } from '../../types';
|
|
3
|
-
import { ConnectorOrigin } from '../type-enums';
|
|
4
|
-
import { ActionInterface } from '../workflow';
|
|
5
|
-
export declare const ConnectorSchema: z.ZodObject<{
|
|
6
|
-
identifier: z.ZodString;
|
|
7
|
-
connectorType: z.ZodEnum<typeof ConfiguredConnectorTypes>;
|
|
8
|
-
name: z.ZodString;
|
|
9
|
-
location: z.ZodString;
|
|
10
|
-
config: z.ZodObject<{}, z.core.$loose>;
|
|
11
|
-
enabled: z.ZodBoolean;
|
|
12
|
-
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
-
identifier: z.ZodString;
|
|
14
|
-
version: z.ZodString;
|
|
15
|
-
name: z.ZodString;
|
|
16
|
-
description: z.ZodOptional<z.ZodString>;
|
|
17
|
-
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
18
|
-
inputParameters: z.ZodArray<z.ZodObject<{
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
description: z.ZodOptional<z.ZodString>;
|
|
21
|
-
type: z.ZodEnum<{
|
|
22
|
-
string: "string";
|
|
23
|
-
number: "number";
|
|
24
|
-
boolean: "boolean";
|
|
25
|
-
array: "array";
|
|
26
|
-
}>;
|
|
27
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
-
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
31
|
-
mode: z.ZodOptional<z.ZodEnum<typeof ConnectorOrigin>>;
|
|
32
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
33
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
34
|
-
}, z.core.$strip>>>;
|
|
35
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
36
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
export interface ConnectorInterface<T = Partial<BaseConnectorConfig>> {
|
|
39
|
-
identifier: string;
|
|
40
|
-
connectorType: ConfiguredConnectorTypes;
|
|
41
|
-
tenantIdentifier: string;
|
|
42
|
-
name: string;
|
|
43
|
-
location: string;
|
|
44
|
-
config?: T;
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
actions?: Array<ActionInterface>;
|
|
47
|
-
mode?: ConnectorOrigin;
|
|
48
|
-
createdAt?: Date;
|
|
49
|
-
updatedAt?: Date;
|
|
50
|
-
}
|
|
51
|
-
export type CreateConnectorInterface<T = Partial<BaseConnectorConfig>> = Omit<ConnectorInterface<T>, 'id' | 'createdAt' | 'updatedAt' | 'mode'>;
|
|
52
|
-
export type UpdateConnectorInterface<T = Partial<BaseConnectorConfig>> = Partial<Omit<ConnectorInterface<T>, 'id' | 'tenantIdentifier' | 'identifier' | 'createdAt' | 'mode'>>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ConnectorInterface } from '../index';
|
|
3
|
-
export declare const ConnectorsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
4
|
-
identifier: z.ZodString;
|
|
5
|
-
connectorType: z.ZodEnum<typeof import("../../types").ConfiguredConnectorTypes>;
|
|
6
|
-
name: z.ZodString;
|
|
7
|
-
location: z.ZodString;
|
|
8
|
-
config: z.ZodObject<{}, z.core.$loose>;
|
|
9
|
-
enabled: z.ZodBoolean;
|
|
10
|
-
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
-
identifier: z.ZodString;
|
|
12
|
-
version: z.ZodString;
|
|
13
|
-
name: z.ZodString;
|
|
14
|
-
description: z.ZodOptional<z.ZodString>;
|
|
15
|
-
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
16
|
-
inputParameters: z.ZodArray<z.ZodObject<{
|
|
17
|
-
name: z.ZodString;
|
|
18
|
-
description: z.ZodOptional<z.ZodString>;
|
|
19
|
-
type: z.ZodEnum<{
|
|
20
|
-
string: "string";
|
|
21
|
-
number: "number";
|
|
22
|
-
boolean: "boolean";
|
|
23
|
-
array: "array";
|
|
24
|
-
}>;
|
|
25
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
-
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
27
|
-
}, z.core.$strip>>;
|
|
28
|
-
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
29
|
-
mode: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").ConnectorOrigin>>;
|
|
30
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
31
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
32
|
-
}, z.core.$strip>>>;
|
|
33
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
34
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
35
|
-
}, z.core.$strip>, z.ZodBoolean]>>;
|
|
36
|
-
export interface ConnectorsInterface {
|
|
37
|
-
[key: string]: ConnectorInterface | boolean;
|
|
38
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ConnectorInterface } from './connector/connector.interface';
|
|
2
|
-
export interface ConnectorOrchestratorConfigInterface {
|
|
3
|
-
awsAccessKeyId?: string;
|
|
4
|
-
awsSecretAccessKey?: string;
|
|
5
|
-
awsRegion?: string;
|
|
6
|
-
datadogApiKey?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ConnectorOrchestratorConfigWithKafkaInterface extends ConnectorOrchestratorConfigInterface {
|
|
9
|
-
kafkaBrokers?: Array<string>;
|
|
10
|
-
}
|
|
11
|
-
export interface ConnectorOrchestratorFullConfigurationInterface {
|
|
12
|
-
config: ConnectorOrchestratorConfigWithKafkaInterface;
|
|
13
|
-
connectors: Array<ConnectorInterface>;
|
|
14
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { MetaInterface } from './dataset/meta.interface';
|
|
2
|
-
export interface CubePreAggregationInterface {
|
|
3
|
-
type?: 'rollup' | 'original_sql' | 'rollup_join';
|
|
4
|
-
measures?: Array<string>;
|
|
5
|
-
dimensions?: Array<string>;
|
|
6
|
-
segments?: Array<string>;
|
|
7
|
-
timeDimension?: string;
|
|
8
|
-
granularity?: string;
|
|
9
|
-
rollups?: Array<string>;
|
|
10
|
-
refreshKeySql?: string;
|
|
11
|
-
refreshKeyEvery?: string;
|
|
12
|
-
refreshKeyIncremental?: boolean;
|
|
13
|
-
refreshKeyUpdateWindow?: string;
|
|
14
|
-
lambdaAggregation?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface CubePreAggregationsInterface {
|
|
17
|
-
[key: string]: CubePreAggregationInterface;
|
|
18
|
-
}
|
|
19
|
-
export interface CubeDatasetInterface {
|
|
20
|
-
id: string;
|
|
21
|
-
dataSource: string;
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
tenantId: string;
|
|
25
|
-
parentId?: string;
|
|
26
|
-
sql?: string;
|
|
27
|
-
refreshSql?: string;
|
|
28
|
-
meta?: MetaInterface;
|
|
29
|
-
dimensions: CubeDimensionsInterface;
|
|
30
|
-
segments?: CubeSegmentsInterface;
|
|
31
|
-
relations?: CubeRelationsInterface;
|
|
32
|
-
measures?: CubeMeasuresInterface;
|
|
33
|
-
preAggregations?: CubePreAggregationsInterface;
|
|
34
|
-
}
|
|
35
|
-
export interface CubeDimensionsInterface {
|
|
36
|
-
[key: string]: CubeDimensionInterface;
|
|
37
|
-
}
|
|
38
|
-
export interface CubeDimensionInterface {
|
|
39
|
-
title: string;
|
|
40
|
-
description: string;
|
|
41
|
-
index?: boolean;
|
|
42
|
-
upperIndex?: boolean;
|
|
43
|
-
type: string;
|
|
44
|
-
format?: string;
|
|
45
|
-
primaryKey?: boolean;
|
|
46
|
-
public?: boolean;
|
|
47
|
-
subQuery?: boolean;
|
|
48
|
-
sql?: string;
|
|
49
|
-
case?: CubeDimensionCaseInterface;
|
|
50
|
-
meta?: MetaInterface;
|
|
51
|
-
granularities?: {
|
|
52
|
-
[key: string]: {
|
|
53
|
-
interval: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export interface CubeDimensionCaseInterface {
|
|
58
|
-
when: Array<CubeDimensionCaseWhenInterface>;
|
|
59
|
-
else: {
|
|
60
|
-
label: string;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export interface CubeDimensionCaseWhenInterface {
|
|
64
|
-
label: string;
|
|
65
|
-
sql: string;
|
|
66
|
-
}
|
|
67
|
-
export interface CubeRelationsInterface {
|
|
68
|
-
[key: string]: CubeRelationInterface;
|
|
69
|
-
}
|
|
70
|
-
export interface CubeRelationInterface {
|
|
71
|
-
relationship: string;
|
|
72
|
-
sql: string;
|
|
73
|
-
}
|
|
74
|
-
export interface CubeSegmentsInterface {
|
|
75
|
-
[key: string]: CubeSegmentInterface;
|
|
76
|
-
}
|
|
77
|
-
export interface CubeSegmentInterface {
|
|
78
|
-
public: boolean;
|
|
79
|
-
sql: string;
|
|
80
|
-
title?: string;
|
|
81
|
-
description?: string;
|
|
82
|
-
}
|
|
83
|
-
export interface CubeMeasuresInterface {
|
|
84
|
-
[key: string]: CubeMeasureInterface;
|
|
85
|
-
}
|
|
86
|
-
export interface CubeMeasureInterface {
|
|
87
|
-
title: string;
|
|
88
|
-
description?: string;
|
|
89
|
-
public?: boolean;
|
|
90
|
-
type: string;
|
|
91
|
-
format?: string;
|
|
92
|
-
sql: string;
|
|
93
|
-
meta?: MetaInterface;
|
|
94
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type DashboardPositionValue = string | number | boolean | null | Record<string, unknown> | Array<unknown>;
|
|
2
|
-
export interface DashboardPositionJson {
|
|
3
|
-
[key: string]: DashboardPositionValue;
|
|
4
|
-
}
|
|
5
|
-
export interface CreateDashboardInterface {
|
|
6
|
-
id: number;
|
|
7
|
-
title: string | null;
|
|
8
|
-
slug: string | null;
|
|
9
|
-
description: string | null;
|
|
10
|
-
positionJson: DashboardPositionJson | null;
|
|
11
|
-
isPublished: boolean;
|
|
12
|
-
tenantIdentifier: string;
|
|
13
|
-
charts: Array<number>;
|
|
14
|
-
roles: Array<string>;
|
|
15
|
-
supersetId: number | null;
|
|
16
|
-
}
|
|
17
|
-
export interface UpdateDashboardInterface {
|
|
18
|
-
title: string | null;
|
|
19
|
-
slug: string | null;
|
|
20
|
-
description: string | null;
|
|
21
|
-
positionJson: DashboardPositionJson | null;
|
|
22
|
-
isPublished: boolean;
|
|
23
|
-
roles: Array<string>;
|
|
24
|
-
charts: Array<number>;
|
|
25
|
-
supersetId: number | null;
|
|
26
|
-
}
|
|
27
|
-
export interface DashboardInterface extends CreateDashboardInterface {
|
|
28
|
-
createdAt: Date;
|
|
29
|
-
updatedAt: Date;
|
|
30
|
-
}
|
|
31
|
-
export interface DashboardExportInterface {
|
|
32
|
-
exportData: DashboardInterface;
|
|
33
|
-
exportType: string;
|
|
34
|
-
exportedAt: string;
|
|
35
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { FiltersInterface } from './filters.interface';
|
|
3
|
-
export declare const CollectionSchema: z.ZodObject<{
|
|
4
|
-
collection: z.ZodString;
|
|
5
|
-
filters: z.ZodOptional<z.ZodType<FiltersInterface, unknown, z.core.$ZodTypeInternals<FiltersInterface, unknown>>>;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export interface CollectionInterface {
|
|
8
|
-
collection: string;
|
|
9
|
-
filters?: FiltersInterface;
|
|
10
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { DatasetStatusEnum, DatasetTypeEnum } from '../type-enums';
|
|
2
|
-
import { DatasetInterface } from './dataset.interface';
|
|
3
|
-
import { MetaInterface } from './meta.interface';
|
|
4
|
-
export interface DatasetRecordInterface extends DatasetInterface {
|
|
5
|
-
id: string;
|
|
6
|
-
tenantId: string;
|
|
7
|
-
}
|
|
8
|
-
export interface DatasetRecordFiltersInterface {
|
|
9
|
-
name: string;
|
|
10
|
-
status: DatasetStatusEnum;
|
|
11
|
-
type: DatasetTypeEnum;
|
|
12
|
-
integration: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ShallowDatasetRecordInterface {
|
|
15
|
-
id: string;
|
|
16
|
-
key: string;
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
status: DatasetStatusEnum;
|
|
20
|
-
type: DatasetTypeEnum;
|
|
21
|
-
prefix: string;
|
|
22
|
-
createdat: Date;
|
|
23
|
-
updatedat: Date;
|
|
24
|
-
meta?: MetaInterface;
|
|
25
|
-
templateimplementationname?: string;
|
|
26
|
-
templateimplementationdescription?: string;
|
|
27
|
-
templateimplementationtemplateversion?: string;
|
|
28
|
-
integration?: string;
|
|
29
|
-
templatename?: string;
|
|
30
|
-
templatedescription?: string;
|
|
31
|
-
templateversion?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface DetailedDatasetRecordInterface extends Omit<DatasetRecordInterface, 'tenantId'> {
|
|
34
|
-
templateimplementationname?: string;
|
|
35
|
-
templateimplementationdescription?: string;
|
|
36
|
-
templateimplementationtemplateversion?: string;
|
|
37
|
-
integration?: string;
|
|
38
|
-
templatename?: string;
|
|
39
|
-
templatedescription?: string;
|
|
40
|
-
templateversion?: string;
|
|
41
|
-
}
|