@transai/connector-runner-dummy-node 0.1.2 → 0.2.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/.eslintrc.json +30 -0
- package/CHANGELOG.md +4 -0
- package/jest.config.ts +10 -0
- package/package.json +1 -1
- package/project.json +41 -0
- package/src/lib/connector-runner-dummy-node.ts +52 -0
- package/tsconfig.json +22 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/index.cjs +0 -2
- package/index.cjs.map +0 -7
- package/index.js +0 -2
- package/index.js.map +0 -7
- package/libs/connector-runner-dummy-node/src/lib/connector-runner-dummy-node.d.ts +0 -8
- package/libs/connector-runtime-sdk/src/index.d.ts +0 -3
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +0 -16
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +0 -5
- package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +0 -7
- package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +0 -7
- package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +0 -11
- package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +0 -12
- package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +0 -14
- package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +0 -16
- package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +0 -22
- package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +0 -12
- 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 -63
- package/libs/types/src/lib/management-api/action-definition.interface.d.ts +0 -12
- 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 -140
- package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +0 -126
- 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 -93
- 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 -16
- package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +0 -5
- package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +0 -730
- package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +0 -710
- package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +0 -205
- package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +0 -186
- 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 -34
- 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 -65
- package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +0 -56
- 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 -69
- package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +0 -54
- package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +0 -40
- package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +0 -36
- package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +0 -45
- package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +0 -43
- package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +0 -70
- package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +0 -41
- package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +0 -40
- package/libs/types/src/lib/management-api/event-origin.interface.d.ts +0 -22
- package/libs/types/src/lib/management-api/index.d.ts +0 -39
- package/libs/types/src/lib/management-api/pagination/index.d.ts +0 -1
- package/libs/types/src/lib/management-api/pagination/paginated-response.interface.d.ts +0 -17
- package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +0 -5
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +0 -20
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +0 -18
- 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 -74
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +0 -62
- package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +0 -1152
- package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +0 -2860
- package/libs/types/src/lib/management-api/template.interface.d.ts +0 -1191
- 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 -85
- package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +0 -85
- package/libs/types/src/lib/management-api/workflow/index.d.ts +0 -6
- package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +0 -16
- package/libs/types/src/lib/management-api/workflow/trigger-types.interface.d.ts +0 -5
- package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +0 -49
- package/libs/types/src/lib/management-api/workflow/workflow-run.d.ts +0 -65
- package/libs/types/src/lib/management-api/workflow/workflow.drawing.d.ts +0 -101
- 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 -113
- /package/{libs/connector-runner-dummy-node/src/index.d.ts → src/index.ts} +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
+
"rules": {}
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"files": ["*.ts", "*.tsx"],
|
|
11
|
+
"rules": {}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"files": ["*.js", "*.jsx"],
|
|
15
|
+
"rules": {}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"files": ["*.json"],
|
|
19
|
+
"parser": "jsonc-eslint-parser",
|
|
20
|
+
"rules": {
|
|
21
|
+
"@nx/dependency-checks": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
"ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
package/CHANGELOG.md
CHANGED
package/jest.config.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
displayName: 'connector-runner-dummy-node',
|
|
3
|
+
preset: '../../jest.preset.js',
|
|
4
|
+
testEnvironment: 'node',
|
|
5
|
+
transform: {
|
|
6
|
+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
7
|
+
},
|
|
8
|
+
moduleFileExtensions: ['ts', 'js', 'html'],
|
|
9
|
+
coverageDirectory: '../../coverage/libs/connector-runner-dummy-node',
|
|
10
|
+
};
|
package/package.json
CHANGED
package/project.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "connector-runner-dummy-node",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "libs/connector-runner-dummy-node/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"tags": [
|
|
7
|
+
"connector:runner",
|
|
8
|
+
"connector:dummy",
|
|
9
|
+
"connector:node",
|
|
10
|
+
"provider:@transai"
|
|
11
|
+
],
|
|
12
|
+
"targets": {
|
|
13
|
+
"build": {
|
|
14
|
+
"executor": "@transai/tools:connector",
|
|
15
|
+
"outputs": ["{options.outputPath}"]
|
|
16
|
+
},
|
|
17
|
+
"lint": {
|
|
18
|
+
"executor": "@nx/eslint:lint"
|
|
19
|
+
},
|
|
20
|
+
"test": {
|
|
21
|
+
"executor": "@nx/jest:jest",
|
|
22
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
23
|
+
"options": {
|
|
24
|
+
"jestConfig": "libs/connector-runner-dummy-node/jest.config.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"version": {
|
|
28
|
+
"executor": "@jscutlery/semver:version",
|
|
29
|
+
"options": {
|
|
30
|
+
"postTargets": ["build", "deploy"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"deploy": {
|
|
34
|
+
"executor": "ngx-deploy-npm:deploy",
|
|
35
|
+
"dependsOn": ["build"],
|
|
36
|
+
"options": {
|
|
37
|
+
"distFolderPath": "dist/connectors/connector-runner-dummy-node"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ConnectorRuntimeSDK } from '@transai/connector-runtime-sdk';
|
|
2
|
+
import {
|
|
3
|
+
ActionInterface,
|
|
4
|
+
BaseConnectorConfig,
|
|
5
|
+
KafkaCallbackResponse,
|
|
6
|
+
XodJobType,
|
|
7
|
+
} from '@xip-online-data/types';
|
|
8
|
+
|
|
9
|
+
export class ConnectorRunnerDummyNode extends ConnectorRuntimeSDK<
|
|
10
|
+
{
|
|
11
|
+
failProbability?: number;
|
|
12
|
+
} & BaseConnectorConfig
|
|
13
|
+
> {
|
|
14
|
+
readonly CONNECTOR_INSTANCE: string = 'XOD_CONNECTOR_DUMMY_NODE_CONFIG';
|
|
15
|
+
|
|
16
|
+
override init = async (): Promise<void> => {
|
|
17
|
+
const { config } = this.connectorSDK;
|
|
18
|
+
|
|
19
|
+
const failProbability = config.failProbability || 0.0;
|
|
20
|
+
if (failProbability > 0) {
|
|
21
|
+
this.connectorSDK.logger.debug(
|
|
22
|
+
'Fail probability set to',
|
|
23
|
+
failProbability,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const dummyProcessFailed = (): boolean => {
|
|
28
|
+
return Math.random() < failProbability;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
this.callbackFunction = async (
|
|
32
|
+
message: XodJobType,
|
|
33
|
+
action: ActionInterface,
|
|
34
|
+
): Promise<KafkaCallbackResponse> => {
|
|
35
|
+
this.connectorSDK.logger.info(
|
|
36
|
+
'Received message: ',
|
|
37
|
+
message.testRun ? '(test run)' : '',
|
|
38
|
+
message.eventId,
|
|
39
|
+
message.payload,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (dummyProcessFailed()) {
|
|
43
|
+
this.connectorSDK.logger.error('Dummy process failed');
|
|
44
|
+
return this.connectorSDK.receiver.responses.internalServerError(
|
|
45
|
+
'Dummy process failed',
|
|
46
|
+
)(message);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return this.connectorSDK.receiver.responses.ok()(message);
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"forceConsistentCasingInFileNames": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitOverride": true,
|
|
8
|
+
"noImplicitReturns": true,
|
|
9
|
+
"noFallthroughCasesInSwitch": true,
|
|
10
|
+
"noPropertyAccessFromIndexSignature": true
|
|
11
|
+
},
|
|
12
|
+
"files": [],
|
|
13
|
+
"include": [],
|
|
14
|
+
"references": [
|
|
15
|
+
{
|
|
16
|
+
"path": "./tsconfig.lib.json"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"path": "./tsconfig.spec.json"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"types": ["jest", "node"]
|
|
7
|
+
},
|
|
8
|
+
"include": [
|
|
9
|
+
"jest.config.ts",
|
|
10
|
+
"src/**/*.test.ts",
|
|
11
|
+
"src/**/*.spec.ts",
|
|
12
|
+
"src/**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
package/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var d=Object.create;var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var I=(n,o)=>{for(var e in o)c(n,e,{get:o[e],enumerable:!0})},p=(n,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of C(o))!u.call(n,t)&&t!==e&&c(n,t,{get:()=>o[t],enumerable:!(r=g(o,t))||r.enumerable});return n};var h=(n,o,e)=>(e=n!=null?d(b(n)):{},p(o||!n||!n.__esModule?c(e,"default",{value:n,enumerable:!0}):e,n)),y=n=>p(c({},"__esModule",{value:!0}),n);var v={};I(v,{ConnectorRunnerDummyNode:()=>f});module.exports=y(v);var s=h(require("node:process")),a=class{constructor(o,e){this.#o="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#e=e,s.on?s.on("message",r=>{r.cmd===this.#o&&e.logger.verbose(`${s.pid} Received message from parent process:`,r)}):e.logger.warn("IPC channel is not available. process.on is undefined."),s.send||e.logger.warn("IPC channel is not available. process.send is undefined."),o.actions?.forEach(r=>{if(r.config.templates===void 0)return;let t={};Object.entries(r.config.templates).forEach(([i,l])=>{try{t[i]=e.templating.compile(l)}catch(m){e.logger.error(`Error compiling template ${i} for action ${r.identifier}`,m)}}),r.config.parsedTemplates=t})}#o;#e;set callbackFunction(o){this.connectorSDK.receiver.registerCallback(this.#r(o))}get connectorSDK(){return this.#e}#r(o){return async e=>{let r=this.#e.receiver.getActionConfig(e);return r?o(e,r):this.#e.receiver.responses.badRequest("Action not found")(e)}}};var f=class extends a{constructor(){super(...arguments);this.CONNECTOR_INSTANCE="XOD_CONNECTOR_DUMMY_NODE_CONFIG";this.init=async()=>{let{config:e}=this.connectorSDK,r=e.failProbability||0;r>0&&this.connectorSDK.logger.debug("Fail probability set to",r);let t=()=>Math.random()<r;this.callbackFunction=async(i,l)=>(this.connectorSDK.logger.info("Received message: ",i.testRun?"(test run)":"",i.eventId,i.payload),t()?(this.connectorSDK.logger.error("Dummy process failed"),this.connectorSDK.receiver.responses.internalServerError("Dummy process failed")(i)):this.connectorSDK.receiver.responses.ok()(i))}}};0&&(module.exports={ConnectorRunnerDummyNode});
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/index.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 * as process from 'node:process';\n\nimport {\n KafkaCallbackResponse,\n BaseConnectorConfig,\n ActionInterface,\n ConnectorInterface,\n XodJobType,\n} from '@xip-online-data/types';\n\nimport { ConnectorRuntimeInterface } from './connector-runtime.interface';\nimport { CompileDelegate, ConnectorSDKInterface } from './sdk';\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{\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 = 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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAyB,2BAkBHC,EAAf,KAGP,CAKE,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,EAET,KACF,KAAG,UAAYG,GAAwB,CACzCA,EAAQ,MAAQ,KAAKF,IACvBD,EAAa,OAAO,QAClB,GAAW,KAAG,yCACdG,CACF,CAEJ,CAAC,EAEDH,EAAa,OAAO,KAClB,wDACF,EAGW,QAEXA,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,KAAKF,GAAc,SAAS,gBAAgBC,CAAO,EAClE,OAAKC,EAKEO,EAAiBR,EAASC,CAAM,EAJ9B,KAAKF,GAAc,SAAS,UAAU,WAC3C,kBACF,EAAEC,CAAO,CAGb,CACF,CACF,EC9GO,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": ["src_exports", "__export", "ConnectorRunnerDummyNode", "__toCommonJS", "process", "ConnectorRuntimeSDK", "connector", "connectorSDK", "#IPC_CHANNEL", "#connectorSDK", "message", "action", "containers", "key", "value", "error", "callback", "#enrichWithActionConfig", "callbackFunction", "ConnectorRunnerDummyNode", "ConnectorRuntimeSDK", "config", "failProbability", "dummyProcessFailed", "message", "action"]
|
|
7
|
-
}
|
package/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import*as n from"node:process";var s=class{constructor(t,o){this.#o="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#e=o,n.on?n.on("message",e=>{e.cmd===this.#o&&o.logger.verbose(`${n.pid} Received message from parent process:`,e)}):o.logger.warn("IPC channel is not available. process.on is undefined."),n.send||o.logger.warn("IPC channel is not available. process.send is undefined."),t.actions?.forEach(e=>{if(e.config.templates===void 0)return;let i={};Object.entries(e.config.templates).forEach(([r,c])=>{try{i[r]=o.templating.compile(c)}catch(l){o.logger.error(`Error compiling template ${r} for action ${e.identifier}`,l)}}),e.config.parsedTemplates=i})}#o;#e;set callbackFunction(t){this.connectorSDK.receiver.registerCallback(this.#r(t))}get connectorSDK(){return this.#e}#r(t){return async o=>{let e=this.#e.receiver.getActionConfig(o);return e?t(o,e):this.#e.receiver.responses.badRequest("Action not found")(o)}}};var a=class extends s{constructor(){super(...arguments);this.CONNECTOR_INSTANCE="XOD_CONNECTOR_DUMMY_NODE_CONFIG";this.init=async()=>{let{config:o}=this.connectorSDK,e=o.failProbability||0;e>0&&this.connectorSDK.logger.debug("Fail probability set to",e);let i=()=>Math.random()<e;this.callbackFunction=async(r,c)=>(this.connectorSDK.logger.info("Received message: ",r.testRun?"(test run)":"",r.eventId,r.payload),i()?(this.connectorSDK.logger.error("Dummy process failed"),this.connectorSDK.receiver.responses.internalServerError("Dummy process failed")(r)):this.connectorSDK.receiver.responses.ok()(r))}}};export{a 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 * as process from 'node:process';\n\nimport {\n KafkaCallbackResponse,\n BaseConnectorConfig,\n ActionInterface,\n ConnectorInterface,\n XodJobType,\n} from '@xip-online-data/types';\n\nimport { ConnectorRuntimeInterface } from './connector-runtime.interface';\nimport { CompileDelegate, ConnectorSDKInterface } from './sdk';\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{\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 = 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,UAAYA,MAAa,eAkBlB,IAAeC,EAAf,KAGP,CAKE,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,EAET,KACF,KAAG,UAAYG,GAAwB,CACzCA,EAAQ,MAAQ,KAAKF,IACvBD,EAAa,OAAO,QAClB,GAAW,KAAG,yCACdG,CACF,CAEJ,CAAC,EAEDH,EAAa,OAAO,KAClB,wDACF,EAGW,QAEXA,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,KAAKF,GAAc,SAAS,gBAAgBC,CAAO,EAClE,OAAKC,EAKEO,EAAiBR,EAASC,CAAM,EAJ9B,KAAKF,GAAc,SAAS,UAAU,WAC3C,kBACF,EAAEC,CAAO,CAGb,CACF,CACF,EC9GO,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,8 +0,0 @@
|
|
|
1
|
-
import { ConnectorRuntimeSDK } from '@transai/connector-runtime-sdk';
|
|
2
|
-
import { BaseConnectorConfig } from '@xip-online-data/types';
|
|
3
|
-
export declare class ConnectorRunnerDummyNode extends ConnectorRuntimeSDK<{
|
|
4
|
-
failProbability?: number;
|
|
5
|
-
} & BaseConnectorConfig> {
|
|
6
|
-
readonly CONNECTOR_INSTANCE: string;
|
|
7
|
-
init: () => Promise<void>;
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { KafkaCallbackResponse, BaseConnectorConfig, ActionInterface, ConnectorInterface, XodJobType } from '@xip-online-data/types';
|
|
2
|
-
import { ConnectorRuntimeInterface } from './connector-runtime.interface';
|
|
3
|
-
import { ConnectorSDKInterface } from './sdk';
|
|
4
|
-
export interface IpcMessage {
|
|
5
|
-
cmd: string;
|
|
6
|
-
message: string;
|
|
7
|
-
}
|
|
8
|
-
export declare abstract class ConnectorRuntimeSDK<T extends BaseConnectorConfig = BaseConnectorConfig> implements ConnectorRuntimeInterface {
|
|
9
|
-
#private;
|
|
10
|
-
constructor(connector: ConnectorInterface, connectorSDK: ConnectorSDKInterface);
|
|
11
|
-
init: () => Promise<void>;
|
|
12
|
-
start: () => Promise<void>;
|
|
13
|
-
stop: () => Promise<void>;
|
|
14
|
-
set callbackFunction(callback: (message: XodJobType, action: ActionInterface) => Promise<KafkaCallbackResponse>);
|
|
15
|
-
protected get connectorSDK(): ConnectorSDKInterface<T>;
|
|
16
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './sdk.interface';
|
|
2
|
-
export * from './logger.sdk.interface';
|
|
3
|
-
export * from './offset-store.sdk.interface';
|
|
4
|
-
export * from './processing.sdk.interface';
|
|
5
|
-
export * from './receiver.sdk.interface';
|
|
6
|
-
export * from './sender.sdk.interface';
|
|
7
|
-
export * from './templating.sdk.interface';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface StoredOffset {
|
|
2
|
-
timestamp: number;
|
|
3
|
-
id: number | string;
|
|
4
|
-
isoDate?: string;
|
|
5
|
-
date?: string;
|
|
6
|
-
rawTimestamp?: number | string;
|
|
7
|
-
}
|
|
8
|
-
export interface OffsetStoreSDKInterface {
|
|
9
|
-
getOffset(identifier: string): Promise<StoredOffset>;
|
|
10
|
-
setOffset(offset: StoredOffset, identifier: string): void;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface IntervalHandler {
|
|
2
|
-
name?: string;
|
|
3
|
-
onRun: () => Promise<void> | void;
|
|
4
|
-
onStop?: () => Promise<void> | void;
|
|
5
|
-
}
|
|
6
|
-
export type RegisterIntervalOptions = {
|
|
7
|
-
immediate?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export interface ProcessingSDKInterface {
|
|
10
|
-
registerInterval(intervalSeconds: number, handler: IntervalHandler, options?: RegisterIntervalOptions): Promise<string>;
|
|
11
|
-
stopInterval(name: string): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ActionInterface, KafkaCallbackResponse, KafkaCallbackResponseType, XodJobType } from '@xip-online-data/types';
|
|
2
|
-
export interface ReceiverSDKInterface {
|
|
3
|
-
readonly responses: {
|
|
4
|
-
readonly ok: KafkaCallbackResponseType;
|
|
5
|
-
readonly created: KafkaCallbackResponseType;
|
|
6
|
-
readonly badRequest: KafkaCallbackResponseType;
|
|
7
|
-
readonly unprocessableEntity: KafkaCallbackResponseType;
|
|
8
|
-
readonly notFound: KafkaCallbackResponseType;
|
|
9
|
-
readonly internalServerError: KafkaCallbackResponseType;
|
|
10
|
-
};
|
|
11
|
-
registerCallback<T extends XodJobType = XodJobType>(callbackFunction: (message: T) => Promise<KafkaCallbackResponse>, eventType?: string, identifier?: string): void;
|
|
12
|
-
getActionConfig(message: XodJobType): ActionInterface | null;
|
|
13
|
-
emitEventType<T extends XodJobType = XodJobType>(callbackFunction: (message: T) => Promise<KafkaCallbackResponse>): (message: T) => Promise<KafkaCallbackResponse>;
|
|
14
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseConnectorConfig } from '@xip-online-data/types';
|
|
2
|
-
import { LoggerSDKInterface } from './logger.sdk.interface';
|
|
3
|
-
import { OffsetStoreSDKInterface } from './offset-store.sdk.interface';
|
|
4
|
-
import { ProcessingSDKInterface } from './processing.sdk.interface';
|
|
5
|
-
import { ReceiverSDKInterface } from './receiver.sdk.interface';
|
|
6
|
-
import { SenderSDKInterface } from './sender.sdk.interface';
|
|
7
|
-
import { TemplatingSDKInterface } from './templating.sdk.interface';
|
|
8
|
-
export interface ConnectorSDKInterface<T = BaseConnectorConfig> {
|
|
9
|
-
get config(): T;
|
|
10
|
-
get logger(): LoggerSDKInterface;
|
|
11
|
-
get sender(): SenderSDKInterface;
|
|
12
|
-
get receiver(): ReceiverSDKInterface;
|
|
13
|
-
get templating(): TemplatingSDKInterface;
|
|
14
|
-
get processing(): ProcessingSDKInterface;
|
|
15
|
-
get offsetStore(): OffsetStoreSDKInterface;
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface Metric {
|
|
2
|
-
key: string;
|
|
3
|
-
value: number;
|
|
4
|
-
}
|
|
5
|
-
export type Metadata = {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
|
-
export interface Context {
|
|
9
|
-
timestamp?: Date;
|
|
10
|
-
ttl?: number;
|
|
11
|
-
extraPayload?: {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export type Result = boolean | {
|
|
16
|
-
[index: number]: boolean;
|
|
17
|
-
};
|
|
18
|
-
export interface SenderSDKInterface {
|
|
19
|
-
metrics(metrics: Array<Metric>, metadata?: Metadata, context?: Context): Promise<Result>;
|
|
20
|
-
metricsLegacy(metrics: Array<never>, metadata?: Metadata, context?: Context): Promise<Result>;
|
|
21
|
-
documents(metrics: Array<object>, metadata?: Metadata, context?: Context): Promise<Result>;
|
|
22
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type RuntimeOptions = {
|
|
2
|
-
partial?: boolean;
|
|
3
|
-
};
|
|
4
|
-
export type CompileDelegate<T = unknown> = {
|
|
5
|
-
(context: T, options?: RuntimeOptions): string;
|
|
6
|
-
};
|
|
7
|
-
export type CompileOptions = {
|
|
8
|
-
strict?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export interface TemplatingSDKInterface {
|
|
11
|
-
compile<T = unknown>(input: string, options?: CompileOptions): CompileDelegate<T>;
|
|
12
|
-
}
|
|
@@ -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,63 +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
|
-
}
|
|
@@ -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
|
-
}
|