@squidcloud/backend
    Preparing search index...

    Function secureTopic

    • Decorator that marks a function for securing a topic in a message queue. The decorator takes the topic name, type of action, and an optional integration ID. If no integration ID is provided, the built_in_queue integration is used.

      The function should return a boolean or a Promise of a boolean indicating whether the action is allowed.

      To read more about securing a topic, see the documentation.

      Type Parameters

      • T extends TopicActionType

      Parameters

      • topicName: string

        The name of the topic to secure.

      • type: T

        The type of action to secure.

      • OptionalintegrationId: string

        The ID of the integration to secure.

      Returns ActionMethodDecorator<SecureTopicAction<T>>