diff --git a/README.md b/README.md index b0212f8..fd164ea 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This library contains the generated API client and the SSO utilities to make wor For the API client, there are three API modules, `api_default`, `api_public`, and `api_moderation`. The `api_default` contains methods that require your API key, and `api_public` contains api calls that can be made directly from a browser/mobile device/etc without authentication. The `api_moderation` module contains methods for the moderator dashboard. -The `api_moderation` methods cover listing, counting, searching, and exporting comments and their logs; moderation actions like removing/restoring comments, flagging, setting review/spam/approval status, adjusting votes, and reopening/closing threads; bans (banning a user from a comment, undoing a ban, pre-ban summaries, ban status and preferences, and banned-user counts); and badges & trust (awarding/removing a badge, listing manual badges, getting/setting a user's trust factor, and fetching a user's internal profile). Every `api_moderation` method accepts an `sso` parameter so the call is authenticated as an SSO moderator. +The `api_moderation` module provides an extensive suite of live and fast moderation APIs. Every `api_moderation` method accepts an `sso` parameter and can authenticate via SSO or a FastComments.com session cookie. ## Quick Start @@ -48,24 +48,16 @@ import fastcomments/models/model_comment_data let client = newHttpClient() client.headers["x-api-key"] = "your-api-key" -# Make authenticated API calls +# Make authenticated API calls. +# Required parameters (and the request body) are positional; optional +# parameters are passed via the operation's options object. let (response, httpResponse) = getComments( httpClient = client, tenantId = "your-tenant-id", - page = 0, - limit = 0, - skip = 0, - asTree = false, - skipChildren = 0, - limitChildren = 0, - maxTreeDepth = 0, - urlId = "your-url-id", - userId = "", - anonUserId = "", - contextUserId = "", - hashTag = "", - parentId = "", - direction = SortDirections.DESC + options = GetCommentsOptions( + urlId: "your-url-id", + direction: SortDirections.DESC + ) ) if response.isSome: @@ -85,37 +77,15 @@ import fastcomments/apis/api_public let client = newHttpClient() -# Make public API calls +# Make public API calls. +# tenantId and urlId are required (positional); everything else is optional. let (response, httpResponse) = getCommentsPublic( httpClient = client, tenantId = "your-tenant-id", urlId = "your-url-id", - page = 0, - direction = SortDirections.DESC, - sso = "", - skip = 0, - skipChildren = 0, - limit = 0, - limitChildren = 0, - countChildren = false, - fetchPageForCommentId = "", - includeConfig = false, - countAll = false, - includei10n = false, - locale = "", - modules = "", - isCrawler = false, - includeNotificationCount = false, - asTree = false, - maxTreeDepth = 0, - useFullTranslationIds = false, - parentId = "", - searchText = "", - hashTags = @[], - userId = "", - customConfigStr = "", - afterCommentId = "", - beforeCommentId = "" + options = GetCommentsPublicOptions( + direction: SortDirections.DESC + ) ) if response.isSome: @@ -135,18 +105,15 @@ import fastcomments/apis/api_moderation let client = newHttpClient() -# List comments in the moderation dashboard +# List comments in the moderation dashboard. +# This operation has no required parameters, so everything is optional. let (response, httpResponse) = getApiComments( httpClient = client, - page = 0, - count = 30, - textSearch = "", - byIPFromComment = "", - filters = "", - searchFilters = "", - sorts = "", - demo = false, - sso = "your-sso-token" + options = GetApiCommentsOptions( + count: 30, + tenantId: "your-tenant-id", + sso: "your-sso-token" + ) ) if response.isSome: @@ -163,6 +130,8 @@ if response.isSome: All API methods in this SDK return tuples of `(Option[ResponseType], Response)`. The first element contains the parsed response if successful, and the second element is the raw HTTP response. +Required parameters and the request body are passed positionally. The remaining optional parameters are collected into a single `ApiOptions` object, which is the last argument. Operations with no optional parameters take no options object. + ### Example: Fetching Comments ```nim @@ -177,20 +146,10 @@ client.headers["x-api-key"] = "your-api-key" let (response, httpResponse) = getComments( httpClient = client, tenantId = "your-tenant-id", - page = 0, - limit = 0, - skip = 0, - asTree = false, - skipChildren = 0, - limitChildren = 0, - maxTreeDepth = 0, - urlId = "your-url-id", - userId = "", - anonUserId = "", - contextUserId = "", - hashTag = "", - parentId = "", - direction = SortDirections.DESC + options = GetCommentsOptions( + urlId: "your-url-id", + direction: SortDirections.DESC + ) ) if httpResponse.code == Http200: diff --git a/client/README.md b/client/README.md index bcaecc6..9590c81 100644 --- a/client/README.md +++ b/client/README.md @@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 0.0.0 -- Package version: 1.1.1 +- Package version: 3.0.0 - Generator version: 7.23.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.NimClientCodegen @@ -139,49 +139,49 @@ api_default | updateTenant | **PATCH** /api/v1/tenants/{id} | api_default | updateTenantPackage | **PATCH** /api/v1/tenant-packages/{id} | api_default | updateTenantUser | **PATCH** /api/v1/tenant-users/{id} | api_default | updateUserBadge | **PUT** /api/v1/user-badges/{id} | -api_moderation | deleteModerationVote | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | -api_moderation | getApiComments | **GET** /auth/my-account/moderate-comments/api/comments | -api_moderation | getApiExportStatus | **GET** /auth/my-account/moderate-comments/api/export/status | -api_moderation | getApiIds | **GET** /auth/my-account/moderate-comments/api/ids | -api_moderation | getBanUsersFromComment | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | -api_moderation | getCommentBanStatus | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | -api_moderation | getCommentChildren | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | -api_moderation | getCount | **GET** /auth/my-account/moderate-comments/count | -api_moderation | getCounts | **GET** /auth/my-account/moderate-comments/banned-users/counts | -api_moderation | getLogs | **GET** /auth/my-account/moderate-comments/logs/{commentId} | -api_moderation | getManualBadges | **GET** /auth/my-account/moderate-comments/get-manual-badges | -api_moderation | getManualBadgesForUser | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | -api_moderation | getModerationComment | **GET** /auth/my-account/moderate-comments/comment/{commentId} | -api_moderation | getModerationCommentText | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | -api_moderation | getPreBanSummary | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | -api_moderation | getSearchCommentsSummary | **GET** /auth/my-account/moderate-comments/search/comments/summary | -api_moderation | getSearchPages | **GET** /auth/my-account/moderate-comments/search/pages | -api_moderation | getSearchSites | **GET** /auth/my-account/moderate-comments/search/sites | -api_moderation | getSearchSuggest | **GET** /auth/my-account/moderate-comments/search/suggest | -api_moderation | getSearchUsers | **GET** /auth/my-account/moderate-comments/search/users | -api_moderation | getTrustFactor | **GET** /auth/my-account/moderate-comments/get-trust-factor | -api_moderation | getUserBanPreference | **GET** /auth/my-account/moderate-comments/user-ban-preference | -api_moderation | getUserInternalProfile | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | -api_moderation | postAdjustCommentVotes | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | -api_moderation | postApiExport | **POST** /auth/my-account/moderate-comments/api/export | -api_moderation | postBanUserFromComment | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | -api_moderation | postBanUserUndo | **POST** /auth/my-account/moderate-comments/ban-user/undo | -api_moderation | postBulkPreBanSummary | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | -api_moderation | postCommentsByIds | **POST** /auth/my-account/moderate-comments/comments-by-ids | -api_moderation | postFlagComment | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | -api_moderation | postRemoveComment | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | -api_moderation | postRestoreDeletedComment | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | -api_moderation | postSetCommentApprovalStatus | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | -api_moderation | postSetCommentReviewStatus | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | -api_moderation | postSetCommentSpamStatus | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | -api_moderation | postSetCommentText | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | -api_moderation | postUnFlagComment | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | -api_moderation | postVote | **POST** /auth/my-account/moderate-comments/vote/{commentId} | -api_moderation | putAwardBadge | **PUT** /auth/my-account/moderate-comments/award-badge | -api_moderation | putCloseThread | **PUT** /auth/my-account/moderate-comments/close-thread | -api_moderation | putRemoveBadge | **PUT** /auth/my-account/moderate-comments/remove-badge | -api_moderation | putReopenThread | **PUT** /auth/my-account/moderate-comments/reopen-thread | -api_moderation | setTrustFactor | **PUT** /auth/my-account/moderate-comments/set-trust-factor | +api_moderation | deleteModerationVote | **DELETE** /auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId} | +api_moderation | getApiComments | **GET** /auth/my-account/moderate-comments/mod_api/api/comments | +api_moderation | getApiExportStatus | **GET** /auth/my-account/moderate-comments/mod_api/api/export/status | +api_moderation | getApiIds | **GET** /auth/my-account/moderate-comments/mod_api/api/ids | +api_moderation | getBanUsersFromComment | **GET** /auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId} | +api_moderation | getCommentBanStatus | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId} | +api_moderation | getCommentChildren | **GET** /auth/my-account/moderate-comments/mod_api/comment-children/{commentId} | +api_moderation | getCount | **GET** /auth/my-account/moderate-comments/mod_api/count | +api_moderation | getCounts | **GET** /auth/my-account/moderate-comments/banned-users/mod_api/counts | +api_moderation | getLogs | **GET** /auth/my-account/moderate-comments/mod_api/logs/{commentId} | +api_moderation | getManualBadges | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges | +api_moderation | getManualBadgesForUser | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user | +api_moderation | getModerationComment | **GET** /auth/my-account/moderate-comments/mod_api/comment/{commentId} | +api_moderation | getModerationCommentText | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId} | +api_moderation | getPreBanSummary | **GET** /auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId} | +api_moderation | getSearchCommentsSummary | **GET** /auth/my-account/moderate-comments/mod_api/search/comments/summary | +api_moderation | getSearchPages | **GET** /auth/my-account/moderate-comments/mod_api/search/pages | +api_moderation | getSearchSites | **GET** /auth/my-account/moderate-comments/mod_api/search/sites | +api_moderation | getSearchSuggest | **GET** /auth/my-account/moderate-comments/mod_api/search/suggest | +api_moderation | getSearchUsers | **GET** /auth/my-account/moderate-comments/mod_api/search/users | +api_moderation | getTrustFactor | **GET** /auth/my-account/moderate-comments/mod_api/get-trust-factor | +api_moderation | getUserBanPreference | **GET** /auth/my-account/moderate-comments/mod_api/user-ban-preference | +api_moderation | getUserInternalProfile | **GET** /auth/my-account/moderate-comments/mod_api/get-user-internal-profile | +api_moderation | postAdjustCommentVotes | **POST** /auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId} | +api_moderation | postApiExport | **POST** /auth/my-account/moderate-comments/mod_api/api/export | +api_moderation | postBanUserFromComment | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId} | +api_moderation | postBanUserUndo | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/undo | +api_moderation | postBulkPreBanSummary | **POST** /auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary | +api_moderation | postCommentsByIds | **POST** /auth/my-account/moderate-comments/mod_api/comments-by-ids | +api_moderation | postFlagComment | **POST** /auth/my-account/moderate-comments/mod_api/flag-comment/{commentId} | +api_moderation | postRemoveComment | **POST** /auth/my-account/moderate-comments/mod_api/remove-comment/{commentId} | +api_moderation | postRestoreDeletedComment | **POST** /auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId} | +api_moderation | postSetCommentApprovalStatus | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId} | +api_moderation | postSetCommentReviewStatus | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId} | +api_moderation | postSetCommentSpamStatus | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId} | +api_moderation | postSetCommentText | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId} | +api_moderation | postUnFlagComment | **POST** /auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId} | +api_moderation | postVote | **POST** /auth/my-account/moderate-comments/mod_api/vote/{commentId} | +api_moderation | putAwardBadge | **PUT** /auth/my-account/moderate-comments/mod_api/award-badge | +api_moderation | putCloseThread | **PUT** /auth/my-account/moderate-comments/mod_api/close-thread | +api_moderation | putRemoveBadge | **PUT** /auth/my-account/moderate-comments/mod_api/remove-badge | +api_moderation | putReopenThread | **PUT** /auth/my-account/moderate-comments/mod_api/reopen-thread | +api_moderation | setTrustFactor | **PUT** /auth/my-account/moderate-comments/mod_api/set-trust-factor | api_public | blockFromCommentPublic | **POST** /block-from-comment/{commentId} | api_public | checkedCommentsForBlocked | **GET** /check-blocked-comments | api_public | createCommentPublic | **POST** /comments/{tenantId} | diff --git a/client/fastcomments.nim b/client/fastcomments.nim index cb782f5..28f15e2 100644 --- a/client/fastcomments.nim +++ b/client/fastcomments.nim @@ -267,7 +267,7 @@ import fastcomments/models/model_patch_domain_config_response import fastcomments/models/model_patch_page_api_response import fastcomments/models/model_patch_sso_user_api_response import fastcomments/models/model_pending_comment_to_sync_outbound -import fastcomments/models/model_post_remove_comment_response +import fastcomments/models/model_post_remove_comment_api_response import fastcomments/models/model_pre_ban_summary import fastcomments/models/model_pub_sub_comment import fastcomments/models/model_pub_sub_comment_base @@ -628,7 +628,7 @@ export model_patch_domain_config_response export model_patch_page_api_response export model_patch_sso_user_api_response export model_pending_comment_to_sync_outbound -export model_post_remove_comment_response +export model_post_remove_comment_api_response export model_pre_ban_summary export model_pub_sub_comment export model_pub_sub_comment_base diff --git a/client/fastcomments/apis/api_default.nim b/client/fastcomments/apis/api_default.nim index cf35ffc..4a8a7fa 100644 --- a/client/fastcomments/apis/api_default.nim +++ b/client/fastcomments/apis/api_default.nim @@ -183,8 +183,7 @@ proc addHashTag*(httpClient: HttpClient, tenantId: string, createHashTagBody: Cr ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] - if $tenantId != "": - query_params_list.add(("tenantId", $tenantId)) + query_params_list.add(("tenantId", $tenantId)) let url_encoded_query_params = encodeQuery(query_params_list) let response = httpClient.post(basepath & "/api/v1/hash-tags" & "?" & url_encoded_query_params, $(%createHashTagBody)) @@ -195,8 +194,7 @@ proc addHashTagsBulk*(httpClient: HttpClient, tenantId: string, bulkCreateHashTa ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] - if $tenantId != "": - query_params_list.add(("tenantId", $tenantId)) + query_params_list.add(("tenantId", $tenantId)) let url_encoded_query_params = encodeQuery(query_params_list) let response = httpClient.post(basepath & "/api/v1/hash-tags/bulk" & "?" & url_encoded_query_params, $(%bulkCreateHashTagsBody)) @@ -225,7 +223,13 @@ proc addSSOUser*(httpClient: HttpClient, tenantId: string, createAPISSOUserData: constructResult[AddSSOUserAPIResponse](response) -proc aggregate*(httpClient: HttpClient, tenantId: string, aggregationRequest: AggregationRequest, parentTenantId: string, includeStats: bool): (Option[AggregateResponse], Response) = +type AggregateOptions* = object + parentTenantId*: string + includeStats*: bool + +proc aggregate*(httpClient: HttpClient, tenantId: string, aggregationRequest: AggregationRequest, options: AggregateOptions): (Option[AggregateResponse], Response) = + let parentTenantId = options.parentTenantId + let includeStats = options.includeStats ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -240,7 +244,21 @@ proc aggregate*(httpClient: HttpClient, tenantId: string, aggregationRequest: Ag constructResult[AggregateResponse](response) -proc aggregateQuestionResults*(httpClient: HttpClient, tenantId: string, questionId: string, questionIds: seq[string], urlId: string, timeBucket: AggregateTimeBucket, startDate: string, forceRecalculate: bool): (Option[AggregateQuestionResultsResponse], Response) = +type AggregateQuestionResultsOptions* = object + questionId*: string + questionIds*: seq[string] + urlId*: string + timeBucket*: AggregateTimeBucket + startDate*: string + forceRecalculate*: bool + +proc aggregateQuestionResults*(httpClient: HttpClient, tenantId: string, options: AggregateQuestionResultsOptions): (Option[AggregateQuestionResultsResponse], Response) = + let questionId = options.questionId + let questionIds = options.questionIds + let urlId = options.urlId + let timeBucket = options.timeBucket + let startDate = options.startDate + let forceRecalculate = options.forceRecalculate ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -262,7 +280,13 @@ proc aggregateQuestionResults*(httpClient: HttpClient, tenantId: string, questio constructResult[AggregateQuestionResultsResponse](response) -proc blockUserFromComment*(httpClient: HttpClient, tenantId: string, id: string, blockFromCommentParams: BlockFromCommentParams, userId: string, anonUserId: string): (Option[BlockSuccess], Response) = +type BlockUserFromCommentOptions* = object + userId*: string + anonUserId*: string + +proc blockUserFromComment*(httpClient: HttpClient, tenantId: string, id: string, blockFromCommentParams: BlockFromCommentParams, options: BlockUserFromCommentOptions): (Option[BlockSuccess], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -302,7 +326,25 @@ proc changeTicketState*(httpClient: HttpClient, tenantId: string, userId: string constructResult[ChangeTicketStateResponse](response) -proc combineCommentsWithQuestionResults*(httpClient: HttpClient, tenantId: string, questionId: string, questionIds: seq[string], urlId: string, startDate: string, forceRecalculate: bool, minValue: float64, maxValue: float64, limit: float64): (Option[CombineQuestionResultsWithCommentsResponse], Response) = +type CombineCommentsWithQuestionResultsOptions* = object + questionId*: string + questionIds*: seq[string] + urlId*: string + startDate*: string + forceRecalculate*: bool + minValue*: float64 + maxValue*: float64 + limit*: float64 + +proc combineCommentsWithQuestionResults*(httpClient: HttpClient, tenantId: string, options: CombineCommentsWithQuestionResultsOptions): (Option[CombineQuestionResultsWithCommentsResponse], Response) = + let questionId = options.questionId + let questionIds = options.questionIds + let urlId = options.urlId + let startDate = options.startDate + let forceRecalculate = options.forceRecalculate + let minValue = options.minValue + let maxValue = options.maxValue + let limit = options.limit ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -339,7 +381,17 @@ proc createEmailTemplate*(httpClient: HttpClient, tenantId: string, createEmailT constructResult[CreateEmailTemplateResponse](response) -proc createFeedPost*(httpClient: HttpClient, tenantId: string, createFeedPostParams: CreateFeedPostParams, broadcastId: string, isLive: bool, doSpamCheck: bool, skipDupCheck: bool): (Option[CreateFeedPostsResponse], Response) = +type CreateFeedPostOptions* = object + broadcastId*: string + isLive*: bool + doSpamCheck*: bool + skipDupCheck*: bool + +proc createFeedPost*(httpClient: HttpClient, tenantId: string, createFeedPostParams: CreateFeedPostParams, options: CreateFeedPostOptions): (Option[CreateFeedPostsResponse], Response) = + let broadcastId = options.broadcastId + let isLive = options.isLive + let doSpamCheck = options.doSpamCheck + let skipDupCheck = options.skipDupCheck ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -458,7 +510,13 @@ proc createUserBadge*(httpClient: HttpClient, tenantId: string, createUserBadgeP constructResult[APICreateUserBadgeResponse](response) -proc createVote*(httpClient: HttpClient, tenantId: string, commentId: string, direction: string, userId: string, anonUserId: string): (Option[VoteResponse], Response) = +type CreateVoteOptions* = object + userId*: string + anonUserId*: string + +proc createVote*(httpClient: HttpClient, tenantId: string, commentId: string, direction: string, options: CreateVoteOptions): (Option[VoteResponse], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -474,7 +532,13 @@ proc createVote*(httpClient: HttpClient, tenantId: string, commentId: string, di constructResult[VoteResponse](response) -proc deleteComment*(httpClient: HttpClient, tenantId: string, id: string, contextUserId: string, isLive: bool): (Option[DeleteCommentResult], Response) = +type DeleteCommentOptions* = object + contextUserId*: string + isLive*: bool + +proc deleteComment*(httpClient: HttpClient, tenantId: string, id: string, options: DeleteCommentOptions): (Option[DeleteCommentResult], Response) = + let contextUserId = options.contextUserId + let isLive = options.isLive ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -518,18 +582,17 @@ proc deleteEmailTemplateRenderError*(httpClient: HttpClient, tenantId: string, i constructResult[APIEmptyResponse](response) -proc deleteHashTag*(httpClient: HttpClient, tag: string, tenantId: string, deleteHashTagRequestBody: DeleteHashTagRequestBody): (Option[APIEmptyResponse], Response) = +proc deleteHashTag*(httpClient: HttpClient, tenantId: string, tag: string, deleteHashTagRequestBody: DeleteHashTagRequestBody): (Option[APIEmptyResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] - if $tenantId != "": - query_params_list.add(("tenantId", $tenantId)) + query_params_list.add(("tenantId", $tenantId)) let url_encoded_query_params = encodeQuery(query_params_list) let response = httpClient.request(basepath & fmt"/api/v1/hash-tags/{tag}" & "?" & url_encoded_query_params, httpMethod = HttpDelete, body = $(%deleteHashTagRequestBody)) constructResult[APIEmptyResponse](response) -proc deleteModerator*(httpClient: HttpClient, tenantId: string, id: string, sendEmail: string): (Option[APIEmptyResponse], Response) = +proc deleteModerator*(httpClient: HttpClient, tenantId: string, id: string, sendEmail: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -591,7 +654,13 @@ proc deleteQuestionResult*(httpClient: HttpClient, tenantId: string, id: string) constructResult[APIEmptyResponse](response) -proc deleteSSOUser*(httpClient: HttpClient, tenantId: string, id: string, deleteComments: bool, commentDeleteMode: string): (Option[DeleteSSOUserAPIResponse], Response) = +type DeleteSSOUserOptions* = object + deleteComments*: bool + commentDeleteMode*: string + +proc deleteSSOUser*(httpClient: HttpClient, tenantId: string, id: string, options: DeleteSSOUserOptions): (Option[DeleteSSOUserAPIResponse], Response) = + let deleteComments = options.deleteComments + let commentDeleteMode = options.commentDeleteMode ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -605,7 +674,7 @@ proc deleteSSOUser*(httpClient: HttpClient, tenantId: string, id: string, delete constructResult[DeleteSSOUserAPIResponse](response) -proc deleteSubscription*(httpClient: HttpClient, tenantId: string, id: string, userId: string): (Option[DeleteSubscriptionAPIResponse], Response) = +proc deleteSubscription*(httpClient: HttpClient, tenantId: string, id: string, userId: string = ""): (Option[DeleteSubscriptionAPIResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -617,7 +686,7 @@ proc deleteSubscription*(httpClient: HttpClient, tenantId: string, id: string, u constructResult[DeleteSubscriptionAPIResponse](response) -proc deleteTenant*(httpClient: HttpClient, tenantId: string, id: string, sure: string): (Option[APIEmptyResponse], Response) = +proc deleteTenant*(httpClient: HttpClient, tenantId: string, id: string, sure: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -639,7 +708,13 @@ proc deleteTenantPackage*(httpClient: HttpClient, tenantId: string, id: string): constructResult[APIEmptyResponse](response) -proc deleteTenantUser*(httpClient: HttpClient, tenantId: string, id: string, deleteComments: string, commentDeleteMode: string): (Option[APIEmptyResponse], Response) = +type DeleteTenantUserOptions* = object + deleteComments*: string + commentDeleteMode*: string + +proc deleteTenantUser*(httpClient: HttpClient, tenantId: string, id: string, options: DeleteTenantUserOptions): (Option[APIEmptyResponse], Response) = + let deleteComments = options.deleteComments + let commentDeleteMode = options.commentDeleteMode ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -663,7 +738,7 @@ proc deleteUserBadge*(httpClient: HttpClient, tenantId: string, id: string): (Op constructResult[APIEmptySuccessResponse](response) -proc deleteVote*(httpClient: HttpClient, tenantId: string, id: string, editKey: string): (Option[VoteDeleteResponse], Response) = +proc deleteVote*(httpClient: HttpClient, tenantId: string, id: string, editKey: string = ""): (Option[VoteDeleteResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -675,7 +750,13 @@ proc deleteVote*(httpClient: HttpClient, tenantId: string, id: string, editKey: constructResult[VoteDeleteResponse](response) -proc flagComment*(httpClient: HttpClient, tenantId: string, id: string, userId: string, anonUserId: string): (Option[FlagCommentResponse], Response) = +type FlagCommentOptions* = object + userId*: string + anonUserId*: string + +proc flagComment*(httpClient: HttpClient, tenantId: string, id: string, options: FlagCommentOptions): (Option[FlagCommentResponse], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -689,7 +770,19 @@ proc flagComment*(httpClient: HttpClient, tenantId: string, id: string, userId: constructResult[FlagCommentResponse](response) -proc getAuditLogs*(httpClient: HttpClient, tenantId: string, limit: float64, skip: float64, order: SORTDIR, after: float64, before: float64): (Option[GetAuditLogsResponse], Response) = +type GetAuditLogsOptions* = object + limit*: float64 + skip*: float64 + order*: SORTDIR + after*: float64 + before*: float64 + +proc getAuditLogs*(httpClient: HttpClient, tenantId: string, options: GetAuditLogsOptions): (Option[GetAuditLogsResponse], Response) = + let limit = options.limit + let skip = options.skip + let order = options.order + let after = options.after + let before = options.before ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -729,7 +822,41 @@ proc getComment*(httpClient: HttpClient, tenantId: string, id: string): (Option[ constructResult[APIGetCommentResponse](response) -proc getComments*(httpClient: HttpClient, tenantId: string, page: int, limit: int, skip: int, asTree: bool, skipChildren: int, limitChildren: int, maxTreeDepth: int, urlId: string, userId: string, anonUserId: string, contextUserId: string, hashTag: string, parentId: string, direction: SortDirections, fromDate: int64, toDate: int64): (Option[APIGetCommentsResponse], Response) = +type GetCommentsOptions* = object + page*: int + limit*: int + skip*: int + asTree*: bool + skipChildren*: int + limitChildren*: int + maxTreeDepth*: int + urlId*: string + userId*: string + anonUserId*: string + contextUserId*: string + hashTag*: string + parentId*: string + direction*: SortDirections + fromDate*: int64 + toDate*: int64 + +proc getComments*(httpClient: HttpClient, tenantId: string, options: GetCommentsOptions): (Option[APIGetCommentsResponse], Response) = + let page = options.page + let limit = options.limit + let skip = options.skip + let asTree = options.asTree + let skipChildren = options.skipChildren + let limitChildren = options.limitChildren + let maxTreeDepth = options.maxTreeDepth + let urlId = options.urlId + let userId = options.userId + let anonUserId = options.anonUserId + let contextUserId = options.contextUserId + let hashTag = options.hashTag + let parentId = options.parentId + let direction = options.direction + let fromDate = options.fromDate + let toDate = options.toDate ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -835,7 +962,15 @@ proc getEmailTemplates*(httpClient: HttpClient, tenantId: string, skip: float64) constructResult[GetEmailTemplatesResponse](response) -proc getFeedPosts*(httpClient: HttpClient, tenantId: string, afterId: string, limit: int, tags: seq[string]): (Option[GetFeedPostsResponse], Response) = +type GetFeedPostsOptions* = object + afterId*: string + limit*: int + tags*: seq[string] + +proc getFeedPosts*(httpClient: HttpClient, tenantId: string, options: GetFeedPostsOptions): (Option[GetFeedPostsResponse], Response) = + let afterId = options.afterId + let limit = options.limit + let tags = options.tags ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -885,7 +1020,19 @@ proc getModerators*(httpClient: HttpClient, tenantId: string, skip: float64): (O constructResult[GetModeratorsResponse](response) -proc getNotificationCount*(httpClient: HttpClient, tenantId: string, userId: string, urlId: string, fromCommentId: string, viewed: bool, `type`: string): (Option[GetNotificationCountResponse], Response) = +type GetNotificationCountOptions* = object + userId*: string + urlId*: string + fromCommentId*: string + viewed*: bool + `type`*: string + +proc getNotificationCount*(httpClient: HttpClient, tenantId: string, options: GetNotificationCountOptions): (Option[GetNotificationCountResponse], Response) = + let userId = options.userId + let urlId = options.urlId + let fromCommentId = options.fromCommentId + let viewed = options.viewed + let `type` = options.`type` ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -905,7 +1052,21 @@ proc getNotificationCount*(httpClient: HttpClient, tenantId: string, userId: str constructResult[GetNotificationCountResponse](response) -proc getNotifications*(httpClient: HttpClient, tenantId: string, userId: string, urlId: string, fromCommentId: string, viewed: bool, `type`: string, skip: float64): (Option[GetNotificationsResponse], Response) = +type GetNotificationsOptions* = object + userId*: string + urlId*: string + fromCommentId*: string + viewed*: bool + `type`*: string + skip*: float64 + +proc getNotifications*(httpClient: HttpClient, tenantId: string, options: GetNotificationsOptions): (Option[GetNotificationsResponse], Response) = + let userId = options.userId + let urlId = options.urlId + let fromCommentId = options.fromCommentId + let viewed = options.viewed + let `type` = options.`type` + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -948,7 +1109,21 @@ proc getPages*(httpClient: HttpClient, tenantId: string): (Option[GetPagesAPIRes constructResult[GetPagesAPIResponse](response) -proc getPendingWebhookEventCount*(httpClient: HttpClient, tenantId: string, commentId: string, externalId: string, eventType: string, `type`: string, domain: string, attemptCountGT: float64): (Option[GetPendingWebhookEventCountResponse], Response) = +type GetPendingWebhookEventCountOptions* = object + commentId*: string + externalId*: string + eventType*: string + `type`*: string + domain*: string + attemptCountGT*: float64 + +proc getPendingWebhookEventCount*(httpClient: HttpClient, tenantId: string, options: GetPendingWebhookEventCountOptions): (Option[GetPendingWebhookEventCountResponse], Response) = + let commentId = options.commentId + let externalId = options.externalId + let eventType = options.eventType + let `type` = options.`type` + let domain = options.domain + let attemptCountGT = options.attemptCountGT ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -970,7 +1145,23 @@ proc getPendingWebhookEventCount*(httpClient: HttpClient, tenantId: string, comm constructResult[GetPendingWebhookEventCountResponse](response) -proc getPendingWebhookEvents*(httpClient: HttpClient, tenantId: string, commentId: string, externalId: string, eventType: string, `type`: string, domain: string, attemptCountGT: float64, skip: float64): (Option[GetPendingWebhookEventsResponse], Response) = +type GetPendingWebhookEventsOptions* = object + commentId*: string + externalId*: string + eventType*: string + `type`*: string + domain*: string + attemptCountGT*: float64 + skip*: float64 + +proc getPendingWebhookEvents*(httpClient: HttpClient, tenantId: string, options: GetPendingWebhookEventsOptions): (Option[GetPendingWebhookEventsResponse], Response) = + let commentId = options.commentId + let externalId = options.externalId + let eventType = options.eventType + let `type` = options.`type` + let domain = options.domain + let attemptCountGT = options.attemptCountGT + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1026,7 +1217,21 @@ proc getQuestionResult*(httpClient: HttpClient, tenantId: string, id: string): ( constructResult[GetQuestionResultResponse](response) -proc getQuestionResults*(httpClient: HttpClient, tenantId: string, urlId: string, userId: string, startDate: string, questionId: string, questionIds: string, skip: float64): (Option[GetQuestionResultsResponse], Response) = +type GetQuestionResultsOptions* = object + urlId*: string + userId*: string + startDate*: string + questionId*: string + questionIds*: string + skip*: float64 + +proc getQuestionResults*(httpClient: HttpClient, tenantId: string, options: GetQuestionResultsOptions): (Option[GetQuestionResultsResponse], Response) = + let urlId = options.urlId + let userId = options.userId + let startDate = options.startDate + let questionId = options.questionId + let questionIds = options.questionIds + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1080,7 +1285,7 @@ proc getSSOUsers*(httpClient: HttpClient, tenantId: string, skip: int): (Option[ constructResult[GetSSOUsersResponse](response) -proc getSubscriptions*(httpClient: HttpClient, tenantId: string, userId: string): (Option[GetSubscriptionsAPIResponse], Response) = +proc getSubscriptions*(httpClient: HttpClient, tenantId: string, userId: string = ""): (Option[GetSubscriptionsAPIResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1102,7 +1307,17 @@ proc getTenant*(httpClient: HttpClient, tenantId: string, id: string): (Option[G constructResult[GetTenantResponse](response) -proc getTenantDailyUsages*(httpClient: HttpClient, tenantId: string, yearNumber: float64, monthNumber: float64, dayNumber: float64, skip: float64): (Option[GetTenantDailyUsagesResponse], Response) = +type GetTenantDailyUsagesOptions* = object + yearNumber*: float64 + monthNumber*: float64 + dayNumber*: float64 + skip*: float64 + +proc getTenantDailyUsages*(httpClient: HttpClient, tenantId: string, options: GetTenantDailyUsagesOptions): (Option[GetTenantDailyUsagesResponse], Response) = + let yearNumber = options.yearNumber + let monthNumber = options.monthNumber + let dayNumber = options.dayNumber + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1164,7 +1379,13 @@ proc getTenantUsers*(httpClient: HttpClient, tenantId: string, skip: float64): ( constructResult[GetTenantUsersResponse](response) -proc getTenants*(httpClient: HttpClient, tenantId: string, meta: string, skip: float64): (Option[GetTenantsResponse], Response) = +type GetTenantsOptions* = object + meta*: string + skip*: float64 + +proc getTenants*(httpClient: HttpClient, tenantId: string, options: GetTenantsOptions): (Option[GetTenantsResponse], Response) = + let meta = options.meta + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1178,7 +1399,7 @@ proc getTenants*(httpClient: HttpClient, tenantId: string, meta: string, skip: f constructResult[GetTenantsResponse](response) -proc getTicket*(httpClient: HttpClient, tenantId: string, id: string, userId: string): (Option[GetTicketResponse], Response) = +proc getTicket*(httpClient: HttpClient, tenantId: string, id: string, userId: string = ""): (Option[GetTicketResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1190,7 +1411,17 @@ proc getTicket*(httpClient: HttpClient, tenantId: string, id: string, userId: st constructResult[GetTicketResponse](response) -proc getTickets*(httpClient: HttpClient, tenantId: string, userId: string, state: float64, skip: float64, limit: float64): (Option[GetTicketsResponse], Response) = +type GetTicketsOptions* = object + userId*: string + state*: float64 + skip*: float64 + limit*: float64 + +proc getTickets*(httpClient: HttpClient, tenantId: string, options: GetTicketsOptions): (Option[GetTicketsResponse], Response) = + let userId = options.userId + let state = options.state + let skip = options.skip + let limit = options.limit ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1248,7 +1479,15 @@ proc getUserBadgeProgressByUserId*(httpClient: HttpClient, tenantId: string, use constructResult[APIGetUserBadgeProgressResponse](response) -proc getUserBadgeProgressList*(httpClient: HttpClient, tenantId: string, userId: string, limit: float64, skip: float64): (Option[APIGetUserBadgeProgressListResponse], Response) = +type GetUserBadgeProgressListOptions* = object + userId*: string + limit*: float64 + skip*: float64 + +proc getUserBadgeProgressList*(httpClient: HttpClient, tenantId: string, options: GetUserBadgeProgressListOptions): (Option[APIGetUserBadgeProgressListResponse], Response) = + let userId = options.userId + let limit = options.limit + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1264,7 +1503,21 @@ proc getUserBadgeProgressList*(httpClient: HttpClient, tenantId: string, userId: constructResult[APIGetUserBadgeProgressListResponse](response) -proc getUserBadges*(httpClient: HttpClient, tenantId: string, userId: string, badgeId: string, `type`: float64, displayedOnComments: bool, limit: float64, skip: float64): (Option[APIGetUserBadgesResponse], Response) = +type GetUserBadgesOptions* = object + userId*: string + badgeId*: string + `type`*: float64 + displayedOnComments*: bool + limit*: float64 + skip*: float64 + +proc getUserBadges*(httpClient: HttpClient, tenantId: string, options: GetUserBadgesOptions): (Option[APIGetUserBadgesResponse], Response) = + let userId = options.userId + let badgeId = options.badgeId + let `type` = options.`type` + let displayedOnComments = options.displayedOnComments + let limit = options.limit + let skip = options.skip ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1297,7 +1550,13 @@ proc getVotes*(httpClient: HttpClient, tenantId: string, urlId: string): (Option constructResult[GetVotesResponse](response) -proc getVotesForUser*(httpClient: HttpClient, tenantId: string, urlId: string, userId: string, anonUserId: string): (Option[GetVotesForUserResponse], Response) = +type GetVotesForUserOptions* = object + userId*: string + anonUserId*: string + +proc getVotesForUser*(httpClient: HttpClient, tenantId: string, urlId: string, options: GetVotesForUserOptions): (Option[GetVotesForUserResponse], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1323,12 +1582,11 @@ proc patchDomainConfig*(httpClient: HttpClient, tenantId: string, domainToUpdate constructResult[PatchDomainConfigResponse](response) -proc patchHashTag*(httpClient: HttpClient, tag: string, tenantId: string, updateHashTagBody: UpdateHashTagBody): (Option[UpdateHashTagResponse], Response) = +proc patchHashTag*(httpClient: HttpClient, tenantId: string, tag: string, updateHashTagBody: UpdateHashTagBody): (Option[UpdateHashTagResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] - if $tenantId != "": - query_params_list.add(("tenantId", $tenantId)) + query_params_list.add(("tenantId", $tenantId)) let url_encoded_query_params = encodeQuery(query_params_list) let response = httpClient.patch(basepath & fmt"/api/v1/hash-tags/{tag}" & "?" & url_encoded_query_params, $(%updateHashTagBody)) @@ -1383,7 +1641,7 @@ proc putSSOUser*(httpClient: HttpClient, tenantId: string, id: string, updateAPI constructResult[PutSSOUserAPIResponse](response) -proc renderEmailTemplate*(httpClient: HttpClient, tenantId: string, renderEmailTemplateBody: RenderEmailTemplateBody, locale: string): (Option[RenderEmailTemplateResponse], Response) = +proc renderEmailTemplate*(httpClient: HttpClient, tenantId: string, renderEmailTemplateBody: RenderEmailTemplateBody, locale: string = ""): (Option[RenderEmailTemplateResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1407,7 +1665,7 @@ proc replaceTenantPackage*(httpClient: HttpClient, tenantId: string, id: string, constructResult[APIEmptyResponse](response) -proc replaceTenantUser*(httpClient: HttpClient, tenantId: string, id: string, replaceTenantUserBody: ReplaceTenantUserBody, updateComments: string): (Option[APIEmptyResponse], Response) = +proc replaceTenantUser*(httpClient: HttpClient, tenantId: string, id: string, replaceTenantUserBody: ReplaceTenantUserBody, updateComments: string = ""): (Option[APIEmptyResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1420,7 +1678,17 @@ proc replaceTenantUser*(httpClient: HttpClient, tenantId: string, id: string, re constructResult[APIEmptyResponse](response) -proc saveComment*(httpClient: HttpClient, tenantId: string, createCommentParams: CreateCommentParams, isLive: bool, doSpamCheck: bool, sendEmails: bool, populateNotifications: bool): (Option[APISaveCommentResponse], Response) = +type SaveCommentOptions* = object + isLive*: bool + doSpamCheck*: bool + sendEmails*: bool + populateNotifications*: bool + +proc saveComment*(httpClient: HttpClient, tenantId: string, createCommentParams: CreateCommentParams, options: SaveCommentOptions): (Option[APISaveCommentResponse], Response) = + let isLive = options.isLive + let doSpamCheck = options.doSpamCheck + let sendEmails = options.sendEmails + let populateNotifications = options.populateNotifications ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1439,7 +1707,17 @@ proc saveComment*(httpClient: HttpClient, tenantId: string, createCommentParams: constructResult[APISaveCommentResponse](response) -proc saveCommentsBulk*(httpClient: HttpClient, tenantId: string, createCommentParams: seq[CreateCommentParams], isLive: bool, doSpamCheck: bool, sendEmails: bool, populateNotifications: bool): (Option[seq[SaveCommentsBulkResponse]], Response) = +type SaveCommentsBulkOptions* = object + isLive*: bool + doSpamCheck*: bool + sendEmails*: bool + populateNotifications*: bool + +proc saveCommentsBulk*(httpClient: HttpClient, tenantId: string, createCommentParams: seq[CreateCommentParams], options: SaveCommentsBulkOptions): (Option[seq[SaveCommentsBulkResponse]], Response) = + let isLive = options.isLive + let doSpamCheck = options.doSpamCheck + let sendEmails = options.sendEmails + let populateNotifications = options.populateNotifications ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1469,7 +1747,7 @@ proc sendInvite*(httpClient: HttpClient, tenantId: string, id: string, fromName: constructResult[APIEmptyResponse](response) -proc sendLoginLink*(httpClient: HttpClient, tenantId: string, id: string, redirectURL: string): (Option[APIEmptyResponse], Response) = +proc sendLoginLink*(httpClient: HttpClient, tenantId: string, id: string, redirectURL: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1481,7 +1759,13 @@ proc sendLoginLink*(httpClient: HttpClient, tenantId: string, id: string, redire constructResult[APIEmptyResponse](response) -proc unBlockUserFromComment*(httpClient: HttpClient, tenantId: string, id: string, unBlockFromCommentParams: UnBlockFromCommentParams, userId: string, anonUserId: string): (Option[UnblockSuccess], Response) = +type UnBlockUserFromCommentOptions* = object + userId*: string + anonUserId*: string + +proc unBlockUserFromComment*(httpClient: HttpClient, tenantId: string, id: string, unBlockFromCommentParams: UnBlockFromCommentParams, options: UnBlockUserFromCommentOptions): (Option[UnblockSuccess], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1496,7 +1780,13 @@ proc unBlockUserFromComment*(httpClient: HttpClient, tenantId: string, id: strin constructResult[UnblockSuccess](response) -proc unFlagComment*(httpClient: HttpClient, tenantId: string, id: string, userId: string, anonUserId: string): (Option[FlagCommentResponse], Response) = +type UnFlagCommentOptions* = object + userId*: string + anonUserId*: string + +proc unFlagComment*(httpClient: HttpClient, tenantId: string, id: string, options: UnFlagCommentOptions): (Option[FlagCommentResponse], Response) = + let userId = options.userId + let anonUserId = options.anonUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -1510,7 +1800,15 @@ proc unFlagComment*(httpClient: HttpClient, tenantId: string, id: string, userId constructResult[FlagCommentResponse](response) -proc updateComment*(httpClient: HttpClient, tenantId: string, id: string, updatableCommentParams: UpdatableCommentParams, contextUserId: string, doSpamCheck: bool, isLive: bool): (Option[APIEmptyResponse], Response) = +type UpdateCommentOptions* = object + contextUserId*: string + doSpamCheck*: bool + isLive*: bool + +proc updateComment*(httpClient: HttpClient, tenantId: string, id: string, updatableCommentParams: UpdatableCommentParams, options: UpdateCommentOptions): (Option[APIEmptyResponse], Response) = + let contextUserId = options.contextUserId + let doSpamCheck = options.doSpamCheck + let isLive = options.isLive ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1560,7 +1858,7 @@ proc updateModerator*(httpClient: HttpClient, tenantId: string, id: string, upda constructResult[APIEmptyResponse](response) -proc updateNotification*(httpClient: HttpClient, tenantId: string, id: string, updateNotificationBody: UpdateNotificationBody, userId: string): (Option[APIEmptyResponse], Response) = +proc updateNotification*(httpClient: HttpClient, tenantId: string, id: string, updateNotificationBody: UpdateNotificationBody, userId: string = ""): (Option[APIEmptyResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1595,7 +1893,7 @@ proc updateQuestionResult*(httpClient: HttpClient, tenantId: string, id: string, constructResult[APIEmptyResponse](response) -proc updateSubscription*(httpClient: HttpClient, tenantId: string, id: string, updateAPIUserSubscriptionData: UpdateAPIUserSubscriptionData, userId: string): (Option[UpdateSubscriptionAPIResponse], Response) = +proc updateSubscription*(httpClient: HttpClient, tenantId: string, id: string, updateAPIUserSubscriptionData: UpdateAPIUserSubscriptionData, userId: string = ""): (Option[UpdateSubscriptionAPIResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -1630,7 +1928,7 @@ proc updateTenantPackage*(httpClient: HttpClient, tenantId: string, id: string, constructResult[APIEmptyResponse](response) -proc updateTenantUser*(httpClient: HttpClient, tenantId: string, id: string, updateTenantUserBody: UpdateTenantUserBody, updateComments: string): (Option[APIEmptyResponse], Response) = +proc updateTenantUser*(httpClient: HttpClient, tenantId: string, id: string, updateTenantUserBody: UpdateTenantUserBody, updateComments: string = ""): (Option[APIEmptyResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] diff --git a/client/fastcomments/apis/api_moderation.nim b/client/fastcomments/apis/api_moderation.nim index a82c758..8c078c4 100644 --- a/client/fastcomments/apis/api_moderation.nim +++ b/client/fastcomments/apis/api_moderation.nim @@ -50,7 +50,7 @@ import ../models/model_moderation_page_search_response import ../models/model_moderation_site_search_response import ../models/model_moderation_suggest_response import ../models/model_moderation_user_search_response -import ../models/model_post_remove_comment_response +import ../models/model_post_remove_comment_api_response import ../models/model_pre_ban_summary import ../models/model_remove_user_badge_response import ../models/model_set_comment_approved_response @@ -75,20 +75,50 @@ template constructResult[T](response: Response): untyped = (none(T.typedesc), response) -proc deleteModerationVote*(httpClient: HttpClient, commentId: string, voteId: string, sso: string): (Option[VoteDeleteResponse], Response) = +type DeleteModerationVoteOptions* = object + broadcastId*: string + sso*: string + +proc deleteModerationVote*(httpClient: HttpClient, tenantId: string, commentId: string, voteId: string, options: DeleteModerationVoteOptions): (Option[VoteDeleteResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.delete(basepath & fmt"/auth/my-account/moderate-comments/vote/{commentId}/{voteId}" & "?" & url_encoded_query_params) + let response = httpClient.delete(basepath & fmt"/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}" & "?" & url_encoded_query_params) constructResult[VoteDeleteResponse](response) -proc getApiComments*(httpClient: HttpClient, page: float64, count: float64, textSearch: string, byIPFromComment: string, filters: string, searchFilters: string, sorts: string, demo: bool, sso: string): (Option[ModerationAPIGetCommentsResponse], Response) = +type GetApiCommentsOptions* = object + page*: float64 + count*: float64 + textSearch*: string + byIPFromComment*: string + filters*: string + searchFilters*: string + sorts*: string + demo*: bool + sso*: string + +proc getApiComments*(httpClient: HttpClient, tenantId: string, options: GetApiCommentsOptions): (Option[ModerationAPIGetCommentsResponse], Response) = + let page = options.page + let count = options.count + let textSearch = options.textSearch + let byIPFromComment = options.byIPFromComment + let filters = options.filters + let searchFilters = options.searchFilters + let sorts = options.sorts + let demo = options.demo + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $page != "": query_params_list.add(("page", $page)) if $count != "": @@ -109,26 +139,50 @@ proc getApiComments*(httpClient: HttpClient, page: float64, count: float64, text query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/api/comments" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/api/comments" & "?" & url_encoded_query_params) constructResult[ModerationAPIGetCommentsResponse](response) -proc getApiExportStatus*(httpClient: HttpClient, batchJobId: string, sso: string): (Option[ModerationExportStatusResponse], Response) = +type GetApiExportStatusOptions* = object + batchJobId*: string + sso*: string + +proc getApiExportStatus*(httpClient: HttpClient, tenantId: string, options: GetApiExportStatusOptions): (Option[ModerationExportStatusResponse], Response) = + let batchJobId = options.batchJobId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $batchJobId != "": query_params_list.add(("batchJobId", $batchJobId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/api/export/status" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/api/export/status" & "?" & url_encoded_query_params) constructResult[ModerationExportStatusResponse](response) -proc getApiIds*(httpClient: HttpClient, textSearch: string, byIPFromComment: string, filters: string, searchFilters: string, afterId: string, demo: bool, sso: string): (Option[ModerationAPIGetCommentIdsResponse], Response) = +type GetApiIdsOptions* = object + textSearch*: string + byIPFromComment*: string + filters*: string + searchFilters*: string + afterId*: string + demo*: bool + sso*: string + +proc getApiIds*(httpClient: HttpClient, tenantId: string, options: GetApiIdsOptions): (Option[ModerationAPIGetCommentIdsResponse], Response) = + let textSearch = options.textSearch + let byIPFromComment = options.byIPFromComment + let filters = options.filters + let searchFilters = options.searchFilters + let afterId = options.afterId + let demo = options.demo + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $textSearch != "": query_params_list.add(("text-search", $textSearch)) if $byIPFromComment != "": @@ -145,46 +199,64 @@ proc getApiIds*(httpClient: HttpClient, textSearch: string, byIPFromComment: str query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/api/ids" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/api/ids" & "?" & url_encoded_query_params) constructResult[ModerationAPIGetCommentIdsResponse](response) -proc getBanUsersFromComment*(httpClient: HttpClient, commentId: string, sso: string): (Option[GetBannedUsersFromCommentResponse], Response) = +proc getBanUsersFromComment*(httpClient: HttpClient, tenantId: string, commentId: string, sso: string = ""): (Option[GetBannedUsersFromCommentResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}" & "?" & url_encoded_query_params) constructResult[GetBannedUsersFromCommentResponse](response) -proc getCommentBanStatus*(httpClient: HttpClient, commentId: string, sso: string): (Option[GetCommentBanStatusResponse], Response) = +proc getCommentBanStatus*(httpClient: HttpClient, tenantId: string, commentId: string, sso: string = ""): (Option[GetCommentBanStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}" & "?" & url_encoded_query_params) constructResult[GetCommentBanStatusResponse](response) -proc getCommentChildren*(httpClient: HttpClient, commentId: string, sso: string): (Option[ModerationAPIChildCommentsResponse], Response) = +proc getCommentChildren*(httpClient: HttpClient, tenantId: string, commentId: string, sso: string = ""): (Option[ModerationAPIChildCommentsResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/comment-children/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}" & "?" & url_encoded_query_params) constructResult[ModerationAPIChildCommentsResponse](response) -proc getCount*(httpClient: HttpClient, textSearch: string, byIPFromComment: string, filter: string, searchFilters: string, demo: bool, sso: string): (Option[ModerationAPICountCommentsResponse], Response) = +type GetCountOptions* = object + textSearch*: string + byIPFromComment*: string + filter*: string + searchFilters*: string + demo*: bool + sso*: string + +proc getCount*(httpClient: HttpClient, tenantId: string, options: GetCountOptions): (Option[ModerationAPICountCommentsResponse], Response) = + let textSearch = options.textSearch + let byIPFromComment = options.byIPFromComment + let filter = options.filter + let searchFilters = options.searchFilters + let demo = options.demo + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $textSearch != "": query_params_list.add(("text-search", $textSearch)) if $byIPFromComment != "": @@ -199,46 +271,58 @@ proc getCount*(httpClient: HttpClient, textSearch: string, byIPFromComment: stri query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/count" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/count" & "?" & url_encoded_query_params) constructResult[ModerationAPICountCommentsResponse](response) -proc getCounts*(httpClient: HttpClient, sso: string): (Option[GetBannedUsersCountResponse], Response) = +proc getCounts*(httpClient: HttpClient, tenantId: string, sso: string = ""): (Option[GetBannedUsersCountResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/banned-users/counts" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/banned-users/mod_api/counts" & "?" & url_encoded_query_params) constructResult[GetBannedUsersCountResponse](response) -proc getLogs*(httpClient: HttpClient, commentId: string, sso: string): (Option[ModerationAPIGetLogsResponse], Response) = +proc getLogs*(httpClient: HttpClient, tenantId: string, commentId: string, sso: string = ""): (Option[ModerationAPIGetLogsResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/logs/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/logs/{commentId}" & "?" & url_encoded_query_params) constructResult[ModerationAPIGetLogsResponse](response) -proc getManualBadges*(httpClient: HttpClient, sso: string): (Option[GetTenantManualBadgesResponse], Response) = +proc getManualBadges*(httpClient: HttpClient, tenantId: string, sso: string = ""): (Option[GetTenantManualBadgesResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/get-manual-badges" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/get-manual-badges" & "?" & url_encoded_query_params) constructResult[GetTenantManualBadgesResponse](response) -proc getManualBadgesForUser*(httpClient: HttpClient, badgesUserId: string, commentId: string, sso: string): (Option[GetUserManualBadgesResponse], Response) = +type GetManualBadgesForUserOptions* = object + badgesUserId*: string + commentId*: string + sso*: string + +proc getManualBadgesForUser*(httpClient: HttpClient, tenantId: string, options: GetManualBadgesForUserOptions): (Option[GetUserManualBadgesResponse], Response) = + let badgesUserId = options.badgesUserId + let commentId = options.commentId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $badgesUserId != "": query_params_list.add(("badgesUserId", $badgesUserId)) if $commentId != "": @@ -247,13 +331,22 @@ proc getManualBadgesForUser*(httpClient: HttpClient, badgesUserId: string, comme query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/get-manual-badges-for-user" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user" & "?" & url_encoded_query_params) constructResult[GetUserManualBadgesResponse](response) -proc getModerationComment*(httpClient: HttpClient, commentId: string, includeEmail: bool, includeIP: bool, sso: string): (Option[ModerationAPICommentResponse], Response) = +type GetModerationCommentOptions* = object + includeEmail*: bool + includeIP*: bool + sso*: string + +proc getModerationComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: GetModerationCommentOptions): (Option[ModerationAPICommentResponse], Response) = + let includeEmail = options.includeEmail + let includeIP = options.includeIP + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $includeEmail != "": query_params_list.add(("includeEmail", $includeEmail)) if $includeIP != "": @@ -262,24 +355,36 @@ proc getModerationComment*(httpClient: HttpClient, commentId: string, includeEma query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/comment/{commentId}" & "?" & url_encoded_query_params) constructResult[ModerationAPICommentResponse](response) -proc getModerationCommentText*(httpClient: HttpClient, commentId: string, sso: string): (Option[GetCommentTextResponse], Response) = +proc getModerationCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, sso: string = ""): (Option[GetCommentTextResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/get-comment-text/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}" & "?" & url_encoded_query_params) constructResult[GetCommentTextResponse](response) -proc getPreBanSummary*(httpClient: HttpClient, commentId: string, includeByUserIdAndEmail: bool, includeByIP: bool, includeByEmailDomain: bool, sso: string): (Option[PreBanSummary], Response) = +type GetPreBanSummaryOptions* = object + includeByUserIdAndEmail*: bool + includeByIP*: bool + includeByEmailDomain*: bool + sso*: string + +proc getPreBanSummary*(httpClient: HttpClient, tenantId: string, commentId: string, options: GetPreBanSummaryOptions): (Option[PreBanSummary], Response) = + let includeByUserIdAndEmail = options.includeByUserIdAndEmail + let includeByIP = options.includeByIP + let includeByEmailDomain = options.includeByEmailDomain + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $includeByUserIdAndEmail != "": query_params_list.add(("includeByUserIdAndEmail", $includeByUserIdAndEmail)) if $includeByIP != "": @@ -290,13 +395,24 @@ proc getPreBanSummary*(httpClient: HttpClient, commentId: string, includeByUserI query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/pre-ban-summary/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & fmt"/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}" & "?" & url_encoded_query_params) constructResult[PreBanSummary](response) -proc getSearchCommentsSummary*(httpClient: HttpClient, value: string, filters: string, searchFilters: string, sso: string): (Option[ModerationCommentSearchResponse], Response) = +type GetSearchCommentsSummaryOptions* = object + value*: string + filters*: string + searchFilters*: string + sso*: string + +proc getSearchCommentsSummary*(httpClient: HttpClient, tenantId: string, options: GetSearchCommentsSummaryOptions): (Option[ModerationCommentSearchResponse], Response) = + let value = options.value + let filters = options.filters + let searchFilters = options.searchFilters + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $value != "": query_params_list.add(("value", $value)) if $filters != "": @@ -307,114 +423,181 @@ proc getSearchCommentsSummary*(httpClient: HttpClient, value: string, filters: s query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/search/comments/summary" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/search/comments/summary" & "?" & url_encoded_query_params) constructResult[ModerationCommentSearchResponse](response) -proc getSearchPages*(httpClient: HttpClient, value: string, sso: string): (Option[ModerationPageSearchResponse], Response) = +type GetSearchPagesOptions* = object + value*: string + sso*: string + +proc getSearchPages*(httpClient: HttpClient, tenantId: string, options: GetSearchPagesOptions): (Option[ModerationPageSearchResponse], Response) = + let value = options.value + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $value != "": query_params_list.add(("value", $value)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/search/pages" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/search/pages" & "?" & url_encoded_query_params) constructResult[ModerationPageSearchResponse](response) -proc getSearchSites*(httpClient: HttpClient, value: string, sso: string): (Option[ModerationSiteSearchResponse], Response) = +type GetSearchSitesOptions* = object + value*: string + sso*: string + +proc getSearchSites*(httpClient: HttpClient, tenantId: string, options: GetSearchSitesOptions): (Option[ModerationSiteSearchResponse], Response) = + let value = options.value + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $value != "": query_params_list.add(("value", $value)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/search/sites" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/search/sites" & "?" & url_encoded_query_params) constructResult[ModerationSiteSearchResponse](response) -proc getSearchSuggest*(httpClient: HttpClient, textSearch: string, sso: string): (Option[ModerationSuggestResponse], Response) = +type GetSearchSuggestOptions* = object + textSearch*: string + sso*: string + +proc getSearchSuggest*(httpClient: HttpClient, tenantId: string, options: GetSearchSuggestOptions): (Option[ModerationSuggestResponse], Response) = + let textSearch = options.textSearch + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $textSearch != "": query_params_list.add(("text-search", $textSearch)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/search/suggest" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/search/suggest" & "?" & url_encoded_query_params) constructResult[ModerationSuggestResponse](response) -proc getSearchUsers*(httpClient: HttpClient, value: string, sso: string): (Option[ModerationUserSearchResponse], Response) = +type GetSearchUsersOptions* = object + value*: string + sso*: string + +proc getSearchUsers*(httpClient: HttpClient, tenantId: string, options: GetSearchUsersOptions): (Option[ModerationUserSearchResponse], Response) = + let value = options.value + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $value != "": query_params_list.add(("value", $value)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/search/users" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/search/users" & "?" & url_encoded_query_params) constructResult[ModerationUserSearchResponse](response) -proc getTrustFactor*(httpClient: HttpClient, userId: string, sso: string): (Option[GetUserTrustFactorResponse], Response) = +type GetTrustFactorOptions* = object + userId*: string + sso*: string + +proc getTrustFactor*(httpClient: HttpClient, tenantId: string, options: GetTrustFactorOptions): (Option[GetUserTrustFactorResponse], Response) = + let userId = options.userId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $userId != "": query_params_list.add(("userId", $userId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/get-trust-factor" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/get-trust-factor" & "?" & url_encoded_query_params) constructResult[GetUserTrustFactorResponse](response) -proc getUserBanPreference*(httpClient: HttpClient, sso: string): (Option[APIModerateGetUserBanPreferencesResponse], Response) = +proc getUserBanPreference*(httpClient: HttpClient, tenantId: string, sso: string = ""): (Option[APIModerateGetUserBanPreferencesResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/user-ban-preference" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/user-ban-preference" & "?" & url_encoded_query_params) constructResult[APIModerateGetUserBanPreferencesResponse](response) -proc getUserInternalProfile*(httpClient: HttpClient, commentId: string, sso: string): (Option[GetUserInternalProfileResponse], Response) = +type GetUserInternalProfileOptions* = object + commentId*: string + sso*: string + +proc getUserInternalProfile*(httpClient: HttpClient, tenantId: string, options: GetUserInternalProfileOptions): (Option[GetUserInternalProfileResponse], Response) = + let commentId = options.commentId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $commentId != "": query_params_list.add(("commentId", $commentId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/get-user-internal-profile" & "?" & url_encoded_query_params) + let response = httpClient.get(basepath & "/auth/my-account/moderate-comments/mod_api/get-user-internal-profile" & "?" & url_encoded_query_params) constructResult[GetUserInternalProfileResponse](response) -proc postAdjustCommentVotes*(httpClient: HttpClient, commentId: string, adjustCommentVotesParams: AdjustCommentVotesParams, sso: string): (Option[AdjustVotesResponse], Response) = +type PostAdjustCommentVotesOptions* = object + broadcastId*: string + sso*: string + +proc postAdjustCommentVotes*(httpClient: HttpClient, tenantId: string, commentId: string, adjustCommentVotesParams: AdjustCommentVotesParams, options: PostAdjustCommentVotesOptions): (Option[AdjustVotesResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}" & "?" & url_encoded_query_params, $(%adjustCommentVotesParams)) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}" & "?" & url_encoded_query_params, $(%adjustCommentVotesParams)) constructResult[AdjustVotesResponse](response) -proc postApiExport*(httpClient: HttpClient, textSearch: string, byIPFromComment: string, filters: string, searchFilters: string, sorts: string, sso: string): (Option[ModerationExportResponse], Response) = +type PostApiExportOptions* = object + textSearch*: string + byIPFromComment*: string + filters*: string + searchFilters*: string + sorts*: string + sso*: string + +proc postApiExport*(httpClient: HttpClient, tenantId: string, options: PostApiExportOptions): (Option[ModerationExportResponse], Response) = + let textSearch = options.textSearch + let byIPFromComment = options.byIPFromComment + let filters = options.filters + let searchFilters = options.searchFilters + let sorts = options.sorts + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $textSearch != "": query_params_list.add(("text-search", $textSearch)) if $byIPFromComment != "": @@ -429,13 +612,34 @@ proc postApiExport*(httpClient: HttpClient, textSearch: string, byIPFromComment: query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/api/export" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/mod_api/api/export" & "?" & url_encoded_query_params) constructResult[ModerationExportResponse](response) -proc postBanUserFromComment*(httpClient: HttpClient, commentId: string, banEmail: bool, banEmailDomain: bool, banIP: bool, deleteAllUsersComments: bool, bannedUntil: string, isShadowBan: bool, updateId: string, banReason: string, sso: string): (Option[BanUserFromCommentResult], Response) = +type PostBanUserFromCommentOptions* = object + banEmail*: bool + banEmailDomain*: bool + banIP*: bool + deleteAllUsersComments*: bool + bannedUntil*: string + isShadowBan*: bool + updateId*: string + banReason*: string + sso*: string + +proc postBanUserFromComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostBanUserFromCommentOptions): (Option[BanUserFromCommentResult], Response) = + let banEmail = options.banEmail + let banEmailDomain = options.banEmailDomain + let banIP = options.banIP + let deleteAllUsersComments = options.deleteAllUsersComments + let bannedUntil = options.bannedUntil + let isShadowBan = options.isShadowBan + let updateId = options.updateId + let banReason = options.banReason + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $banEmail != "": query_params_list.add(("banEmail", $banEmail)) if $banEmailDomain != "": @@ -456,26 +660,38 @@ proc postBanUserFromComment*(httpClient: HttpClient, commentId: string, banEmail query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}" & "?" & url_encoded_query_params) constructResult[BanUserFromCommentResult](response) -proc postBanUserUndo*(httpClient: HttpClient, banUserUndoParams: BanUserUndoParams, sso: string): (Option[APIEmptyResponse], Response) = +proc postBanUserUndo*(httpClient: HttpClient, tenantId: string, banUserUndoParams: BanUserUndoParams, sso: string = ""): (Option[APIEmptyResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/ban-user/undo" & "?" & url_encoded_query_params, $(%banUserUndoParams)) + let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/mod_api/ban-user/undo" & "?" & url_encoded_query_params, $(%banUserUndoParams)) constructResult[APIEmptyResponse](response) -proc postBulkPreBanSummary*(httpClient: HttpClient, bulkPreBanParams: BulkPreBanParams, includeByUserIdAndEmail: bool, includeByIP: bool, includeByEmailDomain: bool, sso: string): (Option[BulkPreBanSummary], Response) = +type PostBulkPreBanSummaryOptions* = object + includeByUserIdAndEmail*: bool + includeByIP*: bool + includeByEmailDomain*: bool + sso*: string + +proc postBulkPreBanSummary*(httpClient: HttpClient, tenantId: string, bulkPreBanParams: BulkPreBanParams, options: PostBulkPreBanSummaryOptions): (Option[BulkPreBanSummary], Response) = + let includeByUserIdAndEmail = options.includeByUserIdAndEmail + let includeByIP = options.includeByIP + let includeByEmailDomain = options.includeByEmailDomain + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $includeByUserIdAndEmail != "": query_params_list.add(("includeByUserIdAndEmail", $includeByUserIdAndEmail)) if $includeByIP != "": @@ -486,135 +702,238 @@ proc postBulkPreBanSummary*(httpClient: HttpClient, bulkPreBanParams: BulkPreBan query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/bulk-pre-ban-summary" & "?" & url_encoded_query_params, $(%bulkPreBanParams)) + let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary" & "?" & url_encoded_query_params, $(%bulkPreBanParams)) constructResult[BulkPreBanSummary](response) -proc postCommentsByIds*(httpClient: HttpClient, commentsByIdsParams: CommentsByIdsParams, sso: string): (Option[ModerationAPIChildCommentsResponse], Response) = +proc postCommentsByIds*(httpClient: HttpClient, tenantId: string, commentsByIdsParams: CommentsByIdsParams, sso: string = ""): (Option[ModerationAPIChildCommentsResponse], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/comments-by-ids" & "?" & url_encoded_query_params, $(%commentsByIdsParams)) + let response = httpClient.post(basepath & "/auth/my-account/moderate-comments/mod_api/comments-by-ids" & "?" & url_encoded_query_params, $(%commentsByIdsParams)) constructResult[ModerationAPIChildCommentsResponse](response) -proc postFlagComment*(httpClient: HttpClient, commentId: string, sso: string): (Option[APIEmptyResponse], Response) = +type PostFlagCommentOptions* = object + broadcastId*: string + sso*: string + +proc postFlagComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostFlagCommentOptions): (Option[APIEmptyResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/flag-comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc postRemoveComment*(httpClient: HttpClient, commentId: string, sso: string): (Option[PostRemoveCommentResponse], Response) = +type PostRemoveCommentOptions* = object + broadcastId*: string + sso*: string + +proc postRemoveComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostRemoveCommentOptions): (Option[PostRemoveCommentApiResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/remove-comment/{commentId}" & "?" & url_encoded_query_params) - constructResult[PostRemoveCommentResponse](response) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}" & "?" & url_encoded_query_params) + constructResult[PostRemoveCommentApiResponse](response) -proc postRestoreDeletedComment*(httpClient: HttpClient, commentId: string, sso: string): (Option[APIEmptyResponse], Response) = +type PostRestoreDeletedCommentOptions* = object + broadcastId*: string + sso*: string + +proc postRestoreDeletedComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostRestoreDeletedCommentOptions): (Option[APIEmptyResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc postSetCommentApprovalStatus*(httpClient: HttpClient, commentId: string, approved: bool, sso: string): (Option[SetCommentApprovedResponse], Response) = +type PostSetCommentApprovalStatusOptions* = object + approved*: bool + broadcastId*: string + sso*: string + +proc postSetCommentApprovalStatus*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostSetCommentApprovalStatusOptions): (Option[SetCommentApprovedResponse], Response) = + let approved = options.approved + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $approved != "": query_params_list.add(("approved", $approved)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}" & "?" & url_encoded_query_params) constructResult[SetCommentApprovedResponse](response) -proc postSetCommentReviewStatus*(httpClient: HttpClient, commentId: string, reviewed: bool, sso: string): (Option[APIEmptyResponse], Response) = +type PostSetCommentReviewStatusOptions* = object + reviewed*: bool + broadcastId*: string + sso*: string + +proc postSetCommentReviewStatus*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostSetCommentReviewStatusOptions): (Option[APIEmptyResponse], Response) = + let reviewed = options.reviewed + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $reviewed != "": query_params_list.add(("reviewed", $reviewed)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/set-comment-review-status/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc postSetCommentSpamStatus*(httpClient: HttpClient, commentId: string, spam: bool, permNotSpam: bool, sso: string): (Option[APIEmptyResponse], Response) = +type PostSetCommentSpamStatusOptions* = object + spam*: bool + permNotSpam*: bool + broadcastId*: string + sso*: string + +proc postSetCommentSpamStatus*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostSetCommentSpamStatusOptions): (Option[APIEmptyResponse], Response) = + let spam = options.spam + let permNotSpam = options.permNotSpam + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $spam != "": query_params_list.add(("spam", $spam)) if $permNotSpam != "": query_params_list.add(("permNotSpam", $permNotSpam)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc postSetCommentText*(httpClient: HttpClient, commentId: string, setCommentTextParams: SetCommentTextParams, sso: string): (Option[SetCommentTextResponse], Response) = +type PostSetCommentTextOptions* = object + broadcastId*: string + sso*: string + +proc postSetCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, setCommentTextParams: SetCommentTextParams, options: PostSetCommentTextOptions): (Option[SetCommentTextResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/set-comment-text/{commentId}" & "?" & url_encoded_query_params, $(%setCommentTextParams)) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}" & "?" & url_encoded_query_params, $(%setCommentTextParams)) constructResult[SetCommentTextResponse](response) -proc postUnFlagComment*(httpClient: HttpClient, commentId: string, sso: string): (Option[APIEmptyResponse], Response) = +type PostUnFlagCommentOptions* = object + broadcastId*: string + sso*: string + +proc postUnFlagComment*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostUnFlagCommentOptions): (Option[APIEmptyResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/un-flag-comment/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc postVote*(httpClient: HttpClient, commentId: string, direction: string, sso: string): (Option[VoteResponse], Response) = +type PostVoteOptions* = object + direction*: string + broadcastId*: string + sso*: string + +proc postVote*(httpClient: HttpClient, tenantId: string, commentId: string, options: PostVoteOptions): (Option[VoteResponse], Response) = + let direction = options.direction + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $direction != "": query_params_list.add(("direction", $direction)) + if $broadcastId != "": + query_params_list.add(("broadcastId", $broadcastId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/vote/{commentId}" & "?" & url_encoded_query_params) + let response = httpClient.post(basepath & fmt"/auth/my-account/moderate-comments/mod_api/vote/{commentId}" & "?" & url_encoded_query_params) constructResult[VoteResponse](response) -proc putAwardBadge*(httpClient: HttpClient, badgeId: string, userId: string, commentId: string, broadcastId: string, sso: string): (Option[AwardUserBadgeResponse], Response) = +type PutAwardBadgeOptions* = object + userId*: string + commentId*: string + broadcastId*: string + sso*: string + +proc putAwardBadge*(httpClient: HttpClient, tenantId: string, badgeId: string, options: PutAwardBadgeOptions): (Option[AwardUserBadgeResponse], Response) = + let userId = options.userId + let commentId = options.commentId + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) query_params_list.add(("badgeId", $badgeId)) if $userId != "": query_params_list.add(("userId", $userId)) @@ -626,25 +945,37 @@ proc putAwardBadge*(httpClient: HttpClient, badgeId: string, userId: string, com query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/award-badge" & "?" & url_encoded_query_params) + let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/mod_api/award-badge" & "?" & url_encoded_query_params) constructResult[AwardUserBadgeResponse](response) -proc putCloseThread*(httpClient: HttpClient, urlId: string, sso: string): (Option[APIEmptyResponse], Response) = +proc putCloseThread*(httpClient: HttpClient, tenantId: string, urlId: string, sso: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) query_params_list.add(("urlId", $urlId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/close-thread" & "?" & url_encoded_query_params) + let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/mod_api/close-thread" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc putRemoveBadge*(httpClient: HttpClient, badgeId: string, userId: string, commentId: string, broadcastId: string, sso: string): (Option[RemoveUserBadgeResponse], Response) = +type PutRemoveBadgeOptions* = object + userId*: string + commentId*: string + broadcastId*: string + sso*: string + +proc putRemoveBadge*(httpClient: HttpClient, tenantId: string, badgeId: string, options: PutRemoveBadgeOptions): (Option[RemoveUserBadgeResponse], Response) = + let userId = options.userId + let commentId = options.commentId + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) query_params_list.add(("badgeId", $badgeId)) if $userId != "": query_params_list.add(("userId", $userId)) @@ -656,25 +987,35 @@ proc putRemoveBadge*(httpClient: HttpClient, badgeId: string, userId: string, co query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/remove-badge" & "?" & url_encoded_query_params) + let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/mod_api/remove-badge" & "?" & url_encoded_query_params) constructResult[RemoveUserBadgeResponse](response) -proc putReopenThread*(httpClient: HttpClient, urlId: string, sso: string): (Option[APIEmptyResponse], Response) = +proc putReopenThread*(httpClient: HttpClient, tenantId: string, urlId: string, sso: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) query_params_list.add(("urlId", $urlId)) if $sso != "": query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/reopen-thread" & "?" & url_encoded_query_params) + let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/mod_api/reopen-thread" & "?" & url_encoded_query_params) constructResult[APIEmptyResponse](response) -proc setTrustFactor*(httpClient: HttpClient, userId: string, trustFactor: string, sso: string): (Option[SetUserTrustFactorResponse], Response) = +type SetTrustFactorOptions* = object + userId*: string + trustFactor*: string + sso*: string + +proc setTrustFactor*(httpClient: HttpClient, tenantId: string, options: SetTrustFactorOptions): (Option[SetUserTrustFactorResponse], Response) = + let userId = options.userId + let trustFactor = options.trustFactor + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] + query_params_list.add(("tenantId", $tenantId)) if $userId != "": query_params_list.add(("userId", $userId)) if $trustFactor != "": @@ -683,6 +1024,6 @@ proc setTrustFactor*(httpClient: HttpClient, userId: string, trustFactor: string query_params_list.add(("sso", $sso)) let url_encoded_query_params = encodeQuery(query_params_list) - let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/set-trust-factor" & "?" & url_encoded_query_params) + let response = httpClient.put(basepath & "/auth/my-account/moderate-comments/mod_api/set-trust-factor" & "?" & url_encoded_query_params) constructResult[SetUserTrustFactorResponse](response) diff --git a/client/fastcomments/apis/api_public.nim b/client/fastcomments/apis/api_public.nim index 76bd07d..7a07fe7 100644 --- a/client/fastcomments/apis/api_public.nim +++ b/client/fastcomments/apis/api_public.nim @@ -87,7 +87,7 @@ template constructResult[T](response: Response): untyped = (none(T.typedesc), response) -proc blockFromCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, publicBlockFromCommentParams: PublicBlockFromCommentParams, sso: string): (Option[BlockSuccess], Response) = +proc blockFromCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, publicBlockFromCommentParams: PublicBlockFromCommentParams, sso: string = ""): (Option[BlockSuccess], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -100,7 +100,7 @@ proc blockFromCommentPublic*(httpClient: HttpClient, tenantId: string, commentId constructResult[BlockSuccess](response) -proc checkedCommentsForBlocked*(httpClient: HttpClient, tenantId: string, commentIds: string, sso: string): (Option[CheckBlockedCommentsResponse], Response) = +proc checkedCommentsForBlocked*(httpClient: HttpClient, tenantId: string, commentIds: string, sso: string = ""): (Option[CheckBlockedCommentsResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -113,7 +113,13 @@ proc checkedCommentsForBlocked*(httpClient: HttpClient, tenantId: string, commen constructResult[CheckBlockedCommentsResponse](response) -proc createCommentPublic*(httpClient: HttpClient, tenantId: string, urlId: string, broadcastId: string, commentData: CommentData, sessionId: string, sso: string): (Option[SaveCommentsResponseWithPresence], Response) = +type CreateCommentPublicOptions* = object + sessionId*: string + sso*: string + +proc createCommentPublic*(httpClient: HttpClient, tenantId: string, urlId: string, broadcastId: string, commentData: CommentData, options: CreateCommentPublicOptions): (Option[SaveCommentsResponseWithPresence], Response) = + let sessionId = options.sessionId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -129,7 +135,13 @@ proc createCommentPublic*(httpClient: HttpClient, tenantId: string, urlId: strin constructResult[SaveCommentsResponseWithPresence](response) -proc createFeedPostPublic*(httpClient: HttpClient, tenantId: string, createFeedPostParams: CreateFeedPostParams, broadcastId: string, sso: string): (Option[CreateFeedPostResponse], Response) = +type CreateFeedPostPublicOptions* = object + broadcastId*: string + sso*: string + +proc createFeedPostPublic*(httpClient: HttpClient, tenantId: string, createFeedPostParams: CreateFeedPostParams, options: CreateFeedPostPublicOptions): (Option[CreateFeedPostResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -143,7 +155,7 @@ proc createFeedPostPublic*(httpClient: HttpClient, tenantId: string, createFeedP constructResult[CreateFeedPostResponse](response) -proc createV1PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, title: string): (Option[CreateV1PageReact], Response) = +proc createV1PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, title: string = ""): (Option[CreateV1PageReact], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -155,7 +167,7 @@ proc createV1PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, constructResult[CreateV1PageReact](response) -proc createV2PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, id: string, title: string): (Option[CreateV1PageReact], Response) = +proc createV2PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, id: string, title: string = ""): (Option[CreateV1PageReact], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -168,7 +180,13 @@ proc createV2PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, constructResult[CreateV1PageReact](response) -proc deleteCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, editKey: string, sso: string): (Option[PublicAPIDeleteCommentResponse], Response) = +type DeleteCommentPublicOptions* = object + editKey*: string + sso*: string + +proc deleteCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, options: DeleteCommentPublicOptions): (Option[PublicAPIDeleteCommentResponse], Response) = + let editKey = options.editKey + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("broadcastId", $broadcastId)) @@ -182,7 +200,13 @@ proc deleteCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: s constructResult[PublicAPIDeleteCommentResponse](response) -proc deleteCommentVote*(httpClient: HttpClient, tenantId: string, commentId: string, voteId: string, urlId: string, broadcastId: string, editKey: string, sso: string): (Option[VoteDeleteResponse], Response) = +type DeleteCommentVoteOptions* = object + editKey*: string + sso*: string + +proc deleteCommentVote*(httpClient: HttpClient, tenantId: string, commentId: string, voteId: string, urlId: string, broadcastId: string, options: DeleteCommentVoteOptions): (Option[VoteDeleteResponse], Response) = + let editKey = options.editKey + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -197,7 +221,13 @@ proc deleteCommentVote*(httpClient: HttpClient, tenantId: string, commentId: str constructResult[VoteDeleteResponse](response) -proc deleteFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, broadcastId: string, sso: string): (Option[DeleteFeedPostPublicResponse], Response) = +type DeleteFeedPostPublicOptions* = object + broadcastId*: string + sso*: string + +proc deleteFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, options: DeleteFeedPostPublicOptions): (Option[DeleteFeedPostPublicResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] if $broadcastId != "": @@ -231,7 +261,7 @@ proc deleteV2PageReact*(httpClient: HttpClient, tenantId: string, urlId: string, constructResult[CreateV1PageReact](response) -proc flagCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, isFlagged: bool, sso: string): (Option[APIEmptyResponse], Response) = +proc flagCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, isFlagged: bool, sso: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -244,7 +274,13 @@ proc flagCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: str constructResult[APIEmptyResponse](response) -proc getCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, editKey: string, sso: string): (Option[PublicAPIGetCommentTextResponse], Response) = +type GetCommentTextOptions* = object + editKey*: string + sso*: string + +proc getCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, options: GetCommentTextOptions): (Option[PublicAPIGetCommentTextResponse], Response) = + let editKey = options.editKey + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] if $editKey != "": @@ -257,7 +293,7 @@ proc getCommentText*(httpClient: HttpClient, tenantId: string, commentId: string constructResult[PublicAPIGetCommentTextResponse](response) -proc getCommentVoteUserNames*(httpClient: HttpClient, tenantId: string, commentId: string, dir: int, sso: string): (Option[GetCommentVoteUserNamesSuccessResponse], Response) = +proc getCommentVoteUserNames*(httpClient: HttpClient, tenantId: string, commentId: string, dir: int, sso: string = ""): (Option[GetCommentVoteUserNamesSuccessResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("dir", $dir)) @@ -269,7 +305,23 @@ proc getCommentVoteUserNames*(httpClient: HttpClient, tenantId: string, commentI constructResult[GetCommentVoteUserNamesSuccessResponse](response) -proc getCommentsForUser*(httpClient: HttpClient, userId: string, direction: SortDirections, repliesToUserId: string, page: float64, includei10n: bool, locale: string, isCrawler: bool): (Option[GetCommentsForUserResponse], Response) = +type GetCommentsForUserOptions* = object + userId*: string + direction*: SortDirections + repliesToUserId*: string + page*: float64 + includei10n*: bool + locale*: string + isCrawler*: bool + +proc getCommentsForUser*(httpClient: HttpClient, options: GetCommentsForUserOptions): (Option[GetCommentsForUserResponse], Response) = + let userId = options.userId + let direction = options.direction + let repliesToUserId = options.repliesToUserId + let page = options.page + let includei10n = options.includei10n + let locale = options.locale + let isCrawler = options.isCrawler ## var query_params_list: seq[(string, string)] = @[] if $userId != "": @@ -292,7 +344,61 @@ proc getCommentsForUser*(httpClient: HttpClient, userId: string, direction: Sort constructResult[GetCommentsForUserResponse](response) -proc getCommentsPublic*(httpClient: HttpClient, tenantId: string, urlId: string, page: int, direction: SortDirections, sso: string, skip: int, skipChildren: int, limit: int, limitChildren: int, countChildren: bool, fetchPageForCommentId: string, includeConfig: bool, countAll: bool, includei10n: bool, locale: string, modules: string, isCrawler: bool, includeNotificationCount: bool, asTree: bool, maxTreeDepth: int, useFullTranslationIds: bool, parentId: string, searchText: string, hashTags: seq[string], userId: string, customConfigStr: string, afterCommentId: string, beforeCommentId: string): (Option[GetCommentsResponseWithPresencePublicComment], Response) = +type GetCommentsPublicOptions* = object + page*: int + direction*: SortDirections + sso*: string + skip*: int + skipChildren*: int + limit*: int + limitChildren*: int + countChildren*: bool + fetchPageForCommentId*: string + includeConfig*: bool + countAll*: bool + includei10n*: bool + locale*: string + modules*: string + isCrawler*: bool + includeNotificationCount*: bool + asTree*: bool + maxTreeDepth*: int + useFullTranslationIds*: bool + parentId*: string + searchText*: string + hashTags*: seq[string] + userId*: string + customConfigStr*: string + afterCommentId*: string + beforeCommentId*: string + +proc getCommentsPublic*(httpClient: HttpClient, tenantId: string, urlId: string, options: GetCommentsPublicOptions): (Option[GetCommentsResponseWithPresencePublicComment], Response) = + let page = options.page + let direction = options.direction + let sso = options.sso + let skip = options.skip + let skipChildren = options.skipChildren + let limit = options.limit + let limitChildren = options.limitChildren + let countChildren = options.countChildren + let fetchPageForCommentId = options.fetchPageForCommentId + let includeConfig = options.includeConfig + let countAll = options.countAll + let includei10n = options.includei10n + let locale = options.locale + let modules = options.modules + let isCrawler = options.isCrawler + let includeNotificationCount = options.includeNotificationCount + let asTree = options.asTree + let maxTreeDepth = options.maxTreeDepth + let useFullTranslationIds = options.useFullTranslationIds + let parentId = options.parentId + let searchText = options.searchText + let hashTags = options.hashTags + let userId = options.userId + let customConfigStr = options.customConfigStr + let afterCommentId = options.afterCommentId + let beforeCommentId = options.beforeCommentId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -368,7 +474,21 @@ proc getEventLog*(httpClient: HttpClient, tenantId: string, urlId: string, userI constructResult[GetEventLogResponse](response) -proc getFeedPostsPublic*(httpClient: HttpClient, tenantId: string, afterId: string, limit: int, tags: seq[string], sso: string, isCrawler: bool, includeUserInfo: bool): (Option[PublicFeedPostsResponse], Response) = +type GetFeedPostsPublicOptions* = object + afterId*: string + limit*: int + tags*: seq[string] + sso*: string + isCrawler*: bool + includeUserInfo*: bool + +proc getFeedPostsPublic*(httpClient: HttpClient, tenantId: string, options: GetFeedPostsPublicOptions): (Option[PublicFeedPostsResponse], Response) = + let afterId = options.afterId + let limit = options.limit + let tags = options.tags + let sso = options.sso + let isCrawler = options.isCrawler + let includeUserInfo = options.includeUserInfo ## var query_params_list: seq[(string, string)] = @[] if $afterId != "": @@ -389,7 +509,7 @@ proc getFeedPostsPublic*(httpClient: HttpClient, tenantId: string, afterId: stri constructResult[PublicFeedPostsResponse](response) -proc getFeedPostsStats*(httpClient: HttpClient, tenantId: string, postIds: seq[string], sso: string): (Option[FeedPostsStatsResponse], Response) = +proc getFeedPostsStats*(httpClient: HttpClient, tenantId: string, postIds: seq[string], sso: string = ""): (Option[FeedPostsStatsResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("postIds", $postIds.join(","))) @@ -411,7 +531,15 @@ proc getGifLarge*(httpClient: HttpClient, tenantId: string, largeInternalURLSani constructResult[GifGetLargeResponse](response) -proc getGifsSearch*(httpClient: HttpClient, tenantId: string, search: string, locale: string, rating: string, page: float64): (Option[GetGifsSearchResponse], Response) = +type GetGifsSearchOptions* = object + locale*: string + rating*: string + page*: float64 + +proc getGifsSearch*(httpClient: HttpClient, tenantId: string, search: string, options: GetGifsSearchOptions): (Option[GetGifsSearchResponse], Response) = + let locale = options.locale + let rating = options.rating + let page = options.page ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("search", $search)) @@ -427,7 +555,15 @@ proc getGifsSearch*(httpClient: HttpClient, tenantId: string, search: string, lo constructResult[GetGifsSearchResponse](response) -proc getGifsTrending*(httpClient: HttpClient, tenantId: string, locale: string, rating: string, page: float64): (Option[GetGifsTrendingResponse], Response) = +type GetGifsTrendingOptions* = object + locale*: string + rating*: string + page*: float64 + +proc getGifsTrending*(httpClient: HttpClient, tenantId: string, options: GetGifsTrendingOptions): (Option[GetGifsTrendingResponse], Response) = + let locale = options.locale + let rating = options.rating + let page = options.page ## var query_params_list: seq[(string, string)] = @[] if $locale != "": @@ -456,7 +592,13 @@ proc getGlobalEventLog*(httpClient: HttpClient, tenantId: string, urlId: string, constructResult[GetEventLogResponse](response) -proc getOfflineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, afterName: string, afterUserId: string): (Option[PageUsersOfflineResponse], Response) = +type GetOfflineUsersOptions* = object + afterName*: string + afterUserId*: string + +proc getOfflineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, options: GetOfflineUsersOptions): (Option[PageUsersOfflineResponse], Response) = + let afterName = options.afterName + let afterUserId = options.afterUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -470,7 +612,13 @@ proc getOfflineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, a constructResult[PageUsersOfflineResponse](response) -proc getOnlineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, afterName: string, afterUserId: string): (Option[PageUsersOnlineResponse], Response) = +type GetOnlineUsersOptions* = object + afterName*: string + afterUserId*: string + +proc getOnlineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, options: GetOnlineUsersOptions): (Option[PageUsersOnlineResponse], Response) = + let afterName = options.afterName + let afterUserId = options.afterUserId ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -484,7 +632,19 @@ proc getOnlineUsers*(httpClient: HttpClient, tenantId: string, urlId: string, af constructResult[PageUsersOnlineResponse](response) -proc getPagesPublic*(httpClient: HttpClient, tenantId: string, cursor: string, limit: int, q: string, sortBy: PagesSortBy, hasComments: bool): (Option[GetPublicPagesResponse], Response) = +type GetPagesPublicOptions* = object + cursor*: string + limit*: int + q*: string + sortBy*: PagesSortBy + hasComments*: bool + +proc getPagesPublic*(httpClient: HttpClient, tenantId: string, options: GetPagesPublicOptions): (Option[GetPublicPagesResponse], Response) = + let cursor = options.cursor + let limit = options.limit + let q = options.q + let sortBy = options.sortBy + let hasComments = options.hasComments ## var query_params_list: seq[(string, string)] = @[] if $cursor != "": @@ -503,7 +663,13 @@ proc getPagesPublic*(httpClient: HttpClient, tenantId: string, cursor: string, l constructResult[GetPublicPagesResponse](response) -proc getTranslations*(httpClient: HttpClient, namespace: string, component: string, locale: string, useFullTranslationIds: bool): (Option[GetTranslationsResponse], Response) = +type GetTranslationsOptions* = object + locale*: string + useFullTranslationIds*: bool + +proc getTranslations*(httpClient: HttpClient, namespace: string, component: string, options: GetTranslationsOptions): (Option[GetTranslationsResponse], Response) = + let locale = options.locale + let useFullTranslationIds = options.useFullTranslationIds ## var query_params_list: seq[(string, string)] = @[] if $locale != "": @@ -516,7 +682,7 @@ proc getTranslations*(httpClient: HttpClient, namespace: string, component: stri constructResult[GetTranslationsResponse](response) -proc getUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: string): (Option[GetUserNotificationCountResponse], Response) = +proc getUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: string = ""): (Option[GetUserNotificationCountResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -528,7 +694,31 @@ proc getUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: st constructResult[GetUserNotificationCountResponse](response) -proc getUserNotifications*(httpClient: HttpClient, tenantId: string, urlId: string, pageSize: int, afterId: string, includeContext: bool, afterCreatedAt: int64, unreadOnly: bool, dmOnly: bool, noDm: bool, includeTranslations: bool, includeTenantNotifications: bool, sso: string): (Option[GetMyNotificationsResponse], Response) = +type GetUserNotificationsOptions* = object + urlId*: string + pageSize*: int + afterId*: string + includeContext*: bool + afterCreatedAt*: int64 + unreadOnly*: bool + dmOnly*: bool + noDm*: bool + includeTranslations*: bool + includeTenantNotifications*: bool + sso*: string + +proc getUserNotifications*(httpClient: HttpClient, tenantId: string, options: GetUserNotificationsOptions): (Option[GetMyNotificationsResponse], Response) = + let urlId = options.urlId + let pageSize = options.pageSize + let afterId = options.afterId + let includeContext = options.includeContext + let afterCreatedAt = options.afterCreatedAt + let unreadOnly = options.unreadOnly + let dmOnly = options.dmOnly + let noDm = options.noDm + let includeTranslations = options.includeTranslations + let includeTenantNotifications = options.includeTenantNotifications + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -572,7 +762,13 @@ proc getUserPresenceStatuses*(httpClient: HttpClient, tenantId: string, urlIdWS: constructResult[GetUserPresenceStatusesResponse](response) -proc getUserReactsPublic*(httpClient: HttpClient, tenantId: string, postIds: seq[string], sso: string): (Option[UserReactsResponse], Response) = +type GetUserReactsPublicOptions* = object + postIds*: seq[string] + sso*: string + +proc getUserReactsPublic*(httpClient: HttpClient, tenantId: string, options: GetUserReactsPublicOptions): (Option[UserReactsResponse], Response) = + let postIds = options.postIds + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] if postIds.len > 0: @@ -626,7 +822,7 @@ proc getV2PageReacts*(httpClient: HttpClient, tenantId: string, urlId: string): constructResult[GetV2PageReacts](response) -proc lockComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string): (Option[APIEmptyResponse], Response) = +proc lockComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("broadcastId", $broadcastId)) @@ -645,7 +841,7 @@ proc logoutPublic*(httpClient: HttpClient): (Option[APIEmptyResponse], Response) constructResult[APIEmptyResponse](response) -proc pinComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string): (Option[ChangeCommentPinStatusResponse], Response) = +proc pinComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string = ""): (Option[ChangeCommentPinStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("broadcastId", $broadcastId)) @@ -657,7 +853,15 @@ proc pinComment*(httpClient: HttpClient, tenantId: string, commentId: string, br constructResult[ChangeCommentPinStatusResponse](response) -proc reactFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, reactBodyParams: ReactBodyParams, isUndo: bool, broadcastId: string, sso: string): (Option[ReactFeedPostResponse], Response) = +type ReactFeedPostPublicOptions* = object + isUndo*: bool + broadcastId*: string + sso*: string + +proc reactFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, reactBodyParams: ReactBodyParams, options: ReactFeedPostPublicOptions): (Option[ReactFeedPostResponse], Response) = + let isUndo = options.isUndo + let broadcastId = options.broadcastId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -673,7 +877,7 @@ proc reactFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: stri constructResult[ReactFeedPostResponse](response) -proc resetUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: string): (Option[ResetUserNotificationsResponse], Response) = +proc resetUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: string = ""): (Option[ResetUserNotificationsResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -685,7 +889,21 @@ proc resetUserNotificationCount*(httpClient: HttpClient, tenantId: string, sso: constructResult[ResetUserNotificationsResponse](response) -proc resetUserNotifications*(httpClient: HttpClient, tenantId: string, afterId: string, afterCreatedAt: int64, unreadOnly: bool, dmOnly: bool, noDm: bool, sso: string): (Option[ResetUserNotificationsResponse], Response) = +type ResetUserNotificationsOptions* = object + afterId*: string + afterCreatedAt*: int64 + unreadOnly*: bool + dmOnly*: bool + noDm*: bool + sso*: string + +proc resetUserNotifications*(httpClient: HttpClient, tenantId: string, options: ResetUserNotificationsOptions): (Option[ResetUserNotificationsResponse], Response) = + let afterId = options.afterId + let afterCreatedAt = options.afterCreatedAt + let unreadOnly = options.unreadOnly + let dmOnly = options.dmOnly + let noDm = options.noDm + let sso = options.sso ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -707,7 +925,17 @@ proc resetUserNotifications*(httpClient: HttpClient, tenantId: string, afterId: constructResult[ResetUserNotificationsResponse](response) -proc searchUsers*(httpClient: HttpClient, tenantId: string, urlId: string, usernameStartsWith: string, mentionGroupIds: seq[string], sso: string, searchSection: string): (Option[SearchUsersResult], Response) = +type SearchUsersOptions* = object + usernameStartsWith*: string + mentionGroupIds*: seq[string] + sso*: string + searchSection*: string + +proc searchUsers*(httpClient: HttpClient, tenantId: string, urlId: string, options: SearchUsersOptions): (Option[SearchUsersResult], Response) = + let usernameStartsWith = options.usernameStartsWith + let mentionGroupIds = options.mentionGroupIds + let sso = options.sso + let searchSection = options.searchSection ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("urlId", $urlId)) @@ -725,7 +953,13 @@ proc searchUsers*(httpClient: HttpClient, tenantId: string, urlId: string, usern constructResult[SearchUsersResult](response) -proc setCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, commentTextUpdateRequest: CommentTextUpdateRequest, editKey: string, sso: string): (Option[PublicAPISetCommentTextResponse], Response) = +type SetCommentTextOptions* = object + editKey*: string + sso*: string + +proc setCommentText*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, commentTextUpdateRequest: CommentTextUpdateRequest, options: SetCommentTextOptions): (Option[PublicAPISetCommentTextResponse], Response) = + let editKey = options.editKey + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -740,7 +974,7 @@ proc setCommentText*(httpClient: HttpClient, tenantId: string, commentId: string constructResult[PublicAPISetCommentTextResponse](response) -proc unBlockCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, publicBlockFromCommentParams: PublicBlockFromCommentParams, sso: string): (Option[UnblockSuccess], Response) = +proc unBlockCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: string, publicBlockFromCommentParams: PublicBlockFromCommentParams, sso: string = ""): (Option[UnblockSuccess], Response) = ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -752,7 +986,7 @@ proc unBlockCommentPublic*(httpClient: HttpClient, tenantId: string, commentId: constructResult[UnblockSuccess](response) -proc unLockComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string): (Option[APIEmptyResponse], Response) = +proc unLockComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string = ""): (Option[APIEmptyResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("broadcastId", $broadcastId)) @@ -764,7 +998,7 @@ proc unLockComment*(httpClient: HttpClient, tenantId: string, commentId: string, constructResult[APIEmptyResponse](response) -proc unPinComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string): (Option[ChangeCommentPinStatusResponse], Response) = +proc unPinComment*(httpClient: HttpClient, tenantId: string, commentId: string, broadcastId: string, sso: string = ""): (Option[ChangeCommentPinStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("broadcastId", $broadcastId)) @@ -776,7 +1010,13 @@ proc unPinComment*(httpClient: HttpClient, tenantId: string, commentId: string, constructResult[ChangeCommentPinStatusResponse](response) -proc updateFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, updateFeedPostParams: UpdateFeedPostParams, broadcastId: string, sso: string): (Option[CreateFeedPostResponse], Response) = +type UpdateFeedPostPublicOptions* = object + broadcastId*: string + sso*: string + +proc updateFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: string, updateFeedPostParams: UpdateFeedPostParams, options: UpdateFeedPostPublicOptions): (Option[CreateFeedPostResponse], Response) = + let broadcastId = options.broadcastId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] @@ -790,7 +1030,7 @@ proc updateFeedPostPublic*(httpClient: HttpClient, tenantId: string, postId: str constructResult[CreateFeedPostResponse](response) -proc updateUserNotificationCommentSubscriptionStatus*(httpClient: HttpClient, tenantId: string, notificationId: string, optedInOrOut: string, commentId: string, sso: string): (Option[UpdateUserNotificationCommentSubscriptionStatusResponse], Response) = +proc updateUserNotificationCommentSubscriptionStatus*(httpClient: HttpClient, tenantId: string, notificationId: string, optedInOrOut: string, commentId: string, sso: string = ""): (Option[UpdateUserNotificationCommentSubscriptionStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -803,7 +1043,7 @@ proc updateUserNotificationCommentSubscriptionStatus*(httpClient: HttpClient, te constructResult[UpdateUserNotificationCommentSubscriptionStatusResponse](response) -proc updateUserNotificationPageSubscriptionStatus*(httpClient: HttpClient, tenantId: string, urlId: string, url: string, pageTitle: string, subscribedOrUnsubscribed: string, sso: string): (Option[UpdateUserNotificationPageSubscriptionStatusResponse], Response) = +proc updateUserNotificationPageSubscriptionStatus*(httpClient: HttpClient, tenantId: string, urlId: string, url: string, pageTitle: string, subscribedOrUnsubscribed: string, sso: string = ""): (Option[UpdateUserNotificationPageSubscriptionStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -818,7 +1058,7 @@ proc updateUserNotificationPageSubscriptionStatus*(httpClient: HttpClient, tenan constructResult[UpdateUserNotificationPageSubscriptionStatusResponse](response) -proc updateUserNotificationStatus*(httpClient: HttpClient, tenantId: string, notificationId: string, newStatus: string, sso: string): (Option[UpdateUserNotificationStatusResponse], Response) = +proc updateUserNotificationStatus*(httpClient: HttpClient, tenantId: string, notificationId: string, newStatus: string, sso: string = ""): (Option[UpdateUserNotificationStatusResponse], Response) = ## var query_params_list: seq[(string, string)] = @[] query_params_list.add(("tenantId", $tenantId)) @@ -830,7 +1070,13 @@ proc updateUserNotificationStatus*(httpClient: HttpClient, tenantId: string, not constructResult[UpdateUserNotificationStatusResponse](response) -proc uploadImage*(httpClient: HttpClient, tenantId: string, file: string, sizePreset: SizePreset, urlId: string): (Option[UploadImageResponse], Response) = +type UploadImageOptions* = object + sizePreset*: SizePreset + urlId*: string + +proc uploadImage*(httpClient: HttpClient, tenantId: string, file: string, options: UploadImageOptions): (Option[UploadImageResponse], Response) = + let sizePreset = options.sizePreset + let urlId = options.urlId ## httpClient.headers["Content-Type"] = "multipart/form-data" var query_params_list: seq[(string, string)] = @[] @@ -847,7 +1093,13 @@ proc uploadImage*(httpClient: HttpClient, tenantId: string, file: string, sizePr constructResult[UploadImageResponse](response) -proc voteComment*(httpClient: HttpClient, tenantId: string, commentId: string, urlId: string, broadcastId: string, voteBodyParams: VoteBodyParams, sessionId: string, sso: string): (Option[VoteResponse], Response) = +type VoteCommentOptions* = object + sessionId*: string + sso*: string + +proc voteComment*(httpClient: HttpClient, tenantId: string, commentId: string, urlId: string, broadcastId: string, voteBodyParams: VoteBodyParams, options: VoteCommentOptions): (Option[VoteResponse], Response) = + let sessionId = options.sessionId + let sso = options.sso ## httpClient.headers["Content-Type"] = "application/json" var query_params_list: seq[(string, string)] = @[] diff --git a/client/fastcomments/models/model_post_remove_comment_response.nim b/client/fastcomments/models/model_post_remove_comment_api_response.nim similarity index 54% rename from client/fastcomments/models/model_post_remove_comment_response.nim rename to client/fastcomments/models/model_post_remove_comment_api_response.nim index 6726b3f..4e425cf 100644 --- a/client/fastcomments/models/model_post_remove_comment_response.nim +++ b/client/fastcomments/models/model_post_remove_comment_api_response.nim @@ -16,29 +16,29 @@ import model_delete_comment_result import model_remove_comment_action_response # AnyOf type -type PostRemoveCommentResponseKind* {.pure.} = enum +type PostRemoveCommentApiResponseKind* {.pure.} = enum DeleteCommentResultVariant RemoveCommentActionResponseVariant -type PostRemoveCommentResponse* = object +type PostRemoveCommentApiResponse* = object ## - case kind*: PostRemoveCommentResponseKind - of PostRemoveCommentResponseKind.DeleteCommentResultVariant: + case kind*: PostRemoveCommentApiResponseKind + of PostRemoveCommentApiResponseKind.DeleteCommentResultVariant: DeleteCommentResultValue*: DeleteCommentResult - of PostRemoveCommentResponseKind.RemoveCommentActionResponseVariant: + of PostRemoveCommentApiResponseKind.RemoveCommentActionResponseVariant: RemoveCommentActionResponseValue*: RemoveCommentActionResponse -proc to*(node: JsonNode, T: typedesc[PostRemoveCommentResponse]): PostRemoveCommentResponse = +proc to*(node: JsonNode, T: typedesc[PostRemoveCommentApiResponse]): PostRemoveCommentApiResponse = ## Custom deserializer for anyOf type - tries each variant try: - return PostRemoveCommentResponse(kind: PostRemoveCommentResponseKind.DeleteCommentResultVariant, DeleteCommentResultValue: to(node, DeleteCommentResult)) + return PostRemoveCommentApiResponse(kind: PostRemoveCommentApiResponseKind.DeleteCommentResultVariant, DeleteCommentResultValue: to(node, DeleteCommentResult)) except Exception as e: when defined(debug): echo "Failed to deserialize as DeleteCommentResult: ", e.msg try: - return PostRemoveCommentResponse(kind: PostRemoveCommentResponseKind.RemoveCommentActionResponseVariant, RemoveCommentActionResponseValue: to(node, RemoveCommentActionResponse)) + return PostRemoveCommentApiResponse(kind: PostRemoveCommentApiResponseKind.RemoveCommentActionResponseVariant, RemoveCommentActionResponseValue: to(node, RemoveCommentActionResponse)) except Exception as e: when defined(debug): echo "Failed to deserialize as RemoveCommentActionResponse: ", e.msg - raise newException(ValueError, "Unable to deserialize into any variant of PostRemoveCommentResponse. JSON: " & $node) + raise newException(ValueError, "Unable to deserialize into any variant of PostRemoveCommentApiResponse. JSON: " & $node) diff --git a/config.json b/config.json index 5a8e76f..309587b 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,4 @@ { "packageName": "fastcomments", - "packageVersion": "2.0.0" + "packageVersion": "3.0.0" } diff --git a/docs/Apis/DefaultApi.md b/docs/Apis/DefaultApi.md index 899940e..8d14a27 100644 --- a/docs/Apis/DefaultApi.md +++ b/docs/Apis/DefaultApi.md @@ -156,7 +156,7 @@ All URIs are relative to *https://fastcomments.com* |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String**| | [optional] [default to null] | +| **tenantId** | **String**| | [default to null] | | **CreateHashTagBody** | [**CreateHashTagBody**](../Models/CreateHashTagBody.md)| | [optional] | ### Return type @@ -182,7 +182,7 @@ All URIs are relative to *https://fastcomments.com* |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tenantId** | **String**| | [optional] [default to null] | +| **tenantId** | **String**| | [default to null] | | **BulkCreateHashTagsBody** | [**BulkCreateHashTagsBody**](../Models/BulkCreateHashTagsBody.md)| | [optional] | ### Return type @@ -857,7 +857,7 @@ All URIs are relative to *https://fastcomments.com* # **deleteHashTag** -> APIEmptyResponse deleteHashTag(tag, tenantId, DeleteHashTagRequestBody) +> APIEmptyResponse deleteHashTag(tenantId, tag, DeleteHashTagRequestBody) @@ -865,8 +865,8 @@ All URIs are relative to *https://fastcomments.com* |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **tag** | **String**| | [default to null] | -| **tenantId** | **String**| | [optional] [default to null] | | **DeleteHashTagRequestBody** | [**DeleteHashTagRequestBody**](../Models/DeleteHashTagRequestBody.md)| | [optional] | ### Return type @@ -2518,7 +2518,7 @@ All URIs are relative to *https://fastcomments.com* # **patchHashTag** -> UpdateHashTagResponse patchHashTag(tag, tenantId, UpdateHashTagBody) +> UpdateHashTagResponse patchHashTag(tenantId, tag, UpdateHashTagBody) @@ -2526,8 +2526,8 @@ All URIs are relative to *https://fastcomments.com* |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **tag** | **String**| | [default to null] | -| **tenantId** | **String**| | [optional] [default to null] | | **UpdateHashTagBody** | [**UpdateHashTagBody**](../Models/UpdateHashTagBody.md)| | [optional] | ### Return type diff --git a/docs/Apis/ModerationApi.md b/docs/Apis/ModerationApi.md index 8ecaec1..809ef44 100644 --- a/docs/Apis/ModerationApi.md +++ b/docs/Apis/ModerationApi.md @@ -4,54 +4,54 @@ All URIs are relative to *https://fastcomments.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteModerationVote**](ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | | -| [**getApiComments**](ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/api/comments | | -| [**getApiExportStatus**](ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/api/export/status | | -| [**getApiIds**](ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/api/ids | | -| [**getBanUsersFromComment**](ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | | -| [**getCommentBanStatus**](ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | | -| [**getCommentChildren**](ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | | -| [**getCount**](ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/count | | -| [**getCounts**](ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/counts | | -| [**getLogs**](ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/logs/{commentId} | | -| [**getManualBadges**](ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/get-manual-badges | | -| [**getManualBadgesForUser**](ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | | -| [**getModerationComment**](ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/comment/{commentId} | | -| [**getModerationCommentText**](ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | | -| [**getPreBanSummary**](ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | | -| [**getSearchCommentsSummary**](ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/search/comments/summary | | -| [**getSearchPages**](ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/search/pages | | -| [**getSearchSites**](ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/search/sites | | -| [**getSearchSuggest**](ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/search/suggest | | -| [**getSearchUsers**](ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/search/users | | -| [**getTrustFactor**](ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/get-trust-factor | | -| [**getUserBanPreference**](ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/user-ban-preference | | -| [**getUserInternalProfile**](ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | | -| [**postAdjustCommentVotes**](ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | | -| [**postApiExport**](ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/api/export | | -| [**postBanUserFromComment**](ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | | -| [**postBanUserUndo**](ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/ban-user/undo | | -| [**postBulkPreBanSummary**](ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | | -| [**postCommentsByIds**](ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/comments-by-ids | | -| [**postFlagComment**](ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | | -| [**postRemoveComment**](ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | | -| [**postRestoreDeletedComment**](ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | | -| [**postSetCommentApprovalStatus**](ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | | -| [**postSetCommentReviewStatus**](ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | | -| [**postSetCommentSpamStatus**](ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | | -| [**postSetCommentText**](ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | | -| [**postUnFlagComment**](ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | | -| [**postVote**](ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/vote/{commentId} | | -| [**putAwardBadge**](ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/award-badge | | -| [**putCloseThread**](ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/close-thread | | -| [**putRemoveBadge**](ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/remove-badge | | -| [**putReopenThread**](ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/reopen-thread | | -| [**setTrustFactor**](ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/set-trust-factor | | +| [**deleteModerationVote**](ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId} | | +| [**getApiComments**](ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/mod_api/api/comments | | +| [**getApiExportStatus**](ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/mod_api/api/export/status | | +| [**getApiIds**](ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/mod_api/api/ids | | +| [**getBanUsersFromComment**](ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId} | | +| [**getCommentBanStatus**](ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId} | | +| [**getCommentChildren**](ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/mod_api/comment-children/{commentId} | | +| [**getCount**](ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/mod_api/count | | +| [**getCounts**](ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/mod_api/counts | | +| [**getLogs**](ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/mod_api/logs/{commentId} | | +| [**getManualBadges**](ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges | | +| [**getManualBadgesForUser**](ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user | | +| [**getModerationComment**](ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/mod_api/comment/{commentId} | | +| [**getModerationCommentText**](ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId} | | +| [**getPreBanSummary**](ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId} | | +| [**getSearchCommentsSummary**](ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/mod_api/search/comments/summary | | +| [**getSearchPages**](ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/mod_api/search/pages | | +| [**getSearchSites**](ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/mod_api/search/sites | | +| [**getSearchSuggest**](ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/mod_api/search/suggest | | +| [**getSearchUsers**](ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/mod_api/search/users | | +| [**getTrustFactor**](ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/mod_api/get-trust-factor | | +| [**getUserBanPreference**](ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/mod_api/user-ban-preference | | +| [**getUserInternalProfile**](ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/mod_api/get-user-internal-profile | | +| [**postAdjustCommentVotes**](ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId} | | +| [**postApiExport**](ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/mod_api/api/export | | +| [**postBanUserFromComment**](ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId} | | +| [**postBanUserUndo**](ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/undo | | +| [**postBulkPreBanSummary**](ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary | | +| [**postCommentsByIds**](ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/mod_api/comments-by-ids | | +| [**postFlagComment**](ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/flag-comment/{commentId} | | +| [**postRemoveComment**](ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/mod_api/remove-comment/{commentId} | | +| [**postRestoreDeletedComment**](ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId} | | +| [**postSetCommentApprovalStatus**](ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId} | | +| [**postSetCommentReviewStatus**](ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId} | | +| [**postSetCommentSpamStatus**](ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId} | | +| [**postSetCommentText**](ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId} | | +| [**postUnFlagComment**](ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId} | | +| [**postVote**](ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/mod_api/vote/{commentId} | | +| [**putAwardBadge**](ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/award-badge | | +| [**putCloseThread**](ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/mod_api/close-thread | | +| [**putRemoveBadge**](ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/remove-badge | | +| [**putReopenThread**](ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/mod_api/reopen-thread | | +| [**setTrustFactor**](ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/mod_api/set-trust-factor | | # **deleteModerationVote** -> VoteDeleteResponse deleteModerationVote(commentId, voteId, sso) +> VoteDeleteResponse deleteModerationVote(tenantId, commentId, voteId, broadcastId, sso) @@ -59,8 +59,10 @@ All URIs are relative to *https://fastcomments.com* |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **voteId** | **String**| | [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -78,7 +80,7 @@ No authorization required # **getApiComments** -> ModerationAPIGetCommentsResponse getApiComments(page, count, text-search, byIPFromComment, filters, searchFilters, sorts, demo, sso) +> ModerationAPIGetCommentsResponse getApiComments(tenantId, page, count, text-search, byIPFromComment, filters, searchFilters, sorts, demo, sso) @@ -86,6 +88,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **page** | **Double**| | [optional] [default to null] | | **count** | **Double**| | [optional] [default to null] | | **text-search** | **String**| | [optional] [default to null] | @@ -111,7 +114,7 @@ No authorization required # **getApiExportStatus** -> ModerationExportStatusResponse getApiExportStatus(batchJobId, sso) +> ModerationExportStatusResponse getApiExportStatus(tenantId, batchJobId, sso) @@ -119,6 +122,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **batchJobId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -137,7 +141,7 @@ No authorization required # **getApiIds** -> ModerationAPIGetCommentIdsResponse getApiIds(text-search, byIPFromComment, filters, searchFilters, afterId, demo, sso) +> ModerationAPIGetCommentIdsResponse getApiIds(tenantId, text-search, byIPFromComment, filters, searchFilters, afterId, demo, sso) @@ -145,6 +149,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **text-search** | **String**| | [optional] [default to null] | | **byIPFromComment** | **String**| | [optional] [default to null] | | **filters** | **String**| | [optional] [default to null] | @@ -168,7 +173,7 @@ No authorization required # **getBanUsersFromComment** -> GetBannedUsersFromCommentResponse getBanUsersFromComment(commentId, sso) +> GetBannedUsersFromCommentResponse getBanUsersFromComment(tenantId, commentId, sso) @@ -176,6 +181,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -194,7 +200,7 @@ No authorization required # **getCommentBanStatus** -> GetCommentBanStatusResponse getCommentBanStatus(commentId, sso) +> GetCommentBanStatusResponse getCommentBanStatus(tenantId, commentId, sso) @@ -202,6 +208,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -220,7 +227,7 @@ No authorization required # **getCommentChildren** -> ModerationAPIChildCommentsResponse getCommentChildren(commentId, sso) +> ModerationAPIChildCommentsResponse getCommentChildren(tenantId, commentId, sso) @@ -228,6 +235,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -246,7 +254,7 @@ No authorization required # **getCount** -> ModerationAPICountCommentsResponse getCount(text-search, byIPFromComment, filter, searchFilters, demo, sso) +> ModerationAPICountCommentsResponse getCount(tenantId, text-search, byIPFromComment, filter, searchFilters, demo, sso) @@ -254,6 +262,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **text-search** | **String**| | [optional] [default to null] | | **byIPFromComment** | **String**| | [optional] [default to null] | | **filter** | **String**| | [optional] [default to null] | @@ -276,7 +285,7 @@ No authorization required # **getCounts** -> GetBannedUsersCountResponse getCounts(sso) +> GetBannedUsersCountResponse getCounts(tenantId, sso) @@ -284,6 +293,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -301,7 +311,7 @@ No authorization required # **getLogs** -> ModerationAPIGetLogsResponse getLogs(commentId, sso) +> ModerationAPIGetLogsResponse getLogs(tenantId, commentId, sso) @@ -309,6 +319,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -327,7 +338,7 @@ No authorization required # **getManualBadges** -> GetTenantManualBadgesResponse getManualBadges(sso) +> GetTenantManualBadgesResponse getManualBadges(tenantId, sso) @@ -335,6 +346,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -352,7 +364,7 @@ No authorization required # **getManualBadgesForUser** -> GetUserManualBadgesResponse getManualBadgesForUser(badgesUserId, commentId, sso) +> GetUserManualBadgesResponse getManualBadgesForUser(tenantId, badgesUserId, commentId, sso) @@ -360,6 +372,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **badgesUserId** | **String**| | [optional] [default to null] | | **commentId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -379,7 +392,7 @@ No authorization required # **getModerationComment** -> ModerationAPICommentResponse getModerationComment(commentId, includeEmail, includeIP, sso) +> ModerationAPICommentResponse getModerationComment(tenantId, commentId, includeEmail, includeIP, sso) @@ -387,6 +400,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **includeEmail** | **Boolean**| | [optional] [default to null] | | **includeIP** | **Boolean**| | [optional] [default to null] | @@ -407,7 +421,7 @@ No authorization required # **getModerationCommentText** -> GetCommentTextResponse getModerationCommentText(commentId, sso) +> GetCommentTextResponse getModerationCommentText(tenantId, commentId, sso) @@ -415,6 +429,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -433,7 +448,7 @@ No authorization required # **getPreBanSummary** -> PreBanSummary getPreBanSummary(commentId, includeByUserIdAndEmail, includeByIP, includeByEmailDomain, sso) +> PreBanSummary getPreBanSummary(tenantId, commentId, includeByUserIdAndEmail, includeByIP, includeByEmailDomain, sso) @@ -441,6 +456,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **includeByUserIdAndEmail** | **Boolean**| | [optional] [default to null] | | **includeByIP** | **Boolean**| | [optional] [default to null] | @@ -462,7 +478,7 @@ No authorization required # **getSearchCommentsSummary** -> ModerationCommentSearchResponse getSearchCommentsSummary(value, filters, searchFilters, sso) +> ModerationCommentSearchResponse getSearchCommentsSummary(tenantId, value, filters, searchFilters, sso) @@ -470,6 +486,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **value** | **String**| | [optional] [default to null] | | **filters** | **String**| | [optional] [default to null] | | **searchFilters** | **String**| | [optional] [default to null] | @@ -490,7 +507,7 @@ No authorization required # **getSearchPages** -> ModerationPageSearchResponse getSearchPages(value, sso) +> ModerationPageSearchResponse getSearchPages(tenantId, value, sso) @@ -498,6 +515,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **value** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -516,7 +534,7 @@ No authorization required # **getSearchSites** -> ModerationSiteSearchResponse getSearchSites(value, sso) +> ModerationSiteSearchResponse getSearchSites(tenantId, value, sso) @@ -524,6 +542,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **value** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -542,7 +561,7 @@ No authorization required # **getSearchSuggest** -> ModerationSuggestResponse getSearchSuggest(text-search, sso) +> ModerationSuggestResponse getSearchSuggest(tenantId, text-search, sso) @@ -550,6 +569,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **text-search** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -568,7 +588,7 @@ No authorization required # **getSearchUsers** -> ModerationUserSearchResponse getSearchUsers(value, sso) +> ModerationUserSearchResponse getSearchUsers(tenantId, value, sso) @@ -576,6 +596,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **value** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -594,7 +615,7 @@ No authorization required # **getTrustFactor** -> GetUserTrustFactorResponse getTrustFactor(userId, sso) +> GetUserTrustFactorResponse getTrustFactor(tenantId, userId, sso) @@ -602,6 +623,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **userId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -620,7 +642,7 @@ No authorization required # **getUserBanPreference** -> APIModerateGetUserBanPreferencesResponse getUserBanPreference(sso) +> APIModerateGetUserBanPreferencesResponse getUserBanPreference(tenantId, sso) @@ -628,6 +650,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -645,7 +668,7 @@ No authorization required # **getUserInternalProfile** -> GetUserInternalProfileResponse getUserInternalProfile(commentId, sso) +> GetUserInternalProfileResponse getUserInternalProfile(tenantId, commentId, sso) @@ -653,6 +676,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -671,7 +695,7 @@ No authorization required # **postAdjustCommentVotes** -> AdjustVotesResponse postAdjustCommentVotes(commentId, AdjustCommentVotesParams, sso) +> AdjustVotesResponse postAdjustCommentVotes(tenantId, commentId, AdjustCommentVotesParams, broadcastId, sso) @@ -679,8 +703,10 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **AdjustCommentVotesParams** | [**AdjustCommentVotesParams**](../Models/AdjustCommentVotesParams.md)| | | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -698,7 +724,7 @@ No authorization required # **postApiExport** -> ModerationExportResponse postApiExport(text-search, byIPFromComment, filters, searchFilters, sorts, sso) +> ModerationExportResponse postApiExport(tenantId, text-search, byIPFromComment, filters, searchFilters, sorts, sso) @@ -706,6 +732,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **text-search** | **String**| | [optional] [default to null] | | **byIPFromComment** | **String**| | [optional] [default to null] | | **filters** | **String**| | [optional] [default to null] | @@ -728,7 +755,7 @@ No authorization required # **postBanUserFromComment** -> BanUserFromCommentResult postBanUserFromComment(commentId, banEmail, banEmailDomain, banIP, deleteAllUsersComments, bannedUntil, isShadowBan, updateId, banReason, sso) +> BanUserFromCommentResult postBanUserFromComment(tenantId, commentId, banEmail, banEmailDomain, banIP, deleteAllUsersComments, bannedUntil, isShadowBan, updateId, banReason, sso) @@ -736,6 +763,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **banEmail** | **Boolean**| | [optional] [default to null] | | **banEmailDomain** | **Boolean**| | [optional] [default to null] | @@ -762,7 +790,7 @@ No authorization required # **postBanUserUndo** -> APIEmptyResponse postBanUserUndo(BanUserUndoParams, sso) +> APIEmptyResponse postBanUserUndo(tenantId, BanUserUndoParams, sso) @@ -770,6 +798,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **BanUserUndoParams** | [**BanUserUndoParams**](../Models/BanUserUndoParams.md)| | | | **sso** | **String**| | [optional] [default to null] | @@ -788,7 +817,7 @@ No authorization required # **postBulkPreBanSummary** -> BulkPreBanSummary postBulkPreBanSummary(BulkPreBanParams, includeByUserIdAndEmail, includeByIP, includeByEmailDomain, sso) +> BulkPreBanSummary postBulkPreBanSummary(tenantId, BulkPreBanParams, includeByUserIdAndEmail, includeByIP, includeByEmailDomain, sso) @@ -796,6 +825,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **BulkPreBanParams** | [**BulkPreBanParams**](../Models/BulkPreBanParams.md)| | | | **includeByUserIdAndEmail** | **Boolean**| | [optional] [default to null] | | **includeByIP** | **Boolean**| | [optional] [default to null] | @@ -817,7 +847,7 @@ No authorization required # **postCommentsByIds** -> ModerationAPIChildCommentsResponse postCommentsByIds(CommentsByIdsParams, sso) +> ModerationAPIChildCommentsResponse postCommentsByIds(tenantId, CommentsByIdsParams, sso) @@ -825,6 +855,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **CommentsByIdsParams** | [**CommentsByIdsParams**](../Models/CommentsByIdsParams.md)| | | | **sso** | **String**| | [optional] [default to null] | @@ -843,7 +874,7 @@ No authorization required # **postFlagComment** -> APIEmptyResponse postFlagComment(commentId, sso) +> APIEmptyResponse postFlagComment(tenantId, commentId, broadcastId, sso) @@ -851,7 +882,9 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -869,7 +902,7 @@ No authorization required # **postRemoveComment** -> PostRemoveCommentResponse postRemoveComment(commentId, sso) +> PostRemoveCommentApiResponse postRemoveComment(tenantId, commentId, broadcastId, sso) @@ -877,12 +910,14 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type -[**PostRemoveCommentResponse**](../Models/PostRemoveCommentResponse.md) +[**PostRemoveCommentApiResponse**](../Models/PostRemoveCommentApiResponse.md) ### Authorization @@ -895,7 +930,7 @@ No authorization required # **postRestoreDeletedComment** -> APIEmptyResponse postRestoreDeletedComment(commentId, sso) +> APIEmptyResponse postRestoreDeletedComment(tenantId, commentId, broadcastId, sso) @@ -903,7 +938,9 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -921,7 +958,7 @@ No authorization required # **postSetCommentApprovalStatus** -> SetCommentApprovedResponse postSetCommentApprovalStatus(commentId, approved, sso) +> SetCommentApprovedResponse postSetCommentApprovalStatus(tenantId, commentId, approved, broadcastId, sso) @@ -929,8 +966,10 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **approved** | **Boolean**| | [optional] [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -948,7 +987,7 @@ No authorization required # **postSetCommentReviewStatus** -> APIEmptyResponse postSetCommentReviewStatus(commentId, reviewed, sso) +> APIEmptyResponse postSetCommentReviewStatus(tenantId, commentId, reviewed, broadcastId, sso) @@ -956,8 +995,10 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **reviewed** | **Boolean**| | [optional] [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -975,7 +1016,7 @@ No authorization required # **postSetCommentSpamStatus** -> APIEmptyResponse postSetCommentSpamStatus(commentId, spam, permNotSpam, sso) +> APIEmptyResponse postSetCommentSpamStatus(tenantId, commentId, spam, permNotSpam, broadcastId, sso) @@ -983,9 +1024,11 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **spam** | **Boolean**| | [optional] [default to null] | | **permNotSpam** | **Boolean**| | [optional] [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -1003,7 +1046,7 @@ No authorization required # **postSetCommentText** -> SetCommentTextResponse postSetCommentText(commentId, SetCommentTextParams, sso) +> SetCommentTextResponse postSetCommentText(tenantId, commentId, SetCommentTextParams, broadcastId, sso) @@ -1011,8 +1054,10 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **SetCommentTextParams** | [**SetCommentTextParams**](../Models/SetCommentTextParams.md)| | | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -1030,7 +1075,7 @@ No authorization required # **postUnFlagComment** -> APIEmptyResponse postUnFlagComment(commentId, sso) +> APIEmptyResponse postUnFlagComment(tenantId, commentId, broadcastId, sso) @@ -1038,7 +1083,9 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -1056,7 +1103,7 @@ No authorization required # **postVote** -> VoteResponse postVote(commentId, direction, sso) +> VoteResponse postVote(tenantId, commentId, direction, broadcastId, sso) @@ -1064,8 +1111,10 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **commentId** | **String**| | [default to null] | | **direction** | **String**| | [optional] [default to null] | +| **broadcastId** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | ### Return type @@ -1083,7 +1132,7 @@ No authorization required # **putAwardBadge** -> AwardUserBadgeResponse putAwardBadge(badgeId, userId, commentId, broadcastId, sso) +> AwardUserBadgeResponse putAwardBadge(tenantId, badgeId, userId, commentId, broadcastId, sso) @@ -1091,6 +1140,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **badgeId** | **String**| | [default to null] | | **userId** | **String**| | [optional] [default to null] | | **commentId** | **String**| | [optional] [default to null] | @@ -1112,7 +1162,7 @@ No authorization required # **putCloseThread** -> APIEmptyResponse putCloseThread(urlId, sso) +> APIEmptyResponse putCloseThread(tenantId, urlId, sso) @@ -1120,6 +1170,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **urlId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -1138,7 +1189,7 @@ No authorization required # **putRemoveBadge** -> RemoveUserBadgeResponse putRemoveBadge(badgeId, userId, commentId, broadcastId, sso) +> RemoveUserBadgeResponse putRemoveBadge(tenantId, badgeId, userId, commentId, broadcastId, sso) @@ -1146,6 +1197,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **badgeId** | **String**| | [default to null] | | **userId** | **String**| | [optional] [default to null] | | **commentId** | **String**| | [optional] [default to null] | @@ -1167,7 +1219,7 @@ No authorization required # **putReopenThread** -> APIEmptyResponse putReopenThread(urlId, sso) +> APIEmptyResponse putReopenThread(tenantId, urlId, sso) @@ -1175,6 +1227,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **urlId** | **String**| | [default to null] | | **sso** | **String**| | [optional] [default to null] | @@ -1193,7 +1246,7 @@ No authorization required # **setTrustFactor** -> SetUserTrustFactorResponse setTrustFactor(userId, trustFactor, sso) +> SetUserTrustFactorResponse setTrustFactor(tenantId, userId, trustFactor, sso) @@ -1201,6 +1254,7 @@ No authorization required |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **tenantId** | **String**| | [default to null] | | **userId** | **String**| | [optional] [default to null] | | **trustFactor** | **String**| | [optional] [default to null] | | **sso** | **String**| | [optional] [default to null] | diff --git a/docs/Models/PostRemoveCommentResponse.md b/docs/Models/PostRemoveCommentApiResponse.md similarity index 92% rename from docs/Models/PostRemoveCommentResponse.md rename to docs/Models/PostRemoveCommentApiResponse.md index 057e54b..a0942ee 100644 --- a/docs/Models/PostRemoveCommentResponse.md +++ b/docs/Models/PostRemoveCommentApiResponse.md @@ -1,4 +1,4 @@ -# PostRemoveCommentResponse +# PostRemoveCommentApiResponse ## Properties | Name | Type | Description | Notes | diff --git a/docs/README.md b/docs/README.md index c923b37..940707b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -121,49 +121,49 @@ All URIs are relative to *https://fastcomments.com* *DefaultApi* | [**updateTenantPackage**](Apis/DefaultApi.md#updateTenantPackage) | **PATCH** /api/v1/tenant-packages/{id} | | *DefaultApi* | [**updateTenantUser**](Apis/DefaultApi.md#updateTenantUser) | **PATCH** /api/v1/tenant-users/{id} | | *DefaultApi* | [**updateUserBadge**](Apis/DefaultApi.md#updateUserBadge) | **PUT** /api/v1/user-badges/{id} | | -| *ModerationApi* | [**deleteModerationVote**](Apis/ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/vote/{commentId}/{voteId} | | -*ModerationApi* | [**getApiComments**](Apis/ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/api/comments | | -*ModerationApi* | [**getApiExportStatus**](Apis/ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/api/export/status | | -*ModerationApi* | [**getApiIds**](Apis/ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/api/ids | | -*ModerationApi* | [**getBanUsersFromComment**](Apis/ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/ban-users/from-comment/{commentId} | | -*ModerationApi* | [**getCommentBanStatus**](Apis/ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/get-comment-ban-status/{commentId} | | -*ModerationApi* | [**getCommentChildren**](Apis/ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/comment-children/{commentId} | | -*ModerationApi* | [**getCount**](Apis/ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/count | | -*ModerationApi* | [**getCounts**](Apis/ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/counts | | -*ModerationApi* | [**getLogs**](Apis/ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/logs/{commentId} | | -*ModerationApi* | [**getManualBadges**](Apis/ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/get-manual-badges | | -*ModerationApi* | [**getManualBadgesForUser**](Apis/ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/get-manual-badges-for-user | | -*ModerationApi* | [**getModerationComment**](Apis/ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/comment/{commentId} | | -*ModerationApi* | [**getModerationCommentText**](Apis/ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/get-comment-text/{commentId} | | -*ModerationApi* | [**getPreBanSummary**](Apis/ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/pre-ban-summary/{commentId} | | -*ModerationApi* | [**getSearchCommentsSummary**](Apis/ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/search/comments/summary | | -*ModerationApi* | [**getSearchPages**](Apis/ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/search/pages | | -*ModerationApi* | [**getSearchSites**](Apis/ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/search/sites | | -*ModerationApi* | [**getSearchSuggest**](Apis/ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/search/suggest | | -*ModerationApi* | [**getSearchUsers**](Apis/ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/search/users | | -*ModerationApi* | [**getTrustFactor**](Apis/ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/get-trust-factor | | -*ModerationApi* | [**getUserBanPreference**](Apis/ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/user-ban-preference | | -*ModerationApi* | [**getUserInternalProfile**](Apis/ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/get-user-internal-profile | | -*ModerationApi* | [**postAdjustCommentVotes**](Apis/ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/adjust-comment-votes/{commentId} | | -*ModerationApi* | [**postApiExport**](Apis/ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/api/export | | -*ModerationApi* | [**postBanUserFromComment**](Apis/ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/ban-user/from-comment/{commentId} | | -*ModerationApi* | [**postBanUserUndo**](Apis/ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/ban-user/undo | | -*ModerationApi* | [**postBulkPreBanSummary**](Apis/ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/bulk-pre-ban-summary | | -*ModerationApi* | [**postCommentsByIds**](Apis/ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/comments-by-ids | | -*ModerationApi* | [**postFlagComment**](Apis/ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/flag-comment/{commentId} | | -*ModerationApi* | [**postRemoveComment**](Apis/ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/remove-comment/{commentId} | | -*ModerationApi* | [**postRestoreDeletedComment**](Apis/ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/restore-deleted-comment/{commentId} | | -*ModerationApi* | [**postSetCommentApprovalStatus**](Apis/ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/set-comment-approval-status/{commentId} | | -*ModerationApi* | [**postSetCommentReviewStatus**](Apis/ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/set-comment-review-status/{commentId} | | -*ModerationApi* | [**postSetCommentSpamStatus**](Apis/ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/set-comment-spam-status/{commentId} | | -*ModerationApi* | [**postSetCommentText**](Apis/ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/set-comment-text/{commentId} | | -*ModerationApi* | [**postUnFlagComment**](Apis/ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/un-flag-comment/{commentId} | | -*ModerationApi* | [**postVote**](Apis/ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/vote/{commentId} | | -*ModerationApi* | [**putAwardBadge**](Apis/ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/award-badge | | -*ModerationApi* | [**putCloseThread**](Apis/ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/close-thread | | -*ModerationApi* | [**putRemoveBadge**](Apis/ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/remove-badge | | -*ModerationApi* | [**putReopenThread**](Apis/ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/reopen-thread | | -*ModerationApi* | [**setTrustFactor**](Apis/ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/set-trust-factor | | +| *ModerationApi* | [**deleteModerationVote**](Apis/ModerationApi.md#deleteModerationVote) | **DELETE** /auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId} | | +*ModerationApi* | [**getApiComments**](Apis/ModerationApi.md#getApiComments) | **GET** /auth/my-account/moderate-comments/mod_api/api/comments | | +*ModerationApi* | [**getApiExportStatus**](Apis/ModerationApi.md#getApiExportStatus) | **GET** /auth/my-account/moderate-comments/mod_api/api/export/status | | +*ModerationApi* | [**getApiIds**](Apis/ModerationApi.md#getApiIds) | **GET** /auth/my-account/moderate-comments/mod_api/api/ids | | +*ModerationApi* | [**getBanUsersFromComment**](Apis/ModerationApi.md#getBanUsersFromComment) | **GET** /auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId} | | +*ModerationApi* | [**getCommentBanStatus**](Apis/ModerationApi.md#getCommentBanStatus) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId} | | +*ModerationApi* | [**getCommentChildren**](Apis/ModerationApi.md#getCommentChildren) | **GET** /auth/my-account/moderate-comments/mod_api/comment-children/{commentId} | | +*ModerationApi* | [**getCount**](Apis/ModerationApi.md#getCount) | **GET** /auth/my-account/moderate-comments/mod_api/count | | +*ModerationApi* | [**getCounts**](Apis/ModerationApi.md#getCounts) | **GET** /auth/my-account/moderate-comments/banned-users/mod_api/counts | | +*ModerationApi* | [**getLogs**](Apis/ModerationApi.md#getLogs) | **GET** /auth/my-account/moderate-comments/mod_api/logs/{commentId} | | +*ModerationApi* | [**getManualBadges**](Apis/ModerationApi.md#getManualBadges) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges | | +*ModerationApi* | [**getManualBadgesForUser**](Apis/ModerationApi.md#getManualBadgesForUser) | **GET** /auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user | | +*ModerationApi* | [**getModerationComment**](Apis/ModerationApi.md#getModerationComment) | **GET** /auth/my-account/moderate-comments/mod_api/comment/{commentId} | | +*ModerationApi* | [**getModerationCommentText**](Apis/ModerationApi.md#getModerationCommentText) | **GET** /auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId} | | +*ModerationApi* | [**getPreBanSummary**](Apis/ModerationApi.md#getPreBanSummary) | **GET** /auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId} | | +*ModerationApi* | [**getSearchCommentsSummary**](Apis/ModerationApi.md#getSearchCommentsSummary) | **GET** /auth/my-account/moderate-comments/mod_api/search/comments/summary | | +*ModerationApi* | [**getSearchPages**](Apis/ModerationApi.md#getSearchPages) | **GET** /auth/my-account/moderate-comments/mod_api/search/pages | | +*ModerationApi* | [**getSearchSites**](Apis/ModerationApi.md#getSearchSites) | **GET** /auth/my-account/moderate-comments/mod_api/search/sites | | +*ModerationApi* | [**getSearchSuggest**](Apis/ModerationApi.md#getSearchSuggest) | **GET** /auth/my-account/moderate-comments/mod_api/search/suggest | | +*ModerationApi* | [**getSearchUsers**](Apis/ModerationApi.md#getSearchUsers) | **GET** /auth/my-account/moderate-comments/mod_api/search/users | | +*ModerationApi* | [**getTrustFactor**](Apis/ModerationApi.md#getTrustFactor) | **GET** /auth/my-account/moderate-comments/mod_api/get-trust-factor | | +*ModerationApi* | [**getUserBanPreference**](Apis/ModerationApi.md#getUserBanPreference) | **GET** /auth/my-account/moderate-comments/mod_api/user-ban-preference | | +*ModerationApi* | [**getUserInternalProfile**](Apis/ModerationApi.md#getUserInternalProfile) | **GET** /auth/my-account/moderate-comments/mod_api/get-user-internal-profile | | +*ModerationApi* | [**postAdjustCommentVotes**](Apis/ModerationApi.md#postAdjustCommentVotes) | **POST** /auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId} | | +*ModerationApi* | [**postApiExport**](Apis/ModerationApi.md#postApiExport) | **POST** /auth/my-account/moderate-comments/mod_api/api/export | | +*ModerationApi* | [**postBanUserFromComment**](Apis/ModerationApi.md#postBanUserFromComment) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId} | | +*ModerationApi* | [**postBanUserUndo**](Apis/ModerationApi.md#postBanUserUndo) | **POST** /auth/my-account/moderate-comments/mod_api/ban-user/undo | | +*ModerationApi* | [**postBulkPreBanSummary**](Apis/ModerationApi.md#postBulkPreBanSummary) | **POST** /auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary | | +*ModerationApi* | [**postCommentsByIds**](Apis/ModerationApi.md#postCommentsByIds) | **POST** /auth/my-account/moderate-comments/mod_api/comments-by-ids | | +*ModerationApi* | [**postFlagComment**](Apis/ModerationApi.md#postFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/flag-comment/{commentId} | | +*ModerationApi* | [**postRemoveComment**](Apis/ModerationApi.md#postRemoveComment) | **POST** /auth/my-account/moderate-comments/mod_api/remove-comment/{commentId} | | +*ModerationApi* | [**postRestoreDeletedComment**](Apis/ModerationApi.md#postRestoreDeletedComment) | **POST** /auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId} | | +*ModerationApi* | [**postSetCommentApprovalStatus**](Apis/ModerationApi.md#postSetCommentApprovalStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId} | | +*ModerationApi* | [**postSetCommentReviewStatus**](Apis/ModerationApi.md#postSetCommentReviewStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId} | | +*ModerationApi* | [**postSetCommentSpamStatus**](Apis/ModerationApi.md#postSetCommentSpamStatus) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId} | | +*ModerationApi* | [**postSetCommentText**](Apis/ModerationApi.md#postSetCommentText) | **POST** /auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId} | | +*ModerationApi* | [**postUnFlagComment**](Apis/ModerationApi.md#postUnFlagComment) | **POST** /auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId} | | +*ModerationApi* | [**postVote**](Apis/ModerationApi.md#postVote) | **POST** /auth/my-account/moderate-comments/mod_api/vote/{commentId} | | +*ModerationApi* | [**putAwardBadge**](Apis/ModerationApi.md#putAwardBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/award-badge | | +*ModerationApi* | [**putCloseThread**](Apis/ModerationApi.md#putCloseThread) | **PUT** /auth/my-account/moderate-comments/mod_api/close-thread | | +*ModerationApi* | [**putRemoveBadge**](Apis/ModerationApi.md#putRemoveBadge) | **PUT** /auth/my-account/moderate-comments/mod_api/remove-badge | | +*ModerationApi* | [**putReopenThread**](Apis/ModerationApi.md#putReopenThread) | **PUT** /auth/my-account/moderate-comments/mod_api/reopen-thread | | +*ModerationApi* | [**setTrustFactor**](Apis/ModerationApi.md#setTrustFactor) | **PUT** /auth/my-account/moderate-comments/mod_api/set-trust-factor | | | *PublicApi* | [**blockFromCommentPublic**](Apis/PublicApi.md#blockFromCommentPublic) | **POST** /block-from-comment/{commentId} | | *PublicApi* | [**checkedCommentsForBlocked**](Apis/PublicApi.md#checkedCommentsForBlocked) | **GET** /check-blocked-comments | | *PublicApi* | [**createCommentPublic**](Apis/PublicApi.md#createCommentPublic) | **POST** /comments/{tenantId} | | @@ -480,7 +480,7 @@ All URIs are relative to *https://fastcomments.com* - [PatchPageAPIResponse](./Models/PatchPageAPIResponse.md) - [PatchSSOUserAPIResponse](./Models/PatchSSOUserAPIResponse.md) - [PendingCommentToSyncOutbound](./Models/PendingCommentToSyncOutbound.md) - - [PostRemoveCommentResponse](./Models/PostRemoveCommentResponse.md) + - [PostRemoveCommentApiResponse](./Models/PostRemoveCommentApiResponse.md) - [PreBanSummary](./Models/PreBanSummary.md) - [PubSubComment](./Models/PubSubComment.md) - [PubSubCommentBase](./Models/PubSubCommentBase.md) diff --git a/fastcomments.nimble b/fastcomments.nimble index 6aded9c..a20dba6 100644 --- a/fastcomments.nimble +++ b/fastcomments.nimble @@ -1,6 +1,6 @@ # Package -version = "2.0.0" +version = "3.0.0" author = "FastComments" description = "FastComments Nim SDK - A SDK for interacting with the FastComments API" license = "MIT" diff --git a/openapi.json b/openapi.json index ca0225c..302747d 100644 --- a/openapi.json +++ b/openapi.json @@ -13107,9 +13107,9 @@ ] } }, - "/auth/my-account/moderate-comments/count": { + "/auth/my-account/moderate-comments/mod_api/count": { "get": { - "operationId": "GetCount", + "operationId": "getCount", "responses": { "200": { "description": "Ok", @@ -13137,6 +13137,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13188,9 +13196,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/ids": { + "/auth/my-account/moderate-comments/mod_api/api/ids": { "get": { - "operationId": "GetApiIds", + "operationId": "getApiIds", "responses": { "200": { "description": "Ok", @@ -13218,6 +13226,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13277,9 +13293,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/comments": { + "/auth/my-account/moderate-comments/mod_api/api/comments": { "get": { - "operationId": "GetApiComments", + "operationId": "getApiComments", "responses": { "200": { "description": "Ok", @@ -13307,6 +13323,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "page", @@ -13384,9 +13408,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/export": { + "/auth/my-account/moderate-comments/mod_api/api/export": { "post": { - "operationId": "PostApiExport", + "operationId": "postApiExport", "responses": { "200": { "description": "Ok", @@ -13414,6 +13438,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13465,9 +13497,9 @@ ] } }, - "/auth/my-account/moderate-comments/api/export/status": { + "/auth/my-account/moderate-comments/mod_api/api/export/status": { "get": { - "operationId": "GetApiExportStatus", + "operationId": "getApiExportStatus", "responses": { "200": { "description": "Ok", @@ -13495,6 +13527,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "batchJobId", @@ -13514,9 +13554,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/users": { + "/auth/my-account/moderate-comments/mod_api/search/users": { "get": { - "operationId": "GetSearchUsers", + "operationId": "getSearchUsers", "responses": { "200": { "description": "Ok", @@ -13544,6 +13584,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13563,9 +13611,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/pages": { + "/auth/my-account/moderate-comments/mod_api/search/pages": { "get": { - "operationId": "GetSearchPages", + "operationId": "getSearchPages", "responses": { "200": { "description": "Ok", @@ -13593,6 +13641,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13612,9 +13668,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/sites": { + "/auth/my-account/moderate-comments/mod_api/search/sites": { "get": { - "operationId": "GetSearchSites", + "operationId": "getSearchSites", "responses": { "200": { "description": "Ok", @@ -13642,6 +13698,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13661,9 +13725,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/comments/summary": { + "/auth/my-account/moderate-comments/mod_api/search/comments/summary": { "get": { - "operationId": "GetSearchCommentsSummary", + "operationId": "getSearchCommentsSummary", "responses": { "200": { "description": "Ok", @@ -13691,6 +13755,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "value", @@ -13726,9 +13798,9 @@ ] } }, - "/auth/my-account/moderate-comments/search/suggest": { + "/auth/my-account/moderate-comments/mod_api/search/suggest": { "get": { - "operationId": "GetSearchSuggest", + "operationId": "getSearchSuggest", "responses": { "200": { "description": "Ok", @@ -13756,6 +13828,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "text-search", @@ -13775,9 +13855,9 @@ ] } }, - "/auth/my-account/moderate-comments/pre-ban-summary/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId}": { "get": { - "operationId": "GetPreBanSummary", + "operationId": "getPreBanSummary", "responses": { "200": { "description": "Ok", @@ -13805,6 +13885,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -13848,9 +13936,9 @@ ] } }, - "/auth/my-account/moderate-comments/bulk-pre-ban-summary": { + "/auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary": { "post": { - "operationId": "PostBulkPreBanSummary", + "operationId": "postBulkPreBanSummary", "responses": { "200": { "description": "Ok", @@ -13878,6 +13966,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "includeByUserIdAndEmail", @@ -13923,9 +14019,9 @@ } } }, - "/auth/my-account/moderate-comments/ban-user/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId}": { "post": { - "operationId": "PostBanUserFromComment", + "operationId": "postBanUserFromComment", "responses": { "200": { "description": "Ok", @@ -13953,6 +14049,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14036,9 +14140,9 @@ ] } }, - "/auth/my-account/moderate-comments/ban-users/from-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId}": { "get": { - "operationId": "GetBanUsersFromComment", + "operationId": "getBanUsersFromComment", "responses": { "200": { "description": "Ok", @@ -14066,6 +14170,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14085,9 +14197,9 @@ ] } }, - "/auth/my-account/moderate-comments/ban-user/undo": { + "/auth/my-account/moderate-comments/mod_api/ban-user/undo": { "post": { - "operationId": "PostBanUserUndo", + "operationId": "postBanUserUndo", "responses": { "200": { "description": "Ok", @@ -14115,6 +14227,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14136,16 +14256,16 @@ } } }, - "/auth/my-account/moderate-comments/remove-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/remove-comment/{commentId}": { "post": { - "operationId": "PostRemoveComment", + "operationId": "postRemoveComment", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "title": "PostRemoveCommentResponse", + "title": "PostRemoveCommentApiResponse", "anyOf": [ { "$ref": "#/components/schemas/DeleteCommentResult" @@ -14174,6 +14294,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14182,6 +14310,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14193,9 +14329,9 @@ ] } }, - "/auth/my-account/moderate-comments/restore-deleted-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId}": { "post": { - "operationId": "PostRestoreDeletedComment", + "operationId": "postRestoreDeletedComment", "responses": { "200": { "description": "Ok", @@ -14223,6 +14359,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14231,6 +14375,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14242,9 +14394,9 @@ ] } }, - "/auth/my-account/moderate-comments/flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/flag-comment/{commentId}": { "post": { - "operationId": "PostFlagComment", + "operationId": "postFlagComment", "responses": { "200": { "description": "Ok", @@ -14272,6 +14424,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14280,6 +14440,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14291,9 +14459,9 @@ ] } }, - "/auth/my-account/moderate-comments/un-flag-comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId}": { "post": { - "operationId": "PostUnFlagComment", + "operationId": "postUnFlagComment", "responses": { "200": { "description": "Ok", @@ -14321,6 +14489,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14329,6 +14505,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14340,9 +14524,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-review-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId}": { "post": { - "operationId": "PostSetCommentReviewStatus", + "operationId": "postSetCommentReviewStatus", "responses": { "200": { "description": "Ok", @@ -14370,6 +14554,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14386,6 +14578,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14397,9 +14597,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId}": { "post": { - "operationId": "PostSetCommentSpamStatus", + "operationId": "postSetCommentSpamStatus", "responses": { "200": { "description": "Ok", @@ -14427,6 +14627,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14451,6 +14659,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14462,9 +14678,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-approval-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId}": { "post": { - "operationId": "PostSetCommentApprovalStatus", + "operationId": "postSetCommentApprovalStatus", "responses": { "200": { "description": "Ok", @@ -14492,6 +14708,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14508,6 +14732,14 @@ "type": "boolean" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14519,9 +14751,9 @@ ] } }, - "/auth/my-account/moderate-comments/logs/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/logs/{commentId}": { "get": { - "operationId": "GetLogs", + "operationId": "getLogs", "responses": { "200": { "description": "Ok", @@ -14549,6 +14781,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14568,9 +14808,9 @@ ] } }, - "/auth/my-account/moderate-comments/comment/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/comment/{commentId}": { "get": { - "operationId": "GetModerationComment", + "operationId": "getModerationComment", "responses": { "200": { "description": "Ok", @@ -14598,6 +14838,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14633,9 +14881,9 @@ ] } }, - "/auth/my-account/moderate-comments/comments-by-ids": { + "/auth/my-account/moderate-comments/mod_api/comments-by-ids": { "post": { - "operationId": "PostCommentsByIds", + "operationId": "postCommentsByIds", "responses": { "200": { "description": "Ok", @@ -14663,6 +14911,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14684,9 +14940,9 @@ } } }, - "/auth/my-account/moderate-comments/comment-children/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/comment-children/{commentId}": { "get": { - "operationId": "GetCommentChildren", + "operationId": "getCommentChildren", "responses": { "200": { "description": "Ok", @@ -14714,6 +14970,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14733,9 +14997,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-comment-text/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId}": { "get": { - "operationId": "GetModerationCommentText", + "operationId": "getModerationCommentText", "responses": { "200": { "description": "Ok", @@ -14763,6 +15027,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14782,9 +15054,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-comment-text/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId}": { "post": { - "operationId": "PostSetCommentText", + "operationId": "postSetCommentText", "responses": { "200": { "description": "Ok", @@ -14812,6 +15084,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14820,6 +15100,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14841,9 +15129,9 @@ } } }, - "/auth/my-account/moderate-comments/adjust-comment-votes/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId}": { "post": { - "operationId": "PostAdjustCommentVotes", + "operationId": "postAdjustCommentVotes", "responses": { "200": { "description": "Ok", @@ -14871,6 +15159,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14879,6 +15175,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14900,9 +15204,9 @@ } } }, - "/auth/my-account/moderate-comments/vote/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}": { "post": { - "operationId": "PostVote", + "operationId": "postVote", "responses": { "200": { "description": "Ok", @@ -14930,6 +15234,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -14946,6 +15258,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -14957,9 +15277,9 @@ ] } }, - "/auth/my-account/moderate-comments/vote/{commentId}/{voteId}": { + "/auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId}": { "delete": { - "operationId": "DeleteModerationVote", + "operationId": "deleteModerationVote", "responses": { "200": { "description": "Ok", @@ -14987,6 +15307,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -15003,6 +15331,14 @@ "type": "string" } }, + { + "in": "query", + "name": "broadcastId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15014,9 +15350,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-comment-ban-status/{commentId}": { + "/auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId}": { "get": { - "operationId": "GetCommentBanStatus", + "operationId": "getCommentBanStatus", "responses": { "200": { "description": "Ok", @@ -15044,6 +15380,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "commentId", @@ -15063,9 +15407,9 @@ ] } }, - "/auth/my-account/moderate-comments/user-ban-preference": { + "/auth/my-account/moderate-comments/mod_api/user-ban-preference": { "get": { - "operationId": "GetUserBanPreference", + "operationId": "getUserBanPreference", "responses": { "200": { "description": "Ok", @@ -15093,6 +15437,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15104,9 +15456,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-manual-badges": { + "/auth/my-account/moderate-comments/mod_api/get-manual-badges": { "get": { - "operationId": "GetManualBadges", + "operationId": "getManualBadges", "responses": { "200": { "description": "Ok", @@ -15134,6 +15486,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -15145,9 +15505,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-manual-badges-for-user": { + "/auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user": { "get": { - "operationId": "GetManualBadgesForUser", + "operationId": "getManualBadgesForUser", "responses": { "200": { "description": "Ok", @@ -15175,6 +15535,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgesUserId", @@ -15202,9 +15570,9 @@ ] } }, - "/auth/my-account/moderate-comments/award-badge": { + "/auth/my-account/moderate-comments/mod_api/award-badge": { "put": { - "operationId": "PutAwardBadge", + "operationId": "putAwardBadge", "responses": { "200": { "description": "Ok", @@ -15232,6 +15600,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgeId", @@ -15275,9 +15651,9 @@ ] } }, - "/auth/my-account/moderate-comments/remove-badge": { + "/auth/my-account/moderate-comments/mod_api/remove-badge": { "put": { - "operationId": "PutRemoveBadge", + "operationId": "putRemoveBadge", "responses": { "200": { "description": "Ok", @@ -15305,6 +15681,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "badgeId", @@ -15348,9 +15732,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-trust-factor": { + "/auth/my-account/moderate-comments/mod_api/get-trust-factor": { "get": { - "operationId": "GetTrustFactor", + "operationId": "getTrustFactor", "responses": { "200": { "description": "Ok", @@ -15378,6 +15762,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "userId", @@ -15397,9 +15789,9 @@ ] } }, - "/auth/my-account/moderate-comments/set-trust-factor": { + "/auth/my-account/moderate-comments/mod_api/set-trust-factor": { "put": { - "operationId": "SetTrustFactor", + "operationId": "setTrustFactor", "responses": { "200": { "description": "Ok", @@ -15427,6 +15819,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "userId", @@ -15454,9 +15854,9 @@ ] } }, - "/auth/my-account/moderate-comments/get-user-internal-profile": { + "/auth/my-account/moderate-comments/mod_api/get-user-internal-profile": { "get": { - "operationId": "GetUserInternalProfile", + "operationId": "getUserInternalProfile", "responses": { "200": { "description": "Ok", @@ -15484,6 +15884,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "commentId", @@ -15503,9 +15911,9 @@ ] } }, - "/auth/my-account/moderate-comments/reopen-thread": { + "/auth/my-account/moderate-comments/mod_api/reopen-thread": { "put": { - "operationId": "PutReopenThread", + "operationId": "putReopenThread", "responses": { "200": { "description": "Ok", @@ -15533,6 +15941,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "urlId", @@ -15552,9 +15968,9 @@ ] } }, - "/auth/my-account/moderate-comments/close-thread": { + "/auth/my-account/moderate-comments/mod_api/close-thread": { "put": { - "operationId": "PutCloseThread", + "operationId": "putCloseThread", "responses": { "200": { "description": "Ok", @@ -15582,6 +15998,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "urlId", @@ -15601,9 +16025,9 @@ ] } }, - "/auth/my-account/moderate-comments/banned-users/counts": { + "/auth/my-account/moderate-comments/banned-users/mod_api/counts": { "get": { - "operationId": "GetCounts", + "operationId": "getCounts", "responses": { "200": { "description": "Ok", @@ -15631,6 +16055,14 @@ ], "security": [], "parameters": [ + { + "in": "query", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "sso", @@ -22595,7 +23027,7 @@ { "in": "query", "name": "tenantId", - "required": false, + "required": true, "schema": { "type": "string" } @@ -22647,7 +23079,7 @@ { "in": "query", "name": "tenantId", - "required": false, + "required": true, "schema": { "type": "string" } @@ -22697,17 +23129,17 @@ ], "parameters": [ { - "in": "path", - "name": "tag", + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "tenantId", - "required": false, + "in": "path", + "name": "tag", + "required": true, "schema": { "type": "string" } @@ -22755,17 +23187,17 @@ ], "parameters": [ { - "in": "path", - "name": "tag", + "in": "query", + "name": "tenantId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "tenantId", - "required": false, + "in": "path", + "name": "tag", + "required": true, "schema": { "type": "string" } diff --git a/tests/test_sso_integration.nim b/tests/test_sso_integration.nim index 8156d09..3621146 100644 --- a/tests/test_sso_integration.nim +++ b/tests/test_sso_integration.nim @@ -40,32 +40,9 @@ suite "SSO Integration Tests": httpClient = client, tenantId = tenantID, urlId = "sdk-test-page", - page = 0, - direction = SortDirections.NF, - sso = "", - skip = 0, - skipChildren = 0, - limit = 0, - limitChildren = 0, - countChildren = false, - fetchPageForCommentId = "", - includeConfig = false, - countAll = false, - includei10n = false, - locale = "", - modules = "", - isCrawler = false, - includeNotificationCount = false, - asTree = false, - maxTreeDepth = 0, - useFullTranslationIds = false, - parentId = "", - searchText = "", - hashTags = @[], - userId = "", - customConfigStr = "", - afterCommentId = "", - beforeCommentId = "" + options = GetCommentsPublicOptions( + direction: SortDirections.NF + ) ) check httpResponse.code == Http200 @@ -104,8 +81,9 @@ suite "SSO Integration Tests": urlId = "sdk-test-nim", broadcastId = "test-" & $timestamp, commentData = commentData, - sessionId = "", - sso = token + options = CreateCommentPublicOptions( + sso: token + ) ) check createHttpResponse.code == Http200 @@ -116,32 +94,10 @@ suite "SSO Integration Tests": httpClient = client, tenantId = tenantID, urlId = "sdk-test-nim", - page = 0, - direction = SortDirections.NF, - sso = token, - skip = 0, - skipChildren = 0, - limit = 0, - limitChildren = 0, - countChildren = false, - fetchPageForCommentId = "", - includeConfig = false, - countAll = false, - includei10n = false, - locale = "", - modules = "", - isCrawler = false, - includeNotificationCount = false, - asTree = false, - maxTreeDepth = 0, - useFullTranslationIds = false, - parentId = "", - searchText = "", - hashTags = @[], - userId = "", - customConfigStr = "", - afterCommentId = "", - beforeCommentId = "" + options = GetCommentsPublicOptions( + direction: SortDirections.NF, + sso: token + ) ) check getHttpResponse.code == Http200 @@ -183,8 +139,9 @@ suite "SSO Integration Tests": urlId = testUrlId, broadcastId = "test-" & $timestamp, commentData = commentData, - sessionId = "", - sso = token + options = CreateCommentPublicOptions( + sso: token + ) ) check createHttpResponse.code == Http200 @@ -200,22 +157,10 @@ suite "SSO Integration Tests": let (getResponse, getHttpResponse) = getComments( httpClient = authClient, tenantId = tenantID, - page = 0, - limit = 0, - skip = 0, - asTree = false, - skipChildren = 0, - limitChildren = 0, - maxTreeDepth = 0, - urlId = testUrlId, - userId = "", - anonUserId = "", - contextUserId = "", - hashTag = "", - parentId = "", - direction = SortDirections.NF, - fromDate = 0, - toDate = 0 + options = GetCommentsOptions( + urlId: testUrlId, + direction: SortDirections.NF + ) ) check getHttpResponse.code == Http200 @@ -262,8 +207,9 @@ suite "SSO Integration Tests": urlId = testUrlId, broadcastId = "test-" & $timestamp, commentData = commentData, - sessionId = "", - sso = token + options = CreateCommentPublicOptions( + sso: token + ) ) check createHttpResponse.code == Http200 @@ -277,32 +223,10 @@ suite "SSO Integration Tests": httpClient = client, tenantId = tenantID, urlId = testUrlId, - page = 0, - direction = SortDirections.NF, - sso = token, - skip = 0, - skipChildren = 0, - limit = 0, - limitChildren = 0, - countChildren = false, - fetchPageForCommentId = "", - includeConfig = false, - countAll = false, - includei10n = false, - locale = "", - modules = "", - isCrawler = false, - includeNotificationCount = false, - asTree = false, - maxTreeDepth = 0, - useFullTranslationIds = false, - parentId = "", - searchText = "", - hashTags = @[], - userId = "", - customConfigStr = "", - afterCommentId = "", - beforeCommentId = "" + options = GetCommentsPublicOptions( + direction: SortDirections.NF, + sso: token + ) ) check getHttpResponse.code == Http200 diff --git a/update.sh b/update.sh index 0a9fdbc..a700cc6 100755 --- a/update.sh +++ b/update.sh @@ -4,7 +4,7 @@ set -e # FastComments openapi-generator build. The Nim generator now references model # types by their declared (camelized) names, so no post-generation patching is # needed. Just a jar; downloaded on demand. -JAR_URL="https://github.com/winrid/openapi-generator/releases/download/fastcomments-build-20260619/openapi-generator-cli.jar" +JAR_URL="https://github.com/winrid/openapi-generator/releases/download/fastcomments-build-20260630/openapi-generator-cli.jar" JAR_FILE="./openapi-generator-cli.jar" [ -f "$JAR_FILE" ] || wget -q "$JAR_URL" -O "$JAR_FILE"