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

    Function usePackage

    • Parameters

      • selector: undefined | string

      Returns {
          accessor: undefined | PackageAccessor;
          loading: boolean;
          saving: boolean;
          error: any;
          refresh: () => Promise<
              {
                  id: string;
                  state?: CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  scenarioTemplateId?: string;
                  elements?: { id: string; type: IntegrationElementType; element?: any }[];
                  integrationId?: string;
                  parentId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          scenarioTemplateId?: string;
                          elements?: { id: ...; type: ...; element?: ... }[];
                          integrationId?: string;
                          parentId?: string;
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                      };
                      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: {
                  key?: string;
                  name?: string;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  scenarioTemplateId?: string;
                  elements?: { id: string; type: IntegrationElementType; element?: any }[];
                  integrationId?: string;
                  parentId?: string;
              },
          ) => Promise<
              | undefined
              | {
                  id: string;
                  state?: CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  scenarioTemplateId?: string;
                  elements?: { id: string; type: IntegrationElementType; element?: any }[];
                  integrationId?: string;
                  parentId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<(...), (...)>;
                          scenarioTemplateId?: string;
                          elements?: (...)[];
                          integrationId?: string;
                          parentId?: string;
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                      };
                      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: UpdateRequest) => Promise<void>;
          archive: () => Promise<void>;
          package:
              | undefined
              | {
                  id: string;
                  state?: CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  scenarioTemplateId?: string;
                  elements?: { id: string; type: IntegrationElementType; element?: any }[];
                  integrationId?: string;
                  parentId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?: CONFIGURATION_ERROR | SETUP_FAILED | READY;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          scenarioTemplateId?: string;
                          elements?: { id: string; type: IntegrationElementType; element?: any }[];
                          integrationId?: string;
                          parentId?: string;
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                      };
                      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";
                      };
                  }[];
              };
      }