@transai/connector-runner-hp-indigo 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.
Files changed (31) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/FINAL_SUMMARY.md +321 -0
  3. package/IMPLEMENTATION_SUMMARY.md +135 -0
  4. package/README.md +638 -0
  5. package/index.cjs +390 -0
  6. package/index.cjs.map +7 -0
  7. package/libs/connector-runner-hp-indigo/src/index.d.ts +4 -0
  8. package/libs/connector-runner-hp-indigo/src/jmf-client.d.ts +35 -0
  9. package/libs/connector-runner-hp-indigo/src/lib/connector-runner-hp-indigo.d.ts +14 -0
  10. package/libs/connector-runner-hp-indigo/src/types.d.ts +24 -0
  11. package/libs/connector-runner-hp-indigo/src/webhook-server.d.ts +14 -0
  12. package/libs/connector-runtime-sdk/src/index.d.ts +5 -0
  13. package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +16 -0
  14. package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +5 -0
  15. package/libs/connector-runtime-sdk/src/lib/sdk/files.sdk.interface.d.ts +19 -0
  16. package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +47 -0
  17. package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +10 -0
  18. package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +7 -0
  19. package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +13 -0
  20. package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +30 -0
  21. package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +14 -0
  22. package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +31 -0
  23. package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +27 -0
  24. package/libs/connector-runtime-sdk/src/lib/sdk/telemetry.sdk.interface.d.ts +15 -0
  25. package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +12 -0
  26. package/libs/connector-runtime-sdk/src/lib/support/index.d.ts +1 -0
  27. package/libs/connector-runtime-sdk/src/lib/support/null-logger.d.ts +8 -0
  28. package/libs/connector-runtime-sdk/src/lib/types/action.d.ts +63 -0
  29. package/libs/connector-runtime-sdk/src/lib/types/kafka.d.ts +40 -0
  30. package/libs/connector-runtime-sdk/src/lib/types.d.ts +26 -0
  31. package/package.json +20 -0
@@ -0,0 +1,4 @@
1
+ export * from './lib/connector-runner-hp-indigo';
2
+ export * from './types';
3
+ export * from './webhook-server';
4
+ export * from './jmf-client';
@@ -0,0 +1,35 @@
1
+ import { ConnectorSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { ConnectorConfig } from './types';
3
+ export interface JMFSubscribeConfig {
4
+ printerUrl: string;
5
+ channelId?: string;
6
+ subscriptionUrl: string;
7
+ }
8
+ export interface JMFUnsubscribeConfig {
9
+ printerUrl: string;
10
+ channelId?: string;
11
+ }
12
+ export declare class JMFClient {
13
+ #private;
14
+ constructor(sdk: ConnectorSDKInterface<ConnectorConfig>);
15
+ /**
16
+ * Subscribe to job status notifications from HP Indigo printer
17
+ * Sends a JMF SubscriptionFilter query to establish a persistent notification channel
18
+ */
19
+ subscribe(config: JMFSubscribeConfig): Promise<void>;
20
+ /**
21
+ * Unsubscribe from job status notifications
22
+ * Sends a JMF StopPersistentChannel command to terminate the subscription
23
+ * Uses provided channelId if available, otherwise falls back to internal state (e.g., after process restart)
24
+ */
25
+ unsubscribe(config: JMFUnsubscribeConfig): Promise<void>;
26
+ /**
27
+ * Query printer capabilities to check if it supports JMF
28
+ */
29
+ queryCapabilities(printerUrl: string): Promise<void>;
30
+ /**
31
+ * Check if our subscription/channel is still active on HP Indigo
32
+ * Uses JMF Query QueueStatus to verify the persistent channel exists
33
+ */
34
+ checkSubscriptionHealth(printerUrl: string): Promise<boolean>;
35
+ }
@@ -0,0 +1,14 @@
1
+ import { ConnectorInterface, ConnectorRuntimeSDK, ConnectorSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { ConnectorConfig } from '../types';
3
+ export declare class ConnectorRunnerHpIndigo extends ConnectorRuntimeSDK<ConnectorConfig> {
4
+ #private;
5
+ constructor(connector: ConnectorInterface, connectorSDK: ConnectorSDKInterface);
6
+ init: () => Promise<void>;
7
+ start: () => Promise<void>;
8
+ stop: () => Promise<void>;
9
+ /**
10
+ * Call this method when a notification is received to update health tracking
11
+ * This should be called by the webhook server
12
+ */
13
+ notificationReceived(): void;
14
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseConnectorConfig } from '@transai/connector-runtime-sdk';
2
+ export interface ConnectorConfig extends BaseConnectorConfig {
3
+ callbackHost?: string;
4
+ port?: number;
5
+ webhookPath?: string;
6
+ jmf?: {
7
+ enabled: boolean;
8
+ printerUrl: string;
9
+ channelId?: string;
10
+ };
11
+ }
12
+ export interface HpIndigoJobStatusMessage {
13
+ jobId: string;
14
+ jobName: string;
15
+ jobStatus: string;
16
+ jobState: string;
17
+ timestamp: string;
18
+ printer?: string;
19
+ owner?: string;
20
+ pages?: number;
21
+ sheets?: number;
22
+ copies?: number;
23
+ [key: string]: unknown;
24
+ }
@@ -0,0 +1,14 @@
1
+ import { ConnectorSDKInterface } from '@transai/connector-runtime-sdk';
2
+ import { ConnectorConfig } from './types';
3
+ export declare class WebhookServer {
4
+ #private;
5
+ constructor(sdk: ConnectorSDKInterface<ConnectorConfig>);
6
+ init(): void;
7
+ start(): void;
8
+ stop(): void;
9
+ /**
10
+ * Set callback to notify when a notification is received
11
+ * Used for health monitoring
12
+ */
13
+ setNotificationCallback(callback: () => void): void;
14
+ }
@@ -0,0 +1,5 @@
1
+ export * from './lib/types';
2
+ export * from './lib/connector-runtime';
3
+ export * from './lib/connector-runtime.interface';
4
+ export * from './lib/sdk';
5
+ export * from './lib/support';
@@ -0,0 +1,16 @@
1
+ import { ConnectorRuntimeInterface } from './connector-runtime.interface';
2
+ import { ConnectorSDKInterface } from './sdk';
3
+ import { ActionInterface, BaseConnectorConfig, ConnectorInterface, KafkaCallbackResponse, XodJobType } from './types';
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
+ }
@@ -0,0 +1,5 @@
1
+ export interface ConnectorRuntimeInterface {
2
+ init(): Promise<void>;
3
+ start(): Promise<void>;
4
+ stop(): Promise<void>;
5
+ }
@@ -0,0 +1,19 @@
1
+ export interface FileInfo {
2
+ type: 'DIRECTORY' | 'FILE';
3
+ name: string;
4
+ size: number;
5
+ modifyTime: Date;
6
+ }
7
+ export interface FileHandleInterface {
8
+ readonly path: string;
9
+ get(): Buffer;
10
+ close(): boolean;
11
+ }
12
+ export interface FilesSDKInterface {
13
+ list(path: string): Promise<Array<FileInfo>>;
14
+ read(filePath: string): Promise<FileHandleInterface>;
15
+ write(filePath: string, data: FileHandleInterface | Buffer | string): Promise<boolean>;
16
+ delete(path: string): Promise<boolean>;
17
+ exists(path: string): Promise<boolean>;
18
+ pathAsDsn(path: string): string;
19
+ }
@@ -0,0 +1,47 @@
1
+ export interface HttpConfig {
2
+ baseUrl?: string;
3
+ contentType?: string;
4
+ timeout?: number;
5
+ }
6
+ export type HttpRequestOptions<D = string | object> = {
7
+ headers?: Record<string, string>;
8
+ params?: Record<string, string | number | boolean>;
9
+ data?: D;
10
+ withCredentials?: boolean;
11
+ responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' | 'formdata';
12
+ };
13
+ export type HttpRequestOptionsFormatter<D = string | object> = (requestOptions: HttpRequestOptions<D>, method: HttpMethod, url: string) => Promise<HttpRequestOptions<D>> | HttpRequestOptions<D>;
14
+ export type HttpErrorResponseCallbackRequest<D = string | object> = {
15
+ client: HttpClientSDKInterface;
16
+ method: HttpMethod;
17
+ url: string;
18
+ options?: HttpRequestOptions<D>;
19
+ };
20
+ export type HttpErrorResponseCallback<R = unknown, D = string | object> = (error: HttpError, request: HttpErrorResponseCallbackRequest<D>) => HttpClientPromise<R>;
21
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
22
+ export type HttpResponseHeader = string | Array<string> | number | boolean | null;
23
+ export type HttpResponse<D = unknown> = {
24
+ status: number;
25
+ data: D;
26
+ headers?: Record<string, HttpResponseHeader>;
27
+ };
28
+ export type HttpError = {
29
+ status: number;
30
+ error?: string;
31
+ };
32
+ interface PromiseWithReason<T = unknown, R = unknown> extends Promise<T> {
33
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: R) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
34
+ catch<TResult = never>(onrejected?: ((reason: R) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
35
+ }
36
+ export type HttpClientPromise<T> = PromiseWithReason<HttpResponse<T>, HttpError>;
37
+ export interface HttpClientSDKInterface {
38
+ get<R = unknown>(destination: string, options?: HttpRequestOptions): HttpClientPromise<R>;
39
+ post<R = unknown, D = string | object>(destination: string, data: D, options?: HttpRequestOptions<D>): HttpClientPromise<R>;
40
+ put<R = unknown, D = string | object>(destination: string, data: D, options?: HttpRequestOptions<D>): HttpClientPromise<R>;
41
+ patch<R = unknown, D = string | object>(destination: string, data: D, options?: HttpRequestOptions<D>): HttpClientPromise<R>;
42
+ delete<R = unknown>(destination: string, options?: HttpRequestOptions): HttpClientPromise<R>;
43
+ request<R = unknown, D = string | object>(method: HttpMethod, url: string, options?: HttpRequestOptions<D>): HttpClientPromise<R>;
44
+ setRequestOptionsFormatter<D = string | object>(formatter: HttpRequestOptionsFormatter<D>): HttpClientSDKInterface;
45
+ setErrorResponseHandler<R = unknown, D = string | object>(callback?: HttpErrorResponseCallback<R, D>): HttpClientSDKInterface;
46
+ }
47
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from './sdk.interface';
2
+ export * from './http-client.interface';
3
+ export * from './logger.sdk.interface';
4
+ export * from './offset-store.sdk.interface';
5
+ export * from './processing.sdk.interface';
6
+ export * from './receiver.sdk.interface';
7
+ export * from './sender.sdk.interface';
8
+ export * from './telemetry.sdk.interface';
9
+ export * from './templating.sdk.interface';
10
+ export * from './files.sdk.interface';
@@ -0,0 +1,7 @@
1
+ export interface LoggerSDKInterface {
2
+ info(...args: Array<unknown>): void;
3
+ debug(...args: Array<unknown>): void;
4
+ error(...args: Array<unknown>): void;
5
+ warn(...args: Array<unknown>): void;
6
+ verbose(...args: Array<unknown>): void;
7
+ }
@@ -0,0 +1,13 @@
1
+ export interface StoredOffset {
2
+ timestamp: number;
3
+ id: number | string;
4
+ isoDate?: string;
5
+ date?: string;
6
+ rawTimestamp?: number | string;
7
+ [key: string]: string | number | undefined;
8
+ }
9
+ export interface OffsetStoreSDKInterface {
10
+ getOffset(identifier: string): Promise<StoredOffset>;
11
+ setOffset(offset: StoredOffset, identifier: string): void;
12
+ flush(): Promise<void>;
13
+ }
@@ -0,0 +1,30 @@
1
+ /** The default timeout is 10 minutes */
2
+ export declare const DEFAULT_TIMEOUT_SECONDS: number;
3
+ export interface IntervalHandler {
4
+ name?: string;
5
+ onInit?: () => Promise<void> | void;
6
+ onRun: () => Promise<void> | void;
7
+ onStop?: () => Promise<void> | void;
8
+ }
9
+ /**
10
+ * Options for configuring an interval registered via {@link ProcessingSDKInterface.registerInterval}.
11
+ */
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
+ */
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;
26
+ };
27
+ export interface ProcessingSDKInterface {
28
+ registerInterval(intervalSeconds: number, handler: IntervalHandler, options?: RegisterIntervalOptions): Promise<string>;
29
+ stopInterval(name: string): Promise<void>;
30
+ }
@@ -0,0 +1,14 @@
1
+ import { ActionInterface, KafkaCallbackResponse, KafkaCallbackResponseType, XodJobType } from '../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): Promise<ActionInterface | null>;
13
+ emitEventType<T extends XodJobType = XodJobType>(callbackFunction: (message: T) => Promise<KafkaCallbackResponse>): (message: T) => Promise<KafkaCallbackResponse>;
14
+ }
@@ -0,0 +1,31 @@
1
+ import { BaseConnectorConfig } from '../types';
2
+ import { FilesSDKInterface } from './files.sdk.interface';
3
+ import { HttpClientSDKInterface, HttpConfig } from './http-client.interface';
4
+ import { LoggerSDKInterface } from './logger.sdk.interface';
5
+ import { OffsetStoreSDKInterface } from './offset-store.sdk.interface';
6
+ import { ProcessingSDKInterface } from './processing.sdk.interface';
7
+ import { ReceiverSDKInterface } from './receiver.sdk.interface';
8
+ import { SenderSDKInterface } from './sender.sdk.interface';
9
+ import { TelemetrySDKInterface } from './telemetry.sdk.interface';
10
+ import { TemplatingSDKInterface } from './templating.sdk.interface';
11
+ export interface ConnectorSDKInterface<T = BaseConnectorConfig> {
12
+ get config(): T;
13
+ get logger(): LoggerSDKInterface;
14
+ get sender(): SenderSDKInterface;
15
+ get receiver(): ReceiverSDKInterface;
16
+ get templating(): TemplatingSDKInterface;
17
+ /**
18
+ * Service to schedule and manage processing tasks that need monitoring and retries.
19
+ */
20
+ get processing(): ProcessingSDKInterface;
21
+ get offsetStore(): OffsetStoreSDKInterface;
22
+ /**
23
+ * Ability to send telemetry data such as gauges and increments on how the connector is performing.
24
+ */
25
+ get telemetry(): TelemetrySDKInterface;
26
+ /**
27
+ * Get file service instance to access files using a specified DSN. If no DSN is provided, defaults to local file system tmp dir.
28
+ */
29
+ files(dsn?: string): FilesSDKInterface;
30
+ httpClient(httpConfig?: HttpConfig): HttpClientSDKInterface;
31
+ }
@@ -0,0 +1,27 @@
1
+ export interface Metric {
2
+ key: string;
3
+ value: number;
4
+ }
5
+ export type Metadata = {
6
+ [key: string]: string;
7
+ };
8
+ export type SenderMetadata = {
9
+ collection?: string;
10
+ incrementalField?: string;
11
+ keyField?: string;
12
+ };
13
+ export interface Context {
14
+ timestamp?: Date;
15
+ ttl?: number;
16
+ extraPayload?: {
17
+ [key: string]: string;
18
+ };
19
+ }
20
+ export type Result = boolean | {
21
+ [index: number]: boolean;
22
+ };
23
+ export interface SenderSDKInterface {
24
+ metrics(metrics: Array<Metric>, metadata?: Metadata & SenderMetadata, context?: Context): Promise<Result>;
25
+ metricsLegacy<T = never>(metrics: Array<T>, metadata?: Metadata & SenderMetadata, context?: Context, topic?: string): Promise<Result>;
26
+ documents<T = object>(documents: Array<T>, metadata?: Metadata & SenderMetadata, context?: Context): Promise<Result>;
27
+ }
@@ -0,0 +1,15 @@
1
+ export interface TelemetrySDKInterface {
2
+ /**
3
+ * Increment a telemetry counter by 1.
4
+ */
5
+ increment(key: string): void;
6
+ /**
7
+ * Increment a telemetry counter by a specified value. 0 doesn't send any telemetry.
8
+ * A negative value will decrement the counter.
9
+ */
10
+ increment(key: string, value: number): void;
11
+ /**
12
+ * Send a gauge telemetry metric.
13
+ */
14
+ gauge(key: string, value: number): void;
15
+ }
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1 @@
1
+ export * from './null-logger';
@@ -0,0 +1,8 @@
1
+ import { LoggerSDKInterface } from '../sdk';
2
+ export declare class NullLogger implements LoggerSDKInterface {
3
+ info(): void;
4
+ debug(): void;
5
+ error(): void;
6
+ warn(): void;
7
+ verbose(): void;
8
+ }
@@ -0,0 +1,63 @@
1
+ export declare enum ConnectorOrigin {
2
+ from_template = "from_template",
3
+ manual = "manual"
4
+ }
5
+ export interface LegacyOutputParameterInterface {
6
+ [key: string]: string;
7
+ }
8
+ export type SupportedOutputTypes = 'string' | 'number' | 'boolean' | 'array' | 'null';
9
+ export interface OutputItemParameterInterface {
10
+ type: SupportedOutputTypes | Array<SupportedOutputTypes>;
11
+ description?: string;
12
+ required?: boolean;
13
+ }
14
+ export interface ArrayOutputParameterInterface extends OutputItemParameterInterface {
15
+ type: 'array';
16
+ items: OutputParameterInterface;
17
+ }
18
+ export interface NumberOutputParameterInterface extends OutputItemParameterInterface {
19
+ type: 'number' | Array<'number' | 'null'>;
20
+ minimum?: number;
21
+ maximum?: number;
22
+ }
23
+ export interface OutputParameterInterface {
24
+ [key: string]: OutputItemParameterInterface | ArrayOutputParameterInterface | NumberOutputParameterInterface;
25
+ }
26
+ interface BaseInputParameter {
27
+ name: string;
28
+ description?: string;
29
+ required?: boolean;
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;
46
+ export interface ActionInterface {
47
+ identifier: string;
48
+ version: string;
49
+ tenantIdentifier: string;
50
+ name: string;
51
+ description?: string;
52
+ connectorIdentifier: string;
53
+ config: {
54
+ [key: string]: {
55
+ [key: string]: string | object;
56
+ } | string | object;
57
+ };
58
+ inputParameters: Array<InputParameterInterface>;
59
+ outputParameters: LegacyOutputParameterInterface | OutputParameterInterface;
60
+ mode?: ConnectorOrigin;
61
+ createdAt: Date;
62
+ }
63
+ export {};
@@ -0,0 +1,40 @@
1
+ export interface KafkaBrokerConfig {
2
+ groupId: string;
3
+ clientId: string;
4
+ brokers: Array<string>;
5
+ sasl?: object;
6
+ intervalCheckForNewTopics?: number;
7
+ disableLogs?: boolean;
8
+ autoCommitThreshold?: number;
9
+ autoCommitInterval?: number;
10
+ partitionsConsumedConcurrently?: number;
11
+ useConfluentLibrary?: boolean;
12
+ newConsumerProtocol?: boolean;
13
+ }
14
+ export interface KafkaCallbackResponse<T = unknown> {
15
+ success: boolean;
16
+ statusCode: number;
17
+ message: string;
18
+ payload?: T;
19
+ }
20
+ export type KafkaCallbackResponseType<T = string> = (additionalMessage?: T) => (message: XodBaseMessageType) => Promise<KafkaCallbackResponse>;
21
+ export interface XodBaseMessageType {
22
+ type: 'ACTION' | 'EVENT' | 'SOURCE' | 'JOB';
23
+ eventId: string;
24
+ eventType: string;
25
+ eventTopic?: string;
26
+ created: number;
27
+ payload: object;
28
+ ttl: number;
29
+ tenantIdentifier: string;
30
+ testRun?: boolean;
31
+ meta?: {
32
+ [key: string]: unknown;
33
+ };
34
+ }
35
+ export interface XodJobType extends XodBaseMessageType {
36
+ type: 'JOB';
37
+ actionIdentifier: string;
38
+ actionVersion: string;
39
+ payload: Record<string, unknown>;
40
+ }
@@ -0,0 +1,26 @@
1
+ import { ActionInterface, ConnectorOrigin } from './types/action';
2
+ import { KafkaBrokerConfig } from './types/kafka';
3
+ export * from './types/action';
4
+ export * from './types/kafka';
5
+ export interface BaseConnectorConfig {
6
+ processIdentifier: string;
7
+ tenantIdentifier: string;
8
+ datasourceIdentifier: string;
9
+ kafka: KafkaBrokerConfig;
10
+ action?: {
11
+ timeSensitive: boolean;
12
+ };
13
+ }
14
+ export interface ConnectorInterface<T = Partial<BaseConnectorConfig>> {
15
+ identifier: string;
16
+ connectorType: string;
17
+ tenantIdentifier: string;
18
+ name: string;
19
+ location: string;
20
+ config?: T;
21
+ enabled: boolean;
22
+ actions?: Array<ActionInterface>;
23
+ mode?: ConnectorOrigin;
24
+ createdAt?: Date;
25
+ updatedAt?: Date;
26
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@transai/connector-runner-hp-indigo",
3
+ "version": "0.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "license": "LGPL-3.0-or-later",
8
+ "author": {
9
+ "name": "transAI",
10
+ "email": "samen@transai.com",
11
+ "url": "https://transai.com"
12
+ },
13
+ "dependencies": {
14
+ "express": "^4.0",
15
+ "xml2js": "^0.6.0"
16
+ },
17
+ "type": "commonjs",
18
+ "main": "./index.cjs",
19
+ "typings": "./index.d.ts"
20
+ }