@namespace("Switchboard") protocol Channel { /** A Chat Channel, includes basic information allowing client to setup */ record Channel { /** The Avvo ID for the partner user of the channel */ int id; /** The Twilio Service ID for the Channel */ string channel_sid; /** The Avvo ID for the operating user */ int operating_user_id; /** The Twilio Service ID for the operating user */ string operating_user_sid; /** The Twilio Unique Identifier for the operating user */ string operating_user_identity; /** The Twilio Service ID for the partner user */ string partner_sid; /** The Twilio Unique Identifier for the partner user */ string partner_identity; /** Is the channel archived by the operating user */ boolean archived; /** Is the channel marked as spam by the operating user */ boolean spam; } /** Accepted parameters for filtering channels */ record ChannelSearchParams { /** Show only records marked as spam? */ union { boolean, null } spam; /** Show only records marked as archived */ union { boolean, null } archived; /** Filter the given user's channels by the user id of the partner user */ union { int, null } partner_user_id; } /** Accepted inbound attributes for updating a channel */ record UpdateChannelParams { /** Should the new record be marked as spam? */ union { boolean, null } spam; /** Should the new record be archived? */ union { boolean, null } archived; } array index(ChannelSearchParams params); array show(int id); array update(int id, UpdateChannelParams `channel`); }