n8n
Version:
n8n Workflow Automation Tool
22 lines (21 loc) • 1.39 kB
TypeScript
import { type IntegrationErrorCode } from './integration-error-codes';
export interface IntegrationErrorResponse {
ok: false;
error: {
code: IntegrationErrorCode;
message: string;
};
}
export declare function integrationError(code: IntegrationErrorCode, message: string): IntegrationErrorResponse;
export declare function connectionUnavailable(): IntegrationErrorResponse;
export declare function unsupportedQuery(platform: string, query: string): IntegrationErrorResponse;
export declare function unsupportedAction(platform: string, action: string): IntegrationErrorResponse;
export declare function normalizePlatformId(platform: string, id: string): string;
export declare function isRecord(value: unknown): value is Record<string, unknown>;
export declare function stringValue(value: unknown): string | undefined;
export declare function stringProperty(value: unknown, key: string): string | undefined;
export declare function numberProperty(value: unknown, key: string): number | undefined;
export declare function booleanProperty(value: unknown, key: string): boolean | undefined;
export declare function isoDateProperty(value: unknown, key: string): string | undefined;
export declare function removeUndefinedValues<T extends Record<string, unknown>>(value: T): Record<string, unknown>;
export declare function isDefined<T>(value: T | undefined): value is T;