Membrane React - v0.6.0
    Preparing search index...

    Function useFlowInstance

    • Parameters

      Returns {
          loading: boolean;
          saving: boolean;
          error: any;
          refreshing: boolean;
          create: (
              data: {
                  name?: string;
                  userId?: string;
                  flowId?: string;
                  connectionId?: string;
                  integrationId?: string;
                  instanceKey?: string;
                  parameters?: any;
                  nodes?: Record<
                      string,
                      {
                          name?: string;
                          type?: string;
                          userConfig?: any;
                          config?: any;
                          onError?: "continue"
                          | "stop";
                          concurrency?: number;
                          ui?: any;
                          links?: { key?: string; filter?: any; name?: string }[];
                          isCustomized?: boolean;
                      },
                  >;
                  enabled?: boolean;
                  customized?: { name?: boolean; nodes?: boolean };
              },
          ) => Promise<
              | undefined
              | {
                  id: string;
                  key?: string;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  userId: string;
                  connectionId?: string;
                  flowId?: string;
                  universalFlowId?: string;
                  integrationId: string;
                  instanceKey?: string;
                  parameters?: any;
                  parametersSchema?: DataSchema;
                  nodes?: Record<string, any>;
                  enabled: boolean;
                  createdAt: string;
                  updatedAt: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  customized?: { name?: boolean; nodes?: boolean };
                  dependencies?: any[];
                  user?: {
                      id: string;
                      name: string;
                      internalId: string;
                      meta?: Record<string, any>;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      createdAt?: string;
                      archivedAt?: string;
                  };
                  connection?: {
                      id: string;
                      name: string;
                      userId: string;
                      integrationId: string;
                      createdAt: string;
                      updatedAt: string;
                      isTest?: boolean;
                      disconnected?: boolean;
                      isDefunct?: boolean;
                      state?: WorkspaceElementState;
                      error?: ErrorDataSchema;
                      authOptionKey?: string;
                      lastActiveAt?: string;
                      nextCredentialsRefreshAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      meta?: Record<string, any>;
                  };
                  flow?: {
                      id: string;
                      key?: string;
                      description?: string;
                      uuid?: string;
                      meta?: Record<string, any>;
                      integrationId?: string;
                      universalFlowId?: string;
                      parametersSchema?: DataSchema;
                      nodes?: Record<
                          string,
                          {
                              type?: (...)
                              | (...);
                              version?: (...) | (...);
                              name?: (...) | (...);
                              description?: (...) | (...);
                              config?: any;
                              concurrency?: (...) | (...);
                              onError?: (...) | (...) | (...);
                              ui?: any;
                              inputSchema?: any;
                              outputSchema?: any;
                              outputExample?: any;
                              links?: (...) | (...);
                              isCustomized?: (...) | (...) | (...);
                          },
                      >;
                      autoCreateInstances?: boolean;
                      name: string;
                      state?: CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      isCustomized?: boolean;
                      universalFlowRevision?: string;
                      integration?: {
                          id: string;
                          key?: string;
                          uuid?: string;
                          description?: string;
                          meta?: Record<(...), (...)>;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          logoUri: string;
                          connectorId?: string;
                          connectorVersion?: string;
                          oAuthCallbackUri?: string;
                          parameters?: any;
                          archivedAt?: string;
                          hasMissingParameters?: boolean;
                          hasDocumentation?: boolean;
                          hasOperations?: boolean;
                          operationsCount?: number;
                          hasData?: boolean;
                          dataCollectionsCount?: number;
                          hasEvents?: boolean;
                          eventsCount?: number;
                          hasGlobalWebhooks?: boolean;
                          hasUdm?: boolean;
                          isTest?: boolean;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?:
                              | "proxy"
                              | "integration-app-token"
                              | "membrane-token"
                              | "oauth2"
                              | "oauth1"
                              | "client-credentials";
                      };
                      appliedToIntegrations?: {
                          element: {
                              id: ...;
                              integrationId?: ...;
                              isCustomized?: ...;
                              universalFlowId?: ...;
                          };
                          integration: {
                              id: ...;
                              key?: ...;
                              uuid?: ...;
                              description?: ...;
                              meta?: ...;
                              name: ...;
                              state?: ...;
                              errors?: ...;
                              revision?: ...;
                              createdAt?: ...;
                              updatedAt?: ...;
                              logoUri: ...;
                              connectorId?: ...;
                              connectorVersion?: ...;
                              oAuthCallbackUri?: ...;
                              parameters?: ...;
                              archivedAt?: ...;
                              hasMissingParameters?: ...;
                              hasDocumentation?: ...;
                              hasOperations?: ...;
                              operationsCount?: ...;
                              hasData?: ...;
                              dataCollectionsCount?: ...;
                              hasEvents?: ...;
                              eventsCount?: ...;
                              hasGlobalWebhooks?: ...;
                              hasUdm?: ...;
                              isTest?: ...;
                              appUuid?: ...;
                              isDeactivated?: ...;
                              authType?: ...;
                          };
                      }[];
                      dependencies?: any[];
                  };
                  integration?: {
                      id: string;
                      name: string;
                      logoUri: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      state?: WorkspaceElementState;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      connectorId?: string;
                      connectorVersion?: string;
                      oAuthCallbackUri?: string;
                      parameters?: any;
                      archivedAt?: string;
                      hasMissingParameters?: boolean;
                      hasDocumentation?: boolean;
                      hasOperations?: boolean;
                      operationsCount?: number;
                      hasData?: boolean;
                      dataCollectionsCount?: number;
                      hasEvents?: boolean;
                      eventsCount?: number;
                      hasGlobalWebhooks?: boolean;
                      hasUdm?: boolean;
                      isTest?: boolean;
                      appUuid?: string;
                      isDeactivated?: boolean;
                      authType?:
                          | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                  };
              },
          >;
          patch: (data: Partial<UpdateRequest>) => Promise<void>;
          put: (
              data: {
                  name?: string;
                  enabled?: boolean;
                  parameters?: any;
                  nodes?: Record<
                      string,
                      {
                          name?: string;
                          type?: string;
                          userConfig?: any;
                          config?: any;
                          onError?: "continue"
                          | "stop";
                          links?: { key?: string; filter?: any; name?: string }[];
                          concurrency?: number;
                          isCustomized?: boolean;
                      },
                  >;
                  archivedAt?: string;
                  customized?: { name?: boolean; nodes?: boolean };
              },
          ) => Promise<void>;
          archive: () => Promise<void>;
          flowInstance:
              | undefined
              | {
                  id: string;
                  key?: string;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  userId: string;
                  connectionId?: string;
                  flowId?: string;
                  universalFlowId?: string;
                  integrationId: string;
                  instanceKey?: string;
                  parameters?: any;
                  parametersSchema?: DataSchema;
                  nodes?: Record<string, any>;
                  enabled: boolean;
                  createdAt: string;
                  updatedAt: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  customized?: { name?: boolean; nodes?: boolean };
                  dependencies?: any[];
                  user?: {
                      id: string;
                      name: string;
                      internalId: string;
                      meta?: Record<string, any>;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      createdAt?: string;
                      archivedAt?: string;
                  };
                  connection?: {
                      id: string;
                      name: string;
                      userId: string;
                      integrationId: string;
                      createdAt: string;
                      updatedAt: string;
                      isTest?: boolean;
                      disconnected?: boolean;
                      isDefunct?: boolean;
                      state?: WorkspaceElementState;
                      error?: ErrorDataSchema;
                      authOptionKey?: string;
                      lastActiveAt?: string;
                      nextCredentialsRefreshAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      meta?: Record<string, any>;
                  };
                  flow?: {
                      id: string;
                      key?: string;
                      description?: string;
                      uuid?: string;
                      meta?: Record<string, any>;
                      integrationId?: string;
                      universalFlowId?: string;
                      parametersSchema?: DataSchema;
                      nodes?: Record<
                          string,
                          {
                              type?: string;
                              version?: number;
                              name?: string;
                              description?: string;
                              config?: any;
                              concurrency?: number;
                              onError?: "continue"
                              | "stop";
                              ui?: any;
                              inputSchema?: any;
                              outputSchema?: any;
                              outputExample?: any;
                              links?: { key?: ...; filter?: ...; name?: ... }[];
                              isCustomized?: boolean;
                          },
                      >;
                      autoCreateInstances?: boolean;
                      name: string;
                      state?: CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      isCustomized?: boolean;
                      universalFlowRevision?: string;
                      integration?: {
                          id: string;
                          key?: string;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          logoUri: string;
                          connectorId?: string;
                          connectorVersion?: string;
                          oAuthCallbackUri?: string;
                          parameters?: any;
                          archivedAt?: string;
                          hasMissingParameters?: boolean;
                          hasDocumentation?: boolean;
                          hasOperations?: boolean;
                          operationsCount?: number;
                          hasData?: boolean;
                          dataCollectionsCount?: number;
                          hasEvents?: boolean;
                          eventsCount?: number;
                          hasGlobalWebhooks?: boolean;
                          hasUdm?: boolean;
                          isTest?: boolean;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?:
                              | "proxy"
                              | "integration-app-token"
                              | "membrane-token"
                              | "oauth2"
                              | "oauth1"
                              | "client-credentials";
                      };
                      appliedToIntegrations?: {
                          element: {
                              id: string;
                              integrationId?: string;
                              isCustomized?: boolean;
                              universalFlowId?: string;
                          };
                          integration: {
                              id: string;
                              key?: string;
                              uuid?: string;
                              description?: string;
                              meta?: Record<(...), (...)>;
                              name: string;
                              state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                              errors?: (...)[];
                              revision?: string;
                              createdAt?: string;
                              updatedAt?: string;
                              logoUri: string;
                              connectorId?: string;
                              connectorVersion?: string;
                              oAuthCallbackUri?: string;
                              parameters?: any;
                              archivedAt?: string;
                              hasMissingParameters?: boolean;
                              hasDocumentation?: boolean;
                              hasOperations?: boolean;
                              operationsCount?: number;
                              hasData?: boolean;
                              dataCollectionsCount?: number;
                              hasEvents?: boolean;
                              eventsCount?: number;
                              hasGlobalWebhooks?: boolean;
                              hasUdm?: boolean;
                              isTest?: boolean;
                              appUuid?: string;
                              isDeactivated?: boolean;
                              authType?:
                                  | "proxy"
                                  | "integration-app-token"
                                  | "membrane-token"
                                  | "oauth2"
                                  | "oauth1"
                                  | "client-credentials";
                          };
                      }[];
                      dependencies?: any[];
                  };
                  integration?: {
                      id: string;
                      name: string;
                      logoUri: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      state?: WorkspaceElementState;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      connectorId?: string;
                      connectorVersion?: string;
                      oAuthCallbackUri?: string;
                      parameters?: any;
                      archivedAt?: string;
                      hasMissingParameters?: boolean;
                      hasDocumentation?: boolean;
                      hasOperations?: boolean;
                      operationsCount?: number;
                      hasData?: boolean;
                      dataCollectionsCount?: number;
                      hasEvents?: boolean;
                      eventsCount?: number;
                      hasGlobalWebhooks?: boolean;
                      hasUdm?: boolean;
                      isTest?: boolean;
                      appUuid?: string;
                      isDeactivated?: boolean;
                      authType?:
                          | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                  };
              };
          accessor: undefined
          | FlowInstanceAccessor;
          refresh: () => Promise<
              {
                  id: string;
                  key?: string;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  userId: string;
                  connectionId?: string;
                  flowId?: string;
                  universalFlowId?: string;
                  integrationId: string;
                  instanceKey?: string;
                  parameters?: any;
                  parametersSchema?: DataSchema;
                  nodes?: Record<string, any>;
                  enabled: boolean;
                  createdAt: string;
                  updatedAt: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  customized?: { name?: boolean; nodes?: boolean };
                  dependencies?: any[];
                  user?: {
                      id: string;
                      name: string;
                      internalId: string;
                      meta?: Record<string, any>;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      createdAt?: string;
                      archivedAt?: string;
                  };
                  connection?: {
                      id: string;
                      name: string;
                      userId: string;
                      integrationId: string;
                      createdAt: string;
                      updatedAt: string;
                      isTest?: boolean;
                      disconnected?: boolean;
                      isDefunct?: boolean;
                      state?: WorkspaceElementState;
                      error?: ErrorDataSchema;
                      authOptionKey?: string;
                      lastActiveAt?: string;
                      nextCredentialsRefreshAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      meta?: Record<string, any>;
                  };
                  flow?: {
                      id: string;
                      key?: string;
                      description?: string;
                      uuid?: string;
                      meta?: Record<string, any>;
                      integrationId?: string;
                      universalFlowId?: string;
                      parametersSchema?: DataSchema;
                      nodes?: Record<
                          string,
                          {
                              type?: string;
                              version?: number;
                              name?: string;
                              description?: string;
                              config?: any;
                              concurrency?: number;
                              onError?: "continue"
                              | "stop";
                              ui?: any;
                              inputSchema?: any;
                              outputSchema?: any;
                              outputExample?: any;
                              links?: (...)[];
                              isCustomized?: boolean;
                          },
                      >;
                      autoCreateInstances?: boolean;
                      name: string;
                      state?: CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      isCustomized?: boolean;
                      universalFlowRevision?: string;
                      integration?: {
                          id: string;
                          key?: string;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          logoUri: string;
                          connectorId?: string;
                          connectorVersion?: string;
                          oAuthCallbackUri?: string;
                          parameters?: any;
                          archivedAt?: string;
                          hasMissingParameters?: boolean;
                          hasDocumentation?: boolean;
                          hasOperations?: boolean;
                          operationsCount?: number;
                          hasData?: boolean;
                          dataCollectionsCount?: number;
                          hasEvents?: boolean;
                          eventsCount?: number;
                          hasGlobalWebhooks?: boolean;
                          hasUdm?: boolean;
                          isTest?: boolean;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?:
                              | "proxy"
                              | "integration-app-token"
                              | "membrane-token"
                              | "oauth2"
                              | "oauth1"
                              | "client-credentials";
                      };
                      appliedToIntegrations?: {
                          element: {
                              id: string;
                              integrationId?: (...)
                              | (...);
                              isCustomized?: (...) | (...) | (...);
                              universalFlowId?: (...) | (...);
                          };
                          integration: {
                              id: string;
                              key?: (...)
                              | (...);
                              uuid?: (...) | (...);
                              description?: (...) | (...);
                              meta?: (...) | (...);
                              name: string;
                              state?: (...) | (...) | (...) | (...);
                              errors?: (...) | (...);
                              revision?: (...) | (...);
                              createdAt?: (...) | (...);
                              updatedAt?: (...) | (...);
                              logoUri: string;
                              connectorId?: (...) | (...);
                              connectorVersion?: (...) | (...);
                              oAuthCallbackUri?: (...) | (...);
                              parameters?: any;
                              archivedAt?: (...) | (...);
                              hasMissingParameters?: (...) | (...) | (...);
                              hasDocumentation?: (...) | (...) | (...);
                              hasOperations?: (...) | (...) | (...);
                              operationsCount?: (...) | (...);
                              hasData?: (...) | (...) | (...);
                              dataCollectionsCount?: (...) | (...);
                              hasEvents?: (...) | (...) | (...);
                              eventsCount?: (...) | (...);
                              hasGlobalWebhooks?: (...) | (...) | (...);
                              hasUdm?: (...) | (...) | (...);
                              isTest?: (...) | (...) | (...);
                              appUuid?: (...) | (...);
                              isDeactivated?: (...) | (...) | (...);
                              authType?: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                          };
                      }[];
                      dependencies?: any[];
                  };
                  integration?: {
                      id: string;
                      name: string;
                      logoUri: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      state?: WorkspaceElementState;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      connectorId?: string;
                      connectorVersion?: string;
                      oAuthCallbackUri?: string;
                      parameters?: any;
                      archivedAt?: string;
                      hasMissingParameters?: boolean;
                      hasDocumentation?: boolean;
                      hasOperations?: boolean;
                      operationsCount?: number;
                      hasData?: boolean;
                      dataCollectionsCount?: number;
                      hasEvents?: boolean;
                      eventsCount?: number;
                      hasGlobalWebhooks?: boolean;
                      hasUdm?: boolean;
                      isTest?: boolean;
                      appUuid?: string;
                      isDeactivated?: boolean;
                      authType?:
                          | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                  };
              },
          >;
          enable: () => Promise<void>;
          disable: () => Promise<void>;
          reset: (
              options?: {
                  name?: boolean;
                  nodes?: Record<string, boolean>;
                  allNodes?: boolean;
              },
          ) => Promise<void>;
          setup: () => Promise<void>;
          openConfiguration: (
              options: OpenFlowInstanceConfigurationOptions,
          ) => Promise<undefined | void>;
          openEditor: (
              options?: OpenFlowInstanceEditorOptions,
          ) => Promise<undefined | void>;
          run: (
              options?: RunFlowOptions,
          ) => Promise<
              | undefined
              | {
                  id: string;
                  name?: string;
                  flowInstanceId: string;
                  universalFlowId?: string;
                  connectionId?: string;
                  integrationId?: string;
                  startNodeKey: string;
                  userId: string;
                  input?: any;
                  state: FlowRunState;
                  startTime: string;
                  endTime?: string;
                  errors?: ErrorDataSchema[];
                  nodes?: Record<
                      string,
                      {
                          state: FlowRunNodeState;
                          runs?: number;
                          erroredRuns?: number;
                          outputs?: number;
                      },
                  >;
                  launchedBy?: { type: FlowRunLaunchedByTrigger; ids?: string[] };
                  flowInstance?: {
                      id: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      name: string;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      userId: string;
                      connectionId?: string;
                      flowId?: string;
                      universalFlowId?: string;
                      integrationId: string;
                      instanceKey?: string;
                      parameters?: any;
                      parametersSchema?: DataSchema;
                      nodes?: Record<string, any>;
                      enabled: boolean;
                      createdAt: string;
                      updatedAt: string;
                      state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                      customized?: { name?: boolean; nodes?: boolean };
                      dependencies?: any[];
                  };
                  connection?: {
                      id: string;
                      name: string;
                      userId: string;
                      isTest?: boolean;
                      disconnected?: boolean;
                      isDefunct?: boolean;
                      state?: CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY;
                      error?: ErrorDataSchema;
                      integrationId: string;
                      authOptionKey?: string;
                      createdAt: string;
                      updatedAt: string;
                      lastActiveAt?: string;
                      nextCredentialsRefreshAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      meta?: Record<string, any>;
                  };
                  integration?: {
                      id: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      name: string;
                      state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      logoUri: string;
                      connectorId?: string;
                      connectorVersion?: string;
                      oAuthCallbackUri?: string;
                      parameters?: any;
                      archivedAt?: string;
                      hasMissingParameters?: boolean;
                      hasDocumentation?: boolean;
                      hasOperations?: boolean;
                      operationsCount?: number;
                      hasData?: boolean;
                      dataCollectionsCount?: number;
                      hasEvents?: boolean;
                      eventsCount?: number;
                      hasGlobalWebhooks?: boolean;
                      hasUdm?: boolean;
                      isTest?: boolean;
                      appUuid?: string;
                      isDeactivated?: boolean;
                      authType?:
                          | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                  };
                  user?: {
                      id: string;
                      name: string;
                      meta?: Record<string, any>;
                      internalId: string;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      createdAt?: string;
                      archivedAt?: string;
                  };
              },
          >;
          startRun: (
              options?: RunFlowOptions,
          ) => Promise<
              | undefined
              | {
                  id: string;
                  name?: string;
                  flowInstanceId: string;
                  universalFlowId?: string;
                  connectionId?: string;
                  integrationId?: string;
                  startNodeKey: string;
                  userId: string;
                  input?: any;
                  state: FlowRunState;
                  startTime: string;
                  endTime?: string;
                  errors?: ErrorDataSchema[];
                  nodes?: Record<
                      string,
                      {
                          state: FlowRunNodeState;
                          runs?: number;
                          erroredRuns?: number;
                          outputs?: number;
                      },
                  >;
                  launchedBy?: { type: FlowRunLaunchedByTrigger; ids?: string[] };
                  flowInstance?: {
                      id: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      name: string;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      userId: string;
                      connectionId?: string;
                      flowId?: string;
                      universalFlowId?: string;
                      integrationId: string;
                      instanceKey?: string;
                      parameters?: any;
                      parametersSchema?: DataSchema;
                      nodes?: Record<string, any>;
                      enabled: boolean;
                      createdAt: string;
                      updatedAt: string;
                      state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                      customized?: { name?: boolean; nodes?: boolean };
                      dependencies?: any[];
                  };
                  connection?: {
                      id: string;
                      name: string;
                      userId: string;
                      isTest?: boolean;
                      disconnected?: boolean;
                      isDefunct?: boolean;
                      state?: CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY;
                      error?: ErrorDataSchema;
                      integrationId: string;
                      authOptionKey?: string;
                      createdAt: string;
                      updatedAt: string;
                      lastActiveAt?: string;
                      nextCredentialsRefreshAt?: string;
                      archivedAt?: string;
                      isDeactivated?: boolean;
                      meta?: Record<string, any>;
                  };
                  integration?: {
                      id: string;
                      key?: string;
                      uuid?: string;
                      description?: string;
                      meta?: Record<string, any>;
                      name: string;
                      state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                      errors?: ErrorDataSchema[];
                      revision?: string;
                      createdAt?: string;
                      updatedAt?: string;
                      logoUri: string;
                      connectorId?: string;
                      connectorVersion?: string;
                      oAuthCallbackUri?: string;
                      parameters?: any;
                      archivedAt?: string;
                      hasMissingParameters?: boolean;
                      hasDocumentation?: boolean;
                      hasOperations?: boolean;
                      operationsCount?: number;
                      hasData?: boolean;
                      dataCollectionsCount?: number;
                      hasEvents?: boolean;
                      eventsCount?: number;
                      hasGlobalWebhooks?: boolean;
                      hasUdm?: boolean;
                      isTest?: boolean;
                      appUuid?: string;
                      isDeactivated?: boolean;
                      authType?:
                          | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                  };
                  user?: {
                      id: string;
                      name: string;
                      meta?: Record<string, any>;
                      internalId: string;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      createdAt?: string;
                      archivedAt?: string;
                  };
              },
          >;
      }