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

    Function useConnection

    • Parameters

      • Optionalid: string

      Returns {
          accessor: undefined | ConnectionAccessor;
          loading: boolean;
          saving: boolean;
          error: any;
          refresh: () => Promise<
              {
                  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>;
                  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;
                  };
                  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";
                  };
              },
          >;
          refreshing: boolean;
          create: (
              data: { name: string; integrationId: string; credentials?: string },
          ) => Promise<
              | undefined
              | {
                  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>;
                  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;
                  };
                  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";
                  };
              },
          >;
          patch: (data: Partial<UpdateRequest>) => Promise<void>;
          put: (
              data: { name?: string; credentials?: string; accessToken?: string },
          ) => Promise<void>;
          archive: () => Promise<void>;
          connection:
              | undefined
              | {
                  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>;
                  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;
                  };
                  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";
                  };
              };
      }