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

    Function useDataSource

    • Parameters

      Returns {
          dataSource:
              | undefined
              | {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalDataSourceId?: string;
                  udm?: string;
                  pullUpdatesIntervalSeconds?: number;
                  fullSyncIntervalSeconds?: number;
                  collectionKey?: string;
                  collectionParameters?: any;
                  defaultPath?: string;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalDataSourceRevision?: 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;
                          key?: string;
                          description?: string;
                          uuid?: string;
                          meta?: Record<string, any>;
                          integrationId?: string;
                          universalDataSourceId?: string;
                          udm?: string;
                          pullUpdatesIntervalSeconds?: number;
                          fullSyncIntervalSeconds?: number;
                          collectionKey?: string;
                          collectionParameters?: any;
                          defaultPath?: string;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalDataSourceRevision?: 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";
                      };
                  }[];
              };
          reset: () => Promise<void>;
          refresh: () => Promise<
              {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalDataSourceId?: string;
                  udm?: string;
                  pullUpdatesIntervalSeconds?: number;
                  fullSyncIntervalSeconds?: number;
                  collectionKey?: string;
                  collectionParameters?: any;
                  defaultPath?: string;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalDataSourceRevision?: 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;
                          key?: string;
                          description?: string;
                          uuid?: string;
                          meta?: Record<string, any>;
                          integrationId?: string;
                          universalDataSourceId?: string;
                          udm?: string;
                          pullUpdatesIntervalSeconds?: number;
                          fullSyncIntervalSeconds?: number;
                          collectionKey?: string;
                          collectionParameters?: any;
                          defaultPath?: string;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalDataSourceRevision?: 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";
                      };
                  }[];
              },
          >;
          setup: () => Promise<void>;
          accessor: undefined | DataSourceAccessor;
          loading: boolean;
          saving: boolean;
          error: any;
          refreshing: boolean;
          create: (
              data: {
                  key?: string;
                  description?: string;
                  name?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalDataSourceId?: string;
                  udm?: string;
                  pullUpdatesIntervalSeconds?: number;
                  fullSyncIntervalSeconds?: number;
                  collectionKey?: string;
                  collectionParameters?: any;
                  defaultPath?: string;
              },
          ) => Promise<
              | undefined
              | {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalDataSourceId?: string;
                  udm?: string;
                  pullUpdatesIntervalSeconds?: number;
                  fullSyncIntervalSeconds?: number;
                  collectionKey?: string;
                  collectionParameters?: any;
                  defaultPath?: string;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalDataSourceRevision?: 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;
                          key?: string;
                          description?: string;
                          uuid?: string;
                          meta?: Record<(...), (...)>;
                          integrationId?: string;
                          universalDataSourceId?: string;
                          udm?: string;
                          pullUpdatesIntervalSeconds?: number;
                          fullSyncIntervalSeconds?: number;
                          collectionKey?: string;
                          collectionParameters?: any;
                          defaultPath?: string;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalDataSourceRevision?: 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";
                      };
                  }[];
              },
          >;
          patch: (data: Partial<UpdateRequest>) => Promise<void>;
          put: (
              data: {
                  key?: string;
                  description?: string;
                  name?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalDataSourceId?: string;
                  udm?: string;
                  pullUpdatesIntervalSeconds?: number;
                  fullSyncIntervalSeconds?: number;
                  collectionKey?: string;
                  collectionParameters?: any;
                  defaultPath?: string;
              },
          ) => Promise<void>;
          archive: () => Promise<void>;
      }