"""
Social Media Publishing Profiles
Identify profiles the authenticated user is authorized to publish to (e.g. Facebook page, Instagram business account, or LinkedIn organization page).
"""

name = "social-media/publishing-profiles"
version = "1.0.1"

"""
Get Profiles for Publishing
Retrieve social media profiles (pages, accounts) the authenticated user is authorized to publish to.
"""
usecase GetProfilesForPublishing safe {
  result {
    profiles [
      {
        "Profile ID"
        id! string
        "Profile name (non-unique)"
        name string
        """
        Username or vanity name
        Only where applicable
        """
        username string
        "Profile image (avatar) URL"
        imageUrl string
      }
  ]}

  error {
    """
    Title
    A short, human-readable summary of the problem type.
    """
    title!

    """
    A human-readable explanation specific to this occurrence of the problem.
    """
    detail
  }

  example Successful {
    result {
      profiles = [
        {
          id = "110658944785122",
          name = "Sf-test",
          username = "sftest7904",
          imageUrl = "https://scontent-prg1-1.xx.fbcdn.net/v/t39.30808-1/cp0/p50x50/263679317_110659048118445_8251344428401368545_n.png?_nc_cat=103&ccb=1-5&_nc_sid=dbb9e7&_nc_ohc=kN4tKgxAWdYAX_B0I6K&_nc_ht=scontent-prg1-1.xx&edm=AGaHXAAEAAAA&oh=00_AT8KpGTOc-H8gJrtOJwvNasfXrW8I27s0h1T5a8_nxUeyg&oe=61EDD39E",
        }
      ]
    }
  }

  example Failed {
    error {
      title = 'Unauthorized'
    }
  }
}