Setu-TS
    Preparing search index...

    Function createCapabilityToken

    • Creates a custom capability token for third-party plugins.

      Tokens must be lowercase kebab-case (my-capability). Namespacing by vendor is recommended for community plugins to avoid collisions with standard tokens (acme.payment-gateway).

      Parameters

      • name: string

        The token name; lowercase kebab-case segments, optionally separated by dots for namespacing

      Returns string

      The validated capability token

      If the name is not lowercase kebab-case

      const PAYMENTS = createCapabilityToken('acme.payment-gateway');
      ctx.services.register(PAYMENTS, new StripeGateway());

      0.1.0