@transai/connector-runner-gpms 0.2.0 → 0.4.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.
@@ -1,7 +1,7 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
2
- export interface GpmsActionInterface {
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
+ export interface GpmsActionInterface<R = Record<string, unknown>> {
3
3
  readonly identifier: string;
4
- execute(inputs: Record<string, unknown>, action: ActionInterface): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
4
+ execute(inputs: Record<string, unknown>, action: ActionInterface, testRun: boolean): Promise<R | null>;
5
5
  }
6
6
  export interface GpmsActionInterfaceConstructor {
7
7
  new (connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface): GpmsActionInterface;
@@ -1,8 +1,8 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class CreateClientAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "create_client";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>, action: ActionInterface): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class CreateOrderFileAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "create_order_file";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class CreateOrderAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "create_order";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>, action: ActionInterface): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class CreateQuoteFileAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "create_quote_file";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class CreateQuoteAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "create_quote";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, string>, action: ActionInterface): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, string>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class OrderReadyAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "order_ready";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, unknown>): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, unknown>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -1,8 +1,8 @@
1
- import { ConnectorSDKInterface, HttpClientSDKInterface, KafkaCallbackResponse, XodBaseMessageType } from '@transai/connector-runtime-sdk';
1
+ import { ActionInterface, ConnectorSDKInterface, HttpClientSDKInterface } from '@transai/connector-runtime-sdk';
2
2
  import { GpmsActionInterface } from './action.interface';
3
3
  export declare class QuoteReadyAction implements GpmsActionInterface {
4
4
  #private;
5
5
  readonly identifier = "quote_ready";
6
6
  constructor(connectorSDK: ConnectorSDKInterface, httpClient: HttpClientSDKInterface);
7
- execute(inputs: Record<string, unknown>): Promise<((message: XodBaseMessageType) => Promise<KafkaCallbackResponse>) | null>;
7
+ execute(inputs: Record<string, unknown>, action: ActionInterface, testRun: boolean): Promise<Record<string, unknown> | null>;
8
8
  }
@@ -0,0 +1,3 @@
1
+ export declare class BadRequestError extends Error {
2
+ constructor(message: string);
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transai/connector-runner-gpms",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },