def delete(self, triggertype_ref_or_id):
        """
        Delete a triggertype.

        Handles requests:
            DELETE /triggertypes/1
            DELETE /triggertypes/pack.name
        """
        LOG.info("DELETE /triggertypes/ with ref_or_id=%s", triggertype_ref_or_id)

        triggertype_db = self._get_by_ref_or_id(ref_or_id=triggertype_ref_or_id)
        triggertype_id = triggertype_db.id

        try:
            validate_not_part_of_system_pack(triggertype_db)
        except ValueValidationException as e:
            abort(http_client.BAD_REQUEST, six.text_type(e))

        try:
            TriggerType.delete(triggertype_db)
        except Exception as e:
            LOG.exception(
                'Database delete encountered exception during delete of id="%s". ',
                triggertype_id,
            )
            abort(http_client.INTERNAL_SERVER_ERROR, six.text_type(e))
            return
        else:
            extra = {"triggertype": triggertype_db}
            LOG.audit(
                "TriggerType deleted. TriggerType.id=%s" % (triggertype_db.id),
                extra=extra,
            )
            if not triggertype_db.parameters_schema:
                TriggerTypeController._delete_shadow_trigger(triggertype_db)

        return Response(status=http_client.NO_CONTENT)

        Delete a triggertype.

        Handles requests:
            DELETE /triggertypes/1
            DELETE /triggertypes/pack.name
        
st2api/st2api/controllers/v1/triggers.py