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

    Function useFieldMapping

    • Parameters

      Returns {
          loading: boolean;
          saving: boolean;
          error: any;
          refreshing: boolean;
          create: (
              data: {
                  key?: string;
                  description?: string;
                  name?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalFieldMappingId?: string;
                  dataSourceKey?: string;
                  dataSourceId?: string;
                  appSchema?: DataSchema;
                  direction?: IMPORT | EXPORT | BOTH;
                  defaultImportValue?: any;
                  defaultExportValue?: any;
                  importValue?: any;
                  exportValue?: any;
                  frozenImportFields?: any;
                  frozenExportFields?: any;
                  frozenUnifiedExportFields?: any;
              },
          ) => Promise<
              | undefined
              | {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalFieldMappingId?: string;
                  dataSourceKey?: string;
                  dataSourceId?: string;
                  appSchema?: DataSchema;
                  direction?: IMPORT | EXPORT | BOTH;
                  defaultImportValue?: any;
                  defaultExportValue?: any;
                  importValue?: any;
                  exportValue?: any;
                  frozenImportFields?: any;
                  frozenExportFields?: any;
                  frozenUnifiedExportFields?: any;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalFieldMappingRevision?: 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;
                          universalFieldMappingId?: string;
                          dataSourceKey?: string;
                          dataSourceId?: string;
                          appSchema?: DataSchema;
                          direction?: IMPORT | EXPORT | BOTH;
                          defaultImportValue?: any;
                          defaultExportValue?: any;
                          importValue?: any;
                          exportValue?: any;
                          frozenImportFields?: any;
                          frozenExportFields?: any;
                          frozenUnifiedExportFields?: any;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalFieldMappingRevision?: 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;
                  universalFieldMappingId?: string;
                  dataSourceKey?: string;
                  dataSourceId?: string;
                  appSchema?: DataSchema;
                  direction?: IMPORT | EXPORT | BOTH;
                  defaultImportValue?: any;
                  defaultExportValue?: any;
                  importValue?: any;
                  exportValue?: any;
                  frozenImportFields?: any;
                  frozenExportFields?: any;
                  frozenUnifiedExportFields?: any;
              },
          ) => Promise<void>;
          archive: () => Promise<void>;
          fieldMapping:
              | undefined
              | {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalFieldMappingId?: string;
                  dataSourceKey?: string;
                  dataSourceId?: string;
                  appSchema?: DataSchema;
                  direction?: IMPORT | EXPORT | BOTH;
                  defaultImportValue?: any;
                  defaultExportValue?: any;
                  importValue?: any;
                  exportValue?: any;
                  frozenImportFields?: any;
                  frozenExportFields?: any;
                  frozenUnifiedExportFields?: any;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalFieldMappingRevision?: 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;
                          universalFieldMappingId?: string;
                          dataSourceKey?: string;
                          dataSourceId?: string;
                          appSchema?: DataSchema;
                          direction?: IMPORT | EXPORT | BOTH;
                          defaultImportValue?: any;
                          defaultExportValue?: any;
                          importValue?: any;
                          exportValue?: any;
                          frozenImportFields?: any;
                          frozenExportFields?: any;
                          frozenUnifiedExportFields?: any;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalFieldMappingRevision?: 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>;
          setup: () => Promise<void>;
          refresh: () => Promise<
              {
                  id: string;
                  key?: string;
                  description?: string;
                  uuid?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  universalFieldMappingId?: string;
                  dataSourceKey?: string;
                  dataSourceId?: string;
                  appSchema?: DataSchema;
                  direction?: IMPORT | EXPORT | BOTH;
                  defaultImportValue?: any;
                  defaultExportValue?: any;
                  importValue?: any;
                  exportValue?: any;
                  frozenImportFields?: any;
                  frozenExportFields?: any;
                  frozenUnifiedExportFields?: any;
                  name: string;
                  state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isCustomized?: boolean;
                  universalFieldMappingRevision?: 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;
                          universalFieldMappingId?: string;
                          dataSourceKey?: string;
                          dataSourceId?: string;
                          appSchema?: DataSchema;
                          direction?: IMPORT | EXPORT | BOTH;
                          defaultImportValue?: any;
                          defaultExportValue?: any;
                          importValue?: any;
                          exportValue?: any;
                          frozenImportFields?: any;
                          frozenExportFields?: any;
                          frozenUnifiedExportFields?: any;
                          name: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isCustomized?: boolean;
                          universalFieldMappingRevision?: 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";
                      };
                  }[];
              },
          >;
          accessor: undefined
          | FieldMappingAccessor;
      }