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

    Function usePackage

    • Parameters

      • selector: string | undefined

      Returns {
          accessor: PackageAccessor | undefined;
          loading: boolean;
          saving: boolean;
          error: any;
          refresh: () => Promise<
              {
                  id: string;
                  state?: | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  integrationUuid?: string;
                  integrationKey?: string;
                  parentId?: string;
                  parentUuid?: string;
                  parentKey?: string;
                  connectionId?: string;
                  instanceKey?: string;
                  isUniversal?: boolean;
                  externalAppId?: string;
                  externalAppUuid?: string;
                  externalAppKey?: string;
                  scenarioTemplateId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  isPublic?: boolean;
                  elements?: { id: string; type: WorkspaceElementType; element?: any }[];
                  version?: string;
                  changelog?: string;
                  parentPackageVersion?: string;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isReadOnly?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          integrationId?: string;
                          integrationUuid?: string;
                          integrationKey?: string;
                          parentId?: string;
                          parentUuid?: string;
                          parentKey?: string;
                          connectionId?: string;
                          instanceKey?: string;
                          isUniversal?: boolean;
                          externalAppId?: string;
                          externalAppUuid?: string;
                          externalAppKey?: string;
                          scenarioTemplateId?: string;
                          elements?: { id: ...; type: ...; element?: ... }[];
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                          isPublic?: boolean;
                      };
                      integration: {
                          id: string;
                          uuid?: string;
                          key?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          name: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          isReadOnly?: boolean;
                          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;
                          externalAppId?: string;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?: | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                          optionsConfig?: Record<string, { disabled?: ...; parameters?: ... }>;
                      };
                  }[];
              },
          >;
          refreshing: boolean;
          create: (
              data: {
                  uuid?: string;
                  key?: string;
                  name?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  integrationUuid?: string;
                  integrationKey?: string;
                  parentId?: string;
                  parentUuid?: string;
                  parentKey?: string;
                  connectionId?: string;
                  instanceKey?: string;
                  isUniversal?: boolean;
                  externalAppId?: string;
                  externalAppUuid?: string;
                  externalAppKey?: string;
                  scenarioTemplateId?: string;
                  elements?: { id: string; type: WorkspaceElementType; element?: any }[];
              },
          ) => Promise<
              | {
                  id: string;
                  state?: | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  integrationUuid?: string;
                  integrationKey?: string;
                  parentId?: string;
                  parentUuid?: string;
                  parentKey?: string;
                  connectionId?: string;
                  instanceKey?: string;
                  isUniversal?: boolean;
                  externalAppId?: string;
                  externalAppUuid?: string;
                  externalAppKey?: string;
                  scenarioTemplateId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  isPublic?: boolean;
                  elements?: { id: string; type: WorkspaceElementType; element?: any }[];
                  version?: string;
                  changelog?: string;
                  parentPackageVersion?: string;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isReadOnly?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<(...), (...)>;
                          integrationId?: string;
                          integrationUuid?: string;
                          integrationKey?: string;
                          parentId?: string;
                          parentUuid?: string;
                          parentKey?: string;
                          connectionId?: string;
                          instanceKey?: string;
                          isUniversal?: boolean;
                          externalAppId?: string;
                          externalAppUuid?: string;
                          externalAppKey?: string;
                          scenarioTemplateId?: string;
                          elements?: (...)[];
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                          isPublic?: boolean;
                      };
                      integration: {
                          id: string;
                          uuid?: string;
                          key?: string;
                          description?: string;
                          meta?: Record<(...), (...)>;
                          name: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: (...)[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          isReadOnly?: boolean;
                          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;
                          externalAppId?: string;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?:
                              | "proxy"
                              | "integration-app-token"
                              | "membrane-token"
                              | "oauth2"
                              | "oauth1"
                              | "client-credentials";
                          optionsConfig?: Record<(...), (...)>;
                      };
                  }[];
              }
              | undefined,
          >;
          patch: (
              data: Partial<UpdateRequest>,
              options?: MutatorConfig,
          ) => Promise<void>;
          put: (data: UpdateRequest, options?: MutatorConfig) => Promise<void>;
          archive: () => Promise<void>;
          package:
              | {
                  id: string;
                  state?: | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  archivedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  uuid?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  integrationId?: string;
                  integrationUuid?: string;
                  integrationKey?: string;
                  parentId?: string;
                  parentUuid?: string;
                  parentKey?: string;
                  connectionId?: string;
                  instanceKey?: string;
                  isUniversal?: boolean;
                  externalAppId?: string;
                  externalAppUuid?: string;
                  externalAppKey?: string;
                  scenarioTemplateId?: string;
                  key: string;
                  name: string;
                  isCustomized?: boolean;
                  isPublic?: boolean;
                  elements?: { id: string; type: WorkspaceElementType; element?: any }[];
                  version?: string;
                  changelog?: string;
                  parentPackageVersion?: string;
                  appliedToIntegrations?: {
                      element: {
                          id: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          archivedAt?: string;
                          isDeactivated?: boolean;
                          isReadOnly?: boolean;
                          uuid?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          integrationId?: string;
                          integrationUuid?: string;
                          integrationKey?: string;
                          parentId?: string;
                          parentUuid?: string;
                          parentKey?: string;
                          connectionId?: string;
                          instanceKey?: string;
                          isUniversal?: boolean;
                          externalAppId?: string;
                          externalAppUuid?: string;
                          externalAppKey?: string;
                          scenarioTemplateId?: string;
                          elements?: { id: string; type: WorkspaceElementType; element?: any }[];
                          key: string;
                          name: string;
                          isCustomized?: boolean;
                          isPublic?: boolean;
                      };
                      integration: {
                          id: string;
                          uuid?: string;
                          key?: string;
                          description?: string;
                          meta?: Record<string, any>;
                          name: string;
                          state?:
                              | BUILDING
                              | CLIENT_ACTION_REQUIRED
                              | CONFIGURATION_ERROR
                              | SETUP_FAILED
                              | READY
                              | DISCONNECTING;
                          errors?: ErrorDataSchema[];
                          revision?: string;
                          createdAt?: string;
                          updatedAt?: string;
                          isReadOnly?: boolean;
                          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;
                          externalAppId?: string;
                          appUuid?: string;
                          isDeactivated?: boolean;
                          authType?: | "proxy"
                          | "integration-app-token"
                          | "membrane-token"
                          | "oauth2"
                          | "oauth1"
                          | "client-credentials";
                          optionsConfig?: Record<
                              string,
                              { disabled?: (...)
                              | (...)
                              | (...); parameters?: (...) | (...) },
                          >;
                      };
                  }[];
              }
              | undefined;
      }