@stackone/connect-sdk 1.35.1 → 1.36.1

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/dist/index.d.mts CHANGED
@@ -31,6 +31,17 @@ declare const getOperationFromUrl: (connector: Connector, url: string, method: H
31
31
  declare function parseYamlConnector(yamlFileContents: string): Connector;
32
32
  declare const parseOperationInputs: (operation: Operation, inputs: unknown) => Record<string, unknown>;
33
33
  //#endregion
34
+ //#region src/connectors/validators.d.ts
35
+ type ValidationError = {
36
+ line: number;
37
+ message: string;
38
+ field?: string;
39
+ };
40
+ declare const validateYamlConnector: (yamlFileContents: string) => {
41
+ success: boolean;
42
+ errors?: ValidationError[];
43
+ };
44
+ //#endregion
34
45
  //#region src/errors/types.d.ts
35
46
  type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_OPERATION_ERROR' | 'INVALID_OPERATION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR';
36
47
  //#endregion
@@ -140,4 +151,4 @@ declare const runConnectorOperation: ({
140
151
  runStepOperationFn?: typeof runStepOperation;
141
152
  }) => Promise<Block>;
142
153
  //#endregion
143
- export { ConnectSDKError, ErrorType, createBlock, executeStepFunction, getOperationFromUrl, parseOperationInputs, parseYamlConnector, runConnectorOperation, runStepOperation };
154
+ export { ConnectSDKError, ErrorType, createBlock, executeStepFunction, getOperationFromUrl, parseOperationInputs, parseYamlConnector, runConnectorOperation, runStepOperation, validateYamlConnector };
package/dist/index.d.ts CHANGED
@@ -31,6 +31,17 @@ declare const getOperationFromUrl: (connector: Connector, url: string, method: H
31
31
  declare function parseYamlConnector(yamlFileContents: string): Connector;
32
32
  declare const parseOperationInputs: (operation: Operation, inputs: unknown) => Record<string, unknown>;
33
33
  //#endregion
34
+ //#region src/connectors/validators.d.ts
35
+ type ValidationError = {
36
+ line: number;
37
+ message: string;
38
+ field?: string;
39
+ };
40
+ declare const validateYamlConnector: (yamlFileContents: string) => {
41
+ success: boolean;
42
+ errors?: ValidationError[];
43
+ };
44
+ //#endregion
34
45
  //#region src/errors/types.d.ts
35
46
  type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_OPERATION_ERROR' | 'INVALID_OPERATION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR';
36
47
  //#endregion
@@ -140,4 +151,4 @@ declare const runConnectorOperation: ({
140
151
  runStepOperationFn?: typeof runStepOperation;
141
152
  }) => Promise<Block>;
142
153
  //#endregion
143
- export { ConnectSDKError, ErrorType, createBlock, executeStepFunction, getOperationFromUrl, parseOperationInputs, parseYamlConnector, runConnectorOperation, runStepOperation };
154
+ export { ConnectSDKError, ErrorType, createBlock, executeStepFunction, getOperationFromUrl, parseOperationInputs, parseYamlConnector, runConnectorOperation, runStepOperation, validateYamlConnector };