* Whether the given agent visibility is visible to a viewer whose tier * either does or does not grant API access. Owners see their own agents * regardless; this helper is for non-owner listings only.
(visibility: AgentVisibility, viewerHasApiAccess: boolean)
| 80 | * regardless; this helper is for non-owner listings only. |
| 81 | */ |
| 82 | private isVisibleToViewer(visibility: AgentVisibility, viewerHasApiAccess: boolean): boolean { |
| 83 | if (visibility === 'public') return true; |
| 84 | if (visibility === 'members_only') return viewerHasApiAccess; |
| 85 | return false; |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Get agent by URL |
no outgoing calls
no test coverage detected