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

    Function useAppEventSubscription

    • Parameters

      Returns {
          appEventSubscription:
              | {
                  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[];
                  createdAt?: string;
                  updatedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  revision: string;
                  appEventTypeId: string;
                  instanceKey?: string;
                  isSubscribed: boolean;
                  schema?: DataSchema;
                  webhookUri: string;
                  subscriptionRequest: {
                      method?: GET
                      | POST
                      | PATCH
                      | PUT
                      | DELETE;
                      uri: any;
                      headers?: Record<string, any>;
                      query?: Record<string, any>;
                      body?: any;
                  };
                  subscriptionResponse?: any;
                  archivedAt?: string;
                  userId: string;
                  tenantId?: string;
                  appEventType?: {
                      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[];
                      createdAt?: string;
                      updatedAt?: string;
                      isDeactivated?: boolean;
                      isReadOnly?: boolean;
                      revision: string;
                      archivedAt?: string;
                      webhookKey: string;
                      subscribeRequest?: {
                          method?: GET
                          | POST
                          | PATCH
                          | PUT
                          | DELETE;
                          uri: any;
                          headers?: Record<string, any>;
                          query?: Record<string, any>;
                          body?: any;
                      };
                      example?: any;
                      schema?: DataSchema;
                      globalWebhookUri: string;
                      tenantIdFormula?: any;
                      userIdFormula?: any;
                  };
                  user?: {
                      id: string;
                      name: string;
                      meta?: Record<string, any>;
                      internalId: string;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      isActive?: boolean;
                      aiCreditsRolling30DayLimit?: number | null;
                      createdAt?: string;
                      archivedAt?: string;
                  };
              }
              | undefined;
          accessor: AppEventSubscriptionAccessor
          | undefined;
          loading: boolean;
          saving: boolean;
          error: any;
          refresh: () => Promise<
              {
                  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[];
                  createdAt?: string;
                  updatedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  revision: string;
                  appEventTypeId: string;
                  instanceKey?: string;
                  isSubscribed: boolean;
                  schema?: DataSchema;
                  webhookUri: string;
                  subscriptionRequest: {
                      method?: GET
                      | POST
                      | PATCH
                      | PUT
                      | DELETE;
                      uri: any;
                      headers?: Record<string, any>;
                      query?: Record<string, any>;
                      body?: any;
                  };
                  subscriptionResponse?: any;
                  archivedAt?: string;
                  userId: string;
                  tenantId?: string;
                  appEventType?: {
                      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[];
                      createdAt?: string;
                      updatedAt?: string;
                      isDeactivated?: boolean;
                      isReadOnly?: boolean;
                      revision: string;
                      archivedAt?: string;
                      webhookKey: string;
                      subscribeRequest?: {
                          method?: GET
                          | POST
                          | PATCH
                          | PUT
                          | DELETE;
                          uri: any;
                          headers?: Record<string, any>;
                          query?: Record<string, any>;
                          body?: any;
                      };
                      example?: any;
                      schema?: DataSchema;
                      globalWebhookUri: string;
                      tenantIdFormula?: any;
                      userIdFormula?: any;
                  };
                  user?: {
                      id: string;
                      name: string;
                      meta?: Record<string, any>;
                      internalId: string;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      isActive?: boolean;
                      aiCreditsRolling30DayLimit?: number | null;
                      createdAt?: string;
                      archivedAt?: string;
                  };
              },
          >;
          refreshing: boolean;
          create: (
              data: AppEventSubscriptionUpdateRequest,
          ) => Promise<
              | {
                  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[];
                  createdAt?: string;
                  updatedAt?: string;
                  isDeactivated?: boolean;
                  isReadOnly?: boolean;
                  revision: string;
                  appEventTypeId: string;
                  instanceKey?: string;
                  isSubscribed: boolean;
                  schema?: DataSchema;
                  webhookUri: string;
                  subscriptionRequest: {
                      method?: GET
                      | POST
                      | PATCH
                      | PUT
                      | DELETE;
                      uri: any;
                      headers?: Record<string, any>;
                      query?: Record<string, any>;
                      body?: any;
                  };
                  subscriptionResponse?: any;
                  archivedAt?: string;
                  userId: string;
                  tenantId?: string;
                  appEventType?: {
                      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[];
                      createdAt?: string;
                      updatedAt?: string;
                      isDeactivated?: boolean;
                      isReadOnly?: boolean;
                      revision: string;
                      archivedAt?: string;
                      webhookKey: string;
                      subscribeRequest?: {
                          method?: GET
                          | POST
                          | PATCH
                          | PUT
                          | DELETE;
                          uri: any;
                          headers?: Record<(...), (...)>;
                          query?: Record<(...), (...)>;
                          body?: any;
                      };
                      example?: any;
                      schema?: DataSchema;
                      globalWebhookUri: string;
                      tenantIdFormula?: any;
                      userIdFormula?: any;
                  };
                  user?: {
                      id: string;
                      name: string;
                      meta?: Record<string, any>;
                      internalId: string;
                      fields?: Record<string, any>;
                      credentials?: any;
                      lastActiveAt?: string;
                      isTest?: boolean;
                      isBillable?: boolean;
                      isActive?: boolean;
                      aiCreditsRolling30DayLimit?: number | null;
                      createdAt?: string;
                      archivedAt?: string;
                  };
              }
              | undefined,
          >;
          patch: (
              data: Partial<UpdateRequest>,
              options?: MutatorConfig,
          ) => Promise<void>;
          put: (
              data: AppEventSubscriptionUpdateRequest,
              options?: MutatorConfig,
          ) => Promise<void>;
          archive: () => Promise<void>;
      }