use conjure_http::endpoint;
#[conjure_http::conjure_endpoints(
name = "CommentsService",
use_legacy_error_serialization
)]
pub trait CommentsService {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
produces = conjure_http::server::StdResponseSerializer
)]
fn get_conversation(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
produces = conjure_http::server::StdResponseSerializer
)]
fn get_conversation_count(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
log_as = "includeDeleted"
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn get_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn create_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn edit_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn delete_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn pin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
produces = conjure_http::server::StdResponseSerializer
)]
fn unpin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
produces = conjure_http::server::StdResponseSerializer
)]
fn add_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
produces = conjure_http::server::StdResponseSerializer
)]
fn remove_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_endpoints(
name = "CommentsService",
use_legacy_error_serialization
)]
pub trait AsyncCommentsService {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_conversation(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_conversation_count(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
log_as = "includeDeleted"
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn create_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn edit_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn delete_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn pin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn unpin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
produces = conjure_http::server::StdResponseSerializer
)]
async fn add_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
produces = conjure_http::server::StdResponseSerializer
)]
async fn remove_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}
#[conjure_http::conjure_endpoints(
name = "CommentsService",
use_legacy_error_serialization,
local
)]
pub trait LocalAsyncCommentsService {
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}",
name = "getConversation",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_conversation(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
) -> Result<
super::super::super::super::objects::comments::api::Conversation,
conjure_http::private::Error,
>;
#[endpoint(
method = GET,
path = "/comments/v1/conversations/{resourceType}/{resourceRid}/count",
name = "getConversationCount",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_conversation_count(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "resourceType",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceType",
safe
)]
resource_type: super::super::super::super::objects::comments::api::ResourceType,
#[path(
name = "resourceRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "resourceRid"
)]
resource_rid: conjure_object::ResourceIdentifier,
#[query(
name = "includeDeleted",
decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
log_as = "includeDeleted"
)]
include_deleted: Option<bool>,
) -> Result<i32, conjure_http::private::Error>;
#[endpoint(
method = GET,
path = "/comments/v1/comments/{commentRid}",
name = "getComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn get_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = POST,
path = "/comments/v1/comments",
name = "createComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn create_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::CreateCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}",
name = "editComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn edit_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[body(deserializer = conjure_http::server::StdRequestDeserializer)]
request: super::super::super::super::objects::comments::api::EditCommentRequest,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}",
name = "deleteComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn delete_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/pin",
name = "pinComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn pin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/pin",
name = "unpinComment",
produces = conjure_http::server::StdResponseSerializer
)]
async fn unpin_comment(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = PUT,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "addReaction",
produces = conjure_http::server::StdResponseSerializer
)]
async fn add_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
#[endpoint(
method = DELETE,
path = "/comments/v1/comments/{commentRid}/reactions/{type}",
name = "removeReaction",
produces = conjure_http::server::StdResponseSerializer
)]
async fn remove_reaction(
&self,
#[auth]
auth_: conjure_object::BearerToken,
#[path(
name = "commentRid",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "commentRid",
safe
)]
comment_rid: super::super::super::super::objects::comments::api::CommentRid,
#[path(
name = "type",
decoder = conjure_http::server::conjure::FromPlainDecoder,
log_as = "type",
safe
)]
type_: super::super::super::super::objects::comments::api::ReactionType,
) -> Result<
super::super::super::super::objects::comments::api::Comment,
conjure_http::private::Error,
>;
}